commit 71661dca94fadde57f8bd7190845db65474cf939 Author: runs Date: Sun Aug 8 13:52:46 2021 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fb2523e --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +## Generic ignorable patterns and files +*.obj +*.blend1 +.git + diff --git a/README.md b/README.md new file mode 100644 index 0000000..0328a38 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# juanchi +Juanchi game for Minetest diff --git a/game.conf b/game.conf new file mode 100644 index 0000000..1c78a81 --- /dev/null +++ b/game.conf @@ -0,0 +1 @@ +name = Juanchi diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..1cd3408 --- /dev/null +++ b/license.txt @@ -0,0 +1 @@ +GPLv3 \ No newline at end of file diff --git a/menu/header.png b/menu/header.png new file mode 100755 index 0000000..2f4bb8f Binary files /dev/null and b/menu/header.png differ diff --git a/menu/icon.bmp b/menu/icon.bmp new file mode 100755 index 0000000..b6ba86d Binary files /dev/null and b/menu/icon.bmp differ diff --git a/menu/icon.ico b/menu/icon.ico new file mode 100755 index 0000000..ffacf92 Binary files /dev/null and b/menu/icon.ico differ diff --git a/menu/icon.png b/menu/icon.png new file mode 100755 index 0000000..281d5bb Binary files /dev/null and b/menu/icon.png differ diff --git a/menu/overlay.png b/menu/overlay.png new file mode 100644 index 0000000..0f85296 Binary files /dev/null and b/menu/overlay.png differ diff --git a/minetest.conf b/minetest.conf new file mode 100644 index 0000000..5045e72 --- /dev/null +++ b/minetest.conf @@ -0,0 +1,243 @@ +# This file contains a list of all available settings and their default value for minetest.conf + +# By default, all the settings are commented and not functional. +# Uncomment settings by removing the preceding #. + +# minetest.conf is read by default from: +# ../minetest.conf +# ../../minetest.conf +# Any other path can be chosen by passing the path as a parameter +# to the program, eg. "minetest.exe --config ../minetest.conf.example". + +# Further documentation: +# http://wiki.minetest.net/ + +# Use mip mapping to scale textures. May slightly increase performance. +# type: bool +mip_map = true + +# Use anisotropic filtering when viewing at textures from an angle. +# type: bool +anisotropic_filter = true + +# Use bilinear filtering when scaling textures. +# type: bool +# bilinear_filter = false + +# Use trilinear filtering when scaling textures. +# type: bool +trilinear_filter = false + +# Filtered textures can blend RGB values with fully-transparent neighbors, +# which PNG optimizers usually discard, sometimes resulting in a dark or +# light edge to transparent textures. Apply this filter to clean that up +# at texture load time. +# type: bool +texture_clean_transparent = true + +# When using bilinear/trilinear/anisotropic filters, low-resolution textures +# can be blurred, so automatically upscale them with nearest-neighbor +# interpolation to preserve crisp pixels. This sets the minimum texture size +# for the upscaled textures; higher values look sharper, but require more +# memory. Powers of 2 are recommended. Setting this higher than 1 may not +# have a visible effect unless bilinear/trilinear/anisotropic filtering is +# enabled. +# type: int +texture_min_size = 128 + +# Experimental option, might cause visible spaces between blocks +# when set to higher number than 0. +# type: enum values: 0, 1, 2, 4, 8, 16 +fsaa = 8 + +# Shaders allow advanced visual effects and may increase performance on some video cards. +# This only works with the OpenGL video backend. +# type: bool +enable_shaders = true + +# Enables filmic tone mapping +# type: bool +tone_mapping = true + +# Enables bumpmapping for textures. Normalmaps need to be supplied by the texture pack +# or need to be auto-generated. +# Requires shaders to be enabled. +# type: bool +enable_bumpmapping = false + +# Enables on the fly normalmap generation (Emboss effect). +# Requires bumpmapping to be enabled. +# type: bool +generate_normalmaps = false + +# Strength of generated normalmaps. +# type: float +normalmaps_strength = 0.6 + +# Defines sampling step of texture. +# A higher value results in smoother normal maps. +# type: int min: 0 max: 2 +normalmaps_smooth = 1 + +# Enables parallax occlusion mapping. +# Requires shaders to be enabled. +# type: bool +enable_parallax_occlusion = true + +# 0 = parallax occlusion with slope information (faster). +# 1 = relief mapping (slower, more accurate). +# type: int min: 0 max: 1 +parallax_occlusion_mode = 0 + +# Strength of parallax. +# type: float +3d_paralax_strength = 0.025 + +# Number of parallax occlusion iterations. +# type: int +parallax_occlusion_iterations = 4 + +# Overall scale of parallax occlusion effect. +# type: float +parallax_occlusion_scale = 0.08 + +# Overall bias of parallax occlusion effect, usually scale/2. +# type: float +parallax_occlusion_bias = 0.04 + +# Width component of the initial window size. +# type: int +screenW = 1920 + +# Height component of the initial window size. +# type: int +screenH = 1080 + +# Save window size automatically when modified. +# type: bool +autosave_screensize = true + +# Fullscreen mode. +# type: bool +fullscreen = true + +# Vertical screen synchronization. +# type: bool +vsync = true + +# The rendering back-end for Irrlicht. +# type: enum values: null, software, burningsvideo, direct3d8, direct3d9, opengl +video_driver = opengl + +# Modifies the size of the hudbar elements. +# type: float + +hud_scaling = 1.5 + +# Scale gui by a user specified value. +# Use a nearest-neighbor-anti-alias filter to scale the GUI. +# This will smooth over some of the rough edges, and blend +# pixels when scaling down, at the cost of blurring some +# edge pixels when images are scaled by non-integer sizes. +# type: float +gui_scaling = 1.3 + +# type: int +font_size = 22 + +# Path to save screenshots at. +# type: path +screenshot_path = ../../screenshots + +### Advanced + +# Adjust dpi configuration to your screen (non X11/Android only) e.g. for 4k screens. +# type: int + screen_dpi = 110 + +# Whether to show the client debug info (has the same effect as hitting F5). +# type: bool +show_debug = false + +## Security + +# If enabled, fences and walls cannot be jumped over. +enable_fence_tall = true + +# Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers. +# type: int +# profiler_print_interval = 0 + +mainmenu_last_selected_world = 2 +mg_name = v7 +selected_world_path = /home/runs/.minetest/worlds/ewerew +fixed_map_seed = +menu_last_game = minetest +maintab_LAST = local +screenW = 1920 +screenH = 1080 +generate_normalmaps = false +tone_mapping = true +enable_waving_plants = false +node_highlighting = box +enable_parallax_occlusion = true +leaves_style = fancy +enable_bumpmapping = false +trilinear_filter = false +bilinear_filter = false +anisotropic_filter = true +mip_map = true +enable_waving_leaves = false +fsaa = 8 +enable_waving_water = false +mainmenu_last_selected_TP = 2 +texture_path = /home/runs/.minetest/textures/JohnSmith +world_config_selected_mod = 1 +sound_volume = 1 +enable_shaders = true +enable_damage = false +creative_mode = true +main_menu_technical_settings = false +enable_particles = true +enable_3d_clouds = true +opaque_water = false +item_drop.enable_pickup_key = true +item_drop.magnet_radius = 1 +item_drop.pickup_radius = 0.5 +item_drop.magnet_time = 5 +item_drop.enable_item_pickup = true +item_drop.enable_item_drop = false +item_drop.pickup_keytype = Use +item_drop.pickup_keyinvert = true +fps_max = 60 +server_announce = false +remote_port = 30000 +address = pandorabox.io +hunger_ng_use_hunger_bar = false +show_entity_selectionbox = true +# Temperature variation for biomes. +# type: noise_params_2d +mg_biome_np_heat = { + offset = 50, + scale = 50, + spread = (500, 500, 500), + seed = 5349, + octaves = 3, + persistence = 0.5, + lacunarity = 2.0, + flags = eased +} +# Humidity variation for biomes. +# type: noise_params_2d +mg_biome_np_humidity = { + offset = 50, + scale = 50, + spread = (500, 500, 500), + seed = 842, + octaves = 3, + persistence = 0.5, + lacunarity = 2.0, + flags = eased +} +basic_privs = interact, shout, settime, schematic_save, fly, debug, teleport, noclip, weather +default_privs = interact, shout, settime, schematic_save, fly, server, debug, teleport, noclip, weather diff --git a/mods/3d_armor/.gitattributes b/mods/3d_armor/.gitattributes new file mode 100644 index 0000000..f97e4ab --- /dev/null +++ b/mods/3d_armor/.gitattributes @@ -0,0 +1,5 @@ +.* export-ignore +gendoc.sh export-ignore +integration-test.sh export-ignore +preview_gen.py export-ignore +screenshot.xcf export-ignore diff --git a/mods/3d_armor/.gitignore b/mods/3d_armor/.gitignore new file mode 100644 index 0000000..ba96b08 --- /dev/null +++ b/mods/3d_armor/.gitignore @@ -0,0 +1,11 @@ +## Generic ignorable patterns and files +*~ +.*.swp +*bak* +tags +*.vim +armor.conf + +## Eclipse project files & directories +.project +.settings diff --git a/mods/3d_armor/.luacheckrc b/mods/3d_armor/.luacheckrc new file mode 100644 index 0000000..88349af --- /dev/null +++ b/mods/3d_armor/.luacheckrc @@ -0,0 +1,32 @@ + +unused_args = false + +globals = { + "wieldview", + "armor", + "inventory_plus" +} + +read_globals = { + -- Stdlib + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Minetest + "vector", "ItemStack", + "dump", "VoxelArea", + + -- deps + "default", + "minetest", + "unified_inventory", + "wardrobe", + "player_monoids", + "armor_monoid", + "sfinv", + "ARMOR_MATERIALS", + "ARMOR_FIRE_NODES", + "pova", + "skins", + "u_skins" +} diff --git a/mods/3d_armor/3d_armor/LICENSE.txt b/mods/3d_armor/3d_armor/LICENSE.txt new file mode 100644 index 0000000..f253f29 --- /dev/null +++ b/mods/3d_armor/3d_armor/LICENSE.txt @@ -0,0 +1,26 @@ +[mod] 3d Armor [3d_armor] +========================= + +License Source Code +------------------- + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License Textures +---------------- + +Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0 diff --git a/mods/3d_armor/3d_armor/README.md b/mods/3d_armor/3d_armor/README.md new file mode 100644 index 0000000..dd87d81 --- /dev/null +++ b/mods/3d_armor/3d_armor/README.md @@ -0,0 +1,526 @@ +# [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) +|- - [armor_init_times](#number-of-initialization-attempts) |||- - [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) +|- - [wieldview_update_time](#how-often-player-wield-items-are-updated) |||- - - [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 + +### Initialization glitches when a player first joins + **Increase to prevent glitches** + + armor_init_delay = 2 + +### Number of initialization attempts + **Increase to prevent glitches - Use in conjunction with armor_init_delay if initialization problems persist.** + + armor_init_times = 10 + +### 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 = + preview = + armor_groups = + damage_groups =
+ reciprocate_damage = + on_equip = + on_unequip = + on_destroy = + on_damage = + on_punched = + +***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 + - **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}, + }) + +### 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* diff --git a/mods/3d_armor/3d_armor/api.lua b/mods/3d_armor/3d_armor/api.lua new file mode 100644 index 0000000..3fbff1e --- /dev/null +++ b/mods/3d_armor/3d_armor/api.lua @@ -0,0 +1,979 @@ + +--- 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 use_playerphysics = minetest.global_exists("playerphysics") +local armor_def = setmetatable({}, { + __index = function() + return setmetatable({ + groups = setmetatable({}, { + __index = function() + return 0 + end}) + }, { + __index = function() + return 0 + end + }) + end, +}) +local armor_textures = setmetatable({}, { + __index = function() + return setmetatable({}, { + __index = function() + return "blank.png" + end + }) + end +}) + +armor = { + timer = 0, + elements = {"head", "torso", "legs", "feet"}, + physics = {"jump", "speed", "gravity"}, + attributes = {"heal", "fire", "water"}, + formspec = "image[2.5,0;2,4;armor_preview]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + default.get_hotbar_bg(0, 4.7).. + "list[current_player;main;0,4.7;8,1;]".. + "list[current_player;main;0,5.85;8,3;8]", + def = armor_def, + textures = armor_textures, + default_skin = "character", + materials = { + wood = "group:wood", + cactus = "default:cactus", + steel = "default:steel_ingot", + bronze = "default:bronze_ingot", + diamond = "default:diamond", + gold = "default:gold_ingot", + mithril = "moreores:mithril_ingot", + crystal = "ethereal:crystal_ingot", + lava = "lavastuff: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, + init_times = 10, + bones_delay = 1, + update_time = 1, + drop = minetest.get_modpath("bones") ~= nil, + destroy = false, + level_multiplier = 1, + heal_multiplier = 1, + material_wood = true, + material_cactus = true, + material_steel = true, + material_bronze = true, + material_diamond = true, + material_gold = true, + material_mithril = true, + material_crystal = true, + material_lava = true, + set_elements = "head torso legs feet shield", + set_multiplier = 1.1, + water_protect = true, + fire_protect = minetest.get_modpath("ethereal") ~= nil, + fire_protect_torch = minetest.get_modpath("ethereal") ~= nil, + 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 + default.player_set_textures(player, { + self.textures[name].skin, + self.textures[name].armor, + self.textures[name].wielditem, + }) + end + self:run_callbacks("on_update", player) +end + +--- 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 = "3d_armor_trans.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"] = 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 immortal = player:get_armor_groups().immortal + if immortal and immortal ~= 0 then + groups.immortal = 1 + end + player:set_armor_groups(groups) + end + if use_playerphysics then + playerphysics.remove_physics_factor(player, "speed", "3d_armor:physics") + playerphysics.remove_physics_factor(player, "jump", "3d_armor:physics") + playerphysics.remove_physics_factor(player, "gravity", "3d_armor:physics") + playerphysics.add_physics_factor(player, "speed", "3d_armor:physics", physics.speed) + playerphysics.add_physics_factor(player, "jump", "3d_armor:physics", physics.jump) + playerphysics.add_physics_factor(player, "gravity", "3d_armor:physics", physics.gravity) + elseif 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) + 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 + 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 inv = player:get_inventory() + if inv:room_for_item("main", stack) then + inv:add_item("main", stack) + else + minetest.add_item(player:get_pos(), stack) + 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 + local player = minetest.get_player_by_name(name) + local meta = player:get_meta() + local gender = meta:get_string("gender") + return player_api.registered_models[player_api.get_gender_model(gender)].textures[1] +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) + if armor.def[name].init_time == 0 then + return "label[0,0;Armor not initialized!]" + end + local formspec = armor.formspec.. + "list[detached:"..name.."_armor;armor;0,0.5;2,3;]" + if listring == true then + formspec = formspec.."listring[current_player;main]".. + "listring[detached:"..name.."_armor;armor]" + end + formspec = formspec:gsub("armor_preview", armor.textures[name].preview) + formspec = formspec:gsub("armor_level", armor.def[name].level) + for _, attr in pairs(self.attributes) do + formspec = formspec:gsub("armor_attr_"..attr, armor.def[name][attr]) + end + for group, _ in pairs(self.registered_groups) do + formspec = formspec:gsub("armor_group_"..group, + armor.def[name].groups[group]) + end + return formspec +end + +--- 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 + 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 diff --git a/mods/3d_armor/3d_armor/armor.conf.example b/mods/3d_armor/3d_armor/armor.conf.example new file mode 100644 index 0000000..9ce34b4 --- /dev/null +++ b/mods/3d_armor/3d_armor/armor.conf.example @@ -0,0 +1,65 @@ +-- DEPRECATED, will not be supported in future versions + +-- See README.txt for new configuration options. + +-- Armor Configuration (defaults) + +-- You can remove any unwanted armor materials from this table. +-- Note that existing armor that is removed will show up as an unknown item. +ARMOR_MATERIALS = { + wood = "group:wood", + cactus = "default:cactus", + steel = "default:steel_ingot", + bronze = "default:bronze_ingot", + diamond = "default:diamond", + gold = "default:gold_ingot", + mithril = "moreores:mithril_ingot", + crystal = "ethereal:crystal_ingot", +} + +-- Enable fire protection (defaults true if using ethereal mod) +ARMOR_FIRE_PROTECT = false + +-- Fire protection nodes, (name, protection level, damage) +ARMOR_FIRE_NODES = { + {"default:lava_source", 5, 4}, + {"default:lava_flowing", 5, 4}, + {"fire:basic_flame", 3, 4}, + {"fire:permanent_flame", 3, 4}, + {"ethereal:crystal_spike", 2, 1}, + {"ethereal:fire_flower", 2, 1}, + {"default:torch", 1, 1}, +} + +-- Increase this if you get initialization glitches when a player first joins. +ARMOR_INIT_DELAY = 1 + +-- Number of initialization attempts. +-- Use in conjunction with ARMOR_INIT_DELAY if initialization problems persist. +ARMOR_INIT_TIMES = 1 + +-- Increase this if armor is not getting into bones due to server lag. +ARMOR_BONES_DELAY = 1 + +-- How often player armor/wield items are updated. +ARMOR_UPDATE_TIME = 1 + +-- Drop armor when a player dies. +-- Uses bones mod if present, otherwise items are dropped around the player. +ARMOR_DROP = true + +-- Pulverise armor when a player dies, overrides ARMOR_DROP. +ARMOR_DESTROY = false + +-- You can use this to increase or decrease overall armor effectiveness, +-- eg: ARMOR_LEVEL_MULTIPLIER = 0.5 will reduce armor level by half. +ARMOR_LEVEL_MULTIPLIER = 1 + +-- You can use this to increase or decrease overall armor healing, +-- eg: ARMOR_HEAL_MULTIPLIER = 0 will disable healing altogether. +ARMOR_HEAL_MULTIPLIER = 1 + +-- You can use this to increase or decrease overall armor radiation protection, +-- eg: ARMOR_RADIATION_MULTIPLIER = 0 will completely disable radiation protection. +-- Note: patched technic mod is required +ARMOR_RADIATION_MULTIPLIER = 1 diff --git a/mods/3d_armor/3d_armor/armor.lua b/mods/3d_armor/3d_armor/armor.lua new file mode 100644 index 0000000..a4c4497 --- /dev/null +++ b/mods/3d_armor/3d_armor/armor.lua @@ -0,0 +1,940 @@ + +--- Registered armors. +-- +-- @topic armor + + +-- support for i18n +local S = armor.get_translator + + +--- 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, + 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, + 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, + 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") + + +--- Wood +-- +-- Requires setting `armor_material_wood`. +-- +-- @section wood + +if armor.materials.wood then + --- Wood Helmet + -- + -- @helmet 3d_armor:helmet_wood + -- @img 3d_armor_inv_helmet_wood.png + -- @grp armor_head 1 + -- @grp armor_heal 0 + -- @grp armor_use 2000 + -- @grp flammable 1 + -- @armorgrp fleshy 5 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 3 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:helmet_wood", { + description = S("Wood Helmet"), + inventory_image = "3d_armor_inv_helmet_wood.png", + groups = {armor_head=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + --- Wood Chestplate + -- + -- @chestplate 3d_armor:chestplate_wood + -- @img 3d_armor_inv_chestplate_wood.png + -- @grp armor_torso 1 + -- @grp armor_heal 0 + -- @grp armor_use 2000 + -- @grp flammable 1 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 3 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:chestplate_wood", { + description = S("Wood Chestplate"), + inventory_image = "3d_armor_inv_chestplate_wood.png", + groups = {armor_torso=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + --- Wood Leggings + -- + -- @leggings 3d_armor:leggings_wood + -- @img 3d_armor_inv_leggings_wood.png + -- @grp armor_legs 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @grp flammable 1 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 3 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:leggings_wood", { + description = S("Wood Leggings"), + inventory_image = "3d_armor_inv_leggings_wood.png", + groups = {armor_legs=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + --- Wood Boots + -- + -- @boots 3d_armor:boots_wood + -- @img 3d_armor_inv_boots_wood.png + -- @grp armor_feet 1 + -- @grp armor_heal 0 + -- @grp armor_use 2000 + -- @grp flammable 1 + -- @armorgrp fleshy 5 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 3 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:boots_wood", { + description = S("Wood Boots"), + inventory_image = "3d_armor_inv_boots_wood.png", + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + groups = {armor_feet=1, armor_heal=0, armor_use=2000, flammable=1}, + }) + local wood_armor_fuel = { + helmet = 6, + chestplate = 8, + leggings = 7, + boots = 5 + } + for armor, burn in pairs(wood_armor_fuel) do + minetest.register_craft({ + type = "fuel", + recipe = "3d_armor:" .. armor .. "_wood", + burntime = burn, + }) + end +end + + +--- Cactus +-- +-- Requires setting `armor_material_cactus`. +-- +-- @section cactus + +if armor.materials.cactus then + --- Cactus Helmet + -- + -- @helmet 3d_armor:helmet_cactus + -- @img 3d_armor_inv_helmet_cactus.png + -- @grp armor_head 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @armorgrp fleshy 5 + -- @damagegrp cracky 3 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:helmet_cactus", { + description = S("Cactus Helmet"), + inventory_image = "3d_armor_inv_helmet_cactus.png", + groups = {armor_head=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + --- Cactus Chestplate + -- + -- @chestplate 3d_armor:chestplate_cactus + -- @img 3d_armor_inv_chestplate_cactus.png + -- @grp armor_torso 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 3 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:chestplate_cactus", { + description = S("Cactus Chestplate"), + inventory_image = "3d_armor_inv_chestplate_cactus.png", + groups = {armor_torso=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + --- Cactus Leggings + -- + -- @leggings 3d_armor:leggings_cactus + -- @img 3d_armor_inv_leggings_cactus.png + -- @grp armor_legs 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 3 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:leggings_cactus", { + description = S("Cactus Leggings"), + inventory_image = "3d_armor_inv_leggings_cactus.png", + groups = {armor_legs=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + --- Cactus Boots + -- + -- @boots 3d_armor:boots_cactus + -- @img 3d_armor_inv_boots_cactus.png + -- @grp armor_feet 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @armorgrp fleshy 5 + -- @damagegrp cracky 3 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("3d_armor:boots_cactus", { + description = S("Cactus Boots"), + inventory_image = "3d_armor_inv_boots_cactus.png", + groups = {armor_feet=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + }) + local cactus_armor_fuel = { + helmet = 14, + chestplate = 16, + leggings = 15, + boots = 13 + } + for armor, burn in pairs(cactus_armor_fuel) do + minetest.register_craft({ + type = "fuel", + recipe = "3d_armor:" .. armor .. "_cactus", + burntime = burn, + }) + end +end + + +--- Steel +-- +-- Requires setting `armor_material_steel`. +-- +-- @section steel + +if armor.materials.steel then + --- Steel Helmet + -- + -- @helmet 3d_armor:helmet_steel + -- @img 3d_armor_inv_helmet_steel.png + -- @grp armor_head 1 + -- @grp armor_heal 0 + -- @grp armor_use 800 + -- @grp physics_speed -0.01 + -- @grp physica_gravity 0.01 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 2 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:helmet_steel", { + description = S("Steel Helmet"), + inventory_image = "3d_armor_inv_helmet_steel.png", + groups = {armor_head=1, armor_heal=0, armor_use=800, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) + --- Steel Chestplate + -- + -- @chestplate 3d_armor:chestplate_steel + -- @img 3d_armor_inv_chestplate_steel.png + -- @grp armor_torso 1 + -- @grp armor_heal 0 + -- @grp armor_use 800 + -- @grp physics_speed + -- @grp physics_gravity + -- @armorgrp fleshy + -- @damagegrp cracky 2 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:chestplate_steel", { + description = S("Steel Chestplate"), + inventory_image = "3d_armor_inv_chestplate_steel.png", + groups = {armor_torso=1, armor_heal=0, armor_use=800, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) + --- Steel Leggings + -- + -- @leggings 3d_armor:leggings_steel + -- @img 3d_armor_inv_leggings_steel.png + -- @grp armor_legs 1 + -- @grp armor_heal 0 + -- @grp armor_use 800 + -- @grp physics_speed -0.03 + -- @grp physics_gravity 0.03 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:leggings_steel", { + description = S("Steel Leggings"), + inventory_image = "3d_armor_inv_leggings_steel.png", + groups = {armor_legs=1, armor_heal=0, armor_use=800, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) + --- Steel Boots + -- + -- @boots 3d_armor:boots_steel + -- @img 3d_armor_inv_boots_steel.png + -- @grp armor_feet 1 + -- @grp armor_heal 0 + -- @grp armor_use 800 + -- @grp physics_speed -0.01 + -- @grp physics_gravity 0.01 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 2 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:boots_steel", { + description = S("Steel Boots"), + inventory_image = "3d_armor_inv_boots_steel.png", + groups = {armor_feet=1, armor_heal=0, armor_use=800, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + }) +end + + +--- Bronze +-- +-- Requires setting `armor_material_bronze`. +-- +-- @section bronze + +if armor.materials.bronze then + --- Bronze Helmet + -- + -- @helmet 3d_armor:helmet_bronze + -- @img 3d_armor_inv_helmet_bronze.png + -- @grp armor_head 1 + -- @grp armor_heal 6 + -- @grp armor_use 400 + -- @grp physics_speed -0.01 + -- @grp physics_gravity 0.01 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + 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}, + }) + --- Bronze Chestplate + -- + -- @chestplate 3d_armor:chestplate_bronze + -- @img 3d_armor_inv_chestplate_bronze.png + -- @grp armor_torso 1 + -- @grp armor_heal 6 + -- @grp armor_use 400 + -- @grp physics_speed -0.04 + -- @grp physics_gravity 0.04 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:chestplate_bronze", { + description = S("Bronze Chestplate"), + inventory_image = "3d_armor_inv_chestplate_bronze.png", + groups = {armor_torso=1, armor_heal=6, armor_use=400, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + --- Bronze Leggings + -- + -- @leggings 3d_armor:leggings_bronze + -- @img 3d_armor_inv_leggings_bronze.png + -- @grp armor_legs 1 + -- @grp armor_heal 6 + -- @grp armor_use 400 + -- @grp physics_speed -0.03 + -- @grp physics_gravity 0.03 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:leggings_bronze", { + description = S("Bronze Leggings"), + inventory_image = "3d_armor_inv_leggings_bronze.png", + groups = {armor_legs=1, armor_heal=6, armor_use=400, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + --- Bronze Boots + -- + -- @boots 3d_armor:boots_bronze + -- @img 3d_armor_inv_boots_bronze.png + -- @grp armor_feet 1 + -- @grp armor_heal 6 + -- @grp armor_use 400 + -- @grp physics_speed -0.01 + -- @grp physics_gravity 0.01 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("3d_armor:boots_bronze", { + description = S("Bronze Boots"), + inventory_image = "3d_armor_inv_boots_bronze.png", + groups = {armor_feet=1, armor_heal=6, armor_use=400, + physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) +end + + +--- Diamond +-- +-- Requires setting `armor_material_diamond`. +-- +-- @section diamond + +if armor.materials.diamond then + --- Diamond Helmet + -- + -- @helmet 3d_armor:helmet_diamond + -- @img 3d_armor_inv_helmet_diamond.png + -- @grp armor_head 1 + -- @grp armor_heal 12 + -- @grp armor_use 200 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp choppy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:helmet_diamond", { + description = S("Diamond Helmet"), + inventory_image = "3d_armor_inv_helmet_diamond.png", + groups = {armor_head=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + --- Diamond Chestplate + -- + -- @chestplate 3d_armor:chestplate_diamond + -- @img 3d_armor_inv_chestplate_diamond.png + -- @grp armor_torso 1 + -- @grp armor_heal 12 + -- @grp armor_use 200 + -- @armorgrp fleshy 20 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp choppy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:chestplate_diamond", { + description = S("Diamond Chestplate"), + inventory_image = "3d_armor_inv_chestplate_diamond.png", + groups = {armor_torso=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + --- Diamond Leggings + -- + -- @leggings 3d_armor:leggings_diamond + -- @img 3d_armor_inv_leggings_diamond.png + -- @grp armor_legs 1 + -- @grp armor_heal 12 + -- @grp armor_use 200 + -- @armorgrp fleshy 20 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp choppy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:leggings_diamond", { + description = S("Diamond Leggings"), + inventory_image = "3d_armor_inv_leggings_diamond.png", + groups = {armor_legs=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + --- Diamond Boots + -- + -- @boots 3d_armor:boots_diamond + -- @img 3d_armor_inv_boots_diamond.png + -- @grp armor_feet 1 + -- @grp armor_heal 12 + -- @grp armor_use 200 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp choppy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:boots_diamond", { + description = S("Diamond Boots"), + inventory_image = "3d_armor_inv_boots_diamond.png", + groups = {armor_feet=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) +end + + +--- Gold +-- +-- Requires `armor_material_gold`. +-- +-- @section gold + +if armor.materials.gold then + --- Gold Helmet + -- + -- @helmet 3d_armor:helmet_gold + -- @img 3d_armor_inv_helmet_gold.png + -- @grp armor_head 1 + -- @grp armor_heal 6 + -- @grp armor_use 300 + -- @grp physics_speed -0.02 + -- @grp physics_gravity 0.02 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 1 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 3 + -- @damagegrp level 2 + armor:register_armor("3d_armor:helmet_gold", { + description = S("Gold Helmet"), + inventory_image = "3d_armor_inv_helmet_gold.png", + groups = {armor_head=1, armor_heal=6, armor_use=300, + physics_speed=-0.02, physics_gravity=0.02}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) + --- Gold Chestplate + -- + -- @chestplate 3d_armor:chestplate_gold + -- @img 3d_armor_inv_chestplate_gold.png + -- @grp armor_torso 1 + -- @grp armor_heal 6 + -- @grp armor_use 300 + -- @grp physics_speed -0.05 + -- @grp physics_gravity 0.05 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 1 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 3 + -- @damagegrp level 2 + armor:register_armor("3d_armor:chestplate_gold", { + description = S("Gold Chestplate"), + inventory_image = "3d_armor_inv_chestplate_gold.png", + groups = {armor_torso=1, armor_heal=6, armor_use=300, + physics_speed=-0.05, physics_gravity=0.05}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) + --- Gold Leggings + -- + -- @leggings 3d_armor:leggings_gold + -- @img 3d_armor_inv_leggings_gold.png + -- @grp armor_legs 1 + -- @grp armor_heal 6 + -- @grp armor_use 300 + -- @grp physics_speed -0.04 + -- @grp physics_gravity 0.04 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 1 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 3 + -- @damagegrp level 2 + armor:register_armor("3d_armor:leggings_gold", { + description = S("Gold Leggings"), + inventory_image = "3d_armor_inv_leggings_gold.png", + groups = {armor_legs=1, armor_heal=6, armor_use=300, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) + --- Gold Boots + -- + -- @boots 3d_armor:boots_gold + -- @img 3d_armor_inv_boots_gold.png + -- @grp armor_feet 1 + -- @grp armor_heal 6 + -- @grp armor_use 300 + -- @grp physics_speed -0.02 + -- @grp physics_gravity 0.02 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 1 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 3 + -- @damagegrp level 2 + armor:register_armor("3d_armor:boots_gold", { + description = S("Gold Boots"), + inventory_image = "3d_armor_inv_boots_gold.png", + groups = {armor_feet=1, armor_heal=6, armor_use=300, + physics_speed=-0.02, physics_gravity=0.02}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + }) +end + + +--- Mithril +-- +-- Requires `armor_material_mithril`. +-- +-- @section mithril + +if armor.materials.mithril then + --- Mithril Helmet + -- + -- @helmet 3d_armor:helmet_mithril + -- @img 3d_armor_inv_helmet_mithril.png + -- @grp armor_head 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:helmet_mithril", { + description = S("Mithril Helmet"), + inventory_image = "3d_armor_inv_helmet_mithril.png", + groups = {armor_head=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + --- Mithril Chestplate + -- + -- @chestplate 3d_armor:chestplate_mithril + -- @img 3d_armor_inv_chestplate_mithril.png + -- @grp armor_torso 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @armorgrp fleshy 20 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:chestplate_mithril", { + description = S("Mithril Chestplate"), + inventory_image = "3d_armor_inv_chestplate_mithril.png", + groups = {armor_torso=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + --- Mithril Leggings + -- + -- @leggings 3d_armor:leggings_mithril + -- @img 3d_armor_inv_leggings_mithril.png + -- @grp armor_legs 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @armorgrp fleshy 20 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:leggings_mithril", { + description = S("Mithril Leggings"), + inventory_image = "3d_armor_inv_leggings_mithril.png", + groups = {armor_legs=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + --- Mithril Boots + -- + -- @boots 3d_armor:boots_mithril + -- @img 3d_armor_inv_boots_mithril.png + -- @grp armor_feet 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:boots_mithril", { + description = S("Mithril Boots"), + inventory_image = "3d_armor_inv_boots_mithril.png", + groups = {armor_feet=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) +end + + +--- Crystal +-- +-- Requires `armor_material_crystal`. +-- +-- @section crystal + +if armor.materials.crystal then + --- Crystal Helmet + -- + -- @helmet 3d_armor:helmet_crystal + -- @img 3d_armor_inv_helmet_crystal.png + -- @grp armor_head 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @grp armor_fire 1 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:helmet_crystal", { + description = S("Crystal Helmet"), + inventory_image = "3d_armor_inv_helmet_crystal.png", + groups = {armor_head=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + --- Crystal Chestplate + -- + -- @chestplate 3d_armor:chestplate_crystal + -- @img 3d_armor_inv_chestplate_crystal.png + -- @grp armor_torso 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @grp armor_fire 1 + -- @armorgrp fleshy 20 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:chestplate_crystal", { + description = S("Crystal Chestplate"), + inventory_image = "3d_armor_inv_chestplate_crystal.png", + groups = {armor_torso=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + --- Crystal Leggings + -- + -- @leggings 3d_armor:leggings_crystal + -- @img 3d_armor_inv_leggings_crystal.png + -- @grp armor_legs 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @grp armor_fire 1 + -- @armorgrp fleshy 20 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:leggings_crystal", { + description = S("Crystal Leggings"), + inventory_image = "3d_armor_inv_leggings_crystal.png", + groups = {armor_legs=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) + --- Crystal Boots + -- + -- @boots 3d_armor:boots_crystal + -- @img 3d_armor_inv_boots_crystal.png + -- @grp armor_feet 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @grp physics_speed 1 + -- @grp physics_jump 0.5 + -- @grp armor_fire 1 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("3d_armor:boots_crystal", { + description = S("Crystal Boots"), + inventory_image = "3d_armor_inv_boots_crystal.png", + groups = {armor_feet=1, armor_heal=12, armor_use=100, physics_speed=1, + physics_jump=0.5, armor_fire=1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + }) +end + + +--- Crafting +-- +-- @section craft + +--- Craft recipes for helmets, chestplates, leggings, boots, & shields. +-- +-- @craft armor +-- @usage +-- Key: +-- - m: material +-- - 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 +-- +-- helmet: chestplate: leggings: +-- ┌───┬───┬───┐ ┌───┬───┬───┐ ┌───┬───┬───┐ +-- │ m │ m │ m │ │ m │ │ m │ │ m │ m │ m │ +-- ├───┼───┼───┤ ├───┼───┼───┤ ├───┼───┼───┤ +-- │ m │ │ m │ │ m │ m │ m │ │ m │ │ m │ +-- ├───┼───┼───┤ ├───┼───┼───┤ ├───┼───┼───┤ +-- │ │ │ │ │ m │ m │ m │ │ m │ │ m │ +-- └───┴───┴───┘ └───┴───┴───┘ └───┴───┴───┘ +-- +-- boots: shield: +-- ┌───┬───┬───┐ ┌───┬───┬───┐ +-- │ │ │ │ │ m │ m │ m │ +-- ├───┼───┼───┤ ├───┼───┼───┤ +-- │ m │ │ m │ │ m │ m │ m │ +-- ├───┼───┼───┤ ├───┼───┼───┤ +-- │ m │ │ m │ │ │ m │ │ +-- └───┴───┴───┘ └───┴───┴───┘ + +for k, v in pairs(armor.materials) do + minetest.register_craft({ + output = "3d_armor:helmet_"..k, + recipe = { + {v, v, v}, + {v, "", v}, + {"", "", ""}, + }, + }) + minetest.register_craft({ + output = "3d_armor:chestplate_"..k, + recipe = { + {v, "", v}, + {v, v, v}, + {v, v, v}, + }, + }) + minetest.register_craft({ + output = "3d_armor:leggings_"..k, + recipe = { + {v, v, v}, + {v, "", v}, + {v, "", v}, + }, + }) + minetest.register_craft({ + output = "3d_armor:boots_"..k, + recipe = { + {v, "", v}, + {v, "", v}, + }, + }) +end diff --git a/mods/3d_armor/3d_armor/crafting_guide.txt b/mods/3d_armor/3d_armor/crafting_guide.txt new file mode 100644 index 0000000..abd1519 --- /dev/null +++ b/mods/3d_armor/3d_armor/crafting_guide.txt @@ -0,0 +1,79 @@ +3d_armor -- Crafting Guide +-------------------------- + +Helmets: + ++---+---+---+ +| X | X | X | ++---+---+---+ +| X | | X | ++---+---+---+ +| | | | ++---+---+---+ + +[3d_armor:helmet_wood] X = [default:wood] +[3d_armor:helmet_cactus] X = [default:cactus] +[3d_armor:helmet_steel] X = [default:steel_ingot] +[3d_armor:helmet_bronze] X = [default:bronze_ingot] +[3d_armor:helmet_diamond] X = [default:diamond] +[3d_armor:helmet_gold] X = [default:gold_ingot] +[3d_armor:helmet_mithril] X = [moreores:mithril_ingot] * +[3d_armor:helmet_crystal] X = [ethereal:crystal_ingot] ** + +Chestplates: + ++---+---+---+ +| X | | X | ++---+---+---+ +| X | X | X | ++---+---+---+ +| X | X | X | ++---+---+---+ + +[3d_armor:chestplate_wood] X = [default:wood] +[3d_armor:chestplate_cactus] X = [default:cactus] +[3d_armor:chestplate_steel] X = [default:steel_ingot] +[3d_armor:chestplate_bronze] X = [default:bronze_ingot] +[3d_armor:chestplate_diamond] X = [default:diamond] +[3d_armor:chestplate_gold] X = [default:gold_ingot] +[3d_armor:chestplate_mithril] X = [moreores:mithril_ingot] * +[3d_armor:chestplate_crystal] X = [ethereal:crystal_ingot] ** + +Leggings: + ++---+---+---+ +| X | X | X | ++---+---+---+ +| X | | X | ++---+---+---+ +| X | | X | ++---+---+---+ + +[3d_armor:leggings_wood] X = [default:wood] +[3d_armor:leggings_cactus] X = [default:cactus] +[3d_armor:leggings_steel] X = [default:steel_ingot] +[3d_armor:leggings_bronze] X = [default:bronze_ingot] +[3d_armor:leggings_diamond] X = [default:diamond] +[3d_armor:leggings_gold] X = [default:gold_ingot] +[3d_armor:leggings_mithril] X = [moreores:mithril_ingot] * +[3d_armor:leggings_crystal] X = [ethereal:crystal_ingot] ** + +Boots: + ++---+---+---+ +| X | | X | ++---+---+---+ +| X | | X | ++---+---+---+ + +[3d_armor:boots_wood] X = [default:wood] +[3d_armor:boots_cactus] X = [default:cactus] +[3d_armor:boots_steel] X = [default:steel_ingot] +[3d_armor:boots_bronze] X = [default:bronze_ingot +[3d_armor:boots_diamond] X = [default:diamond] +[3d_armor:boots_gold] X = [default:gold_ingot] +[3d_armor:boots_mithril] X = [moreores:mithril_ingot] * +[3d_armor:boots_crystal] X = [ethereal:crystal_ingot] ** + + * Requires moreores mod by Calinou - https://forum.minetest.net/viewtopic.php?id=549 +** Requires ethereal mod by Chinchow & TenPlus1 - https://github.com/tenplus1/ethereal diff --git a/mods/3d_armor/3d_armor/depends.txt b/mods/3d_armor/3d_armor/depends.txt new file mode 100644 index 0000000..f101e69 --- /dev/null +++ b/mods/3d_armor/3d_armor/depends.txt @@ -0,0 +1,8 @@ +default +player_monoids? +armor_monoid? +pova? +fire? +ethereal? +bakedclay? +moreores? diff --git a/mods/3d_armor/3d_armor/description.txt b/mods/3d_armor/3d_armor/description.txt new file mode 100644 index 0000000..b0a9b0a --- /dev/null +++ b/mods/3d_armor/3d_armor/description.txt @@ -0,0 +1 @@ +Adds craftable armor that is visible to other players. diff --git a/mods/3d_armor/3d_armor/init.lua b/mods/3d_armor/3d_armor/init.lua new file mode 100644 index 0000000..6102287 --- /dev/null +++ b/mods/3d_armor/3d_armor/init.lua @@ -0,0 +1,528 @@ +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) +local worldpath = minetest.get_worldpath() +local last_punch_time = {} +local pending_players = {} +local timer = 0 + +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 +if not minetest.get_modpath("moreores") then + armor.materials.mithril = nil +end +if not minetest.get_modpath("ethereal") then + armor.materials.crystal = nil +end + +dofile(modpath.."/armor.lua") + +-- Armor Initialization + +armor.formspec = armor.formspec.. + "label[5,1;"..F(S("Level"))..": armor_level]".. + "label[5,1.5;"..F(S("Heal"))..": armor_attr_heal]" +if armor.config.fire_protect then + armor.formspec = armor.formspec.."label[5,2;"..F(S("Fire"))..": armor_attr_fire]" +end +armor:register_on_damage(function(player, index, stack) + local name = player:get_player_name() + local def = stack:get_definition() + if name and def and def.description and stack:get_wear() > 60100 then + minetest.chat_send_player(name, S("Your @1 is almost broken!", def.description)) + minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0}) + end +end) +armor:register_on_destroy(function(player, index, stack) + local name = player:get_player_name() + local def = stack:get_definition() + if name and def and def.description then + minetest.chat_send_player(name, S("Your @1 got destroyed!", def.description)) + minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0}) + end +end) + +local function validate_armor_inventory(player) + -- Workaround for detached inventory swap exploit + local _, inv = armor:get_valid_player(player, "[validate_armor_inventory]") + local pos = player:get_pos() + if not inv then + return + end + local armor_prev = {} + local attribute_meta = player:get_meta() -- I know, the function's name is weird but let it be like that. ;) + local armor_list_string = attribute_meta:get_string("3d_armor_inventory") + if armor_list_string then + local armor_list = armor:deserialize_inventory_list(armor_list_string) + for i, stack in ipairs(armor_list) do + if stack:get_count() > 0 then + armor_prev[stack:get_name()] = i + end + end + end + local elements = {} + local player_inv = player:get_inventory() + for i = 1, 6 do + local stack = inv:get_stack("armor", i) + if stack:get_count() > 0 then + local item = stack:get_name() + local element = armor:get_element(item) + if element and not elements[element] then + if armor_prev[item] then + armor_prev[item] = nil + else + -- Item was not in previous inventory + armor:run_callbacks("on_equip", player, i, stack) + end + elements[element] = true; + else + inv:remove_item("armor", stack) + minetest.item_drop(stack, player, pos) + -- The following code returns invalid items to the player's main + -- inventory but could open up the possibity for a hacked client + -- to receive items back they never really had. I am not certain + -- so remove the is_singleplayer check at your own risk :] + if minetest.is_singleplayer() and player_inv and + player_inv:room_for_item("main", stack) then + player_inv:add_item("main", stack) + end + end + end + end + for item, i in pairs(armor_prev) do + local stack = ItemStack(item) + -- Previous item is not in current inventory + armor:run_callbacks("on_unequip", player, i, stack) + end +end + +local function init_player_armor(initplayer) + local name = initplayer:get_player_name() + local pos = initplayer:get_pos() + if not name or not pos then + return false + end + local armor_inv = minetest.create_detached_inventory(name.."_armor", { + on_put = function(inv, listname, index, stack, player) + validate_armor_inventory(player) + armor:save_armor_inventory(player) + armor:set_player_armor(player) + end, + on_take = function(inv, listname, index, stack, player) + validate_armor_inventory(player) + armor:save_armor_inventory(player) + armor:set_player_armor(player) + end, + on_move = function(inv, from_list, from_index, to_list, to_index, count, player) + validate_armor_inventory(player) + armor:save_armor_inventory(player) + armor:set_player_armor(player) + end, + allow_put = function(inv, listname, index, put_stack, player) + 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 + 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] = { + init_time = minetest.get_gametime(), + level = 0, + state = 0, + count = 0, + groups = {}, + } + for _, phys in pairs(armor.physics) do + armor.def[name][phys] = 1 + end + for _, attr in pairs(armor.attributes) do + armor.def[name][attr] = 0 + end + for group, _ in pairs(armor.registered_groups) do + armor.def[name].groups[group] = 0 + end + local skin = armor:get_player_skin(name) + armor.textures[name] = { + skin = skin, + armor = "3d_armor_trans.png", + wielditem = "3d_armor_trans.png", + preview = armor.default_skin.."_preview.png", + } + local texture_path = minetest.get_modpath("player_textures") + if texture_path then + local dir_list = minetest.get_dir_list(texture_path.."/textures") + for _, fn in pairs(dir_list) do + if fn == "player_"..name..".png" then + armor.textures[name].skin = fn + break + end + end + end + armor:set_player_armor(initplayer) + return true +end + +-- Armor Player Model + +default.player_register_model("3d_armor_character.b3d", { + animation_speed = 30, + textures = { + armor.default_skin..".png", + "3d_armor_trans.png", + "3d_armor_trans.png", + }, + animations = { + stand = {x=0, y=79}, + lay = {x=162, y=166}, + walk = {x=168, y=187}, + mine = {x=189, y=198}, + walk_mine = {x=200, y=219}, + sit = {x=81, y=160}, + swin = {x = 221, y = 269}, + swin_mine = {x = 270, y = 290}, + swin_and_mine = {x = 291, y = 314}, + swin_stand = {x = 221, y = 221}, + }, +}) + +default.player_register_model("3d_armor_female.b3d", { + animation_speed = 30, + textures = { + "female.png", + "3d_armor_trans.png", + "3d_armor_trans.png", + }, + animations = { + stand = {x=0, y=79}, + lay = {x=162, y=166}, + walk = {x=168, y=187}, + mine = {x=189, y=198}, + walk_mine = {x=200, y=219}, + sit = {x=81, y=160}, + swin = {x = 221, y = 269}, + swin_mine = {x = 270, y = 290}, + swin_and_mine = {x = 291, y = 314}, + swin_stand = {x = 221, y = 221}, + }, +}) + +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) + + local player_name = player:get_player_name() + + minetest.after(0, function() + -- TODO: Added in 7566ecc - What's the prupose? + local pplayer = minetest.get_player_by_name(player_name) + if pplayer and init_player_armor(pplayer) == false then + pending_players[pplayer] = 0 + end + end) +end) + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + if name then + armor.def[name] = nil + armor.textures[name] = nil + end + pending_players[player] = nil +end) + +if armor.config.drop == true or armor.config.destroy == true then + minetest.register_on_dieplayer(function(player) + local name, armor_inv = armor:get_valid_player(player, "[on_dieplayer]") + if not name then + return + end + local drop = {} + for i=1, armor_inv:get_size("armor") do + local stack = armor_inv:get_stack("armor", i) + if stack:get_count() > 0 then + table.insert(drop, stack) + armor:run_callbacks("on_unequip", player, i, stack) + armor_inv:set_stack("armor", i, nil) + end + end + armor:save_armor_inventory(player) + armor:set_player_armor(player) + local pos = player:get_pos() + if pos and armor.config.destroy == false then + minetest.after(armor.config.bones_delay, function() + local meta = nil + local maxp = vector.add(pos, 16) + local minp = vector.subtract(pos, 16) + local bones = minetest.find_nodes_in_area(minp, maxp, {"bones:bones"}) + for _, p in pairs(bones) do + local m = minetest.get_meta(p) + if m:get_string("owner") == name then + meta = m + break + end + end + if meta then + local inv = meta:get_inventory() + for _,stack in ipairs(drop) do + if inv:room_for_item("main", stack) then + inv:add_item("main", stack) + else + armor.drop_armor(pos, stack) + end + end + else + for _,stack in ipairs(drop) do + armor.drop_armor(pos, stack) + end + end + end) + end + end) +else -- reset un-dropped armor and it's effects + minetest.register_on_respawnplayer(function(player) + 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() + local hit_ip = hitter:is_player() + if name and hit_ip and minetest.is_protected(player:get_pos(), "") then + return + elseif name then + armor:punch(player, hitter, time_from_last_punch, tool_capabilities) + last_punch_time[name] = minetest.get_gametime() + end + end) +end + +minetest.register_on_player_hpchange(function(player, hp_change, reason) + if player and reason.type ~= "drown" and reason.hunger == nil + and hp_change < 0 then + local name = player:get_player_name() + if name then + local heal = armor.def[name].heal + if heal >= math.random(100) then + hp_change = 0 + end + -- check if armor damage was handled by fire or on_punchplayer + local time = last_punch_time[name] or 0 + if time == 0 or time + 1 < minetest.get_gametime() then + armor:punch(player) + end + end + end + return hp_change +end, true) + +minetest.register_globalstep(function(dtime) + timer = timer + dtime + if timer <= armor.config.init_delay then + return + end + timer = 0 + + for player, count in pairs(pending_players) do + local remove = init_player_armor(player) == true + pending_players[player] = count + 1 + if remove == false and count > armor.config.init_times then + minetest.log("warning", S("3d_armor: Failed to initialize player")) + remove = true + end + if remove == true then + pending_players[player] = nil + end + end + + -- 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) + +-- Fire Protection, added by TenPlus1. +if armor.config.fire_protect == true then + -- override any hot nodes that do not already deal damage + for _, row in pairs(armor.fire_nodes) do + if minetest.registered_nodes[row[1]] then + local damage = minetest.registered_nodes[row[1]].damage_per_second + if not damage or damage == 0 then + minetest.override_item(row[1], {damage_per_second = row[3]}) + end + end + end +else + print ("[3d_armor] Fire Nodes disabled") +end + +if armor.config.fire_protect == true then + 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 + armor:punch(player, "fire") + else + hp_change = 0 + end + end + end + end + end + return hp_change + end, true) +end diff --git a/mods/3d_armor/3d_armor/integration_test.lua b/mods/3d_armor/3d_armor/integration_test.lua new file mode 100644 index 0000000..65e9dfd --- /dev/null +++ b/mods/3d_armor/3d_armor/integration_test.lua @@ -0,0 +1,25 @@ + +minetest.log("warning", "[TEST] integration-test enabled!") + +minetest.register_on_mods_loaded(function() + minetest.after(1, function() + + local data = minetest.write_json({ success = true }, true); + local file = io.open(minetest.get_worldpath().."/integration_test.json", "w" ); + if file then + file:write(data) + file:close() + end + + file = io.open(minetest.get_worldpath().."/registered_nodes.txt", "w" ); + if file then + for name in pairs(minetest.registered_nodes) do + file:write(name .. '\n') + end + file:close() + end + + minetest.log("warning", "[TEST] integration tests done!") + minetest.request_shutdown("success") + end) +end) diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.es.tr b/mods/3d_armor/3d_armor/locale/3d_armor.es.tr new file mode 100644 index 0000000..86a44db --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.es.tr @@ -0,0 +1,58 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: La armadura desconectada es nula @1 +3d_armor: Player name is nil @1=3d_armor: El nombre del jugador es nulo @1 +3d_armor: Player reference is nil @1=3d_armor: La referencia del jugador es nula @1 + +### armor.lua ### + +Admin Boots=Botas de admin +Admin Chestplate=Peto de admin +Admin Helmet=Casco de admin +Admin Leggings=Grebas de admin +Bronze Boots=Botas de bronce +Bronze Chestplate=Peto de bronce +Bronze Helmet=Casco de bronce +Bronze Leggings=Grebas de bronce +Cactus Boots=Botas de cactus +Cactus Chestplate=Peto de cactus +Cactus Helmet=Casco de cactus +Cactus Leggings=Grebas de cactus +Crystal Boots=Botas de cristal +Crystal Chestplate=Peto de cristal +Crystal Helmet=Casco de cristal +Crystal Leggings=Grebas de cristal +Diamond Boots=Botas de diamante +Diamond Chestplate=Peto de diamante +Diamond Helmet=Casco de diamante +Diamond Leggings=Grebas de diamante +Gold Boots=Botas de oro +Gold Chestplate=Peto de oro +Gold Helmet=Casco de oro +Gold Leggings=Grebas de oro +Mithril Boots=Botas de mitrilo +Mithril Chestplate=Peto de mitrilo +Mithril Helmet=Casco de mitrilo +Mithril Leggings=Grebas de mitrilo +Steel Boots=Botas de acero +Steel Chestplate=Peto de acero +Steel Helmet=Casco de acero +Steel Leggings=Grebas de acero +Wood Boots=Botas de madera +Wood Chestplate=Peto de madera +Wood Helmet=Casco de madera +Wood Leggings=Grebas de madera + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Fallo en la inicialización del jugador +Fire=Fuego +Heal=Salud +Level=Nivel +Radiation=Radiación +Your @1 got destroyed!=¡Tu @1 fue destruído! +Your @1 is almost broken!=¡Tu @1 esta a punto de romperse! +[3d_armor] Fire Nodes disabled=[3d_armor] Nodos de fuego desabilitados diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.fr.tr b/mods/3d_armor/3d_armor/locale/3d_armor.fr.tr new file mode 100644 index 0000000..849a0f1 --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.fr.tr @@ -0,0 +1,58 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor : Inventaire détaché pour l'armure non trouvé @1 +3d_armor: Player name is nil @1=3d_armor : Nom du joueur non trouvé @1 +3d_armor: Player reference is nil @1=3d_armor : Référence au joueur non trouvée @1 + +### armor.lua ### + +Admin Boots=Bottes d'admin +Admin Chestplate=Cuirasse d'admin +Admin Helmet=Casque d'admin +Admin Leggings=Jambières d'admin +Bronze Boots=Bottes en bronze +Bronze Chestplate=Cuirasse en bronze +Bronze Helmet=Casque en bronze +Bronze Leggings=Jambières en bronze +Cactus Boots=Bottes en cactus +Cactus Chestplate=Cuirasse en cactus +Cactus Helmet=Casque en cactus +Cactus Leggings=Jambières en cactus +Crystal Boots=Bottes en cristal +Crystal Chestplate=Cuirasse en cristal +Crystal Helmet=Casque en cristal +Crystal Leggings=Jambières en cristal +Diamond Boots=Bottes en diamant +Diamond Chestplate=Cuirasse en diamant +Diamond Helmet=Casque en diamant +Diamond Leggings=Jambières en diamant +Gold Boots=Bottes en or +Gold Chestplate=Cuirasse en or +Gold Helmet=Casque en or +Gold Leggings=Jambières en or +Mithril Boots=Bottes en mithril +Mithril Chestplate=Cuirasse en mithril +Mithril Helmet=Casque en mithril +Mithril Leggings=Jambières en mithril +Steel Boots=Bottes en acier +Steel Chestplate=Cuirasse en acier +Steel Helmet=Casque en acier +Steel Leggings=Jambières en acier +Wood Boots=Bottes en bois +Wood Chestplate=Cuirasse en bois +Wood Helmet=Casque en bois +Wood Leggings=Jambières en bois + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor : Impossible d'initialiser le joueur +Fire=Fire +Heal=Soins +Level=Niveau +Radiation=Radiation +Your @1 got destroyed!=Une partie de votre armure a été détruite : @1 ! +Your @1 is almost broken!=Une partie de votre armure est presque détruite : @1 ! +[3d_armor] Fire Nodes disabled=[3d_armor] Nœuds de type feu désactivés diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.it.tr b/mods/3d_armor/3d_armor/locale/3d_armor.it.tr new file mode 100644 index 0000000..d8be62e --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.it.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: L'inventario separato dell'armatura è nullo @1 +3d_armor: Player name is nil @1=3d_armor: Il nome dell'utente è nullo @1 +3d_armor: Player reference is nil @1=3d_armor: Il riferimento all'utente è nullo @1 + +### armor.lua ### + +Admin Boots=Stivali dell'amministratrice/tore +Admin Chestplate=Corazza dell'amministratrice/tore +Admin Helmet=Elmo dell'amministratrice/tore +Admin Leggings=Gambali dell'amministratrice/tore +Bronze Boots=Stivali di bronzo +Bronze Chestplate=Corazza di bronzo +Bronze Helmet=Elmo di bronzo +Bronze Leggings=Gambali di bronzo +Cactus Boots=Stivali di cactus +Cactus Chestplate=Corazza di cactus +Cactus Helmet=Elmo di cactus +Cactus Leggings=Gambali di cactus +Crystal Boots=Stivali di cristallo +Crystal Chestplate=Corazza di cristallo +Crystal Helmet=Elmo di cristallo +Crystal Leggings=Gambali di cristallo +Diamond Boots=Stivali di diamante +Diamond Chestplate=Corazza di diamante +Diamond Helmet=Elmo di diamante +Diamond Leggings=Gambali di diamante +Gold Boots=Stivali d'oro +Gold Chestplate=Corazza d'oro +Gold Helmet=Elmo d'oro +Gold Leggings=Gambali d'oro +Mithril Boots=Stivali di mithril +Mithril Chestplate=Corazza di mithril +Mithril Helmet=Elmo di mithril +Mithril Leggings=Gambali di mithril +Steel Boots=Stivali d'acciaio +Steel Chestplate=Corazza d'acciaio +Steel Helmet=Elmo d'acciaio +Steel Leggings=Gambali d'acciaio +Wood Boots=Stivali di legno +Wood Chestplate=Corazza di legno +Wood Helmet=Elmo di legno +Wood Leggings=Gambali di legno + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Inizializzazione dell'utente fallita +Fire=Fuoco +Heal=Guarigione +Level=Livello +Radiation=Radiazione +Your @1 got destroyed!=@1 in frantumi! +Your @1 is almost broken!=@1 quasi in frantumi! +[3d_armor] Fire Nodes disabled=[3d_armor] Nodi fuoco disabilitati + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod caricata ma inutilizzata. +Back=Indietro +Armor=Armatura +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod caricata ma inutilizzata. +Armor stand top=Parte superiore del supporto per armatura +Armor stand=Supporto per armatura +Armor Stand=Supporto per armatura +Locked Armor stand=Supporto per armatura chiuso a chiave +Armor Stand (owned by @1)=Supporto per armatura (di proprietà di @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod caricata ma inutilizzata. +3d Armor=Armatura 3D +Armor not initialized!=Armatura non inizializzata! +Admin Shield=Scudo dell'amministratrice/tore +Wooden Shield=Scudo di legno +Enhanced Wood Shield=Scudo di legno migliorato +Cactus Shield=Scudo di cactus +Enhanced Cactus Shield=Scudo di cactus migliorato +Steel Shield=Scudo d'acciaio +Bronze Shield=Scudo di bronzo +Diamond Shield=Scudo di diamante +Gold Shield=Scudo d'oro +Mithril Shield=Scudo di mithril +Crystal Shield=Scudo di cristallo diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.ms.tr b/mods/3d_armor/3d_armor/locale/3d_armor.ms.tr new file mode 100644 index 0000000..b76dd61 --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.ms.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Inventori perisai terpisah tiada nilai @1 +3d_armor: Player name is nil @1=3d_armor: Nama pemain tiada nilai @1 +3d_armor: Player reference is nil @1=3d_armor: Rujukan pemain tiada nilai @1 + +### armor.lua ### + +Admin Boots=But Pentadbir +Admin Chestplate=Perisai Dada Pentadbir +Admin Helmet=Helmet Pentadbir +Admin Leggings=Perisai Kaki Pentadbir +Bronze Boots=But Gangsa +Bronze Chestplate=Perisai Dada Gangsa +Bronze Helmet=Helmet Gangsa +Bronze Leggings=Perisai Kaki Gangsa +Cactus Boots=But Kaktus +Cactus Chestplate=Perisai Dada Kaktus +Cactus Helmet=Helmet Kaktus +Cactus Leggings=Perisai Kaki Kaktus +Crystal Boots=But Kristal +Crystal Chestplate=Perisai Dada Kristal +Crystal Helmet=Helmet Kristal +Crystal Leggings=Perisai Kaki Kristal +Diamond Boots=But Intan +Diamond Chestplate=Perisai Dada Intan +Diamond Helmet=Helmet Intan +Diamond Leggings=Perisai Kaki Intan +Gold Boots=But Emas +Gold Chestplate=Perisai Dada Emas +Gold Helmet=Helmet Emas +Gold Leggings=Perisai Kaki Emas +Mithril Boots=But Mithril +Mithril Chestplate=Perisai Dada Mithril +Mithril Helmet=Helmet Mithril +Mithril Leggings=Perisai Kaki Mithril +Steel Boots=But Keluli +Steel Chestplate=Perisai Dada Keluli +Steel Helmet=Helmet Keluli +Steel Leggings=Perisai Kaki Keluli +Wood Boots=But Kayu +Wood Chestplate=Perisai Dada Kayu +Wood Helmet=Helmet Kayu +Wood Leggings=Perisai Kaki Kayu + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Gagal mengasalkan pemain +Fire=Api +Heal=Pulih +Level=Tahap +Radiation=Radiasi +Your @1 got destroyed!=@1 anda telah musnah! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] Nod-nod Api dilumpuhkan + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mods dimuatkan tetapi tidak digunakan. +Back=Kembali +Armor=Perisai +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan. +Armor stand top=Bhg atas dirian perisai +Armor stand=Dirian perisai +Armor Stand=Dirian Perisai +Locked Armor stand=Dirian perisai Berkunci +Armor Stand (owned by @1)=Dirian Perisai (milik @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mods dimuatkan tetapi tidak digunakan. +3d Armor=Perisai 3d +Armor not initialized!=Perisai tidak diasalkan! +Admin Shield=Perisai Pegang Pentadbir +Wooden Shield=Perisai Pegang Kayu +Enhanced Wood Shield=Perisai Pegang Kayu Kukuh +Cactus Shield=Perisai Pegang Kaktus +Enhanced Cactus Shield=Perisai Pegang Kaktus Kukuh +Steel Shield=Perisai Pegang Keluli +Bronze Shield=Perisai Pegang Gangsa +Diamond Shield=Perisai Pegang Intan +Gold Shield=Perisai Pegang Emas +Mithril Shield=Perisai Pegang Mithril +Crystal Shield=Perisai Pegang Kristal diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.pt.tr b/mods/3d_armor/3d_armor/locale/3d_armor.pt.tr new file mode 100644 index 0000000..8fc689d --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.pt.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Inventario avulso de armadura é nulo @1 +3d_armor: Player name is nil @1=3d_armor: Nome de jogador é nulo @1 +3d_armor: Player reference is nil @1=3d_armor: Referência Jogador é nula @1 + +### armor.lua ### + +Admin Boots=Botas de Administrador +Admin Chestplate=Peitoral de Administrador +Admin Helmet=Capacete de Administrador +Admin Leggings=Calças de Administrador +Bronze Boots=Botas de Bronze +Bronze Chestplate=Peitoral de Bronze +Bronze Helmet=Capacete de Bronze +Bronze Leggings=Calças de Bronze +Cactus Boots=Botas de Madeira +Cactus Chestplate=Peitoral de Cacto +Cactus Helmet=Capacete de Cacto +Cactus Leggings=Calças de Cacto +Crystal Boots=Botas de Cristal +Crystal Chestplate=Peitoral de Cristal +Crystal Helmet=Capacete de Cristal +Crystal Leggings=Calças de Cristal +Diamond Boots=Botas de Diamante +Diamond Chestplate=Peitoral de Diamante +Diamond Helmet=Capacete de Diamante +Diamond Leggings=Calças de Diamante +Gold Boots=Botas de Ouro +Gold Chestplate=Peitoral de Ouro +Gold Helmet=Capacete de Ouro +Gold Leggings=Calças de Ouro +Mithril Boots=Botas de Mithril +Mithril Chestplate=Peitoral de Mithril +Mithril Helmet=Capacete de Mithril +Mithril Leggings=Calças de Mithril +Steel Boots=Botas de Aço +Steel Chestplate=Peitoral de Aço +Steel Helmet=Capacete de Aço +Steel Leggings=Calças de Aço +Wood Boots=Botas de Madeira +Wood Chestplate=Peitoral de Madeira +Wood Helmet=Capacete de Madeira +Wood Leggings=Calças de Madeira + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Falha ao inicializar jogador +Fire=Fogo +Heal=Saúde +Level=Nível +Radiation=Radiação +Your @1 got destroyed!=@1 foi destruído(a)! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] Nodes de gofo desabilitados + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod carregado mas inoperante. +Back=Voltar +Armor=Armadura +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod carregado mas inoperante. +Armor stand top=Topo de estande de armadura +Armor stand=Estande de armadura +Armor Stand=Estande de Armadura +Locked Armor stand=Estande de Armadura Trancada +Armor Stand (owned by @1)=Estande de Armadura (pertente a @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod carregado mas inoperante. +3d Armor=3d Armor +Armor not initialized!=Armadura não inicializada! +Admin Shield=Escudo de Administrador +Wooden Shield=Escudo de Madeira +Enhanced Wood Shield=Escudo de Madeira Melhorado +Cactus Shield=Escudo de Cacto +Enhanced Cactus Shield=Escudo de Cacto Melhorado +Steel Shield=Escudo de Aço +Bronze Shield=Escudo de Bronze +Diamond Shield=Escudo de Diamante +Gold Shield=Escudo de Ouro +Mithril Shield=Escudo de Mithril +Crystal Shield=Escudo de Cristal diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr b/mods/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr new file mode 100644 index 0000000..8fc689d --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Inventario avulso de armadura é nulo @1 +3d_armor: Player name is nil @1=3d_armor: Nome de jogador é nulo @1 +3d_armor: Player reference is nil @1=3d_armor: Referência Jogador é nula @1 + +### armor.lua ### + +Admin Boots=Botas de Administrador +Admin Chestplate=Peitoral de Administrador +Admin Helmet=Capacete de Administrador +Admin Leggings=Calças de Administrador +Bronze Boots=Botas de Bronze +Bronze Chestplate=Peitoral de Bronze +Bronze Helmet=Capacete de Bronze +Bronze Leggings=Calças de Bronze +Cactus Boots=Botas de Madeira +Cactus Chestplate=Peitoral de Cacto +Cactus Helmet=Capacete de Cacto +Cactus Leggings=Calças de Cacto +Crystal Boots=Botas de Cristal +Crystal Chestplate=Peitoral de Cristal +Crystal Helmet=Capacete de Cristal +Crystal Leggings=Calças de Cristal +Diamond Boots=Botas de Diamante +Diamond Chestplate=Peitoral de Diamante +Diamond Helmet=Capacete de Diamante +Diamond Leggings=Calças de Diamante +Gold Boots=Botas de Ouro +Gold Chestplate=Peitoral de Ouro +Gold Helmet=Capacete de Ouro +Gold Leggings=Calças de Ouro +Mithril Boots=Botas de Mithril +Mithril Chestplate=Peitoral de Mithril +Mithril Helmet=Capacete de Mithril +Mithril Leggings=Calças de Mithril +Steel Boots=Botas de Aço +Steel Chestplate=Peitoral de Aço +Steel Helmet=Capacete de Aço +Steel Leggings=Calças de Aço +Wood Boots=Botas de Madeira +Wood Chestplate=Peitoral de Madeira +Wood Helmet=Capacete de Madeira +Wood Leggings=Calças de Madeira + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Falha ao inicializar jogador +Fire=Fogo +Heal=Saúde +Level=Nível +Radiation=Radiação +Your @1 got destroyed!=@1 foi destruído(a)! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] Nodes de gofo desabilitados + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod carregado mas inoperante. +Back=Voltar +Armor=Armadura +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod carregado mas inoperante. +Armor stand top=Topo de estande de armadura +Armor stand=Estande de armadura +Armor Stand=Estande de Armadura +Locked Armor stand=Estande de Armadura Trancada +Armor Stand (owned by @1)=Estande de Armadura (pertente a @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod carregado mas inoperante. +3d Armor=3d Armor +Armor not initialized!=Armadura não inicializada! +Admin Shield=Escudo de Administrador +Wooden Shield=Escudo de Madeira +Enhanced Wood Shield=Escudo de Madeira Melhorado +Cactus Shield=Escudo de Cacto +Enhanced Cactus Shield=Escudo de Cacto Melhorado +Steel Shield=Escudo de Aço +Bronze Shield=Escudo de Bronze +Diamond Shield=Escudo de Diamante +Gold Shield=Escudo de Ouro +Mithril Shield=Escudo de Mithril +Crystal Shield=Escudo de Cristal diff --git a/mods/3d_armor/3d_armor/locale/3d_armor.ru.tr b/mods/3d_armor/3d_armor/locale/3d_armor.ru.tr new file mode 100644 index 0000000..b817c79 --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/3d_armor.ru.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Отдельный инвентарь брони является nil @1 +3d_armor: Player name is nil @1=3d_armor: Имя игрока является nil @1 +3d_armor: Player reference is nil @1=3d_armor: Ссылка игрока является nil @1 + +### armor.lua ### + +Admin Boots=ботинки админа +Admin Chestplate=бронежилет админа +Admin Helmet=шлем админа +Admin Leggings=гамаши админа +Bronze Boots=бронзовые ботинки +Bronze Chestplate=бронзовый бронежилет +Bronze Helmet=бронзовый шлем +Bronze Leggings=бронзовые гамаши +Cactus Boots=кактусовые ботинки +Cactus Chestplate=кактусовый бронежилет +Cactus Helmet=кактусовый шлем +Cactus Leggings=кактусовые гамаши +Crystal Boots=кристалловые ботинки +Crystal Chestplate=кристалловый бронежилет +Crystal Helmet=кристалловый шлем +Crystal Leggings=кристалловые гамаши +Diamond Boots=алмазные ботинки +Diamond Chestplate=алмазный бронежилет +Diamond Helmet=алмазный шлем +Diamond Leggings=алмазные гамаши +Gold Boots=золотые ботинки +Gold Chestplate=золотой бронежилет +Gold Helmet=золотой шлем +Gold Leggings=золотые гамаши +Mithril Boots=мифриловые ботинки +Mithril Chestplate=мифриловый бронежилет +Mithril Helmet=мифриловый шлем +Mithril Leggings=мифриловые гамаши +Steel Boots=стальные ботинки +Steel Chestplate=стальной бронежилет +Steel Helmet=стальной шлем +Steel Leggings=стальные гамаши +Wood Boots=деревянные ботинки +Wood Chestplate=деревянный бронежилет +Wood Helmet=деревянный шлем +Wood Leggings=деревянные гамаши + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: не смог подготовить игрока +Fire=огонь +Heal=исцеление +Level=уровень +Radiation=излучение +Your @1 got destroyed!=твой(и) @1 был(и) разрушен(ы)! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] блоки огня отключены + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: мод загружен но не используется. +Back=назад +Armor=бронь +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: мод загружен но не используется. +Armor stand top=стойка для брони (верх) +Armor stand=стойка для брони +Armor Stand=стойка для брони +Locked Armor stand=защищенная стойка для брони +Armor Stand (owned by @1)=стойка для брони (принадлежит @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: мод загружен но не используется. +3d Armor=3D бронь +Armor not initialized!=бронь не подготовлена! +Admin Shield=щит админа +Wooden Shield=деревянный щит +Enhanced Wood Shield=улучшенный деревянный щит +Cactus Shield=кактусный щит +Enhanced Cactus Shield=улучшенный кактусный щит +Steel Shield=стальной щит +Bronze Shield=бронзовый щит +Diamond Shield=алмазный щит +Gold Shield=золотой щит +Mithril Shield=мифриловый щит +Crystal Shield=кристалловый щит diff --git a/mods/3d_armor/3d_armor/locale/template.txt b/mods/3d_armor/3d_armor/locale/template.txt new file mode 100644 index 0000000..cedd538 --- /dev/null +++ b/mods/3d_armor/3d_armor/locale/template.txt @@ -0,0 +1,58 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1= +3d_armor: Player name is nil @1= +3d_armor: Player reference is nil @1= + +### armor.lua ### + +Admin Boots= +Admin Chestplate= +Admin Helmet= +Admin Leggings= +Bronze Boots= +Bronze Chestplate= +Bronze Helmet= +Bronze Leggings= +Cactus Boots= +Cactus Chestplate= +Cactus Helmet= +Cactus Leggings= +Crystal Boots= +Crystal Chestplate= +Crystal Helmet= +Crystal Leggings= +Diamond Boots= +Diamond Chestplate= +Diamond Helmet= +Diamond Leggings= +Gold Boots= +Gold Chestplate= +Gold Helmet= +Gold Leggings= +Mithril Boots= +Mithril Chestplate= +Mithril Helmet= +Mithril Leggings= +Steel Boots= +Steel Chestplate= +Steel Helmet= +Steel Leggings= +Wood Boots= +Wood Chestplate= +Wood Helmet= +Wood Leggings= + +### init.lua ### + +3d_armor: Failed to initialize player= +Fire= +Heal= +Level= +Radiation= +Your @1 got destroyed!= +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled= diff --git a/mods/3d_armor/3d_armor/mod.conf b/mods/3d_armor/3d_armor/mod.conf new file mode 100644 index 0000000..ddf6e66 --- /dev/null +++ b/mods/3d_armor/3d_armor/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor +depends = default +optional_depends = player_monoids, armor_monoid, pova, fire, ethereal, bakedclay, moreores +description = Adds craftable armor that is visible to other players. diff --git a/mods/3d_armor/3d_armor/models/3d_armor_character.b3d b/mods/3d_armor/3d_armor/models/3d_armor_character.b3d new file mode 100644 index 0000000..d3e54a8 Binary files /dev/null and b/mods/3d_armor/3d_armor/models/3d_armor_character.b3d differ diff --git a/mods/3d_armor/3d_armor/models/3d_armor_character.blend b/mods/3d_armor/3d_armor/models/3d_armor_character.blend new file mode 100644 index 0000000..2ea7864 Binary files /dev/null and b/mods/3d_armor/3d_armor/models/3d_armor_character.blend differ diff --git a/mods/3d_armor/3d_armor/models/3d_armor_female.b3d b/mods/3d_armor/3d_armor/models/3d_armor_female.b3d new file mode 100644 index 0000000..36ae692 Binary files /dev/null and b/mods/3d_armor/3d_armor/models/3d_armor_female.b3d differ diff --git a/mods/3d_armor/3d_armor/models/3d_armor_female.blend b/mods/3d_armor/3d_armor/models/3d_armor_female.blend new file mode 100644 index 0000000..66d93ab Binary files /dev/null and b/mods/3d_armor/3d_armor/models/3d_armor_female.blend differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_admin.png new file mode 100644 index 0000000..833f6b7 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png new file mode 100644 index 0000000..2487a7e Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png new file mode 100644 index 0000000..2b187e5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png new file mode 100644 index 0000000..78badbb Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png new file mode 100644 index 0000000..350b065 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png new file mode 100644 index 0000000..08e76c6 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png new file mode 100644 index 0000000..31c06b5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png new file mode 100644 index 0000000..01a6bfa Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png new file mode 100644 index 0000000..1870359 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png new file mode 100644 index 0000000..2e4f5d3 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_gold.png new file mode 100644 index 0000000..cd339b6 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png new file mode 100644 index 0000000..f70f30f Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png new file mode 100644 index 0000000..af7b943 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png new file mode 100644 index 0000000..1ebf92a Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_steel.png new file mode 100644 index 0000000..ff8e8f8 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png new file mode 100644 index 0000000..968ffc5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_wood.png new file mode 100644 index 0000000..e62bdc5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png new file mode 100644 index 0000000..de841b0 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png new file mode 100644 index 0000000..d8df83d Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png new file mode 100644 index 0000000..1bb10fd Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png new file mode 100644 index 0000000..b8e6d85 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png new file mode 100644 index 0000000..8c78716 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png new file mode 100644 index 0000000..afcd557 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png new file mode 100644 index 0000000..b166c7c Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png new file mode 100644 index 0000000..4a268f4 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png new file mode 100644 index 0000000..63304f6 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png new file mode 100644 index 0000000..f61e28f Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png new file mode 100644 index 0000000..9ec9971 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png new file mode 100644 index 0000000..4c67491 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png new file mode 100644 index 0000000..01d8d5c Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png new file mode 100644 index 0000000..aa06d18 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png new file mode 100644 index 0000000..2754290 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png new file mode 100644 index 0000000..cc6d570 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png new file mode 100644 index 0000000..162ce4b Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png new file mode 100644 index 0000000..2db95ce Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png new file mode 100644 index 0000000..a1431e3 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png new file mode 100644 index 0000000..862956a Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png new file mode 100644 index 0000000..0f344d0 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png new file mode 100644 index 0000000..17b87c9 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png new file mode 100644 index 0000000..c711745 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png new file mode 100644 index 0000000..f616e1e Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png new file mode 100644 index 0000000..7e750cc Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png new file mode 100644 index 0000000..1405a42 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png new file mode 100644 index 0000000..7bb01ff Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png new file mode 100644 index 0000000..9196681 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png new file mode 100644 index 0000000..936fa66 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png new file mode 100644 index 0000000..3a51908 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png new file mode 100644 index 0000000..fb3ba0e Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png new file mode 100644 index 0000000..2e9caef Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png new file mode 100644 index 0000000..91e7c18 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png new file mode 100644 index 0000000..f3c4a39 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png new file mode 100644 index 0000000..fb939c4 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png new file mode 100644 index 0000000..8bda21c Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png new file mode 100644 index 0000000..903a018 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png new file mode 100644 index 0000000..71fd410 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png new file mode 100755 index 0000000..fba4cff Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png new file mode 100755 index 0000000..c0ebd44 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png new file mode 100755 index 0000000..e311893 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png new file mode 100755 index 0000000..51226c4 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png new file mode 100755 index 0000000..046cdc5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png new file mode 100755 index 0000000..3118654 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png new file mode 100755 index 0000000..415d46b Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png new file mode 100755 index 0000000..ac696ba Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png new file mode 100755 index 0000000..dafef2c Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png new file mode 100755 index 0000000..1460c69 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png new file mode 100755 index 0000000..a73823b Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png new file mode 100644 index 0000000..46742a1 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png new file mode 100755 index 0000000..057f4d0 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png new file mode 100755 index 0000000..9df5649 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png new file mode 100755 index 0000000..031ce61 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png new file mode 100755 index 0000000..4d4eef8 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png new file mode 100755 index 0000000..fe1865a Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png new file mode 100644 index 0000000..abb43a7 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png new file mode 100755 index 0000000..bcd66f5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png new file mode 100755 index 0000000..c70f8f3 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png new file mode 100644 index 0000000..baf6bdf Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png new file mode 100755 index 0000000..1a6d6ff Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png new file mode 100755 index 0000000..44781a0 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png new file mode 100755 index 0000000..813c646 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png new file mode 100755 index 0000000..efdcfe5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png new file mode 100755 index 0000000..a89326e Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png new file mode 100644 index 0000000..1247304 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png new file mode 100755 index 0000000..f21ac2d Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png new file mode 100755 index 0000000..14d6e33 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png new file mode 100644 index 0000000..8197b01 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png new file mode 100755 index 0000000..7dc4119 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png new file mode 100755 index 0000000..dcb2ea5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png new file mode 100755 index 0000000..84b47f9 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png new file mode 100755 index 0000000..409b3cc Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png new file mode 100755 index 0000000..75ee903 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png new file mode 100644 index 0000000..1f7207d Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png new file mode 100644 index 0000000..95c973a Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png new file mode 100644 index 0000000..26d05f0 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png new file mode 100644 index 0000000..12952ff Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png new file mode 100644 index 0000000..537adcb Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png new file mode 100644 index 0000000..09f848e Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png new file mode 100644 index 0000000..6bf702f Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png new file mode 100644 index 0000000..96a11bf Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png new file mode 100644 index 0000000..df3cf16 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png new file mode 100644 index 0000000..1bb3295 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png new file mode 100644 index 0000000..8ee0bc4 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png new file mode 100644 index 0000000..a7cf310 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png new file mode 100644 index 0000000..9fc78fb Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png new file mode 100644 index 0000000..dde7b3d Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png new file mode 100644 index 0000000..974cb5d Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png new file mode 100644 index 0000000..99034ca Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png new file mode 100644 index 0000000..9608144 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png new file mode 100644 index 0000000..7e43ea5 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/3d_armor_trans.png b/mods/3d_armor/3d_armor/textures/3d_armor_trans.png new file mode 100644 index 0000000..4a31242 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/3d_armor_trans.png differ diff --git a/mods/3d_armor/3d_armor/textures/character_preview.png b/mods/3d_armor/3d_armor/textures/character_preview.png new file mode 100644 index 0000000..82a0ae4 Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/character_preview.png differ diff --git a/mods/3d_armor/3d_armor/textures/inventory_plus_armor.png b/mods/3d_armor/3d_armor/textures/inventory_plus_armor.png new file mode 100644 index 0000000..7f7d63e Binary files /dev/null and b/mods/3d_armor/3d_armor/textures/inventory_plus_armor.png differ diff --git a/mods/3d_armor/3d_armor/textures/preview_index.txt b/mods/3d_armor/3d_armor/textures/preview_index.txt new file mode 100644 index 0000000..9e2fe9d --- /dev/null +++ b/mods/3d_armor/3d_armor/textures/preview_index.txt @@ -0,0 +1,44 @@ +3d_armor/textures/3d_armor_helmet_wood.png:head +3d_armor/textures/3d_armor_chestplate_wood.png:torso +3d_armor/textures/3d_armor_leggings_wood.png:legs +3d_armor/textures/3d_armor_boots_wood.png:feet + +3d_armor/textures/3d_armor_helmet_cactus.png:head +3d_armor/textures/3d_armor_chestplate_cactus.png:torso +3d_armor/textures/3d_armor_leggings_cactus.png:legs +3d_armor/textures/3d_armor_boots_cactus.png:feet + +3d_armor/textures/3d_armor_helmet_steel.png:head +3d_armor/textures/3d_armor_chestplate_steel.png:torso +3d_armor/textures/3d_armor_leggings_steel.png:legs +3d_armor/textures/3d_armor_boots_steel.png:feet + +3d_armor/textures/3d_armor_helmet_bronze.png:head +3d_armor/textures/3d_armor_chestplate_bronze.png:torso +3d_armor/textures/3d_armor_leggings_bronze.png:legs +3d_armor/textures/3d_armor_boots_bronze.png:feet + +3d_armor/textures/3d_armor_helmet_gold.png:head +3d_armor/textures/3d_armor_chestplate_gold.png:torso +3d_armor/textures/3d_armor_leggings_gold.png:legs +3d_armor/textures/3d_armor_boots_gold.png:feet + +3d_armor/textures/3d_armor_helmet_diamond.png:head +3d_armor/textures/3d_armor_chestplate_diamond.png:torso +3d_armor/textures/3d_armor_leggings_diamond.png:legs +3d_armor/textures/3d_armor_boots_diamond.png:feet + +3d_armor/textures/3d_armor_helmet_mithril.png:head +3d_armor/textures/3d_armor_chestplate_mithril.png:torso +3d_armor/textures/3d_armor_leggings_mithril.png:legs +3d_armor/textures/3d_armor_boots_mithril.png:feet + +3d_armor/textures/3d_armor_helmet_crystal.png:head +3d_armor/textures/3d_armor_chestplate_crystal.png:torso +3d_armor/textures/3d_armor_leggings_crystal.png:legs +3d_armor/textures/3d_armor_boots_crystal.png:feet + +3d_armor/textures/3d_armor_helmet_admin.png:head +3d_armor/textures/3d_armor_chestplate_admin.png:torso +3d_armor/textures/3d_armor_leggings_admin.png:legs +3d_armor/textures/3d_armor_boots_admin.png:feet diff --git a/mods/3d_armor/3d_armor/tools/README.md b/mods/3d_armor/3d_armor/tools/README.md new file mode 100644 index 0000000..6aa7ffe --- /dev/null +++ b/mods/3d_armor/3d_armor/tools/README.md @@ -0,0 +1,7 @@ +# Intllib tool + +please consider using the intllib tool to update locale files: + +```../../intllib/tools/xgettext.sh ../**/*.lua``` + +make sure you are in `3d_armor` derectory before running this command diff --git a/mods/3d_armor/3d_armor/tools/updatepo.sh b/mods/3d_armor/3d_armor/tools/updatepo.sh new file mode 100755 index 0000000..52de990 --- /dev/null +++ b/mods/3d_armor/3d_armor/tools/updatepo.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +# To create a new translation: +# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot + +cd "$(dirname "${BASH_SOURCE[0]}")/.."; + +# Extract translatable strings. +xgettext --from-code=UTF-8 \ + --language=Lua \ + --sort-by-file \ + --keyword=S \ + --keyword=NS:1,2 \ + --keyword=N_ \ + --add-comments='Translators:' \ + --add-location=file \ + -o locale/template.pot \ + $(find .. -name '*.lua') + +# Update translations. +find locale -name '*.po' | while read -r file; do + echo $file + msgmerge --update $file locale/template.pot; +done diff --git a/mods/3d_armor/3d_armor_ip/LICENSE.txt b/mods/3d_armor/3d_armor_ip/LICENSE.txt new file mode 100644 index 0000000..b924ac0 --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] 3d Armor integration to inventory plus [3d_armor_ip] +========================================================== + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/mods/3d_armor/3d_armor_ip/depends.txt b/mods/3d_armor/3d_armor_ip/depends.txt new file mode 100644 index 0000000..e96293b --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/depends.txt @@ -0,0 +1,2 @@ +3d_armor +inventory_plus? diff --git a/mods/3d_armor/3d_armor_ip/description.txt b/mods/3d_armor/3d_armor_ip/description.txt new file mode 100644 index 0000000..58b700e --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/description.txt @@ -0,0 +1 @@ +Adds 3d_armor page to the inventory plus. diff --git a/mods/3d_armor/3d_armor_ip/init.lua b/mods/3d_armor/3d_armor_ip/init.lua new file mode 100644 index 0000000..f061200 --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/init.lua @@ -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", S("3d_armor_ip: Mod loaded but unused.")) + return +end + +armor.formspec = "size[8,8.5]button[6,0;2,0.5;main;"..F(S("Back")).."]"..armor.formspec +armor:register_on_update(function(player) + local name = player:get_player_name() + local formspec = armor:get_armor_formspec(name, true) + local page = player:get_inventory_formspec() + if page:find("detached:"..name.."_armor") then + inventory_plus.set_inventory_formspec(player, formspec) + end +end) + +if minetest.get_modpath("crafting") then + inventory_plus.get_formspec = function(player, page) + end +end + +minetest.register_on_joinplayer(function(player) + inventory_plus.register_button(player,"armor", S("Armor")) +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if fields.armor then + local name = armor:get_valid_player(player, "[on_player_receive_fields]") + if not name then + return + end + local formspec = armor:get_armor_formspec(name, true) + inventory_plus.set_inventory_formspec(player, formspec) + end +end) diff --git a/mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr b/mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr new file mode 100644 index 0000000..5f540b1 --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr @@ -0,0 +1,8 @@ +# textdomain: 3d_armor_ip + + +### init.lua ### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip : Mod chargé mais inutilisé. +Armor=Armure +Back=Retour diff --git a/mods/3d_armor/3d_armor_ip/locale/template.txt b/mods/3d_armor/3d_armor_ip/locale/template.txt new file mode 100644 index 0000000..133bce8 --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: 3d_armor_ip + + +### init.lua ### + +3d_armor_ip: Mod loaded but unused.= +Armor= +Back= diff --git a/mods/3d_armor/3d_armor_ip/mod.conf b/mods/3d_armor/3d_armor_ip/mod.conf new file mode 100644 index 0000000..0fe7f4e --- /dev/null +++ b/mods/3d_armor/3d_armor_ip/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_ip +depends = 3d_armor +optional_depends = inventory_plus +description = Adds 3d_armor page to the inventory plus. diff --git a/mods/3d_armor/3d_armor_sfinv/LICENSE.txt b/mods/3d_armor/3d_armor_sfinv/LICENSE.txt new file mode 100644 index 0000000..2b2a9f6 --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] 3d Armor sfinv integration [3d_armor_sfinv] +================================================= + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/mods/3d_armor/3d_armor_sfinv/depends.txt b/mods/3d_armor/3d_armor_sfinv/depends.txt new file mode 100644 index 0000000..c7beeda --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/depends.txt @@ -0,0 +1,2 @@ +3d_armor +sfinv? diff --git a/mods/3d_armor/3d_armor_sfinv/description.txt b/mods/3d_armor/3d_armor_sfinv/description.txt new file mode 100644 index 0000000..15f4e96 --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/description.txt @@ -0,0 +1 @@ +Adds 3d_armor page to the sfinv inventory. diff --git a/mods/3d_armor/3d_armor_sfinv/init.lua b/mods/3d_armor/3d_armor_sfinv/init.lua new file mode 100644 index 0000000..830ebbc --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/init.lua @@ -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", S("3d_armor_sfinv: Mod loaded but unused.")) + return +end + +sfinv.register_page("3d_armor:armor", { + title = S("Armor"), + get = function(self, player, context) + local name = player:get_player_name() + local formspec = armor:get_armor_formspec(name, true) + return sfinv.make_formspec(player, context, formspec, false) + end +}) +armor:register_on_update(function(player) + if sfinv.enabled then + sfinv.set_player_inventory_formspec(player) + end +end) diff --git a/mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr b/mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr new file mode 100644 index 0000000..ee72e52 --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr @@ -0,0 +1,7 @@ +# textdomain: 3d_armor_sfinv + + +### init.lua ### + +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv : Mod cargado pero no activado. +Armor=Armadura diff --git a/mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr b/mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr new file mode 100644 index 0000000..f25bd11 --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr @@ -0,0 +1,7 @@ +# textdomain: 3d_armor_sfinv + + +### init.lua ### + +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv : Mod chargé mais inutilisé. +Armor=Armure diff --git a/mods/3d_armor/3d_armor_sfinv/locale/template.txt b/mods/3d_armor/3d_armor_sfinv/locale/template.txt new file mode 100644 index 0000000..a3f01b5 --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/locale/template.txt @@ -0,0 +1,7 @@ +# textdomain: 3d_armor_sfinv + + +### init.lua ### + +3d_armor_sfinv: Mod loaded but unused.= +Armor= diff --git a/mods/3d_armor/3d_armor_sfinv/mod.conf b/mods/3d_armor/3d_armor_sfinv/mod.conf new file mode 100644 index 0000000..bc0eb89 --- /dev/null +++ b/mods/3d_armor/3d_armor_sfinv/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_sfinv +depends = 3d_armor +optional_depends = sfinv +description = Adds 3d_armor page to the sfinv inventory. diff --git a/mods/3d_armor/3d_armor_stand/LICENSE.txt b/mods/3d_armor/3d_armor_stand/LICENSE.txt new file mode 100644 index 0000000..e3cb55d --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/LICENSE.txt @@ -0,0 +1,43 @@ +[mod] 3d Armor Stand [3d_armor_stand] +===================================== + +License Source Code +------------------- + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Lecense Models +-------------- + +Copyright (C) 2016-2019 Stuart Jones - CC BY-SA 3.0 + +UV model mapping by tobyplowy(aka toby109tt) + +License Textures +---------------- + +3d_armor_stand.png +3d_armor_stand_locked.png + +Copyright (C) 2017-2019 tobyplowy - CC BY-SA 3.0 + +3d_armor_stand_feet.png +3d_armor_stand_head.png +3d_armor_stand_legs.png +3d_armor_stand_torso.png + +Copyright (C) 2016-2019 Stuart Jones - CC BY-SA 3.0 diff --git a/mods/3d_armor/3d_armor_stand/README.txt b/mods/3d_armor/3d_armor_stand/README.txt new file mode 100644 index 0000000..6a98ab9 --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/README.txt @@ -0,0 +1,21 @@ +[mod] 3d Armor Stand [3d_armor_stand] +===================================== + +Depends: 3d_armor + +Adds a chest-like armor stand for armor storage and display. + +Crafting +-------- + +F = Wooden Fence [default:fence_wood] +S = Steel Ingot [default:steel_ingot] + ++---+---+---+ +| | F | | ++---+---+---+ +| | F | | ++---+---+---+ +| S | S | S | ++---+---+---+ + diff --git a/mods/3d_armor/3d_armor_stand/depends.txt b/mods/3d_armor/3d_armor_stand/depends.txt new file mode 100644 index 0000000..fdbb290 --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/depends.txt @@ -0,0 +1,2 @@ +3d_armor + diff --git a/mods/3d_armor/3d_armor_stand/init.lua b/mods/3d_armor/3d_armor_stand/init.lua new file mode 100644 index 0000000..612345b --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/init.lua @@ -0,0 +1,355 @@ +-- 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 = "3d_armor_trans.png" + local textures = {} + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local yaw = 0 + if inv then + for _, element in pairs(elements) do + local stack = inv:get_stack("armor_"..element, 1) + if stack:get_count() == 1 then + local item = stack:get_name() or "" + local def = stack:get_definition() or {} + local groups = def.groups or {} + if groups["armor_"..element] then + if def.texture then + table.insert(textures, def.texture) + else + table.insert(textures, item:gsub("%:", "_")..".png") + end + end + end + end + end + if #textures > 0 then + texture = table.concat(textures, "^") + end + if node.param2 then + local rot = node.param2 % 4 + if rot == 1 then + yaw = 3 * math.pi / 2 + elseif rot == 2 then + yaw = math.pi + elseif rot == 3 then + yaw = math.pi / 2 + end + end + object:set_yaw(yaw) + object:set_properties({textures={texture}}) + end +end + +local function has_locked_armor_stand_privilege(meta, player) + local name = "" + if player then + if minetest.check_player_privs(player, "protection_bypass") then + return true + end + name = player:get_player_name() + end + if name ~= meta:get_string("owner") then + return false + end + return true +end + +local function add_hidden_node(pos, player) + local p = {x=pos.x, y=pos.y + 1, z=pos.z} + local name = player:get_player_name() + local node = minetest.get_node(p) + if node.name == "air" and not minetest.is_protected(pos, name) then + minetest.set_node(p, {name="3d_armor_stand:top"}) + end +end + +local function remove_hidden_node(pos) + local p = {x=pos.x, y=pos.y + 1, z=pos.z} + local node = minetest.get_node(p) + if node.name == "3d_armor_stand:top" then + minetest.remove_node(p) + end +end + +minetest.register_node("3d_armor_stand:top", { + description = S("Armor stand top"), + paramtype = "light", + drawtype = "plantlike", + sunlight_propagates = true, + walkable = true, + pointable = false, + diggable = false, + buildable_to = false, + drop = "", + groups = {not_in_creative_inventory = 1}, + on_blast = function() end, + tiles = {"3d_armor_trans.png"}, +}) + +minetest.register_node("3d_armor_stand:armor_stand", { + description = S("Armor stand"), + drawtype = "mesh", + mesh = "3d_armor_stand.obj", + tiles = {"3d_armor_stand.png"}, + 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}, + 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}, + sounds = default.node_sound_wood_defaults(), + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", armor_stand_formspec) + meta:set_string("infotext", S("Armor Stand")) + meta:set_string("owner", "") + local inv = meta:get_inventory() + for _, element in pairs(elements) do + inv:set_size("armor_"..element, 1) + end + end, + can_dig = function(pos, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + for _, element in pairs(elements) do + if not inv:is_empty("armor_"..element) then + return false + end + end + return true + end, + after_place_node = function(pos, placer) + minetest.add_entity(pos, "3d_armor_stand:armor_entity") + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext", S("Armor Stand (owned by @1)", meta:get_string("owner"))) + add_hidden_node(pos, placer) + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if not has_locked_armor_stand_privilege(meta, player) then + return 0 + end + local def = stack:get_definition() or {} + local groups = def.groups or {} + if groups[listname] then + return 1 + end + return 0 + end, + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if not has_locked_armor_stand_privilege(meta, player) then + return 0 + end + return stack:get_count() + end, + allow_metadata_inventory_move = function(pos) + return 0 + end, + on_metadata_inventory_put = function(pos) + update_entity(pos) + end, + on_metadata_inventory_take = function(pos) + update_entity(pos) + end, + after_destruct = function(pos) + update_entity(pos) + remove_hidden_node(pos) + end, + on_blast = function(pos) + -- Not affected by TNT + end, +}) + +minetest.register_entity("3d_armor_stand:armor_entity", { + physical = true, + visual = "mesh", + mesh = "3d_armor_entity.obj", + visual_size = {x=1, y=1}, + collisionbox = {0,0,0,0,0,0}, + textures = {"3d_armor_trans.png"}, + pos = nil, + timer = 0, + on_activate = function(self) + local pos = self.object:get_pos() + if pos then + self.pos = vector.round(pos) + update_entity(pos) + end + end, + on_blast = function(self, damage) + local drops = {} + local node = minetest.get_node(self.pos) + if node.name == "3d_armor_stand:armor_stand" then + drop_armor(self.pos) + self.object:remove() + end + return false, false, drops + end, +}) + +minetest.register_abm({ + nodenames = {"3d_armor_stand:locked_armor_stand", "3d_armor_stand:armor_stand"}, + interval = 15, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local num + num = #minetest.get_objects_inside_radius(pos, 0.5) + if num > 0 then return end + update_entity(pos) + end +}) + +minetest.register_craft({ + output = "3d_armor_stand:armor_stand", + recipe = { + {"", "group:fence", ""}, + {"", "group:fence", ""}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "3d_armor_stand:locked_armor_stand", + recipe = { + {"3d_armor_stand:armor_stand", "default:steel_ingot"}, + } +}) diff --git a/mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr b/mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr new file mode 100644 index 0000000..7d4cd38 --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr @@ -0,0 +1,10 @@ +# textdomain: 3d_armor_stand + + +### init.lua ### + +Armor Stand=Support d'armure +Armor Stand (owned by @1)=Support d'armure (propriété de @1) +Armor stand=Support d'armure +Armor stand top=Haut de support d'armure +Locked Armor stand=Support d'armure verrouillé diff --git a/mods/3d_armor/3d_armor_stand/locale/template.txt b/mods/3d_armor/3d_armor_stand/locale/template.txt new file mode 100644 index 0000000..25befcb --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: 3d_armor_stand + + +### init.lua ### + +Armor Stand= +Armor Stand (owned by @1)= +Armor stand= +Armor stand top= +Locked Armor stand= diff --git a/mods/3d_armor/3d_armor_stand/mod.conf b/mods/3d_armor/3d_armor_stand/mod.conf new file mode 100644 index 0000000..d1f1a4e --- /dev/null +++ b/mods/3d_armor/3d_armor_stand/mod.conf @@ -0,0 +1,2 @@ +name = 3d_armor_stand +depends = 3d_armor diff --git a/mods/3d_armor/3d_armor_stand/models/3d_armor_stand.png b/mods/3d_armor/3d_armor_stand/models/3d_armor_stand.png new file mode 100644 index 0000000..aeb26de Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/models/3d_armor_stand.png differ diff --git a/mods/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png b/mods/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png new file mode 100644 index 0000000..3ee08b4 Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/models/3d_armor_stand_locked.png differ diff --git a/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png new file mode 100644 index 0000000..6b34d66 Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_feet.png differ diff --git a/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png new file mode 100644 index 0000000..864bf5c Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_head.png differ diff --git a/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png new file mode 100644 index 0000000..5441f0c Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_legs.png differ diff --git a/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png new file mode 100644 index 0000000..51b490f Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_shield.png differ diff --git a/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png new file mode 100644 index 0000000..1856bae Binary files /dev/null and b/mods/3d_armor/3d_armor_stand/textures/3d_armor_stand_torso.png differ diff --git a/mods/3d_armor/3d_armor_ui/LICENSE.txt b/mods/3d_armor/3d_armor_ui/LICENSE.txt new file mode 100644 index 0000000..6ae23a6 --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/LICENSE.txt @@ -0,0 +1,18 @@ +[mod] 3d Armor integration to unified inventory [3d_armor_ui] +============================================================= + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/mods/3d_armor/3d_armor_ui/depends.txt b/mods/3d_armor/3d_armor_ui/depends.txt new file mode 100644 index 0000000..cf4ccf9 --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/depends.txt @@ -0,0 +1,2 @@ +3d_armor +unified_inventory? diff --git a/mods/3d_armor/3d_armor_ui/description.txt b/mods/3d_armor/3d_armor_ui/description.txt new file mode 100644 index 0000000..e6bf11c --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/description.txt @@ -0,0 +1 @@ +Adds 3d_armor page to the unified inventory. diff --git a/mods/3d_armor/3d_armor_ui/init.lua b/mods/3d_armor/3d_armor_ui/init.lua new file mode 100644 index 0000000..28193e7 --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/init.lua @@ -0,0 +1,61 @@ +-- 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() + if armor.def[name].init_time == 0 then + return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"} + end + 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, +}) diff --git a/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr b/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr new file mode 100644 index 0000000..38e0f05 --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr @@ -0,0 +1,12 @@ +# textdomain: 3d_armor_ui + + +### init.lua ### + +3d Armor=Armure 3d +Armor=Armure +Armor not initialized!=Armure non initialisée ! +Fire=Feu +Heal=Soins +Level=Niveau +Radiation=Radiation diff --git a/mods/3d_armor/3d_armor_ui/locale/template.txt b/mods/3d_armor/3d_armor_ui/locale/template.txt new file mode 100644 index 0000000..0f7a8cb --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/locale/template.txt @@ -0,0 +1,12 @@ +# textdomain: 3d_armor_ui + + +### init.lua ### + +3d Armor= +Armor= +Armor not initialized!= +Fire= +Heal= +Level= +Radiation= diff --git a/mods/3d_armor/3d_armor_ui/mod.conf b/mods/3d_armor/3d_armor_ui/mod.conf new file mode 100644 index 0000000..331627e --- /dev/null +++ b/mods/3d_armor/3d_armor_ui/mod.conf @@ -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 diff --git a/mods/3d_armor/LICENSE.md b/mods/3d_armor/LICENSE.md new file mode 100644 index 0000000..f7793ff --- /dev/null +++ b/mods/3d_armor/LICENSE.md @@ -0,0 +1,10 @@ +3D Armor - Visible Player Armor +=============================== + +License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 + +Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0 + +Special credit to Jordach and MirceaKitsune for providing the default 3d character model. + +New armor/shield textures CC-BY-SA 3.0 / davidthecreator / https://forum.minetest.net/viewtopic.php?f=11&t=4654&start=800#p356448 diff --git a/mods/3d_armor/README.md b/mods/3d_armor/README.md new file mode 100644 index 0000000..3655e33 --- /dev/null +++ b/mods/3d_armor/README.md @@ -0,0 +1,76 @@ +Modpack - 3d Armor [0.4.13] +=========================== +![3d_armor screenshot](https://github.com/minetest-mods/3d_armor/blob/master/screenshot.png) + + +![](https://github.com/minetest-mods/3d_armor/workflows/luacheck/badge.svg) +![](https://github.com/minetest-mods/3d_armor/workflows/integration-test/badge.svg) + +### Table of Contents + + + + +- [[mod] Visible Player Armor [3d_armor]](#mod-visible-player-armor-3d_armor) +- [[mod] Visible Wielded Items [wieldview]](#mod-visible-wielded-items-wieldview) +- [[mod] Shields [shields]](#mod-shields-shields) +- [[mod] 3d Armor Stand [3d_armor_stand]](#mod-3d-armor-stand-3d_armor_stand) + + + + +[mod] Visible Player Armor [3d_armor] +------------------------------------- + +Minetest Version: 5.0.0 + +Game: minetest_game and many derivatives + +Depends: default + +Adds craftable armor that is visible to other players. Each armor item worn contributes to +a player's armor group level making them less vulnerable to attack. + +Armor takes damage when a player is hurt, however, many armor items offer a 'stackable' +percentage chance of restoring the lost health points. Overall armor level is boosted by 10% +when wearing a full matching set (helmet, chestplate, leggings and boots of the same material) + +Fire protection has been added by TenPlus1 and in use when ethereal mod is found and crystal +armor has been enabled. each piece of armor offers 1 fire protection, level 1 protects +against torches, level 2 against crystal spikes, 3 for fire and 5 protects when in lava. + +Compatible with sfinv, inventory plus or unified inventory by enabling the appropriate +inventory module, [3d_armor_sfinv], [3d_armor_ip] and [3d_armor_ui] respectively. +Also compatible with [smart_inventory] without the need for additional modules. + +built in support player skins [skins] by Zeg9 and Player Textures [player_textures] by PilzAdam +and [simple_skins] by TenPlus1. + +Armor can be configured by adding a file called armor.conf in 3d_armor mod or world directory. +see armor.conf.example for all available options. + +For mod installation instructions, please visit: http://wiki.minetest.com/wiki/Installing_Mods + +[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. diff --git a/mods/3d_armor/description.txt b/mods/3d_armor/description.txt new file mode 100644 index 0000000..2da5ba4 --- /dev/null +++ b/mods/3d_armor/description.txt @@ -0,0 +1 @@ +Visible player armor & wielded items. diff --git a/mods/3d_armor/integration-test.sh b/mods/3d_armor/integration-test.sh new file mode 100755 index 0000000..9169144 --- /dev/null +++ b/mods/3d_armor/integration-test.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# simple integration test + +CFG=/tmp/minetest.conf +MTDIR=/tmp/mt +WORLDDIR=${MTDIR}/worlds/world + +cat < ${CFG} + enable_3d_armor_integration_test = true +EOF + +mkdir -p ${WORLDDIR} +chmod 777 ${MTDIR} -R +docker run --rm -i \ + -v ${CFG}:/etc/minetest/minetest.conf:ro \ + -v ${MTDIR}:/var/lib/minetest/.minetest \ + -v $(pwd):/var/lib/minetest/.minetest/worlds/world/worldmods/3d_armor \ + registry.gitlab.com/minetest/minetest/server:5.2.0 + +test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1 diff --git a/mods/3d_armor/modpack.conf b/mods/3d_armor/modpack.conf new file mode 100644 index 0000000..bf746c5 --- /dev/null +++ b/mods/3d_armor/modpack.conf @@ -0,0 +1 @@ +description = Visible player armor & wielded items. diff --git a/mods/3d_armor/preview_gen.py b/mods/3d_armor/preview_gen.py new file mode 100755 index 0000000..a18954d --- /dev/null +++ b/mods/3d_armor/preview_gen.py @@ -0,0 +1,81 @@ +#!/usr/bin/python + +import os +import sys +import Image + +try : + arg = sys.argv[1] +except IndexError : + print "Usage: preview_gen.py " + sys.exit(1) + +try : + index = open(arg, "r") +except IOError : + print "Failed to open index file%s" %s (arg) + sys.exit(1) + +preview = [] + +for line in index.readlines() : + if ":" in line : + line = line.rstrip('\n') + preview.append(line.split(':')) + +print "Generating preview images..." +for fn, place in preview : + try : + imi = Image.open(fn) + except IOError : + print "Failed to open %s" % (fn) + sys.exit(1) + + w, h = imi.size + if h != w / 2: + print "Incompatible texture size %s" % (fn) + sys.exit(1) + + s = w / 64 + imo = Image.new("RGBA", (16 * s, 32 * s)) + + if place == "all" or place == "head" : + face = (40 * s, 8 * s, 48 * s, 16 * s) + side_l = (56 * s, 8 * s, 57 * s, 16 * s) + side_r = (63 * s, 8 * s, 64 * s, 16 * s) + imo.paste(imi.crop(side_l), (4 * s, 0, 5 * s, 8 * s)) + imo.paste(imi.crop(side_r), (11 * s, 0, 12 * s, 8 * s)) + imo.paste(imi.crop(face), (4 * s, 0, 12 * s, 8 * s)) + + if place == "all" or place == "torso" : + arm = (44 * s, 20 * s, 48 * s, 32 * s) + body = (20 * s, 20 * s, 28 * s, 32 * s) + imo.paste(imi.crop(arm), (0 * s, 8 * s, 4 * s, 20 * s)) + imo.paste(imi.crop(arm).transpose(Image.FLIP_LEFT_RIGHT), + (12 * s, 8 * s, 16 * s, 20 * s)) + imo.paste(imi.crop(body), (4 * s, 8 * s, 12 * s, 20 * s)) + + if place == "all" or place == "legs" : + leg = (4 * s, 20 * s, 8 * s, 32 * s) + imo.paste(imi.crop(leg), (4 * s, 20 * s, 8 * s, 32 * s)) + imo.paste(imi.crop(leg).transpose(Image.FLIP_LEFT_RIGHT), + (8 * s, 20 * s, 12 * s, 32 * s)) + + if place == "all" or place == "feet" : + boot = (20 * s, 4 * s, 24 * s, 11 * s) + imo.paste(imi.crop(boot), (4 * s, 25 * s, 8 * s, 32 * s)) + imo.paste(imi.crop(boot).transpose(Image.FLIP_LEFT_RIGHT), + (8 * s, 25 * s, 12 * s, 32 * s)) + + size = (32 * s, 64 * s) + imo = imo.resize(size) + + if place == "shield" : + shield = (0, 0, 16 * s, 16 * s) + imo.paste(imi.crop(shield), (16 * s, 32 * s, 32 * s, 48 * s)) + + outfile = fn.replace(".png", "_preview.png") + imo.save(outfile) + print outfile + + diff --git a/mods/3d_armor/screenshot.png b/mods/3d_armor/screenshot.png new file mode 100644 index 0000000..637944a Binary files /dev/null and b/mods/3d_armor/screenshot.png differ diff --git a/mods/3d_armor/screenshot.xcf b/mods/3d_armor/screenshot.xcf new file mode 100644 index 0000000..17ea7c9 Binary files /dev/null and b/mods/3d_armor/screenshot.xcf differ diff --git a/mods/3d_armor/settingtypes.txt b/mods/3d_armor/settingtypes.txt new file mode 100644 index 0000000..a873995 --- /dev/null +++ b/mods/3d_armor/settingtypes.txt @@ -0,0 +1,76 @@ +[3d_armor] + +armor_material_wood (Enable wood armor) bool true +armor_material_cactus (Enable cactus armor) bool true +armor_material_steel (Enable steel armor) bool true +armor_material_bronze (Enable bronze armor) bool true +armor_material_diamond (Enable diamond armor) bool true +armor_material_gold (Enable gold armor) bool true +armor_material_mithril (Enable mithril armor) bool true +armor_material_crystal (Enable crystal armor) bool true + +# Increase this if you get initialization glitches when a player first joins. +armor_init_delay (Initialization delay) int 2 + +# Number of initialization attempts. +# Use in conjunction with armor_init_delay if initialization problems persist. +armor_init_times (Initialization attempts) int 10 + +# Increase this if armor is not getting into bones due to server lag. +armor_bones_delay (Delay for bones) int 1 + +# How often player armor items are updated. +armor_update_time (Armor refresh rate [seconds]) int 1 + +# Drop armor when a player dies. +# Uses bones mod if present, otherwise items are dropped around the player. +armor_drop (Drop armor on death) bool true + +# Pulverize armor when a player dies, overrides armor_drop. +armor_destroy (Pulverize armor on death) bool false + +# You can use this to increase or decrease overall armor effectiveness, +# eg: level_multiplier = 0.5 will reduce armor level by half. +armor_level_multiplier (Armor effectiveness multiplier) float 1 + +# You can use this to increase or decrease overall armor healing, +# eg: armor_heal_multiplier = 0 will disable healing altogether. +armor_heal_multiplier (Armor healing multiplier) float 1 + +# Armor set item names, remove or add items to include them or remove them from whats considered an Armor set. +armor_set_elements (Armor set items) string head torso legs feet shield + +# Bonus multiplier when wearing armor set, set to the same as armor_level_multiplier to disable +armor_set_multiplier (Armor Set Bonus multiplier) float 1.1 + +# Enable water protection (periodically restores breath when activated). +armor_water_protect (Enable water protection) bool true + +# Enable fire protection (defaults true if using ethereal mod). +armor_fire_protect (Enable fire protection) bool false + +# Enable fire damage from torches (defaults true if using ethereal mod). +armor_fire_protect_torch (Enable fire protection torch damage) bool false + +# Enable punch damage effects. +armor_punch_damage (Enable damage effects) bool true + +# Enable migration of old armor inventories. +armor_migrate_old_inventory (Migrate old armor inventories) bool true + +# Armor is not visible on player model when enabled. +armor_transparent (Transparent armor) bool false + + +[shields] + +shields_disable_sounds (Disable shield sounds) bool false + + +[wieldview] + +# Set number of seconds between visible wielded item updates. +wieldview_update_time (Wieldview refresh rate [seconds]) int 2 + +# Show nodes as tiles, disabled by default. +wieldview_node_tiles (Show nodes as tiles) bool false diff --git a/mods/3d_armor/shields/LICENSE.txt b/mods/3d_armor/shields/LICENSE.txt new file mode 100644 index 0000000..1f84859 --- /dev/null +++ b/mods/3d_armor/shields/LICENSE.txt @@ -0,0 +1,26 @@ +[mod] Shields [shields] +======================= + +License Source Code +------------------- + +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License Textures +---------------- + +Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0 diff --git a/mods/3d_armor/shields/README.txt b/mods/3d_armor/shields/README.txt new file mode 100644 index 0000000..5a72097 --- /dev/null +++ b/mods/3d_armor/shields/README.txt @@ -0,0 +1,16 @@ +[mod] Shields [shields] +======================= + +Adds shields to 3d_armor + +Depends: 3d_armor + +Originally a part of 3d_armor, shields have been re-included as an optional extra. +If you do not what shields then simply remove the shields folder from the modpack. + +Shields Configuration +--------------------- + +Override the following default settings by adding them to your minetest.conf file. + +shields_disable_sounds = false diff --git a/mods/3d_armor/shields/crafting_guide.txt b/mods/3d_armor/shields/crafting_guide.txt new file mode 100644 index 0000000..9b61dde --- /dev/null +++ b/mods/3d_armor/shields/crafting_guide.txt @@ -0,0 +1,36 @@ +Shields -- Crafting Guide +-------------------------- + ++---+---+---+ +| X | X | X | ++---+---+---+ +| X | X | X | ++---+---+---+ +| | X | | ++---+---+---+ + +[shields:shield_wood] X = [default:wood] +[shields:shield_cactus] X = [default:cactus] +[shields:shield_steel] X = [default:steel_ingot] +[shields:shield_bronze] X = [default:bronze_ingot] +[shields:shield_diamond] X = [default:diamond] +[shields:shield_gold] X = [default:gold_ingot] +[shields:shield_mithril] X = [moreores:mithril_ingot] +[shields:shield_crystal] X = [ethereal:crystal_ingot] + +Enhanced Shields +---------------- + ++---+ +| S | ++---+ +| X | ++---+ +| S | ++---+ + +[shields:shield_enhanced_wood] X = [shields:shield_wood] +[shields:shield_enhanced_cactus] X = [shields:shield_cactus] + +S = [default:steel_ingot] + diff --git a/mods/3d_armor/shields/depends.txt b/mods/3d_armor/shields/depends.txt new file mode 100644 index 0000000..585cc7a --- /dev/null +++ b/mods/3d_armor/shields/depends.txt @@ -0,0 +1,2 @@ +default +3d_armor diff --git a/mods/3d_armor/shields/description.txt b/mods/3d_armor/shields/description.txt new file mode 100644 index 0000000..cb378bb --- /dev/null +++ b/mods/3d_armor/shields/description.txt @@ -0,0 +1 @@ +Adds visible shields to 3d armor. diff --git a/mods/3d_armor/shields/init.lua b/mods/3d_armor/shields/init.lua new file mode 100644 index 0000000..80e34ac --- /dev/null +++ b/mods/3d_armor/shields/init.lua @@ -0,0 +1,382 @@ + +--- 3D Armor Shields +-- +-- @topic shields + + +-- support for i18n +local S = minetest.get_translator(minetest.get_current_modname()) + +local disable_sounds = minetest.settings:get_bool("shields_disable_sounds") +local function play_sound_effect(player, name) + if not disable_sounds and player then + local pos = player:get_pos() + if pos then + minetest.sound_play(name, { + pos = pos, + max_hear_distance = 10, + gain = 0.5, + }) + end + end +end + +if minetest.global_exists("armor") and armor.elements then + table.insert(armor.elements, "shield") +end + +-- Regisiter Shields + +--- Admin Shield +-- +-- @shield shields:shield_admin +-- @img shields_inv_shield_admin.png +-- @grp armor_shield 1000 +-- @grp armor_heal 100 +-- @grp armor_use 0 +-- @grp not_int_creative_inventory 1 +armor:register_armor("shields:shield_admin", { + description = S("Admin Shield"), + inventory_image = "shields_inv_shield_admin.png", + groups = {armor_shield=1000, armor_heal=100, armor_use=0, not_in_creative_inventory=1}, +}) + +minetest.register_alias("adminshield", "shields:shield_admin") + + +if armor.materials.wood then + --- Wood Shield + -- + -- @shield shields:shield_wood + -- @img shields_inv_shield_wood.png + -- @grp armor_shield 1 + -- @grp armor_heal 0 + -- @grp armor_use 2000 + -- @grp flammable 1 + -- @armorgrp fleshy 5 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 3 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("shields:shield_wood", { + description = S("Wooden Shield"), + inventory_image = "shields_inv_shield_wood.png", + groups = {armor_shield=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + }) + --- Enhanced Wood Shield + -- + -- @shield shields:shield_enhanced_wood + -- @img shields_inv_shield_enhanced_wood.png + -- @grp armor_shield 1 + -- @grp armor_heal 0 + -- @grp armor_use 2000 + -- @armorgrp fleshy 8 + -- @damagegrp cracky 3 + -- @damagegrp snappy 2 + -- @damagegrp choppy 3 + -- @damagegrp crumbly 2 + -- @damagegrp level 2 + armor:register_armor("shields:shield_enhanced_wood", { + description = S("Enhanced Wood Shield"), + inventory_image = "shields_inv_shield_enhanced_wood.png", + groups = {armor_shield=1, armor_heal=0, armor_use=2000}, + armor_groups = {fleshy=8}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) + minetest.register_craft({ + output = "shields:shield_enhanced_wood", + recipe = { + {"default:steel_ingot"}, + {"shields:shield_wood"}, + {"default:steel_ingot"}, + }, + }) + minetest.register_craft({ + type = "fuel", + recipe = "shields:shield_wood", + burntime = 8, + }) +end + +if armor.materials.cactus then + --- Cactus Shield + -- + -- @shield shields:shield_cactus + -- @img shields_inv_shield_cactus.png + -- @grp armor_shield 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @armorgrp fleshy 5 + -- @damagegrp cracky 3 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 2 + -- @damagegrp level 1 + armor:register_armor("shields:shield_cactus", { + description = S("Cactus Shield"), + inventory_image = "shields_inv_shield_cactus.png", + groups = {armor_shield=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_wood_footstep") + end, + }) + --- Enhanced Cactus Shield + -- + -- @shield shields:shield_enhanced_cactus + -- @img shields_inv_shield_enhanced_cactus.png + -- @grp armor_shield 1 + -- @grp armor_heal 0 + -- @grp armor_use 1000 + -- @armorgrp fleshy 8 + -- @damagegrp cracky 3 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 2 + -- @damagegrp level 2 + armor:register_armor("shields:shield_enhanced_cactus", { + description = S("Enhanced Cactus Shield"), + inventory_image = "shields_inv_shield_enhanced_cactus.png", + groups = {armor_shield=1, armor_heal=0, armor_use=1000}, + armor_groups = {fleshy=8}, + damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) + minetest.register_craft({ + output = "shields:shield_enhanced_cactus", + recipe = { + {"default:steel_ingot"}, + {"shields:shield_cactus"}, + {"default:steel_ingot"}, + }, + }) + minetest.register_craft({ + type = "fuel", + recipe = "shields:shield_cactus", + burntime = 16, + }) +end + +if armor.materials.steel then + --- Steel Shield + -- + -- @shield shields:shield_steel + -- @img shields_inv_shield_steel.png + -- @grp armor_shield 1 + -- @grp armor_heal 0 + -- @grp armor_use 800 + -- @grp physics_speed -0.03 + -- @grp physics_gravity 0.03 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 2 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("shields:shield_steel", { + description = S("Steel Shield"), + inventory_image = "shields_inv_shield_steel.png", + groups = {armor_shield=1, armor_heal=0, armor_use=800, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) +end + +if armor.materials.bronze then + --- Bronze Shield + -- + -- @shield shields:shield_bronze + -- @img shields_inv_shield_bronze.png + -- @grp armor_shield 1 + -- @grp armor_heal 6 + -- @grp armor_use 400 + -- @grp physics_speed -0.03 + -- @grp physics_gravity 0.03 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 2 + -- @damagegrp snappy 3 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 1 + -- @damagegrp level 2 + armor:register_armor("shields:shield_bronze", { + description = S("Bronze Shield"), + inventory_image = "shields_inv_shield_bronze.png", + groups = {armor_shield=1, armor_heal=6, armor_use=400, + physics_speed=-0.03, physics_gravity=0.03}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) +end + +if armor.materials.diamond then + --- Diamond Shield + -- + -- @shield shields:shield_diamond + -- @img shields_inv_shield_diamond.png + -- @grp armor_shield 1 + -- @grp armor_heal 12 + -- @grp armor_use 200 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp choppy 1 + -- @damagegrp level 3 + armor:register_armor("shields:shield_diamond", { + description = S("Diamond Shield"), + inventory_image = "shields_inv_shield_diamond.png", + groups = {armor_shield=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_glass_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_break_glass") + end, + }) +end + +if armor.materials.gold then + --- Gold Shield + -- + -- @shield shields:shield_gold + -- @img shields_inv_shield_gold.png + -- @grp armor_shield 1 + -- @grp armor_heal 6 + -- @grp armor_use 300 + -- @grp physics_speed -0.04 + -- @grp physics_gravity 0.04 + -- @armorgrp fleshy 10 + -- @damagegrp cracky 1 + -- @damagegrp snappy 2 + -- @damagegrp choppy 2 + -- @damagegrp crumbly 3 + -- @damagegrp level 2 + armor:register_armor("shields:shield_gold", { + description = S("Gold Shield"), + inventory_image = "shields_inv_shield_gold.png", + groups = {armor_shield=1, armor_heal=6, armor_use=300, + physics_speed=-0.04, physics_gravity=0.04}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_dig_metal") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_dug_metal") + end, + }) +end + +if armor.materials.mithril then + --- Mithril Shield + -- + -- @shield shields:shield_mithril + -- @img shields_inv_shield_mithril.png + -- @grp armor_shield 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("shields:shield_mithril", { + description = S("Mithril Shield"), + inventory_image = "shields_inv_shield_mithril.png", + groups = {armor_shield=1, armor_heal=12, armor_use=100}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_glass_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_break_glass") + end, + }) +end + +if armor.materials.crystal then + --- Crystal Shield + -- + -- @shield shields:shield_crystal + -- @img shields_inv_shield_crystal.png + -- @grp armor_shield 1 + -- @grp armor_heal 12 + -- @grp armor_use 100 + -- @grp armor_fire 1 + -- @armorgrp fleshy 15 + -- @damagegrp cracky 2 + -- @damagegrp snappy 1 + -- @damagegrp level 3 + armor:register_armor("shields:shield_crystal", { + description = S("Crystal Shield"), + inventory_image = "shields_inv_shield_crystal.png", + groups = {armor_shield=1, armor_heal=12, armor_use=100, armor_fire=1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + reciprocate_damage = true, + on_damage = function(player, index, stack) + play_sound_effect(player, "default_glass_footstep") + end, + on_destroy = function(player, index, stack) + play_sound_effect(player, "default_break_glass") + end, + }) +end + +for k, v in pairs(armor.materials) do + minetest.register_craft({ + output = "shields:shield_"..k, + recipe = { + {v, v, v}, + {v, v, v}, + {"", v, ""}, + }, + }) +end diff --git a/mods/3d_armor/shields/locale/shields.fr.tr b/mods/3d_armor/shields/locale/shields.fr.tr new file mode 100644 index 0000000..730c9bf --- /dev/null +++ b/mods/3d_armor/shields/locale/shields.fr.tr @@ -0,0 +1,16 @@ +# textdomain: shields + + +### init.lua ### + +Admin Shield=Bouclier d'admin +Bronze Shield=Bouclier en bronze +Cactus Shield=Bouclier en cactus +Crystal Shield=Bouclier en cristal +Diamond Shield=Bouclier en diamant +Enhanced Cactus Shield=Bouclier en cactus amélioré +Enhanced Wood Shield=Bouclier en bois amélioré +Gold Shield=Bouclier en or +Mithril Shield=Bouclier en mithril +Steel Shield=Bouclier en acier +Wooden Shield=Bouclier en bois diff --git a/mods/3d_armor/shields/locale/template.txt b/mods/3d_armor/shields/locale/template.txt new file mode 100644 index 0000000..ecaffd7 --- /dev/null +++ b/mods/3d_armor/shields/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: shields + + +### init.lua ### + +Admin Shield= +Bronze Shield= +Cactus Shield= +Crystal Shield= +Diamond Shield= +Enhanced Cactus Shield= +Enhanced Wood Shield= +Gold Shield= +Mithril Shield= +Steel Shield= +Wooden Shield= diff --git a/mods/3d_armor/shields/mod.conf b/mods/3d_armor/shields/mod.conf new file mode 100644 index 0000000..9a95629 --- /dev/null +++ b/mods/3d_armor/shields/mod.conf @@ -0,0 +1,3 @@ +name = shields +depends = default, 3d_armor +description = Adds visible shields to 3d armor. diff --git a/mods/3d_armor/shields/textures/preview_index.txt b/mods/3d_armor/shields/textures/preview_index.txt new file mode 100644 index 0000000..4408c61 --- /dev/null +++ b/mods/3d_armor/shields/textures/preview_index.txt @@ -0,0 +1,11 @@ +shields/textures/shields_shield_wood.png:shield +shields/textures/shields_shield_enhanced_wood.png:shield +shields/textures/shields_shield_cactus.png:shield +shields/textures/shields_shield_enhanced_cactus.png:shield +shields/textures/shields_shield_steel.png:shield +shields/textures/shields_shield_bronze.png:shield +shields/textures/shields_shield_gold.png:shield +shields/textures/shields_shield_diamond.png:shield +shields/textures/shields_shield_mithril.png:shield +shields/textures/shields_shield_crystal.png:shield +shields/textures/shields_shield_admin.png:shield diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_admin.png b/mods/3d_armor/shields/textures/shields_inv_shield_admin.png new file mode 100644 index 0000000..7ec86c4 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_admin.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_bronze.png b/mods/3d_armor/shields/textures/shields_inv_shield_bronze.png new file mode 100755 index 0000000..5faccc7 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_bronze.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_cactus.png b/mods/3d_armor/shields/textures/shields_inv_shield_cactus.png new file mode 100755 index 0000000..c64d79e Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_cactus.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_crystal.png b/mods/3d_armor/shields/textures/shields_inv_shield_crystal.png new file mode 100755 index 0000000..e40de8f Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_crystal.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_diamond.png b/mods/3d_armor/shields/textures/shields_inv_shield_diamond.png new file mode 100755 index 0000000..2a04317 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_diamond.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png b/mods/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png new file mode 100644 index 0000000..45cf71f Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png b/mods/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png new file mode 100644 index 0000000..945f84f Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_gold.png b/mods/3d_armor/shields/textures/shields_inv_shield_gold.png new file mode 100755 index 0000000..33510db Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_gold.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_mithril.png b/mods/3d_armor/shields/textures/shields_inv_shield_mithril.png new file mode 100755 index 0000000..3c30396 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_mithril.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_steel.png b/mods/3d_armor/shields/textures/shields_inv_shield_steel.png new file mode 100755 index 0000000..1777fef Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_steel.png differ diff --git a/mods/3d_armor/shields/textures/shields_inv_shield_wood.png b/mods/3d_armor/shields/textures/shields_inv_shield_wood.png new file mode 100755 index 0000000..8dbc2dd Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_inv_shield_wood.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_admin.png b/mods/3d_armor/shields/textures/shields_shield_admin.png new file mode 100644 index 0000000..1259272 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_admin.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_admin_preview.png b/mods/3d_armor/shields/textures/shields_shield_admin_preview.png new file mode 100644 index 0000000..f37efd5 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_admin_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_bronze.png b/mods/3d_armor/shields/textures/shields_shield_bronze.png new file mode 100644 index 0000000..e3a7ad4 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_bronze.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_bronze_preview.png b/mods/3d_armor/shields/textures/shields_shield_bronze_preview.png new file mode 100644 index 0000000..8450130 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_bronze_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_cactus.png b/mods/3d_armor/shields/textures/shields_shield_cactus.png new file mode 100644 index 0000000..8c69d76 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_cactus.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_cactus_preview.png b/mods/3d_armor/shields/textures/shields_shield_cactus_preview.png new file mode 100644 index 0000000..ab2a531 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_cactus_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_crystal.png b/mods/3d_armor/shields/textures/shields_shield_crystal.png new file mode 100644 index 0000000..1ee039d Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_crystal.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_crystal_preview.png b/mods/3d_armor/shields/textures/shields_shield_crystal_preview.png new file mode 100644 index 0000000..8a32c8b Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_crystal_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_diamond.png b/mods/3d_armor/shields/textures/shields_shield_diamond.png new file mode 100644 index 0000000..5bbb4fc Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_diamond.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_diamond_preview.png b/mods/3d_armor/shields/textures/shields_shield_diamond_preview.png new file mode 100644 index 0000000..78e69e6 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_diamond_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_enhanced_cactus.png b/mods/3d_armor/shields/textures/shields_shield_enhanced_cactus.png new file mode 100644 index 0000000..980c4f1 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_enhanced_cactus.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png b/mods/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png new file mode 100644 index 0000000..4b85f48 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_enhanced_wood.png b/mods/3d_armor/shields/textures/shields_shield_enhanced_wood.png new file mode 100644 index 0000000..f87cf65 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_enhanced_wood.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png b/mods/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png new file mode 100644 index 0000000..52ba7eb Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_gold.png b/mods/3d_armor/shields/textures/shields_shield_gold.png new file mode 100644 index 0000000..09fa339 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_gold.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_gold_preview.png b/mods/3d_armor/shields/textures/shields_shield_gold_preview.png new file mode 100644 index 0000000..4337544 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_gold_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_mithril.png b/mods/3d_armor/shields/textures/shields_shield_mithril.png new file mode 100644 index 0000000..38558c4 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_mithril.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_mithril_preview.png b/mods/3d_armor/shields/textures/shields_shield_mithril_preview.png new file mode 100644 index 0000000..e5ca987 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_mithril_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_steel.png b/mods/3d_armor/shields/textures/shields_shield_steel.png new file mode 100644 index 0000000..108dffe Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_steel.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_steel_preview.png b/mods/3d_armor/shields/textures/shields_shield_steel_preview.png new file mode 100644 index 0000000..301a149 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_steel_preview.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_wood.png b/mods/3d_armor/shields/textures/shields_shield_wood.png new file mode 100644 index 0000000..8cc5b85 Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_wood.png differ diff --git a/mods/3d_armor/shields/textures/shields_shield_wood_preview.png b/mods/3d_armor/shields/textures/shields_shield_wood_preview.png new file mode 100644 index 0000000..c22465e Binary files /dev/null and b/mods/3d_armor/shields/textures/shields_shield_wood_preview.png differ diff --git a/mods/abriglass/README.md b/mods/abriglass/README.md new file mode 100644 index 0000000..076dd1f --- /dev/null +++ b/mods/abriglass/README.md @@ -0,0 +1,41 @@ +abriglass +=== + +Stained glass Minetest mod by Shara RedCat which adds: + +1. Coloured glass. +2. Patterned stained glass. +3. Glass lights. +4. One way windows. +5. Portholes. +6. Hidden light node. + + +Crafting +--------- + +Plain abriglass can be crafted using default glass. Coloured glass can then be made using this and dye. + +Glass lights can be crafted using glass, dye and torches. + +Patterned glass can be crafted using combinations of coloured glass. + +One way windows can be crafted using their wall type, glass and a mese crystal fragment. + +Hidden light is not in the inventory, has no recipes and can only be acquired through commands. This is an invisible node which can be walked through and is intended to provide gentle lighting in areas where regular lighting may be undesirable. + +Special thanks to agaran for assisting with the recipes. + + +Licenses and Attribution +----------------------- + +Code for this mod is released under MIT (https://opensource.org/licenses/MIT). + +Textures for this mod are released under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/), attribution: Shara RedCat. + + +Recommended Additions +----------------------- + +- [abriflame](https://github.com/Ezhh/abriflame) allows coloured flames to be lit on coloured glass nodes. \ No newline at end of file diff --git a/mods/abriglass/crafting.lua b/mods/abriglass/crafting.lua new file mode 100644 index 0000000..e2d6f70 --- /dev/null +++ b/mods/abriglass/crafting.lua @@ -0,0 +1,210 @@ + +-- clear glass recipe +minetest.register_craft({ + output = 'abriglass:clear_glass 4', -- intentional lower yield + recipe = { + {'default:glass', '', 'default:glass' }, + {'', 'default:glass', '' }, + {'default:glass', '', 'default:glass' }, + } +}) + + +-- glass light recipes +local plain_colors = { + "green", "blue", "red", "yellow", +} + +local i +for i in ipairs(plain_colors) do + local name = plain_colors[i] + local nodesuffix = 'glass_light_'..name + + minetest.register_craft({ + output = 'abriglass:'..nodesuffix..' 4', + recipe = { + {'abriglass:clear_glass', 'default:torch', 'abriglass:clear_glass' }, + {'abriglass:clear_glass', 'dye:'..name, 'abriglass:clear_glass' }, + } + }) + + minetest.register_craft({ + type = "cooking", + recipe = "abriglass:"..nodesuffix, + output = "abriglass:clear_glass", + }) +end + + +-- undecorated coloured glass recipes +local dye_list = { + {"black", "black",}, + {"blue", "blue",}, + {"cyan", "cyan",}, + {"green", "green",}, + {"magenta", "magenta",}, + {"orange", "orange",}, + {"purple", "violet",}, + {"red", "red",}, + {"yellow", "yellow",}, + {"frosted", "white",}, +} + +for i in ipairs(dye_list) do + local name = dye_list[i][1] + local dye = dye_list[i][2] + + minetest.register_craft({ + output = 'abriglass:stained_glass_'..name..' 6', + recipe = { + {'abriglass:clear_glass', '', 'abriglass:clear_glass' }, + {'abriglass:clear_glass', 'dye:'..dye, 'abriglass:clear_glass' }, + {'abriglass:clear_glass', '', 'abriglass:clear_glass' }, + } + }) + + minetest.register_craft({ + type = "cooking", + recipe = "abriglass:stained_glass_"..name, + output = "abriglass:clear_glass", + }) +end + + +-- patterned glass recipes +minetest.register_craft({ + output = 'abriglass:stainedglass_pattern01 9', + recipe = { + {'abriglass:stained_glass_yellow', 'abriglass:stained_glass_yellow', 'abriglass:stained_glass_yellow' }, + {'abriglass:stained_glass_yellow', 'abriglass:stained_glass_blue', 'abriglass:stained_glass_yellow' }, + {'abriglass:stained_glass_yellow', 'abriglass:stained_glass_yellow', 'abriglass:stained_glass_yellow' }, + } +}) + +minetest.register_craft({ + output = 'abriglass:stainedglass_pattern02 9', + recipe = { + {'abriglass:clear_glass', 'abriglass:clear_glass', 'abriglass:clear_glass' }, + {'abriglass:clear_glass', 'abriglass:clear_glass', 'abriglass:clear_glass' }, + {'abriglass:clear_glass', 'abriglass:clear_glass', 'abriglass:clear_glass' }, + } +}) + +minetest.register_craft({ + output = 'abriglass:stainedglass_pattern03 9', + recipe = { + {'abriglass:stained_glass_red', 'abriglass:clear_glass', 'abriglass:stained_glass_red' }, + {'abriglass:clear_glass', 'abriglass:clear_glass', 'abriglass:clear_glass' }, + {'abriglass:stained_glass_red', 'abriglass:clear_glass', 'abriglass:stained_glass_red' }, + } +}) + +minetest.register_craft({ + output = 'abriglass:stainedglass_pattern04 9', + recipe = { + {'abriglass:stained_glass_green', 'abriglass:stained_glass_red', 'abriglass:stained_glass_green' }, + {'abriglass:stained_glass_red', 'abriglass:stained_glass_blue', 'abriglass:stained_glass_red' }, + {'abriglass:stained_glass_green', 'abriglass:stained_glass_red', 'abriglass:stained_glass_green' }, + } +}) + +minetest.register_craft({ + output = 'abriglass:stainedglass_pattern05 9', + recipe = { + {'abriglass:stained_glass_blue', 'abriglass:stained_glass_blue', 'abriglass:stained_glass_blue' }, + {'abriglass:stained_glass_blue', 'abriglass:stained_glass_green', 'abriglass:stained_glass_blue' }, + {'abriglass:stained_glass_blue', 'abriglass:stained_glass_blue', 'abriglass:stained_glass_blue' }, + } +}) + +minetest.register_craft({ + output = 'abriglass:stainedglass_tiles_dark 7', + recipe = { + {'abriglass:stained_glass_red', 'abriglass:stained_glass_green', 'abriglass:stained_glass_blue' }, + {'abriglass:stained_glass_yellow', 'abriglass:stained_glass_magenta', 'abriglass:stained_glass_cyan' }, + {'', 'abriglass:stained_glass_black', '' }, + } +}) + +minetest.register_craft({ + output = 'abriglass:stainedglass_tiles_pale 7', + recipe = { + {'abriglass:stained_glass_red', 'abriglass:stained_glass_green', 'abriglass:stained_glass_blue' }, + {'abriglass:stained_glass_yellow', 'abriglass:stained_glass_magenta', 'abriglass:stained_glass_cyan' }, + {'', 'abriglass:stained_glass_frosted', '' }, + } +}) + + +-- cooking recipes +local cook_list = { "stainedglass_pattern01", "stainedglass_pattern02", "stainedglass_pattern03", "stainedglass_pattern04", "stainedglass_pattern05", "stainedglass_tiles_dark", "stainedglass_tiles_pale"} + +for i = 1, #cook_list do + local name = cook_list[i] + + minetest.register_craft({ + type = "cooking", + recipe = "abriglass:"..name, + output = "abriglass:clear_glass", + }) +end + + +-- porthole recipes +local port_recipes = { + {"wood",}, {"junglewood",}, +} + +for i in ipairs(port_recipes) do + local name = port_recipes[i][1] + + minetest.register_craft({ + output = "abriglass:porthole_"..name.." 4", + recipe = { + {"default:glass", "", "default:glass",}, + {"default:"..name, "", "default:steel_ingot",}, + {"default:glass", "", "default:glass",}, + } + }) +end + + +-- one-way recipes +local oneway_recipe_list = { + {"abriglass:oneway_glass_desert_brick", "default:desert_stonebrick",}, + {"abriglass:oneway_glass_stone_brick", "default:stonebrick",}, + {"abriglass:oneway_glass_sandstone_brick", "default:sandstonebrick",}, + {"abriglass:oneway_glass_dark", "abriglass:oneway_wall_dark",}, + {"abriglass:oneway_glass_pale", "abriglass:oneway_wall_pale",}, +} + +for i in ipairs(oneway_recipe_list) do + local name = oneway_recipe_list[i][1] + local ingredient = oneway_recipe_list[i][2] + + minetest.register_craft({ + output = name.." 2", + recipe = { + {'abriglass:clear_glass', 'default:mese_crystal_fragment', ingredient }, + } + }) +end + +minetest.register_craft({ + output = 'abriglass:oneway_wall_dark 2', + recipe = { + {'default:clay_lump', 'default:clay_lump', 'default:clay_lump'}, + {'default:clay_lump', 'dye:black', 'default:clay_lump'}, + {'default:clay_lump', 'default:clay_lump', 'default:clay_lump'}, + } +}) + +minetest.register_craft({ + output = 'abriglass:oneway_wall_pale 2', + recipe = { + {'default:clay_lump', 'default:clay_lump', 'default:clay_lump'}, + {'default:clay_lump', 'dye:white', 'default:clay_lump'}, + {'default:clay_lump', 'default:clay_lump', 'default:clay_lump'}, + } +}) + diff --git a/mods/abriglass/depends.txt b/mods/abriglass/depends.txt new file mode 100644 index 0000000..2717bef --- /dev/null +++ b/mods/abriglass/depends.txt @@ -0,0 +1,2 @@ +default +dye diff --git a/mods/abriglass/description.txt b/mods/abriglass/description.txt new file mode 100644 index 0000000..9648ac4 --- /dev/null +++ b/mods/abriglass/description.txt @@ -0,0 +1 @@ +Adds coloured glass, patterned stained glass, glass lights and one way windows. \ No newline at end of file diff --git a/mods/abriglass/init.lua b/mods/abriglass/init.lua new file mode 100644 index 0000000..b228f99 --- /dev/null +++ b/mods/abriglass/init.lua @@ -0,0 +1,6 @@ +local modpath = minetest.get_modpath("abriglass").. DIR_DELIM + +abriglass = {} + +dofile(modpath.."nodes.lua") +dofile(modpath.."crafting.lua") diff --git a/mods/abriglass/intllib.lua b/mods/abriglass/intllib.lua new file mode 100755 index 0000000..6669d72 --- /dev/null +++ b/mods/abriglass/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/abriglass/license.txt b/mods/abriglass/license.txt new file mode 100644 index 0000000..d98d3a2 --- /dev/null +++ b/mods/abriglass/license.txt @@ -0,0 +1,8 @@ + +Textures: +CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/) +Attribution: Shara RedCat + +Code: +License: MIT (https://opensource.org/licenses/MIT) +By Shara RedCat \ No newline at end of file diff --git a/mods/abriglass/locale/es.po b/mods/abriglass/locale/es.po new file mode 100644 index 0000000..10ae23d --- /dev/null +++ b/mods/abriglass/locale/es.po @@ -0,0 +1,130 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-14 08:34+0200\n" +"PO-Revision-Date: 2018-10-29 18:01+0100\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 1.8.11\n" + +#: nodes.lua +msgid "Darkened" +msgstr "Oscurecido" + +#: nodes.lua +msgid "Cyan" +msgstr "azul claro" + +#: nodes.lua +msgid "Magenta" +msgstr "rosa fucsia" + +#: nodes.lua +msgid "Purple" +msgstr "violeta" + +#: nodes.lua +msgid "Yellow" +msgstr "amarillo" + +#: nodes.lua +msgid "Blue" +msgstr "azul" + +#: nodes.lua +msgid "Green" +msgstr "verde" + +#: nodes.lua +msgid "Orange" +msgstr "naranja" + +#: nodes.lua +msgid "Red" +msgstr "rojo" + +#: nodes.lua +msgid "Frosted" +msgstr "mate" + +#: nodes.lua +msgid "Glass " +msgstr "Vidrio " + +#: nodes.lua +msgid "Glass Light " +msgstr "Vidrio luminoso " + +#: nodes.lua +msgid "Clear Glass" +msgstr "Vidrio incoloro" + +#: nodes.lua +msgid "Porthole" +msgstr "Mirilla" + +#: nodes.lua +msgid "Stained Glass" +msgstr "Vidriera de colores" + +#: nodes.lua +msgid "Cage Glass" +msgstr "Vidrio de jaula" + +#: nodes.lua +msgid "Stained Glass Cross" +msgstr "Cruz de vitral" + +#: nodes.lua +msgid "Dark" +msgstr "oscuro" + +#: nodes.lua +msgid "White" +msgstr "blanco" + +#: nodes.lua +msgid "Desert Brick" +msgstr "de ladrillo del desierto" + +#: nodes.lua +msgid "Stone Brick" +msgstr "de ladrillo cerámico" + +#: nodes.lua +msgid "Sandstone Brick" +msgstr "de ladrillo de arenisca" + +#: nodes.lua +msgid "White" +msgstr "blanco" + +#: nodes.lua +msgid "Stained Glass Cross" +msgstr "Cruz de vitral" + +#: nodes.lua +msgid "Dark Block" +msgstr "Bloque oscuro" + +#: nodes.lua +msgid "Pale Block" +msgstr "Bloque pálido" + +#: nodes.lua +msgid "Ghost Crystal" +msgstr "Cristal fantasmal" + +#: nodes.lua +msgid "One-Way Glass " +msgstr "Vidrio unidireccional " \ No newline at end of file diff --git a/mods/abriglass/mod.conf b/mods/abriglass/mod.conf new file mode 100644 index 0000000..7afc048 --- /dev/null +++ b/mods/abriglass/mod.conf @@ -0,0 +1 @@ +name = abriglass \ No newline at end of file diff --git a/mods/abriglass/nodes.lua b/mods/abriglass/nodes.lua new file mode 100644 index 0000000..4dda3ad --- /dev/null +++ b/mods/abriglass/nodes.lua @@ -0,0 +1,220 @@ +-- Load support for intllib. +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP .. "/intllib.lua") + +-- undecorated coloured glass, all using plain glass texture +local glass_list = { + {"black", S("Darkened"), "292421",}, {"blue", S("Blue"), "0000FF",}, + {"cyan", S("Cyan"), "00FFFF",}, {"green", S("Green"), "00FF00",}, + {"magenta", S("Magenta"), "FF00FF",}, {"orange", S("Orange"), "FF6103",}, + {"purple", S("Purple"), "800080",}, {"red", S("Red"), "FF0000",}, + {"yellow", S("Yellow"), "FFFF00",}, {"frosted", S("Frosted"), "FFFFFF",} +} + +for i in ipairs(glass_list) do + local name = glass_list[i][1] + local description = glass_list[i][2] + local colour = glass_list[i][3] + + minetest.register_node("abriglass:stained_glass_"..name, { + description = S("Glass ")..description, + tiles = {"abriglass_plainglass.png^[colorize:#"..colour..":122"}, + groups = {cracky = 3}, + use_texture_alpha = true, + sunlight_propagates = true, + light_source = 4, + drawtype = "glasslike", + paramtype = "light", + sounds = default.node_sound_glass_defaults(), + }) +end + + +-- boring glass because why not? +minetest.register_node("abriglass:clear_glass", { + description = S("Clear Glass"), + tiles = {"abriglass_clearglass.png"}, + groups = {cracky = 3}, + use_texture_alpha = true, + sunlight_propagates = true, + paramtype = "light", + drawtype = "glasslike", + sounds = default.node_sound_glass_defaults(), +}) + + +-- glass lights +local light_list = { + {"glass_light_green", S("Green"), "lightgreen",}, + {"glass_light_blue", S("Blue"), "lightblue",}, + {"glass_light_red", S("Red"), "lightred",}, + {"glass_light_yellow", S("Yellow"), "lightyellow",}, +} + +for i in ipairs(light_list) do + local name = light_list[i][1] + local description = light_list[i][2] + local image = light_list[i][3] + + minetest.register_node("abriglass:" ..name, { + description = S("Glass Light ")..description, + tiles = {"abriglass_" ..image.. ".png"}, + groups = {cracky = 3}, + use_texture_alpha = true, + sunlight_propagates = true, + light_source = 14, + drawtype = "glasslike", + paramtype = "light", + sounds = default.node_sound_glass_defaults(), + }) +end + + +-- patterned glass +local pattern_list = { --{name, description, image} + {"stainedglass_tiles_dark", S("Stained Glass"), "stainedglass_tiles1",}, + {"stainedglass_tiles_pale", S("Stained Glass"), "stainedglass_tiles2",}, + {"stainedglass_pattern01", S("Stained Glass"), "stainedglass_pattern01",}, + {"stainedglass_pattern02", S("Cage Glass"), "stainedglass_pattern02",}, + {"stainedglass_pattern03", S("Stained Glass"), "stainedglass_pattern03",}, + {"stainedglass_pattern04", S("Stained Glass Cross"), "stainedglass_pattern04",}, + {"stainedglass_pattern05", S("Stained Glass"), "stainedglass_pattern05",}, +} + +for i in ipairs(pattern_list) do + local name = pattern_list[i][1] + local description = pattern_list[i][2] + local image = pattern_list[i][3] + + minetest.register_node("abriglass:"..name, { + description = description, + tiles = {"abriglass_"..image..".png"}, + groups = {cracky = 3}, + use_texture_alpha = true, + sunlight_propagates = true, + light_source = 5, + drawtype = "glasslike", + paramtype = "light", + paramtype2 = "facedir", + sounds = default.node_sound_glass_defaults(), + }) +end + + +-- portholes +local port_list = { + {"wood",}, {"junglewood",}, +} + +for i in ipairs(port_list) do + local name = port_list[i][1] + + minetest.register_node("abriglass:porthole_"..name, { + description = S("Porthole"), + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + groups = {choppy = 2, flammable = 2, wood = 1}, + tiles = {"default_"..name.. ".png", -- up + "default_"..name.. ".png", -- down + "default_"..name.. ".png", -- right + "default_"..name.. ".png", -- left + "abriglass_porthole_"..name..".png", -- back + "abriglass_porthole_"..name..".png", -- front + }, + is_ground_content = false, + sunlight_propagates = true, + }) +end + + +-- one-way glass +local oneway_list = { + {"dark", S("Dark"), "oneway_face.png", "abriglass_oneway_wall.png",}, + {"pale", S("White"), "oneway_face.png^[colorize:#F8F8FF:200", "abriglass_oneway_wall.png^[colorize:#E6E6FA:200",}, + {"desert_brick", S("Desert Brick"), "oneway_face.png^[colorize:#814F3C:200", "default_desert_stone_brick.png",}, + {"stone_brick", S("Stone Brick"), "oneway_face.png^[colorize:#615E5D:200", "default_stone_brick.png",}, + {"sandstone_brick", S("Sandstone Brick"), "oneway_face.png^[colorize:#FFF9C5:200", "default_sandstone_brick.png",}, +} + +for i in ipairs(oneway_list) do + local name = oneway_list[i][1] + local description = oneway_list[i][2] + local image1 = oneway_list[i][3] + local image2 = oneway_list[i][4] + + minetest.register_node("abriglass:oneway_glass_"..name, { + description = S("One-Way Glass ")..description, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + groups = {cracky = 3}, + tiles = {"abriglass_oneway_plain_glass.png", -- up + "abriglass_oneway_plain_glass.png", -- down + "abriglass_oneway_plain_glass.png", -- right + "abriglass_oneway_plain_glass.png", -- left + "abriglass_"..image1, -- back + image2, -- front + }, + is_ground_content = false, + sunlight_propagates = true, + inventory_image = minetest.inventorycube("abriglass_"..image1) + }) +end + + +-- normal nodes to match one-way glass +minetest.register_node("abriglass:oneway_wall_dark", { + description = S("Dark Block"), + tiles = {"abriglass_oneway_wall.png"}, + groups = {cracky = 3}, + paramtype2 = "facedir", +}) + +minetest.register_node("abriglass:oneway_wall_pale", { + description = S("Pale Block"), + tiles = {"abriglass_oneway_wall.png^[colorize:#E6E6FA:200"}, + groups = {cracky = 3}, + paramtype2 = "facedir", +}) + + +-- crystal, for later use in crafting recipes +minetest.register_node("abriglass:ghost_crystal", { + description = S("Ghost Crystal"), + tiles = {"abriglass_ghost_crystal.png"}, + wield_image = "abriglass_ghost_crystal_wield.png", + groups = {cracky = 3}, + use_texture_alpha = true, + sunlight_propagates = true, + light_source = 14, + drawtype = "glasslike", + paramtype = "light", + sounds = default.node_sound_glass_defaults(), +}) + + +-- hidden light node +minetest.register_node("abriglass:hidden_light", { + description = "Hidden Light", + tiles = {"abriglass_oneway_plain_glass.png"}, + groups = {cracky = 3, not_in_creative_inventory=1}, + use_texture_alpha = true, + sunlight_propagates = true, + walkable = false, + light_source = 7, + drawtype = "glasslike", + paramtype = "light", +}) diff --git a/mods/abriglass/screenshot.png b/mods/abriglass/screenshot.png new file mode 100644 index 0000000..0c9071e Binary files /dev/null and b/mods/abriglass/screenshot.png differ diff --git a/mods/abriglass/textures/abriglass_clearglass.png b/mods/abriglass/textures/abriglass_clearglass.png new file mode 100644 index 0000000..4d7cc36 Binary files /dev/null and b/mods/abriglass/textures/abriglass_clearglass.png differ diff --git a/mods/abriglass/textures/abriglass_ghost_crystal.png b/mods/abriglass/textures/abriglass_ghost_crystal.png new file mode 100644 index 0000000..1754a0f Binary files /dev/null and b/mods/abriglass/textures/abriglass_ghost_crystal.png differ diff --git a/mods/abriglass/textures/abriglass_ghost_crystal_wield.png b/mods/abriglass/textures/abriglass_ghost_crystal_wield.png new file mode 100644 index 0000000..1e7f42a Binary files /dev/null and b/mods/abriglass/textures/abriglass_ghost_crystal_wield.png differ diff --git a/mods/abriglass/textures/abriglass_lightblue.png b/mods/abriglass/textures/abriglass_lightblue.png new file mode 100644 index 0000000..a53e532 Binary files /dev/null and b/mods/abriglass/textures/abriglass_lightblue.png differ diff --git a/mods/abriglass/textures/abriglass_lightgreen.png b/mods/abriglass/textures/abriglass_lightgreen.png new file mode 100644 index 0000000..3655f55 Binary files /dev/null and b/mods/abriglass/textures/abriglass_lightgreen.png differ diff --git a/mods/abriglass/textures/abriglass_lightred.png b/mods/abriglass/textures/abriglass_lightred.png new file mode 100644 index 0000000..4a128ae Binary files /dev/null and b/mods/abriglass/textures/abriglass_lightred.png differ diff --git a/mods/abriglass/textures/abriglass_lightyellow.png b/mods/abriglass/textures/abriglass_lightyellow.png new file mode 100644 index 0000000..8864693 Binary files /dev/null and b/mods/abriglass/textures/abriglass_lightyellow.png differ diff --git a/mods/abriglass/textures/abriglass_obsidian_glass_detail.png b/mods/abriglass/textures/abriglass_obsidian_glass_detail.png new file mode 100644 index 0000000..a8bbec9 Binary files /dev/null and b/mods/abriglass/textures/abriglass_obsidian_glass_detail.png differ diff --git a/mods/abriglass/textures/abriglass_oneway_face.png b/mods/abriglass/textures/abriglass_oneway_face.png new file mode 100644 index 0000000..38d1db7 Binary files /dev/null and b/mods/abriglass/textures/abriglass_oneway_face.png differ diff --git a/mods/abriglass/textures/abriglass_oneway_plain_glass.png b/mods/abriglass/textures/abriglass_oneway_plain_glass.png new file mode 100644 index 0000000..77981ca Binary files /dev/null and b/mods/abriglass/textures/abriglass_oneway_plain_glass.png differ diff --git a/mods/abriglass/textures/abriglass_oneway_wall.png b/mods/abriglass/textures/abriglass_oneway_wall.png new file mode 100644 index 0000000..fbcc08a Binary files /dev/null and b/mods/abriglass/textures/abriglass_oneway_wall.png differ diff --git a/mods/abriglass/textures/abriglass_plainglass.png b/mods/abriglass/textures/abriglass_plainglass.png new file mode 100644 index 0000000..ab7a73b Binary files /dev/null and b/mods/abriglass/textures/abriglass_plainglass.png differ diff --git a/mods/abriglass/textures/abriglass_porthole_junglewood.png b/mods/abriglass/textures/abriglass_porthole_junglewood.png new file mode 100644 index 0000000..02c7123 Binary files /dev/null and b/mods/abriglass/textures/abriglass_porthole_junglewood.png differ diff --git a/mods/abriglass/textures/abriglass_porthole_wood.png b/mods/abriglass/textures/abriglass_porthole_wood.png new file mode 100644 index 0000000..25d5ec5 Binary files /dev/null and b/mods/abriglass/textures/abriglass_porthole_wood.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_pattern01.png b/mods/abriglass/textures/abriglass_stainedglass_pattern01.png new file mode 100644 index 0000000..76fca89 Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_pattern01.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_pattern02.png b/mods/abriglass/textures/abriglass_stainedglass_pattern02.png new file mode 100644 index 0000000..b40fb51 Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_pattern02.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_pattern03.png b/mods/abriglass/textures/abriglass_stainedglass_pattern03.png new file mode 100644 index 0000000..486acb7 Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_pattern03.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_pattern04.png b/mods/abriglass/textures/abriglass_stainedglass_pattern04.png new file mode 100644 index 0000000..4a9a238 Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_pattern04.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_pattern05.png b/mods/abriglass/textures/abriglass_stainedglass_pattern05.png new file mode 100644 index 0000000..00d3107 Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_pattern05.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_tiles1.png b/mods/abriglass/textures/abriglass_stainedglass_tiles1.png new file mode 100644 index 0000000..355c646 Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_tiles1.png differ diff --git a/mods/abriglass/textures/abriglass_stainedglass_tiles2.png b/mods/abriglass/textures/abriglass_stainedglass_tiles2.png new file mode 100644 index 0000000..f92655c Binary files /dev/null and b/mods/abriglass/textures/abriglass_stainedglass_tiles2.png differ diff --git a/mods/ambience/README.md b/mods/ambience/README.md new file mode 100644 index 0000000..9130fc3 --- /dev/null +++ b/mods/ambience/README.md @@ -0,0 +1,21 @@ +Ambience Redo mod for Minetest + by TenPlus1 + +Based on Immersive Sounds .36 mod by Neuromancer and optimized to run on servers with new fire sounds added when Fire Redo mod is detected... + +- 0.1 - Initial release +- 0.2 - Code change and new water sounds added +- 0.3 - Works with Fire Redo mod to provide fire sounds +- 0.4 - Code optimized +- 0.5 - Changed to kilbiths smaller sound files and removed canadianloon1, adjusted timings +- 0.6 - Using new find_nodes_in_area features to count nodes and speed up execution (thanks everamzah) +- 0.7 - Code tweaks and added Jungle sounds for day and night time +- 0.8 - Override default water sounds for 0.4.14 dev and above, add separate gain for each sound +- 0.9 - Plays music files on server or local client when found at midnight, files to be named "ambience_music.1.ogg" changing number each up to 9. +- 1.0 - Added icecrack sound when walking on snow/ice flows, also tidied code +- 1.1 - Using newer functions, Minetest 0.4.16 and above needed to run +- 1.2 - Added PlayerPlus compatibility, removed fire sounds, added volume changes +- 1.3 - Added API for use with other mods, code rewrite +- 1.4 - Re-ordered water sets to come before fire and lava, day/night sounds play when leaves around and above ground + +Code license: MIT diff --git a/mods/ambience/api.txt b/mods/ambience/api.txt new file mode 100644 index 0000000..50584a9 --- /dev/null +++ b/mods/ambience/api.txt @@ -0,0 +1,90 @@ + +Ambience Lite API +================= + +This short guide will show you how to add sound sets into ambience mod for the +api to use and play sounds accordingly. Please note that the order they are +added will affect sound checks, so high priority sets first. + + +Function Usage +============== + + +Adding Sound Set +---------------- + +ambience.add_set(set_name, def) + 'set_name' contains the name of the sound set to add + 'def' contains the following: + 'frequency' how often the sound set is played (1 to 1000) higher is more + 'nodes' contains a table of nodes needed for checks + 'sound_check(def)' function to check if sounds can be played, def contains: + 'player' player userdata + 'pos' position of player + 'tod' time of day + 'totals' totals for each node e.g. def.totals["default:sand"] + 'positions' position data for every node found + 'head_node' name of node at player head level + 'feet_node' nameof node at player foot level + +This will let you add a set or sounds with the frequency it's used and check +function for it to play. + +e.g. + +ambience.add_set("windy", { + frequency = 500, + nodes = {"default:sand"}, + sounds = { + {name = "wind", length = 9, gain = 0.3}, + {name = "desertwind", length = 8, gain = 0.3}, + }, + sound_check = function(def) + local number = totals["default:sand"] or 0 -- yep, can also be nil + if number > 20 then + return "windy", 0.2 -- return set to play and optional gain volume + end + end, +}) + + +Getting Sound Set +----------------- + +ambience.get_set(set_name) + +This returns a table containing all of the set information like example above. + +e.g. + +local myset = ambience.get_set("windy") -- returns everything inside {} above. + + +Deleting Sound Set +------------------ + +ambience.del_set(set_name) + +This will remove a sound set from the list. + +e.g. + +ambience.del_set("windy") + + +Additional Commands +=================== + +Two volume commands have been added to set sound and music volume: + +/svol (0.1 to 1.0) +/mvol (0.1 to 1.0) -- 0 can be used to stop music from playing when it begins + + +Music +===== + +Music can be stored in the sounds folder either on server or locally and so long +as it is named 'ambience_music.1', 'ambience_music.2' etc. then it will select +a song randomly at midnight and play player. diff --git a/mods/ambience/depends.txt b/mods/ambience/depends.txt new file mode 100644 index 0000000..9d316eb --- /dev/null +++ b/mods/ambience/depends.txt @@ -0,0 +1,3 @@ +default +fire? +playerplus? diff --git a/mods/ambience/description.txt b/mods/ambience/description.txt new file mode 100644 index 0000000..fd0b66e --- /dev/null +++ b/mods/ambience/description.txt @@ -0,0 +1 @@ +Adds realistic sound effects into your world. diff --git a/mods/ambience/init.lua b/mods/ambience/init.lua new file mode 100644 index 0000000..a08150a --- /dev/null +++ b/mods/ambience/init.lua @@ -0,0 +1,303 @@ + +ambience = {} + +-- override default water sounds +minetest.override_item("default:water_source", { sounds = {} }) +minetest.override_item("default:water_flowing", { sounds = {} }) +minetest.override_item("default:river_water_source", { sounds = {} }) +minetest.override_item("default:river_water_flowing", { sounds = {} }) + +-- settings +local SOUNDVOLUME = 1.0 +local MUSICVOLUME = 1.0 +local play_music = minetest.settings:get_bool("ambience_music") ~= false +local pplus = minetest.get_modpath("playerplus") +local radius = 6 +local playing = {} +local sound_sets = {} -- all the sounds and their settings +local sound_set_order = {} -- needed because pairs loops randomly through tables +local set_nodes = {} -- all the nodes needed for sets + + +-- global functions +ambience.add_set = function(set_name, def) + + if set_name and def then + + sound_sets[set_name] = { + frequency = def.frequency or 50, + sounds = def.sounds, + sound_check = def.sound_check, + nodes = def.nodes, + } + + -- add set name to the sound_set_order table + local can_add = true + + for i = 1, #sound_set_order do + + if sound_set_order[i] == set_name then + can_add = false + end + end + + if can_add then + table.insert(sound_set_order, set_name) + end + + -- add any missing nodes to the set_nodes table + if def.nodes then + + for i = 1, #def.nodes do + + can_add = def.nodes[i] + + for j = 1, #set_nodes do + + if def.nodes[i] == set_nodes[j] then + can_add = false + end + end + + if can_add then + table.insert(set_nodes, can_add) + end + end + end + end +end + + +ambience.get_set = function(set_name) + + if sound_sets[set_name] then + return sound_sets[set_name] + end +end + + +ambience.del_set = function(set_name) + + sound_sets[set_name] = nil + + local can_del = false + + for i = 1, #sound_set_order do + + if sound_set_order[i] == set_name then + can_del = i + end + end + + if can_del then + table.remove(sound_set_order, can_del) + end +end + + +-- plays music and selects sound set +local get_ambience = function(player, tod, name) + + -- play server or local music if available + if play_music and playing[name] then + + -- play at midnight + if tod >= 0.0 and tod <= 0.01 then + + if not playing[name].music then + + playing[name].music = minetest.sound_play("ambience_music", { + to_player = player:get_player_name(), + gain = MUSICVOLUME + }) + end + + elseif tod > 0.1 and playing[name].music then + + playing[name].music = nil + end + end + + + -- get foot and head level nodes at player position + local pos = player:get_pos() + + pos.y = pos.y + 1.4 -- head level + + local nod_head = pplus and playerplus[name].nod_head or minetest.get_node(pos).name + + pos.y = pos.y - 1.2 -- foot level + + local nod_feet = pplus and playerplus[name].nod_feet or minetest.get_node(pos).name + + pos.y = pos.y - 0.2 -- reset pos + + + -- get all set nodes around player + local ps, cn = minetest.find_nodes_in_area( + {x = pos.x - radius, y = pos.y - radius, z = pos.z - radius}, + {x = pos.x + radius, y = pos.y + radius, z = pos.z + radius}, set_nodes) + + -- loop through sets in order and choose one that meets it's conditions + for n = 1, #sound_set_order do + + local set = sound_sets[ sound_set_order[n] ] + + if set and set.sound_check then + + local set_name, gain = set.sound_check({ + player = player, + pos = pos, + tod = tod, + totals = cn, + positions = ps, + head_node = nod_head, + feet_node = nod_feet + }) + + if set_name then + return set_name, gain + end + end + end +end + + +local timer = 0 +local random = math.random + +-- player routine +minetest.register_globalstep(function(dtime) + + -- every 1 second + timer = timer + dtime + if timer < 1 then return end + timer = 0 + + local players = minetest.get_connected_players() + local player_name, number, chance, ambience, handler + local tod = minetest.get_timeofday() + + for n = 1, #players do + + player_name = players[n]:get_player_name() + +--local t1 = os.clock() + + local set_name, MORE_GAIN = get_ambience(players[n], tod, player_name) + +--print(string.format("elapsed time: %.4f\n", os.clock() - t1)) + + if set_name then + + -- stop sound if another set active + if playing[player_name] + and playing[player_name].handler then + + if playing[player_name].sound ~= set_name + or (playing[player_name].sound == set_name + and playing[player_name].gain ~= MORE_GAIN) then + + minetest.sound_stop(playing[player_name].handler) + + playing[player_name].sound = nil + playing[player_name].handler = nil + playing[player_name].gain = nil + else + return + end + end + + -- choose random sound from set selected + number = random(1, #sound_sets[set_name].sounds) + ambience = sound_sets[set_name].sounds[number] + + math.randomseed(tod + number) + + chance = random(1, 1000) + + if chance < sound_sets[set_name].frequency then + + handler = minetest.sound_play(ambience.name, { + to_player = player_name, + gain = ((ambience.gain or 0.3) + (MORE_GAIN or 0)) * SOUNDVOLUME + }) + +--print ("playing... " .. ambience.name .. " (" .. chance .. " < " +-- .. sound_sets[set_name].frequency .. ") @ ", MORE_GAIN) + + if handler then + + playing[player_name] = playing[player_name] or {} + playing[player_name].handler = handler + playing[player_name].sound = set_name + playing[player_name].gain = MORE_GAIN + + minetest.after(ambience.length, function(args) + + local player_name = args[2] + + if playing[player_name] + and playing[player_name].handler + and playing[player_name].sound == set_name then + + minetest.sound_stop(playing[player_name].handler) + + playing[player_name].sound = nil + playing[player_name].handler = nil + playing[player_name].gain = nil + end + + end, {ambience, player_name}) + end + end + end + end +end) + + +-- set volume commands +minetest.register_chatcommand("svol", { + params = "", + description = "set sound volume (0.1 to 1.0)", + privs = {server = true}, + + func = function(name, param) + + SOUNDVOLUME = tonumber(param) or SOUNDVOLUME + + if SOUNDVOLUME < 0.1 then SOUNDVOLUME = 0.1 end + if SOUNDVOLUME > 1.0 then SOUNDVOLUME = 1.0 end + + return true, "Sound volume set to " .. SOUNDVOLUME + end, +}) + + +minetest.register_chatcommand("mvol", { + params = "", + description = "set music volume (0.1 to 1.0)", + privs = {server = true}, + + func = function(name, param) + + MUSICVOLUME = tonumber(param) or MUSICVOLUME + + -- ability to stop music just as it begins + if MUSICVOLUME == 0 and playing[name].music then + minetest.sound_stop(playing[name].music) + end + + if MUSICVOLUME < 0.1 then MUSICVOLUME = 0.1 end + if MUSICVOLUME > 1.0 then MUSICVOLUME = 1.0 end + + return true, "Music volume set to " .. MUSICVOLUME + end, +}) + + +-- load default sound sets +dofile(minetest.get_modpath("ambience") .. "/soundsets.lua") + + +print("[MOD] Ambience Lite loaded") diff --git a/mods/ambience/mod.conf b/mods/ambience/mod.conf new file mode 100644 index 0000000..1e8551e --- /dev/null +++ b/mods/ambience/mod.conf @@ -0,0 +1 @@ +name = ambience diff --git a/mods/ambience/screenshot.png b/mods/ambience/screenshot.png new file mode 100644 index 0000000..f1df0c9 Binary files /dev/null and b/mods/ambience/screenshot.png differ diff --git a/mods/ambience/settingtypes.txt b/mods/ambience/settingtypes.txt new file mode 100644 index 0000000..6d591d1 --- /dev/null +++ b/mods/ambience/settingtypes.txt @@ -0,0 +1,2 @@ +# If enabled will play a random music file from ./minetest/sounds at midnight +ambience_music (Ambience music) bool true diff --git a/mods/ambience/sounds/SoundLicenses.txt b/mods/ambience/sounds/SoundLicenses.txt new file mode 100644 index 0000000..d1da1ea --- /dev/null +++ b/mods/ambience/sounds/SoundLicenses.txt @@ -0,0 +1,105 @@ + +-----------Sound Lic: +--Nightime Sound, Recorded by Mike Koenig, License: Attribution 3.0 http://soundbible.com/951-Nightime.html +--Crickets At Night Sound, License: Attribution 3.0 | Recorded by Mike Koenig |http://soundbible.com/365-Crickets-At-Night.html + +--Medium Pack Of Wolves Howling, License: Public Domain | Recorded by fws.gov, http://soundbible.com/277-Medium-Pack-Of-Wolves-Howling.html + +--Horned Owl Sound, License: Attribution 3.0 | Recorded by Mike Koenig , http://soundbible.com/1851-Horned-Owl.html +--Bats In Cave Sound, License: Attr-Noncommercial 3.0 | Recorded by Mike Koenig , http://soundbible.com/1939-Bats-In-Cave.html + +--Spooky Water Drops Sound, License: Attribution 3.0 | Recorded by Mike Koenig, http://soundbible.com/380-Spooky-Water-Drops.html + + +-- Single Water Droplet Sound, License: Attribution 3.0 | Recorded by Mike Koenig, http://soundbible.com/384-Single-Water-Droplet.html + +--HollowWind, Black Boe, Creative Commons 0 License, http://www.freesound.org/people/Black%20Boe/sounds/22331/ + +--drippingwater*.ogg sounds: CC0, Dripping Water Mod, by kddekadenz, http://minetest.net/forum/viewtopic.php?id=1688 + +--best cardinal bird: License: Attribution 3.0 | Recorded by PsychoBird, http://soundbible.com/1515-Best-Cardinal-Bird.html + +--birdsongnl: the Attribution License, HerbertBoland, http://www.freesound.org/people/HerbertBoland/sounds/28312/ (end) + +--robin2: Attribution License, reinsamba, http://www.freesound.org/people/reinsamba/sounds/32479/ (end) + +--Craw.WAV, Attribution License, inchadney, http://www.freesound.org/people/inchadney/sounds/52450/ + +--bluejay.wav, Creative Commons 0 License, UncleSigmund, http://www.freesound.org/people/UncleSigmund/sounds/42382/ + +--scuba1*.ogg- digifishmusic, Attribution License, http://www.freesound.org/people/digifishmusic/sounds/45521/ + +--Underwater Pool - Attribution 3.0 | Recorded by Mike Koenig, http://soundbible.com/1660-Underwater-Pool.html + +--dolphin_screaming - Creative Commons 0 License, felix.blume, http://www.freesound.org/people/felix.blume/sounds/161691/ + +--dolphins - Attribution Noncommercial License, acclivity, http://www.freesound.org/people/acclivity/sounds/13691/ + +ComboWind uses: +--wind-in-the-trees -Attribution License, laurent, http://www.freesound.org/people/laurent/sounds/16995/ +--drygrassInWind- Creative Commons 0 License, felix.blume, http://www.freesound.org/people/felix.blume/sounds/146436/ + +--Splash: Attribution 3.0 | Recorded by BlastwaveFx.com, http://soundbible.com/546-Fish-Splashing.html + +--small_waterfall Attribution License, volivieri, http://www.freesound.org/people/volivieri/sounds/38390/ + +--Lake_Waves_2*, Attribution License, Benboncan, http://www.freesound.org/people/Benboncan/sounds/67884/ + +--water_swimming_splashing*, Attribution Noncommercial License, Robinhood76, http://www.freesound.org/people/Robinhood76/sounds/79657/ + +--earth01a, Creative Commons 0 License., Halion , http://www.freesound.org/people/Halion/sounds/17785 + +--fiji_beach, Creative Commons 0 License, c97059890, http://www.freesound.org/people/c97059890/sounds/21754/ + +--seagull, Attribution Noncommercial License., hazure, http://www.freesound.org/people/hazure/sounds/23707/, + +desert: +coyote2, Attribution License, rogerforeman, http://www.freesound.org/people/rogerforeman/sounds/68068/ +http://www.freesound.org/people/Proxima4/sounds/104319/ +Desert Monolith.wav, Creative Commons 0 License, Proxima4, http://www.freesound.org/people/Proxima4/sounds/104319/ +Rattlesnake Rattle, Public Domain, fws.gov, http://soundbible.com/237-Rattlesnake-Rattle.html + +flying: +crystal_airlines: Attribution License, suonho, http://www.freesound.org/people/suonho/sounds/56364/ + +----------------Not used yet: +desert: +Desert Simple.wav, Creative Commons 0 License, Proxima4, http://www.freesound.org/people/Proxima4/sounds/104320/ + + 313hummer (Jordan Craige) +--echos http://soundcloud.com/jordan-craige/echos-1 +Creative Commons Attribution license (reuse allowed) Attribution 3.0 Unported (CC BY 3.0) +Not Used:--FoamOfTheSea http://soundcloud.com/jordan-craige/foam-of-the-sea + +xi-intersection: +http://soundcloud.com/xi-intersection/mass-effect-uncharted-worlds Creative Commons License +--not used: +http://soundcloud.com/xi-intersection/donkey-kong-country-2-flight +http://soundcloud.com/kogyo/kogyo-skalar-m1 + +lava: +http://www.freesound.org/people/Halion/sounds/17785/ (almost as good cc) (combine with rocks falling?) +http://www.freesound.org/people/pushtobreak/sounds/17823/ (attrib non cc really good) +http://www.freesound.org/people/klankbeeld/sounds/123970/ (horror rhythm) +Rockfall in mine.wav http://www.freesound.org/people/Benboncan/sounds/60085/ + + +http://www.freesound.org/people/snotch/sounds/96175/ (mud volcano) + +--natural night sounds in Boquete.wav, Attribution License, laurent, http://www.freesound.org/people/laurent/sounds/15851/ +http://www.freesound.org/people/Dynamicell/sounds/17553/ +http://www.freesound.org/people/juskiddink/sounds/78955/ aspen tree in wind +http://www.freesound.org/people/Benboncan/sounds/69761/ wind in hedge birds animals + + +ButterflyTea: +Creative Commons : Attribution-Noncommercial-Share Alike 3.0 +http://www.jamendo.com/en/track/904012/dance-of-magical-flowers +http://www.jamendo.com/en/track/904013/magic-of-the-seventh-world +http://www.jamendo.com/en/track/904016/in-search-of-the-soul + +http://www.freesfx.co.uk/soundeffects/forests-jungles/ + +zero-project + +icecrack.ogg by figowitz (http://freesound.org/people/Figowitz/sounds/67881/) diff --git a/mods/ambience/sounds/beach.ogg b/mods/ambience/sounds/beach.ogg new file mode 100644 index 0000000..69c37b7 Binary files /dev/null and b/mods/ambience/sounds/beach.ogg differ diff --git a/mods/ambience/sounds/beach_2.ogg b/mods/ambience/sounds/beach_2.ogg new file mode 100644 index 0000000..461ad0f Binary files /dev/null and b/mods/ambience/sounds/beach_2.ogg differ diff --git a/mods/ambience/sounds/bird1.ogg b/mods/ambience/sounds/bird1.ogg new file mode 100644 index 0000000..ce10350 Binary files /dev/null and b/mods/ambience/sounds/bird1.ogg differ diff --git a/mods/ambience/sounds/bird2.ogg b/mods/ambience/sounds/bird2.ogg new file mode 100644 index 0000000..3c9427e Binary files /dev/null and b/mods/ambience/sounds/bird2.ogg differ diff --git a/mods/ambience/sounds/bluejay.ogg b/mods/ambience/sounds/bluejay.ogg new file mode 100644 index 0000000..3dfe8a5 Binary files /dev/null and b/mods/ambience/sounds/bluejay.ogg differ diff --git a/mods/ambience/sounds/canadianloon2.ogg b/mods/ambience/sounds/canadianloon2.ogg new file mode 100644 index 0000000..511d8e1 Binary files /dev/null and b/mods/ambience/sounds/canadianloon2.ogg differ diff --git a/mods/ambience/sounds/cardinal.ogg b/mods/ambience/sounds/cardinal.ogg new file mode 100644 index 0000000..ad8c836 Binary files /dev/null and b/mods/ambience/sounds/cardinal.ogg differ diff --git a/mods/ambience/sounds/coyote.ogg b/mods/ambience/sounds/coyote.ogg new file mode 100644 index 0000000..dc29674 Binary files /dev/null and b/mods/ambience/sounds/coyote.ogg differ diff --git a/mods/ambience/sounds/craw.ogg b/mods/ambience/sounds/craw.ogg new file mode 100644 index 0000000..43f51e8 Binary files /dev/null and b/mods/ambience/sounds/craw.ogg differ diff --git a/mods/ambience/sounds/crestedlark.ogg b/mods/ambience/sounds/crestedlark.ogg new file mode 100644 index 0000000..8757747 Binary files /dev/null and b/mods/ambience/sounds/crestedlark.ogg differ diff --git a/mods/ambience/sounds/cricket.ogg b/mods/ambience/sounds/cricket.ogg new file mode 100644 index 0000000..63d06e3 Binary files /dev/null and b/mods/ambience/sounds/cricket.ogg differ diff --git a/mods/ambience/sounds/deer.ogg b/mods/ambience/sounds/deer.ogg new file mode 100644 index 0000000..293591f Binary files /dev/null and b/mods/ambience/sounds/deer.ogg differ diff --git a/mods/ambience/sounds/desertwind.ogg b/mods/ambience/sounds/desertwind.ogg new file mode 100644 index 0000000..b441622 Binary files /dev/null and b/mods/ambience/sounds/desertwind.ogg differ diff --git a/mods/ambience/sounds/drippingwater1.ogg b/mods/ambience/sounds/drippingwater1.ogg new file mode 100644 index 0000000..60fee86 Binary files /dev/null and b/mods/ambience/sounds/drippingwater1.ogg differ diff --git a/mods/ambience/sounds/drippingwater2.ogg b/mods/ambience/sounds/drippingwater2.ogg new file mode 100644 index 0000000..a5eadd4 Binary files /dev/null and b/mods/ambience/sounds/drippingwater2.ogg differ diff --git a/mods/ambience/sounds/frog.ogg b/mods/ambience/sounds/frog.ogg new file mode 100644 index 0000000..3775fef Binary files /dev/null and b/mods/ambience/sounds/frog.ogg differ diff --git a/mods/ambience/sounds/gull.ogg b/mods/ambience/sounds/gull.ogg new file mode 100644 index 0000000..3d90847 Binary files /dev/null and b/mods/ambience/sounds/gull.ogg differ diff --git a/mods/ambience/sounds/hornedowl.ogg b/mods/ambience/sounds/hornedowl.ogg new file mode 100644 index 0000000..82e3268 Binary files /dev/null and b/mods/ambience/sounds/hornedowl.ogg differ diff --git a/mods/ambience/sounds/icecrack.ogg b/mods/ambience/sounds/icecrack.ogg new file mode 100644 index 0000000..c09fcb2 Binary files /dev/null and b/mods/ambience/sounds/icecrack.ogg differ diff --git a/mods/ambience/sounds/jungle_day_1.ogg b/mods/ambience/sounds/jungle_day_1.ogg new file mode 100644 index 0000000..9ec8f13 Binary files /dev/null and b/mods/ambience/sounds/jungle_day_1.ogg differ diff --git a/mods/ambience/sounds/jungle_night_1.ogg b/mods/ambience/sounds/jungle_night_1.ogg new file mode 100644 index 0000000..56ba29b Binary files /dev/null and b/mods/ambience/sounds/jungle_night_1.ogg differ diff --git a/mods/ambience/sounds/jungle_night_2.ogg b/mods/ambience/sounds/jungle_night_2.ogg new file mode 100644 index 0000000..9ec3b05 Binary files /dev/null and b/mods/ambience/sounds/jungle_night_2.ogg differ diff --git a/mods/ambience/sounds/lava.ogg b/mods/ambience/sounds/lava.ogg new file mode 100644 index 0000000..d417e51 Binary files /dev/null and b/mods/ambience/sounds/lava.ogg differ diff --git a/mods/ambience/sounds/peacock.ogg b/mods/ambience/sounds/peacock.ogg new file mode 100644 index 0000000..c17142f Binary files /dev/null and b/mods/ambience/sounds/peacock.ogg differ diff --git a/mods/ambience/sounds/river.ogg b/mods/ambience/sounds/river.ogg new file mode 100644 index 0000000..f477424 Binary files /dev/null and b/mods/ambience/sounds/river.ogg differ diff --git a/mods/ambience/sounds/robin.ogg b/mods/ambience/sounds/robin.ogg new file mode 100644 index 0000000..3f4748c Binary files /dev/null and b/mods/ambience/sounds/robin.ogg differ diff --git a/mods/ambience/sounds/scuba.ogg b/mods/ambience/sounds/scuba.ogg new file mode 100644 index 0000000..a318c68 Binary files /dev/null and b/mods/ambience/sounds/scuba.ogg differ diff --git a/mods/ambience/sounds/seagull.ogg b/mods/ambience/sounds/seagull.ogg new file mode 100644 index 0000000..9dab963 Binary files /dev/null and b/mods/ambience/sounds/seagull.ogg differ diff --git a/mods/ambience/sounds/swim_splashing.ogg b/mods/ambience/sounds/swim_splashing.ogg new file mode 100644 index 0000000..4c40847 Binary files /dev/null and b/mods/ambience/sounds/swim_splashing.ogg differ diff --git a/mods/ambience/sounds/waterfall.ogg b/mods/ambience/sounds/waterfall.ogg new file mode 100644 index 0000000..1035c93 Binary files /dev/null and b/mods/ambience/sounds/waterfall.ogg differ diff --git a/mods/ambience/sounds/wind.ogg b/mods/ambience/sounds/wind.ogg new file mode 100644 index 0000000..092be4b Binary files /dev/null and b/mods/ambience/sounds/wind.ogg differ diff --git a/mods/ambience/sounds/wolves.ogg b/mods/ambience/sounds/wolves.ogg new file mode 100644 index 0000000..f23b1f9 Binary files /dev/null and b/mods/ambience/sounds/wolves.ogg differ diff --git a/mods/ambience/soundsets.lua b/mods/ambience/soundsets.lua new file mode 100644 index 0000000..ebf9151 --- /dev/null +++ b/mods/ambience/soundsets.lua @@ -0,0 +1,357 @@ +--[[ + Default Sound Sets + ------------------ + + Order is very important when adding a sound set so it will play a certain + set of sounds before any another. +--]] + +-- Underwater sounds play when player head is submerged + +ambience.add_set("underwater", { + frequency = 1000, + sounds = { + {name = "scuba", length = 8} + }, + sound_check = function(def) + + if minetest.registered_nodes[def.head_node] + and minetest.registered_nodes[def.head_node].groups.water then + return "underwater" + end + end, +}) + +-- Splashing sound plays when player walks inside water nodes + +ambience.add_set("splash", { + frequency = 1000, + sounds = { + {name = "swim_splashing", length = 3}, + }, + sound_check = function(def) + + if minetest.registered_nodes[def.feet_node] + and minetest.registered_nodes[def.feet_node].groups.water then + + local control = def.player:get_player_control() + + if control.up or control.down or control.left or control.right then + return "splash" + end + end + end, +}) + +-- Water sound plays when near flowing water, will get louder if more than 50 + +ambience.add_set("flowing_water", { + frequency = 1000, + sounds = { + {name = "waterfall", length = 6} + }, + sound_check = function(def) + + local c = (def.totals["default:water_flowing"] or 0) + + if c > 50 then + return "flowing_water", 0.5 + + elseif c > 20 then + return "flowing_water" + end + end, + nodes = {"default:water_flowing"} +}) + +-- River sound plays when near flowing river, will get louder if more than 20 + +ambience.add_set("river", { + frequency = 1000, + sounds = { + {name = "river", length = 4, gain = 0.1} + }, + sound_check = function(def) + + local c = (def.totals["default:river_water_flowing"] or 0) + + if c > 20 then + return "river", 0.4 + + elseif c > 5 then + return "river" + end + end, + nodes = {"default:river_water_flowing"} +}) + +-- Small fire sound plays when near flame, will get louder if more than 3 + +ambience.add_set("smallfire", { + frequency = 1000, + sounds = { + {name = "fire_small", length = 6, gain = 0.1} + }, + sound_check = function(def) + + if fire and fire.mod and fire.mod == "redo" then + + local c = (def.totals["fire:basic_flame"] or 0) + + (def.totals["fire:permanent_flame"] or 0) + + if c > 3 and c < 9 then + return "smallfire", 0.2 + + elseif c > 0 and c < 4 then + return "smallfire" + end + end + end, + nodes = {"fire:basic_flame", "fire:permanent_flame"} +}) + +-- Large fire sound plays when near flames, will get louder if more than 16 + +ambience.add_set("largefire", { + frequency = 1000, + sounds = { + {name = "fire_large", length = 8, gain = 0.4} + }, + sound_check = function(def) + + if fire and fire.mod and fire.mod == "redo" then + + local c = (def.totals["fire:basic_flame"] or 0) + + (def.totals["fire:permanent_flame"] or 0) + + if c > 16 then + return "largefire", 0.4 + + elseif c > 8 then + return "largefire" + end + end + end, + nodes = {"fire:basic_flame", "fire:permanent_flame"} +}) + +-- Lava sound plays when near lava, will get louder if more than 50 + +ambience.add_set("lava", { + frequency = 1000, + sounds = { + {name = "lava", length = 7} + }, + sound_check = function(def) + + local c = (def.totals["default:lava_source"] or 0) + + (def.totals["default:lava_flowing"] or 0) + + if c > 50 then + return "lava", 0.5 + + elseif c > 5 then + return "lava" + end + end, + nodes = {"default:lava_source", "default:lava_flowing"} +}) + +-- Beach sounds play when around 0-7 player Y position and 150+ water source found + +ambience.add_set("beach", { + frequency = 40, + sounds = { + {name = "seagull", length = 4.5}, + {name = "beach", length = 13}, + {name = "gull", length = 1}, + {name = "beach_2", length = 6}, + }, + sound_check = function(def) + + local c = (def.totals["default:water_source"] or 0) + + if def.pos.y < 7 and def.pos.y > 0 + and c > 150 then + return "beach" + end + end, + nodes = {"default:water_source"} +}) + +-- Ice sounds play when 100 or more ice are nearby + +ambience.add_set("ice", { + frequency = 250, + sounds = { + {name = "icecrack", length = 23}, + {name = "desertwind", length = 8}, + {name = "wind", length = 9}, + }, + sound_check = function(def) + + local c = (def.totals["default:ice"] or 0) + + if c > 100 then + return "ice" + end + end, + nodes = {"default:ice"}, +}) + +-- Desert sounds play when near 150+ desert or normal sand + +ambience.add_set("desert", { + frequency = 20, + sounds = { + {name = "coyote", length = 2.5}, + {name = "wind", length = 9}, + {name = "desertwind", length = 8} + }, + sound_check = function(def) + + local c = (def.totals["default:desert_sand"] or 0) + + (def.totals["default:sand"] or 0) + + if c > 150 and def.pos.y > 10 then + return "desert" + end + end, + nodes = {"default:desert_sand", "default:sand"} +}) + +-- Winds play when player is above 50 Y position and near 150+ snow blocks + +ambience.add_set("high_up", { + frequency = 40, + sounds = { + {name = "desertwind", length = 8}, + {name = "wind", length = 9}, + }, + sound_check = function(def) + + local c = (def.totals["default:snowblock"] or 0) + + if def.pos.y > 50 + or c > 150 then + return "high_up" + end + end, + nodes = {"default:snowblock"} +}) + +-- Cave sounds play when below player position Y -25 + +ambience.add_set("cave", { + frequency = 60, + sounds = { + {name = "drippingwater1", length = 1.5}, + {name = "drippingwater2", length = 1.5} + }, + sound_check = function(def) + + if def.pos.y < -25 then + return "cave" + end + end, +}) + +-- Jungle sounds play during daytime and when around 90 jungletree trunks + +ambience.add_set("jungle", { + frequency = 200, + sounds = { + {name = "jungle_day_1", length = 7}, + {name = "deer", length = 7}, + {name = "canadianloon2", length = 14}, + {name = "bird1", length = 11}, + {name = "peacock", length = 2}, + }, + sound_check = function(def) + + local c = (def.totals["default:jungletree"] or 0) + + if def.tod > 0.2 and def.tod < 0.8 and c > 90 then + return "jungle" + end + end, + nodes = {"default:jungletree"} +}) + +-- Jungle sounds play during nighttime and when around 90 jungletree trunks + +ambience.add_set("jungle_night", { + frequency = 200, + sounds = { + {name = "jungle_night_1", length = 4}, + {name = "jungle_night_2", length = 4}, + {name = "deer", length = 7}, + {name = "frog", length = 1}, + }, + sound_check = function(def) + + local c = (def.totals["default:jungletree"] or 0) + + if (def.tod < 0.2 or def.tod > 0.8) and c > 90 then + return "jungle" + end + end, + nodes = {"default:jungletree"} +}) + +-- Nighttime sounds play at night when around leaves and above ground + +ambience.add_set("night", { + frequency = 40, + sounds = { + {name = "hornedowl", length = 2}, + {name = "wolves", length = 4, gain = 0.4}, + {name = "cricket", length = 6}, + {name = "deer", length = 7}, + {name = "frog", length = 1}, + }, + sound_check = function(def) + + local c = (def.totals["default:leaves"] or 0) + + (def.totals["default:bush_leaves"] or 0) + + (def.totals["default:pine_leaves"] or 0) + + (def.totals["default:aspen_leaves"] or 0) + + if (def.tod < 0.2 or def.tod > 0.8) + and def.pos.y > -10 + and c > 5 then + return "night" + end + end, +}) + +-- Daytime sounds play during day when around leaves and above ground + +ambience.add_set("day", { + frequency = 40, + sounds = { + {name = "cardinal", length = 3}, + {name = "craw", length = 3}, + {name = "bluejay", length = 6}, + {name = "robin", length = 4}, + {name = "bird1", length = 11}, + {name = "bird2", length = 6}, + {name = "crestedlark", length = 6}, + {name = "peacock", length = 2}, + {name = "wind", length = 9}, + }, + sound_check = function(def) + + local c = (def.totals["default:leaves"] or 0) + + (def.totals["default:bush_leaves"] or 0) + + (def.totals["default:pine_leaves"] or 0) + + (def.totals["default:aspen_leaves"] or 0) + + if (def.tod > 0.2 and def.tod < 0.8) + and def.pos.y > -10 + and c > 5 then + return "day" + end + end, + nodes = {"group:leaves"} +}) diff --git a/mods/anvil/LICENSE b/mods/anvil/LICENSE new file mode 100644 index 0000000..733c072 --- /dev/null +++ b/mods/anvil/LICENSE @@ -0,0 +1,675 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + diff --git a/mods/anvil/README.md b/mods/anvil/README.md new file mode 100644 index 0000000..f8cc4e7 --- /dev/null +++ b/mods/anvil/README.md @@ -0,0 +1,5 @@ +Anvil mod by Sokomine, originally a part of the Cottages mod but extracted to stand alone. + +This anvil (and its associated hammer) allows a player to repair worn tools. Place the worn tool in the anvil's inventory and strike it with the hammer to improve its condition. + +By default, a hammer can be repaired on the anvil just like any other tool, allowing for infinite recycling of worn tools. Set "anvil_hammer_is_repairable false" to prevent this. \ No newline at end of file diff --git a/mods/anvil/depends.txt b/mods/anvil/depends.txt new file mode 100644 index 0000000..e5122e9 --- /dev/null +++ b/mods/anvil/depends.txt @@ -0,0 +1,3 @@ +default +doc? +intllib? \ No newline at end of file diff --git a/mods/anvil/description.txt b/mods/anvil/description.txt new file mode 100644 index 0000000..0561b90 --- /dev/null +++ b/mods/anvil/description.txt @@ -0,0 +1 @@ +Hammer and anvil for repairing tools \ No newline at end of file diff --git a/mods/anvil/init.lua b/mods/anvil/init.lua new file mode 100644 index 0000000..d6f6a3f --- /dev/null +++ b/mods/anvil/init.lua @@ -0,0 +1,416 @@ +--------------------------------------------------------------------------------------- +-- simple anvil that can be used to repair tools +--------------------------------------------------------------------------------------- +-- * can be used to repair tools +-- * the hammer gets dammaged a bit at each repair step +--------------------------------------------------------------------------------------- + +anvil = { + setting = { + item_displacement = 2/16, + } +} + +minetest.register_alias("castle:anvil", "anvil:anvil") + +local hammer_repairable = minetest.setting_getbool("anvil_hammer_is_repairable") +if hammer_repairable == nil then hammer_repairable = true end + +local make_unrepairable = function(item_name) + local item_def = minetest.registered_items[item_name] + if item_def then + item_def.groups.not_repaired_by_anvil = 1 + minetest.override_item(item_name, {groups = item_def.groups}) + end +end +make_unrepairable("technic:water_can") +make_unrepairable("technic:lava_can") + +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +-- the hammer for the anvil + +local hammer_def = { + description = S("Steel blacksmithing hammer"), + _doc_items_longdesc = S("A tool for repairing other tools at a blacksmith's anvil."), + _doc_items_usagehelp = S("Use this hammer to strike blows upon an anvil bearing a damaged tool and you can repair it. It can also be used for smashing stone, but it is not well suited to this task."), + image = "anvil_tool_steelhammer.png", + inventory_image = "anvil_tool_steelhammer.png", + + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + -- about equal to a stone pick (it's not intended as a tool) + cracky={times={[2]=2.00, [3]=1.20}, uses=30, maxlevel=1}, + }, + damage_groups = {fleshy=6}, + } +} + +if not hammer_repairable then + hammer_def.groups = {["not_repaired_by_anvil"] = 1} +end + +minetest.register_tool("anvil:hammer", hammer_def) + +local tmp = {} + +minetest.register_entity("anvil:item",{ + hp_max = 1, + visual="wielditem", + visual_size={x=.33,y=.33}, + collisionbox = {0,0,0,0,0,0}, + physical=false, + textures={"air"}, + on_activate = function(self, staticdata) + if tmp.nodename ~= nil and tmp.texture ~= nil then + self.nodename = tmp.nodename + tmp.nodename = nil + self.texture = tmp.texture + tmp.texture = nil + else + if staticdata ~= nil and staticdata ~= "" then + local data = staticdata:split(';') + if data and data[1] and data[2] then + self.nodename = data[1] + self.texture = data[2] + end + end + end + if self.texture ~= nil then + self.object:set_properties({textures={self.texture}}) + end + end, + get_staticdata = function(self) + if self.nodename ~= nil and self.texture ~= nil then + return self.nodename .. ';' .. self.texture + end + return "" + end, +}) + +local remove_item = function(pos, node) + local objs = minetest.get_objects_inside_radius({x = pos.x, y = pos.y + anvil.setting.item_displacement, z = pos.z}, .5) + if objs then + for _, obj in ipairs(objs) do + if obj and obj:get_luaentity() and obj:get_luaentity().name == "anvil:item" then + obj:remove() + end + end + end +end + +local update_item = function(pos, node) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if not inv:is_empty("input") then + pos.y = pos.y + anvil.setting.item_displacement + tmp.nodename = node.name + tmp.texture = inv:get_stack("input", 1):get_name() + local e = minetest.add_entity(pos,"anvil:item") + local yaw = math.pi*2 - node.param2 * math.pi/2 + if e.set_rotation == nil then + -- This is for 0.4.16 support, remove it eventually + e:set_yaw(yaw) + pos.y = pos.y + 5/16 + e:set_pos(pos) + else + e:set_rotation({x=-1.5708, y=yaw, z=0}) -- x is pitch, 1.5708 is 90 degrees. + end + end +end + +local metal_sounds +-- Apparently node_sound_metal_defaults is a newer thing, I ran into games using an older version of the default mod without it. +if default.node_sound_metal_defaults ~= nil then + metal_sounds = default.node_sound_metal_defaults() +else + metal_sounds = default.node_sound_stone_defaults() +end + +minetest.register_node("anvil:anvil", { + drawtype = "nodebox", + description = S("Anvil"), + _doc_items_longdesc = S("A tool for repairing other tools in conjunction with a blacksmith's hammer."), + _doc_items_usagehelp = S("Right-click on this anvil with a damaged tool to place the damaged tool upon it. You can then repair the damaged tool by striking it with a blacksmith's hammer. Repeated blows may be necessary to fully repair a badly worn tool. To retrieve the tool either punch or right-click the anvil with an empty hand."), + tiles = {"default_obsidian.png^[colorize:#FFFFFF:72"}, + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + sounds = metal_sounds, + -- the nodebox model comes from realtest + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.3,0.5,-0.4,0.3}, + {-0.35,-0.4,-0.25,0.35,-0.3,0.25}, + {-0.3,-0.3,-0.15,0.3,-0.1,0.15}, + {-0.35,-0.1,-0.2,0.35,0.1,0.2}, + }, + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.3,0.5,-0.4,0.3}, + {-0.35,-0.4,-0.25,0.35,-0.3,0.25}, + {-0.3,-0.3,-0.15,0.3,-0.1,0.15}, + {-0.35,-0.1,-0.2,0.35,0.1,0.2}, + } + }, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + end, + + after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext",placer:get_player_name().."'s anvil") + end, + + can_dig = function(pos,player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + if not inv:is_empty("input") then + return false + end + return true + end, + + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if listname~="input" then + return 0 + end + if (listname=='input') then + if (stack:get_wear() == 0) then + minetest.chat_send_player( player:get_player_name(), S('This anvil is for damaged tools only.')) + return 0 + end + + if (minetest.get_item_group(stack:get_name(), "not_repaired_by_anvil") ~= 0) then + local item_def = minetest.registered_items[stack:get_name()] + minetest.chat_send_player( player:get_player_name(), S('@1 cannot be repaired with an anvil.', item_def.description)) + return 0 + end + end + + if meta:get_inventory():room_for_item("input", stack) then + return stack:get_count() + end + return 0 + end, + + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if listname~="input" then + return 0 + end + return stack:get_count() + end, + + on_rightclick = function(pos, node, clicker, itemstack) + if not clicker or not itemstack then + return + end + local meta = minetest.get_meta(pos) + local name = clicker:get_player_name() + + if name ~= meta:get_string("owner") then return itemstack end + if itemstack:get_count() == 0 then + local inv = meta:get_inventory() + if not inv:is_empty("input") then + local return_stack = inv:get_stack("input", 1) + inv:set_stack("input", 1, nil) + local wield_index = clicker:get_wield_index() + clicker:get_inventory():set_stack("main", wield_index, return_stack) + remove_item(pos, node) + return return_stack + end + end + local this_def = minetest.registered_nodes[node.name] + if this_def.allow_metadata_inventory_put(pos, "input", 1, itemstack:peek_item(), clicker) > 0 then + local s = itemstack:take_item() + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:add_item("input", s) + update_item(pos,node) + end + + return itemstack + end, + + on_punch = function(pos, node, puncher) + if( not( pos ) or not( node ) or not( puncher )) then + return + end + + local wielded = puncher:get_wielded_item() + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if meta:get_string("owner") ~= puncher:get_player_name() then + return + end + + if wielded:get_count() == 0 then + if not inv:is_empty("input") then + local return_stack = inv:get_stack("input", 1) + inv:set_stack("input", 1, nil) + local wield_index = puncher:get_wield_index() + puncher:get_inventory():set_stack("main", wield_index, return_stack) + remove_item(pos, node) + end + end + + -- only punching with the hammer is supposed to work + if wielded:get_name() ~= 'anvil:hammer' then + return + end + local input = inv:get_stack('input',1) + + -- only tools can be repaired + if( not( input ) + or input:is_empty() + or input:get_name() == "technic:water_can" + or input:get_name() == "technic:lava_can" ) then + return + end + + -- 65535 is max damage + local damage_state = 40-math.floor(input:get_wear()/1638) + + local tool_name = input:get_name() + + local hud2 = nil + local hud3 = nil + if( input:get_wear()>0 ) then + hud2 = puncher:hud_add({ + hud_elem_type = "statbar", + text = "default_cloud.png^[colorize:#ff0000:256", + number = 40, + direction = 0, -- left to right + position = {x=0.5, y=0.65}, + alignment = {x = 0, y = 0}, + offset = {x = -320, y = 0}, + size = {x=32, y=32}, + }) + hud3 = puncher:hud_add({ + hud_elem_type = "statbar", + text = "default_cloud.png^[colorize:#00ff00:256", + number = damage_state, + direction = 0, -- left to right + position = {x=0.5, y=0.65}, + alignment = {x = 0, y = 0}, + offset = {x = -320, y = 0}, + size = {x=32, y=32}, + }) + end + minetest.after(2, function() + if( puncher ) then + puncher:hud_remove(hud2) + puncher:hud_remove(hud3) + end + end) + + -- tell the player when the job is done + if( input:get_wear() == 0 ) then + local tool_desc + if minetest.registered_items[tool_name] and minetest.registered_items[tool_name].description then + tool_desc = minetest.registered_items[tool_name].description + else + tool_desc = tool_name + end + minetest.chat_send_player( puncher:get_player_name(), S('Your @1 has been repaired successfully.', tool_desc)) + return + else + pos.y = pos.y + anvil.setting.item_displacement + minetest.sound_play({name="anvil_clang"}, {pos=pos}) + minetest.add_particlespawner({ + amount = 10, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x=2, y=3, z=2}, + maxvel = {x=-2, y=1, z=-2}, + minacc = {x=0, y= -10, z=0}, + maxacc = {x=0, y= -10, z=0}, + minexptime = 0.5, + maxexptime = 1, + minsize = 1, + maxsize = 1, + collisiondetection = true, + vertical = false, + texture = "anvil_spark.png", + }) + end + + -- do the actual repair + input:add_wear( -5000 ) -- equals to what technic toolshop does in 5 seconds + inv:set_stack("input", 1, input) + + -- damage the hammer slightly + wielded:add_wear( 100 ) + puncher:set_wielded_item( wielded ) + end, + is_ground_content = false, +}) + +-- automatically restore entities lost due to /clearobjects or similar +minetest.register_lbm({ + name = "anvil:anvil_item_restoration", + nodenames = { "anvil:anvil" }, + run_at_every_load = true, + action = function(pos, node, active_object_count, active_object_count_wider) + local test_pos = {x=pos.x, y=pos.y + anvil.setting.item_displacement, z=pos.z} + if #minetest.get_objects_inside_radius(test_pos, 0.5) > 0 then return end + update_item(pos, node) + end +}) + +-- Transfer the hammer from the old hammer storage slot to the main slot, or else drop it in world +minetest.register_lbm({ + name = "anvil:hammer_ejection", + nodenames = "anvil:anvil", + run_at_every_load = false, + action = function(pos, node) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if not inv:is_empty("hammer") then + local hammer = inv:get_stack("hammer", 1) + inv:set_stack("hammer", 1, nil) + inv:set_size("hammer", 0) + if inv:is_empty("input") then + inv:set_stack("input", 1, hammer) -- the abm will ensure there's an entity showing the hammer is here + else + minetest.add_item({x=pos.x, y=pos.y+1, z=pos.z}, hammer) + end + end + end +}) + +--------------------------------------------------------------------------------------- +-- crafting receipes +--------------------------------------------------------------------------------------- +minetest.register_craft({ + output = "anvil:anvil", + recipe = { + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, + {'', "default:steel_ingot",'' }, + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"} + } +}) + +minetest.register_craft({ + output = "anvil:hammer", + recipe = { + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, + {"group:stick","",""} + } +}) + diff --git a/mods/anvil/intllib.lua b/mods/anvil/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/mods/anvil/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/anvil/locale/de.po b/mods/anvil/locale/de.po new file mode 100644 index 0000000..0d15a06 --- /dev/null +++ b/mods/anvil/locale/de.po @@ -0,0 +1,91 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-14 21:16-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: XanthinLanguage-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua:36 +msgid "Steel blacksmithing hammer" +msgstr "" + +#: init.lua:37 +#, fuzzy +msgid "A tool for repairing other tools at a blacksmith's anvil." +msgstr "Stahlhammer um Werkzeuge auf dem Amboss zu reparieren" + +#: init.lua:38 +msgid "" +"Use this hammer to strike blows upon an anvil bearing a damaged tool and you " +"can repair it. It can also be used for smashing stone, but it is not well " +"suited to this task." +msgstr "" + +#: init.lua:136 +msgid "Anvil" +msgstr "Amboss" + +#: init.lua:137 +msgid "" +"A tool for repairing other tools in conjunction with a blacksmith's hammer." +msgstr "" + +#: init.lua:138 +msgid "" +"Right-click on this anvil with a damaged tool to place the damaged tool upon " +"it. You can then repair the damaged tool by striking it with a blacksmith's " +"hammer. Repeated blows may be necessary to fully repair a badly worn tool. " +"To retrieve the tool either punch or right-click the anvil with an empty " +"hand." +msgstr "" + +#: init.lua:193 +#, fuzzy +msgid "This anvil is for damaged tools only." +msgstr "Das Werkstueckfeld gilt nur fuer beschaedigtes Werkzeug." + +#: init.lua:199 +msgid "@1 cannot be repaired with an anvil." +msgstr "" + +#: init.lua:325 +msgid "Your @1 has been repaired successfully." +msgstr "" + +#~ msgid "Workpiece:" +#~ msgstr "Werkstueck:" + +#~ msgid "Optional" +#~ msgstr "Moegliche" + +#~ msgid "storage for" +#~ msgstr "Aufbewahrung fuer" + +#~ msgid "your hammer" +#~ msgstr "deinen Hammer" + +#~ msgid "Punch anvil with hammer to" +#~ msgstr "Schlage mit dem Hammer auf den Amboss um" + +#~ msgid "repair tool in workpiece-slot." +#~ msgstr "das Werkzeug im Werkstueckfeld zu reparieren." + +#~ msgid "anvil" +#~ msgstr "Amboss" + +#~ msgid "Anvil (owned by %s)" +#~ msgstr "Amboss (gehoert %s)" + +#~ msgid "Owner: %s" +#~ msgstr "Besitzer: %s" diff --git a/mods/anvil/locale/es.po b/mods/anvil/locale/es.po new file mode 100644 index 0000000..8e9216b --- /dev/null +++ b/mods/anvil/locale/es.po @@ -0,0 +1,69 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-07 22:17-0700\n" +"PO-Revision-Date: 2017-04-20 19:05 -0500\n" +"Last-Translator: Carlos Barraza \n" +"Language-Team: LANGUAGE \n" +"Language: Español\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua:19 +msgid "Steel blacksmithing hammer" +msgstr "Martillo de acero para la herrería" + +#: init.lua:20 +msgid "A tool for repairing other tools at a blacksmith's anvil." +msgstr "Es una herramienta para reparar otras herramientas en el yunque del herrero" + +#: init.lua:21 +msgid "" +"Use this hammer to strike blows upon an anvil bearing a damaged tool and you " +"can repair it. It can also be used for smashing stone, but it is not well " +"suited to this task." +msgstr "" +"Use este martillo para dar golpes sobre el yunque donde puso la herramienta dañada" +"Tambien puede ser usado para romper piedra pero no es muy adecuado para esa tarea." + +#: init.lua:98 +msgid "Anvil" +msgstr "Yunque" + +#: init.lua:99 +msgid "" +"A tool for repairing other tools in conjunction with a blacksmith's hammer." +msgstr "Es una herramienta para reparar de herramientas dañadas en conjunto con el martillo del herrero." + +#: init.lua:100 +msgid "" +"Right-click on this anvil with a damaged tool to place the damaged tool upon " +"it. You can then repair the damaged tool by striking it with a blacksmith's " +"hammer. Repeated blows may be necessary to fully repair a badly worn tool. " +"To retrieve the tool either punch or right-click the anvil with an empty " +"hand." +msgstr "" +"Haga clic derecho sobre este yunque con una herramienta dañada" +"Puede reparar la herramienta dañada golpeándola con el martillo del herrero" +"Para reparar completamente una herramienta puede dar varios golpes" +"Para sacar la herramienta, golpeela con la mano vacia o tambien con un clic derecho" + +#: init.lua:155 +msgid "This anvil is for damaged tools only." +msgstr "Este yunque es sólo para herramientas dañadas" + +#: init.lua:199 +msgid "@1 cannot be repaired with an anvil." +msgstr "" + +#: init.lua:267 +msgid "Your @1 has been repaired successfully." +msgstr "Su @1 ha sido reparado correctamente." diff --git a/mods/anvil/locale/fr.po b/mods/anvil/locale/fr.po new file mode 100644 index 0000000..788b9a4 --- /dev/null +++ b/mods/anvil/locale/fr.po @@ -0,0 +1,74 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-14 21:16-0600\n" +"PO-Revision-Date: 2017-06-26 12:22+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.0.2\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: init.lua:36 +msgid "Steel blacksmithing hammer" +msgstr "Marteau de forgeron en acier" + +#: init.lua:37 +msgid "A tool for repairing other tools at a blacksmith's anvil." +msgstr "Un outil pour réparer les autres outils avec une enclume de forgeron." + +#: init.lua:38 +msgid "" +"Use this hammer to strike blows upon an anvil bearing a damaged tool and you " +"can repair it. It can also be used for smashing stone, but it is not well " +"suited to this task." +msgstr "" +"Utilisez ce marteau pour frapper une enclume contenant un outil endommagé, " +"ainsi vous pourrez le réparer. Il peut être aussi utilisé pour casser de la " +"pierre, mais il n'est pas adapté à cette tâche." + +#: init.lua:136 +msgid "Anvil" +msgstr "Enclume" + +#: init.lua:137 +msgid "" +"A tool for repairing other tools in conjunction with a blacksmith's hammer." +msgstr "" +"Un outil pour réparer les autres outils à utiliser avec un marteau de " +"forgeron." + +#: init.lua:138 +msgid "" +"Right-click on this anvil with a damaged tool to place the damaged tool upon " +"it. You can then repair the damaged tool by striking it with a blacksmith's " +"hammer. Repeated blows may be necessary to fully repair a badly worn tool. " +"To retrieve the tool either punch or right-click the anvil with an empty " +"hand." +msgstr "" +"Cliquez-droit sur cette enclume avec un outil endommagé pour le placer " +"dessus. Vous pourrez alors réparer l'outil endommagé en le frappant avec un " +"marteau de forgeron. Des coups successifs seront nécessaires pour réparer " +"l'outil entièrement. Pour récupérer l'outil, frappez dessus ou faites un " +"click-droit en ayant la main vide." + +#: init.lua:193 +msgid "This anvil is for damaged tools only." +msgstr "L'enclume s'utilise sur les outils endommagés." + +#: init.lua:199 +msgid "@1 cannot be repaired with an anvil." +msgstr "" + +#: init.lua:325 +msgid "Your @1 has been repaired successfully." +msgstr "Votre @1 a été réparé avec succès." diff --git a/mods/anvil/locale/it.po b/mods/anvil/locale/it.po new file mode 100644 index 0000000..826625a --- /dev/null +++ b/mods/anvil/locale/it.po @@ -0,0 +1,72 @@ +# ITALIAN LOCALE FILE FOR THE ANVIL MODULE +# Copyright (C) 2017 Sokomine +# This file is distributed under the same license as the ANVIL package. +# Hamlet , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: Italian locale file for the Anvil module\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-14 21:16-0600\n" +"PO-Revision-Date: 2017-08-18 16:14+0100\n" +"Last-Translator: H4mlet \n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.6.10\n" + +#: init.lua:36 +msgid "Steel blacksmithing hammer" +msgstr "Martello da fabbro di acciaio" + +#: init.lua:37 +msgid "A tool for repairing other tools at a blacksmith's anvil." +msgstr "Un attrezzo per riparare altri attrezzi su di una incudine da fabbro." + +#: init.lua:38 +msgid "" +"Use this hammer to strike blows upon an anvil bearing a damaged tool and you " +"can repair it. It can also be used for smashing stone, but it is not well " +"suited to this task." +msgstr "" +"Usate questo martello per colpire una incudine su cui è posto un attrezzo " +"danneggiato e potrete ripararlo. Può anche essere usato per colpire la " +"pietra, ma non è molto adatto a questo compito." + +#: init.lua:136 +msgid "Anvil" +msgstr "Incudine" + +#: init.lua:137 +msgid "" +"A tool for repairing other tools in conjunction with a blacksmith's hammer." +msgstr "Un attrezzo per riparare altri attrezzi usando un martello da fabbro." + +#: init.lua:138 +msgid "" +"Right-click on this anvil with a damaged tool to place the damaged tool upon " +"it. You can then repair the damaged tool by striking it with a blacksmith's " +"hammer. Repeated blows may be necessary to fully repair a badly worn tool. " +"To retrieve the tool either punch or right-click the anvil with an empty " +"hand." +msgstr "" +"Fate click destro su questa incudine con un attrezzo danneggiato per " +"metterlo sull'incudine. Poi potrete ripararlo colpendolo con un martello da " +"fabbro. Potrebbero essere necessari più colpi per riparare un attrezzo " +"gravemente danneggiato. Per riprendere l'attrezzo colpite o fate click " +"destro sull'incudine a mani vuote." + +#: init.lua:193 +msgid "This anvil is for damaged tools only." +msgstr "Questa incudine è solo per attrezzi danneggiati." + +#: init.lua:199 +msgid "@1 cannot be repaired with an anvil." +msgstr "" + +#: init.lua:325 +msgid "Your @1 has been repaired successfully." +msgstr "La/il vostr* @1 è stat* riparat* con successo." diff --git a/mods/anvil/locale/template.pot b/mods/anvil/locale/template.pot new file mode 100644 index 0000000..44c68c3 --- /dev/null +++ b/mods/anvil/locale/template.pot @@ -0,0 +1,63 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-04-14 21:16-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua:36 +msgid "Steel blacksmithing hammer" +msgstr "" + +#: init.lua:37 +msgid "A tool for repairing other tools at a blacksmith's anvil." +msgstr "" + +#: init.lua:38 +msgid "" +"Use this hammer to strike blows upon an anvil bearing a damaged tool and you " +"can repair it. It can also be used for smashing stone, but it is not well " +"suited to this task." +msgstr "" + +#: init.lua:136 +msgid "Anvil" +msgstr "" + +#: init.lua:137 +msgid "" +"A tool for repairing other tools in conjunction with a blacksmith's hammer." +msgstr "" + +#: init.lua:138 +msgid "" +"Right-click on this anvil with a damaged tool to place the damaged tool upon " +"it. You can then repair the damaged tool by striking it with a blacksmith's " +"hammer. Repeated blows may be necessary to fully repair a badly worn tool. " +"To retrieve the tool either punch or right-click the anvil with an empty " +"hand." +msgstr "" + +#: init.lua:193 +msgid "This anvil is for damaged tools only." +msgstr "" + +#: init.lua:199 +msgid "@1 cannot be repaired with an anvil." +msgstr "" + +#: init.lua:325 +msgid "Your @1 has been repaired successfully." +msgstr "" diff --git a/mods/anvil/locale/update.bat b/mods/anvil/locale/update.bat new file mode 100644 index 0000000..e87d44c --- /dev/null +++ b/mods/anvil/locale/update.bat @@ -0,0 +1,6 @@ +@echo off +setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION +cd .. +set LIST= +for /r %%X in (*.lua) do set LIST=!LIST! %%X +..\intllib\tools\xgettext.bat %LIST% \ No newline at end of file diff --git a/mods/anvil/mod.conf b/mods/anvil/mod.conf new file mode 100644 index 0000000..2372a4a --- /dev/null +++ b/mods/anvil/mod.conf @@ -0,0 +1 @@ +name = anvil diff --git a/mods/anvil/screenshot.png b/mods/anvil/screenshot.png new file mode 100644 index 0000000..e3d3edb Binary files /dev/null and b/mods/anvil/screenshot.png differ diff --git a/mods/anvil/settingtypes.txt b/mods/anvil/settingtypes.txt new file mode 100644 index 0000000..9b845cc --- /dev/null +++ b/mods/anvil/settingtypes.txt @@ -0,0 +1 @@ +anvil_hammer_is_repairable (Hammer can be repaired on anvil) bool true diff --git a/mods/anvil/sounds/anvil_clang.ogg b/mods/anvil/sounds/anvil_clang.ogg new file mode 100644 index 0000000..f960a28 Binary files /dev/null and b/mods/anvil/sounds/anvil_clang.ogg differ diff --git a/mods/anvil/sounds/license.txt b/mods/anvil/sounds/license.txt new file mode 100644 index 0000000..b719c14 --- /dev/null +++ b/mods/anvil/sounds/license.txt @@ -0,0 +1 @@ +anvil_clang.ogg - from https://freesound.org/people/Benboncan/sounds/103631/ by Benboncan under the CC BY 3.0 license \ No newline at end of file diff --git a/mods/anvil/textures/anvil_spark.png b/mods/anvil/textures/anvil_spark.png new file mode 100644 index 0000000..a18643a Binary files /dev/null and b/mods/anvil/textures/anvil_spark.png differ diff --git a/mods/anvil/textures/anvil_tool_steelhammer.png b/mods/anvil/textures/anvil_tool_steelhammer.png new file mode 100644 index 0000000..6af375e Binary files /dev/null and b/mods/anvil/textures/anvil_tool_steelhammer.png differ diff --git a/mods/anvil/textures/license.txt b/mods/anvil/textures/license.txt new file mode 100644 index 0000000..4441a6d --- /dev/null +++ b/mods/anvil/textures/license.txt @@ -0,0 +1,2 @@ +License of the hammer picture: CC-by-SA; done by GloopMaster; source: +https://github.com/GloopMaster/glooptest/blob/master/glooptest/textures/glooptest_tool_steelhammer.png diff --git a/mods/aquaz/README.md b/mods/aquaz/README.md new file mode 100644 index 0000000..0129f47 --- /dev/null +++ b/mods/aquaz/README.md @@ -0,0 +1,7 @@ +# aquaz + +## Licenses + +- Code: GPLv3 +- Textures/Media: CC BY-SA 4.0 + diff --git a/mods/aquaz/init.lua b/mods/aquaz/init.lua new file mode 100644 index 0000000..1344822 --- /dev/null +++ b/mods/aquaz/init.lua @@ -0,0 +1,580 @@ +-- +-- Aquaz +-- + +aquaz = {} + +local modname = "aquaz" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +local function plant_on_place(itemstack, placer, pointed_thing) + -- Call on_rightclick if the pointed node defines it + if pointed_thing.type == "node" and placer and not placer:get_player_control().sneak then + local node_ptu = minetest.get_node(pointed_thing.under) + local def_ptu = minetest.registered_nodes[node_ptu.name] + if def_ptu and def_ptu.on_rightclick then + return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer, + itemstack, pointed_thing) + end + end + + local pos = pointed_thing.under + if minetest.get_node(pos).name ~= "default:sand" then + return itemstack + end + local pos_top = {x = pos.x, y = pos.y + 0.99, z = pos.z} + local node_top = minetest.get_node(pos_top) + local def_top = minetest.registered_nodes[node_top.name] + local player_name = placer:get_player_name() + + if def_top and def_top.liquidtype == "source" and + minetest.get_item_group(node_top.name, "water") > 0 then + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pos_top, player_name) then + minetest.set_node(pos, {name = itemstack:get_name()}) + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, S("Node is protected")) + minetest.record_protection_violation(pos, player_name) + end + end + return itemstack +end + +local function algae_on_place(itemstack, placer, pointed_thing) + -- Call on_rightclick if the pointed node defines it + if pointed_thing.type == "node" and placer and not placer:get_player_control().sneak then + local node_ptu = minetest.get_node(pointed_thing.under) + local def_ptu = minetest.registered_nodes[node_ptu.name] + if def_ptu and def_ptu.on_rightclick then + return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer, + itemstack, pointed_thing) + end + end + + local pos = pointed_thing.under + if minetest.get_node(pos).name ~= "default:sand" then + return itemstack + end + + local height = math.random(4, 6) + local pos_top = {x = pos.x, y = pos.y + height, z = pos.z} + local node_top = minetest.get_node(pos_top) + local def_top = minetest.registered_nodes[node_top.name] + local player_name = placer:get_player_name() + + if def_top and def_top.liquidtype == "source" and + minetest.get_item_group(node_top.name, "water") > 0 then + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pos_top, player_name) then + minetest.set_node(pos, {name = itemstack:get_name(), + param2 = height * 16}) + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, S("Node is protected")) + minetest.record_protection_violation(pos, player_name) + end + end + return itemstack +end + +-- +-- Nodes +-- + +aquaz.corals = { + { + name = "aquaz:rhodophyta", + description= "Rhodophyta Coral", + tiles = "aquaz_rhodophyta_base.png", + special_tiles = "aquaz_rhodophyta_top.png", + inventory_image = "aquaz_rhodophyta_inv.png", + }, + { + name = "aquaz:psammocora", + description= "Psammocora Coral", + tiles = "aquaz_psammocora_base.png", + special_tiles = "aquaz_psammocora_top.png", + inventory_image = "aquaz_psammocora_inv.png", + }, + { + name = "aquaz:sarcophyton", + description= "Sarcophyton Coral", + tiles = "aquaz_sarcophyton_base.png", + special_tiles = "aquaz_sarcophyton_top.png", + inventory_image = "aquaz_sarcophyton_inv.png", + }, + { + name = "aquaz:carnation", + description= "Carnation Coral", + tiles = "aquaz_carnation_base.png", + special_tiles = "aquaz_carnation_top.png", + inventory_image = "aquaz_carnation_inv.png", + }, + { + name = "aquaz:fiery_red", + description= "Fiery Red Coral", + tiles = "aquaz_fiery_red_base.png", + special_tiles = "aquaz_fiery_red_top.png", + inventory_image = "aquaz_fiery_red_inv.png", + }, + { + name = "aquaz:acropora", + description= "Acropora Coral", + tiles = "aquaz_acropora_base.png", + special_tiles = "aquaz_acropora_top.png", + inventory_image = "aquaz_acropora_inv.png", + }, +} + +for i = 1, #aquaz.corals do + minetest.register_node(aquaz.corals[i].name, { + description = S(aquaz.corals[i].description), + drawtype = "plantlike_rooted", + visual_scale = 1.0, + tiles = {aquaz.corals[i].tiles}, + special_tiles = { + nil, + nil, + aquaz.corals[i].special_tiles, + aquaz.corals[i].special_tiles, + aquaz.corals[i].special_tiles, + aquaz.corals[i].special_tiles + }, + inventory_image = aquaz.corals[i].inventory_image, + paramtype = "light", + walkable = true, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, + }) +end + +aquaz.algaes = { + { + name = "aquaz:calliarthon_kelp", + description="Calliarthron Kelp", + texture = "aquaz_calliarthron_kelp.png" + }, + { + name = "aquaz:sea_blade_coral", + description="Sea Blade Coral", + texture = "aquaz_sea_blade_coral.png" + }, +} + +for i = 1, #aquaz.algaes do + minetest.register_node(aquaz.algaes[i].name, { + description = S(aquaz.algaes[i].description), + drawtype = "plantlike_rooted", + waving = 1, + tiles = {"default_sand.png"}, + special_tiles = {{name = aquaz.algaes[i].texture, tileable_vertical = true}}, + inventory_image = aquaz.algaes[i].texture, + paramtype = "light", + paramtype2 = "leveled", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-2/16, 0.5, -2/16, 2/16, 3.5, 2/16}, + }, + }, + node_dig_prediction = "default:sand", + node_placement_prediction = "", + sounds = default.node_sound_sand_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = algae_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:sand"}) + end + }) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "aquaz:corals", + decoration = { + "aquaz:psammocora", + "aquaz:rhodophyta", + "aquaz:sarcophyton", + "aquaz:carnation", + "aquaz:fiery_red", + "aquaz:acropora", + }, + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = -0.04, + scale = 0.05, + spread = {x = 200, y = 200, z = 200}, + seed = 25345, + octaves = 3, + persist = 0.7 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -2, + y_min = -10, + flags = "force_placement", + }) +end + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "aquaz:kelps", + decoration = { + "aquaz:calliarthon_kelp", + "aquaz:sea_blade_coral" + }, + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = 0.005, + scale = 0.004, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -5, + y_min = -10, + flags = "force_placement", + param2 = 48, + param2_max = 96, + }) +end + +aquaz.grass= { + { + name = "aquaz:grass", + description= "Aquatic Grass", + special_tiles = "aquaz_grass.png", + }, + { + name = "aquaz:tall_grass", + description= "Aquatic Tall Grass", + special_tiles = "aquaz_tall_grass.png", + }, + { + name = "aquaz:stars_anemons", + description= "Grass with Stars and Anemons", + special_tiles = "aquaz_stars_anemons.png", + drop = "aquaz:tall_grass" + }, + { + name = "aquaz:stars_anemons_2", + description= "Grass with Stars and Anemons", + special_tiles = "aquaz_stars_anemons_2.png", + drop = "aquaz:tall_grass" + }, +} + +for i = 1, #aquaz.grass do + local drop + if aquaz.grass[i].drop then + drop = aquaz.grass[i].drop + else + drop = aquaz.grass[i].name + end + minetest.register_node(aquaz.grass[i].name, { + description = aquaz.grass[i].description, + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_sand.png"}, + special_tiles = {{name = aquaz.grass[i].special_tiles, tileable_vertical = true}}, + inventory_image = aquaz.grass[i].special_tiles, + wield_image = aquaz.grass[i].special_tiles, + drop = drop, + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:sand", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = plant_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:sand"}) + end, + }) +end + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "aquaz:grass", + decoration = { + "aquaz:grass", + }, + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = 0.0025, + scale = 0.04, + spread = {x = 250, y = 250, z = 250}, + seed = 23232, + octaves = 3, + persist = 0.66 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -5, + y_min = -10, + flags = "force_placement", + param2 = 48, + param2_max = 96, + }) + minetest.register_decoration({ + name = "aquaz:tall_grass", + decoration = { + "aquaz:tall_grass", + }, + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = 0.00125, + scale = 0.04, + spread = {x = 250, y = 250, z = 250}, + seed = 2323, + octaves = 3, + persist = 0.66 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -5, + y_min = -10, + flags = "force_placement", + param2 = 48, + param2_max = 96, + }) + minetest.register_decoration({ + name = "aquaz:stars_anemons", + decoration = { + "aquaz:stars_anemons", + }, + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.04, + spread = {x = 250, y = 250, z = 250}, + seed = 733, + octaves = 3, + persist = 0.66 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -5, + y_min = -10, + flags = "force_placement", + param2 = 48, + param2_max = 96, + }) + minetest.register_decoration({ + name = "aquaz:stars_anemons_2", + decoration = { + "aquaz:stars_anemons_2", + }, + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.04, + spread = {x = 250, y = 250, z = 250}, + seed = 733, + octaves = 3, + persist = 0.66 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -5, + y_min = -10, + flags = "force_placement", + param2 = 48, + param2_max = 96, + }) +end + +--Wrecked Pillar + +aquaz.wrecked_pillar = { + { + name = "aquaz:wrecked_pillar_base", + description= "Wrecked Pillar Base", + tile = "aquaz_base_pillar.png" + }, + { + name = "aquaz:wrecked_pillar_shaft", + description= "Wrecked Pillar Shaft", + tile = "aquaz_shaft_pillar.png" + }, + { + name = "aquaz:wrecked_pillar_capital", + description= "Wrecked Pillar Capital", + tile = "aquaz_capital_pillar.png" + }, +} + +for i = 1, #aquaz.wrecked_pillar do + minetest.register_node(aquaz.wrecked_pillar[i].name, { + description = S(aquaz.wrecked_pillar[i].description), + tiles = { + "aquaz_up_down_pillar.png", + "aquaz_up_down_pillar.png", + aquaz.wrecked_pillar[i].tile, + }, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), + }) +end + +aquaz.coral_deco = { + { + name = "aquaz:purple_alga", + description= "Purple Alga Remains", + tile = "aquaz_purple_alga.png" + }, + { + name = "aquaz:orange_alga", + description= "Orange Alga Remains", + tile = "aquaz_orange_alga.png" + }, + { + name = "aquaz:red_alga", + description= "Red Alga Remains", + tile = "aquaz_red_alga.png" + }, +} + +for i = 1, #aquaz.coral_deco do + minetest.register_node(aquaz.coral_deco[i].name, { + description = S(aquaz.coral_deco[i].description), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {aquaz.coral_deco[i].tile}, + use_texture_alpha = true, + inventory_image = aquaz.coral_deco[i].tile, + wield_image = aquaz.coral_deco[i].tile, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.499, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), + + on_use = minetest.item_eat(4), + }) +end + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "aquaz:algaes", + decoration = { + "aquaz:purple_alga", + "aquaz:orange_alga", + "aquaz:red_alga", + }, + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.0004, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = 2, + y_min = 1, + flags = "force_placement", + }) +end + +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:sand"}, + place_offset_y = 1, + sidelen = 16, + fill_ratio = 0.0001, + biomes = { + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean" + }, + y_max = -6, + y_min = -10, + schematic = modpath .. "/schematics/wrecked_pillar.mts", + rotation = "random", + flags = "force_placement, place_center_x, place_center_z", +}) diff --git a/mods/aquaz/locale/aquaz.es.tr b/mods/aquaz/locale/aquaz.es.tr new file mode 100644 index 0000000..1d83538 --- /dev/null +++ b/mods/aquaz/locale/aquaz.es.tr @@ -0,0 +1,16 @@ +# textdomain: aquaz +Node is protected=El nodo está protegido +Rhodophyta Coral=Coral Rhodophyta +Psammocora Coral=Coral Psammocora +Sarcophyton Coral= Coral Sarcophyton +Carnation Coral=Coral Carnation +Calliarthron Kelp= Alga Calliarthron +Sea Blade Coral=Coral Hoja de espada +Acropora Coral=Coral Acropora +Fiery Red Coral=Coral Fiero Rojo +Wrecked Pillar Base=Base de pilar ruinoso +Wrecked Pillar Shaft=Fuste de pilar ruinoso +Wrecked Pillar Capital=Capitel de pilar ruinoso +Purple Alga Remains=Restos de alga púrpura +Orange Alga Remains=Restos de alga naranja +Red Alga Remains=Restos de alga roja diff --git a/mods/aquaz/mod.conf b/mods/aquaz/mod.conf new file mode 100644 index 0000000..5aa49b4 --- /dev/null +++ b/mods/aquaz/mod.conf @@ -0,0 +1,3 @@ +name = aquaz +description = Stuff for oceans +depends = default diff --git a/mods/aquaz/schematics/wrecked_pillar.mts b/mods/aquaz/schematics/wrecked_pillar.mts new file mode 100644 index 0000000..7823b13 Binary files /dev/null and b/mods/aquaz/schematics/wrecked_pillar.mts differ diff --git a/mods/aquaz/textures/aquaz_acropora_base.png b/mods/aquaz/textures/aquaz_acropora_base.png new file mode 100644 index 0000000..b4014f2 Binary files /dev/null and b/mods/aquaz/textures/aquaz_acropora_base.png differ diff --git a/mods/aquaz/textures/aquaz_acropora_inv.png b/mods/aquaz/textures/aquaz_acropora_inv.png new file mode 100644 index 0000000..000c69c Binary files /dev/null and b/mods/aquaz/textures/aquaz_acropora_inv.png differ diff --git a/mods/aquaz/textures/aquaz_acropora_top.png b/mods/aquaz/textures/aquaz_acropora_top.png new file mode 100644 index 0000000..1a22683 Binary files /dev/null and b/mods/aquaz/textures/aquaz_acropora_top.png differ diff --git a/mods/aquaz/textures/aquaz_base_pillar.png b/mods/aquaz/textures/aquaz_base_pillar.png new file mode 100644 index 0000000..20f60f0 Binary files /dev/null and b/mods/aquaz/textures/aquaz_base_pillar.png differ diff --git a/mods/aquaz/textures/aquaz_calliarthron.png b/mods/aquaz/textures/aquaz_calliarthron.png new file mode 100644 index 0000000..0c9fdd2 Binary files /dev/null and b/mods/aquaz/textures/aquaz_calliarthron.png differ diff --git a/mods/aquaz/textures/aquaz_calliarthron_kelp.png b/mods/aquaz/textures/aquaz_calliarthron_kelp.png new file mode 100644 index 0000000..36c85c4 Binary files /dev/null and b/mods/aquaz/textures/aquaz_calliarthron_kelp.png differ diff --git a/mods/aquaz/textures/aquaz_capital_pillar.png b/mods/aquaz/textures/aquaz_capital_pillar.png new file mode 100644 index 0000000..5f0ea25 Binary files /dev/null and b/mods/aquaz/textures/aquaz_capital_pillar.png differ diff --git a/mods/aquaz/textures/aquaz_carnation_base.png b/mods/aquaz/textures/aquaz_carnation_base.png new file mode 100644 index 0000000..cbd553c Binary files /dev/null and b/mods/aquaz/textures/aquaz_carnation_base.png differ diff --git a/mods/aquaz/textures/aquaz_carnation_inv.png b/mods/aquaz/textures/aquaz_carnation_inv.png new file mode 100644 index 0000000..ce0c2a4 Binary files /dev/null and b/mods/aquaz/textures/aquaz_carnation_inv.png differ diff --git a/mods/aquaz/textures/aquaz_carnation_top.png b/mods/aquaz/textures/aquaz_carnation_top.png new file mode 100644 index 0000000..e7c809d Binary files /dev/null and b/mods/aquaz/textures/aquaz_carnation_top.png differ diff --git a/mods/aquaz/textures/aquaz_coral_base.png b/mods/aquaz/textures/aquaz_coral_base.png new file mode 100644 index 0000000..42184e0 Binary files /dev/null and b/mods/aquaz/textures/aquaz_coral_base.png differ diff --git a/mods/aquaz/textures/aquaz_coral_base2.png b/mods/aquaz/textures/aquaz_coral_base2.png new file mode 100644 index 0000000..c5c47c8 Binary files /dev/null and b/mods/aquaz/textures/aquaz_coral_base2.png differ diff --git a/mods/aquaz/textures/aquaz_fiery_red_base.png b/mods/aquaz/textures/aquaz_fiery_red_base.png new file mode 100644 index 0000000..8ac91b8 Binary files /dev/null and b/mods/aquaz/textures/aquaz_fiery_red_base.png differ diff --git a/mods/aquaz/textures/aquaz_fiery_red_inv.png b/mods/aquaz/textures/aquaz_fiery_red_inv.png new file mode 100644 index 0000000..1d83b50 Binary files /dev/null and b/mods/aquaz/textures/aquaz_fiery_red_inv.png differ diff --git a/mods/aquaz/textures/aquaz_fiery_red_top.png b/mods/aquaz/textures/aquaz_fiery_red_top.png new file mode 100644 index 0000000..e2fd018 Binary files /dev/null and b/mods/aquaz/textures/aquaz_fiery_red_top.png differ diff --git a/mods/aquaz/textures/aquaz_grass.png b/mods/aquaz/textures/aquaz_grass.png new file mode 100644 index 0000000..41ef0cc Binary files /dev/null and b/mods/aquaz/textures/aquaz_grass.png differ diff --git a/mods/aquaz/textures/aquaz_orange_alga.png b/mods/aquaz/textures/aquaz_orange_alga.png new file mode 100644 index 0000000..e77632f Binary files /dev/null and b/mods/aquaz/textures/aquaz_orange_alga.png differ diff --git a/mods/aquaz/textures/aquaz_psammocora_base.png b/mods/aquaz/textures/aquaz_psammocora_base.png new file mode 100644 index 0000000..246ab0f Binary files /dev/null and b/mods/aquaz/textures/aquaz_psammocora_base.png differ diff --git a/mods/aquaz/textures/aquaz_psammocora_inv.png b/mods/aquaz/textures/aquaz_psammocora_inv.png new file mode 100644 index 0000000..1afaf58 Binary files /dev/null and b/mods/aquaz/textures/aquaz_psammocora_inv.png differ diff --git a/mods/aquaz/textures/aquaz_psammocora_top.png b/mods/aquaz/textures/aquaz_psammocora_top.png new file mode 100644 index 0000000..c44e8a6 Binary files /dev/null and b/mods/aquaz/textures/aquaz_psammocora_top.png differ diff --git a/mods/aquaz/textures/aquaz_purple_alga.png b/mods/aquaz/textures/aquaz_purple_alga.png new file mode 100644 index 0000000..7cec92a Binary files /dev/null and b/mods/aquaz/textures/aquaz_purple_alga.png differ diff --git a/mods/aquaz/textures/aquaz_red_alga.png b/mods/aquaz/textures/aquaz_red_alga.png new file mode 100644 index 0000000..20e5cd7 Binary files /dev/null and b/mods/aquaz/textures/aquaz_red_alga.png differ diff --git a/mods/aquaz/textures/aquaz_rhodophyta_base.png b/mods/aquaz/textures/aquaz_rhodophyta_base.png new file mode 100644 index 0000000..63d74cd Binary files /dev/null and b/mods/aquaz/textures/aquaz_rhodophyta_base.png differ diff --git a/mods/aquaz/textures/aquaz_rhodophyta_inv.png b/mods/aquaz/textures/aquaz_rhodophyta_inv.png new file mode 100644 index 0000000..3ddca0d Binary files /dev/null and b/mods/aquaz/textures/aquaz_rhodophyta_inv.png differ diff --git a/mods/aquaz/textures/aquaz_rhodophyta_top.png b/mods/aquaz/textures/aquaz_rhodophyta_top.png new file mode 100644 index 0000000..b7237a9 Binary files /dev/null and b/mods/aquaz/textures/aquaz_rhodophyta_top.png differ diff --git a/mods/aquaz/textures/aquaz_sarcophyton_base.png b/mods/aquaz/textures/aquaz_sarcophyton_base.png new file mode 100644 index 0000000..3a3c07b Binary files /dev/null and b/mods/aquaz/textures/aquaz_sarcophyton_base.png differ diff --git a/mods/aquaz/textures/aquaz_sarcophyton_inv.png b/mods/aquaz/textures/aquaz_sarcophyton_inv.png new file mode 100644 index 0000000..e3fc2b0 Binary files /dev/null and b/mods/aquaz/textures/aquaz_sarcophyton_inv.png differ diff --git a/mods/aquaz/textures/aquaz_sarcophyton_top.png b/mods/aquaz/textures/aquaz_sarcophyton_top.png new file mode 100644 index 0000000..e558286 Binary files /dev/null and b/mods/aquaz/textures/aquaz_sarcophyton_top.png differ diff --git a/mods/aquaz/textures/aquaz_sea_blade_coral.png b/mods/aquaz/textures/aquaz_sea_blade_coral.png new file mode 100644 index 0000000..0dcd40e Binary files /dev/null and b/mods/aquaz/textures/aquaz_sea_blade_coral.png differ diff --git a/mods/aquaz/textures/aquaz_shaft_pillar.png b/mods/aquaz/textures/aquaz_shaft_pillar.png new file mode 100644 index 0000000..d6ab877 Binary files /dev/null and b/mods/aquaz/textures/aquaz_shaft_pillar.png differ diff --git a/mods/aquaz/textures/aquaz_stars_anemons.png b/mods/aquaz/textures/aquaz_stars_anemons.png new file mode 100644 index 0000000..f4a3ebe Binary files /dev/null and b/mods/aquaz/textures/aquaz_stars_anemons.png differ diff --git a/mods/aquaz/textures/aquaz_stars_anemons_2.png b/mods/aquaz/textures/aquaz_stars_anemons_2.png new file mode 100644 index 0000000..be437d1 Binary files /dev/null and b/mods/aquaz/textures/aquaz_stars_anemons_2.png differ diff --git a/mods/aquaz/textures/aquaz_sword_plant.png b/mods/aquaz/textures/aquaz_sword_plant.png new file mode 100644 index 0000000..833b8fc Binary files /dev/null and b/mods/aquaz/textures/aquaz_sword_plant.png differ diff --git a/mods/aquaz/textures/aquaz_tall_grass.png b/mods/aquaz/textures/aquaz_tall_grass.png new file mode 100644 index 0000000..f814327 Binary files /dev/null and b/mods/aquaz/textures/aquaz_tall_grass.png differ diff --git a/mods/aquaz/textures/aquaz_up_down_pillar.png b/mods/aquaz/textures/aquaz_up_down_pillar.png new file mode 100644 index 0000000..91d1bb7 Binary files /dev/null and b/mods/aquaz/textures/aquaz_up_down_pillar.png differ diff --git a/mods/aquaz/textures/aquaz_yellow_coral.png b/mods/aquaz/textures/aquaz_yellow_coral.png new file mode 100644 index 0000000..cbe7b8a Binary files /dev/null and b/mods/aquaz/textures/aquaz_yellow_coral.png differ diff --git a/mods/awards/.gitattributes b/mods/awards/.gitattributes new file mode 100644 index 0000000..412eeda --- /dev/null +++ b/mods/awards/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/mods/awards/.gitignore b/mods/awards/.gitignore new file mode 100644 index 0000000..b9d6bd9 --- /dev/null +++ b/mods/awards/.gitignore @@ -0,0 +1,215 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg diff --git a/mods/awards/.luacheckrc b/mods/awards/.luacheckrc new file mode 100644 index 0000000..f6b420e --- /dev/null +++ b/mods/awards/.luacheckrc @@ -0,0 +1,14 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", "awards", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + "vector", "default", "ItemStack", + "dump", "sfinv", "intllib", + "unified_inventory", +} diff --git a/mods/awards/.travis.yml b/mods/awards/.travis.yml new file mode 100644 index 0000000..077e778 --- /dev/null +++ b/mods/awards/.travis.yml @@ -0,0 +1,12 @@ +language: generic +sudo: false +addons: + apt: + packages: + - luarocks +before_install: + - luarocks install --local luacheck +script: +- $HOME/.luarocks/bin/luacheck --no-color . +notifications: + email: false diff --git a/mods/awards/LICENSE.txt b/mods/awards/LICENSE.txt new file mode 100644 index 0000000..b9bc22e --- /dev/null +++ b/mods/awards/LICENSE.txt @@ -0,0 +1,19 @@ +Copyright (c) 2013-8 rubenwardy + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/mods/awards/README.md b/mods/awards/README.md new file mode 100644 index 0000000..e570f0e --- /dev/null +++ b/mods/awards/README.md @@ -0,0 +1,295 @@ +# Awards + +Adds awards/achievements to Minetest (plus a very good API). + +by [rubenwardy](https://rubenwardy.com), licensed under MIT. +With thanks to Wuzzy, kaeza, and MrIbby. + +Majority of awards are back ported from Calinou's old fork in Carbone, under same license. + + +# Introduction + +## Awards and Triggers + +An award is a single unlockable unit, registered like so: + +```lua +awards.register_award("mymod:award", { + description = "My Example Award", +}) +``` + +Awards are unlocked either using `awards.unlock()` or by a trigger being +fullfilled. A trigger is a condition which unlocks an award. Triggers are +registered at the same time as an award is registered: + +```lua +awards.register_award("mymod:award", { + description = "My Example Award", + trigger = { + type = "dig", + node = "default:stone", + target = 10, + }, +}) +``` + +The above trigger type is an example of a counted_key trigger: +rather than a single counter there's a counter per key - in this +case the key is the value of the `node` field. If you leave out +the key in a `counted_key` trigger, then the total will be used +instead. For example, here is an award which unlocks after you've +placed 10 nodes of any type: + +```lua +awards.register_award("mymod:award", { + description = "Place 10 nodes!", + trigger = { + type = "place", + target = 10, + }, +}) +``` + +You can also register an *Unlock Function*, which can return the name of an +award to unlock it: + +```lua +awards.register_award("mymod:award", { + title = "Lava Miner", + description = "Mine any block while being very close to lava.", +}) + +awards.register_on_dig(function(player, data) + local pos = player:get_pos() + if pos and (minetest.find_node_near(pos, 1, "default:lava_source") or + minetest.find_node_near(pos, 1, "default:lava_flowing")) then + return "mymod:award" + end + return nil +end) +``` + +The above is a bad example as you don't actually need the stats data given. +It would be better to register a `dignode` callback and call `awards.unlock()` +if the condition is met. + +## Trigger Types + +The trigger type is used to determine which event will cause the trigger will be +fulfilled. The awards mod comes with a number of predefined types, documented +in [Builtin Trigger Types](#builtin-trigger-types). + +Trigger types are registered like so: + +```lua +awards.register_trigger("chat", { + type = "counted", + progress = "@1/@2 chat messages", + auto_description = { "Send a chat message", "Chat @1 times" }, +}) + +minetest.register_on_chat_message(function(name, message) + local player = minetest.get_player_by_name(name) + if not player or string.find(message, "/") then + return + end + awards.notify_chat(player) +end) +``` + +A trigger type has a type as well, which determines how the data is stored and +also how the trigger is fulfilled. + +**Trigger Type Types:** + +* **custom** requires you handle the calling of awards.unlock() yourself. You also + need to implement on_register() yourself. You'll also probably want to implement + `on_register()` to catch awards registered with your trigger type. +* **counted** stores a single counter for each player which is incremented by calling + `trigger:notify(player)`. Good for homogenous actions like number of chat messages, + joins, and the like. +* **counted_key** stores a table of counters each indexed by a key. There is also + a total field (`__total`) which stores the sum of all counters. A counter is + incremented by calling `trigger:notify(player, key)`. This is good for things like + placing nodes or crafting items, where the key will be the item or node name. + If `key` is an item, then you should also add `key_is_item = true` to the + trigger type definition. + +As said, you could use a custom trigger if none of the other ones match your needs. +Here's an example. + +```lua +awards.register_trigger("foo", { + type = "custom", + progress = "@1/@2 foos", + auto_description = { "Do a foo", "Foo @1 times" }, +}) + +minetest.register_on_foo(function() + for _, trigger in pairs(awards.on.foo) do + -- trigger is either a trigger tables or + -- or an unlock function. + + -- some complex logic + if condition then + awards.unlock(trigger) + end + end +end) + +``` + +## Award Difficulty + +Difficulty is used to determine how awards are sorted in awards lists. + +If the award trigger is counted, ie: the trigger requires a `target` property, +then the difficulty multipler is timesd by `target` to get the overall difficulty. +If the award isn't a counted type then the difficulty multiplier is used as the +overal difficulty. Award difficulty affects how awards are sorted in a list - +more difficult awards are further down the list. + +In real terms, `difficulty` is a relative difficulty to do one unit of the trigger +if its counted, otherwise it's the relative difficulty of completely doing the +award (if not-counted). For the `dig` trigger type, 1 unit would be 1 node dug. + + +Actual code used to calculate award difficulty: + +```lua +local difficulty = def.difficulty or 1 +if def.trigger and def.trigger.target then + difficulty = difficulty * def.trigger.target +end +``` + + +# API + +* awards.register_award(name, def), the def table has the following fields: + * `title` - title of the award (defaults to name) + * `description` - longer description of the award, displayed in Awards tab + * `difficulty` - see [Award Difficulty](#award-difficulty). + * `requires` - list of awards that need to be unlocked before this one + is visible. + * `prizes` - list of items to give when you earn the award + * `secret` - boolean if this award is secret (i.e. showed on awards list) + * `sound` - `SimpleSoundSpec` table to play on unlock. + `false` to disable unlock sound. + * `icon` - the icon image, use default otherwise. + * `background` - the background image, use default otherwise. + * `trigger` - trigger definition, see [Builtin Trigger Types](#builtin-trigger-types). + * `on_unlock(name, def)` - callback on unlock. +* awards.register_trigger(name, def), the def table has the following fields: + * `type` - see [Trigger Types](#trigger-types). + * `progress` - used to format progress, defaults to "%1/%2". + * `auto_description` - a table of two elements. Each element is a format string. Element 1 is singular, element 2 is plural. Used for the award description (not title) if none is given. + * `on_register(award_def)` - called when an award registers with this type. + * "counted_key" only: + * `auto_description_total` - Used if the trigger is for the total. + * `get_key(self, def)` - get key for particular award, return nil for a total. + * `key_is_item` - true if the key is an item name. On notify(), + any watched groups will also be notified as `group:groupname` keys. +* awards.register_on_unlock(func(name, def)) + * name is the player name + * def is the award def. + * return true to cancel HUD +* awards.unlock(name, award) + * gives an award to a player + * name is the player name + +## Builtin Trigger Types + +Callbacks (register a function to be run) + +* dig type: Dig a node. + * node: the dug node type. If nil, all dug nodes are counted +* place type: Place a node. + * node: the placed node type. If nil, all placed nodes are counted +* craft type: Craft something. + * item: the crafted item type. If nil, all crafted items are counted +* death type: Die. + * reason: the death reason, one of the types in PlayerHPChangeReason (see lua_api.txt) + or nil for total deaths. +* chat type: Write a chat message. +* join type: Join the server. +* eat type: Eat an item. + * item: the eaten item type. If nil, all eaten items are counted + +(for all types) target - how many times to dig/place/craft/etc. + +Each type has a register function like so: + +* awards.register_on_TRIGGERTYPE(func(player, data)) + * data is the player stats data + * return award name or null + +### dig + +```lua +trigger = { + type = "dig", + node = "default:dirt", -- item, alias, or group + target = 50, +} +``` + +### place + +```lua +trigger = { + type = "place", + node = "default:dirt", -- item, alias, or group + target = 50, +} +``` + +### craft + +```lua +trigger = { + type = "craft", + item = "default:dirt", -- item, alias, or group + target = 50, +} +``` + +### death + +```lua +trigger = { + type = "death", + reason = "fall", + target = 5, +} +``` + +### chat + +```lua +trigger = { + type = "chat", + target = 100, +} +``` + +### join + +```lua +trigger = { + type = "join", + target = 100, +} +``` + +### eat + +```lua +trigger = { + type = "eat", + item = "default:apple", + target = 100, +} +``` diff --git a/mods/awards/depends.txt b/mods/awards/depends.txt new file mode 100644 index 0000000..c8f3f2d --- /dev/null +++ b/mods/awards/depends.txt @@ -0,0 +1,14 @@ +intllib? +sfinv? +unified_inventory? +default? +stairs? +farming? +dye? +beds? +wool? +vessels? +moreblocks? +fire? +flowers? +nyancat? diff --git a/mods/awards/init.lua b/mods/awards/init.lua new file mode 100644 index 0000000..98f054a --- /dev/null +++ b/mods/awards/init.lua @@ -0,0 +1,36 @@ +-- Copyright (c) 2013-18 rubenwardy. MIT. + +-- The global award namespace +awards = { + show_mode = "hud", + registered_triggers = {}, +} + +-- Internationalization support. +awards.gettext, awards.ngettext = dofile(minetest.get_modpath("awards").."/src/intllib.lua") + +-- Load files +dofile(minetest.get_modpath("awards").."/src/data.lua") +dofile(minetest.get_modpath("awards").."/src/api_awards.lua") +dofile(minetest.get_modpath("awards").."/src/api_triggers.lua") +dofile(minetest.get_modpath("awards").."/src/chat_commands.lua") +dofile(minetest.get_modpath("awards").."/src/gui.lua") +dofile(minetest.get_modpath("awards").."/src/triggers.lua") +dofile(minetest.get_modpath("awards").."/src/awards.lua") + +awards.load() +minetest.register_on_shutdown(awards.save) + + +-- Backwards compatibility +awards.give_achievement = awards.unlock +awards.getFormspec = awards.get_formspec +awards.showto = awards.show_to +awards.register_onDig = awards.register_on_dig +awards.register_onPlace = awards.register_on_place +awards.register_onDeath = awards.register_on_death +awards.register_onChat = awards.register_on_chat +awards.register_onJoin = awards.register_on_join +awards.register_onCraft = awards.register_on_craft +awards.def = awards.registered_awards +awards.register_achievement = awards.register_award diff --git a/mods/awards/locale/de.po b/mods/awards/locale/de.po new file mode 100644 index 0000000..443c1b3 --- /dev/null +++ b/mods/awards/locale/de.po @@ -0,0 +1,824 @@ +# German translations for PACKAGE package. +# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Wuzzy2, 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 05:35-0300\n" +"PO-Revision-Date: 2017-02-21 04:19-0300\n" +"Last-Translator: Wuzzy2\n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: api.lua +msgid "Secret Achievement Unlocked:" +msgstr "Geheime Auszeichnung erhalten:" + +#: api.lua +msgid "Achievement Unlocked:" +msgstr "Auszeichnung erhalten:" + +#: api.lua +#, lua-format +msgid "Secret Achievement Unlocked: %s" +msgstr "Geheime Auszeichnung erhalten: %s" + +#: api.lua +#, lua-format +msgid "Achievement Unlocked: %s" +msgstr "Auszeichnung erhalten: %s" + +#: api.lua +msgid "Secret Achievement Unlocked!" +msgstr "Geheime Auszeichnung erhalten!" + +#: api.lua +msgid "Achievement Unlocked!" +msgstr "Auszeichnung erhalten:" + +#: api.lua +msgid "Error: No awards available." +msgstr "Fehler: Keine Auszeichnungen vorhanden." + +#: api.lua +msgid "OK" +msgstr "OK" + +#: api.lua +msgid "(Secret Award)" +msgstr "(Geheime Auszeichnung)" + +#: api.lua +msgid "Unlock this award to find out what it is." +msgstr "Verdienen Sie sich diese Auszeichnung, um herauszufinden, was sie ist." + +#: api.lua +#, lua-format +msgid "%s (got)" +msgstr "%s (erhalten)" + +#: api.lua +msgid "You've disabled awards. Type /awards enable to reenable." +msgstr "" +"Sie haben die Auszeichnungen deaktiviert. Geben Sie »/awards enable« ein, um " +"sie wieder zu aktivieren." + +#: api.lua +msgid "You have not unlocked any awards." +msgstr "Sie haben noch keine Auszeichnungen." + +#: api.lua +#, lua-format +msgid "%s’s awards:" +msgstr "%ss Auszeichnungen:" + +#: api.lua chat_commands.lua +#, lua-format +msgid "%s: %s" +msgstr "%s: %s" + +#: sfinv.lua unified_inventory.lua +msgid "Awards" +msgstr "Auszeichnungen" + +#: triggers.lua +msgid "@1/@2 dug" +msgstr "@1/@2 abgebaut" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Mine: @2" +msgid_plural "Mine: @1×@2" +msgstr[0] "Bauen Sie einen Block ab: @2" +msgstr[1] "Bauen Sie Blöcke ab: @1×@2" + +#: triggers.lua +msgid "Mine @1 block." +msgid_plural "Mine @1 blocks." +msgstr[0] "Bauen Sie einen @1 Block ab." +msgstr[1] "Bauen Sie @1 Blöcke ab." + +#: triggers.lua +msgid "@1/@2 placed" +msgstr "@1/@2 platziert" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Place: @2" +msgid_plural "Place: @1×@2" +msgstr[0] "Platzieren Sie einen Block: @2" +msgstr[1] "Platzieren Sie Blöcke: @1×@2" + +#: triggers.lua +msgid "Place a block." +msgid_plural "Place @1 blocks." +msgstr[0] "Platzieren Sie einen Block." +msgstr[1] "Platzieren Sie @1 Blöcke." + +#: triggers.lua +msgid "@1/@2 eaten" +msgstr "@1/@2 gegessen" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Eat: @2" +msgid_plural "Eat: @1×@2" +msgstr[0] "Essen Sie: @2" +msgstr[1] "Essen Sie: @1×@2" + +#: triggers.lua +msgid "Eat an item." +msgid_plural "Eat @1 items." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 deaths" +msgstr "@1/@2 Tode" + +#: triggers.lua +msgid "Die." +msgid_plural "Die @1 times." +msgstr[0] "Sterben Sie." +msgstr[1] "Sterben Sie @1 mal." + +#: triggers.lua +msgid "@1/@2 chat messages" +msgstr "@1/@2 Chatnachrichten" + +#: triggers.lua +msgid "Write something in chat." +msgid_plural "Write @1 chat messages." +msgstr[0] "Schreiben Sie etwas im Chat." +msgstr[1] "Schreiben Sie @1 Chatnachrichten." + +#: triggers.lua +msgid "@1/@2 game joins" +msgstr "@1/@2 Spielen beigetreten" + +#: triggers.lua +msgid "Join the game." +msgid_plural "Join the game @1 times." +msgstr[0] "Treten Sie dem Spiel bei." +msgstr[1] "Treten Sie dem Spiel @1 mal bei." + +#: triggers.lua +msgid "@1/@2 crafted" +msgstr "@1/@2 gefertigt" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Craft: @2" +msgid_plural "Craft: @1×@2" +msgstr[0] "Fertigen Sie an: @2" +msgstr[1] "Fertigen Sie an: @1×@2" + +#: triggers.lua +msgid "Craft an item." +msgid_plural "Craft @1 items." +msgstr[0] "" +msgstr[1] "" + +#: init.lua +msgid "Saint-Maclou" +msgstr "Saint-Maclou" + +#: init.lua +msgid "Place 20 coal checkers." +msgstr "Platzieren Sie 20 Kohlenschachbrettmuster." + +#: init.lua +msgid "Castorama" +msgstr "Gießmeister" + +#: init.lua +msgid "Place 20 iron checkers." +msgstr "Platzieren Sie 20 Eisenschachbrettmuster." + +#: init.lua +msgid "Sam the Trapper" +msgstr "Sam der Fallensteller" + +#: init.lua +msgid "Place 2 trap stones." +msgstr "Platzieren Sie 2 Fallensteine." + +#: init.lua +msgid "Backpacker" +msgstr "Rucksacktourist" + +#: init.lua +msgid "Craft 4 large bags." +msgstr "Fertigen Sie 4 große Taschen." + +#: init.lua +msgid "Pyromaniac" +msgstr "Pyromane" + +#: init.lua +msgid "Craft 8 times flint and steel." +msgstr "Fertigen Sie 8 mal einen Feuerstein und Stahl an." + +#: init.lua +msgid "Firefighter" +msgstr "Feuerwehr" + +#: init.lua +msgid "Put out 1000 fires." +msgstr "Löschen Sie 1000 Flammen." + +#: init.lua +msgid "Light It Up" +msgstr "Licht an!" + +#: init.lua +msgid "Place 100 torches." +msgstr "Platzieren Sie 100 Fackeln." + +#: init.lua +msgid "Well Lit" +msgstr "Gut ausgeleuchtet" + +#: init.lua +msgid "Place 1,000 torches." +msgstr "Platzieren Sie 1000 Fackeln." + +#: init.lua +msgid "Really Well Lit" +msgstr "Sehr gute Beleuchtung" + +#: init.lua +msgid "Craft 10 mese lamps." +msgstr "Fertigen Sie 10 Meselampen." + +#: init.lua +msgid "Outpost" +msgstr "Außenposten" + +#: init.lua +msgid "Craft 200 stone bricks." +msgstr "Fertigen Sie 200 Steinziegel." + +#: init.lua +msgid "Watchtower" +msgstr "Wachturm" + +#: init.lua +msgid "Craft 800 stone bricks." +msgstr "Fertigen Sie 800 Steinziegel an." + +#: init.lua +msgid "Fortress" +msgstr "Burg" + +#: init.lua +msgid "Craft 3,200 stone bricks." +msgstr "Fertigen Sie 3200 Steinziegel." + +#: init.lua +msgid "Desert Dweller" +msgstr "Wüstenbewohner" + +#: init.lua +msgid "Craft 400 desert stone bricks." +msgstr "Fertigen Sie 400 Wüstensteinziegel." + +#: init.lua +msgid "Pharaoh" +msgstr "Pharao" + +#: init.lua +msgid "Craft 100 sandstone bricks." +msgstr "Fertigen Sie 100 Sandsteinziegel." + +#: init.lua +msgid "Little Library" +msgstr "Kleine Bücherei" + +#: init.lua +msgid "Craft 7 bookshelves." +msgstr "Fertigen Sie 7 Bücherregale." + +#: init.lua +msgid "Lava and Water" +msgstr "Lava und Wasser" + +#: init.lua +msgid "Mine your first obsidian." +msgstr "Bauen Sie Ihr erstes Obsidian ab." + +#: init.lua +msgid "Obsessed with Obsidian" +msgstr "Von Obsidian besessen" + +#: init.lua +msgid "Mine 50 obsidian." +msgstr "Bauen Sie 50 Obsidian ab." + +#: init.lua +msgid "Lava Miner" +msgstr "Lavagräber" + +#: init.lua +msgid "Mine any block while being very close to lava." +msgstr "" +"Bauen Sie einen beliebigen Block ab, während Sie sehr nahe an der Lava " +"stehen." + +#: init.lua +msgid "On The Way" +msgstr "Auf dem Weg" + +#: init.lua +msgid "Place 100 rails." +msgstr "Platzieren Sie 100 Gleise." + +#: init.lua +msgid "First Day in the Woods" +msgstr "Erster Tag im Wald" + +#: init.lua +msgid "Dig 6 tree blocks." +msgstr "Bauen Sie 6 Baumblöcke ab." + +#: init.lua +msgid "Lumberjack" +msgstr "Holzfäller" + +#: init.lua +msgid "Dig 36 tree blocks." +msgstr "Bauen Sie 36 Baumblöcke ab." + +#: init.lua +msgid "Semi-pro Lumberjack" +msgstr "Fortgeschrittener Holzfäller" + +#: init.lua +msgid "Dig 216 tree blocks." +msgstr "Bauen Sie 216 Baumblöcke ab." + +#: init.lua +msgid "Professional Lumberjack" +msgstr "Profiholzfäller" + +#: init.lua +msgid "Dig 1,296 tree blocks." +msgstr "Bauen Sie 1296 Baumblöcke ab." + +#: init.lua +msgid "Junglebaby" +msgstr "Dschungelbaby" + +#: init.lua +msgid "Dig 100 jungle tree blocks." +msgstr "Bauen Sie 100 Dschungelbaumblöcke ab." + +#: init.lua +msgid "Jungleman" +msgstr "Dschungelmann" + +#: init.lua +msgid "Dig 1,000 jungle tree blocks." +msgstr "Bauen Sie 1000 Dschungelbaumblöcke ab." + +#: init.lua +msgid "First Mese Find" +msgstr "Erster Mesefund" + +#: init.lua +msgid "Mine your first mese ore." +msgstr "Bauen Sie Ihr erstes Meseerz ab." + +#: init.lua +msgid "Mese Mastery" +msgstr "Mesemeister" + +#: init.lua +msgid "Mine a mese block." +msgstr "Bauen Sie einen Meseblock ab." + +#: init.lua +msgid "You’re a copper" +msgstr "Du Kupfer!" + +#: init.lua +msgid "Dig 1,000 copper ores." +msgstr "Bauen Sie 1000 Kupfererze ab." + +#: init.lua +msgid "A Cat in a Pop-Tart?!" +msgstr "Eine Katze im Pop-Tart?!" + +#: init.lua +msgid "Mine a nyan cat." +msgstr "Bauen Sie eine Nyan Cat ab." + +#: init.lua +msgid "Mini Miner" +msgstr "Berganfänger" + +#: init.lua +msgid "Dig 100 stone blocks." +msgstr "Bauen Sie 100 Steinblöcke ab." + +#: init.lua +msgid "Hardened Miner" +msgstr "Abhehärteter Bergarbeiter" + +#: init.lua +msgid "Dig 1,000 stone blocks." +msgstr "Bauen Sie 1000 Steine ab." + +#: init.lua +msgid "Master Miner" +msgstr "Profibergarbeiter" + +#: init.lua +msgid "Dig 10,000 stone blocks." +msgstr "Bauen Sie 10000 Steine ab." + +#: init.lua +msgid "Marchand De Sable" +msgstr "" + +#: init.lua +msgid "Dig 1,000 sand." +msgstr "Bauen Sie 1000 Sand ab." + +#: init.lua +msgid "Crafter of Sticks" +msgstr "Stockmacher" + +#: init.lua +msgid "Craft 100 sticks." +msgstr "Fertigen Sie 100 Stöcke." + +#: init.lua +msgid "Jungle Discoverer" +msgstr "Dschungelerkunder" + +#: init.lua +msgid "Mine your first jungle grass." +msgstr "Bauen Sie Ihr erstes Dschungelgras ab." + +#: init.lua +msgid "Grasslands Discoverer" +msgstr "Prärieerkunder" + +#: init.lua +msgid "Mine some grass." +msgstr "Bauen Sie etwas Gras ab." + +#: init.lua +msgid "Savannah Discoverer" +msgstr "Savannenerkunder" + +#: init.lua +msgid "Mine some dry grass." +msgstr "Bauen Sie etwas trockenes Gras ab." + +#: init.lua +msgid "Desert Discoverer" +msgstr "Wüstenerkunder" + +#: init.lua +msgid "Mine your first cactus." +msgstr "Bauen Sie Ihren ersten Kaktus ab." + +#: init.lua +msgid "Far Lands" +msgstr "Ferne Lande" + +#: init.lua +msgid "Mine your first dry shrub." +msgstr "Bauen Sie Ihren ersten vertrockneten Strauch ab." + +#: init.lua +msgid "Glacier Discoverer" +msgstr "Gletschererkunder" + +#: init.lua +msgid "Mine your first ice." +msgstr "Bauen Sie Ihr erstes Eis ab." + +#: init.lua +msgid "Very Simple Snow Man" +msgstr "Sehr simpler Schneemann" + +#: init.lua +msgid "Place two snow blocks." +msgstr "Platzieren Sie zwei Schneeblöcke." + +#: init.lua +msgid "First Gold Find" +msgstr "Erster Goldfund" + +#: init.lua +msgid "Mine your first gold ore." +msgstr "Bauen Sie Ihr erstes Golderz ab." + +#: init.lua +msgid "Gold Rush" +msgstr "Goldrausch" + +#: init.lua +msgid "Mine 45 gold ores." +msgstr "Bauen Sie 18 Diamanterze ab." + +#: init.lua +msgid "Wow, I am Diamonds!" +msgstr "Wow, ich bin Diamanten!" + +#: init.lua +msgid "Mine your first diamond ore." +msgstr "Bauen Sie Ihr erstes Diamanterz ab." + +#: init.lua +msgid "Girl's Best Friend" +msgstr "Bester Freund der Mädchen" + +#: init.lua +msgid "Mine 18 diamond ores." +msgstr "Bauen Sie 18 Diamanterze ab." + +#: init.lua +msgid "Hardest Block on Earth" +msgstr "Härtester Block der Welt" + +#: init.lua +msgid "Craft a diamond block." +msgstr "Fertigen Sie einen Diamantblock an." + +#: init.lua +msgid "In the Dungeon" +msgstr "Im Verlies" + +#: init.lua +msgid "Mine a mossy cobblestone." +msgstr "Bauen Sie ein bemoostes Kopfsteinpflaster ab." + +#: init.lua +msgid "Smelter" +msgstr "Schmelzer" + +#: init.lua +msgid "Craft 10 furnaces." +msgstr "Fertigen Sie 10 Öfen." + +#: init.lua +msgid "Treasurer" +msgstr "Schatzmeister" + +#: init.lua +msgid "Craft 15 chests." +msgstr "Fertigen Sie 15 Truhen." + +#: init.lua +msgid "Bankier" +msgstr "Bankier" + +#: init.lua +msgid "Craft 30 locked chests." +msgstr "Fertigen Sie 30 abgeschlossene Truhen." + +#: init.lua +msgid "Bricker" +msgstr "Ziegler" + +#: init.lua +msgid "Craft 200 brick blocks." +msgstr "Fertigen Sie 200 Ziegelblöcke." + +#: init.lua +msgid "House of Obsidian" +msgstr "Haus aus Obsidian" + +#: init.lua +msgid "Craft 100 obsidian bricks." +msgstr "Fertigen Sie 100 Obsidianziegel." + +#: init.lua +msgid "Build a Cave" +msgstr "Höhlenbauer" + +#: init.lua +msgid "Place 100 stone." +msgstr "Platzieren Sie 100 Steine." + +#: init.lua +msgid "Long Ladder" +msgstr "Lange Leiter" + +#: init.lua +msgid "Place 400 wooden ladders." +msgstr "Platzieren Sie 400 Holzleitern." + +#: init.lua +msgid "Industrial Age" +msgstr "Industriezeitalter" + +#: init.lua +msgid "Place 40 steel ladders." +msgstr "Platzieren Sie 40 Stahlleitern." + +#: init.lua +msgid "Yummy!" +msgstr "Lecker!" + +#: init.lua +msgid "Eat 80 apples." +msgstr "Essen Sie 80 Äpfel." + +#: init.lua +msgid "Glasser" +msgstr "Glasmacher" + +#: init.lua +msgid "Craft 14 vessels shelves." +msgstr "Fertigen Sie 14 Gefäßregale." + +#: init.lua +msgid "Farming Skills Acquired" +msgstr "Landwirtschaft erlernt" + +#: init.lua +msgid "Harvest a fully grown wheat plant." +msgstr "Ernten Sie eine voll ausgewachsene Getreidepflanze." + +#: init.lua +msgid "Field Worker" +msgstr "Feldarbeiter" + +#: init.lua +msgid "Harvest 25 fully grown wheat plants." +msgstr "Ernten Sie 25 voll ausgewachsene Getreidepflanzen." + +#: init.lua +msgid "Aspiring Farmer" +msgstr "Aufstrebender Bauer" + +#: init.lua +msgid "Harvest 125 fully grown wheat plants." +msgstr "Ernten Sie 125 voll ausgewachsene Getreidepflanzen." + +#: init.lua +msgid "Wheat Magnate" +msgstr "Getreidemagnat" + +#: init.lua +msgid "Harvest 625 fully grown wheat plants." +msgstr "Ernten Sie 625 voll ausgewachsene Getreidepflanzen." + +#: init.lua +msgid "Baker" +msgstr "Bäcker" + +#: init.lua +msgid "Eat 10 loaves of bread." +msgstr "Essen Sie 10 Brote." + +#: init.lua +msgid "Wool Over Your Eyes" +msgstr "Wollige Augen" + +#: init.lua +msgid "Craft 250 white wool." +msgstr "Fertigen Sie 250 weiße Wolle." + +#: init.lua +msgid "Hotelier" +msgstr "Hotelier" + +#: init.lua +msgid "Craft 15 fancy beds." +msgstr "Fertigen Sie 15 schicke Betten." + +#: init.lua +msgid "Filthy Rich" +msgstr "Stinkreich" + +#: init.lua +msgid "Craft 24 gold block stairs." +msgstr "Fertigen Sie 24 Goldblockstufen." + +#: init.lua +msgid "Roses Are Red" +msgstr "Rosen sind rot" + +#: init.lua +msgid "Craft 400 red dyes." +msgstr "Fertigen Sie 400 rote Farbstoffe." + +#: init.lua +msgid "Dandelions are Yellow" +msgstr "Löwenzahn ist gelb" + +#: init.lua +msgid "Craft 400 yellow dyes." +msgstr "Fertigen Sie 400 gelbe Farbstoffe." + +#: init.lua +msgid "Geraniums are Blue" +msgstr "Geranien sind blau" + +#: init.lua +msgid "Craft 400 blue dyes." +msgstr "Fertigen Sie 400 blaue Farbstoffe." + +#: init.lua +msgid "White Color Stock" +msgstr "Weißer Farbstoffvorrat" + +#: init.lua +msgid "Craft 100 white dyes." +msgstr "Fertigen Sie 100 weiße Farbstoffe." + +#: init.lua +msgid "Tasty Mushrooms" +msgstr "Leckere Pilze" + +#: init.lua +msgid "Eat 3 brown mushrooms." +msgstr "Essen Sie 3 braune Pilze." + +#: init.lua +msgid "Mushroom Lover" +msgstr "Pilzfreund" + +#: init.lua +msgid "Eat 33 brown mushrooms." +msgstr "Essen Sie 33 braune Pilze." + +#: init.lua +msgid "Underground Mushroom Farmer" +msgstr "Unterirdischer Pilzbauer" + +#: init.lua +msgid "Eat 333 brown mushrooms." +msgstr "Essen Sie 333 braune Pilze." + +#: init.lua +msgid "Builder" +msgstr "Bauarbeiter" + +#: init.lua +msgid "Constructor" +msgstr "Konstrukteur" + +#: init.lua +msgid "Architect" +msgstr "Architekt" + +#: init.lua +msgid "Master Architect" +msgstr "Meisterarchitekt" + +#: chat_commands.lua +msgid "[c|clear|disable|enable]" +msgstr "[c|clear|disable|enable]" + +#: chat_commands.lua +msgid "Show, clear, disable or enable your achievements" +msgstr "Zeigen, löschen, deaktivieren oder aktivieren Sie Ihre Auszeichnungen" + +#: chat_commands.lua +msgid "" +"All your awards and statistics have been cleared. You can now start again." +msgstr "" +"All Ihre Auszeichnugen und Statistiken wurden zurückgesetzt. Sie können nun " +"von vorne anfangen." + +#: chat_commands.lua +msgid "You have disabled your achievements." +msgstr "Sie haben Ihre Auszeichnungen deaktiviert." + +#: chat_commands.lua +msgid "You have enabled your achievements." +msgstr "Sie haben Ihre Auszeichnungen aktiviert." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Show details of an achievement" +msgstr "Details einer Auszeichnung anzeigen" + +#: chat_commands.lua +msgid "Achievement not found." +msgstr "Auszeichnung nicht gefunden." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Get the achievements statistics for the given player or yourself" +msgstr "Die Statistik der Auszeichnungen eines Spielers zeigen" diff --git a/mods/awards/locale/es.po b/mods/awards/locale/es.po new file mode 100644 index 0000000..9b25c49 --- /dev/null +++ b/mods/awards/locale/es.po @@ -0,0 +1,822 @@ +# Spanish translations for PACKAGE package +# Traducciones al español para el paquete PACKAGE. +# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Diego Martínez , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 05:35-0300\n" +"PO-Revision-Date: 2019-08-22 03:22+0200\n" +"Last-Translator: Diego Martínez \n" +"Language-Team: Spanish\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.2.1\n" + +#: api.lua +msgid "Secret Achievement Unlocked:" +msgstr "Logro secreto desbloqueado:" + +#: api.lua +msgid "Achievement Unlocked:" +msgstr "Logro desbloqueado:" + +#: api.lua +#, lua-format +msgid "Secret Achievement Unlocked: %s" +msgstr "Logro secreto desbloqueado: %s" + +#: api.lua +#, lua-format +msgid "Achievement Unlocked: %s" +msgstr "Logro desbloqueado: %s" + +#: api.lua +msgid "Secret Achievement Unlocked!" +msgstr "Logro secreto desbloqueado!" + +#: api.lua +msgid "Achievement Unlocked!" +msgstr "Logro desbloqueado!" + +#: api.lua +msgid "Error: No awards available." +msgstr "Error: No hay logros disponibles." + +#: api.lua +msgid "OK" +msgstr "Aceptar" + +#: api.lua +msgid "(Secret Award)" +msgstr "(Logro secreto)" + +#: api.lua +msgid "Unlock this award to find out what it is." +msgstr "Desbloquea éste logro para saber qué es." + +#: api.lua +#, lua-format +msgid "%s (got)" +msgstr "%s (obtenido)" + +#: api.lua +msgid "You've disabled awards. Type /awards enable to reenable." +msgstr "Has deshabilitado los logros. Escribe \"/awards enable\" para reactivar." + +#: api.lua +msgid "You have not unlocked any awards." +msgstr "No has desbloqueado ningún logro." + +#: api.lua +#, lua-format +msgid "%s’s awards:" +msgstr "Logros de %s:" + +#: api.lua chat_commands.lua +#, lua-format +msgid "%s: %s" +msgstr "%s: %s" + +#: sfinv.lua unified_inventory.lua +msgid "Awards" +msgstr "Logros" + +#: triggers.lua +msgid "@1/@2 dug" +msgstr "@1/@2 excavados" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Mine: @2" +msgid_plural "Mine: @1×@2" +msgstr[0] "Excavar: @2" +msgstr[1] "Excavar: @1×@2" + +#: triggers.lua +msgid "Mine @1 block." +msgid_plural "Mine @1 blocks." +msgstr[0] "Excavar un bloque." +msgstr[1] "Excavar @1 bloques." + +#: triggers.lua +msgid "@1/@2 placed" +msgstr "@1/@2 colocados" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Place: @2" +msgid_plural "Place: @1×@2" +msgstr[0] "Colocar: @2" +msgstr[1] "Colocar: @1×@2" + +#: triggers.lua +msgid "Place a block." +msgid_plural "Place @1 blocks." +msgstr[0] "Colocar un bloque." +msgstr[1] "Colocar @1 bloques." + +#: triggers.lua +msgid "@1/@2 eaten" +msgstr "@1/@2 comidos" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Eat: @2" +msgid_plural "Eat: @1×@2" +msgstr[0] "Comer: @2" +msgstr[1] "Comer: @1×@2" + +#: triggers.lua +msgid "Eat an item." +msgid_plural "Eat @1 items." +msgstr[0] "Comer un objeto." +msgstr[1] "Comer @1 objetos." + +#: triggers.lua +msgid "@1/@2 deaths" +msgstr "@1/@2 muertes" + +#: triggers.lua +msgid "Die." +msgid_plural "Die @1 times." +msgstr[0] "Morir." +msgstr[1] "Morir @1 veces." + +#: triggers.lua +msgid "@1/@2 chat messages" +msgstr "@1/@2 conversaciones" + +#: triggers.lua +msgid "Write something in chat." +msgid_plural "Write @1 chat messages." +msgstr[0] "Escribir algo." +msgstr[1] "Escribir @1 mensajes." + +#: triggers.lua +msgid "@1/@2 game joins" +msgstr "@1/@2 veces unido" + +#: triggers.lua +msgid "Join the game." +msgid_plural "Join the game @1 times." +msgstr[0] "Unirse al juego." +msgstr[1] "Unirse al juego @1 veces." + +#: triggers.lua +msgid "@1/@2 crafted" +msgstr "@1/@2 elaborado" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Craft: @2" +msgid_plural "Craft: @1×@2" +msgstr[0] "Elaborar: @2" +msgstr[1] "Elaborar: %1×@2" + +#: triggers.lua +msgid "Craft an item." +msgid_plural "Craft @1 items." +msgstr[0] "Elaborar un objeto." +msgstr[1] "Elaborar @1 objetos." + +#: init.lua +msgid "Saint-Maclou" +msgstr "Saint-Maclou" + +#: init.lua +msgid "Place 20 coal checkers." +msgstr "Colocar 20 baldosas de ajedrez de carbón." + +#: init.lua +msgid "Castorama" +msgstr "Castorama" + +#: init.lua +msgid "Place 20 iron checkers." +msgstr "Colocar 20 baldosas de ajedrez de hierro." + +#: init.lua +msgid "Sam the Trapper" +msgstr "Sam el Atrapador" + +#: init.lua +msgid "Place 2 trap stones." +msgstr "Colocar 2 piedras trampa." + +#: init.lua +msgid "Backpacker" +msgstr "Mochilero" + +#: init.lua +msgid "Craft 4 large bags." +msgstr "Elaborar 4 bolsas grandes." + +#: init.lua +msgid "Pyromaniac" +msgstr "Piromaníaco" + +#: init.lua +msgid "Craft 8 times flint and steel." +msgstr "Elaborar pedernal y hierro 8 veces." + +#: init.lua +msgid "Firefighter" +msgstr "Bombero" + +#: init.lua +msgid "Put out 1000 fires." +msgstr "Apagar 1000 incendios." + +#: init.lua +msgid "Light It Up" +msgstr "Ilumínalo" + +#: init.lua +msgid "Place 100 torches." +msgstr "Colocar 100 antorchas." + +#: init.lua +msgid "Well Lit" +msgstr "Bien Iluminado" + +#: init.lua +msgid "Place 1,000 torches." +msgstr "Colocar 1.000 antorchas." + +#: init.lua +msgid "Really Well Lit" +msgstr "Realmente Bien Iluminado" + +#: init.lua +msgid "Craft 10 mese lamps." +msgstr "Elaborar 10 lámparas de MESE." + +#: init.lua +msgid "Outpost" +msgstr "Puesto de avanzada" + +#: init.lua +msgid "Craft 200 stone bricks." +msgstr "Elaborar 200 ladrillos de piedra." + +#: init.lua +msgid "Watchtower" +msgstr "Torre del vigía" + +#: init.lua +msgid "Craft 800 stone bricks." +msgstr "Elaborar 800 ladrillos de piedra." + +#: init.lua +msgid "Fortress" +msgstr "Fortaleza" + +#: init.lua +msgid "Craft 3,200 stone bricks." +msgstr "Elaborar 3.200 ladrillos de piedra." + +#: init.lua +msgid "Desert Dweller" +msgstr "Morador Desértico" + +#: init.lua +msgid "Craft 400 desert stone bricks." +msgstr "Elaborar 400 ladrillos de piedra desértica." + +#: init.lua +msgid "Pharaoh" +msgstr "Faraón" + +#: init.lua +msgid "Craft 100 sandstone bricks." +msgstr "Elaborar 200 ladrillos de arenisca." + +#: init.lua +msgid "Little Library" +msgstr "Pequeña Biblioteca" + +#: init.lua +msgid "Craft 7 bookshelves." +msgstr "Elaborar 7 libreros." + +#: init.lua +msgid "Lava and Water" +msgstr "Lava y Agua" + +#: init.lua +msgid "Mine your first obsidian." +msgstr "Excavar tu primera obsidiana." + +#: init.lua +msgid "Obsessed with Obsidian" +msgstr "Obsesionado con la Obsidiana" + +#: init.lua +msgid "Mine 50 obsidian." +msgstr "Excavar 50 obsidianas." + +#: init.lua +msgid "Lava Miner" +msgstr "Minero de Lava" + +#: init.lua +msgid "Mine any block while being very close to lava." +msgstr "Excavar un bloque cerca de lava." + +#: init.lua +msgid "On The Way" +msgstr "En Camino" + +#: init.lua +msgid "Place 100 rails." +msgstr "Colocar 100 rieles." + +#: init.lua +msgid "First Day in the Woods" +msgstr "Primer Día en el Bosque" + +#: init.lua +msgid "Dig 6 tree blocks." +msgstr "Cortar 6 árboles." + +#: init.lua +msgid "Lumberjack" +msgstr "Leñador" + +#: init.lua +msgid "Dig 36 tree blocks." +msgstr "Cortar 36 árboles." + +#: init.lua +msgid "Semi-pro Lumberjack" +msgstr "Leñador semi-profesional" + +#: init.lua +msgid "Dig 216 tree blocks." +msgstr "Cortar 216 árboles." + +#: init.lua +msgid "Professional Lumberjack" +msgstr "Leñador profesional" + +#: init.lua +msgid "Dig 1,296 tree blocks." +msgstr "Cortar 1.296 árboles." + +#: init.lua +msgid "Junglebaby" +msgstr "Bebé de la Selva" + +#: init.lua +msgid "Dig 100 jungle tree blocks." +msgstr "Cortar 100 árboles selváticos." + +#: init.lua +msgid "Jungleman" +msgstr "Hombre de la Selva" + +#: init.lua +msgid "Dig 1,000 jungle tree blocks." +msgstr "Cortar 1.000 árboles selváticos." + +#: init.lua +msgid "First Mese Find" +msgstr "Primer Encuentro de MESE" + +#: init.lua +msgid "Mine your first mese ore." +msgstr "Excava tu primer mineral de MESE." + +#: init.lua +msgid "Mese Mastery" +msgstr "Maestría de MESE" + +#: init.lua +msgid "Mine a mese block." +msgstr "Excava tu primer bloque de MESE." + +#: init.lua +msgid "You’re a copper" +msgstr "Eres un cobre" + +#: init.lua +msgid "Dig 1,000 copper ores." +msgstr "Excavar 1.000 minerales de cobre" + +#: init.lua +msgid "A Cat in a Pop-Tart?!" +msgstr "¡¿Un Gato en un Pop-Tart?!" + +#: init.lua +msgid "Mine a nyan cat." +msgstr "Excavar un Gato Nyan." + +#: init.lua +msgid "Mini Miner" +msgstr "Mini Minero" + +#: init.lua +msgid "Dig 100 stone blocks." +msgstr "Excavar 100 bloques de piedra." + +#: init.lua +msgid "Hardened Miner" +msgstr "Minero Curtido" + +#: init.lua +msgid "Dig 1,000 stone blocks." +msgstr "Excavar 1.000 bloques de piedra." + +#: init.lua +msgid "Master Miner" +msgstr "Minero Maestro" + +#: init.lua +msgid "Dig 10,000 stone blocks." +msgstr "Excavar 10.000 bloques de piedra." + +#: init.lua +msgid "Marchand De Sable" +msgstr "Marchand De Sable" + +#: init.lua +msgid "Dig 1,000 sand." +msgstr "Cavar 1.000 bloques de arena." + +#: init.lua +msgid "Crafter of Sticks" +msgstr "Elaborador de Varitas" + +#: init.lua +msgid "Craft 100 sticks." +msgstr "Elaborar 100 varitas." + +#: init.lua +msgid "Jungle Discoverer" +msgstr "Descubridor de Selva" + +#: init.lua +msgid "Mine your first jungle grass." +msgstr "Cortar tu primer pasto de selva." + +#: init.lua +msgid "Grasslands Discoverer" +msgstr "Descubridor de Praderas" + +#: init.lua +msgid "Mine some grass." +msgstr "Cortar un poco de pasto." + +#: init.lua +msgid "Savannah Discoverer" +msgstr "Descubridor de Savana" + +#: init.lua +msgid "Mine some dry grass." +msgstr "Cortar un poco de pasto seco." + +#: init.lua +msgid "Desert Discoverer" +msgstr "Descubridor del Desierto" + +#: init.lua +msgid "Mine your first cactus." +msgstr "Cortar tu primer cácto." + +#: init.lua +msgid "Far Lands" +msgstr "Tierras Lejanas" + +#: init.lua +msgid "Mine your first dry shrub." +msgstr "Cortar tu primer arbusto seco" + +#: init.lua +msgid "Glacier Discoverer" +msgstr "Descubridor del Glaciar" + +#: init.lua +msgid "Mine your first ice." +msgstr "Romper tu primer bloque de hielo." + +#: init.lua +msgid "Very Simple Snow Man" +msgstr "Muñeco de Nieve Muy Simple" + +#: init.lua +msgid "Place two snow blocks." +msgstr "Colocar dos bloques de nieve." + +#: init.lua +msgid "First Gold Find" +msgstr "Primer Encuentro de Oro" + +#: init.lua +msgid "Mine your first gold ore." +msgstr "Excavar tu primer pepita de oro." + +#: init.lua +msgid "Gold Rush" +msgstr "Fiebre del Oro" + +#: init.lua +msgid "Mine 45 gold ores." +msgstr "Excavar 45 pepitas de oro." + +#: init.lua +msgid "Wow, I am Diamonds!" +msgstr "¡Guau, Soy Diamantes!" + +#: init.lua +msgid "Mine your first diamond ore." +msgstr "Excava tu primer diamante." + +#: init.lua +msgid "Girl's Best Friend" +msgstr "El Mejor Amigo de Las Mujeres" + +#: init.lua +msgid "Mine 18 diamond ores." +msgstr "Excava 10 diamantes." + +#: init.lua +msgid "Hardest Block on Earth" +msgstr "El Bloque Más Duro Sobre La Tierra" + +#: init.lua +msgid "Craft a diamond block." +msgstr "Elaborar un bloque de diamante." + +#: init.lua +msgid "In the Dungeon" +msgstr "En Las Mazmorras" + +#: init.lua +msgid "Mine a mossy cobblestone." +msgstr "Excavar unos adoquines musgosos." + +#: init.lua +msgid "Smelter" +msgstr "Fundidor" + +#: init.lua +msgid "Craft 10 furnaces." +msgstr "Elaborar 10 hornos." + +#: init.lua +msgid "Treasurer" +msgstr "Tesorero" + +#: init.lua +msgid "Craft 15 chests." +msgstr "Elaborar 15 cofres." + +#: init.lua +msgid "Bankier" +msgstr "Banquero" + +#: init.lua +msgid "Craft 30 locked chests." +msgstr "Elaborar 30 bloques cerrados." + +#: init.lua +msgid "Bricker" +msgstr "Ladrillero" + +#: init.lua +msgid "Craft 200 brick blocks." +msgstr "Elaborar 200 bloques de ladrillo." + +#: init.lua +msgid "House of Obsidian" +msgstr "Casa de Obsidiana" + +#: init.lua +msgid "Craft 100 obsidian bricks." +msgstr "Elaborar 100 ladrillos de obsidiana." + +#: init.lua +msgid "Build a Cave" +msgstr "Construye Una Cueva" + +#: init.lua +msgid "Place 100 stone." +msgstr "Coloca 100 piedras." + +#: init.lua +msgid "Long Ladder" +msgstr "Escalerilla Larga" + +#: init.lua +msgid "Place 400 wooden ladders." +msgstr "Coloca 400 escalerillas de madera." + +#: init.lua +msgid "Industrial Age" +msgstr "Era Industrial" + +#: init.lua +msgid "Place 40 steel ladders." +msgstr "Coloca 40 escalerillas de acero." + +#: init.lua +msgid "Yummy!" +msgstr "¡Qué Rico!" + +#: init.lua +msgid "Eat 80 apples." +msgstr "Come 80 manzanas." + +# Intentionally marked as fuzzy. +#: init.lua +msgid "Glasser" +msgstr "Vidriero" + +#: init.lua +msgid "Craft 14 vessels shelves." +msgstr "Elabora 14 estanterías para botellas." + +#: init.lua +msgid "Farming Skills Acquired" +msgstr "Habilidades de Granja Adquiridas" + +#: init.lua +msgid "Harvest a fully grown wheat plant." +msgstr "Cosecha una plantas de trigo madura." + +#: init.lua +msgid "Field Worker" +msgstr "Trabajador de Campo" + +#: init.lua +msgid "Harvest 25 fully grown wheat plants." +msgstr "Cosecha 25 plantas de trigo maduras." + +#: init.lua +msgid "Aspiring Farmer" +msgstr "Aspirante a Granjero" + +#: init.lua +msgid "Harvest 125 fully grown wheat plants." +msgstr "Cosecha 125 plantas de trigo maduras." + +#: init.lua +msgid "Wheat Magnate" +msgstr "Magnate del Maíz" + +#: init.lua +msgid "Harvest 625 fully grown wheat plants." +msgstr "Cosecha 625 plantas de trigo maduras." + +#: init.lua +msgid "Baker" +msgstr "Panadero" + +#: init.lua +msgid "Eat 10 loaves of bread." +msgstr "Come 10 rebanadas de pan." + +#: init.lua +msgid "Wool Over Your Eyes" +msgstr "Lana Sobre Tus Ojos" + +#: init.lua +msgid "Craft 250 white wool." +msgstr "Elabora 250 bloques de lana blanca." + +#: init.lua +msgid "Hotelier" +msgstr "Hotelero" + +#: init.lua +msgid "Craft 15 fancy beds." +msgstr "Elabora 15 camas de lujo." + +#: init.lua +msgid "Filthy Rich" +msgstr "Sucio Rico" + +#: init.lua +msgid "Craft 24 gold block stairs." +msgstr "Elabora 24 escaleras de bloque de oro." + +#: init.lua +msgid "Roses Are Red" +msgstr "Las Rosas Son Rojas" + +#: init.lua +msgid "Craft 400 red dyes." +msgstr "Elabora 400 colorantes rojos." + +#: init.lua +msgid "Dandelions are Yellow" +msgstr "Los Dientes de León Son Amarillos" + +#: init.lua +msgid "Craft 400 yellow dyes." +msgstr "Elabora 400 colorantes amarillos." + +#: init.lua +msgid "Geraniums are Blue" +msgstr "Los Geranios Son Azules" + +#: init.lua +msgid "Craft 400 blue dyes." +msgstr "Elabora 400 colorantes azules." + +#: init.lua +msgid "White Color Stock" +msgstr "Reserva de Color Blanco" + +#: init.lua +msgid "Craft 100 white dyes." +msgstr "Elabora 100 colorantes blancos." + +#: init.lua +msgid "Tasty Mushrooms" +msgstr "Ricos Hongos" + +#: init.lua +msgid "Eat 3 brown mushrooms." +msgstr "Come 3 hongos marrones." + +#: init.lua +msgid "Mushroom Lover" +msgstr "Amante de los Hongos" + +#: init.lua +msgid "Eat 33 brown mushrooms." +msgstr "Come 33 hongos marrones." + +#: init.lua +msgid "Underground Mushroom Farmer" +msgstr "Granjero de Hongos Subterráneo" + +#: init.lua +msgid "Eat 333 brown mushrooms." +msgstr "Come 333 hongos marrones." + +# Nota: "Builder" y "Constructor" se traducen a "Constructor", +# así que lo traduje de ésta manera para diferenciar. +#: init.lua +msgid "Builder" +msgstr "Hacedor" + +#: init.lua +msgid "Constructor" +msgstr "Constructor" + +#: init.lua +msgid "Architect" +msgstr "Arquitecto" + +#: init.lua +msgid "Master Architect" +msgstr "Maestro Arquitecto" + +#: chat_commands.lua +msgid "[c|clear|disable|enable]" +msgstr "[c|clear|disable|enable]" + +#: chat_commands.lua +msgid "Show, clear, disable or enable your achievements" +msgstr "Mostrar, limpiar, deshabilitar o habilitar tus logros" + +#: chat_commands.lua +msgid "All your awards and statistics have been cleared. You can now start again." +msgstr "Todos tus logros y estadísticas han sido borrados. Puedes iniciar nuevamente." + +#: chat_commands.lua +msgid "You have disabled your achievements." +msgstr "Has deshabilitado tus logros." + +#: chat_commands.lua +msgid "You have enabled your achievements." +msgstr "Has habilitado tus logros." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Show details of an achievement" +msgstr "Muestra los detalles de un logro" + +#: chat_commands.lua +msgid "Achievement not found." +msgstr "Logro no encontrado." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Get the achievements statistics for the given player or yourself" +msgstr "Obtener las estadísticas y logros del jugador dado" diff --git a/mods/awards/locale/fr.po b/mods/awards/locale/fr.po new file mode 100644 index 0000000..e173437 --- /dev/null +++ b/mods/awards/locale/fr.po @@ -0,0 +1,818 @@ +# French translations for PACKAGE package. +# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# xisd, 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 05:50-0300\n" +"PO-Revision-Date: 2017-02-21 05:50-0300\n" +"Last-Translator: xisd\n" +"Language-Team: French\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: api.lua +msgid "Secret Achievement Unlocked:" +msgstr "Réussite Secrète Débloquée :" + +#: api.lua +msgid "Achievement Unlocked:" +msgstr "Réussite Débloquée :" + +#: api.lua +#, lua-format +msgid "Secret Achievement Unlocked: %s" +msgstr "Réussite Secrète Débloquée : %s" + +#: api.lua +#, lua-format +msgid "Achievement Unlocked: %s" +msgstr "Réussite Débloquée : %s" + +#: api.lua +msgid "Secret Achievement Unlocked!" +msgstr "Réussite Secrète Débloquée !" + +#: api.lua +msgid "Achievement Unlocked!" +msgstr "Réussite Débloquée !" + +#: api.lua +msgid "Error: No awards available." +msgstr "Erreur : Aucun trophée disponible" + +#: api.lua +msgid "OK" +msgstr "OK" + +#: api.lua +msgid "(Secret Award)" +msgstr "(Trophée Secret)" + +#: api.lua +msgid "Unlock this award to find out what it is." +msgstr "Débloque ce trophée pour découvrir ce que c'est." + +#: api.lua +#, lua-format +msgid "%s (got)" +msgstr "%s (obtenu)" + +#: api.lua +msgid "You've disabled awards. Type /awards enable to reenable." +msgstr "Vous avez désactivé les trophées. Tapez '/awards enable' pour les réactiver." + +#: api.lua +msgid "You have not unlocked any awards." +msgstr "Vous n'avez encore débloqué aucun trophée." + +#: api.lua +#, lua-format +msgid "%s’s awards:" +msgstr "Les trophées de %s :" + +#: api.lua chat_commands.lua +#, lua-format +msgid "%s: %s" +msgstr "%s : %s" + +#: sfinv.lua unified_inventory.lua +msgid "Awards" +msgstr "Trophées" + +#: triggers.lua +msgid "@1/@2 dug" +msgstr "@1/@2 creusés" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Mine: @2" +msgid_plural "Mine: @1×@2" +msgstr[0] "Mine : @2" +msgstr[1] "Mine : @1×@2" + +#: triggers.lua +msgid "Mine @1 block." +msgid_plural "Mine @1 blocks." +msgstr[0] "Creuse @1 bloc." +msgstr[1] "Creuse @1 blocs." + +#: triggers.lua +msgid "@1/@2 placed" +msgstr "@1/@2 placés" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Place: @2" +msgid_plural "Place: @1×@2" +msgstr[0] "Place : @2" +msgstr[1] "Place : @1×@2" + +#: triggers.lua +msgid "Place a block." +msgid_plural "Place @1 blocks." +msgstr[0] "Place un bloc." +msgstr[1] "Place @1 blocs." + +#: triggers.lua +msgid "@1/@2 eaten" +msgstr "@1/@2 Mangés" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Eat: @2" +msgid_plural "Eat: @1×@2" +msgstr[0] "Mange : @2" +msgstr[1] "Mange : @1×@2" + +#: triggers.lua +msgid "Eat an item." +msgid_plural "Eat @1 items." +msgstr[0] "Mange quelque chose." +msgstr[1] "Mange @1 aliments." + +#: triggers.lua +msgid "@1/@2 deaths" +msgstr "@1/@2 morts" + +#: triggers.lua +msgid "Die." +msgid_plural "Die @1 times." +msgstr[0] "Mort·e." +msgstr[1] "Mort·e %d fois." + +#: triggers.lua +msgid "@1/@2 chat messages" +msgstr "@1/@2 messages du chat" + +#: triggers.lua +msgid "Write something in chat." +msgid_plural "Write @1 chat messages." +msgstr[0] "Écrit quelque chose dans le chat." +msgstr[1] "Écrit @1 messages dans le chat." + +#: triggers.lua +msgid "@1/@2 game joins" +msgstr "@1/@2 connexions" + +#: triggers.lua +msgid "Join the game." +msgid_plural "Join the game @1 times." +msgstr[0] "Connecte toi au jeu." +msgstr[1] "Connecte toi au jeu @1 fois." + +#: triggers.lua +msgid "@1/@2 crafted" +msgstr "@1/@2 craftés" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Craft: @2" +msgid_plural "Craft: @1×@2" +msgstr[0] "Fabrique : @2" +msgstr[1] "Fabrique : @1×@2" + +#: triggers.lua +msgid "Craft an item." +msgid_plural "Craft @1 items." +msgstr[0] "Confectionne un objet." +msgstr[1] "Confectionne @1 objets." + +#: init.lua +msgid "Saint-Maclou" +msgstr "Saint-Maclou" + +#: init.lua +msgid "Place 20 coal checkers." +msgstr "Place 20 damiers de charbon." + +#: init.lua +msgid "Castorama" +msgstr "Castorama" + +#: init.lua +msgid "Place 20 iron checkers." +msgstr "Place 20 damiers de fer." + +#: init.lua +msgid "Sam the Trapper" +msgstr "Sam le Trappeur" + +#: init.lua +msgid "Place 2 trap stones." +msgstr "Place 2 pièges de pierre." + +#: init.lua +msgid "Backpacker" +msgstr "Randonneu·r·se" + +#: init.lua +msgid "Craft 4 large bags." +msgstr "Confectionne 4 grands sacs" + +#: init.lua +msgid "Pyromaniac" +msgstr "Pyromane" + +#: init.lua +msgid "Craft 8 times flint and steel." +msgstr "Fabrique 8 silex et aciers." + +#: init.lua +msgid "Firefighter" +msgstr "Pompier" + +#: init.lua +msgid "Put out 1000 fires." +msgstr "Éteint 1000 feux." + +#: init.lua +msgid "Light It Up" +msgstr "Eclairé·e" + +#: init.lua +msgid "Place 100 torches." +msgstr "Place 100 torches." + +#: init.lua +msgid "Well Lit" +msgstr "Bien Éclairé" + +#: init.lua +msgid "Place 1,000 torches." +msgstr "Place 1000 torches." + +#: init.lua +msgid "Really Well Lit" +msgstr "Vraiment Bien Éclairé" + +#: init.lua +msgid "Craft 10 mese lamps." +msgstr "Fabrique 10 lampes de mese." + +#: init.lua +msgid "Outpost" +msgstr "Poste Avancé" + +#: init.lua +msgid "Craft 200 stone bricks." +msgstr "Confectionne 200 briques de pierre." + +#: init.lua +msgid "Watchtower" +msgstr "Tour de Garde" + +#: init.lua +msgid "Craft 800 stone bricks." +msgstr "Confectionne 800 briques de pierre." + +#: init.lua +msgid "Fortress" +msgstr "Forteresse" + +#: init.lua +msgid "Craft 3,200 stone bricks." +msgstr "Confectionne 3200 briques de pierre." + +#: init.lua +msgid "Desert Dweller" +msgstr "Habitant·e du Désert" + +#: init.lua +msgid "Craft 400 desert stone bricks." +msgstr "Confectionne 400 briques de pierre du désert." + +#: init.lua +msgid "Pharaoh" +msgstr "Pharaon" + +#: init.lua +msgid "Craft 100 sandstone bricks." +msgstr "Confectionne 100 briques de roche de sable." + +#: init.lua +msgid "Little Library" +msgstr "Petite Bibliothèque" + +#: init.lua +msgid "Craft 7 bookshelves." +msgstr "Fabrique 7 bibliothèques." + +#: init.lua +msgid "Lava and Water" +msgstr "La Lave et l'Eau" + +#: init.lua +msgid "Mine your first obsidian." +msgstr "Mine ton premier bloc d'obsidienne." + +#: init.lua +msgid "Obsessed with Obsidian" +msgstr "Obsédé·e par l'obsidienne" + +#: init.lua +msgid "Mine 50 obsidian." +msgstr "Mine 50 pierres d'obsidienne." + +#: init.lua +msgid "Lava Miner" +msgstr "Mineu·r·se de lave" + +#: init.lua +msgid "Mine any block while being very close to lava." +msgstr "Mine n'importe quel bloc à proximité de la lave." + +#: init.lua +msgid "On The Way" +msgstr "Sur La Voie" + +#: init.lua +msgid "Place 100 rails." +msgstr "Place 100 rails." + +#: init.lua +msgid "First Day in the Woods" +msgstr "Premier Jour dans les Bois" + +#: init.lua +msgid "Dig 6 tree blocks." +msgstr "Creuse 6 blocs d'arbre." + +#: init.lua +msgid "Lumberjack" +msgstr "Bûcheron·ne" + +#: init.lua +msgid "Dig 36 tree blocks." +msgstr "Creuse 36 blocs d'arbre." + +#: init.lua +msgid "Semi-pro Lumberjack" +msgstr "Bûcheron.ne. Semi-Professionnel.le." + +#: init.lua +msgid "Dig 216 tree blocks." +msgstr "Creuse 216 blocs d'arbre." + +#: init.lua +msgid "Professional Lumberjack" +msgstr "Bûcheron·ne Professionnel·le" + +#: init.lua +msgid "Dig 1,296 tree blocks." +msgstr "Creuse 1296 blocs d'arbre." + +#: init.lua +msgid "Junglebaby" +msgstr "Enfant de la Jungle" + +#: init.lua +msgid "Dig 100 jungle tree blocks." +msgstr "Creuse 100 blocs d'arbres de jungle." + +#: init.lua +msgid "Jungleman" +msgstr "Personne de la Jungle" + +#: init.lua +msgid "Dig 1,000 jungle tree blocks." +msgstr "Creuse 1000 blocs d'arbre de jungle." + +#: init.lua +msgid "First Mese Find" +msgstr "Première Pépite : Mese" + +#: init.lua +msgid "Mine your first mese ore." +msgstr "Mine ton premier minerai de mese." + +#: init.lua +msgid "Mese Mastery" +msgstr "Maîtrise de Mese" + +#: init.lua +msgid "Mine a mese block." +msgstr "Mine un bloc de mese." + +#: init.lua +msgid "You’re a copper" +msgstr "Faîtes Jouer les Cuivres" + +#: init.lua +msgid "Dig 1,000 copper ores." +msgstr "Creuse 1000 minerais de cuivre." + +#: init.lua +msgid "A Cat in a Pop-Tart?!" +msgstr "Un Chat dans un Pop-Tart ?!" + +#: init.lua +msgid "Mine a nyan cat." +msgstr "Mine un nyan cat." + +#: init.lua +msgid "Mini Miner" +msgstr "Mini Mineu·r·se" + +#: init.lua +msgid "Dig 100 stone blocks." +msgstr "Creuse 100 blocs de pierre." + +#: init.lua +msgid "Hardened Miner" +msgstr "Mineu·r·se Endurci·e" + +#: init.lua +msgid "Dig 1,000 stone blocks." +msgstr "Creuse 1000 blocs de pierre." + +#: init.lua +msgid "Master Miner" +msgstr "Maître·sse Mineu·r·se" + +#: init.lua +msgid "Dig 10,000 stone blocks." +msgstr "Creuse 10000 blocs de pierre." + +#: init.lua +msgid "Marchand De Sable" +msgstr "Marchand·e De Sable" + +#: init.lua +msgid "Dig 1,000 sand." +msgstr "Creuse 1000 blocs de sable." + +#: init.lua +msgid "Crafter of Sticks" +msgstr "Fabriquant·e de Bâtons." + +#: init.lua +msgid "Craft 100 sticks." +msgstr "Confectionne 100 bâtons." + +#: init.lua +msgid "Jungle Discoverer" +msgstr "Explorat·eur·rice de la Jungle" + +#: init.lua +msgid "Mine your first jungle grass." +msgstr "Ramasse ta première herbe de jungle." + +#: init.lua +msgid "Grasslands Discoverer" +msgstr "Découvreu·r·se de prairies" + +#: init.lua +msgid "Mine some grass." +msgstr "Ramasse de l'herbe." + +#: init.lua +msgid "Savannah Discoverer" +msgstr "Explorat·eur·rice de la Savanne" + +#: init.lua +msgid "Mine some dry grass." +msgstr "Ramasse de l'herbe sèche." + +#: init.lua +msgid "Desert Discoverer" +msgstr "Expolrat·eur·rice du Désert." + +#: init.lua +msgid "Mine your first cactus." +msgstr "Mine ton premier catus." + +#: init.lua +msgid "Far Lands" +msgstr "Terres Lointaines" + +#: init.lua +msgid "Mine your first dry shrub." +msgstr "Coupe ton premier arbuste sec." + +#: init.lua +msgid "Glacier Discoverer" +msgstr "Découvreu·r·se de glacier" + +#: init.lua +msgid "Mine your first ice." +msgstr "Creuse ton premier bloc de glace." + +#: init.lua +msgid "Very Simple Snow Man" +msgstr "Bonhomme de Neige Rudimentaire" + +#: init.lua +msgid "Place two snow blocks." +msgstr "Place deux blocs de neige." + +#: init.lua +msgid "First Gold Find" +msgstr "Première Pépite : Or" + +#: init.lua +msgid "Mine your first gold ore." +msgstr "Mine ton premier minerai d'or." + +#: init.lua +msgid "Gold Rush" +msgstr "Ruée vers l'Or" + +#: init.lua +msgid "Mine 45 gold ores." +msgstr "Mine 45 minerais d'or." + +#: init.lua +msgid "Wow, I am Diamonds!" +msgstr "Wow, Je suis Diamants!" + +#: init.lua +msgid "Mine your first diamond ore." +msgstr "Mine ton premier diamant." + +#: init.lua +#, fuzzy +msgid "Girl's Best Friend" +msgstr "Girl's Best Friend" + +#: init.lua +msgid "Mine 18 diamond ores." +msgstr "Mine 18 diamants." + +#: init.lua +msgid "Hardest Block on Earth" +msgstr "Le Bloc le Plus Dur du Monde" + +#: init.lua +msgid "Craft a diamond block." +msgstr "Confectionne un bloc de diamant." + +#: init.lua +msgid "In the Dungeon" +msgstr "Dans le Donjon" + +#: init.lua +msgid "Mine a mossy cobblestone." +msgstr "Mine un bloc de pavés moussus." + +#: init.lua +msgid "Smelter" +msgstr "Fondeu·r·se" + +#: init.lua +msgid "Craft 10 furnaces." +msgstr "Construis 10 fours." + +#: init.lua +msgid "Treasurer" +msgstr "Trésori·er·ère" + +#: init.lua +msgid "Craft 15 chests." +msgstr "Fabrique 15 coffres." + +#: init.lua +msgid "Bankier" +msgstr "Banqui·er·ère" + +#: init.lua +msgid "Craft 30 locked chests." +msgstr "Fabrique 30 coffres Verrouillés." + +#: init.lua +msgid "Bricker" +msgstr "Briqueu·r·se" + +#: init.lua +msgid "Craft 200 brick blocks." +msgstr "Confectionne 200 blocs de brique." + +#: init.lua +msgid "House of Obsidian" +msgstr "La Maison de L'Obsidienne" + +#: init.lua +msgid "Craft 100 obsidian bricks." +msgstr "Confectionne 100 briques d'obsidienne." + +#: init.lua +msgid "Build a Cave" +msgstr "Construis une grotte" + +#: init.lua +msgid "Place 100 stone." +msgstr "Place 100 pierres." + +#: init.lua +msgid "Long Ladder" +msgstr "Longue Echelle" + +#: init.lua +msgid "Place 400 wooden ladders." +msgstr "Place 400 échelles en bois." + +#: init.lua +msgid "Industrial Age" +msgstr "Âge Industriel" + +#: init.lua +msgid "Place 40 steel ladders." +msgstr "Place 40 échelles métalliques." + +#: init.lua +msgid "Yummy!" +msgstr "Miam !" + +#: init.lua +msgid "Eat 80 apples." +msgstr "Mange 80 pommes." + +#: init.lua +msgid "Glasser" +msgstr "Verri·er·ère" + +#: init.lua +msgid "Craft 14 vessels shelves." +msgstr "Fabrique 14 vaisseliers." + +#: init.lua +msgid "Farming Skills Acquired" +msgstr "Compétences Paysannes Acquises" + +#: init.lua +msgid "Harvest a fully grown wheat plant." +msgstr "Récolte un plant de blé à maturité." + +#: init.lua +msgid "Field Worker" +msgstr "Travailleu·r·se Agricole" + +#: init.lua +msgid "Harvest 25 fully grown wheat plants." +msgstr "Récolte 25 plants de blé à maturité." + +#: init.lua +msgid "Aspiring Farmer" +msgstr "Apprenti·e Fermi·er·ère" + +#: init.lua +msgid "Harvest 125 fully grown wheat plants." +msgstr "Récolte 125 plants de blé à maturité." + +#: init.lua +msgid "Wheat Magnate" +msgstr "Magnat·e du Blé" + +#: init.lua +msgid "Harvest 625 fully grown wheat plants." +msgstr "Récolte 625 plants de blé à maturité." + +#: init.lua +msgid "Baker" +msgstr "Boulang·er·ère" + +#: init.lua +msgid "Eat 10 loaves of bread." +msgstr "Mange 10 miches de pain." + +#: init.lua +msgid "Wool Over Your Eyes" +msgstr "De la Laines dans Tes Yeux" + +#: init.lua +msgid "Craft 250 white wool." +msgstr "Confectionne 250 blocs de laine blanche." + +#: init.lua +msgid "Hotelier" +msgstr "Hoteli·er·ère" + +#: init.lua +msgid "Craft 15 fancy beds." +msgstr "Construis 15 lits chics." + +#: init.lua +msgid "Filthy Rich" +msgstr "Richissime" + +#: init.lua +msgid "Craft 24 gold block stairs." +msgstr "Construis 24 escaliers en or." + +#: init.lua +msgid "Roses Are Red" +msgstr "Les Roses Sont Rouges" + +#: init.lua +msgid "Craft 400 red dyes." +msgstr "Prépare 400 teintures rouges." + +#: init.lua +msgid "Dandelions are Yellow" +msgstr "Les Pissenlits sont Jaunes." + +#: init.lua +msgid "Craft 400 yellow dyes." +msgstr "Prépare 400 teintures jaunes." + +#: init.lua +msgid "Geraniums are Blue" +msgstr "Les Geraniums Sont Bleus" + +#: init.lua +msgid "Craft 400 blue dyes." +msgstr "Prépare 400 teintures bleues." + +#: init.lua +msgid "White Color Stock" +msgstr "Chaussettes Blanches" + +#: init.lua +msgid "Craft 100 white dyes." +msgstr "Prépare 100 teintures blanches." + +#: init.lua +msgid "Tasty Mushrooms" +msgstr "Délicieux Champignons" + +#: init.lua +msgid "Eat 3 brown mushrooms." +msgstr "Mange 3 champignons marrons." + +#: init.lua +msgid "Mushroom Lover" +msgstr "Adorat·eur·rice de Champignons" + +#: init.lua +msgid "Eat 33 brown mushrooms." +msgstr "Mange 33 champignons marrons." + +#: init.lua +msgid "Underground Mushroom Farmer" +msgstr "Culture de Champignons en Cave" + +#: init.lua +msgid "Eat 333 brown mushrooms." +msgstr "Mange 333 champignons marrons." + +#: init.lua +msgid "Builder" +msgstr "Bâtisseu·r·se" + +#: init.lua +msgid "Constructor" +msgstr "Construct·eur·rice" + +#: init.lua +msgid "Architect" +msgstr "Architecte" + +#: init.lua +msgid "Master Architect" +msgstr "Maître·sse Architecte" + +#: chat_commands.lua +msgid "[c|clear|disable|enable]" +msgstr "[c|clear|disable|enable]" + +#: chat_commands.lua +msgid "Show, clear, disable or enable your achievements" +msgstr "Affiche, réinitialise, désactive ou active vos réussites." + +#: chat_commands.lua +msgid "All your awards and statistics have been cleared. You can now start again." +msgstr "Tous vos trophées et statistiques ont été réinitialisés. Vous pouvez recommencer à nouveau." + +#: chat_commands.lua +msgid "You have disabled your achievements." +msgstr "Vous avez désactivé vos réussites." + +#: chat_commands.lua +msgid "You have enabled your achievements." +msgstr "Vous avez activé vos réussites." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Show details of an achievement" +msgstr "Afficher les détails d'une réussite" + +#: chat_commands.lua +msgid "Achievement not found." +msgstr "Réussite non trouvée." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Get the achievements statistics for the given player or yourself" +msgstr "Obtenez les statistiques des réussites d'un joueur donné ou de vous-même" diff --git a/mods/awards/locale/pt.po b/mods/awards/locale/pt.po new file mode 100644 index 0000000..e28b909 --- /dev/null +++ b/mods/awards/locale/pt.po @@ -0,0 +1,819 @@ +# Portuguese translations for Awards package. +# Copyright (C) 2018 +# This file is distributed under the same license as the Awards package. +# FIRST AUTHOR borgesdossantosbruno@gmail.com, 2018. +# BrunoMine, 2018 +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 05:50-0300\n" +"PO-Revision-Date: 2018-08-01 16:16-0300\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 2.0.6\n" +"Last-Translator: BrunoMine\n" +"Language: pt\n" + +#: api.lua +msgid "Secret Achievement Unlocked:" +msgstr "Conquista Secreta Desbloqueada:" + +#: api.lua +msgid "Achievement Unlocked:" +msgstr "Conquista Desbloqueada:" + +#: api.lua +#, lua-format +msgid "Secret Achievement Unlocked: %s" +msgstr "Conquista Secreta Desbloqueada: %s" + +#: api.lua +#, lua-format +msgid "Achievement Unlocked: %s" +msgstr "Conquista Desbloqueada: %s" + +#: api.lua +msgid "Secret Achievement Unlocked!" +msgstr "Conquista Secreta Desbloqueada!" + +#: api.lua +msgid "Achievement Unlocked!" +msgstr "Conquista Desbloqueada!" + +#: api.lua +msgid "Error: No awards available." +msgstr "Erro: Nenhuma conquista encontrada." + +#: api.lua +msgid "OK" +msgstr "OK" + +#: api.lua +msgid "(Secret Award)" +msgstr "(Conquista Secreta)" + +#: api.lua +msgid "Unlock this award to find out what it is." +msgstr "Desbloqueie essa conquista para descobrir o que significa." + +#: api.lua +#, lua-format +msgid "%s (got)" +msgstr "%s (obtido)" + +#: api.lua +msgid "You've disabled awards. Type /awards enable to reenable." +msgstr "Desabilitaste as conquistas. Digite /awards enable para reabilitar." + +#: api.lua +msgid "You have not unlocked any awards." +msgstr "Nenhuma conquista desbloqueada ainda." + +#: api.lua +#, lua-format +msgid "%s’s awards:" +msgstr "%s das conquistas:" + +#: api.lua chat_commands.lua +#, lua-format +msgid "%s: %s" +msgstr "%s: %s" + +#: sfinv.lua unified_inventory.lua +msgid "Awards" +msgstr "Conquistas" + +#: triggers.lua +msgid "@1/@2 dug" +msgstr "@1 de @2 obtidos" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Mine: @2" +msgid_plural "Mine: @1×@2" +msgstr[0] "Cavar: @2" +msgstr[1] "Minar: @1×@2" + +#: triggers.lua +msgid "Mine @1 block." +msgid_plural "Mine @1 blocks." +msgstr[0] "Cavar um bloco." +msgstr[1] "Cavar @1 blocos." + +#: triggers.lua +msgid "@1/@2 placed" +msgstr "@1 de @2 colocados" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Place: @2" +msgid_plural "Place: @1×@2" +msgstr[0] "Colocar: @2" +msgstr[1] "Place: @1×@2" + +#: triggers.lua +msgid "Place a block." +msgid_plural "Place @1 blocks." +msgstr[0] "Colocar um bloco." +msgstr[1] "Colocar @1 blocos." + +#: triggers.lua +msgid "@1/@2 eaten" +msgstr "@1 de @2 consumidos" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Eat: @2" +msgid_plural "Eat: @1×@2" +msgstr[0] "Consumir: @2" +msgstr[1] "Consumir: @1×@2" + +#: triggers.lua +msgid "Eat an item." +msgid_plural "Eat @1 items." +msgstr[0] "Consumir um item." +msgstr[1] "Consumir @1 itens." + +#: triggers.lua +msgid "@1/@2 deaths" +msgstr "@1 de @2 mortes" + +#: triggers.lua +msgid "Die." +msgid_plural "Die @1 times." +msgstr[0] "Morrer." +msgstr[1] "Morrer @1 vezes." + +#: triggers.lua +msgid "@1/@2 chat messages" +msgstr "@1 de @2" + +#: triggers.lua +msgid "Write something in chat." +msgid_plural "Write @1 chat messages." +msgstr[0] "Escrever algo no bate papo." +msgstr[1] "Escrever @1 mensagens no bate papo." + +#: triggers.lua +msgid "@1/@2 game joins" +msgstr "@1 de @2" + +#: triggers.lua +msgid "Join the game." +msgid_plural "Join the game @1 times." +msgstr[0] "Entre no jogo." +msgstr[1] "Entre no jogo @1 vezes." + +#: triggers.lua +msgid "@1/@2 crafted" +msgstr "@1 de @2 feitos" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Craft: @2" +msgid_plural "Craft: @1×@2" +msgstr[0] "Fazer @2" +msgstr[1] "Montar @2 @1 vezes" + +#: triggers.lua +msgid "Craft an item." +msgid_plural "Craft @1 items." +msgstr[0] "Fazer um item." +msgstr[1] "Fazer @1 itens." + +#: init.lua +msgid "Saint-Maclou" +msgstr "Saint-Maclou" + +#: init.lua +msgid "Place 20 coal checkers." +msgstr "" + +#: init.lua +msgid "Castorama" +msgstr "" + +#: init.lua +msgid "Place 20 iron checkers." +msgstr "" + +#: init.lua +msgid "Sam the Trapper" +msgstr "" + +#: init.lua +msgid "Place 2 trap stones." +msgstr "" + +#: init.lua +msgid "Backpacker" +msgstr "" + +#: init.lua +msgid "Craft 4 large bags." +msgstr "" + +#: init.lua +msgid "Pyromaniac" +msgstr "Piromaníaco" + +#: init.lua +msgid "Craft 8 times flint and steel." +msgstr "Montar acendedor de Ferro e Pederneira 8 vezes." + +#: init.lua +msgid "Firefighter" +msgstr "Bombeiro" + +#: init.lua +msgid "Put out 1000 fires." +msgstr "Apagar fogo 1000 vezes." + +#: init.lua +msgid "Light It Up" +msgstr "Ilumine Isso" + +#: init.lua +msgid "Place 100 torches." +msgstr "Colocar 100 tochas." + +#: init.lua +msgid "Well Lit" +msgstr "Bem Iluminado" + +#: init.lua +msgid "Place 1,000 torches." +msgstr "Colocar 1.000 tochas." + +#: init.lua +msgid "Really Well Lit" +msgstr "Realmente Bem Iluminado" + +#: init.lua +msgid "Craft 10 mese lamps." +msgstr "Fazer 10 lâmpadas de mese." + +#: init.lua +msgid "Outpost" +msgstr "Posto Avançado" + +#: init.lua +msgid "Craft 200 stone bricks." +msgstr "Fazer 200 tijolos de pedra." + +#: init.lua +msgid "Watchtower" +msgstr "Sentinela" + +#: init.lua +msgid "Craft 800 stone bricks." +msgstr "Fazer 800 tijolos de pedra." + +#: init.lua +msgid "Fortress" +msgstr "Fortaleza" + +#: init.lua +msgid "Craft 3,200 stone bricks." +msgstr "Fazer 3.200 tijolos de pedra." + +#: init.lua +msgid "Desert Dweller" +msgstr "Morador do Deserto" + +#: init.lua +msgid "Craft 400 desert stone bricks." +msgstr "Fazer 400 Tijolos de pedra do deserto." + +#: init.lua +msgid "Pharaoh" +msgstr "Faraó" + +#: init.lua +msgid "Craft 100 sandstone bricks." +msgstr "Fazer 100 tijolos de arenito." + +#: init.lua +msgid "Little Library" +msgstr "Pequena Biblioteca" + +#: init.lua +msgid "Craft 7 bookshelves." +msgstr "Fazer 7 estantes de livros." + +#: init.lua +msgid "Lava and Water" +msgstr "Lava e Água" + +#: init.lua +msgid "Mine your first obsidian." +msgstr "Cavar sua primeira obsidiana." + +#: init.lua +msgid "Obsessed with Obsidian" +msgstr "Obcecado por Obsidiana" + +#: init.lua +msgid "Mine 50 obsidian." +msgstr "Minerar 50 obsidianas." + +#: init.lua +msgid "Lava Miner" +msgstr "Minerador de Lava" + +#: init.lua +msgid "Mine any block while being very close to lava." +msgstr "Minerar qualquer bloco enquanto estiver mergulhado em lava." + +#: init.lua +msgid "On The Way" +msgstr "No Caminho" + +#: init.lua +msgid "Place 100 rails." +msgstr "Colocar 100 trilhos." + +#: init.lua +msgid "First Day in the Woods" +msgstr "Primeiro dia na Floresta" + +#: init.lua +msgid "Dig 6 tree blocks." +msgstr "Cortar 6 blocos de árvore." + +#: init.lua +msgid "Lumberjack" +msgstr "Lenhador" + +#: init.lua +msgid "Dig 36 tree blocks." +msgstr "Cortar 36 blocos de árvore." + +#: init.lua +msgid "Semi-pro Lumberjack" +msgstr "Lenhador Semi-Profissional" + +#: init.lua +msgid "Dig 216 tree blocks." +msgstr "Cortar 216 blocos de árvore." + +#: init.lua +msgid "Professional Lumberjack" +msgstr "Lenhador Profissional" + +#: init.lua +msgid "Dig 1,296 tree blocks." +msgstr "Cortar 1.296 blocos de árvore." + +#: init.lua +msgid "Junglebaby" +msgstr "Bebê Selvagem" + +#: init.lua +msgid "Dig 100 jungle tree blocks." +msgstr "Cortar 100 blocos de árvore selvagem." + +#: init.lua +msgid "Jungleman" +msgstr "Homem Selvagem" + +#: init.lua +msgid "Dig 1,000 jungle tree blocks." +msgstr "Cortar 1.000 blocos de árvore selvagem." + +#: init.lua +msgid "First Mese Find" +msgstr "Primeiro Mese" + +#: init.lua +msgid "Mine your first mese ore." +msgstr "Cavar seu primeiro mese." + +#: init.lua +msgid "Mese Mastery" +msgstr "Mestre do Mese" + +#: init.lua +msgid "Mine a mese block." +msgstr "Cavar um bloco de mese." + +#: init.lua +msgid "You’re a copper" +msgstr "Sou um Cobre" + +#: init.lua +msgid "Dig 1,000 copper ores." +msgstr "Minerar 1.000 cobres." + +#: init.lua +msgid "A Cat in a Pop-Tart?!" +msgstr "Um Gato em um Pop-Tart?!" + +#: init.lua +msgid "Mine a nyan cat." +msgstr "Capturar um gato nyan." + +#: init.lua +msgid "Mini Miner" +msgstr "Mini Minerador" + +#: init.lua +msgid "Dig 100 stone blocks." +msgstr "Minerar 100 blocos de pedra." + +#: init.lua +msgid "Hardened Miner" +msgstr "Minerador Avançado" + +#: init.lua +msgid "Dig 1,000 stone blocks." +msgstr "Minerar 1.000 blocos de pedra." + +#: init.lua +msgid "Master Miner" +msgstr "Minerador Mestre" + +#: init.lua +msgid "Dig 10,000 stone blocks." +msgstr "Minerar 10.000 blocos de pedra." + +#: init.lua +msgid "Marchand De Sable" +msgstr "Vendedor de Areia" + +#: init.lua +msgid "Dig 1,000 sand." +msgstr "Cavar 1.000 blocos de areia." + +#: init.lua +msgid "Crafter of Sticks" +msgstr "Rachador de Lenha" + +#: init.lua +msgid "Craft 100 sticks." +msgstr "Lenhar 100 gravetos." + +#: init.lua +msgid "Jungle Discoverer" +msgstr "Desbravador Selvagem" + +#: init.lua +msgid "Mine your first jungle grass." +msgstr "Cortar seu primeiro mato selvagem." + +#: init.lua +msgid "Grasslands Discoverer" +msgstr "Descobridor do Gramado" + +#: init.lua +msgid "Mine some grass." +msgstr "Minerar algum mato" + +#: init.lua +msgid "Savannah Discoverer" +msgstr "Descobridor da Savana" + +#: init.lua +msgid "Mine some dry grass." +msgstr "Minerar algum mato seco." + +#: init.lua +msgid "Desert Discoverer" +msgstr "Descobridor do Deserto" + +#: init.lua +msgid "Mine your first cactus." +msgstr "Cortar seu primeiro cacto." + +#: init.lua +msgid "Far Lands" +msgstr "Terras Distantes" + +#: init.lua +msgid "Mine your first dry shrub." +msgstr "Minerar seu primeiro arbusto seco." + +#: init.lua +msgid "Glacier Discoverer" +msgstr "Descobridor Glacial" + +#: init.lua +msgid "Mine your first ice." +msgstr "Quebrar seu primeiro bloco de gelo." + +#: init.lua +msgid "Very Simple Snow Man" +msgstr "Homem de Neve Muito Simples" + +#: init.lua +msgid "Place two snow blocks." +msgstr "Colocar 2 blocos de neve." + +#: init.lua +msgid "First Gold Find" +msgstr "Achei Ouro" + +#: init.lua +msgid "Mine your first gold ore." +msgstr "Minerar sua primeira de ouro." + +#: init.lua +msgid "Gold Rush" +msgstr "Corriga do Ouro" + +#: init.lua +msgid "Mine 45 gold ores." +msgstr "Minerar 45 de ouro." + +#: init.lua +msgid "Wow, I am Diamonds!" +msgstr "Uau, Diamante!" + +#: init.lua +msgid "Mine your first diamond ore." +msgstr "Minerar seu primeiro diamante." + +#: init.lua +msgid "Girl's Best Friend" +msgstr "Melhor Amigo da Menina" + +#: init.lua +msgid "Mine 18 diamond ores." +msgstr "Minere 18 diamantes." + +#: init.lua +msgid "Hardest Block on Earth" +msgstr "O Bloco mais Duro da Terra" + +#: init.lua +msgid "Craft a diamond block." +msgstr "Montar um bloco de diamante." + +#: init.lua +msgid "In the Dungeon" +msgstr "Na Masmorra" + +#: init.lua +msgid "Mine a mossy cobblestone." +msgstr "Minerar um pedregulho com musgo." + +#: init.lua +msgid "Smelter" +msgstr "Fundidor" + +#: init.lua +msgid "Craft 10 furnaces." +msgstr "Montar 10 fornos." + +#: init.lua +msgid "Treasurer" +msgstr "Tesoureiro" + +#: init.lua +msgid "Craft 15 chests." +msgstr "Montar 10 baús." + +#: init.lua +msgid "Bankier" +msgstr "Banqueiro" + +#: init.lua +msgid "Craft 30 locked chests." +msgstr "Montar 30 baús trancados." + +#: init.lua +msgid "Bricker" +msgstr "Tijoleiro" + +#: init.lua +msgid "Craft 200 brick blocks." +msgstr "Fazer 200 blocos de tijolo." + +#: init.lua +msgid "House of Obsidian" +msgstr "Casa de Obsidiana" + +#: init.lua +msgid "Craft 100 obsidian bricks." +msgstr "Montar 100 tijolos de obsidiana." + +#: init.lua +msgid "Build a Cave" +msgstr "Montar uma Caverna" + +#: init.lua +msgid "Place 100 stone." +msgstr "Colocar 100 pedras." + +#: init.lua +msgid "Long Ladder" +msgstr "Longa Escadaria" + +#: init.lua +msgid "Place 400 wooden ladders." +msgstr "Colocar 400 escadas de madeira." + +#: init.lua +msgid "Industrial Age" +msgstr "Era Industrial" + +#: init.lua +msgid "Place 40 steel ladders." +msgstr "Colocar 40 escadas de ferro." + +#: init.lua +msgid "Yummy!" +msgstr "Humm!" + +#: init.lua +msgid "Eat 80 apples." +msgstr "Comer 80 maçãs." + +#: init.lua +msgid "Glasser" +msgstr "Vidraceiro" + +#: init.lua +msgid "Craft 14 vessels shelves." +msgstr "Montar 14 estantes de frascos." + +#: init.lua +msgid "Farming Skills Acquired" +msgstr "Conhecimento de Cultivo Adquirido" + +#: init.lua +msgid "Harvest a fully grown wheat plant." +msgstr "Colher um trigo totalmente crescido." + +#: init.lua +msgid "Field Worker" +msgstr "Trabalhador do Campo" + +#: init.lua +msgid "Harvest 25 fully grown wheat plants." +msgstr "Colher 25 plantas trigos totalmente crescidos." + +#: init.lua +msgid "Aspiring Farmer" +msgstr "Fazendeiro Aspirante" + +#: init.lua +msgid "Harvest 125 fully grown wheat plants." +msgstr "Colher 125 plantas trigos totalmente crescidos." + +#: init.lua +msgid "Wheat Magnate" +msgstr "Magnata do Trigo" + +#: init.lua +msgid "Harvest 625 fully grown wheat plants." +msgstr "Colher 625 plantas trigos totalmente crescidos." + +#: init.lua +msgid "Baker" +msgstr "Padeiro" + +#: init.lua +msgid "Eat 10 loaves of bread." +msgstr "Comer 10 pães." + +#: init.lua +msgid "Wool Over Your Eyes" +msgstr "Lã Sobre Meus Olhos" + +#: init.lua +msgid "Craft 250 white wool." +msgstr "Tecer 250 lãs branca." + +#: init.lua +msgid "Hotelier" +msgstr "Hoteleiro" + +#: init.lua +msgid "Craft 15 fancy beds." +msgstr "Montar 15 camas chiques." + +#: init.lua +msgid "Filthy Rich" +msgstr "Muito Rico" + +#: init.lua +msgid "Craft 24 gold block stairs." +msgstr "Montar 24 escadas de bloco de ouro." + +#: init.lua +msgid "Roses Are Red" +msgstr "Rosas São Vermelhas" + +#: init.lua +msgid "Craft 400 red dyes." +msgstr "Fazer 400 tintas vermelhas." + +#: init.lua +msgid "Dandelions are Yellow" +msgstr "Dentes-de-Leões são Amarelos" + +#: init.lua +msgid "Craft 400 yellow dyes." +msgstr "Fazer 400 tintas amarelas." + +#: init.lua +msgid "Geraniums are Blue" +msgstr "Gerânios são Azuis" + +#: init.lua +msgid "Craft 400 blue dyes." +msgstr "Fazer 400 tintas azuis." + +#: init.lua +msgid "White Color Stock" +msgstr "Estoque de Cor Branca" + +#: init.lua +msgid "Craft 100 white dyes." +msgstr "Fazer 100 tintas brancas." + +#: init.lua +msgid "Tasty Mushrooms" +msgstr "Cogumelos Deliciosos" + +#: init.lua +msgid "Eat 3 brown mushrooms." +msgstr "Comer 3 cogumelos marrons." + +#: init.lua +msgid "Mushroom Lover" +msgstr "Amante de Cogumelo" + +#: init.lua +msgid "Eat 33 brown mushrooms." +msgstr "Comer 33 cogumelos marrons." + +#: init.lua +msgid "Underground Mushroom Farmer" +msgstr "Fazendeiro Subterrâneo de Cogumelos" + +#: init.lua +msgid "Eat 333 brown mushrooms." +msgstr "Comer 333 cogumelos marrons." + +#: init.lua +msgid "Builder" +msgstr "Construtor" + +#: init.lua +msgid "Constructor" +msgstr "Empreiteiro" + +#: init.lua +msgid "Architect" +msgstr "Arquiteto" + +#: init.lua +msgid "Master Architect" +msgstr "Arquiteto Mestre" + +#: chat_commands.lua +msgid "[c|clear|disable|enable]" +msgstr "[c|clear|disable|enable]" + +#: chat_commands.lua +msgid "Show, clear, disable or enable your achievements" +msgstr "Exibir, limpar, desabilitar ou habilitar suas conquistas" + +#: chat_commands.lua +msgid "All your awards and statistics have been cleared. You can now start again." +msgstr "Todas as suas conquistas e estatísticas foram limpas. Agora podes iniciar novamente." + +#: chat_commands.lua +msgid "You have disabled your achievements." +msgstr "Suas conquistas foram desabilitadas." + +#: chat_commands.lua +msgid "You have enabled your achievements." +msgstr "Suas conquistas foram habilitadas." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Show details of an achievement" +msgstr "Mostra detalhes de uma conquista" + +#: chat_commands.lua +msgid "Achievement not found." +msgstr "Conquista não encontrada." + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Get the achievements statistics for the given player or yourself" +msgstr "Ver as estatísticas de conquistas de um jogador ou suas próprias" diff --git a/mods/awards/locale/template.pot b/mods/awards/locale/template.pot new file mode 100644 index 0000000..970ae7c --- /dev/null +++ b/mods/awards/locale/template.pot @@ -0,0 +1,819 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 05:50-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: api.lua +msgid "Secret Achievement Unlocked:" +msgstr "" + +#: api.lua +msgid "Achievement Unlocked:" +msgstr "" + +#: api.lua +#, lua-format +msgid "Secret Achievement Unlocked: %s" +msgstr "" + +#: api.lua +#, lua-format +msgid "Achievement Unlocked: %s" +msgstr "" + +#: api.lua +msgid "Secret Achievement Unlocked!" +msgstr "" + +#: api.lua +msgid "Achievement Unlocked!" +msgstr "" + +#: api.lua +msgid "Error: No awards available." +msgstr "" + +#: api.lua +msgid "OK" +msgstr "" + +#: api.lua +msgid "(Secret Award)" +msgstr "" + +#: api.lua +msgid "Unlock this award to find out what it is." +msgstr "" + +#: api.lua +#, lua-format +msgid "%s (got)" +msgstr "" + +#: api.lua +msgid "You've disabled awards. Type /awards enable to reenable." +msgstr "" + +#: api.lua +msgid "You have not unlocked any awards." +msgstr "" + +#: api.lua +#, lua-format +msgid "%s’s awards:" +msgstr "" + +#: api.lua chat_commands.lua +#, lua-format +msgid "%s: %s" +msgstr "" + +#: sfinv.lua unified_inventory.lua +msgid "Awards" +msgstr "" + +#: triggers.lua +msgid "@1/@2 dug" +msgstr "" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Mine: @2" +msgid_plural "Mine: @1×@2" +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "Mine @1 block." +msgid_plural "Mine @1 blocks." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 placed" +msgstr "" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Place: @2" +msgid_plural "Place: @1×@2" +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "Place a block." +msgid_plural "Place @1 blocks." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 eaten" +msgstr "" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Eat: @2" +msgid_plural "Eat: @1×@2" +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "Eat an item." +msgid_plural "Eat @1 items." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 deaths" +msgstr "" + +#: triggers.lua +msgid "Die." +msgid_plural "Die @1 times." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 chat messages" +msgstr "" + +#: triggers.lua +msgid "Write something in chat." +msgid_plural "Write @1 chat messages." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 game joins" +msgstr "" + +#: triggers.lua +msgid "Join the game." +msgid_plural "Join the game @1 times." +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "@1/@2 crafted" +msgstr "" + +#. Translators: @1 is count, @2 is description. +#: triggers.lua +msgid "Craft: @2" +msgid_plural "Craft: @1×@2" +msgstr[0] "" +msgstr[1] "" + +#: triggers.lua +msgid "Craft an item." +msgid_plural "Craft @1 items." +msgstr[0] "" +msgstr[1] "" + +#: init.lua +msgid "Saint-Maclou" +msgstr "" + +#: init.lua +msgid "Place 20 coal checkers." +msgstr "" + +#: init.lua +msgid "Castorama" +msgstr "" + +#: init.lua +msgid "Place 20 iron checkers." +msgstr "" + +#: init.lua +msgid "Sam the Trapper" +msgstr "" + +#: init.lua +msgid "Place 2 trap stones." +msgstr "" + +#: init.lua +msgid "Backpacker" +msgstr "" + +#: init.lua +msgid "Craft 4 large bags." +msgstr "" + +#: init.lua +msgid "Pyromaniac" +msgstr "" + +#: init.lua +msgid "Craft 8 times flint and steel." +msgstr "" + +#: init.lua +msgid "Firefighter" +msgstr "" + +#: init.lua +msgid "Put out 1000 fires." +msgstr "" + +#: init.lua +msgid "Light It Up" +msgstr "" + +#: init.lua +msgid "Place 100 torches." +msgstr "" + +#: init.lua +msgid "Well Lit" +msgstr "" + +#: init.lua +msgid "Place 1,000 torches." +msgstr "" + +#: init.lua +msgid "Really Well Lit" +msgstr "" + +#: init.lua +msgid "Craft 10 mese lamps." +msgstr "" + +#: init.lua +msgid "Outpost" +msgstr "" + +#: init.lua +msgid "Craft 200 stone bricks." +msgstr "" + +#: init.lua +msgid "Watchtower" +msgstr "" + +#: init.lua +msgid "Craft 800 stone bricks." +msgstr "" + +#: init.lua +msgid "Fortress" +msgstr "" + +#: init.lua +msgid "Craft 3,200 stone bricks." +msgstr "" + +#: init.lua +msgid "Desert Dweller" +msgstr "" + +#: init.lua +msgid "Craft 400 desert stone bricks." +msgstr "" + +#: init.lua +msgid "Pharaoh" +msgstr "" + +#: init.lua +msgid "Craft 100 sandstone bricks." +msgstr "" + +#: init.lua +msgid "Little Library" +msgstr "" + +#: init.lua +msgid "Craft 7 bookshelves." +msgstr "" + +#: init.lua +msgid "Lava and Water" +msgstr "" + +#: init.lua +msgid "Mine your first obsidian." +msgstr "" + +#: init.lua +msgid "Obsessed with Obsidian" +msgstr "" + +#: init.lua +msgid "Mine 50 obsidian." +msgstr "" + +#: init.lua +msgid "Lava Miner" +msgstr "" + +#: init.lua +msgid "Mine any block while being very close to lava." +msgstr "" + +#: init.lua +msgid "On The Way" +msgstr "" + +#: init.lua +msgid "Place 100 rails." +msgstr "" + +#: init.lua +msgid "First Day in the Woods" +msgstr "" + +#: init.lua +msgid "Dig 6 tree blocks." +msgstr "" + +#: init.lua +msgid "Lumberjack" +msgstr "" + +#: init.lua +msgid "Dig 36 tree blocks." +msgstr "" + +#: init.lua +msgid "Semi-pro Lumberjack" +msgstr "" + +#: init.lua +msgid "Dig 216 tree blocks." +msgstr "" + +#: init.lua +msgid "Professional Lumberjack" +msgstr "" + +#: init.lua +msgid "Dig 1,296 tree blocks." +msgstr "" + +#: init.lua +msgid "Junglebaby" +msgstr "" + +#: init.lua +msgid "Dig 100 jungle tree blocks." +msgstr "" + +#: init.lua +msgid "Jungleman" +msgstr "" + +#: init.lua +msgid "Dig 1,000 jungle tree blocks." +msgstr "" + +#: init.lua +msgid "First Mese Find" +msgstr "" + +#: init.lua +msgid "Mine your first mese ore." +msgstr "" + +#: init.lua +msgid "Mese Mastery" +msgstr "" + +#: init.lua +msgid "Mine a mese block." +msgstr "" + +#: init.lua +msgid "You’re a copper" +msgstr "" + +#: init.lua +msgid "Dig 1,000 copper ores." +msgstr "" + +#: init.lua +msgid "A Cat in a Pop-Tart?!" +msgstr "" + +#: init.lua +msgid "Mine a nyan cat." +msgstr "" + +#: init.lua +msgid "Mini Miner" +msgstr "" + +#: init.lua +msgid "Dig 100 stone blocks." +msgstr "" + +#: init.lua +msgid "Hardened Miner" +msgstr "" + +#: init.lua +msgid "Dig 1,000 stone blocks." +msgstr "" + +#: init.lua +msgid "Master Miner" +msgstr "" + +#: init.lua +msgid "Dig 10,000 stone blocks." +msgstr "" + +#: init.lua +msgid "Marchand De Sable" +msgstr "" + +#: init.lua +msgid "Dig 1,000 sand." +msgstr "" + +#: init.lua +msgid "Crafter of Sticks" +msgstr "" + +#: init.lua +msgid "Craft 100 sticks." +msgstr "" + +#: init.lua +msgid "Jungle Discoverer" +msgstr "" + +#: init.lua +msgid "Mine your first jungle grass." +msgstr "" + +#: init.lua +msgid "Grasslands Discoverer" +msgstr "" + +#: init.lua +msgid "Mine some grass." +msgstr "" + +#: init.lua +msgid "Savannah Discoverer" +msgstr "" + +#: init.lua +msgid "Mine some dry grass." +msgstr "" + +#: init.lua +msgid "Desert Discoverer" +msgstr "" + +#: init.lua +msgid "Mine your first cactus." +msgstr "" + +#: init.lua +msgid "Far Lands" +msgstr "" + +#: init.lua +msgid "Mine your first dry shrub." +msgstr "" + +#: init.lua +msgid "Glacier Discoverer" +msgstr "" + +#: init.lua +msgid "Mine your first ice." +msgstr "" + +#: init.lua +msgid "Very Simple Snow Man" +msgstr "" + +#: init.lua +msgid "Place two snow blocks." +msgstr "" + +#: init.lua +msgid "First Gold Find" +msgstr "" + +#: init.lua +msgid "Mine your first gold ore." +msgstr "" + +#: init.lua +msgid "Gold Rush" +msgstr "" + +#: init.lua +msgid "Mine 45 gold ores." +msgstr "" + +#: init.lua +msgid "Wow, I am Diamonds!" +msgstr "" + +#: init.lua +msgid "Mine your first diamond ore." +msgstr "" + +#: init.lua +msgid "Girl's Best Friend" +msgstr "" + +#: init.lua +msgid "Mine 18 diamond ores." +msgstr "" + +#: init.lua +msgid "Hardest Block on Earth" +msgstr "" + +#: init.lua +msgid "Craft a diamond block." +msgstr "" + +#: init.lua +msgid "In the Dungeon" +msgstr "" + +#: init.lua +msgid "Mine a mossy cobblestone." +msgstr "" + +#: init.lua +msgid "Smelter" +msgstr "" + +#: init.lua +msgid "Craft 10 furnaces." +msgstr "" + +#: init.lua +msgid "Treasurer" +msgstr "" + +#: init.lua +msgid "Craft 15 chests." +msgstr "" + +#: init.lua +msgid "Bankier" +msgstr "" + +#: init.lua +msgid "Craft 30 locked chests." +msgstr "" + +#: init.lua +msgid "Bricker" +msgstr "" + +#: init.lua +msgid "Craft 200 brick blocks." +msgstr "" + +#: init.lua +msgid "House of Obsidian" +msgstr "" + +#: init.lua +msgid "Craft 100 obsidian bricks." +msgstr "" + +#: init.lua +msgid "Build a Cave" +msgstr "" + +#: init.lua +msgid "Place 100 stone." +msgstr "" + +#: init.lua +msgid "Long Ladder" +msgstr "" + +#: init.lua +msgid "Place 400 wooden ladders." +msgstr "" + +#: init.lua +msgid "Industrial Age" +msgstr "" + +#: init.lua +msgid "Place 40 steel ladders." +msgstr "" + +#: init.lua +msgid "Yummy!" +msgstr "" + +#: init.lua +msgid "Eat 80 apples." +msgstr "" + +#: init.lua +msgid "Glasser" +msgstr "" + +#: init.lua +msgid "Craft 14 vessels shelves." +msgstr "" + +#: init.lua +msgid "Farming Skills Acquired" +msgstr "" + +#: init.lua +msgid "Harvest a fully grown wheat plant." +msgstr "" + +#: init.lua +msgid "Field Worker" +msgstr "" + +#: init.lua +msgid "Harvest 25 fully grown wheat plants." +msgstr "" + +#: init.lua +msgid "Aspiring Farmer" +msgstr "" + +#: init.lua +msgid "Harvest 125 fully grown wheat plants." +msgstr "" + +#: init.lua +msgid "Wheat Magnate" +msgstr "" + +#: init.lua +msgid "Harvest 625 fully grown wheat plants." +msgstr "" + +#: init.lua +msgid "Baker" +msgstr "" + +#: init.lua +msgid "Eat 10 loaves of bread." +msgstr "" + +#: init.lua +msgid "Wool Over Your Eyes" +msgstr "" + +#: init.lua +msgid "Craft 250 white wool." +msgstr "" + +#: init.lua +msgid "Hotelier" +msgstr "" + +#: init.lua +msgid "Craft 15 fancy beds." +msgstr "" + +#: init.lua +msgid "Filthy Rich" +msgstr "" + +#: init.lua +msgid "Craft 24 gold block stairs." +msgstr "" + +#: init.lua +msgid "Roses Are Red" +msgstr "" + +#: init.lua +msgid "Craft 400 red dyes." +msgstr "" + +#: init.lua +msgid "Dandelions are Yellow" +msgstr "" + +#: init.lua +msgid "Craft 400 yellow dyes." +msgstr "" + +#: init.lua +msgid "Geraniums are Blue" +msgstr "" + +#: init.lua +msgid "Craft 400 blue dyes." +msgstr "" + +#: init.lua +msgid "White Color Stock" +msgstr "" + +#: init.lua +msgid "Craft 100 white dyes." +msgstr "" + +#: init.lua +msgid "Tasty Mushrooms" +msgstr "" + +#: init.lua +msgid "Eat 3 brown mushrooms." +msgstr "" + +#: init.lua +msgid "Mushroom Lover" +msgstr "" + +#: init.lua +msgid "Eat 33 brown mushrooms." +msgstr "" + +#: init.lua +msgid "Underground Mushroom Farmer" +msgstr "" + +#: init.lua +msgid "Eat 333 brown mushrooms." +msgstr "" + +#: init.lua +msgid "Builder" +msgstr "" + +#: init.lua +msgid "Constructor" +msgstr "" + +#: init.lua +msgid "Architect" +msgstr "" + +#: init.lua +msgid "Master Architect" +msgstr "" + +#: chat_commands.lua +msgid "[c|clear|disable|enable]" +msgstr "" + +#: chat_commands.lua +msgid "Show, clear, disable or enable your achievements" +msgstr "" + +#: chat_commands.lua +msgid "" +"All your awards and statistics have been cleared. You can now start again." +msgstr "" + +#: chat_commands.lua +msgid "You have disabled your achievements." +msgstr "" + +#: chat_commands.lua +msgid "You have enabled your achievements." +msgstr "" + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Show details of an achievement" +msgstr "" + +#: chat_commands.lua +msgid "Achievement not found." +msgstr "" + +#: chat_commands.lua +msgid "" +msgstr "" + +#: chat_commands.lua +msgid "Get the achievements statistics for the given player or yourself" +msgstr "" diff --git a/mods/awards/mod.conf b/mods/awards/mod.conf new file mode 100644 index 0000000..e3e83d6 --- /dev/null +++ b/mods/awards/mod.conf @@ -0,0 +1,8 @@ +name = awards +title = Awards +author = rubenwardy +description = Adds awards to Minetest, and an API to register new ones. +optional_depends = intllib,sfinv,unified_inventory,default,stairs,farming,dye,beds,wool,vessels,moreblocks,fire,flowers,nyancat +license = MIT +forum = https://forum.minetest.net/viewtopic.php?t=4870 +version = 3.0.0 diff --git a/mods/awards/screenshot.png b/mods/awards/screenshot.png new file mode 100644 index 0000000..ab9e19e Binary files /dev/null and b/mods/awards/screenshot.png differ diff --git a/mods/awards/sounds/awards_got_generic.ogg b/mods/awards/sounds/awards_got_generic.ogg new file mode 100644 index 0000000..3ae982b Binary files /dev/null and b/mods/awards/sounds/awards_got_generic.ogg differ diff --git a/mods/awards/src/api_awards.lua b/mods/awards/src/api_awards.lua new file mode 100644 index 0000000..5385d1b --- /dev/null +++ b/mods/awards/src/api_awards.lua @@ -0,0 +1,179 @@ +-- Copyright (c) 2013-18 rubenwardy. MIT. + +local S = awards.gettext + +function awards.register_award(name, def) + def.name = name + + -- Add Triggers + if def.trigger and def.trigger.type then + local tdef = awards.registered_triggers[def.trigger.type] + assert(tdef, "Trigger not found: " .. def.trigger.type) + tdef:on_register(def) + end + + function def:can_unlock(data) + if not self.requires then + return true + end + + for i=1, #self.requires do + if not data.unlocked[self.requires[i]] then + return false + end + end + return true + end + + -- Add Award + awards.registered_awards[name] = def + + local tdef = awards.registered_awards[name] + if def.description == nil and tdef.getDefaultDescription then + def.description = tdef:getDefaultDescription() + end +end + + +-- This function is called whenever a target condition is met. +-- It checks if a player already has that award, and if they do not, +-- it gives it to them +---------------------------------------------- +--awards.unlock(name, award) +-- name - the name of the player +-- award - the name of the award to give +function awards.unlock(name, award) + -- Access Player Data + local data = awards.player(name) + local awdef = awards.registered_awards[award] + assert(awdef, "Unable to unlock an award which doesn't exist!") + + if data.disabled or + (data.unlocked[award] and data.unlocked[award] == award) then + return + end + + if not awdef:can_unlock(data) then + minetest.log("warning", "can_unlock returned false in unlock of " .. + award .. " for " .. name) + return + end + + -- Unlock Award + minetest.log("action", name.." has unlocked award "..name) + data.unlocked[award] = award + awards.save() + + -- Give Prizes + if awdef and awdef.prizes then + for i = 1, #awdef.prizes do + local itemstack = ItemStack(awdef.prizes[i]) + if not itemstack:is_empty() then + local receiverref = minetest.get_player_by_name(name) + if receiverref then + receiverref:get_inventory():add_item("main", itemstack) + end + end + end + end + + -- Run callbacks + if awdef.on_unlock and awdef.on_unlock(name, awdef) then + return + end + for _, callback in pairs(awards.on_unlock) do + if callback(name, awdef) then + return + end + end + + -- Get Notification Settings + local title = awdef.title or award + local desc = awdef.description or "" + local background = awdef.background or "awards_bg_default.png" + local icon = awdef.icon or "awards_unknown.png" + local sound = awdef.sound + if sound == nil then + -- Explicit check for nil because sound could be `false` to disable it + sound = {name="awards_got_generic", gain=0.25} + end + + -- Do Notification + if sound then + -- Enforce sound delay to prevent sound spamming + local lastsound = data.lastsound + if lastsound == nil or os.difftime(os.time(), lastsound) >= 1 then + minetest.sound_play(sound, {to_player=name}) + data.lastsound = os.time() + end + end + + if awards.show_mode == "chat" then + local chat_announce + if awdef.secret then + chat_announce = S("Secret Award Unlocked: %s") + else + chat_announce = S("Award Unlocked: %s") + end + -- use the chat console to send it + minetest.chat_send_player(name, string.format(chat_announce, title)) + if desc~="" then + minetest.chat_send_player(name, desc) + end + else + local player = minetest.get_player_by_name(name) + local one = player:hud_add({ + hud_elem_type = "image", + name = "award_bg", + scale = {x = 2, y = 1}, + text = background, + position = {x = 0.5, y = 0.05}, + offset = {x = 0, y = 138}, + alignment = {x = 0, y = -1} + }) + local hud_announce + if awdef.secret then + hud_announce = S("Secret Award Unlocked!") + else + hud_announce = S("Award Unlocked!") + end + local two = player:hud_add({ + hud_elem_type = "text", + name = "award_au", + number = 0xFFFFFF, + scale = {x = 100, y = 20}, + text = hud_announce, + position = {x = 0.5, y = 0.05}, + offset = {x = 0, y = 45}, + alignment = {x = 0, y = -1} + }) + local three = player:hud_add({ + hud_elem_type = "text", + name = "award_title", + number = 0xFFFFFF, + scale = {x = 100, y = 20}, + text = title, + position = {x = 0.5, y = 0.05}, + offset = {x = 0, y = 100}, + alignment = {x = 0, y = -1} + }) + local four = player:hud_add({ + hud_elem_type = "image", + name = "award_icon", + scale = {x = 2, y = 2}, -- adjusted for 32x32 from x/y = 4 + text = icon, + position = {x = 0.5, y = 0.05}, + offset = {x = -200.5, y = 126}, + alignment = {x = 0, y = -1} + }) + minetest.after(4, function() + local player2 = minetest.get_player_by_name(name) + if player2 then + player2:hud_remove(one) + player2:hud_remove(two) + player2:hud_remove(three) + player2:hud_remove(four) + end + end) + end +end diff --git a/mods/awards/src/api_triggers.lua b/mods/awards/src/api_triggers.lua new file mode 100644 index 0000000..454c79e --- /dev/null +++ b/mods/awards/src/api_triggers.lua @@ -0,0 +1,218 @@ +-- Copyright (c) 2013-18 rubenwardy. MIT. + +local S, NS = awards.gettext, awards.ngettext + +awards.registered_awards = {} +awards.on = {} +awards.on_unlock = {} + +local default_def = {} + +function default_def:run_callbacks(player, data, table_func) + for i = 1, #self.on do + local res = nil + local entry = self.on[i] + if type(entry) == "function" then + res = entry(player, data) + elseif type(entry) == "table" and entry.award then + res = table_func(entry) + end + + if res then + awards.unlock(player:get_player_name(), res) + end + end +end + +function awards.register_trigger(tname, tdef) + assert(type(tdef) == "table", + "Passing a callback to register_trigger is not supported in 3.0") + + tdef.name = tname + for key, value in pairs(default_def) do + tdef[key] = value + end + + if tdef.type == "counted" then + local old_reg = tdef.on_register + + function tdef:on_register(def) + local tmp = { + award = def.name, + target = def.trigger.target, + } + tdef.register(tmp) + + function def.getProgress(_, data) + local done = math.min(data[tname] or 0, tmp.target) + return { + perc = done / tmp.target, + label = S(tdef.progress, done, tmp.target), + } + end + + function def.getDefaultDescription(_) + local n = def.trigger.target + return NS(tdef.auto_description[1], tdef.auto_description[2], n, n) + end + + if old_reg then + return old_reg(tdef, def) + end + end + + function tdef.notify(player) + assert(player and player.is_player and player:is_player()) + local name = player:get_player_name() + local data = awards.player(name) + + -- Increment counter + local currentVal = (data[tname] or 0) + 1 + data[tname] = currentVal + + tdef:run_callbacks(player, data, function(entry) + if entry.target and entry.award and currentVal and + currentVal >= entry.target then + return entry.award + end + end) + end + + awards["notify_" .. tname] = tdef.notify + + elseif tdef.type == "counted_key" then + if tdef.key_is_item then + tdef.watched_groups = {} + end + + -- On award register + local old_reg = tdef.on_register + function tdef:on_register(def) + -- Register trigger + local tmp = { + award = def.name, + key = tdef:get_key(def), + target = def.trigger.target, + } + tdef.register(tmp) + + -- If group, add it to watch list + if tdef.key_is_item and tmp.key and tmp.key:sub(1, 6) == "group:" then + tdef.watched_groups[tmp.key:sub(7, #tmp.key)] = true + end + + -- Called to get progress values and labels + function def.getProgress(_, data) + data[tname] = data[tname] or {} + + local done + if tmp.key then + done = data[tname][tmp.key] or 0 + else + done = data[tname].__total or 0 + end + done = math.min(done, tmp.target) + + return { + perc = done / tmp.target, + label = S(tdef.progress, done, tmp.target), + } + end + + -- Build description if none is specificed by the award + function def.getDefaultDescription(_) + local n = def.trigger.target + if tmp.key then + local nname = tmp.key + return NS(tdef.auto_description[1], + tdef.auto_description[2], n, n, nname) + else + return NS(tdef.auto_description_total[1], + tdef.auto_description_total[2], n, n) + end + end + + -- Call on_register in trigger type definition + if old_reg then + return old_reg(tdef, def) + end + end + + function tdef.notify(player, key, n) + n = n or 1 + + if tdef.key_is_item and key:sub(1, 6) ~= "group:" then + local itemdef = minetest.registered_items[key] + if itemdef then + for groupname, _ in pairs(itemdef.groups or {}) do + if tdef.watched_groups[groupname] then + tdef.notify(player, "group:" .. groupname, n) + end + end + end + end + + assert(player and player.is_player and player:is_player() and key) + local name = player:get_player_name() + local data = awards.player(name) + + -- Increment counter + data[tname] = data[tname] or {} + local currentVal = (data[tname][key] or 0) + n + data[tname][key] = currentVal + if key:sub(1, 6) ~= "group:" then + data[tname].__total = (data[tname].__total or 0) + n + end + + tdef:run_callbacks(player, data, function(entry) + local current + if entry.key == key then + current = currentVal + elseif entry.key == nil then + current = data[tname].__total + else + return + end + + if current >= entry.target then + return entry.award + end + end) + end + + awards["notify_" .. tname] = tdef.notify + + elseif tdef.type and tdef.type ~= "custom" then + error("Unrecognised trigger type " .. tdef.type) + end + + awards.registered_triggers[tname] = tdef + + tdef.on = {} + tdef.register = function(func) + table.insert(tdef.on, func) + end + + -- Backwards compat + awards.on[tname] = tdef.on + awards['register_on_' .. tname] = tdef.register + return tdef +end + +function awards.increment_item_counter(data, field, itemname, count) + itemname = minetest.registered_aliases[itemname] or itemname + data[field][itemname] = (data[field][itemname] or 0) + 1 +end + +function awards.get_item_count(data, field, itemname) + itemname = minetest.registered_aliases[itemname] or itemname + return data[field][itemname] or 0 +end + +function awards.get_total_keyed_count(data, field) + return data[field].__total or 0 +end + +function awards.register_on_unlock(func) + table.insert(awards.on_unlock, func) +end diff --git a/mods/awards/src/awards.lua b/mods/awards/src/awards.lua new file mode 100644 index 0000000..3da6bf2 --- /dev/null +++ b/mods/awards/src/awards.lua @@ -0,0 +1,961 @@ +-- Copyright (c) 2013-18 rubenwardy and Wuzzy. MIT. + +local S = awards.gettext + + +-- Saint-Maclou +if minetest.get_modpath("moreblocks") then + awards.register_award("award_saint_maclou",{ + title = S("Saint-Maclou"), + description = S("Place 20 coal checkers."), + icon = "awards_saint_maclou.png", + trigger = { + type = "place", + node = "moreblocks:coal_checker", + target = 20 + } + }) + + -- Castorama + awards.register_award("award_castorama",{ + title = S("Castorama"), + description = S("Place 20 iron checkers."), + icon = "awards_castorama.png", + trigger = { + type = "place", + node = "moreblocks:iron_checker", + target = 20 + } + }) + + -- Sam the Trapper + awards.register_award("award_sam_the_trapper",{ + title = S("Sam the Trapper"), + description = S("Place 2 trap stones."), + icon = "awards_sam_the_trapper.png", + trigger = { + type = "place", + node = "moreblocks:trap_stone", + target = 2 + } + }) +end + +-- This award can't be part of Unified Inventory, it would make a circular dependency +if minetest.get_modpath("unified_inventory") then + if minetest.get_all_craft_recipes("unified_inventory:bag_large") ~= nil then + awards.register_award("awards_ui_bags", { + title = S("Backpacker"), + description = S("Craft 4 large bags."), + icon = "awards_backpacker.png", + trigger = { + type = "craft", + item = "unified_inventory:bag_large", + target = 4 + } + }) + end +end + +if minetest.get_modpath("fire") then + awards.register_award("awards_pyro", { + title = S("Pyromaniac"), + description = S("Craft 8 times flint and steel."), + icon = "awards_pyromaniac.png", + trigger = { + type = "craft", + item = "fire:flint_and_steel", + target = 8 + } + }) + if minetest.settings:get_bool("disable_fire") ~= true then + awards.register_award("awards_firefighter", { + title = S("Firefighter"), + description = S("Put out 1000 fires."), + icon = "awards_firefighter.png", + trigger = { + type = "dig", + node = "fire:basic_flame", + target = 1000 + } + }) + end +end + +if minetest.get_modpath("default") then + -- Light it up + awards.register_award("award_lightitup",{ + title = S("Light It Up"), + description = S("Place 100 torches."), + icon = "awards_light_it_up.png^awards_level1.png", + difficulty = 0.01, + trigger = { + type = "place", + node = "default:torch", + target = 100 + } + }) + + -- Light ALL the things! + awards.register_award("award_well_lit",{ + title = S("Well Lit"), + icon = "awards_well_lit.png^awards_level2.png", + description = S("Place 1,000 torches."), + difficulty = 0.01, + trigger = { + type = "place", + node = "default:torch", + target = 1000 + } + }) + + awards.register_award("award_meselamp",{ + title = S("Really Well Lit"), + description = S("Craft 10 mese lamps."), + icon = "awards_really_well_lit.png", + difficulty = 0.2, + trigger = { + type = "craft", + item = "default:meselamp", + target = 10 + } + }) + + awards.register_award("awards_stonebrick", { + title = S("Outpost"), + description = S("Craft 200 stone bricks."), + icon = "awards_outpost.png^awards_level1.png", + difficulty = 0.08, + trigger = { + type = "craft", + item = "default:stonebrick", + target = 200 + } + }) + + awards.register_award("awards_stonebrick2", { + title = S("Watchtower"), + description = S("Craft 800 stone bricks."), + icon = "awards_watchtower.png^awards_level2.png", + difficulty = 0.08, + trigger = { + type = "craft", + item = "default:stonebrick", + target = 800 + } + }) + + awards.register_award("awards_stonebrick3", { + title = S("Fortress"), + description = S("Craft 3,200 stone bricks."), + icon = "awards_fortress.png^awards_level3.png", + difficulty = 0.08, + trigger = { + type = "craft", + item = "default:stonebrick", + target = 3200 + } + }) + + awards.register_award("awards_desert_stonebrick", { + title = S("Desert Dweller"), + description = S("Craft 400 desert stone bricks."), + icon = "awards_desert_dweller.png", + difficulty = 0.09, + trigger = { + type = "craft", + item = "default:desert_stonebrick", + target = 400 + } + }) + + awards.register_award("awards_desertstonebrick", { + title = S("Pharaoh"), + description = S("Craft 100 sandstone bricks."), + icon = "awards_pharaoh.png", + difficulty = 0.09, + trigger = { + type = "craft", + item = "default:sandstonebrick", + target = 100 + } + }) + + awards.register_award("awards_bookshelf", { + title = S("Little Library"), + description = S("Craft 7 bookshelves."), + icon = "awards_little_library.png", + difficulty = 0.2, + trigger = { + type = "craft", + item = "default:bookshelf", + target = 7 + } + }) + + awards.register_award("awards_obsidian", { + title = S("Lava and Water"), + description = S("Mine your first obsidian."), + icon = "awards_lava_and_water.png^awards_level1.png", + background = "awards_bg_mining.png", + difficulty = 1.5, + trigger = { + type = "dig", + node = "default:obsidian", + target = 1 + } + }) + + -- Obsessed with Obsidian + awards.register_award("award_obsessed_with_obsidian",{ + title = S("Obsessed with Obsidian"), + description = S("Mine 50 obsidian."), + icon = "awards_obsessed_with_obsidian.png^awards_level2.png", + background = "awards_bg_mining.png", + difficulty = 1.5, + trigger = { + type = "dig", + node = "default:obsidian", + target = 50 + } + }) + + -- Proof that player has found lava + awards.register_award("award_lavaminer",{ + title = S("Lava Miner"), + description = S("Mine any block while being very close to lava."), + icon = "awards_lava_miner.png", + background = "awards_bg_mining.png", + difficulty = 1, + }) + awards.register_on_dig(function(player,data) + local pos = player:get_pos() + if pos and (minetest.find_node_near(pos, 1, "default:lava_source") or + minetest.find_node_near(pos, 1, "default:lava_flowing")) then + return "award_lavaminer" + end + return nil + end) + + -- On the way + awards.register_award("award_on_the_way", { + title = S("On The Way"), + description = S("Place 100 rails."), + icon = "awards_on_the_way.png", + difficulty = 0.1, + trigger = { + type = "place", + node = "default:rail", + target = 100 + } + }) + + awards.register_award("award_lumberjack_firstday", { + title = S("First Day in the Woods"), + description = S("Dig 6 tree blocks."), + icon = "awards_first_day_in_the_woods.png^awards_level1.png", + difficulty = 0.03, + trigger = { + type = "dig", + node = "default:tree", + target = 6 + } + }) + + -- Lumberjack + awards.register_award("award_lumberjack", { + title = S("Lumberjack"), + description = S("Dig 36 tree blocks."), + icon = "awards_lumberjack.png^awards_level2.png", + difficulty = 0.03, + trigger = { + type = "dig", + node = "default:tree", + target = 36 + } + }) + + -- Semi-pro Lumberjack + awards.register_award("award_lumberjack_semipro", { + title = S("Semi-pro Lumberjack"), + description = S("Dig 216 tree blocks."), + icon = "awards_semi_pro_lumberjack.png^awards_level3.png", + difficulty = 0.03, + trigger = { + type = "dig", + node = "default:tree", + target = 216 + } + }) + + -- Professional Lumberjack + awards.register_award("award_lumberjack_professional", { + title = S("Professional Lumberjack"), + description = S("Dig 1,296 tree blocks."), + icon = "awards_professional_lumberjack.png^awards_level4.png", + difficulty = 0.03, + trigger = { + type = "dig", + node = "default:tree", + target = 1296 + } + }) + + -- Junglebaby + awards.register_award("award_junglebaby", { + title = S("Junglebaby"), + description = S("Dig 100 jungle tree blocks."), + icon = "awards_junglebaby.png^awards_level1.png", + difficulty = 0.05, + trigger = { + type = "dig", + node = "default:jungletree", + target = 100 + } + }) + + -- Jungleman + awards.register_award("award_jungleman", { + title = S("Jungleman"), + description = S("Dig 1,000 jungle tree blocks."), + icon = "awards_jungleman.png^awards_level2.png", + difficulty = 0.05, + trigger = { + type = "dig", + node = "default:jungletree", + target = 1000 + } + }) + + -- Found some Mese! + awards.register_award("award_mesefind", { + title = S("First Mese Find"), + description = S("Mine your first mese ore."), + icon = "awards_first_mese_find.png", + background = "awards_bg_mining.png", + difficulty = 1, + trigger = { + type = "dig", + node = "default:stone_with_mese", + target = 1 + } + }) + + -- Mese Block + awards.register_award("award_meseblock", { + secret = true, + title = S("Mese Mastery"), + description = S("Mine a mese block."), + icon = "awards_mese_mastery.png", + background = "awards_bg_mining.png", + difficulty = 1.1, + trigger = { + type = "dig", + node = "default:mese", + target = 1 + } + }) + + -- You're a copper + awards.register_award("award_youre_a_copper", { + title = S("You’re a copper"), + description = S("Dig 1,000 copper ores."), + icon = "awards_youre_a_copper.png", + background = "awards_bg_mining.png", + difficulty = 0.2, + trigger = { + type = "dig", + node = "default:stone_with_copper", + target = 1000 + } + }) + + -- Mini Miner + awards.register_award("award_mine2", { + title = S("Mini Miner"), + description = S("Dig 100 stone blocks."), + icon = "awards_mini_miner.png^awards_level1.png", + background = "awards_bg_mining.png", + difficulty = 0.02, + trigger = { + type = "dig", + node = "default:stone", + target = 100 + } + }) + + -- Hardened Miner + awards.register_award("award_mine3", { + title = S("Hardened Miner"), + description = S("Dig 1,000 stone blocks."), + icon = "awards_hardened_miner.png^awards_level2.png", + background = "awards_bg_mining.png", + difficulty = 0.02, + trigger = { + type = "dig", + node = "default:stone", + target = 1000 + } + }) + + -- Master Miner + awards.register_award("award_mine4", { + title = S("Master Miner"), + description = S("Dig 10,000 stone blocks."), + icon = "awards_master_miner.png^awards_level3.png", + background = "awards_bg_mining.png", + difficulty = 0.02, + trigger = { + type = "dig", + node = "default:stone", + target = 10000 + } + }) + + -- Marchand de sable + awards.register_award("award_marchand_de_sable", { + title = S("Marchand De Sable"), + description = S("Dig 1,000 sand."), + icon = "awards_marchand_de_sable.png", + background = "awards_bg_mining.png", + difficulty = 0.05, + trigger = { + type = "dig", + node = "default:sand", + target = 1000 + } + }) + + awards.register_award("awards_crafter_of_sticks", { + title = S("Crafter of Sticks"), + description = S("Craft 100 sticks."), + icon = "awards_crafter_of_sticks.png", + difficulty = 0.01, + trigger = { + type = "craft", + item = "default:stick", + target = 100 + } + }) + + awards.register_award("awards_junglegrass", { + title = S("Jungle Discoverer"), + description = S("Mine your first jungle grass."), + icon = "awards_jungle_discoverer.png", + difficulty = 0.009, + trigger = { + type = "dig", + node = "default:junglegrass", + target = 1 + } + }) + + awards.register_award("awards_grass", { + title = S("Grasslands Discoverer"), + description = S("Mine some grass."), + icon = "awards_grasslands_discoverer.png", + difficulty = 0.009, + trigger = { + type = "dig", + node = "default:grass_1", + target = 1 + } + }) + + awards.register_award("awards_dry_grass", { + title = S("Savannah Discoverer"), + description = S("Mine some dry grass."), + icon = "awards_savannah_discoverer.png", + difficulty = 0.009, + trigger = { + type = "dig", + node = "default:dry_grass_3", + target = 1 + } + }) + + awards.register_award("awards_cactus", { + title = S("Desert Discoverer"), + description = S("Mine your first cactus."), + icon = "awards_desert_discoverer.png", + difficulty = 0.03, + trigger = { + type = "dig", + node = "default:cactus", + target = 1 + } + }) + + awards.register_award("awards_dry_shrub", { + title = S("Far Lands"), + description = S("Mine your first dry shrub."), + icon = "awards_far_lands.png", + difficulty = 0.009, + trigger = { + type = "dig", + node = "default:dry_shrub", + target = 1 + } + }) + + awards.register_award("awards_ice", { + title = S("Glacier Discoverer"), + description = S("Mine your first ice."), + icon = "awards_glacier_discoverer.png", + difficulty = 0.02, + trigger = { + type = "dig", + node = "default:ice", + target = 1 + } + }) + + -- Proof that player visited snowy lands + awards.register_award("awards_snowblock", { + title = S("Very Simple Snow Man"), + description = S("Place two snow blocks."), + icon = "awards_very_simple_snow_man.png", + difficulty = 0.02, + trigger = { + type = "place", + node = "default:snowblock", + target = 2 + } + }) + + awards.register_award("awards_gold_ore", { + title = S("First Gold Find"), + description = S("Mine your first gold ore."), + icon = "awards_first_gold_find.png^awards_level1.png", + background = "awards_bg_mining.png", + difficulty = 0.9, + trigger = { + type = "dig", + node = "default:stone_with_gold", + target = 1 + } + }) + + awards.register_award("awards_gold_rush", { + title = S("Gold Rush"), + description = S("Mine 45 gold ores."), + icon = "awards_gold_rush.png^awards_level2.png", + background = "awards_bg_mining.png", + difficulty = 0.9, + trigger = { + type = "dig", + node = "default:stone_with_gold", + target = 45 + } + }) + + awards.register_award("awards_diamond_ore", { + title = S("Wow, I am Diamonds!"), + description = S("Mine your first diamond ore."), + icon = "awards_wow_i_am_diamonds.png^awards_level1.png", + difficulty = 1, + trigger = { + type = "dig", + node = "default:stone_with_diamond", + target = 1 + } + }) + + awards.register_award("awards_diamond_rush", { + title = S("Girl's Best Friend"), + description = S("Mine 18 diamond ores."), + icon = "awards_girls_best_friend.png^awards_level2.png", + background = "awards_bg_mining.png", + difficulty = 1, + trigger = { + type = "dig", + node = "default:stone_with_diamond", + target = 18 + } + }) + + awards.register_award("awards_diamondblock", { + title = S("Hardest Block on Earth"), + description = S("Craft a diamond block."), + icon = "awards_hardest_block_on_earth.png", + difficulty = 1.1, + trigger = { + type = "craft", + item = "default:diamondblock", + target = 1 + } + }) + + awards.register_award("awards_mossycobble", { + title = S("In the Dungeon"), + description = S("Mine a mossy cobblestone."), + icon = "awards_in_the_dungeon.png", + difficulty = 0.9, + trigger = { + type = "dig", + node = "default:mossycobble", + target = 1 + } + }) + + awards.register_award("award_furnace", { + title = S("Smelter"), + description = S("Craft 10 furnaces."), + icon = "awards_smelter.png", + difficulty = 0.08, + trigger = { + type = "craft", + item= "default:furnace", + target = 10 + } + }) + + awards.register_award("award_chest", { + title = S("Treasurer"), + description = S("Craft 15 chests."), + icon = "awards_treasurer.png", + difficulty = 0.08, + trigger = { + type = "craft", + item= "default:chest", + target = 15 + } + }) + + awards.register_award("award_chest2", { + title = S("Banker"), + description = S("Craft 30 locked chests."), + icon = "awards_banker.png", + difficulty = 0.08, + trigger = { + type = "craft", + item= "default:chest_locked", + target = 30 + } + }) + + awards.register_award("award_brick", { + title = S("Bricker"), + description = S("Craft 200 brick blocks."), + icon = "awards_bricker.png", + difficulty = 0.03, + trigger = { + type = "craft", + item= "default:brick", + target = 200 + } + }) + + awards.register_award("award_obsidianbrick", { + title = S("House of Obsidian"), + description = S("Craft 100 obsidian bricks."), + icon = "awards_house_of_obsidian.png", + difficulty = 0.4, + trigger = { + type = "craft", + item= "default:obsidianbrick", + target = 100 + } + }) + + awards.register_award("award_placestone", { + title = S("Build a Cave"), + description = S("Place 100 stone."), + icon = "awards_build_a_cave.png", + difficulty = 0.1, + trigger = { + type = "place", + node = "default:stone", + target = 100 + } + }) + + awards.register_award("award_woodladder", { + title = S("Long Ladder"), + description = S("Place 400 wooden ladders."), + icon = "awards_long_ladder.png", + difficulty = 0.1, + trigger = { + type = "place", + node = "default:ladder_wood", + target = 400 + } + }) + + awards.register_award("award_steelladder", { + title = S("Industrial Age"), + description = S("Place 40 steel ladders."), + icon = "awards_industrial_age.png", + difficulty = 1, + trigger = { + type = "place", + node = "default:ladder_steel", + target = 40 + } + }) + + awards.register_award("award_apples", { + title = S("Yummy!"), + description = S("Eat 80 apples."), + icon = "awards_yummy.png", + difficulty = 0.1, + trigger = { + type = "eat", + item = "default:apple", + target = 80 + } + }) +end + +if minetest.get_modpath("vessels") then + awards.register_award("award_vessels_shelf", { + title = S("Glasser"), + icon = "awards_glasser.png", + description = S("Craft 14 vessels shelves."), + trigger = { + type = "craft", + item= "vessels:shelf", + target = 14 + } + }) +end + +if minetest.get_modpath("farming") then + awards.register_award("awards_farmer", { + title = S("Farming Skills Acquired"), + description = S("Harvest a fully grown wheat plant."), + icon = "awards_farming_skills_acquired.png^awards_level1.png", + trigger = { + type = "dig", + node = "farming:wheat_8", + target = 1 + } + }) + awards.register_award("awards_farmer2", { + title = S("Field Worker"), + description = S("Harvest 25 fully grown wheat plants."), + icon = "awards_field_worker.png^awards_level2.png", + trigger = { + type = "dig", + node = "farming:wheat_8", + target = 25 + } + }) + + awards.register_award("awards_farmer3", { + title = S("Aspiring Farmer"), + description = S("Harvest 125 fully grown wheat plants."), + icon = "awards_aspiring_farmer.png^awards_level3.png", + trigger = { + type = "dig", + node = "farming:wheat_8", + target = 125 + } + }) + + awards.register_award("awards_farmer4", { + title = S("Wheat Magnate"), + description = S("Harvest 625 fully grown wheat plants."), + icon = "awards_wheat_magnate.png^awards_level4.png", + trigger = { + type = "dig", + node = "farming:wheat_8", + target = 625 + } + }) + + awards.register_award("award_bread", { + title = S("Baker"), + description = S("Eat 10 loaves of bread."), + icon = "awards_baker.png", + trigger = { + type = "eat", + item = "farming:bread", + target = 10 + } + }) + +end + +if minetest.get_modpath("wool") and minetest.get_modpath("farming") then + awards.register_award("awards_wool", { + title = S("Wool Over Your Eyes"), + description = S("Craft 250 white wool."), + icon = "awards_wool_over_your_eyes.png", + trigger = { + type = "craft", + item = "wool:white", + target = 250 + } + }) +end + +if minetest.get_modpath("beds") then + awards.register_award("award_bed", { + title = S("Hotelier"), + description = S("Craft 15 fancy beds."), + icon = "awards_hotelier.png", + trigger = { + type = "craft", + item= "beds:fancy_bed_bottom", + target = 15 + } + }) +end + +if minetest.get_modpath("stairs") then + awards.register_award("award_stairs_goldblock", { + title = S("Filthy Rich"), + description = S("Craft 24 gold block stairs."), + icon = "awards_filthy_rich.png", + trigger = { + type = "craft", + item= "stairs:stair_goldblock", + target = 24 + } + }) +end + +if minetest.get_modpath("dye") then + awards.register_award("awards_dye_red", { + title = S("Roses Are Red"), + description = S("Craft 400 red dyes."), + icon = "awards_roses_are_red.png", + trigger = { + type = "craft", + item = "dye:red", + target = 400 + } + }) + + awards.register_award("awards_dye_yellow", { + title = S("Dandelions are Yellow"), + description = S("Craft 400 yellow dyes."), + icon = "awards_dandelions_are_yellow.png", + trigger = { + type = "craft", + item = "dye:yellow", + target = 400 + } + }) + + awards.register_award("awards_dye_blue", { + title = S("Geraniums are Blue"), + description = S("Craft 400 blue dyes."), + icon = "awards_geraniums_are_blue.png", + trigger = { + type = "craft", + item= "dye:blue", + target = 400 + } + }) + + awards.register_award("awards_dye_white", { + title = S("White Color Stock"), + description = S("Craft 100 white dyes."), + icon = "awards_white_color_stock.png", + trigger = { + type = "craft", + item= "dye:white", + target = 100 + } + }) +end + +if minetest.get_modpath("flowers") then + awards.register_award("awards_brown_mushroom1", { + title = S("Tasty Mushrooms"), + description = S("Eat 3 brown mushrooms."), + icon = "awards_tasty_mushrooms.png^awards_level1.png", + trigger = { + type = "eat", + item= "flowers:mushroom_brown", + target = 3, + } + }) + awards.register_award("awards_brown_mushroom2", { + title = S("Mushroom Lover"), + description = S("Eat 33 brown mushrooms."), + icon = "awards_mushroom_lover.png^awards_level2.png", + trigger = { + type = "eat", + item= "flowers:mushroom_brown", + target = 33, + } + }) + awards.register_award("awards_brown_mushroom3", { + title = S("Underground Mushroom Farmer"), + description = S("Eat 333 brown mushrooms."), + icon = "awards_underground_mushroom_farmer.png^awards_level3.png", + trigger = { + type = "eat", + item= "flowers:mushroom_brown", + target = 333, + } + }) +end + +-- This ensures the following code is executed after all items have been registered +minetest.after(0, function() + -- Check whether there is at least one node which can be built by the player + local building_is_possible = false + for _, def in pairs(minetest.registered_nodes) do + if (def.description and def.pointable ~= false and not def.groups.not_in_creative_inventory) then + building_is_possible = true + break + end + end + + -- The following awards require at least one node which can be built + if not building_is_possible then + return + end + + awards.register_award("awards_builder1", { + title = S("Builder"), + icon = "awards_builder.png^awards_level1.png", + trigger = { + type = "place", + target = 1000, + }, + }) + awards.register_award("awards_builder2", { + title = S("Engineer"), + icon = "awards_engineer.png^awards_level2.png", + trigger = { + type = "place", + target = 5000, + }, + }) + awards.register_award("awards_builder3", { + title = S("Architect"), + icon = "awards_architect.png^awards_level3.png", + trigger = { + type = "place", + target = 10000, + }, + }) + awards.register_award("awards_builder4", { + title = S("Master Architect"), + icon = "awards_master_architect.png^awards_level4.png", + trigger = { + type = "place", + target = 25000, + }, + }) +end) + +if minetest.get_modpath("nyancat") then + -- Found a Nyan cat! + awards.register_award("award_nyanfind", { + secret = true, + title = S("A Cat in a Pop-Tart?!"), + description = S("Mine a nyan cat."), + icon = "awards_a_cat_in_a_pop_tart.png", + trigger = { + type = "dig", + node = "nyancat:nyancat", + target = 1 + } + }) +end diff --git a/mods/awards/src/chat_commands.lua b/mods/awards/src/chat_commands.lua new file mode 100644 index 0000000..9c1580e --- /dev/null +++ b/mods/awards/src/chat_commands.lua @@ -0,0 +1,61 @@ +-- Copyright (c) 2013-18 rubenwardy. MIT. + +local S = awards.gettext + +minetest.register_chatcommand("awards", { + params = S("[c|clear|disable|enable]"), + description = S("Show, clear, disable or enable your awards"), + func = function(name, param) + if param == "clear" then + awards.clear_player(name) + minetest.chat_send_player(name, + S("All your awards and statistics have been cleared. You can now start again.")) + elseif param == "disable" then + awards.disable(name) + minetest.chat_send_player(name, S("You have disabled awards.")) + elseif param == "enable" then + awards.enable(name) + minetest.chat_send_player(name, S("You have enabled awards.")) + elseif param == "c" then + awards.show_to(name, name, nil, true) + else + awards.show_to(name, name, nil, false) + end + + if (param == "disable" or param == "enable") and minetest.global_exists("sfinv") then + local player = minetest.get_player_by_name(name) + if player then + sfinv.set_player_inventory_formspec(player) + end + end + end +}) + +minetest.register_chatcommand("awd", { + params = S(""), + description = S("Show details of an award"), + func = function(name, param) + local def = awards.registered_awards[param] + if def then + minetest.chat_send_player(name, string.format(S("%s: %s"), def.title, def.description)) + else + minetest.chat_send_player(name, S("Award not found.")) + end + end +}) + +minetest.register_chatcommand("awpl", { + privs = { + server = true + }, + params = S(""), + description = S("Get the awards statistics for the given player or yourself"), + func = function(name, param) + if not param or param == "" then + param = name + end + minetest.chat_send_player(name, param) + local player = awards.player(param) + minetest.chat_send_player(name, dump(player)) + end +}) diff --git a/mods/awards/src/data.lua b/mods/awards/src/data.lua new file mode 100644 index 0000000..27ae5e3 --- /dev/null +++ b/mods/awards/src/data.lua @@ -0,0 +1,111 @@ + +local storage = minetest.get_mod_storage() +local __player_data + +-- Table Save Load Functions +function awards.save() + storage:set_string("player_data", minetest.write_json(__player_data)) +end + +local function convert_data() + minetest.log("warning", "Importing awards data from previous version") + + local old_players = __player_data + __player_data = {} + for name, data in pairs(old_players) do + while name.name do + name = name.name + end + data.name = name + print("Converting data for " .. name) + + -- Just rename counted + local counted = { + chats = "chat", + deaths = "death", + joins = "join", + } + for from, to in pairs(counted) do + data[to] = data[from] + data[from] = nil + end + + data.death = { + unknown = data.death, + __total = data.death, + } + + -- Convert item db to new format + local counted_items = { + count = "dig", + place = "place", + craft = "craft", + } + for from, to in pairs(counted_items) do + local ret = {} + + local count = 0 + if data[from] then + for modname, items in pairs(data[from]) do + for itemname, value in pairs(items) do + itemname = modname .. ":" .. itemname + local key = minetest.registered_aliases[itemname] or itemname + ret[key] = value + count = count + value + end + end + end + + ret.__total = count + data[from] = nil + data[to] = ret + end + + __player_data[name] = data + end +end + +function awards.load() + local old_save_path = minetest.get_worldpath().."/awards.txt" + local file = io.open(old_save_path, "r") + if file then + local table = minetest.deserialize(file:read("*all")) + if type(table) == "table" then + __player_data = table + convert_data() + else + __player_data = {} + end + file:close() + os.rename(old_save_path, minetest.get_worldpath().."/awards.bk.txt") + awards.save() + else + __player_data = minetest.parse_json(storage:get_string("player_data")) or {} + end +end + +function awards.player(name) + assert(type(name) == "string") + local data = __player_data[name] or {} + __player_data[name] = data + + data.name = data.name or name + data.unlocked = data.unlocked or {} + return data +end + +function awards.player_or_nil(name) + return __player_data[name] +end + +function awards.enable(name) + awards.player(name).disabled = nil +end + +function awards.disable(name) + awards.player(name).disabled = true +end + +function awards.clear_player(name) + __player_data[name] = {} +end diff --git a/mods/awards/src/gui.lua b/mods/awards/src/gui.lua new file mode 100644 index 0000000..8faca84 --- /dev/null +++ b/mods/awards/src/gui.lua @@ -0,0 +1,285 @@ +-- Copyright (c) 2013-18 rubenwardy. MIT. + +local S = awards.gettext + +local function order_awards(name) + local hash_is_unlocked = {} + local retval = {} + + local data = awards.player(name) + if data and data.unlocked then + for awardname, _ in pairs(data.unlocked) do + local def = awards.registered_awards[awardname] + if def then + hash_is_unlocked[awardname] = true + local score = -100000 + + local difficulty = def.difficulty or 1 + if def.trigger and def.trigger.target then + difficulty = difficulty * def.trigger.target + end + score = score + difficulty + + retval[#retval + 1] = { + name = awardname, + def = def, + unlocked = true, + started = true, + score = score, + } + end + end + end + + for _, def in pairs(awards.registered_awards) do + if not hash_is_unlocked[def.name] and def:can_unlock(data) then + local started = false + local score = def.difficulty or 1 + if def.secret then + score = 1000000 + elseif def.trigger and def.trigger.target and def.getProgress then + local progress = def:getProgress(data).perc + score = score * (1 - progress) * def.trigger.target + if progress < 0.001 then + score = score + 100 + else + started = true + end + else + score = 100 + end + + retval[#retval + 1] = { + name = def.name, + def = def, + unlocked = false, + started = started, + score = score, + } + end + end + + table.sort(retval, function(a, b) + return a.score < b.score + end) + return retval +end + +function awards.get_formspec(name, to, sid) + local formspec = "" + local awards_list = order_awards(name) + local data = awards.player(name) + + if #awards_list == 0 then + formspec = formspec .. "label[3.9,1.5;"..minetest.formspec_escape(S("Error: No achivements available.")).."]" + formspec = formspec .. "button_exit[4.2,2.3;3,1;close;"..minetest.formspec_escape(S("OK")).."]" + return formspec + end + sid = awards_list[sid] and sid or 1 + + -- Sidebar + local sitem = awards_list[sid] + local sdef = sitem.def + if sdef and sdef.secret and not sitem.unlocked then + formspec = formspec .. "label[1,2.75;".. + minetest.formspec_escape(S("(Secret Award)")).."]".. + "image[1,0;3,3;awards_unknown.png]" + if sdef and sdef.description then + formspec = formspec .. "textarea[0.25,3.25;4.8,1.7;;".. + minetest.formspec_escape( + S("Unlock this award to find out what it is."))..";]" + end + else + local title = sitem.name + if sdef and sdef.title then + title = sdef.title + end + local status = "%s" + if sitem.unlocked then + status = S("%s (unlocked)") + end + + formspec = formspec .. "textarea[0.5,3.1;4.8,1.45;;" .. + string.format(status, minetest.formspec_escape(title)) .. + ";]" + + if sdef and sdef.icon then + formspec = formspec .. "image[0.45,0;3.5,3.5;" .. sdef.icon .. "]" -- adjusted values from 0.6,0;3,3 + end + local barwidth = 3.95 + local perc = nil + local label = nil + if sdef.getProgress and data then + local res = sdef:getProgress(data) + perc = res.perc + label = res.label + end + if perc then + if perc > 1 then + perc = 1 + end + formspec = formspec .. "background[0,8.24;" .. barwidth ..",0.4;awards_progress_gray.png;false]" + formspec = formspec .. "background[0,8.24;" .. (barwidth * perc) ..",0.4;awards_progress_green.png;false]" + if label then + formspec = formspec .. "label[1.6,8.15;" .. minetest.formspec_escape(label) .. "]" + end + end + if sdef and sdef.description then + formspec = formspec .. "box[-0.05,3.75;3.9,4.2;#000]" + formspec = formspec .. "textarea[0.25,3.75;3.9,4.2;;" .. + minetest.formspec_escape(sdef.description) .. ";]" + end + end + + -- Create list box + formspec = formspec .. "textlist[4,0;3.8,8.6;awards;" + local first = true + for _, award in pairs(awards_list) do + local def = award.def + if def then + if not first then + formspec = formspec .. "," + end + first = false + + if def.secret and not award.unlocked then + formspec = formspec .. "#707070"..minetest.formspec_escape(S("(Secret Award)")) + else + local title = award.name + if def and def.title then + title = def.title + end + -- title = title .. " [" .. award.score .. "]" + if award.unlocked then + formspec = formspec .. minetest.formspec_escape(title) + elseif award.started then + formspec = formspec .. "#c0c0c0".. minetest.formspec_escape(title) + else + formspec = formspec .. "#a0a0a0".. minetest.formspec_escape(title) + end + end + end + end + return formspec .. ";"..sid.."]" +end + + +function awards.show_to(name, to, sid, text) + if name == "" or name == nil then + name = to + end + local data = awards.player(to) + if name == to and data.disabled then + minetest.chat_send_player(name, S("You've disabled awards. Type /awards enable to reenable.")) + return + end + if text then + local awards_list = order_awards(name) + if #awards_list == 0 then + minetest.chat_send_player(to, S("Error: No award available.")) + return + elseif not data or not data.unlocked then + minetest.chat_send_player(to, S("You have not unlocked any awards.")) + return + end + minetest.chat_send_player(to, string.format(S("%s’s awards:"), name)) + + for str, _ in pairs(data.unlocked) do + local def = awards.registered_awards[str] + if def then + if def.title then + if def.description then + minetest.chat_send_player(to, string.format(S("%s: %s"), def.title, def.description)) + else + minetest.chat_send_player(to, def.title) + end + else + minetest.chat_send_player(to, str) + end + end + end + else + local deco = "" + if minetest.global_exists("default") then + deco = default.gui_bg .. default.gui_bg_img + end + -- Show formspec to user + minetest.show_formspec(to,"awards:awards", + "size[8,8.6]" .. deco .. + awards.get_formspec(name, to, sid)) + end +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "awards:awards" then + return false + end + if fields.quit then + return true + end + local name = player:get_player_name() + if fields.awards then + local event = minetest.explode_textlist_event(fields.awards) + if event.type == "CHG" then + awards.show_to(name, name, event.index, false) + end + end + + return true +end) + +if minetest.get_modpath("sfinv") then + sfinv.register_page("awards:awards", { + title = S("Awards"), + on_enter = function(self, player, context) + context.awards_idx = 1 + end, + is_in_nav = function(self, player, context) + local data = awards.player(player:get_player_name()) + return not data.disabled + end, + get = function(self, player, context) + local name = player:get_player_name() + return sfinv.make_formspec(player, context, + awards.get_formspec(name, name, context.awards_idx), + false) + end, + on_player_receive_fields = function(self, player, context, fields) + if fields.awards then + local event = minetest.explode_textlist_event(fields.awards) + if event.type == "CHG" then + context.awards_idx = event.index + sfinv.set_player_inventory_formspec(player, context) + end + end + end + }) + + local function check_and_reshow(name) + local player = minetest.get_player_by_name(name) + if not player then + return + end + + local context = sfinv.get_or_create_context(player) + if context.page ~= "awards:awards" then + return + end + + sfinv.set_player_inventory_formspec(player, context) + end + + awards.register_on_unlock(check_and_reshow) +end + +if minetest.get_modpath("unified_inventory") ~= nil then + unified_inventory.register_button("awards", { + type = "image", + image = "awards_ui_icon.png", + tooltip = S("Awards"), + action = function(player) + local name = player:get_player_name() + awards.show_to(name, name, nil, false) + end, + }) +end diff --git a/mods/awards/src/intllib.lua b/mods/awards/src/intllib.lua new file mode 100644 index 0000000..c7af2c2 --- /dev/null +++ b/mods/awards/src/intllib.lua @@ -0,0 +1,44 @@ +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/awards/src/triggers.lua b/mods/awards/src/triggers.lua new file mode 100644 index 0000000..32a0b85 --- /dev/null +++ b/mods/awards/src/triggers.lua @@ -0,0 +1,141 @@ +-- AWARDS +-- +-- Copyright (C) 2013-2015 rubenwardy +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU Lesser General Public License as published by +-- the Free Software Foundation; either version 2.1 of the License, or +-- (at your option) any later version. +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU Lesser General Public License for more details. +-- You should have received a copy of the GNU Lesser General Public License along +-- with this program; if not, write to the Free Software Foundation, Inc., +-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +-- + + +awards.register_trigger("chat", { + type = "counted", + progress = "@1/@2 chat messages", + auto_description = { "Send a chat message", "Chat @1 times" }, +}) +minetest.register_on_chat_message(function(name, message) + local player = minetest.get_player_by_name(name) + if not player or string.find(message, "/") then + return + end + + awards.notify_chat(player) +end) + + +awards.register_trigger("join", { + type = "counted", + progress = "@1/@2 joins", + auto_description = { "Join once", "Join @1 times" }, +}) +minetest.register_on_joinplayer(awards.notify_join) + + +awards.register_trigger("death", { + type = "counted_key", + progress = "@1/@2 deaths", + auto_description = { "Die once of @2", "Die @1 times of @2" }, + auto_description_total = { "Die @1 times.", "Mine @1 times" }, + get_key = function(self, def) + return def.trigger.reason + end, +}) +minetest.register_on_dieplayer(function(player, reason) + if reason then + reason = reason.type + else + reason = "unknown" + end + awards.notify_death(player, reason) +end) + + +awards.register_trigger("dig", { + type = "counted_key", + progress = "@1/@2 dug", + auto_description = { "Mine: @2", "Mine: @1×@2" }, + auto_description_total = { "Mine @1 block.", "Mine @1 blocks." }, + get_key = function(self, def) + return minetest.registered_aliases[def.trigger.node] or def.trigger.node + end, + key_is_item = true, +}) +minetest.register_on_dignode(function(pos, node, player) + if not player or not pos or not node then + return + end + + local node_name = node.name + node_name = minetest.registered_aliases[node_name] or node_name + awards.notify_dig(player, node_name) +end) + + +awards.register_trigger("place", { + type = "counted_key", + progress = "@1/@2 placed", + auto_description = { "Place: @2", "Place: @1×@2" }, + auto_description_total = { "Place @1 block.", "Place @1 blocks." }, + get_key = function(self, def) + return minetest.registered_aliases[def.trigger.node] or def.trigger.node + end, + key_is_item = true, +}) +minetest.register_on_placenode(function(pos, node, player) + if not player or not pos or not node then + return + end + + local node_name = node.name + node_name = minetest.registered_aliases[node_name] or node_name + awards.notify_place(player, node_name) +end) + + +awards.register_trigger("craft", { + type = "counted_key", + progress = "@1/@2 crafted", + auto_description = { "Craft: @2", "Craft: @1×@2" }, + auto_description_total = { "Craft @1 item", "Craft @1 items." }, + get_key = function(self, def) + return minetest.registered_aliases[def.trigger.item] or def.trigger.item + end, + key_is_item = true, +}) +minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv) + if not player or itemstack:is_empty() then + return + end + + local itemname = itemstack:get_name() + itemname = minetest.registered_aliases[itemname] or itemname + awards.notify_craft(player, itemname, itemstack:get_count()) +end) + + +awards.register_trigger("eat", { + type = "counted_key", + progress = "@1/@2 eaten", + auto_description = { "Eat @2", "Eat @1×@2" }, + auto_description_total = { "Eat @1 item", "Eat @1 items." }, + get_key = function(self, def) + return minetest.registered_aliases[def.trigger.item] or def.trigger.item + end, + key_is_item = true, +}) +minetest.register_on_item_eat(function(_, _, itemstack, player, _) + if not player or itemstack:is_empty() then + return + end + + local itemname = itemstack:get_name() + itemname = minetest.registered_aliases[itemname] or itemname + awards.notify_craft(player, itemname, itemstack:get_count()) +end) diff --git a/mods/awards/textures/_Gimp/awards_Pyromaniac.xcf b/mods/awards/textures/_Gimp/awards_Pyromaniac.xcf new file mode 100644 index 0000000..3a2dcf5 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_Pyromaniac.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_a_cat_in_a_pop_tart.xcf b/mods/awards/textures/_Gimp/awards_a_cat_in_a_pop_tart.xcf new file mode 100644 index 0000000..793a479 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_a_cat_in_a_pop_tart.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_architect.xcf b/mods/awards/textures/_Gimp/awards_architect.xcf new file mode 100644 index 0000000..7937372 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_architect.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_aspiring_farmer.xcf b/mods/awards/textures/_Gimp/awards_aspiring_farmer.xcf new file mode 100644 index 0000000..803ac3b Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_aspiring_farmer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_backpacker.xcf b/mods/awards/textures/_Gimp/awards_backpacker.xcf new file mode 100644 index 0000000..45d957b Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_backpacker.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_baker.xcf b/mods/awards/textures/_Gimp/awards_baker.xcf new file mode 100644 index 0000000..6b99dfb Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_baker.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_banker.xcf b/mods/awards/textures/_Gimp/awards_banker.xcf new file mode 100644 index 0000000..f8e2014 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_banker.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_bricker.xcf b/mods/awards/textures/_Gimp/awards_bricker.xcf new file mode 100644 index 0000000..5a24f86 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_bricker.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_build_a_cave.xcf b/mods/awards/textures/_Gimp/awards_build_a_cave.xcf new file mode 100644 index 0000000..d5b9e0a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_build_a_cave.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_builder.xcf b/mods/awards/textures/_Gimp/awards_builder.xcf new file mode 100644 index 0000000..6b33fd5 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_builder.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_castorama.xcf b/mods/awards/textures/_Gimp/awards_castorama.xcf new file mode 100644 index 0000000..1a114b2 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_castorama.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_crafter_of_sticks.xcf b/mods/awards/textures/_Gimp/awards_crafter_of_sticks.xcf new file mode 100644 index 0000000..70eb2d6 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_crafter_of_sticks.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_dandelions_are_yellow.xcf b/mods/awards/textures/_Gimp/awards_dandelions_are_yellow.xcf new file mode 100644 index 0000000..a161242 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_dandelions_are_yellow.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_desert_discoverer.xcf b/mods/awards/textures/_Gimp/awards_desert_discoverer.xcf new file mode 100644 index 0000000..e5e51e0 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_desert_discoverer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_desert_dweller.xcf b/mods/awards/textures/_Gimp/awards_desert_dweller.xcf new file mode 100644 index 0000000..9a43ffb Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_desert_dweller.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_engineer.xcf b/mods/awards/textures/_Gimp/awards_engineer.xcf new file mode 100644 index 0000000..0e07f24 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_engineer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_far_lands.xcf b/mods/awards/textures/_Gimp/awards_far_lands.xcf new file mode 100644 index 0000000..1f9797a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_far_lands.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_farming_skills_acquired.xcf b/mods/awards/textures/_Gimp/awards_farming_skills_acquired.xcf new file mode 100644 index 0000000..3fbedd6 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_farming_skills_acquired.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_field_worker.xcf b/mods/awards/textures/_Gimp/awards_field_worker.xcf new file mode 100644 index 0000000..61b3cad Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_field_worker.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_filthy_rich.xcf b/mods/awards/textures/_Gimp/awards_filthy_rich.xcf new file mode 100644 index 0000000..9693359 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_filthy_rich.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_firefighter.xcf b/mods/awards/textures/_Gimp/awards_firefighter.xcf new file mode 100644 index 0000000..2e245f4 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_firefighter.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_first_day_in_the_woods.xcf b/mods/awards/textures/_Gimp/awards_first_day_in_the_woods.xcf new file mode 100644 index 0000000..f2c90ef Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_first_day_in_the_woods.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_first_gold_find.xcf b/mods/awards/textures/_Gimp/awards_first_gold_find.xcf new file mode 100644 index 0000000..39c8c22 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_first_gold_find.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_first_mese_find.xcf b/mods/awards/textures/_Gimp/awards_first_mese_find.xcf new file mode 100644 index 0000000..7ba420a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_first_mese_find.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_fortress.xcf b/mods/awards/textures/_Gimp/awards_fortress.xcf new file mode 100644 index 0000000..c17a8a4 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_fortress.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_geraniums_are_blue.xcf b/mods/awards/textures/_Gimp/awards_geraniums_are_blue.xcf new file mode 100644 index 0000000..f48c57f Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_geraniums_are_blue.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_girls_best_friend.xcf b/mods/awards/textures/_Gimp/awards_girls_best_friend.xcf new file mode 100644 index 0000000..c727bd4 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_girls_best_friend.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_glacier_discoverer.xcf b/mods/awards/textures/_Gimp/awards_glacier_discoverer.xcf new file mode 100644 index 0000000..2a504aa Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_glacier_discoverer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_glasser.xcf b/mods/awards/textures/_Gimp/awards_glasser.xcf new file mode 100644 index 0000000..97c8575 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_glasser.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_gold_rush.xcf b/mods/awards/textures/_Gimp/awards_gold_rush.xcf new file mode 100644 index 0000000..0fbc8a5 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_gold_rush.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_grasslands_discoverer.xcf b/mods/awards/textures/_Gimp/awards_grasslands_discoverer.xcf new file mode 100644 index 0000000..35fa979 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_grasslands_discoverer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_hardened_miner.xcf b/mods/awards/textures/_Gimp/awards_hardened_miner.xcf new file mode 100644 index 0000000..ffbd68f Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_hardened_miner.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_hardest_block_on_earth.xcf b/mods/awards/textures/_Gimp/awards_hardest_block_on_earth.xcf new file mode 100644 index 0000000..89d1fbf Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_hardest_block_on_earth.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_hotelier.xcf b/mods/awards/textures/_Gimp/awards_hotelier.xcf new file mode 100644 index 0000000..788f4ce Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_hotelier.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_house_of_obsidian.xcf b/mods/awards/textures/_Gimp/awards_house_of_obsidian.xcf new file mode 100644 index 0000000..01e8660 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_house_of_obsidian.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_in_the_dungeon.xcf b/mods/awards/textures/_Gimp/awards_in_the_dungeon.xcf new file mode 100644 index 0000000..88ede74 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_in_the_dungeon.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_industrial_age.xcf b/mods/awards/textures/_Gimp/awards_industrial_age.xcf new file mode 100644 index 0000000..daee558 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_industrial_age.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_jungle_discoverer.xcf b/mods/awards/textures/_Gimp/awards_jungle_discoverer.xcf new file mode 100644 index 0000000..92e74fd Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_jungle_discoverer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_junglebaby.xcf b/mods/awards/textures/_Gimp/awards_junglebaby.xcf new file mode 100644 index 0000000..58e83fd Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_junglebaby.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_jungleman.xcf b/mods/awards/textures/_Gimp/awards_jungleman.xcf new file mode 100644 index 0000000..7b64747 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_jungleman.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_lava_and_water.xcf b/mods/awards/textures/_Gimp/awards_lava_and_water.xcf new file mode 100644 index 0000000..bfa7d14 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_lava_and_water.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_lava_miner.xcf b/mods/awards/textures/_Gimp/awards_lava_miner.xcf new file mode 100644 index 0000000..0c2684c Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_lava_miner.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level1.xcf b/mods/awards/textures/_Gimp/awards_level1.xcf new file mode 100644 index 0000000..09d53df Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level1.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level2.xcf b/mods/awards/textures/_Gimp/awards_level2.xcf new file mode 100644 index 0000000..170ebc4 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level2.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level3.xcf b/mods/awards/textures/_Gimp/awards_level3.xcf new file mode 100644 index 0000000..dbf3480 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level3.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level4.xcf b/mods/awards/textures/_Gimp/awards_level4.xcf new file mode 100644 index 0000000..ddbba7d Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level4.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level5.xcf b/mods/awards/textures/_Gimp/awards_level5.xcf new file mode 100644 index 0000000..bc6a38b Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level5.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level6.xcf b/mods/awards/textures/_Gimp/awards_level6.xcf new file mode 100644 index 0000000..99d3e1a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level6.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_level7.xcf b/mods/awards/textures/_Gimp/awards_level7.xcf new file mode 100644 index 0000000..269a8d1 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_level7.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_light_it_up.xcf b/mods/awards/textures/_Gimp/awards_light_it_up.xcf new file mode 100644 index 0000000..ceb8693 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_light_it_up.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_little_library.xcf b/mods/awards/textures/_Gimp/awards_little_library.xcf new file mode 100644 index 0000000..7f3a36a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_little_library.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_long_ladder.xcf b/mods/awards/textures/_Gimp/awards_long_ladder.xcf new file mode 100644 index 0000000..4642d8a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_long_ladder.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_lumberjack.xcf b/mods/awards/textures/_Gimp/awards_lumberjack.xcf new file mode 100644 index 0000000..884a2e9 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_lumberjack.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_marchand_de_sable.xcf b/mods/awards/textures/_Gimp/awards_marchand_de_sable.xcf new file mode 100644 index 0000000..9f07ad2 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_marchand_de_sable.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_master_architect.xcf b/mods/awards/textures/_Gimp/awards_master_architect.xcf new file mode 100644 index 0000000..147a764 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_master_architect.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_master_miner.xcf b/mods/awards/textures/_Gimp/awards_master_miner.xcf new file mode 100644 index 0000000..7f49780 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_master_miner.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_mese_mastery.xcf b/mods/awards/textures/_Gimp/awards_mese_mastery.xcf new file mode 100644 index 0000000..3e041ac Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_mese_mastery.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_mini_miner.xcf b/mods/awards/textures/_Gimp/awards_mini_miner.xcf new file mode 100644 index 0000000..69bbe8a Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_mini_miner.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_mushroom_lover.xcf b/mods/awards/textures/_Gimp/awards_mushroom_lover.xcf new file mode 100644 index 0000000..7b1b838 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_mushroom_lover.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_obsessed_with_obsidian.xcf b/mods/awards/textures/_Gimp/awards_obsessed_with_obsidian.xcf new file mode 100644 index 0000000..7e25536 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_obsessed_with_obsidian.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_on_the_way.xcf b/mods/awards/textures/_Gimp/awards_on_the_way.xcf new file mode 100644 index 0000000..658c116 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_on_the_way.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_outpost.xcf b/mods/awards/textures/_Gimp/awards_outpost.xcf new file mode 100644 index 0000000..0204ef5 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_outpost.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_pharaoh.xcf b/mods/awards/textures/_Gimp/awards_pharaoh.xcf new file mode 100644 index 0000000..14feb90 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_pharaoh.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_professional_lumberjack.xcf b/mods/awards/textures/_Gimp/awards_professional_lumberjack.xcf new file mode 100644 index 0000000..ee1be0b Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_professional_lumberjack.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_really_well_lit.xcf b/mods/awards/textures/_Gimp/awards_really_well_lit.xcf new file mode 100644 index 0000000..b3747cf Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_really_well_lit.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_roses_are_red.xcf b/mods/awards/textures/_Gimp/awards_roses_are_red.xcf new file mode 100644 index 0000000..eec49b9 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_roses_are_red.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_saint_maclou.xcf b/mods/awards/textures/_Gimp/awards_saint_maclou.xcf new file mode 100644 index 0000000..d998363 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_saint_maclou.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_sam_the_trapper.xcf b/mods/awards/textures/_Gimp/awards_sam_the_trapper.xcf new file mode 100644 index 0000000..ea1f208 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_sam_the_trapper.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_savannah_discoverer.xcf b/mods/awards/textures/_Gimp/awards_savannah_discoverer.xcf new file mode 100644 index 0000000..1f7cd36 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_savannah_discoverer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_semi_pro_lumberjack.xcf b/mods/awards/textures/_Gimp/awards_semi_pro_lumberjack.xcf new file mode 100644 index 0000000..0a0c426 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_semi_pro_lumberjack.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_smelter.xcf b/mods/awards/textures/_Gimp/awards_smelter.xcf new file mode 100644 index 0000000..9bc2c7f Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_smelter.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_tasty_mushrooms.xcf b/mods/awards/textures/_Gimp/awards_tasty_mushrooms.xcf new file mode 100644 index 0000000..ad28538 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_tasty_mushrooms.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_template.xcf b/mods/awards/textures/_Gimp/awards_template.xcf new file mode 100644 index 0000000..371b3f3 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_template.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_treasurer.xcf b/mods/awards/textures/_Gimp/awards_treasurer.xcf new file mode 100644 index 0000000..1f857f8 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_treasurer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_ui_icon.xcf b/mods/awards/textures/_Gimp/awards_ui_icon.xcf new file mode 100644 index 0000000..8ad704b Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_ui_icon.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_underground_mushroom_farmer.xcf b/mods/awards/textures/_Gimp/awards_underground_mushroom_farmer.xcf new file mode 100644 index 0000000..fb53f08 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_underground_mushroom_farmer.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_unknown.xcf b/mods/awards/textures/_Gimp/awards_unknown.xcf new file mode 100644 index 0000000..b71bb16 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_unknown.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_very_simple_snow_man.xcf b/mods/awards/textures/_Gimp/awards_very_simple_snow_man.xcf new file mode 100644 index 0000000..ce7ac1d Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_very_simple_snow_man.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_watchtower.xcf b/mods/awards/textures/_Gimp/awards_watchtower.xcf new file mode 100644 index 0000000..2fbe2e3 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_watchtower.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_well_lit.xcf b/mods/awards/textures/_Gimp/awards_well_lit.xcf new file mode 100644 index 0000000..bc3fbab Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_well_lit.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_wheat_magnate.xcf b/mods/awards/textures/_Gimp/awards_wheat_magnate.xcf new file mode 100644 index 0000000..0fb20ec Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_wheat_magnate.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_white_color_stock.xcf b/mods/awards/textures/_Gimp/awards_white_color_stock.xcf new file mode 100644 index 0000000..010fac1 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_white_color_stock.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_wool_over_your_eyes.xcf b/mods/awards/textures/_Gimp/awards_wool_over_your_eyes.xcf new file mode 100644 index 0000000..19bc54c Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_wool_over_your_eyes.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_wow_i_am_diamonds.xcf b/mods/awards/textures/_Gimp/awards_wow_i_am_diamonds.xcf new file mode 100644 index 0000000..98c2cbe Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_wow_i_am_diamonds.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_youre_a_copper.xcf b/mods/awards/textures/_Gimp/awards_youre_a_copper.xcf new file mode 100644 index 0000000..ba06034 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_youre_a_copper.xcf differ diff --git a/mods/awards/textures/_Gimp/awards_yummy.xcf b/mods/awards/textures/_Gimp/awards_yummy.xcf new file mode 100644 index 0000000..862bbe8 Binary files /dev/null and b/mods/awards/textures/_Gimp/awards_yummy.xcf differ diff --git a/mods/awards/textures/_RinrinDaishi_message.png b/mods/awards/textures/_RinrinDaishi_message.png new file mode 100644 index 0000000..b22781e Binary files /dev/null and b/mods/awards/textures/_RinrinDaishi_message.png differ diff --git a/mods/awards/textures/awards_a_cat_in_a_pop_tart.png b/mods/awards/textures/awards_a_cat_in_a_pop_tart.png new file mode 100644 index 0000000..79ec4c1 Binary files /dev/null and b/mods/awards/textures/awards_a_cat_in_a_pop_tart.png differ diff --git a/mods/awards/textures/awards_architect.png b/mods/awards/textures/awards_architect.png new file mode 100644 index 0000000..526a290 Binary files /dev/null and b/mods/awards/textures/awards_architect.png differ diff --git a/mods/awards/textures/awards_aspiring_farmer.png b/mods/awards/textures/awards_aspiring_farmer.png new file mode 100644 index 0000000..6fcce95 Binary files /dev/null and b/mods/awards/textures/awards_aspiring_farmer.png differ diff --git a/mods/awards/textures/awards_backpacker.png b/mods/awards/textures/awards_backpacker.png new file mode 100644 index 0000000..d87ffa7 Binary files /dev/null and b/mods/awards/textures/awards_backpacker.png differ diff --git a/mods/awards/textures/awards_baker.png b/mods/awards/textures/awards_baker.png new file mode 100644 index 0000000..445da14 Binary files /dev/null and b/mods/awards/textures/awards_baker.png differ diff --git a/mods/awards/textures/awards_banker.png b/mods/awards/textures/awards_banker.png new file mode 100644 index 0000000..f0899c0 Binary files /dev/null and b/mods/awards/textures/awards_banker.png differ diff --git a/mods/awards/textures/awards_bg_default.png b/mods/awards/textures/awards_bg_default.png new file mode 100644 index 0000000..a6f57d3 Binary files /dev/null and b/mods/awards/textures/awards_bg_default.png differ diff --git a/mods/awards/textures/awards_bg_mining.png b/mods/awards/textures/awards_bg_mining.png new file mode 100644 index 0000000..a698779 Binary files /dev/null and b/mods/awards/textures/awards_bg_mining.png differ diff --git a/mods/awards/textures/awards_bricker.png b/mods/awards/textures/awards_bricker.png new file mode 100644 index 0000000..eb5e814 Binary files /dev/null and b/mods/awards/textures/awards_bricker.png differ diff --git a/mods/awards/textures/awards_build_a_cave.png b/mods/awards/textures/awards_build_a_cave.png new file mode 100644 index 0000000..de2e75b Binary files /dev/null and b/mods/awards/textures/awards_build_a_cave.png differ diff --git a/mods/awards/textures/awards_builder.png b/mods/awards/textures/awards_builder.png new file mode 100644 index 0000000..6c04003 Binary files /dev/null and b/mods/awards/textures/awards_builder.png differ diff --git a/mods/awards/textures/awards_castorama.png b/mods/awards/textures/awards_castorama.png new file mode 100644 index 0000000..b5dce24 Binary files /dev/null and b/mods/awards/textures/awards_castorama.png differ diff --git a/mods/awards/textures/awards_crafter_of_sticks.png b/mods/awards/textures/awards_crafter_of_sticks.png new file mode 100644 index 0000000..a2137bd Binary files /dev/null and b/mods/awards/textures/awards_crafter_of_sticks.png differ diff --git a/mods/awards/textures/awards_dandelions_are_yellow.png b/mods/awards/textures/awards_dandelions_are_yellow.png new file mode 100644 index 0000000..c875de1 Binary files /dev/null and b/mods/awards/textures/awards_dandelions_are_yellow.png differ diff --git a/mods/awards/textures/awards_desert_discoverer.png b/mods/awards/textures/awards_desert_discoverer.png new file mode 100644 index 0000000..6d4a2e5 Binary files /dev/null and b/mods/awards/textures/awards_desert_discoverer.png differ diff --git a/mods/awards/textures/awards_desert_dweller.png b/mods/awards/textures/awards_desert_dweller.png new file mode 100644 index 0000000..e03a2d1 Binary files /dev/null and b/mods/awards/textures/awards_desert_dweller.png differ diff --git a/mods/awards/textures/awards_engineer.png b/mods/awards/textures/awards_engineer.png new file mode 100644 index 0000000..bd6bd4f Binary files /dev/null and b/mods/awards/textures/awards_engineer.png differ diff --git a/mods/awards/textures/awards_far_lands.png b/mods/awards/textures/awards_far_lands.png new file mode 100644 index 0000000..2072bf6 Binary files /dev/null and b/mods/awards/textures/awards_far_lands.png differ diff --git a/mods/awards/textures/awards_farming_skills_acquired.png b/mods/awards/textures/awards_farming_skills_acquired.png new file mode 100644 index 0000000..28803dc Binary files /dev/null and b/mods/awards/textures/awards_farming_skills_acquired.png differ diff --git a/mods/awards/textures/awards_field_worker.png b/mods/awards/textures/awards_field_worker.png new file mode 100644 index 0000000..e898ee9 Binary files /dev/null and b/mods/awards/textures/awards_field_worker.png differ diff --git a/mods/awards/textures/awards_filthy_rich.png b/mods/awards/textures/awards_filthy_rich.png new file mode 100644 index 0000000..6578c38 Binary files /dev/null and b/mods/awards/textures/awards_filthy_rich.png differ diff --git a/mods/awards/textures/awards_firefighter.png b/mods/awards/textures/awards_firefighter.png new file mode 100644 index 0000000..46076a7 Binary files /dev/null and b/mods/awards/textures/awards_firefighter.png differ diff --git a/mods/awards/textures/awards_first_day_in_the_woods.png b/mods/awards/textures/awards_first_day_in_the_woods.png new file mode 100644 index 0000000..e677d88 Binary files /dev/null and b/mods/awards/textures/awards_first_day_in_the_woods.png differ diff --git a/mods/awards/textures/awards_first_gold_find.png b/mods/awards/textures/awards_first_gold_find.png new file mode 100644 index 0000000..edd6c14 Binary files /dev/null and b/mods/awards/textures/awards_first_gold_find.png differ diff --git a/mods/awards/textures/awards_first_mese_find.png b/mods/awards/textures/awards_first_mese_find.png new file mode 100644 index 0000000..43d848e Binary files /dev/null and b/mods/awards/textures/awards_first_mese_find.png differ diff --git a/mods/awards/textures/awards_fortress.png b/mods/awards/textures/awards_fortress.png new file mode 100644 index 0000000..d40ab74 Binary files /dev/null and b/mods/awards/textures/awards_fortress.png differ diff --git a/mods/awards/textures/awards_geraniums_are_blue.png b/mods/awards/textures/awards_geraniums_are_blue.png new file mode 100644 index 0000000..f4fed56 Binary files /dev/null and b/mods/awards/textures/awards_geraniums_are_blue.png differ diff --git a/mods/awards/textures/awards_girls_best_friend.png b/mods/awards/textures/awards_girls_best_friend.png new file mode 100644 index 0000000..6143ea4 Binary files /dev/null and b/mods/awards/textures/awards_girls_best_friend.png differ diff --git a/mods/awards/textures/awards_glacier_discoverer.png b/mods/awards/textures/awards_glacier_discoverer.png new file mode 100644 index 0000000..5d7b3ca Binary files /dev/null and b/mods/awards/textures/awards_glacier_discoverer.png differ diff --git a/mods/awards/textures/awards_glasser.png b/mods/awards/textures/awards_glasser.png new file mode 100644 index 0000000..a5dfb03 Binary files /dev/null and b/mods/awards/textures/awards_glasser.png differ diff --git a/mods/awards/textures/awards_gold_rush.png b/mods/awards/textures/awards_gold_rush.png new file mode 100644 index 0000000..dbd6ac3 Binary files /dev/null and b/mods/awards/textures/awards_gold_rush.png differ diff --git a/mods/awards/textures/awards_grasslands_discoverer.png b/mods/awards/textures/awards_grasslands_discoverer.png new file mode 100644 index 0000000..7de444c Binary files /dev/null and b/mods/awards/textures/awards_grasslands_discoverer.png differ diff --git a/mods/awards/textures/awards_hardened_miner.png b/mods/awards/textures/awards_hardened_miner.png new file mode 100644 index 0000000..d4baf48 Binary files /dev/null and b/mods/awards/textures/awards_hardened_miner.png differ diff --git a/mods/awards/textures/awards_hardest_block_on_earth.png b/mods/awards/textures/awards_hardest_block_on_earth.png new file mode 100644 index 0000000..3ab903c Binary files /dev/null and b/mods/awards/textures/awards_hardest_block_on_earth.png differ diff --git a/mods/awards/textures/awards_hotelier.png b/mods/awards/textures/awards_hotelier.png new file mode 100644 index 0000000..5a0f6fd Binary files /dev/null and b/mods/awards/textures/awards_hotelier.png differ diff --git a/mods/awards/textures/awards_house_of_obsidian.png b/mods/awards/textures/awards_house_of_obsidian.png new file mode 100644 index 0000000..15b3409 Binary files /dev/null and b/mods/awards/textures/awards_house_of_obsidian.png differ diff --git a/mods/awards/textures/awards_in_the_dungeon.png b/mods/awards/textures/awards_in_the_dungeon.png new file mode 100644 index 0000000..d419d64 Binary files /dev/null and b/mods/awards/textures/awards_in_the_dungeon.png differ diff --git a/mods/awards/textures/awards_industrial_age.png b/mods/awards/textures/awards_industrial_age.png new file mode 100644 index 0000000..d02c3c8 Binary files /dev/null and b/mods/awards/textures/awards_industrial_age.png differ diff --git a/mods/awards/textures/awards_jungle_discoverer.png b/mods/awards/textures/awards_jungle_discoverer.png new file mode 100644 index 0000000..f955e66 Binary files /dev/null and b/mods/awards/textures/awards_jungle_discoverer.png differ diff --git a/mods/awards/textures/awards_junglebaby.png b/mods/awards/textures/awards_junglebaby.png new file mode 100644 index 0000000..e878977 Binary files /dev/null and b/mods/awards/textures/awards_junglebaby.png differ diff --git a/mods/awards/textures/awards_jungleman.png b/mods/awards/textures/awards_jungleman.png new file mode 100644 index 0000000..11ad3bd Binary files /dev/null and b/mods/awards/textures/awards_jungleman.png differ diff --git a/mods/awards/textures/awards_lava_and_water.png b/mods/awards/textures/awards_lava_and_water.png new file mode 100644 index 0000000..a61ec12 Binary files /dev/null and b/mods/awards/textures/awards_lava_and_water.png differ diff --git a/mods/awards/textures/awards_lava_miner.png b/mods/awards/textures/awards_lava_miner.png new file mode 100644 index 0000000..14c4ff8 Binary files /dev/null and b/mods/awards/textures/awards_lava_miner.png differ diff --git a/mods/awards/textures/awards_level1.png b/mods/awards/textures/awards_level1.png new file mode 100644 index 0000000..92051e6 Binary files /dev/null and b/mods/awards/textures/awards_level1.png differ diff --git a/mods/awards/textures/awards_level2.png b/mods/awards/textures/awards_level2.png new file mode 100644 index 0000000..7132dcc Binary files /dev/null and b/mods/awards/textures/awards_level2.png differ diff --git a/mods/awards/textures/awards_level3.png b/mods/awards/textures/awards_level3.png new file mode 100644 index 0000000..4a61d25 Binary files /dev/null and b/mods/awards/textures/awards_level3.png differ diff --git a/mods/awards/textures/awards_level4.png b/mods/awards/textures/awards_level4.png new file mode 100644 index 0000000..5909a32 Binary files /dev/null and b/mods/awards/textures/awards_level4.png differ diff --git a/mods/awards/textures/awards_level5.png b/mods/awards/textures/awards_level5.png new file mode 100644 index 0000000..26b94ac Binary files /dev/null and b/mods/awards/textures/awards_level5.png differ diff --git a/mods/awards/textures/awards_level6.png b/mods/awards/textures/awards_level6.png new file mode 100644 index 0000000..1685125 Binary files /dev/null and b/mods/awards/textures/awards_level6.png differ diff --git a/mods/awards/textures/awards_level7.png b/mods/awards/textures/awards_level7.png new file mode 100644 index 0000000..6b84557 Binary files /dev/null and b/mods/awards/textures/awards_level7.png differ diff --git a/mods/awards/textures/awards_light_it_up.png b/mods/awards/textures/awards_light_it_up.png new file mode 100644 index 0000000..e8725d1 Binary files /dev/null and b/mods/awards/textures/awards_light_it_up.png differ diff --git a/mods/awards/textures/awards_little_library.png b/mods/awards/textures/awards_little_library.png new file mode 100644 index 0000000..bf609f3 Binary files /dev/null and b/mods/awards/textures/awards_little_library.png differ diff --git a/mods/awards/textures/awards_long_ladder.png b/mods/awards/textures/awards_long_ladder.png new file mode 100644 index 0000000..a3c38d9 Binary files /dev/null and b/mods/awards/textures/awards_long_ladder.png differ diff --git a/mods/awards/textures/awards_lumberjack.png b/mods/awards/textures/awards_lumberjack.png new file mode 100644 index 0000000..4f89c47 Binary files /dev/null and b/mods/awards/textures/awards_lumberjack.png differ diff --git a/mods/awards/textures/awards_marchand_de_sable.png b/mods/awards/textures/awards_marchand_de_sable.png new file mode 100644 index 0000000..01e80d6 Binary files /dev/null and b/mods/awards/textures/awards_marchand_de_sable.png differ diff --git a/mods/awards/textures/awards_master_architect.png b/mods/awards/textures/awards_master_architect.png new file mode 100644 index 0000000..34b8bc2 Binary files /dev/null and b/mods/awards/textures/awards_master_architect.png differ diff --git a/mods/awards/textures/awards_master_miner.png b/mods/awards/textures/awards_master_miner.png new file mode 100644 index 0000000..8bf37c4 Binary files /dev/null and b/mods/awards/textures/awards_master_miner.png differ diff --git a/mods/awards/textures/awards_mese_mastery.png b/mods/awards/textures/awards_mese_mastery.png new file mode 100644 index 0000000..89714ae Binary files /dev/null and b/mods/awards/textures/awards_mese_mastery.png differ diff --git a/mods/awards/textures/awards_mini_miner.png b/mods/awards/textures/awards_mini_miner.png new file mode 100644 index 0000000..4ccb127 Binary files /dev/null and b/mods/awards/textures/awards_mini_miner.png differ diff --git a/mods/awards/textures/awards_mushroom_lover.png b/mods/awards/textures/awards_mushroom_lover.png new file mode 100644 index 0000000..52805bd Binary files /dev/null and b/mods/awards/textures/awards_mushroom_lover.png differ diff --git a/mods/awards/textures/awards_obsessed_with_obsidian.png b/mods/awards/textures/awards_obsessed_with_obsidian.png new file mode 100644 index 0000000..4b179bd Binary files /dev/null and b/mods/awards/textures/awards_obsessed_with_obsidian.png differ diff --git a/mods/awards/textures/awards_on_the_way.png b/mods/awards/textures/awards_on_the_way.png new file mode 100644 index 0000000..c2fd224 Binary files /dev/null and b/mods/awards/textures/awards_on_the_way.png differ diff --git a/mods/awards/textures/awards_outpost.png b/mods/awards/textures/awards_outpost.png new file mode 100644 index 0000000..e278052 Binary files /dev/null and b/mods/awards/textures/awards_outpost.png differ diff --git a/mods/awards/textures/awards_pharaoh.png b/mods/awards/textures/awards_pharaoh.png new file mode 100644 index 0000000..f2f4b9a Binary files /dev/null and b/mods/awards/textures/awards_pharaoh.png differ diff --git a/mods/awards/textures/awards_professional_lumberjack.png b/mods/awards/textures/awards_professional_lumberjack.png new file mode 100644 index 0000000..6d67fb7 Binary files /dev/null and b/mods/awards/textures/awards_professional_lumberjack.png differ diff --git a/mods/awards/textures/awards_progress_gray.png b/mods/awards/textures/awards_progress_gray.png new file mode 100644 index 0000000..a5fc6cb Binary files /dev/null and b/mods/awards/textures/awards_progress_gray.png differ diff --git a/mods/awards/textures/awards_progress_green.png b/mods/awards/textures/awards_progress_green.png new file mode 100644 index 0000000..54b4e5d Binary files /dev/null and b/mods/awards/textures/awards_progress_green.png differ diff --git a/mods/awards/textures/awards_pyromaniac.png b/mods/awards/textures/awards_pyromaniac.png new file mode 100644 index 0000000..a12649c Binary files /dev/null and b/mods/awards/textures/awards_pyromaniac.png differ diff --git a/mods/awards/textures/awards_really_well_lit.png b/mods/awards/textures/awards_really_well_lit.png new file mode 100644 index 0000000..b69cdff Binary files /dev/null and b/mods/awards/textures/awards_really_well_lit.png differ diff --git a/mods/awards/textures/awards_roses_are_red.png b/mods/awards/textures/awards_roses_are_red.png new file mode 100644 index 0000000..994760f Binary files /dev/null and b/mods/awards/textures/awards_roses_are_red.png differ diff --git a/mods/awards/textures/awards_saint_maclou.png b/mods/awards/textures/awards_saint_maclou.png new file mode 100644 index 0000000..96b3b39 Binary files /dev/null and b/mods/awards/textures/awards_saint_maclou.png differ diff --git a/mods/awards/textures/awards_sam_the_trapper.png b/mods/awards/textures/awards_sam_the_trapper.png new file mode 100644 index 0000000..89ba567 Binary files /dev/null and b/mods/awards/textures/awards_sam_the_trapper.png differ diff --git a/mods/awards/textures/awards_savannah_discoverer.png b/mods/awards/textures/awards_savannah_discoverer.png new file mode 100644 index 0000000..26c5a39 Binary files /dev/null and b/mods/awards/textures/awards_savannah_discoverer.png differ diff --git a/mods/awards/textures/awards_semi_pro_lumberjack.png b/mods/awards/textures/awards_semi_pro_lumberjack.png new file mode 100644 index 0000000..c4d2d79 Binary files /dev/null and b/mods/awards/textures/awards_semi_pro_lumberjack.png differ diff --git a/mods/awards/textures/awards_smelter.png b/mods/awards/textures/awards_smelter.png new file mode 100644 index 0000000..0dea637 Binary files /dev/null and b/mods/awards/textures/awards_smelter.png differ diff --git a/mods/awards/textures/awards_tasty_mushrooms.png b/mods/awards/textures/awards_tasty_mushrooms.png new file mode 100644 index 0000000..bf34fd2 Binary files /dev/null and b/mods/awards/textures/awards_tasty_mushrooms.png differ diff --git a/mods/awards/textures/awards_template.png b/mods/awards/textures/awards_template.png new file mode 100644 index 0000000..4ea47d1 Binary files /dev/null and b/mods/awards/textures/awards_template.png differ diff --git a/mods/awards/textures/awards_treasurer.png b/mods/awards/textures/awards_treasurer.png new file mode 100644 index 0000000..b872604 Binary files /dev/null and b/mods/awards/textures/awards_treasurer.png differ diff --git a/mods/awards/textures/awards_ui_icon.png b/mods/awards/textures/awards_ui_icon.png new file mode 100644 index 0000000..239ad71 Binary files /dev/null and b/mods/awards/textures/awards_ui_icon.png differ diff --git a/mods/awards/textures/awards_underground_mushroom_farmer.png b/mods/awards/textures/awards_underground_mushroom_farmer.png new file mode 100644 index 0000000..5623171 Binary files /dev/null and b/mods/awards/textures/awards_underground_mushroom_farmer.png differ diff --git a/mods/awards/textures/awards_unknown.png b/mods/awards/textures/awards_unknown.png new file mode 100644 index 0000000..40d839c Binary files /dev/null and b/mods/awards/textures/awards_unknown.png differ diff --git a/mods/awards/textures/awards_very_simple_snow_man.png b/mods/awards/textures/awards_very_simple_snow_man.png new file mode 100644 index 0000000..b2da7b7 Binary files /dev/null and b/mods/awards/textures/awards_very_simple_snow_man.png differ diff --git a/mods/awards/textures/awards_watchtower.png b/mods/awards/textures/awards_watchtower.png new file mode 100644 index 0000000..22fabd5 Binary files /dev/null and b/mods/awards/textures/awards_watchtower.png differ diff --git a/mods/awards/textures/awards_well_lit.png b/mods/awards/textures/awards_well_lit.png new file mode 100644 index 0000000..db85e70 Binary files /dev/null and b/mods/awards/textures/awards_well_lit.png differ diff --git a/mods/awards/textures/awards_wheat_magnate.png b/mods/awards/textures/awards_wheat_magnate.png new file mode 100644 index 0000000..835d5fa Binary files /dev/null and b/mods/awards/textures/awards_wheat_magnate.png differ diff --git a/mods/awards/textures/awards_white_color_stock.png b/mods/awards/textures/awards_white_color_stock.png new file mode 100644 index 0000000..4f850f0 Binary files /dev/null and b/mods/awards/textures/awards_white_color_stock.png differ diff --git a/mods/awards/textures/awards_wool_over_your_eyes.png b/mods/awards/textures/awards_wool_over_your_eyes.png new file mode 100644 index 0000000..740c5f0 Binary files /dev/null and b/mods/awards/textures/awards_wool_over_your_eyes.png differ diff --git a/mods/awards/textures/awards_wow_i_am_diamonds.png b/mods/awards/textures/awards_wow_i_am_diamonds.png new file mode 100644 index 0000000..5bb71b9 Binary files /dev/null and b/mods/awards/textures/awards_wow_i_am_diamonds.png differ diff --git a/mods/awards/textures/awards_youre_a_copper.png b/mods/awards/textures/awards_youre_a_copper.png new file mode 100644 index 0000000..4d28811 Binary files /dev/null and b/mods/awards/textures/awards_youre_a_copper.png differ diff --git a/mods/awards/textures/awards_yummy.png b/mods/awards/textures/awards_yummy.png new file mode 100644 index 0000000..da230e8 Binary files /dev/null and b/mods/awards/textures/awards_yummy.png differ diff --git a/mods/awards/tools/updatepo.sh b/mods/awards/tools/updatepo.sh new file mode 100755 index 0000000..74332e0 --- /dev/null +++ b/mods/awards/tools/updatepo.sh @@ -0,0 +1,22 @@ +#! /bin/bash + +# To create a new translation: +# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot + +cd "$(dirname "${BASH_SOURCE[0]}")/.."; + +# Extract translatable strings. +xgettext --from-code=UTF-8 \ + --keyword=S \ + --keyword=NS:1,2 \ + --keyword=N_ \ + --add-comments='Translators:' \ + --add-location=file \ + -o locale/template.pot \ + $(find . -name '*.lua') + +# Update translations. +find locale -name '*.po' | while read -r file; do + echo $file + msgmerge --update $file locale/template.pot; +done diff --git a/mods/basic_materials/LICENSE b/mods/basic_materials/LICENSE new file mode 100644 index 0000000..c5885ae --- /dev/null +++ b/mods/basic_materials/LICENSE @@ -0,0 +1,600 @@ +License for code: LGPL 3.0 +License for media and all other assets: CC-by-SA 4.0 + +############################################################################### + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser 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 +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + +############################################################################### + +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/mods/basic_materials/electrical-electronic.lua b/mods/basic_materials/electrical-electronic.lua new file mode 100644 index 0000000..91fac4e --- /dev/null +++ b/mods/basic_materials/electrical-electronic.lua @@ -0,0 +1,86 @@ +-- Translation support +local S = minetest.get_translator("basic_materials") + +-- items + +minetest.register_craftitem("basic_materials:silicon", { + description = S("Silicon lump"), + inventory_image = "basic_materials_silicon.png", +}) + +minetest.register_craftitem("basic_materials:ic", { + description = S("Simple Integrated Circuit"), + inventory_image = "basic_materials_ic.png", +}) + +minetest.register_craftitem("basic_materials:motor", { + description = S("Simple Motor"), + inventory_image = "basic_materials_motor.png", +}) + +minetest.register_craftitem("basic_materials:heating_element", { + description = S("Heating element"), + inventory_image = "basic_materials_heating_element.png", +}) + +minetest.register_craftitem("basic_materials:energy_crystal_simple", { + description = S("Simple energy crystal"), + inventory_image = "basic_materials_energy_crystal.png", +}) + +-- crafts + +minetest.register_craft( { + output = "mesecons_materials:silicon 4", + recipe = { + { "default:sand", "default:sand" }, + { "default:sand", "default:steel_ingot" }, + }, +}) + +minetest.register_craft( { + output = "basic_materials:ic 4", + recipe = { + { "mesecons_materials:silicon", "mesecons_materials:silicon" }, + { "mesecons_materials:silicon", "default:copper_ingot" }, + }, +}) + +minetest.register_craft( { + output = "basic_materials:motor 2", + recipe = { + { "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" }, + { "default:copper_ingot", "default:steel_ingot", "default:steel_ingot" }, + { "default:mese_crystal_fragment", "basic_materials:copper_wire", "basic_materials:plastic_sheet" } + }, + replacements = { + { "basic_materials:copper_wire", "basic_materials:empty_spool" }, + { "basic_materials:copper_wire", "basic_materials:empty_spool" }, + } +}) + +minetest.register_craft( { + output = "basic_materials:heating_element 2", + recipe = { + { "default:copper_ingot", "default:mese_crystal_fragment", "default:copper_ingot" } + }, +}) + +minetest.register_craft({ + --type = "shapeless", + output = "basic_materials:energy_crystal_simple 2", + recipe = { + { "default:mese_crystal_fragment", "default:torch", "default:mese_crystal_fragment" }, + { "default:diamond", "default:gold_ingot", "default:diamond" } + }, +}) + +-- aliases + +minetest.register_alias("homedecor:ic", "basic_materials:ic") +minetest.register_alias("homedecor:motor", "basic_materials:motor") +minetest.register_alias("technic:motor", "basic_materials:motor") +minetest.register_alias("homedecor:heating_element", "basic_materials:heating_element") +minetest.register_alias("homedecor:power_crystal", "basic_materials:energy_crystal_simple") + +minetest.register_alias_force("mesecons_materials:silicon", "basic_materials:silicon") diff --git a/mods/basic_materials/init.lua b/mods/basic_materials/init.lua new file mode 100644 index 0000000..32873a1 --- /dev/null +++ b/mods/basic_materials/init.lua @@ -0,0 +1,14 @@ +-- Basic materials mod +-- by Vanessa Dannenberg + +-- This mod supplies all those little random craft items that everyone always +-- seems to need, such as metal bars (ala rebar), plastic, wire, and so on. + +local modpath = minetest.get_modpath("basic_materials") + +basic_materials = {} + +dofile(modpath.."/metals.lua") +dofile(modpath.."/plastics.lua") +dofile(modpath.."/electrical-electronic.lua") +dofile(modpath.."/misc.lua") diff --git a/mods/basic_materials/locale/basic_materials.es.tr b/mods/basic_materials/locale/basic_materials.es.tr new file mode 100644 index 0000000..0bde910 --- /dev/null +++ b/mods/basic_materials/locale/basic_materials.es.tr @@ -0,0 +1,30 @@ +# textdomain: basic_materials +Silicon lump=Briqueta de silicona +Simple Integrated Circuit=Circuito integrado simple +Simple Motor=Motor sencillo +Heating element=Elemento calefactor +Simple energy crystal=Cristal de energía sencillo +Spool of steel wire=Bobina de acero +Spool of copper wire=Bobina de cobre +Spool of silver wire=Bobina de plata +Spool of gold wire=Bobina de oro +Steel Strip=Tira de acero +Copper Strip=Tira de cobre +Steel Bar=Barra de acero +Chainlinks (brass)=Eslabones de latón +Chainlinks (steel)=Eslabones de acero +Brass Ingot=Lingote de latón +Steel gear=Engranaje de acero +Padlock=Candado +Chain (steel, hanging)=Cadena de acero colgante +Chain (brass, hanging)=Cadena de latón colgante +Brass Block=Bloque de latón +Oil extract=Extracto de aceite +Unprocessed paraffin=Parafina sin procesar +Uncooked Terracotta Base=Base de terracota sin cocer +Wet Cement=Cemento húmedo +Cement=Cemento +Concrete Block=Bloque de hormigón +Plastic sheet=Lámina de plástico +Plastic strips=Tira de plástico +Empty wire spool=Bobina vacía diff --git a/mods/basic_materials/locale/basic_materials.fr.tr b/mods/basic_materials/locale/basic_materials.fr.tr new file mode 100644 index 0000000..0bebf79 --- /dev/null +++ b/mods/basic_materials/locale/basic_materials.fr.tr @@ -0,0 +1,33 @@ +# textdomain: basic_materials +Silicon lump=Morceau de silicium +Simple Integrated Circuit=Circuit intégré simple +Simple Motor=Moteur simple +Heating element=Élément chauffant +Simple energy crystal=Cristal d’énergie simple + +Spool of steel wire=Bobine de fil d’acier +Spool of copper wire=Bobine de fil de cuivre +Spool of silver wire=Bobine de fil d’argent +Spool of gold wire=Bobine de fil d’or +Steel Strip=Bande de acier +Copper Strip=Bande de cuivre +Steel Bar=Barre d’acier +Chainlinks (brass)=Maillon en laiton +Chainlinks (steel)=Maillon en acier +Brass Ingot=Lingot de laiton +Steel gear=Rouage en acier +Padlock=Cadenas +Chain (steel, hanging)=Chaine en acier +Chain (brass, hanging)=Chaine en laiton +Brass Block=Bloc de laiton + +Oil extract=Extrait d’huile +Unprocessed paraffin=Paraffine non transformée +Uncooked Terracotta Base=Argile crue +Wet Cement=Ciment humide +Cement=Ciment +Concrete Block=Bloc de béton + +Plastic sheet=Morceau de plastique +Plastic strips=Bande de plastique +Empty wire spool=Bobine de fil vide diff --git a/mods/basic_materials/metals.lua b/mods/basic_materials/metals.lua new file mode 100644 index 0000000..b28db10 --- /dev/null +++ b/mods/basic_materials/metals.lua @@ -0,0 +1,327 @@ +-- Translation support +local S = minetest.get_translator("basic_materials") + +-- items + +minetest.register_craftitem("basic_materials:steel_wire", { + description = S("Spool of steel wire"), + inventory_image = "basic_materials_steel_wire.png" +}) + +minetest.register_craftitem("basic_materials:copper_wire", { + description = S("Spool of copper wire"), + inventory_image = "basic_materials_copper_wire.png" +}) + +minetest.register_craftitem("basic_materials:silver_wire", { + description = S("Spool of silver wire"), + inventory_image = "basic_materials_silver_wire.png" +}) + +minetest.register_craftitem("basic_materials:gold_wire", { + description = S("Spool of gold wire"), + inventory_image = "basic_materials_gold_wire.png" +}) + +minetest.register_craftitem("basic_materials:steel_strip", { + description = S("Steel Strip"), + inventory_image = "basic_materials_steel_strip.png" +}) + +minetest.register_craftitem("basic_materials:copper_strip", { + description = S("Copper Strip"), + inventory_image = "basic_materials_copper_strip.png" +}) + +minetest.register_craftitem("basic_materials:steel_bar", { + description = S("Steel Bar"), + inventory_image = "basic_materials_steel_bar.png", +}) + +minetest.register_craftitem("basic_materials:chainlink_brass", { + description = S("Chainlinks (brass)"), + inventory_image = "basic_materials_chainlink_brass.png" +}) + +minetest.register_craftitem("basic_materials:chainlink_steel", { + description = S("Chainlinks (steel)"), + inventory_image = "basic_materials_chainlink_steel.png" +}) + +minetest.register_craftitem("basic_materials:brass_ingot", { + description = S("Brass Ingot"), + inventory_image = "basic_materials_brass_ingot.png", +}) + +minetest.register_craftitem("basic_materials:gear_steel", { + description = S("Steel gear"), + inventory_image = "basic_materials_gear_steel.png" +}) + +minetest.register_craftitem("basic_materials:padlock", { + description = S("Padlock"), + inventory_image = "basic_materials_padlock.png" +}) + +-- nodes + +local chains_node_box = { + type = "fixed", + fixed = { +{0, 0.4375, -0.0625, 0.0625, 0.5, -1.11759e-08}, -- NodeBox1 + {0, 0.3125, -0.1875, 0.0625, 0.375, -0.125}, -- NodeBox2 + {0, 0.3125, 0.0625, 0.0625, 0.375, 0.125}, -- NodeBox3 + {0, -0.0625, -0.0625, 0.0625, -7.45058e-09, 3.72529e-09}, -- NodeBox4 + {0, 0.375, -0.125, 0.0625, 0.4375, -0.0625}, -- NodeBox5 + {0, 0.375, 0, 0.0625, 0.4375, 0.0625}, -- NodeBox6 + {0, 0, -0.125, 0.0625, 0.0625, -0.0625}, -- NodeBox7 + {0, 0, 0, 0.0625, 0.0625, 0.0625}, -- NodeBox8 + {0.0625, 0.25, -0.0625, -7.45058e-09, 0.1875, 9.31323e-09}, -- NodeBox9 + {0, -0.125, -0.125, 0.0625, -0.0625, -0.0624999}, -- NodeBox38 + {0, -0.125, 0, 0.0625, -0.0625, 0.0625}, -- NodeBox41 + {0, -0.1875, 0.0625, 0.0625, -0.125, 0.125}, -- NodeBox42 + {0, -0.5, 0, 0.0625, -0.4375, 0.0625}, -- NodeBox45 + {0, -0.5, -0.125, 0.0624999, -0.4375, -0.0625}, -- NodeBox46 + {0, -0.3125, -0.0625, 0.0625, -0.25, 7.45058e-09}, -- NodeBox48 + {-0.0625, 0.125, -0.0625, 2.6077e-08, 0.1875, -3.35276e-08}, -- NodeBox49 + {0.0625, 0.125, -0.0625, 0.125, 0.1875, -3.72529e-09}, -- NodeBox50 + {-0.125, 0.0625, -0.0625, -0.0625, 0.125, 5.58794e-09}, -- NodeBox51 + {0.125, 0.0625, -0.0625, 0.1875, 0.125, -5.58794e-09}, -- NodeBox52 + {-0.0625, -0.25, -0.0625, -3.35276e-08, -0.1875, 3.72529e-09}, -- NodeBox53 + {0.0625, -0.375, -0.0625, 0.125, -0.3125, 5.58794e-09}, -- NodeBox54 + {0.125, -0.4375, -0.0625, 0.1875, -0.375, -7.45058e-09}, -- NodeBox55 + {-0.0625, -0.375, -0.0625, 3.72529e-09, -0.3125, 3.72529e-09}, -- NodeBox56 + {-0.125, -0.4375, -0.0625, -0.0625, -0.375, 3.72529e-09}, -- NodeBox57 + {0.0625, -0.25, -0.0625, 0.125, -0.1875, 3.72529e-09}, -- NodeBox58 + {-0.0625, 0.25, -0.0625, -5.02914e-08, 0.3125, 3.72529e-09}, -- NodeBox59 + {0.0625, 0.25, -0.0625, 0.125, 0.3125, -9.31323e-09}, -- NodeBox60 + {0.1875, 0.375, -0.0625, 0.25, 0.5, -5.58794e-09}, -- NodeBox61 + {-0.1875, 0.375, -0.0625, -0.125, 0.5, 5.58794e-09}, -- NodeBox62 + {0, 0.125, -0.25, 0.0625, 0.3125, -0.1875}, -- NodeBox31 + {0, 0.0625, -0.1875, 0.0625, 0.125, -0.125}, -- NodeBox32 + {0, 0.125, 0.125, 0.0625, 0.3125, 0.1875}, -- NodeBox33 + {0, 0.0625, 0.0625, 0.0625, 0.125, 0.125}, -- NodeBox34 + {-0.1875, -0.125, -0.0625, -0.125, 0.0625, 0}, -- NodeBox35 + {0.1875, -0.125, -0.0625, 0.25, 0.0625, 0}, -- NodeBox36 + {-0.125, -0.1875, -0.0625, -0.0625, -0.125, 0}, -- NodeBox37 + {0.125, -0.1875, -0.0625, 0.1875, -0.125, 0}, -- NodeBox38 + {-0.125, 0.3125, -0.0625, -0.0625, 0.375, 0}, -- NodeBox40 + {0.125, 0.3125, -0.0625, 0.1875, 0.375, 0}, -- NodeBox41 + {0, -0.1875, -0.1875, 0.0625, -0.125, -0.125}, -- NodeBox42 + {0, -0.375, -0.25, 0.0625, -0.1875, -0.1875}, -- NodeBox43 + {0, -0.375, 0.125, 0.0625, -0.1875, 0.1875}, -- NodeBox44 + {0, -0.4375, -0.1875, 0.0625, -0.375, -0.125}, -- NodeBox45 + {0, -0.375, 0.0625, 0.0625, -0.4375, 0.125}, -- NodeBox46 + {-0.1875, -0.5, -0.0625, -0.125, -0.4375, 2.23517e-08}, -- NodeBox45 + {0.1875, -0.5, -0.0625, 0.25, -0.4375, 0}, -- NodeBox46 + } + } + +minetest.register_node("basic_materials:chain_steel", { + description = S("Chain (steel, hanging)"), + drawtype = "nodebox", + node_box = chains_node_box, + tiles = {"basic_materials_chain_steel.png"}, + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + inventory_image = "basic_materials_chain_steel_inv.png", + groups = {cracky=3}, + selection_box = chains_sbox, +}) + +minetest.register_node("basic_materials:chain_brass", { + description = S("Chain (brass, hanging)"), + drawtype = "nodebox", + node_box = chains_node_box, + tiles = {"basic_materials_chain_brass.png"}, + walkable = false, + climbable = true, + sunlight_propagates = true, + paramtype = "light", + inventory_image = "basic_materials_chain_brass_inv.png", + groups = {cracky=3}, + selection_box = chains_sbox, +}) + +minetest.register_node("basic_materials:brass_block", { + description = S("Brass Block"), + tiles = {"basic_materials_brass_block.png"}, + is_ground_content = false, + groups = {cracky=1, level=2}, + sounds = default.node_sound_metal_defaults() +}) + +-- crafts + +minetest.register_craft( { + output = "basic_materials:copper_wire 2", + type = "shapeless", + recipe = { + "default:copper_ingot", + "basic_materials:empty_spool", + "basic_materials:empty_spool", + }, +}) + +minetest.register_craft( { + output = "basic_materials:silver_wire 2", + type = "shapeless", + recipe = { + "moreores:silver_ingot", + "basic_materials:empty_spool", + "basic_materials:empty_spool", + }, +}) + +minetest.register_craft( { + output = "basic_materials:gold_wire 2", + type = "shapeless", + recipe = { + "default:gold_ingot", + "basic_materials:empty_spool", + "basic_materials:empty_spool", + }, +}) + +minetest.register_craft( { + output = "basic_materials:steel_wire 2", + type = "shapeless", + recipe = { + "default:steel_ingot", + "basic_materials:empty_spool", + "basic_materials:empty_spool", + }, +}) + +minetest.register_craft( { + output = "basic_materials:steel_strip 12", + recipe = { + { "", "default:steel_ingot", "" }, + { "default:steel_ingot", "", "" }, + }, +}) + +minetest.register_craft( { + output = "basic_materials:copper_strip 12", + recipe = { + { "", "default:copper_ingot", "" }, + { "default:copper_ingot", "", "" }, + }, +}) + +minetest.register_craft( { + output = "basic_materials:steel_bar 6", + recipe = { + { "", "", "default:steel_ingot" }, + { "", "default:steel_ingot", "" }, + { "default:steel_ingot", "", "" }, + }, +}) + +minetest.register_craft( { + output = "basic_materials:padlock 2", + recipe = { + { "basic_materials:steel_bar" }, + { "default:steel_ingot" }, + { "default:steel_ingot" }, + }, +}) + +minetest.register_craft({ + output = "basic_materials:chainlink_steel 12", + recipe = { + {"", "default:steel_ingot", "default:steel_ingot"}, + { "default:steel_ingot", "", "default:steel_ingot" }, + { "default:steel_ingot", "default:steel_ingot", "" }, + }, +}) + +minetest.register_craft({ + output = "basic_materials:chainlink_brass 12", + recipe = { + {"", "basic_materials:brass_ingot", "basic_materials:brass_ingot"}, + { "basic_materials:brass_ingot", "", "basic_materials:brass_ingot" }, + { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "" }, + }, +}) + +minetest.register_craft({ + output = 'basic_materials:chain_steel 2', + recipe = { + {"basic_materials:chainlink_steel"}, + {"basic_materials:chainlink_steel"}, + {"basic_materials:chainlink_steel"} + } +}) + +minetest.register_craft({ + output = 'basic_materials:chain_brass 2', + recipe = { + {"basic_materials:chainlink_brass"}, + {"basic_materials:chainlink_brass"}, + {"basic_materials:chainlink_brass"} + } +}) + +minetest.register_craft( { + output = "basic_materials:gear_steel 6", + recipe = { + { "", "default:steel_ingot", "" }, + { "default:steel_ingot","basic_materials:chainlink_steel", "default:steel_ingot" }, + { "", "default:steel_ingot", "" } + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "basic_materials:brass_ingot 3", + recipe = { + "default:copper_ingot", + "default:copper_ingot", + "moreores:silver_ingot", + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "basic_materials:brass_ingot 9", + recipe = { "basic_materials:brass_block" }, +}) + +minetest.register_craft( { + output = "basic_materials:brass_block", + recipe = { + { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" }, + { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" }, + { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" }, + }, +}) + +-- aliases + +minetest.register_alias("homedecor:copper_wire", "basic_materials:copper_wire") +minetest.register_alias("technic:fine_copper_wire", "basic_materials:copper_wire") +minetest.register_alias("technic:fine_silver_wire", "basic_materials:silver_wire") +minetest.register_alias("technic:fine_gold_wire", "basic_materials:gold_wire") + +minetest.register_alias("homedecor:steel_wire", "basic_materials:steel_wire") + +minetest.register_alias("homedecor:brass_ingot", "basic_materials:brass_ingot") +minetest.register_alias("technic:brass_ingot", "basic_materials:brass_ingot") +minetest.register_alias("technic:brass_block", "basic_materials:brass_block") + +minetest.register_alias("homedecor:copper_strip", "basic_materials:copper_strip") +minetest.register_alias("homedecor:steel_strip", "basic_materials:steel_strip") + +minetest.register_alias_force("glooptest:chainlink", "basic_materials:chainlink_steel") +minetest.register_alias_force("homedecor:chainlink_steel", "basic_materials:chainlink_steel") +minetest.register_alias("homedecor:chainlink_brass", "basic_materials:chainlink_brass") +minetest.register_alias("chains:chain", "basic_materials:chain_steel") +minetest.register_alias("chains:chain_brass", "basic_materials:chain_brass") + +minetest.register_alias("pipeworks:gear", "basic_materials:gear_steel") + +minetest.register_alias("technic:rebar", "basic_materials:steel_bar") + diff --git a/mods/basic_materials/misc.lua b/mods/basic_materials/misc.lua new file mode 100644 index 0000000..0012897 --- /dev/null +++ b/mods/basic_materials/misc.lua @@ -0,0 +1,126 @@ +-- Translation support +local S = minetest.get_translator("basic_materials") + +-- items + +minetest.register_craftitem("basic_materials:oil_extract", { + description = S("Oil extract"), + inventory_image = "basic_materials_oil_extract.png", +}) + +minetest.register_craftitem("basic_materials:paraffin", { + description = S("Unprocessed paraffin"), + inventory_image = "basic_materials_paraffin.png", +}) + +minetest.register_craftitem("basic_materials:terracotta_base", { + description = S("Uncooked Terracotta Base"), + inventory_image = "basic_materials_terracotta_base.png", +}) + +minetest.register_craftitem("basic_materials:wet_cement", { + description = S("Wet Cement"), + inventory_image = "basic_materials_wet_cement.png", +}) + +-- nodes + +minetest.register_node("basic_materials:cement_block", { + description = S("Cement"), + tiles = {"basic_materials_cement_block.png"}, + is_ground_content = true, + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("basic_materials:concrete_block", { + description = S("Concrete Block"), + tiles = {"basic_materials_concrete_block.png",}, + groups = {cracky=1, level=2, concrete=1}, + sounds = default.node_sound_stone_defaults(), +}) + +-- crafts + +minetest.register_craft({ + type = "shapeless", + output = "basic_materials:oil_extract 2", + recipe = { + "group:leaves", + "group:leaves", + "group:leaves", + "group:leaves", + "group:leaves", + "group:leaves" + } +}) + +minetest.register_craft({ + type = "cooking", + output = "basic_materials:paraffin", + recipe = "basic_materials:oil_extract", +}) + +minetest.register_craft({ + type = "fuel", + recipe = "basic_materials:oil_extract", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "basic_materials:paraffin", + burntime = 30, +}) + +minetest.register_craft( { + type = "shapeless", + output = "basic_materials:terracotta_base 8", + recipe = { + "bucket:bucket_water", + "default:clay_lump", + "default:gravel", + }, + replacements = { {"bucket:bucket_water", "bucket:bucket_empty"}, }, +}) + +minetest.register_craft({ + type = "shapeless", + output = "basic_materials:wet_cement 3", + recipe = { + "default:dirt", + "dye:dark_grey", + "dye:dark_grey", + "dye:dark_grey", + "bucket:bucket_water" + }, + replacements = {{'bucket:bucket_water', 'bucket:bucket_empty'},}, +}) + +minetest.register_craft({ + type = "cooking", + output = "basic_materials:cement_block", + recipe = "basic_materials:wet_cement", + cooktime = 8 +}) + +minetest.register_craft({ + output = 'basic_materials:concrete_block 6', + recipe = { + {'group:sand', 'basic_materials:wet_cement', 'default:gravel'}, + {'basic_materials:steel_bar', 'basic_materials:wet_cement', 'basic_materials:steel_bar'}, + {'default:gravel', 'basic_materials:wet_cement', 'group:sand'}, + } +}) + +-- aliases + +minetest.register_alias("homedecor:oil_extract", "basic_materials:oil_extract") +minetest.register_alias("homedecor:paraffin", "basic_materials:paraffin") +minetest.register_alias("homedecor:plastic_base", "basic_materials:paraffin") +minetest.register_alias("homedecor:terracotta_base", "basic_materials:terracotta_base") + +minetest.register_alias("gloopblocks:wet_cement", "basic_materials:wet_cement") +minetest.register_alias("gloopblocks:cement", "basic_materials:cement_block") + +minetest.register_alias("technic:concrete", "basic_materials:concrete_block") diff --git a/mods/basic_materials/mod.conf b/mods/basic_materials/mod.conf new file mode 100644 index 0000000..4b58eba --- /dev/null +++ b/mods/basic_materials/mod.conf @@ -0,0 +1,3 @@ +name = basic_materials +depends = default +optional_depends = moreores diff --git a/mods/basic_materials/plastics.lua b/mods/basic_materials/plastics.lua new file mode 100644 index 0000000..3ac0f98 --- /dev/null +++ b/mods/basic_materials/plastics.lua @@ -0,0 +1,55 @@ +-- Translation support +local S = minetest.get_translator("basic_materials") + +-- items + +minetest.register_craftitem("basic_materials:plastic_sheet", { + description = S("Plastic sheet"), + inventory_image = "basic_materials_plastic_sheet.png", +}) + +minetest.register_craftitem("basic_materials:plastic_strip", { + description = S("Plastic strips"), + inventory_image = "basic_materials_plastic_strip.png", +}) + +minetest.register_craftitem("basic_materials:empty_spool", { + description = S("Empty wire spool"), + inventory_image = "basic_materials_empty_spool.png" +}) + +-- crafts + +minetest.register_craft({ + type = "cooking", + output = "basic_materials:plastic_sheet", + recipe = "basic_materials:paraffin", +}) + +minetest.register_craft({ + type = "fuel", + recipe = "basic_materials:plastic_sheet", + burntime = 30, +}) + +minetest.register_craft( { + output = "basic_materials:plastic_strip 9", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, +}) + +minetest.register_craft( { + output = "basic_materials:empty_spool 3", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, + { "", "basic_materials:plastic_sheet", "" }, + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, +}) + +-- aliases + +minetest.register_alias("homedecor:plastic_sheeting", "basic_materials:plastic_sheet") +minetest.register_alias("homedecor:plastic_strips", "basic_materials:plastic_strip") +minetest.register_alias("homedecor:empty_spool", "basic_materials:empty_spool") diff --git a/mods/basic_materials/textures/basic_materials_brass_block.png b/mods/basic_materials/textures/basic_materials_brass_block.png new file mode 100644 index 0000000..b66ff90 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_brass_block.png differ diff --git a/mods/basic_materials/textures/basic_materials_brass_ingot.png b/mods/basic_materials/textures/basic_materials_brass_ingot.png new file mode 100644 index 0000000..7283a60 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_brass_ingot.png differ diff --git a/mods/basic_materials/textures/basic_materials_cement_block.png b/mods/basic_materials/textures/basic_materials_cement_block.png new file mode 100644 index 0000000..d81142d Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_cement_block.png differ diff --git a/mods/basic_materials/textures/basic_materials_chain_brass.png b/mods/basic_materials/textures/basic_materials_chain_brass.png new file mode 100644 index 0000000..253b3e7 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_chain_brass.png differ diff --git a/mods/basic_materials/textures/basic_materials_chain_brass_inv.png b/mods/basic_materials/textures/basic_materials_chain_brass_inv.png new file mode 100644 index 0000000..68bfcd1 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_chain_brass_inv.png differ diff --git a/mods/basic_materials/textures/basic_materials_chain_steel.png b/mods/basic_materials/textures/basic_materials_chain_steel.png new file mode 100644 index 0000000..94ab0cf Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_chain_steel.png differ diff --git a/mods/basic_materials/textures/basic_materials_chain_steel_inv.png b/mods/basic_materials/textures/basic_materials_chain_steel_inv.png new file mode 100644 index 0000000..471b13d Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_chain_steel_inv.png differ diff --git a/mods/basic_materials/textures/basic_materials_chainlink_brass.png b/mods/basic_materials/textures/basic_materials_chainlink_brass.png new file mode 100644 index 0000000..e91aeed Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_chainlink_brass.png differ diff --git a/mods/basic_materials/textures/basic_materials_chainlink_steel.png b/mods/basic_materials/textures/basic_materials_chainlink_steel.png new file mode 100644 index 0000000..0cc331e Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_chainlink_steel.png differ diff --git a/mods/basic_materials/textures/basic_materials_concrete_block.png b/mods/basic_materials/textures/basic_materials_concrete_block.png new file mode 100644 index 0000000..7cc02f3 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_concrete_block.png differ diff --git a/mods/basic_materials/textures/basic_materials_copper_strip.png b/mods/basic_materials/textures/basic_materials_copper_strip.png new file mode 100644 index 0000000..ffaa33c Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_copper_strip.png differ diff --git a/mods/basic_materials/textures/basic_materials_copper_wire.png b/mods/basic_materials/textures/basic_materials_copper_wire.png new file mode 100644 index 0000000..9cf1849 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_copper_wire.png differ diff --git a/mods/basic_materials/textures/basic_materials_empty_spool.png b/mods/basic_materials/textures/basic_materials_empty_spool.png new file mode 100644 index 0000000..4859235 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_empty_spool.png differ diff --git a/mods/basic_materials/textures/basic_materials_energy_crystal.png b/mods/basic_materials/textures/basic_materials_energy_crystal.png new file mode 100644 index 0000000..bd2a744 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_energy_crystal.png differ diff --git a/mods/basic_materials/textures/basic_materials_gear_steel.png b/mods/basic_materials/textures/basic_materials_gear_steel.png new file mode 100644 index 0000000..c0ac62f Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_gear_steel.png differ diff --git a/mods/basic_materials/textures/basic_materials_gold_wire.png b/mods/basic_materials/textures/basic_materials_gold_wire.png new file mode 100644 index 0000000..a649101 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_gold_wire.png differ diff --git a/mods/basic_materials/textures/basic_materials_heating_element.png b/mods/basic_materials/textures/basic_materials_heating_element.png new file mode 100644 index 0000000..651e3c8 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_heating_element.png differ diff --git a/mods/basic_materials/textures/basic_materials_ic.png b/mods/basic_materials/textures/basic_materials_ic.png new file mode 100644 index 0000000..332300a Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_ic.png differ diff --git a/mods/basic_materials/textures/basic_materials_motor.png b/mods/basic_materials/textures/basic_materials_motor.png new file mode 100644 index 0000000..14b18a6 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_motor.png differ diff --git a/mods/basic_materials/textures/basic_materials_oil_extract.png b/mods/basic_materials/textures/basic_materials_oil_extract.png new file mode 100644 index 0000000..e34623d Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_oil_extract.png differ diff --git a/mods/basic_materials/textures/basic_materials_padlock.png b/mods/basic_materials/textures/basic_materials_padlock.png new file mode 100644 index 0000000..593e8d9 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_padlock.png differ diff --git a/mods/basic_materials/textures/basic_materials_paraffin.png b/mods/basic_materials/textures/basic_materials_paraffin.png new file mode 100644 index 0000000..3725b1c Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_paraffin.png differ diff --git a/mods/basic_materials/textures/basic_materials_plastic_sheet.png b/mods/basic_materials/textures/basic_materials_plastic_sheet.png new file mode 100644 index 0000000..4987321 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_plastic_sheet.png differ diff --git a/mods/basic_materials/textures/basic_materials_plastic_strip.png b/mods/basic_materials/textures/basic_materials_plastic_strip.png new file mode 100644 index 0000000..4bd6d1d Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_plastic_strip.png differ diff --git a/mods/basic_materials/textures/basic_materials_silicon.png b/mods/basic_materials/textures/basic_materials_silicon.png new file mode 100644 index 0000000..18276e6 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_silicon.png differ diff --git a/mods/basic_materials/textures/basic_materials_silver_wire.png b/mods/basic_materials/textures/basic_materials_silver_wire.png new file mode 100644 index 0000000..6a8f8a9 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_silver_wire.png differ diff --git a/mods/basic_materials/textures/basic_materials_steel_bar.png b/mods/basic_materials/textures/basic_materials_steel_bar.png new file mode 100644 index 0000000..7c75bb1 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_steel_bar.png differ diff --git a/mods/basic_materials/textures/basic_materials_steel_strip.png b/mods/basic_materials/textures/basic_materials_steel_strip.png new file mode 100644 index 0000000..26c0ea3 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_steel_strip.png differ diff --git a/mods/basic_materials/textures/basic_materials_steel_wire.png b/mods/basic_materials/textures/basic_materials_steel_wire.png new file mode 100644 index 0000000..a8495c9 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_steel_wire.png differ diff --git a/mods/basic_materials/textures/basic_materials_terracotta_base.png b/mods/basic_materials/textures/basic_materials_terracotta_base.png new file mode 100644 index 0000000..5009538 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_terracotta_base.png differ diff --git a/mods/basic_materials/textures/basic_materials_wet_cement.png b/mods/basic_materials/textures/basic_materials_wet_cement.png new file mode 100644 index 0000000..93765c3 Binary files /dev/null and b/mods/basic_materials/textures/basic_materials_wet_cement.png differ diff --git a/mods/bazm/LICENSE.txt b/mods/bazm/LICENSE.txt new file mode 100644 index 0000000..0e259d4 --- /dev/null +++ b/mods/bazm/LICENSE.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/mods/bazm/init.lua b/mods/bazm/init.lua new file mode 100644 index 0000000..83f8fea --- /dev/null +++ b/mods/bazm/init.lua @@ -0,0 +1,132 @@ +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +local function register_tnt(name, def) + local primed_name = "bazm:primed_" .. name + name = "bazm:" .. name + local explode_hear_dist = 4 * math.sqrt(def.strength) + + local function on_blast_break(pos) + minetest.after(0, function() + explosions.explode(pos, { + strength = def.strength, + }) + minetest.sound_play(def.sound_explode, { + pos = pos, + max_hear_distance = explode_hear_dist + }) + end) + return true + end + + local function primed_on_construct(pos) + minetest.sound_play(def.sound_ignite, { pos = pos }) + minetest.get_node_timer(pos):start(def.fuse_time) + minetest.check_for_falling(pos) + end + + minetest.register_node(name, { + description = def.description, + tiles = { def.tile_top, def.tile_bottom, def.tile_side }, + groups = { oddly_breakable_by_hand = 3, blast_resistance = 25 }, + sounds = default.node_sound_snow_defaults(), + + on_punch = function(pos) + minetest.swap_node(pos, { name = primed_name }) + primed_on_construct(pos) + end, + + on_blast_break = on_blast_break, + }) + + minetest.register_node(primed_name, { + description = "Primed " .. def.description, + tiles = { def.tile_top_primed, def.tile_bottom, def.tile_side }, + groups = { + oddly_breakable_by_hand = 3, + falling_node = 1, + blast_resistance = 25, + not_in_creative_inventory = 1, + }, + sounds = default.node_sound_snow_defaults(), + light_source = 10, + drop = name, + + on_timer = function(pos) + minetest.remove_node(pos) + explosions.explode(pos, { strength = def.strength }) + minetest.sound_play(def.sound_explode, { + pos = pos, + max_hear_distance = explode_hear_dist + }) + end, + on_blast_break = on_blast_break, + on_construct = primed_on_construct, + }) +end + +register_tnt('tnt', { + description = S("TNT Bomb"), + strength = 1000, + fuse_time = 4, + tile_top = "bazm_tnt_top.png", + tile_top_primed = "bazm_tnt_top.png", + tile_bottom = "bazm_tnt_bottom.png", + tile_side = "bazm_tnt_side.png", + sound_ignite = "bazm_tnt_ignite", + sound_explode = "bazm_tnt_explode" +}) + +minetest.register_craft({ + type = "shaped", + output = "bazm:tnt", + recipe = { + {"tnt:tnt_stick", "farming:string", "tnt:tnt_stick"}, + {"farming:string", "tnt:tnt_stick", "farming:string"}, + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"}, + } +}) + +register_tnt('c4', { + description = S("C4"), + strength = 2000, + fuse_time = 6, + tile_top = "bazm_c4_top.png", + tile_top_primed = "bazm_c4_top.png", + tile_bottom = "bazm_c4_bottom.png", + tile_side = "bazm_c4_side.png", + sound_ignite = "bazm_tnt_ignite", + sound_explode = "bazm_c4_explode" +}) + +minetest.register_craft({ + type = "shaped", + output = "bazm:c4", + recipe = { + {"bazm:tnt", "basic_materials:oil_extract", "bazm:tnt"}, + {"basic_materials:silicon", "basic_materials:ic", "basic_materials:silicon"}, + {"bazm:tnt", "basic_materials:silicon", "bazm:tnt"}, + } +}) + +register_tnt('nuke', { + description = S("Mini NUKE"), + strength = 32000, + fuse_time = 16, + tile_top = "bazm_nuke_top.png", + tile_top_primed = "bazm_nuke_top_primed.png", + tile_bottom = "bazm_nuke_bottom.png", + tile_side = "bazm_nuke_side.png", + sound_ignite = "bazm_tnt_ignite", + sound_explode = "bazm_nuke_explode" +}) + +minetest.register_craft({ + type = "shaped", + output = "bazm:nuke", + recipe = { + {"basic_materials:energy_crystal_simple", "nuclearz:uranium_rod", "basic_materials:energy_crystal_simple"}, + {"nuclearz:uranium_rod", "basic_materials:ic", "nuclearz:uranium_rod"}, + {"basic_materials:energy_crystal_simple", "nuclearz:uranium_rod", "basic_materials:energy_crystal_simple"}, + } +}) diff --git a/mods/bazm/locale/bazm.es.tr b/mods/bazm/locale/bazm.es.tr new file mode 100644 index 0000000..d5ec435 --- /dev/null +++ b/mods/bazm/locale/bazm.es.tr @@ -0,0 +1,4 @@ +# textdomain: bazm +TNT Bomb=Bomba de TNT +C4=C4 +Mini NUKE=Mini bomba nuclear diff --git a/mods/bazm/mod.conf b/mods/bazm/mod.conf new file mode 100644 index 0000000..b131ce9 --- /dev/null +++ b/mods/bazm/mod.conf @@ -0,0 +1,3 @@ +name = bazm +description = Explosive Weapons +depends = default, explosions, nuclearz diff --git a/mods/bazm/sounds/explosions_tnt_c4_explode.ogg b/mods/bazm/sounds/explosions_tnt_c4_explode.ogg new file mode 100644 index 0000000..0140855 Binary files /dev/null and b/mods/bazm/sounds/explosions_tnt_c4_explode.ogg differ diff --git a/mods/bazm/sounds/explosions_tnt_nuke_explode.ogg b/mods/bazm/sounds/explosions_tnt_nuke_explode.ogg new file mode 100644 index 0000000..11bd7d3 Binary files /dev/null and b/mods/bazm/sounds/explosions_tnt_nuke_explode.ogg differ diff --git a/mods/bazm/sounds/explosions_tnt_tnt_explode.ogg b/mods/bazm/sounds/explosions_tnt_tnt_explode.ogg new file mode 100644 index 0000000..a414ea0 Binary files /dev/null and b/mods/bazm/sounds/explosions_tnt_tnt_explode.ogg differ diff --git a/mods/bazm/sounds/explosions_tnt_tnt_ignite.ogg b/mods/bazm/sounds/explosions_tnt_tnt_ignite.ogg new file mode 100644 index 0000000..199f206 Binary files /dev/null and b/mods/bazm/sounds/explosions_tnt_tnt_ignite.ogg differ diff --git a/mods/bazm/textures/bazm_c4_bottom.png b/mods/bazm/textures/bazm_c4_bottom.png new file mode 100644 index 0000000..93f6ef9 Binary files /dev/null and b/mods/bazm/textures/bazm_c4_bottom.png differ diff --git a/mods/bazm/textures/bazm_c4_side.png b/mods/bazm/textures/bazm_c4_side.png new file mode 100644 index 0000000..f852985 Binary files /dev/null and b/mods/bazm/textures/bazm_c4_side.png differ diff --git a/mods/bazm/textures/bazm_c4_top.png b/mods/bazm/textures/bazm_c4_top.png new file mode 100644 index 0000000..2cbaea2 Binary files /dev/null and b/mods/bazm/textures/bazm_c4_top.png differ diff --git a/mods/bazm/textures/bazm_nuke_bottom.png b/mods/bazm/textures/bazm_nuke_bottom.png new file mode 100644 index 0000000..1d15f85 Binary files /dev/null and b/mods/bazm/textures/bazm_nuke_bottom.png differ diff --git a/mods/bazm/textures/bazm_nuke_side.png b/mods/bazm/textures/bazm_nuke_side.png new file mode 100644 index 0000000..dbe0178 Binary files /dev/null and b/mods/bazm/textures/bazm_nuke_side.png differ diff --git a/mods/bazm/textures/bazm_nuke_top.png b/mods/bazm/textures/bazm_nuke_top.png new file mode 100644 index 0000000..83eb300 Binary files /dev/null and b/mods/bazm/textures/bazm_nuke_top.png differ diff --git a/mods/bazm/textures/bazm_nuke_top_primed.png b/mods/bazm/textures/bazm_nuke_top_primed.png new file mode 100644 index 0000000..024ee61 Binary files /dev/null and b/mods/bazm/textures/bazm_nuke_top_primed.png differ diff --git a/mods/bazm/textures/bazm_tnt_bottom.png b/mods/bazm/textures/bazm_tnt_bottom.png new file mode 100644 index 0000000..fdf7d67 Binary files /dev/null and b/mods/bazm/textures/bazm_tnt_bottom.png differ diff --git a/mods/bazm/textures/bazm_tnt_side.png b/mods/bazm/textures/bazm_tnt_side.png new file mode 100644 index 0000000..0c2b33a Binary files /dev/null and b/mods/bazm/textures/bazm_tnt_side.png differ diff --git a/mods/bazm/textures/bazm_tnt_top.png b/mods/bazm/textures/bazm_tnt_top.png new file mode 100644 index 0000000..187f673 Binary files /dev/null and b/mods/bazm/textures/bazm_tnt_top.png differ diff --git a/mods/beacons/README b/mods/beacons/README new file mode 100644 index 0000000..7eda2d6 --- /dev/null +++ b/mods/beacons/README @@ -0,0 +1,12 @@ +Beacons Mod +by SpaghettiToastBook + +This mod adds craftable beacons in several different colors. When placed, they produce a bright beam of light above them. + +Dependencies: (none) + +Optional dependencies: +default +dye + +License for art and code: CC0 \ No newline at end of file diff --git a/mods/beacons/craft_image.png b/mods/beacons/craft_image.png new file mode 100644 index 0000000..d9967fe Binary files /dev/null and b/mods/beacons/craft_image.png differ diff --git a/mods/beacons/depends.txt b/mods/beacons/depends.txt new file mode 100644 index 0000000..87659d1 --- /dev/null +++ b/mods/beacons/depends.txt @@ -0,0 +1,2 @@ +default? +dye? \ No newline at end of file diff --git a/mods/beacons/init.lua b/mods/beacons/init.lua new file mode 100644 index 0000000..75f855c --- /dev/null +++ b/mods/beacons/init.lua @@ -0,0 +1,139 @@ +local modname = "beacons" +local modpath = minetest.get_modpath(modname) +local S = dofile(modpath .. "/intllib.lua") + +-- Maximum number of light nodes above beacon (or 0 for no max) +local beacon_height = tonumber(minetest.settings:get("beacon_height")) or 0 + +local function get_node_under_light(pos) + pos = table.copy(pos) + local node = minetest.get_node(pos) + local y_dist = 0 + while minetest.get_item_group(node.name, "beacon_light") ~= 0 and (beacon_height == 0 or y_dist <= beacon_height) do + node = minetest.get_node(vector.subtract(pos, {x = 0, y = y_dist, z = 0})) + y_dist = y_dist + 1 + end + return node +end + +local function beacon_on_construct(pos, color) + local above = vector.add(pos, {x = 0, y = 1, z = 0}) + if get_node_under_light(pos).name == ("beacons:base_" .. color) and minetest.get_node(above).name == "air" then + minetest.set_node(above, {name = "beacons:light_" .. color}) + end +end + +local function beacon_on_destruct(pos, color) + local above = vector.add(pos, {x = 0, y = 1, z = 0}) + if minetest.get_node(above).name == ("beacons:light_" .. color) then + minetest.remove_node(above) + end +end + +local function beacon_on_timer(pos, color) + beacon_on_construct(pos, color) + if get_node_under_light(pos).name ~= ("beacons:base_" .. color) then + minetest.remove_node(pos) + end + return true +end + +local function make_on_construct(color) + return function(pos) + minetest.get_node_timer(pos):start(1) + return beacon_on_construct(pos, color) + end +end + +local function make_on_destruct(color) + return function(pos) + return beacon_on_destruct(pos, color) + end +end + +local function make_on_timer(color) + return function(pos) + return beacon_on_timer(pos, color) + end +end + +local color_descs = { + white = S("White"), + red = S("Red"), + yellow = S("Yellow"), + green = S("Green"), + cyan = S("Cyan"), + blue = S("Blue"), + magenta = S("Magenta"), + orange = S("Orange"), + violet = S("Violet"), +} + +for color, color_desc in pairs(color_descs) do + minetest.register_node("beacons:base_" .. color, { + description = S("Beacon") .. " " .. color_desc, + tiles = {"beacons_base_top.png", "beacons_base_bottom.png", "beacons_base_side.png"}, + color = color:gsub("_", ""), + groups = {beacon_base = 1, cracky = 2}, + is_ground_content = false, + paramtype = "light", + on_rotate = function() end, + + on_construct = make_on_construct(color), + on_destruct = make_on_destruct(color), + on_timer = make_on_timer(color), + }) + + if minetest.get_modpath("default") then + minetest.override_item("beacons:base_" .. color, {sounds = default.node_sound_metal_defaults()}) + + if minetest.get_modpath("dye") then + local color_group + if color == "magenta" then + color_group = "color_red_violet" + else + color_group = "color_" .. color + end + + minetest.register_craft({ + output = "beacons:base_" .. color, + recipe = { + {"default:steel_ingot", "group:" .. color_group, "default:steel_ingot",}, + {"default:steel_ingot", "default:meselamp", "default:steel_ingot",}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot",}, + }, + }) + + minetest.register_craft({ + type = "shapeless", + output = "beacons:base_" .. color, + recipe = {"group:beacon_base", "group:" .. color_group}, + }) + end + end + + minetest.register_node("beacons:light_" .. color, { + description = color_desc .. " Beacon Light", + drawtype = "liquid", + tiles = {"default_cloud.png"}, + alpha= 32, + color = color:gsub("_", ""), + paramtype = "light", + sunlight_propagates = true, + light_source = minetest.LIGHT_MAX, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + floodable = false, + drop = "", + groups = {beacon_light = 1, not_in_creative_inventory = 1}, + damage_per_second = 1, + post_effect_color = color, + on_blast = function() end, + + on_construct = make_on_construct(color), + on_destruct = make_on_destruct(color), + on_timer = make_on_timer(color), + }) +end diff --git a/mods/beacons/intllib.lua b/mods/beacons/intllib.lua new file mode 100755 index 0000000..6669d72 --- /dev/null +++ b/mods/beacons/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/beacons/locale/es.po b/mods/beacons/locale/es.po new file mode 100644 index 0000000..f2b08f9 --- /dev/null +++ b/mods/beacons/locale/es.po @@ -0,0 +1,62 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-14 08:34+0200\n" +"PO-Revision-Date: 2018-12-11 23:40+0100\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 1.8.11\n" + +#: init.lua +msgid "White" +msgstr "Blanco" + +#: init.lua +msgid "Red" +msgstr "Rojo" + +#: init.lua +msgid "Yellow" +msgstr "Amarillo" + +#: init.lua +msgid "Green" +msgstr "Verde" + +#: init.lua +msgid "Cyan" +msgstr "Cián" + +#: init.lua +msgid "Blue" +msgstr "Azul" + +#: init.lua +msgid "Magenta" +msgstr "Magenta" + +#: init.lua +msgid "Orange" +msgstr "Naranja" + +#: init.lua +msgid "Violet" +msgstr "Violeta" + +#: init.lua +msgid "Beacon" +msgstr "Faro" + + + + diff --git a/mods/beacons/mod.conf b/mods/beacons/mod.conf new file mode 100644 index 0000000..6f996e2 --- /dev/null +++ b/mods/beacons/mod.conf @@ -0,0 +1,2 @@ +name = beacons +description = "Adds craftable beacons in several different colors." \ No newline at end of file diff --git a/mods/beacons/screenshot.png b/mods/beacons/screenshot.png new file mode 100644 index 0000000..2318db0 Binary files /dev/null and b/mods/beacons/screenshot.png differ diff --git a/mods/beacons/settingtypes.txt b/mods/beacons/settingtypes.txt new file mode 100644 index 0000000..d038ebd --- /dev/null +++ b/mods/beacons/settingtypes.txt @@ -0,0 +1 @@ +beacon_height (Beacon height) int 0 0 61840 \ No newline at end of file diff --git a/mods/beacons/textures/beacons_base_bottom.png b/mods/beacons/textures/beacons_base_bottom.png new file mode 100644 index 0000000..d7f2303 Binary files /dev/null and b/mods/beacons/textures/beacons_base_bottom.png differ diff --git a/mods/beacons/textures/beacons_base_side.png b/mods/beacons/textures/beacons_base_side.png new file mode 100644 index 0000000..84719e1 Binary files /dev/null and b/mods/beacons/textures/beacons_base_side.png differ diff --git a/mods/beacons/textures/beacons_base_top.png b/mods/beacons/textures/beacons_base_top.png new file mode 100644 index 0000000..5bee223 Binary files /dev/null and b/mods/beacons/textures/beacons_base_top.png differ diff --git a/mods/beacons/textures/beacons_light.png b/mods/beacons/textures/beacons_light.png new file mode 100644 index 0000000..bdd49eb Binary files /dev/null and b/mods/beacons/textures/beacons_light.png differ diff --git a/mods/beauty_pack/.luacheckrc b/mods/beauty_pack/.luacheckrc new file mode 100644 index 0000000..6e774c9 --- /dev/null +++ b/mods/beauty_pack/.luacheckrc @@ -0,0 +1,21 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", + "player_api", + "armor", + "dye" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/beauty_pack/LICENSE.md b/mods/beauty_pack/LICENSE.md new file mode 100644 index 0000000..efb5d1d --- /dev/null +++ b/mods/beauty_pack/LICENSE.md @@ -0,0 +1,4 @@ +# Licenses + +- Source code: GPLv3. +- Textures: CC BY-SA 4.0 diff --git a/mods/beauty_pack/README.md b/mods/beauty_pack/README.md new file mode 100644 index 0000000..8380654 --- /dev/null +++ b/mods/beauty_pack/README.md @@ -0,0 +1,8 @@ +# Beauty Pack [modpack] + +A cosmetic mod. + +## Licenses + +- Code: GPL v3.0 +- Textures: CC BY-SA 4.0 diff --git a/mods/beauty_pack/ccloth/init.lua b/mods/beauty_pack/ccloth/init.lua new file mode 100644 index 0000000..7acadf6 --- /dev/null +++ b/mods/beauty_pack/ccloth/init.lua @@ -0,0 +1,83 @@ +-- +-- ccloth +-- License:GPLv3 +-- + +-- +-- Cool Cloth +-- + +local S = minetest.get_translator("ccloth") + +--Gray Hoodie + +player_api.register_cloth("ccloth:gray_hoodie", { + description = S("Gray Hoodie"), + texture = "ccloth_gray_hoodie.png", + inventory_image = "ccloth_gray_hoodie_inv.png", + wield_image = "ccloth_gray_hoodie_inv.png", + preview = "ccloth_gray_hoodie_preview.png", + gender = "unisex", + groups = {cloth = 2}, + attach = "ccloth:gray_hoodie_hood", +}) + +player_api.register_cloth("ccloth:gray_hoodie_hood", { + attached = true, + texture = "ccloth_gray_hoodie_hood.png", + groups = {cloth = 1}, +}) + +minetest.register_craft({ + output = "ccloth:gray_hoodie", + type = "shaped", + recipe = { + {"fabric:grey", "", "fabric:grey"}, + {"fabric:dark_grey", "fabric:white", "fabric:grey"}, + {"fabric:dark_grey", "fabric:grey", "fabric:dark_grey"}, + } +}) + +--Blue Jeans + +player_api.register_cloth("ccloth:blue_jeans", { + description = S("Blue Jeans"), + texture = "ccloth_blue_jeans.png", + inventory_image = "ccloth_blue_jeans_inv.png", + wield_image = "ccloth_blue_jeans_inv.png", + preview = "ccloth_blue_jeans_preview.png", + gender = "unisex", + groups = {cloth = 3}, +}) + +minetest.register_craft({ + output = "ccloth:blue_jeans", + type = "shaped", + recipe = { + {"fabric:blue", "fabric:blue", "fabric:blue"}, + {"fabric:white", "", "fabric:white"}, + {"fabric:blue", "", "fabric:blue"}, + } +}) + +--Black Sneakers + +player_api.register_cloth("ccloth:black_sneakers", { + description = S("Black Sneakers"), + texture = "ccloth_black_sneakers.png", + inventory_image = "ccloth_black_sneakers_inv.png", + wield_image = "ccloth_black_sneakers_inv.png", + preview = "ccloth_black_sneakers_preview.png", + gender = "unisex", + groups = {cloth = 4}, +}) + +minetest.register_craft({ + output = "ccloth:black_sneakers", + type = "shaped", + recipe = { + {"farming:string", "", "farming:string"}, + {"fabric:black", "", "fabric:black"}, + {"", "", ""}, + } +}) diff --git a/mods/beauty_pack/ccloth/locale/ccloth.es.tr b/mods/beauty_pack/ccloth/locale/ccloth.es.tr new file mode 100644 index 0000000..79e8841 --- /dev/null +++ b/mods/beauty_pack/ccloth/locale/ccloth.es.tr @@ -0,0 +1,4 @@ +# textdomain: ccloth +Gray Hoodie=Sudadera gris con capucha +Blue Jeans=Pantalones vaqueros azules +Black Sneakers=Zapatillas deporte negras diff --git a/mods/beauty_pack/ccloth/mod.conf b/mods/beauty_pack/ccloth/mod.conf new file mode 100644 index 0000000..3f5b4a2 --- /dev/null +++ b/mods/beauty_pack/ccloth/mod.conf @@ -0,0 +1,3 @@ +name = ccloth +description = More cool clothes +depends = player_api, fabric, farming diff --git a/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers.png b/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers.png new file mode 100644 index 0000000..6fbdeae Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers_inv.png b/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers_inv.png new file mode 100644 index 0000000..b88a422 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers_inv.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers_preview.png b/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers_preview.png new file mode 100644 index 0000000..7ae5eb1 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_black_sneakers_preview.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans.png b/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans.png new file mode 100644 index 0000000..ffd5308 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans_inv.png b/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans_inv.png new file mode 100644 index 0000000..c049a1d Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans_inv.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans_preview.png b/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans_preview.png new file mode 100644 index 0000000..2a5fea3 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_blue_jeans_preview.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie.png b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie.png new file mode 100644 index 0000000..fdc86f8 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_hood.png b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_hood.png new file mode 100644 index 0000000..04ad6d9 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_hood.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_inv.png b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_inv.png new file mode 100644 index 0000000..ec819b3 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_inv.png differ diff --git a/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_preview.png b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_preview.png new file mode 100644 index 0000000..987c376 Binary files /dev/null and b/mods/beauty_pack/ccloth/textures/ccloth_gray_hoodie_preview.png differ diff --git a/mods/beauty_pack/closet/api/api.lua b/mods/beauty_pack/closet/api/api.lua new file mode 100644 index 0000000..569a8fc --- /dev/null +++ b/mods/beauty_pack/closet/api/api.lua @@ -0,0 +1,3 @@ +local modpath = ... + +assert(loadfile(modpath .. "/api/api_container.lua"))() diff --git a/mods/beauty_pack/closet/api/api_container.lua b/mods/beauty_pack/closet/api/api_container.lua new file mode 100644 index 0000000..c36a94e --- /dev/null +++ b/mods/beauty_pack/closet/api/api_container.lua @@ -0,0 +1,301 @@ +closet.container = {} +closet.container.open_containers = {} + +local _contexts = {} + +local function get_context(name) + local context = _contexts[name] or {} + _contexts[name] = context + return context +end + +minetest.register_on_leaveplayer(function(player) + _contexts[player:get_player_name()] = nil +end) + +function closet.compose_preview(clicker, gender) + local inv = clicker:get_inventory() + local inv_list = inv:get_list("cloths") + local head, upper, lower, underwear, footwear + for i = 1, #inv_list do + local item_name = inv_list[i]:get_name() + local cloth_type = minetest.get_item_group(item_name, "cloth") + if cloth_type == 1 then + head = minetest.registered_items[item_name]._cloth_preview + elseif cloth_type == 2 then + upper = minetest.registered_items[item_name]._cloth_preview + elseif cloth_type == 3 then + lower = minetest.registered_items[item_name]._cloth_preview + underwear = true + elseif cloth_type == 4 then + footwear = minetest.registered_items[item_name]._cloth_preview + end + end + if not(underwear) then + lower = "cloth_lower_underwear_preview.png" + end + local base_texture = player_api.compose_base_texture(clicker, { + canvas_size ="32x64", + skin_texture = "closet_player_preview.png", + eyebrowns_pos = "8,0", + eye_right_pos = "10,8", + eye_left_pos = "18,8", + mouth_pos = "8,12", + hair_preview = true, + hair_pos = "8,0", + }) + local preview= base_texture + if head then + preview= preview .. ":8,0="..head + end + if upper then + preview= preview .. ":0,16="..upper + end + if lower then + preview= preview .. ":8,40="..lower + end + if footwear then + preview= preview .. ":8,40="..footwear + end + return preview +end + + --if minetest.get_modpath("3d_armor")~=nil then + --local clicker_name = clicker:get_player_name() + --texture = armor.textures[clicker_name].skin + --5.4--texture = minetest.formspec_escape(armor.textures[clicker_name].skin)..",".. + --5.4armor.textures[clicker_name].armor..","..armor.textures[clicker_name].wielditem + --else + + --5.4--texture = clicker:get_properties().textures[1] + --end + --minetest.chat_send_all(raw_texture) + +local function get_bg(x,y,rows,columns,image) + local out = "" + for i=0,columns do + out = out .."image["..x+i..","..y..";1,1;"..image.."]" + for j = 0,rows do + out = out .."image["..x+i..","..y+j..";1,1;"..image.."]" + end + end + return out +end + +function closet.container.get_container_formspec(pos, clicker) + local gender = player_api.get_gender(clicker) + --5.4--local model = player_api.get_gender_model(gender) + local preview = closet.compose_preview(clicker, gender) + local spos = pos.x .. "," .. pos.y .. "," .. pos.z + local formspec = + "size[8,8.25]" .. + --5.4--"model[0,0;5,5;preview_model;"..model..";"..texture..";-10,195;;;0,79]".. + "image[0.5,0.5;2,4;"..minetest.formspec_escape(preview).."]" .. + "list[current_player;cloths;2.5,0.25;2,4]" .. + get_bg(2.5,0.25,3,1,"closet_gui_clothes_bg.png").. + "list[nodemeta:" .. spos .. ";closet;5,0.25;3,12;]" .. + get_bg(5,0.25,3,2,"closet_gui_closet_bg.png").. + "list[current_player;main;0,4.5;8,1;]" .. + "list[current_player;main;0,5.5;8,3;8]" .. + default.get_hotbar_bg(0,4.5) + return formspec +end + +-- Allow only "cloth" groups to put/move + +minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info) + local stack, from_inv, to_index + if action == "move" and inventory_info.to_list == "cloths" then + if inventory_info.from_list == inventory_info.to_list then --for moving inside the 'cloths' inventory + return 1 + end + --for moving items from player inventory list 'main' to 'cloths' + from_inv = "main" + to_index = inventory_info.to_index + stack = inventory:get_stack(inventory_info.from_list, inventory_info.from_index) + elseif action == "put" and inventory_info.listname == "cloths" then + --for moving from node inventory 'closet' to player inventory 'cloths' + from_inv = "closet" + to_index = inventory_info.index + stack = inventory_info.stack + else + return + end + if stack then + local stack_name = stack:get_name() + local item_group = minetest.get_item_group(stack_name , "cloth") + if item_group == 0 then --not a cloth + return 0 + end + --search for another cloth of the same type + local player_inv = player:get_inventory() + local cloth_list = player_inv:get_list("cloths") + for i = 1, #cloth_list do + local cloth_name = cloth_list[i]:get_name() + local cloth_type = minetest.get_item_group(cloth_name, "cloth") + if cloth_type == item_group then + if player_inv:get_stack("cloths", to_index):get_count() == 0 then --if put on an empty slot + if from_inv == "main" then + if player_inv:room_for_item("main", cloth_name) then + player_inv:remove_item("cloths", cloth_name) + player_inv:add_item("main", cloth_name) + return 1 + end + else --closet inventory + local closet_inv = minetest.get_inventory({ type="node", pos=get_context(player:get_player_name())}) + if closet_inv:room_for_item("closet", cloth_name) then + player_inv:remove_item("cloths", cloth_name) + closet_inv:add_item("closet", cloth_name) + return 1 + end + end + end + return 0 + end + end + return 1 + end + return 0 +end) + +minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info) + local update_cloths + if (action == "move" and inventory_info.to_list == "cloths") then + --for moving items from player inventory list 'main' to 'cloths' + if inventory_info.from_list == inventory_info.to_list then --for moving inside the 'cloths' inventory + update_cloths = false + else + update_cloths = true + end + elseif (action == "move" and inventory_info.to_list == "main" and inventory_info.from_list == "cloths") then + update_cloths = true + elseif (action == "put" or action == "take") and inventory_info.listname == "cloths" then + update_cloths = true + else + return + end + if update_cloths then + local player_name = player:get_player_name() + minetest.show_formspec(player_name, + "closet:container", closet.container.get_container_formspec(_contexts[player_name], player)) + end +end) + +function closet.container.container_lid_close(pn) + local container_open_info = closet.container.open_containers[pn] + local pos = container_open_info.pos + local sound = container_open_info.sound + local swap = container_open_info.swap + + closet.container.open_containers[pn] = nil + for k, v in pairs(closet.container.open_containers) do + if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then + return true + end + end + + local node = minetest.get_node(pos) + minetest.after(0.2, minetest.swap_node, pos, { name = "closet:" .. swap, + param2 = node.param2 }) + minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10}) +end + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if closet.container.open_containers[pn] then + closet.container.container_lid_close(pn) + end +end) + +function closet.container.container_lid_obstructed(pos, direction) + if direction == "above" then + pos = {x = pos.x, y = pos.y + 1, z = pos.z} + end + local def = minetest.registered_nodes[minetest.get_node(pos).name] + -- allow ladders, signs, wallmounted things and torches to not obstruct + if def and + (def.drawtype == "airlike" or + def.drawtype == "signlike" or + def.drawtype == "torchlike" or + (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then + return false + end + return true +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "closet:container" then + return + end + if not player or not fields.quit then + return + end + local pn = player:get_player_name() + + if not closet.container.open_containers[pn] then + return + end + + player_api.set_texture(player) + + closet.container.container_lid_close(pn) + return true +end) + +function closet.register_container(name, d) + local def = table.copy(d) + def.drawtype = 'mesh' + def.use_texture_alpha = true + def.paramtype = "light" + def.paramtype2 = "facedir" + def.is_ground_content = false + + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", d.description) + local inv = meta:get_inventory() + inv:set_size("closet", 12*1) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("closet") + end + def.on_rightclick = function(pos, node, clicker) + minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos, max_hear_distance = 10}) + if not closet.container.container_lid_obstructed(pos, "above") then + minetest.swap_node(pos, { + name = "closet:" .. name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "closet:container", closet.container.get_container_formspec(pos, clicker)) + local player_name = clicker:get_player_name() + _contexts[player_name] = pos + closet.container.open_containers[player_name] = { pos = pos, sound = def.sound_close, swap = name } + end + def.on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "closet", drops) + drops[#drops+1] = "closet:" .. name + minetest.remove_node(pos) + return drops + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_opened.mesh = "closet_open.obj" + def_opened.tiles = {"closet_closet_open.png",} + def_opened.drop = "closet:" .. name + def_opened.groups.not_in_creative_inventory = 1 + def_opened.can_dig = function() + return false + end + def_opened.on_blast = function() end + + minetest.register_node("closet:" .. name, def_closed) + minetest.register_node("closet:" .. name .. "_open", def_opened) + +end diff --git a/mods/beauty_pack/closet/closet.lua b/mods/beauty_pack/closet/closet.lua new file mode 100644 index 0000000..7f92ed0 --- /dev/null +++ b/mods/beauty_pack/closet/closet.lua @@ -0,0 +1,29 @@ +local S = ... + +closet.register_container("closet", { + description = S("Closet"), + inventory_image = "closet_closet_inv.png", + mesh = "closet.obj", + tiles = { + "closet_closet.png", + }, + use_texture_alpha = true, + selection_box = { + type = "fixed", + fixed = { -1/2, -1/2, 0.062500, 1/2, 1.5, 1/2 }, + }, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, +}) + +minetest.register_craft({ + output = "closet:closet", + type = "shaped", + recipe = { + {"", "group:wood", "group:wood"}, + {"", "group:wood", "group:mirror"}, + {"", "group:wood", "group:wood"}, + } +}) diff --git a/mods/beauty_pack/closet/init.lua b/mods/beauty_pack/closet/init.lua new file mode 100644 index 0000000..36471be --- /dev/null +++ b/mods/beauty_pack/closet/init.lua @@ -0,0 +1,19 @@ +-- +-- closet +-- License:GPLv3 +-- + +local modname = "closet" +local modpath = minetest.get_modpath(modname) +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- +-- Closet Mod +-- + +closet = {} + +-- Load the files +assert(loadfile(modpath .. "/api/api.lua"))(modpath) +assert(loadfile(modpath .. "/closet.lua"))(S) diff --git a/mods/beauty_pack/closet/locale/closet.es.tr b/mods/beauty_pack/closet/locale/closet.es.tr new file mode 100644 index 0000000..06638c4 --- /dev/null +++ b/mods/beauty_pack/closet/locale/closet.es.tr @@ -0,0 +1,2 @@ +# textdomain: closet +Closet=Armario ropero diff --git a/mods/beauty_pack/closet/mod.conf b/mods/beauty_pack/closet/mod.conf new file mode 100644 index 0000000..bb89d83 --- /dev/null +++ b/mods/beauty_pack/closet/mod.conf @@ -0,0 +1,3 @@ +name = closet +description = A Wardove for put/store cloths +depends = default, player_api, mirrors diff --git a/mods/beauty_pack/closet/models/closet.blend b/mods/beauty_pack/closet/models/closet.blend new file mode 100644 index 0000000..441e764 Binary files /dev/null and b/mods/beauty_pack/closet/models/closet.blend differ diff --git a/mods/beauty_pack/closet/models/closet.mtl b/mods/beauty_pack/closet/models/closet.mtl new file mode 100644 index 0000000..8176705 --- /dev/null +++ b/mods/beauty_pack/closet/models/closet.mtl @@ -0,0 +1,13 @@ +# Blender MTL File: 'closet.blend' +# Material Count: 1 + +newmtl none +Ns 92.156863 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd /opt/minetest/games/juanchi/mods/closet/textures/closet_closet.png diff --git a/mods/beauty_pack/closet/models/closet_inv.png b/mods/beauty_pack/closet/models/closet_inv.png new file mode 100644 index 0000000..d68ec57 Binary files /dev/null and b/mods/beauty_pack/closet/models/closet_inv.png differ diff --git a/mods/beauty_pack/closet/models/closet_open.blend b/mods/beauty_pack/closet/models/closet_open.blend new file mode 100644 index 0000000..65ec53a Binary files /dev/null and b/mods/beauty_pack/closet/models/closet_open.blend differ diff --git a/mods/beauty_pack/closet/models/closet_open.mtl b/mods/beauty_pack/closet/models/closet_open.mtl new file mode 100644 index 0000000..3cd50ef --- /dev/null +++ b/mods/beauty_pack/closet/models/closet_open.mtl @@ -0,0 +1,13 @@ +# Blender MTL File: 'closet_open.blend' +# Material Count: 1 + +newmtl none.002 +Ns 94.117647 +Ka 1.000000 1.000000 1.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ke 0.000000 0.000000 0.000000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd /opt/minetest/games/juanchi/mods/closet/textures/closet_closet_open.png diff --git a/mods/beauty_pack/closet/nodeboxes/closet.nbe b/mods/beauty_pack/closet/nodeboxes/closet.nbe new file mode 100644 index 0000000..b9f2ff3 Binary files /dev/null and b/mods/beauty_pack/closet/nodeboxes/closet.nbe differ diff --git a/mods/beauty_pack/closet/nodeboxes/closet_opened.nbe b/mods/beauty_pack/closet/nodeboxes/closet_opened.nbe new file mode 100644 index 0000000..39ea668 Binary files /dev/null and b/mods/beauty_pack/closet/nodeboxes/closet_opened.nbe differ diff --git a/mods/beauty_pack/closet/textures/closet_closet.png b/mods/beauty_pack/closet/textures/closet_closet.png new file mode 100644 index 0000000..0b681e3 Binary files /dev/null and b/mods/beauty_pack/closet/textures/closet_closet.png differ diff --git a/mods/beauty_pack/closet/textures/closet_closet_inv.png b/mods/beauty_pack/closet/textures/closet_closet_inv.png new file mode 100644 index 0000000..3ec96b5 Binary files /dev/null and b/mods/beauty_pack/closet/textures/closet_closet_inv.png differ diff --git a/mods/beauty_pack/closet/textures/closet_closet_open.png b/mods/beauty_pack/closet/textures/closet_closet_open.png new file mode 100644 index 0000000..e99f123 Binary files /dev/null and b/mods/beauty_pack/closet/textures/closet_closet_open.png differ diff --git a/mods/beauty_pack/closet/textures/closet_gui_closet_bg.png b/mods/beauty_pack/closet/textures/closet_gui_closet_bg.png new file mode 100644 index 0000000..229354c Binary files /dev/null and b/mods/beauty_pack/closet/textures/closet_gui_closet_bg.png differ diff --git a/mods/beauty_pack/closet/textures/closet_gui_clothes_bg.png b/mods/beauty_pack/closet/textures/closet_gui_clothes_bg.png new file mode 100755 index 0000000..0e27c65 Binary files /dev/null and b/mods/beauty_pack/closet/textures/closet_gui_clothes_bg.png differ diff --git a/mods/beauty_pack/closet/textures/closet_player_preview.png b/mods/beauty_pack/closet/textures/closet_player_preview.png new file mode 100644 index 0000000..a0e8ec5 Binary files /dev/null and b/mods/beauty_pack/closet/textures/closet_player_preview.png differ diff --git a/mods/beauty_pack/default_clothes/init.lua b/mods/beauty_pack/default_clothes/init.lua new file mode 100644 index 0000000..5ea01c5 --- /dev/null +++ b/mods/beauty_pack/default_clothes/init.lua @@ -0,0 +1,68 @@ +-- +-- default_clothes +-- License:GPLv3 +-- + +-- +-- Default Clothes +-- + +minetest.register_craft({ + output = "player_api:cloth_female_upper_default", + type = "shaped", + recipe = { + {"fabric:violet", "", "fabric:violet"}, + {"fabric:dark_grey", "fabric:dark_grey", "fabric:dark_grey"}, + {"fabric:violet", "fabric:violet", "fabric:violet"}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_male_upper_default", + type = "shaped", + recipe = { + {"fabric:black", "", "fabric:black"}, + {"fabric:green", "fabric:green", "fabric:green"}, + {"fabric:brown", "fabric:brown", "fabric:brown"}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_male_lower_default", + type = "shaped", + recipe = { + {"fabric:blue", "fabric:blue", "fabric:blue"}, + {"fabric:blue", "", "fabric:blue"}, + {"fabric:black", "", "fabric:black"}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_female_lower_default", + type = "shaped", + recipe = { + {"fabric:blue", "fabric:blue", "fabric:blue"}, + {"fabric:white", "", "fabric:white"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_female_head_default", + type = "shaped", + recipe = { + {"fabric:pink", "", ""}, + {"", "fabric:pink", ""}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_unisex_footwear_default", + type = "shaped", + recipe = { + {"fabric:black", "", "fabric:black"}, + {"fabric:black", "", "fabric:black"}, + {"", "", ""}, + } +}) diff --git a/mods/beauty_pack/default_clothes/mod.conf b/mods/beauty_pack/default_clothes/mod.conf new file mode 100644 index 0000000..121285b --- /dev/null +++ b/mods/beauty_pack/default_clothes/mod.conf @@ -0,0 +1,3 @@ +name = default_clothes +description = Craft the default player_api cloths +depends = player_api, fabric diff --git a/mods/beauty_pack/fabric/init.lua b/mods/beauty_pack/fabric/init.lua new file mode 100644 index 0000000..f1a370f --- /dev/null +++ b/mods/beauty_pack/fabric/init.lua @@ -0,0 +1,69 @@ +-- +-- fabric +-- License:GPLv3 +-- + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- +-- Fabric Mod +-- + +local fabric_dyes = dye.dyes + +for i = 1, #fabric_dyes do + if fabric_dyes[i][1] == "white" then + fabric_dyes[i][3] = "FFFFFF" + elseif fabric_dyes[i][1] == "grey" then + fabric_dyes[i][3] = "808080" + elseif fabric_dyes[i][1] == "dark_grey" then + fabric_dyes[i][3] = "A9A9A9" + elseif fabric_dyes[i][1] == "black" then + fabric_dyes[i][3] = "000000" + elseif fabric_dyes[i][1] == "violet" then + fabric_dyes[i][3] = "EE82EE" + elseif fabric_dyes[i][1] == "blue" then + fabric_dyes[i][3] = "0000FF" + elseif fabric_dyes[i][1] == "cyan" then + fabric_dyes[i][3] = "00FFFF" + elseif fabric_dyes[i][1] == "dark_green" then + fabric_dyes[i][3] = "006400" + elseif fabric_dyes[i][1] == "green" then + fabric_dyes[i][3] = "008000" + elseif fabric_dyes[i][1] == "yellow" then + fabric_dyes[i][3] = "FFFF00" + elseif fabric_dyes[i][1] == "brown" then + fabric_dyes[i][3] = "A52A2A" + elseif fabric_dyes[i][1] == "orange" then + fabric_dyes[i][3] = "FFA500" + elseif fabric_dyes[i][1] == "red" then + fabric_dyes[i][3] = "FF0000" + elseif fabric_dyes[i][1] == "magenta" then + fabric_dyes[i][3] = "FF00FF" + elseif fabric_dyes[i][1] == "pink" then + fabric_dyes[i][3] = "FFC0CB" + end +end + +for i = 1, #fabric_dyes do + + local name, desc, rgb = unpack(fabric_dyes[i]) + + desc = S(desc) + + minetest.register_craftitem("fabric:".. name, { + description = S("@1 Cotton Fabric", desc), + inventory_image = "fabric_fabric.png^[colorize:#"..rgb..":180", + }) + + minetest.register_craft({ + output = "fabric:".. name, + type = "shaped", + recipe = { + {"", "", ""}, + {"", "group:dye,color_" .. name, ""}, + {"farming:cotton", "farming:cotton", "farming:cotton"}, + } + }) +end diff --git a/mods/beauty_pack/fabric/locale/fabric.es.tr b/mods/beauty_pack/fabric/locale/fabric.es.tr new file mode 100644 index 0000000..aa08efd --- /dev/null +++ b/mods/beauty_pack/fabric/locale/fabric.es.tr @@ -0,0 +1,17 @@ +# textdomain: fabric +@1 Cotton Fabric=Tela de algodón @1 +White=blanca +Grey=gris +Dark Grey=gris oscura +Black=negra +Violet=violeta +Blue=azul +Cyan=azul claro +Dark Green=verde oscuro +Green=verde +Yellow=amarilla +Brown=marrón +Orange=naranja +Red=roja +Magenta=magenta +Pink=rosa diff --git a/mods/beauty_pack/fabric/mod.conf b/mods/beauty_pack/fabric/mod.conf new file mode 100644 index 0000000..484f183 --- /dev/null +++ b/mods/beauty_pack/fabric/mod.conf @@ -0,0 +1,3 @@ +name = fabric +description = Craft fabrics thru cotton +depends = farming, dye diff --git a/mods/beauty_pack/fabric/textures/fabric_fabric.png b/mods/beauty_pack/fabric/textures/fabric_fabric.png new file mode 100644 index 0000000..8bde0d5 Binary files /dev/null and b/mods/beauty_pack/fabric/textures/fabric_fabric.png differ diff --git a/mods/beauty_pack/mirrors/init.lua b/mods/beauty_pack/mirrors/init.lua new file mode 100644 index 0000000..deb14cd --- /dev/null +++ b/mods/beauty_pack/mirrors/init.lua @@ -0,0 +1,39 @@ +-- +-- mirrors +-- License:GPLv3 +-- + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- +-- Mirrors Mod +-- + +minetest.register_node("mirrors:mirror", { + description = S("Mirror"), + inventory_image = "mirrors_mirror_inv.png", + wield_image = "mirrors_mirror_inv.png", + tiles = {"mirrors_mirror.png", "mirrors_mirror.png", "mirrors_mirror.png", "mirrors_mirror.png", + "mirrors_mirror_back.png","mirrors_mirror.png"}, + groups = {mirror = 1, cracky=1}, + sounds = default.node_sound_glass_defaults(), + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.375, 0.5, 0.5, 0.5 }, + }, + }, +}) + +minetest.register_craft({ + output = "mirror:mirror", + type = "shaped", + recipe = { + {"default:stick", "default:stick", "default:stick"}, + {"default:stick", "xpanes:pane_flat", "default:stick"}, + {"default:stick", "default:stick", "default:stick"}, + } +}) diff --git a/mods/beauty_pack/mirrors/locale/mirrors.es.tr b/mods/beauty_pack/mirrors/locale/mirrors.es.tr new file mode 100644 index 0000000..b412767 --- /dev/null +++ b/mods/beauty_pack/mirrors/locale/mirrors.es.tr @@ -0,0 +1,2 @@ +# textdomain: mirrors +Mirror=Espejo diff --git a/mods/beauty_pack/mirrors/mod.conf b/mods/beauty_pack/mirrors/mod.conf new file mode 100644 index 0000000..0102f6e --- /dev/null +++ b/mods/beauty_pack/mirrors/mod.conf @@ -0,0 +1,3 @@ +name = mirrors +description = A Wardove for put/store cloths +depends = default, xpanes diff --git a/mods/beauty_pack/mirrors/textures/mirrors_mirror.png b/mods/beauty_pack/mirrors/textures/mirrors_mirror.png new file mode 100644 index 0000000..7a6dc2d Binary files /dev/null and b/mods/beauty_pack/mirrors/textures/mirrors_mirror.png differ diff --git a/mods/beauty_pack/mirrors/textures/mirrors_mirror_back.png b/mods/beauty_pack/mirrors/textures/mirrors_mirror_back.png new file mode 100644 index 0000000..ac29268 Binary files /dev/null and b/mods/beauty_pack/mirrors/textures/mirrors_mirror_back.png differ diff --git a/mods/beauty_pack/mirrors/textures/mirrors_mirror_inv.png b/mods/beauty_pack/mirrors/textures/mirrors_mirror_inv.png new file mode 100644 index 0000000..69a865a Binary files /dev/null and b/mods/beauty_pack/mirrors/textures/mirrors_mirror_inv.png differ diff --git a/mods/beauty_pack/modpack.txt b/mods/beauty_pack/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/beauty_pack/vanity/api/api.lua b/mods/beauty_pack/vanity/api/api.lua new file mode 100644 index 0000000..de52bbf --- /dev/null +++ b/mods/beauty_pack/vanity/api/api.lua @@ -0,0 +1,3 @@ +local modpath = ... + +assert(loadfile(modpath .. "/api/api_vanity.lua"))() diff --git a/mods/beauty_pack/vanity/api/api_vanity.lua b/mods/beauty_pack/vanity/api/api_vanity.lua new file mode 100644 index 0000000..af68269 --- /dev/null +++ b/mods/beauty_pack/vanity/api/api_vanity.lua @@ -0,0 +1,304 @@ +closet.container = {} +closet.container.open_containers = {} + +local _contexts = {} + +local function get_context(name) + local context = _contexts[name] or {} + _contexts[name] = context + return context +end + +minetest.register_on_leaveplayer(function(player) + _contexts[player:get_player_name()] = nil +end) + +function closet.compose_preview(clicker, gender) + local inv = clicker:get_inventory() + local inv_list = inv:get_list("cloths") + local head, upper, lower, underwear, footwear + for i = 1, #inv_list do + local item_name = inv_list[i]:get_name() + local cloth_type = minetest.get_item_group(item_name, "cloth") + if cloth_type == 1 then + head = minetest.registered_items[item_name]._cloth_preview + elseif cloth_type == 2 then + upper = minetest.registered_items[item_name]._cloth_preview + elseif cloth_type == 3 then + lower = minetest.registered_items[item_name]._cloth_preview + underwear = true + elseif cloth_type == 4 then + footwear = minetest.registered_items[item_name]._cloth_preview + end + end + if not(underwear) then + lower = "cloth_lower_underwear_preview.png" + end + local preview, texture_base + if gender == "male" then + texture_base= "closet_player_preview.png" + else + texture_base = "closet_female_preview.png" + end + preview="[combine:32x64:0,0="..texture_base + if head then + preview= preview .. ":8,0="..head + end + if upper then + preview= preview .. ":0,16="..upper + end + if lower then + preview= preview .. ":8,40="..lower + end + if footwear then + preview= preview .. ":8,40="..footwear + end + return preview +end + + --if minetest.get_modpath("3d_armor")~=nil then + --local clicker_name = clicker:get_player_name() + --texture = armor.textures[clicker_name].skin + --5.4--texture = minetest.formspec_escape(armor.textures[clicker_name].skin)..",".. + --5.4armor.textures[clicker_name].armor..","..armor.textures[clicker_name].wielditem + --else + + --5.4--texture = clicker:get_properties().textures[1] + --end + --minetest.chat_send_all(raw_texture) + +local function get_bg(x,y,rows,columns,image) + local out = "" + for i=0,columns do + out = out .."image["..x+i..","..y..";1,1;"..image.."]" + for j = 0,rows do + out = out .."image["..x+i..","..y+j..";1,1;"..image.."]" + end + end + return out +end + +function closet.container.get_container_formspec(pos, clicker) + local gender = player_api.get_gender(clicker) + --5.4--local model = player_api.get_gender_model(gender) + local preview = closet.compose_preview(clicker, gender) + local spos = pos.x .. "," .. pos.y .. "," .. pos.z + local formspec = + "size[8,8.25]" .. + --5.4--"model[0,0;5,5;preview_model;"..model..";"..texture..";-10,195;;;0,79]".. + "image[0.5,0.5;2,4;"..preview.."]" .. + "list[current_player;cloths;2.5,0.25;2,4]" .. + get_bg(2.5,0.25,3,1,"closet_gui_clothes_bg.png").. + "list[nodemeta:" .. spos .. ";closet;5,0.25;3,12;]" .. + get_bg(5,0.25,3,2,"closet_gui_closet_bg.png").. + "list[current_player;main;0,4.5;8,1;]" .. + "list[current_player;main;0,5.5;8,3;8]" .. + default.get_hotbar_bg(0,4.5) + return formspec +end + +-- Allow only "cloth" groups to put/move + +minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info) + local stack, from_inv, to_index + if action == "move" and inventory_info.to_list == "cloths" then + if inventory_info.from_list == inventory_info.to_list then --for moving inside the 'cloths' inventory + return 1 + end + --for moving items from player inventory list 'main' to 'cloths' + from_inv = "main" + to_index = inventory_info.to_index + stack = inventory:get_stack(inventory_info.from_list, inventory_info.from_index) + elseif action == "put" and inventory_info.listname == "cloths" then + --for moving from node inventory 'closet' to player inventory 'cloths' + from_inv = "closet" + to_index = inventory_info.index + stack = inventory_info.stack + else + return + end + if stack then + local stack_name = stack:get_name() + local item_group = minetest.get_item_group(stack_name , "cloth") + if item_group == 0 then --not a cloth + return 0 + end + --search for another cloth of the same type + local player_inv = player:get_inventory() + local cloth_list = player_inv:get_list("cloths") + for i = 1, #cloth_list do + local cloth_name = cloth_list[i]:get_name() + local cloth_type = minetest.get_item_group(cloth_name, "cloth") + if cloth_type == item_group then + if player_inv:get_stack("cloths", to_index):get_count() == 0 then --if put on an empty slot + if from_inv == "main" then + if player_inv:room_for_item("main", cloth_name) then + player_inv:remove_item("cloths", cloth_name) + player_inv:add_item("main", cloth_name) + return 1 + end + else --closet inventory + local closet_inv = minetest.get_inventory({ type="node", pos=get_context(player:get_player_name())}) + if closet_inv:room_for_item("closet", cloth_name) then + player_inv:remove_item("cloths", cloth_name) + closet_inv:add_item("closet", cloth_name) + return 1 + end + end + end + return 0 + end + end + return 1 + end + return 0 +end) + +minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info) + local update_cloths + if (action == "move" and inventory_info.to_list == "cloths") then + --for moving items from player inventory list 'main' to 'cloths' + if inventory_info.from_list == inventory_info.to_list then --for moving inside the 'cloths' inventory + update_cloths = false + else + update_cloths = true + end + elseif (action == "move" and inventory_info.to_list == "main" and inventory_info.from_list == "cloths") then + update_cloths = true + elseif (action == "put" or action == "take") and inventory_info.listname == "cloths" then + update_cloths = true + else + return + end + if update_cloths then + local player_name = player:get_player_name() + minetest.show_formspec(player_name, + "closet:container", closet.container.get_container_formspec(_contexts[player_name], player)) + end +end) + +function closet.container.container_lid_close(pn) + local container_open_info = closet.container.open_containers[pn] + local pos = container_open_info.pos + local sound = container_open_info.sound + local swap = container_open_info.swap + + closet.container.open_containers[pn] = nil + for k, v in pairs(closet.container.open_containers) do + if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then + return true + end + end + + local node = minetest.get_node(pos) + minetest.after(0.2, minetest.swap_node, pos, { name = "closet:" .. swap, + param2 = node.param2 }) + minetest.sound_play(sound, {gain = 0.3, pos = pos, max_hear_distance = 10}) +end + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if closet.container.open_containers[pn] then + closet.container.container_lid_close(pn) + end +end) + +function closet.container.container_lid_obstructed(pos, direction) + if direction == "above" then + pos = {x = pos.x, y = pos.y + 1, z = pos.z} + end + local def = minetest.registered_nodes[minetest.get_node(pos).name] + -- allow ladders, signs, wallmounted things and torches to not obstruct + if def and + (def.drawtype == "airlike" or + def.drawtype == "signlike" or + def.drawtype == "torchlike" or + (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then + return false + end + return true +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "closet:container" then + return + end + if not player or not fields.quit then + return + end + local pn = player:get_player_name() + + if not closet.container.open_containers[pn] then + return + end + + local cloth = player_api.compose_cloth(player) + local gender = player:get_meta():get_string("gender") + player_api.registered_models[player_api.get_gender_model(gender)].textures[1] = cloth + local player_name = player:get_player_name() + if minetest.get_modpath("3d_armor")~=nil then + armor.textures[player_name].skin = cloth + end + player_api.set_textures(player, player_api.registered_models[player_api.get_gender_model(gender)].textures) + + closet.container.container_lid_close(pn) + return true +end) + +function closet.register_container(name, d) + local def = table.copy(d) + def.drawtype = 'mesh' + def.use_texture_alpha = true + def.paramtype = "light" + def.paramtype2 = "facedir" + def.is_ground_content = false + + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", d.description) + local inv = meta:get_inventory() + inv:set_size("closet", 12*1) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("closet") + end + def.on_rightclick = function(pos, node, clicker) + minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos, max_hear_distance = 10}) + if not closet.container.container_lid_obstructed(pos, "above") then + minetest.swap_node(pos, { + name = "closet:" .. name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "closet:container", closet.container.get_container_formspec(pos, clicker)) + local player_name = clicker:get_player_name() + _contexts[player_name] = pos + closet.container.open_containers[player_name] = { pos = pos, sound = def.sound_close, swap = name } + end + def.on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "closet", drops) + drops[#drops+1] = "closet:" .. name + minetest.remove_node(pos) + return drops + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_opened.mesh = "closet_open.obj" + def_opened.tiles = {"closet_closet_open.png",} + def_opened.drop = "closet:" .. name + def_opened.groups.not_in_creative_inventory = 1 + def_opened.can_dig = function() + return false + end + def_opened.on_blast = function() end + + minetest.register_node("closet:" .. name, def_closed) + minetest.register_node("closet:" .. name .. "_open", def_opened) + +end diff --git a/mods/beauty_pack/vanity/init.lua b/mods/beauty_pack/vanity/init.lua new file mode 100644 index 0000000..7da1729 --- /dev/null +++ b/mods/beauty_pack/vanity/init.lua @@ -0,0 +1,18 @@ +-- +-- vanity +-- License:GPLv3 +-- + +local modname = "vanity" +local modpath = minetest.get_modpath(modname) +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- +-- Vanity Mod +-- + +vanity = {} + +-- Load the files +assert(loadfile(modpath .. "/vanity.lua"))(S) diff --git a/mods/beauty_pack/vanity/locale/vanity.es.tr b/mods/beauty_pack/vanity/locale/vanity.es.tr new file mode 100644 index 0000000..0b759f5 --- /dev/null +++ b/mods/beauty_pack/vanity/locale/vanity.es.tr @@ -0,0 +1,14 @@ +# textdomain: vanity +Vanity Table=Tocador +Close=Cerrar +Skin Tone=Tono de piel +Eyes Color=Color de ojos +Hair=Color +Color=de pelo +Dark-haired=Moreno +Gray-haired=Canoso +Light-Brown=Castaño claro +Brown=Castaño +Red-haired=Pelirrojo +Blonde=Rubio + diff --git a/mods/beauty_pack/vanity/mod.conf b/mods/beauty_pack/vanity/mod.conf new file mode 100644 index 0000000..a18657d --- /dev/null +++ b/mods/beauty_pack/vanity/mod.conf @@ -0,0 +1,3 @@ +name = vanity +description = A Vanity Set +depends = default, player_api, mirrors diff --git a/mods/beauty_pack/vanity/models/vanity_set.b3d b/mods/beauty_pack/vanity/models/vanity_set.b3d new file mode 100644 index 0000000..f52b595 Binary files /dev/null and b/mods/beauty_pack/vanity/models/vanity_set.b3d differ diff --git a/mods/beauty_pack/vanity/models/vanity_set.blend b/mods/beauty_pack/vanity/models/vanity_set.blend new file mode 100644 index 0000000..6c2e007 Binary files /dev/null and b/mods/beauty_pack/vanity/models/vanity_set.blend differ diff --git a/mods/beauty_pack/vanity/textures/player_black_skin.png b/mods/beauty_pack/vanity/textures/player_black_skin.png new file mode 100644 index 0000000..ac9d2a6 Binary files /dev/null and b/mods/beauty_pack/vanity/textures/player_black_skin.png differ diff --git a/mods/beauty_pack/vanity/textures/player_brown_skin.png b/mods/beauty_pack/vanity/textures/player_brown_skin.png new file mode 100644 index 0000000..1062032 Binary files /dev/null and b/mods/beauty_pack/vanity/textures/player_brown_skin.png differ diff --git a/mods/beauty_pack/vanity/textures/player_light_brown_skin.png b/mods/beauty_pack/vanity/textures/player_light_brown_skin.png new file mode 100644 index 0000000..c20ebb3 Binary files /dev/null and b/mods/beauty_pack/vanity/textures/player_light_brown_skin.png differ diff --git a/mods/beauty_pack/vanity/textures/player_normal_skin.png b/mods/beauty_pack/vanity/textures/player_normal_skin.png new file mode 100644 index 0000000..3bf1b12 Binary files /dev/null and b/mods/beauty_pack/vanity/textures/player_normal_skin.png differ diff --git a/mods/beauty_pack/vanity/textures/vanity_face_base.png b/mods/beauty_pack/vanity/textures/vanity_face_base.png new file mode 100644 index 0000000..767947f Binary files /dev/null and b/mods/beauty_pack/vanity/textures/vanity_face_base.png differ diff --git a/mods/beauty_pack/vanity/textures/vanity_vanity.png b/mods/beauty_pack/vanity/textures/vanity_vanity.png new file mode 100644 index 0000000..35e0238 Binary files /dev/null and b/mods/beauty_pack/vanity/textures/vanity_vanity.png differ diff --git a/mods/beauty_pack/vanity/vanity.lua b/mods/beauty_pack/vanity/vanity.lua new file mode 100644 index 0000000..911698b --- /dev/null +++ b/mods/beauty_pack/vanity/vanity.lua @@ -0,0 +1,147 @@ +local S = ... + +function vanity.get_vanity_formspec(clicker) + --5.4--local model = player_api.get_gender_model(gender) + + local face_preview = minetest.formspec_escape(player_api.compose_base_texture(clicker, { + canvas_size ="16x16", + skin_texture = "vanity_face_base.png", + eyebrowns_pos = "0,0", + eye_right_pos = "2,8", + eye_left_pos = "10,8", + mouth_pos = "0,12", + hair_preview = true, + hair_pos = "0,0", + })) + + local formspec = + "formspec_version[4]".. + "size[10,8.25]".. + "image[0.5,0.5;4,4;".. face_preview .."]".. + --Skins + "label[6,0.5;"..S("Skin Tone")..":]".. + "image_button[4.75,0.75;1,1;player_normal_skin.png;btn_normal_skin;]".. + "image_button[6,0.75;1,1;player_light_brown_skin.png;btn_light_brown_skin;]".. + "image_button[7.25,0.75;1,1;player_brown_skin.png;btn_brown_skin;]".. + "image_button[8.5,0.75;1,1;player_black_skin.png;btn_black_skin;]".. + --Eyes + "label[6,2.25;"..S("Eyes Color")..":]".. + "image_button[4.75,2.5;1,1;player_blue_eye.png;btn_blue_eye;]".. + "image_button[6,2.5;1,1;player_brown_eye.png;btn_brown_eye;]".. + "image_button[7.25,2.5;1,1;player_green_eye.png;btn_green_eye;]".. + "image_button[8.5,2.5;1,1;player_black_eye.png;btn_black_eye;]".. + "image_button[4.75,3.75;1,1;player_gray_eye.png;btn_gray_eye;]".. + "image_button[6,3.75;1,1;player_hazel_eye.png;btn_hazel_eye;]".. + "image_button[7.25,3.75;1,1;player_violet_eye.png;btn_violet_eye;]".. + "image_button[8.5,3.75;1,1;player_pink_eye.png;btn_pink_eye;]".. + --Hairs + "label[0.5,5.25;"..S("Hair").."\n"..S("Color")..":]".. + "tooltip[btn_black_hair;"..S("Dark-haired").."]".. + "style[btn_black_hair;bgcolor=black]".. + "image_button[2.25,5;1,1;;btn_black_hair;]".. + "tooltip[btn_gray_hair;"..S("Gray-haired").."]".. + "style[btn_gray_hair;bgcolor=lightgray]".. + "image_button[3.5,5;1,1;;btn_gray_hair;]".. + "tooltip[btn_light_brown_hair;"..S("Light-Brown").."]".. + "style[btn_light_brown_hair;bgcolor=sandybrown]".. + "image_button[4.75,5;1,1;;btn_light_brown_hair;]".. + "tooltip[btn_brown_hair;"..S("Brown").."]".. + "style[btn_brown_hair;bgcolor=sienna]".. + "image_button[6,5;1,1;;btn_brown_hair;]".. + "tooltip[btn_red_hair;"..S("Red-haired").."]".. + "style[btn_red_hair;bgcolor=orange]".. + "image_button[7.25,5;1,1;;btn_red_hair;]".. + "tooltip[btn_blonde_hair;"..S("Blonde").."]".. + "style[btn_blonde_hair;bgcolor=yellow]".. + "image_button[8.5,5;1,1;;btn_blonde_hair;]".. + "style_type[button_exit;bgcolor=#006699;textcolor=white]".. + "button_exit[4.75,6.5;1,1;btn_close;"..S("Close").."]" + return formspec +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "form:vanity" then + return + end + if not player or fields.quit then + return + end + local player_name = player:get_player_name() + local base_texture = player_api.get_base_texture_table(player) + if fields.btn_blue_eye then + base_texture["eye"] = "player_blue_eye.png" + elseif fields.btn_brown_eye then + base_texture["eye"] = "player_brown_eye.png" + elseif fields.btn_green_eye then + base_texture["eye"] = "player_green_eye.png" + elseif fields.btn_gray_eye then + base_texture["eye"] = "player_gray_eye.png" + elseif fields.btn_hazel_eye then + base_texture["eye"] = "player_hazel_eye.png" + elseif fields.btn_violet_eye then + base_texture["eye"] = "player_violet_eye.png" + elseif fields.btn_black_eye then + base_texture["eye"] = "player_black_eye.png" + elseif fields.btn_pink_eye then + base_texture["eye"] = "player_pink_eye.png" + elseif fields.btn_normal_skin then + base_texture["skin"].color = "normal" + elseif fields.btn_light_brown_skin then + base_texture["skin"].color = "light_brown" + elseif fields.btn_brown_skin then + base_texture["skin"].color = "brown" + elseif fields.btn_black_skin then + base_texture["skin"].color = "black" + elseif fields.btn_black_hair then + base_texture["hair"].color = "black" + base_texture["eyebrowns"].color = "gray" + elseif fields.btn_gray_hair then + base_texture["hair"].color = "gray" + base_texture["eyebrowns"].color = "gray" + elseif fields.btn_light_brown_hair then + base_texture["hair"].color = "light_brown" + base_texture["eyebrowns"].color = "light_brown" + elseif fields.btn_brown_hair then + base_texture["hair"].color = "brown" + base_texture["eyebrowns"].color = "brown" + elseif fields.btn_red_hair then + base_texture["hair"].color = "red" + base_texture["eyebrowns"].color = "red" + elseif fields.btn_blonde_hair then + base_texture["hair"].color = "blonde" + base_texture["eyebrowns"].color = "blonde" + end + player_api.set_base_texture(player, base_texture) + player_api.set_texture(player) + minetest.show_formspec(player_name, + "form:vanity", vanity.get_vanity_formspec(player)) + return true +end) + +-- Vanity Set + +minetest.register_node("vanity:vanity", { + description = S("Vanity Table"), + drawtype = "mesh", + mesh = "vanity_set.b3d", + tiles = {"vanity_vanity.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {cracky=3, wood=1}, + + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + local player_name = player:get_player_name() + minetest.show_formspec(player_name, + "form:vanity", vanity.get_vanity_formspec(player)) + end, +}) + +minetest.register_craft({ + output = "vanity:vanity", + type = "shaped", + recipe = { + {"", "", ""}, + {"", "group:mirror", ""}, + {"", "group:wood", ""}, + } +}) diff --git a/mods/bedrock2/COPYING b/mods/bedrock2/COPYING new file mode 100644 index 0000000..5a8e332 --- /dev/null +++ b/mods/bedrock2/COPYING @@ -0,0 +1,14 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + diff --git a/mods/bedrock2/README.md b/mods/bedrock2/README.md new file mode 100644 index 0000000..5309a58 --- /dev/null +++ b/mods/bedrock2/README.md @@ -0,0 +1,11 @@ +# Bedrock [`bedrock2`] + +Version 1.2.2 + +## Description +This mod adds an indestructible bedrock layer at the bottom of the world. + +## Configuration +This mod recognizes the following minetest.conf setting: + +* `bedrock2_y`: Sets the Y coordinate on which the bedrock layer will be created (default: -30912). diff --git a/mods/bedrock2/depends.txt b/mods/bedrock2/depends.txt new file mode 100644 index 0000000..59619ab --- /dev/null +++ b/mods/bedrock2/depends.txt @@ -0,0 +1 @@ +mesecons_mvps? diff --git a/mods/bedrock2/description.txt b/mods/bedrock2/description.txt new file mode 100644 index 0000000..0de789f --- /dev/null +++ b/mods/bedrock2/description.txt @@ -0,0 +1 @@ +Adds an indestructable bedrock layer at the bottom of the world. diff --git a/mods/bedrock2/init.lua b/mods/bedrock2/init.lua new file mode 100644 index 0000000..17f0dfd --- /dev/null +++ b/mods/bedrock2/init.lua @@ -0,0 +1,51 @@ +local S = minetest.get_translator("bedrock2") + +local bedrock = {} + +bedrock.layer = -30912 -- determined as appropriate by experiment +bedrock.node = {name = "bedrock2:bedrock"} + +local settings = Settings(minetest.get_modpath("bedrock2").."/settings.conf") +local depth = tonumber(settings:get("bedrock2_y")) +if depth ~= nil then + bedrock.layer = depth +end + +minetest.register_on_generated(function(minp, maxp) + if maxp.y >= bedrock.layer and minp.y <= bedrock.layer then + local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") + local data = vm:get_data() + local area = VoxelArea:new({MinEdge=emin, MaxEdge=emax}) + local c_bedrock = minetest.get_content_id("bedrock2:bedrock") + + for x = minp.x, maxp.x do + for z = minp.z, maxp.z do + local p_pos = area:index(x, bedrock.layer, z) + data[p_pos] = c_bedrock + end + end + + vm:set_data(data) + vm:calc_lighting() + vm:update_liquids() + vm:write_to_map() + end +end) + +minetest.register_node("bedrock2:bedrock", { + description = S("Bedrock"), + _doc_items_longdesc = S("Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer."), + tiles = {"bedrock2_bedrock.png"}, + groups = {immortal=1, not_in_creative_inventory=1, }, + sounds = { footstep = { name = "bedrock2_step", gain = 1 } }, + is_ground_content = false, + on_blast = function() end, + on_destruct = function () end, + can_dig = function() return false end, + diggable = false, + drop = "", +}) + +if minetest.get_modpath("mesecons_mvps") ~= nil then + mesecon.register_mvps_stopper("bedrock2:bedrock") +end diff --git a/mods/bedrock2/locale/bedrock2.de.tr b/mods/bedrock2/locale/bedrock2.de.tr new file mode 100644 index 0000000..e625f37 --- /dev/null +++ b/mods/bedrock2/locale/bedrock2.de.tr @@ -0,0 +1,3 @@ +# textdomain:bedrock2 +Bedrock=Grundgestein +Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.=Grundgestein ist sehr hart. Es kann nicht gegraben, verändert, zerstört oder bewegt werden. Es taucht am Boden der Welt in einer flachen Ebene auf. diff --git a/mods/bedrock2/locale/bedrock2.es.tr b/mods/bedrock2/locale/bedrock2.es.tr new file mode 100644 index 0000000..a8ce848 --- /dev/null +++ b/mods/bedrock2/locale/bedrock2.es.tr @@ -0,0 +1,3 @@ +# textdomain:bedrock2 +Bedrock=Lecho de roca +Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer.=El lecho de roca es un bloque muy duro. No puede ser minado, alterado, destruido o movido por ningún medio. Aparece en el fondo del mundo en una capa plana. diff --git a/mods/bedrock2/locale/template.txt b/mods/bedrock2/locale/template.txt new file mode 100644 index 0000000..555f804 --- /dev/null +++ b/mods/bedrock2/locale/template.txt @@ -0,0 +1,2 @@ +Bedrock +Bedrock is a very hard block. It cannot be mined, altered, destroyed or moved by any means. It appears at the bottom of the world in a flat layer. diff --git a/mods/bedrock2/mod.conf b/mods/bedrock2/mod.conf new file mode 100644 index 0000000..2223c7e --- /dev/null +++ b/mods/bedrock2/mod.conf @@ -0,0 +1 @@ +name = bedrock2 diff --git a/mods/bedrock2/screenshot.png b/mods/bedrock2/screenshot.png new file mode 100644 index 0000000..471d13e Binary files /dev/null and b/mods/bedrock2/screenshot.png differ diff --git a/mods/bedrock2/settings.conf b/mods/bedrock2/settings.conf new file mode 100644 index 0000000..0bdafcd --- /dev/null +++ b/mods/bedrock2/settings.conf @@ -0,0 +1,2 @@ +# Sets the height (Y) at which the bedrock layer will be created. +bedrock2_y = -513 diff --git a/mods/bedrock2/sounds/bedrock2_step.1.ogg b/mods/bedrock2/sounds/bedrock2_step.1.ogg new file mode 100644 index 0000000..2a2b900 Binary files /dev/null and b/mods/bedrock2/sounds/bedrock2_step.1.ogg differ diff --git a/mods/bedrock2/sounds/bedrock2_step.2.ogg b/mods/bedrock2/sounds/bedrock2_step.2.ogg new file mode 100644 index 0000000..e507853 Binary files /dev/null and b/mods/bedrock2/sounds/bedrock2_step.2.ogg differ diff --git a/mods/bedrock2/sounds/bedrock2_step.3.ogg b/mods/bedrock2/sounds/bedrock2_step.3.ogg new file mode 100644 index 0000000..1f31e8e Binary files /dev/null and b/mods/bedrock2/sounds/bedrock2_step.3.ogg differ diff --git a/mods/bedrock2/textures/bedrock2_bedrock.png b/mods/bedrock2/textures/bedrock2_bedrock.png new file mode 100644 index 0000000..2d29423 Binary files /dev/null and b/mods/bedrock2/textures/bedrock2_bedrock.png differ diff --git a/mods/bike/README.txt b/mods/bike/README.txt new file mode 100644 index 0000000..826d848 --- /dev/null +++ b/mods/bike/README.txt @@ -0,0 +1,15 @@ +Minetest mod: bike +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +Various Minetest developers and contributors (MIT) +GreenDimond (MIT) +Hume2 (MIT) + +Authors of media (textures and model) +------------------------------------- +Textures: GreenDimond (MIT) +Model: GreenDimond (MIT) diff --git a/mods/bike/depends.txt b/mods/bike/depends.txt new file mode 100644 index 0000000..8401bd9 --- /dev/null +++ b/mods/bike/depends.txt @@ -0,0 +1,2 @@ +default +dye \ No newline at end of file diff --git a/mods/bike/init.lua b/mods/bike/init.lua new file mode 100644 index 0000000..98902b6 --- /dev/null +++ b/mods/bike/init.lua @@ -0,0 +1,784 @@ +-- Translations +local S = minetest.get_translator(minetest.get_current_modname()) + +--[[ Helpers ]]-- + +-- Skin mod detection +local skin_mod + +local skin_mods = {"skinsdb", "skins", "u_skins", "simple_skins", "wardrobe"} + +for _, mod in pairs(skin_mods) do + local path = minetest.get_modpath(mod) + if path then + skin_mod = mod + end +end + +local function get_player_skin(player) + local name = player:get_player_name() + local armor_tex = "" + if minetest.global_exists("armor") then + -- Filter out helmet (for bike helmet) and boots/shield (to not mess up UV mapping) + local function filter(str, find) + for _,f in pairs(find) do + str = str:gsub("%^"..f.."_(.-.png)", "") + end + return str + end + armor_tex = filter("^"..armor.textures[name].armor, {"shields_shield", "3d_armor_boots", "3d_armor_helmet"}) + end + -- Return the skin with armor (if applicable) + if skin_mod == "skinsdb" then + return "[combine:64x32:0,0="..skins.get_player_skin(minetest.get_player_by_name(name))["_texture"]..armor_tex + elseif (skin_mod == "skins" or skin_mod == "simple_skins") and skins.skins[name] then + return skins.skins[name]..".png"..armor_tex + elseif skin_mod == "u_skins" and u_skins.u_skins[name] then + return u_skins.u_skins[name]..".png"..armor_tex + elseif skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then + return wardrobe.playerSkins[name]..armor_tex + end + local skin = player:get_properties().textures[1] + -- If we just have 3d_armor enabled make sure we get the player skin properly + if minetest.global_exists("armor") then + skin = armor:get_player_skin(name) + end + return skin..armor_tex +end + +-- Bike metal texture handling +local function is_hex(color) + return color:match("#%x%x%x%x%x%x") +end + +local function colormetal(color, alpha) + return "metal_base.png^[colorize:"..(color)..":"..tostring(alpha) +end + +-- Keep track of attached players (for leaveplayer) +local attached = {} + +-- Terrain checkers +local function is_water(pos) + local nn = minetest.get_node(pos).name + return minetest.get_item_group(nn, "liquid") ~= 0 +end + +local function is_bike_friendly(pos) + local nn = minetest.get_node(pos).name + return minetest.get_item_group(nn, "crumbly") == 0 or minetest.get_item_group(nn, "bike_friendly") ~= 0 +end + +-- Maths +local function get_sign(i) + if i == 0 then + return 0 + else + return i / math.abs(i) + end +end + +local function get_velocity(v, yaw, y) + local x = -math.sin(yaw) * v + local z = math.cos(yaw) * v + return {x = x, y = y, z = z} +end + +local function get_v(v) + return math.sqrt(v.x ^ 2 + v.z ^ 2) +end + +-- Custom hand +minetest.register_node("bike:hand", { + description = "", + -- No interaction on a bike :) + range = 0, + on_place = function(itemstack, placer, pointed_thing) + return ItemStack("bike:hand "..itemstack:get_count()) + end, + -- Copy default:hand looks so it doesnt look as weird when the hands are switched + wield_image = minetest.registered_items[""].wield_image, + wield_scale = minetest.registered_items[""].wield_scale, + node_placement_prediction = "", +}) + +--[[ Bike ]]-- + +-- Default textures (overidden when mounted or colored) +local function default_tex(metaltex, alpha) + return { + "metal_grey.png", + "gear.png", + colormetal(metaltex, alpha), + "leather.png", + "chain.png", + "metal_grey.png", + "leather.png", + "metal_black.png", + "metal_black.png", + "blank.png", + "tread.png", + "gear.png", + "spokes.png", + "tread.png", + "spokes.png", + } +end + +-- Entity +local bike = { + physical = true, + -- Warning: Do not change the position of the collisionbox top surface, + -- lowering it causes the bike to fall through the world if underwater + collisionbox = {-0.5, -0.4, -0.5, 0.5, 0.8, 0.5}, + collide_with_objects = false, + visual = "mesh", + mesh = "bike.b3d", + textures = default_tex("#FFFFFF", 150), + stepheight = 0.6, + driver = nil, + color = "#FFFFFF", + alpha = 150, + old_driver = {}, + v = 0, -- Current velocity + last_v = 0, -- Last velocity + max_v = 6.9, -- Max velocity + fast_v = 0, -- Fast adder + f_speed = 30, -- Frame speed + last_y = 0, -- Last height + up = false, -- Are we going up? + timer = 0, + removed = false +} + +-- Dismont the player +local function dismount_player(bike, exit) + bike.object:set_velocity({x = 0, y = 0, z = 0}) + -- Make the bike empty again + bike.object:set_properties({textures = default_tex(bike.color, bike.alpha)}) + bike.v = 0 + + if bike.driver then + attached[bike.driver:get_player_name()] = nil + bike.driver:set_detach() + -- Reset original player properties + bike.driver:set_properties({visual_size=bike.old_driver["vsize"]}) + bike.driver:set_eye_offset(bike.old_driver["eye_offset"].offset_first, bike.old_driver["eye_offset"].offset_third) + bike.driver:hud_set_flags(bike.old_driver["hud"]) + bike.driver:get_inventory():set_stack("hand", 1, bike.driver:get_inventory():get_stack("old_hand", 1)) + -- Is the player leaving? If so, dont do this stuff or Minetest will have a fit + if not exit then + local pos = bike.driver:get_pos() + pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} + bike.driver:set_pos(pos) + end + bike.driver = nil + end +end + +-- Mounting +function bike.on_rightclick(self, clicker) + if not clicker or not clicker:is_player() then + return + end + if not self.driver then + attached[clicker:get_player_name()] = true + -- Make integrated player appear + self.object:set_properties({ + textures = { + "metal_grey.png", + "gear.png", + colormetal(self.color, self.alpha), + "leather.png", + "chain.png", + "metal_grey.png", + "leather.png", + "metal_black.png", + "metal_black.png", + get_player_skin(clicker).."^helmet.png", + "tread.png", + "gear.png", + "spokes.png", + "tread.png", + "spokes.png", + }, + }) + -- Save the player's properties that we need to change + self.old_driver["vsize"] = clicker:get_properties().visual_size + self.old_driver["eye_offset"] = clicker:get_eye_offset() + self.old_driver["hud"] = clicker:hud_get_flags() + clicker:get_inventory():set_stack("old_hand", 1, clicker:get_inventory():get_stack("hand", 1)) + -- Change the hand + clicker:get_inventory():set_stack("hand", 1, "bike:hand") + local attach = clicker:get_attach() + if attach and attach:get_luaentity() then + local luaentity = attach:get_luaentity() + if luaentity.driver then + luaentity.driver = nil + end + clicker:set_detach() + end + self.driver = clicker + -- Set new properties and hide HUD + clicker:set_properties({visual_size = {x=0,y=0}}) + clicker:set_attach(self.object, "body", {x = 0, y = 10, z = 5}, {x = 0, y = 0, z = 0}) + clicker:set_eye_offset({x=0,y=-3,z=10},{x=0,y=0,z=5}) + clicker:hud_set_flags({ + hotbar = false, + wielditem = false, + }) + -- Look forward initially + clicker:set_look_horizontal(self.object:get_yaw()) + end +end + +function bike.on_activate(self, staticdata, dtime_s) + self.object:set_acceleration({x = 0, y = -9.8, z = 0}) + self.object:set_armor_groups({immortal = 1}) + if staticdata ~= "" then + local data = minetest.deserialize(staticdata) + if data ~= nil then + self.v = data.v + self.color = data.color + self.alpha = data.alpha + end + end + self.object:set_properties({textures=default_tex(self.color, self.alpha)}) + self.last_v = self.v +end + +-- Save velocity and color data for reload +function bike.get_staticdata(self) + local data = {v=self.v,color=self.color,alpha=self.alpha} + return minetest.serialize(data) +end + +-- Pick up/color +function bike.on_punch(self, puncher) + local itemstack = puncher:get_wielded_item() + -- Bike painting + if itemstack:get_name() == "bike:painter" then + -- No painting while someone is riding :P + if self.driver then + return + end + -- Get color data + local meta = itemstack:get_meta() + self.color = meta:get_string("paint_color") + self.alpha = meta:get_string("alpha") + self.object:set_properties({ + textures = { + "metal_grey.png", + "gear.png", + colormetal(self.color, self.alpha), + "leather.png", + "chain.png", + "metal_grey.png", + "leather.png", + "metal_black.png", + "metal_black.png", + "blank.png", + "tread.png", + "gear.png", + "spokes.png", + "tread.png", + "spokes.png", + }, + }) + return + end + if not puncher or not puncher:is_player() or self.removed then + return + end + -- Make sure no one is riding + if not self.driver then + local inv = puncher:get_inventory() + -- We can only carry one bike + if not inv:contains_item("main", "bike:bike") then + local stack = ItemStack({name="bike:bike", count=1, wear=0}) + local meta = stack:get_meta() + -- Set the stack to the bike color + meta:set_string("color", self.color) + meta:set_string("alpha", self.alpha) + local leftover = inv:add_item("main", stack) + -- If no room in inventory add the bike to the world + if not leftover:is_empty() then + minetest.add_item(self.object:get_pos(), leftover) + end + else + -- Turn it into raw materials + if not (creative and creative.is_enabled_for(puncher:get_player_name())) then + local ctrl = puncher:get_player_control() + if not ctrl.sneak then + minetest.chat_send_player(puncher:get_player_name(), "Warning: Destroying the bike gives you only some resources back. If you are sure, hold sneak while destroying the bike.") + return + end + local leftover = inv:add_item("main", "default:steel_ingot 6") + -- If no room in inventory add the iron to the world + if not leftover:is_empty() then + minetest.add_item(self.object:get_pos(), leftover) + end + end + end + self.removed = true + -- Delay remove to ensure player is detached + minetest.after(0.1, function() + self.object:remove() + end) + end +end + +-- Animations +local function bike_anim(self) + -- The `self.object:get_animation().y ~= ` is to check if the animation is already running + if self.driver then + local ctrl = self.driver:get_player_control() + -- Wheely + if ctrl.jump then + -- We are moving + if self.v > 0 then + if self.object:get_animation().y ~= 79 then + self.object:set_animation({x=59,y=79}, self.f_speed + self.fast_v, 0, true) + end + return + -- Else we are not + else + if self.object:get_animation().y ~= 59 then + self.object:set_animation({x=59,y=59}, self.f_speed + self.fast_v, 0, true) + end + return + end + end + -- Left or right tilt, but only if we arent doing a wheely + if ctrl.left then + if self.object:get_animation().y ~= 58 then + self.object:set_animation({x=39,y=58}, self.f_speed + self.fast_v, 0, true) + end + return + elseif ctrl.right then + if self.object:get_animation().y ~= 38 then + self.object:set_animation({x=19,y=38}, self.f_speed + self.fast_v, 0, true) + end + return + end + end + -- If none of that, then we are just moving forward + if self.v > 0 then + if self.object:get_animation().y ~= 18 then + self.object:set_animation({x=0,y=18}, 30, 0, true) + end + return + -- Or not + else + if self.object:get_animation().y ~= 0 then + self.object:set_animation({x=0,y=0}, 0, 0, false) + end + end +end + +-- Run every tick +function bike.on_step(self, dtime) + -- Player checks + if self.driver then + -- Is the actual player somehow still visible? + if self.driver:get_properties().visual_size ~= {x=0,y=0} then + self.driver:set_properties({visual_size = {x=0,y=0}}) + end + + -- Has the player left? + if not attached[self.driver:get_player_name()] then + dismount_player(self, true) + end + end + + -- Have we come to a sudden stop? + if math.abs(self.last_v - self.v) > 3 then + -- And is Minetest not being dumb + if not self.up then + self.v = 0 + -- If so, dismount + if self.driver then + dismount_player(self) + end + end + end + + self.last_v = self.v + + self.timer = self.timer + dtime; + if self.timer >= 0.5 then + -- Recording y values to check if we are going up + self.last_y = self.object:get_pos().y + self.timer = 0 + end + + -- Are we going up? + if self.last_y < self.object:get_pos().y then + self.up = true + else + self.up = false + end + + -- Run animations + bike_anim(self) + + -- Are we falling? + if self.object:get_velocity().y < -10 and self.driver ~= nil then + -- If so, dismount + dismount_player(self) + return + end + + local current_v = get_v(self.object:get_velocity()) * get_sign(self.v) + self.v = (current_v + self.v*3) / 4 + if self.driver then + local ctrl = self.driver:get_player_control() + local yaw = self.object:get_yaw() + local agility = 0 + + -- Sneak dismount + if ctrl.sneak then + dismount_player(self) + end + + if self.v > 0.4 then + agility = 1/math.sqrt(self.v) + else + agility = 1.58 + end + + -- Forward + if ctrl.up then + -- Are we going fast? + if ctrl.aux1 then + if self.fast_v ~= 5 then + self.fast_v = 5 + end + else + if self.fast_v > 0 then + self.fast_v = self.fast_v - 0.05 * agility + end + end + self.v = self.v + 0.2 + (self.fast_v*0.1) * agility + -- Brakes + elseif ctrl.down then + self.v = self.v - 0.5 * agility + if self.fast_v > 0 then + self.fast_v = self.fast_v - 0.05 * agility + end + -- Nothin' + else + self.v = self.v - 0.05 * agility + if self.fast_v > 0 then + self.fast_v = self.fast_v - 0.05 * agility + end + end + + -- Wheely will change turning speed + local turn_speed = 1 + + -- Are we doing a wheely? + if ctrl.jump then + turn_speed = 2 + else + turn_speed = 1 + end + + -- Turning + if ctrl.left then + self.object:set_yaw(yaw + (turn_speed + dtime) * 0.06 * agility) + elseif ctrl.right then + self.object:set_yaw(yaw - (turn_speed + dtime) * 0.06 * agility) + end + end + -- Movement + local velo = self.object:get_velocity() + if self.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then + self.object:move_to(self.object:get_pos()) + return + end + local s = get_sign(self.v) + if s ~= get_sign(self.v) then + self.object:set_velocity({x = 0, y = 0, z = 0}) + self.v = 0 + return + end + if self.v > self.max_v + self.fast_v then + self.v = self.max_v + self.fast_v + elseif self.v < 0 then + self.v = 0 + end + + local p = self.object:get_pos() + if is_water(p) then + self.v = self.v / 1.3 + end + + -- Can we ride good here? + if not is_bike_friendly({x=p.x, y=p.y + self.collisionbox[2] - 0.05, z=p.z}) then + self.v = self.v / 1.05 + end + + local new_velo + new_velo = get_velocity(self.v, self.object:get_yaw(), self.object:get_velocity().y) + self.object:move_to(self.object:get_pos()) + self.object:set_velocity(new_velo) +end + +-- Check for stray bike hand +minetest.register_on_joinplayer(function(player) + local inv = player:get_inventory() + if inv:get_stack("hand", 1):get_name() == "bike:hand" then + inv:set_stack("hand", 1, inv:get_stack("old_hand", 1)) + end +end) + +-- Player is leaving (doesn't matter if they are on a bike or not) +minetest.register_on_leaveplayer(function(player) + attached[player:get_player_name()] = nil +end) + +-- Dismount all players on server shutdown +minetest.register_on_shutdown(function() + for _, e in pairs(minetest.luaentities) do + if (e.name =="bike:bike") and (e.driver ~= nil) then + dismount_player(e, true) + end + end +end) + +-- Automatically dismount corpses +minetest.register_on_dieplayer(function(player) + attached[player:get_player_name()] = nil +end) + +-- Register the entity +minetest.register_entity("bike:bike", bike) + +-- Bike craftitem +minetest.register_craftitem("bike:bike", { + description = S("Bike"), + inventory_image = "bike_inventory.png", + wield_scale = {x = 3, y = 3, z = 2}, + groups = {flammable = 2}, + stack_max = 1, + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + if pointed_thing.type ~= "node" then + return itemstack + end + + -- Place bike with saved color + local meta = itemstack:get_meta() + local color = meta:get_string("color") + local alpha = tonumber(meta:get_string("alpha")) + + -- If it's a new bike, give it default colors + if alpha == nil then + color, alpha = "#FFFFFF", 150 + end + + bike_pos = placer:get_pos() + bike_pos.y = bike_pos.y + 0.5 + -- Use the saved color data and place the bike + bike = minetest.add_entity(bike_pos, "bike:bike", minetest.serialize({v=0,color=color,alpha=alpha})) + + -- Point it the right direction + if bike then + if placer then + bike:set_yaw(placer:get_look_horizontal()) + end + local player_name = placer and placer:get_player_name() or "" + if not (creative and creative.is_enabled_for and + creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + end + return itemstack + end, +}) + +--[[ Painter ]]-- + +-- Helpers +local function rgb_to_hex(r, g, b) + return string.format("#%02X%02X%02X", r, g, b) +end + +local function hex_to_rgb(hex) + hex = hex:gsub("#","") + local rgb = { + r = tonumber("0x"..hex:sub(1,2)), + g = tonumber("0x"..hex:sub(3,4)), + b = tonumber("0x"..hex:sub(5,6)), + } + return rgb +end + +-- Need to convert between 1000 units and 256 +local function from_slider_rgb(value) + value = tonumber(value) + return math.floor((255/1000*value)+0.5) +end + +-- ...and back +local function to_slider_rgb(value) + return 1000/255*value +end + +-- Painter formspec +local function show_painter_form(itemstack, player) + local meta = itemstack:get_meta() + local color = meta:get_string("paint_color") + local alpha = tonumber(meta:get_string("alpha")) + if alpha == nil then + color, alpha = "#FFFFFF", 128 + end + local rgba = hex_to_rgb(color) + rgba.a = alpha + minetest.show_formspec(player:get_player_name(), "bike:painter", + -- Init formspec + "size[6,6;true]".. + "position[0.5, 0.45]".. + -- Hex/Alpha fields + "button[1.6,5.5;2,1;set;Set paint color]".. + "field[0.9,5;2,0.8;hex;Hex Color;"..color.."]".. + "field[2.9,5;2,0.8;alpha;Alpha (0-255);"..tostring(alpha).."]".. + -- RGBA sliders + "scrollbar[0,2;5,0.3;horizontal;r;"..tostring(to_slider_rgb(rgba.r)).."]".. + "label[5.1,1.9;R: "..tostring(rgba.r).."]".. + "scrollbar[0,2.6;5,0.3;horizontal;g;"..tostring(to_slider_rgb(rgba.g)).."]".. + "label[5.1,2.5;G: "..tostring(rgba.g).."]".. + "scrollbar[0,3.2;5,0.3;horizontal;b;"..tostring(to_slider_rgb(rgba.b)).."]".. + "label[5.1,3.1;B: "..tostring(rgba.b).."]".. + "scrollbar[0,3.8;5,0.3;horizontal;a;"..tostring(to_slider_rgb(rgba.a)).."]".. + "label[5.1,3.7;A: "..tostring(rgba.a).."]".. + -- Preview + "label[1,0;Preview:]".. + "image[2,0;2,2;metal_base.png^[colorize:"..color..":"..tostring(rgba.a).."]" + ) +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname == "bike:painter" then + local itemstack = player:get_wielded_item() + if fields.set then + if itemstack:get_name() == "bike:painter" then + local meta = itemstack:get_meta() + local hex = fields.hex + local alpha = tonumber(fields.alpha) + if is_hex(hex) == nil then + hex = "#FFFFFF" + end + if alpha < 0 or alpha > 255 then + alpha = 128 + end + -- Save color data to painter (rgba sliders will adjust to hex/alpha too!) + meta:set_string("paint_color", hex) + meta:set_string("alpha", tostring(alpha)) + meta:set_string("description", S("Bike Painter").." ("..hex:upper()..", A: "..tostring(alpha)..")") + player:set_wielded_item(itemstack) + show_painter_form(itemstack, player) + return + end + end + if fields.r or fields.g or fields.b or fields.a then + if itemstack:get_name() == "bike:painter" then + -- Save on slider adjustment (hex/alpha will adjust to match the rgba!) + local meta = itemstack:get_meta() + local function sval(value) + return from_slider_rgb(value:gsub(".*:", "")) + end + meta:set_string("paint_color", rgb_to_hex(sval(fields.r),sval(fields.g),sval(fields.b))) + meta:set_string("alpha", sval(fields.a)) + -- Keep track of what this painter is painting + meta:set_string("description", S("Bike Painter").." ("..meta:get_string("paint_color"):upper()..", A: "..meta:get_string("alpha")..")") + player:set_wielded_item(itemstack) + show_painter_form(itemstack, player) + end + end + end +end) + +-- Make the actual thingy +minetest.register_tool("bike:painter", { + description = S("Bike Painter"), + inventory_image = "bike_painter.png", + wield_scale = {x = 2, y = 2, z = 1}, + on_place = show_painter_form, + on_secondary_use = show_painter_form, +}) + +--[[ Crafts ]]-- + +minetest.register_craftitem("bike:wheel", { + description = S("Bike Wheel"), + inventory_image = "bike_wheel.png", +}) + +minetest.register_craftitem("bike:handles", { + description = S("Bike Handles"), + inventory_image = "bike_handles.png", +}) + +-- To rubber, or not to rubber. That is the question. +local rubber + +if minetest.get_modpath("technic") ~= nil then + rubber = "technic:rubber" +else + rubber = "group:wood" +end + +minetest.register_craft({ + output = "bike:wheel 2", + recipe = { + {"", rubber, ""}, + {rubber, "default:steel_ingot", rubber}, + {"", rubber, ""}, + }, +}) + +minetest.register_craft({ + output = "bike:handles", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {rubber, "", rubber}, + }, +}) + +minetest.register_craft({ + output = "bike:bike", + recipe = { + {"bike:handles", "", rubber}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"bike:wheel", "", "bike:wheel"}, + }, +}) + +-- Because not everyone likes vessels +local container + +if minetest.get_modpath("vessels") ~= nil then + container = "vessels:glass_bottle" +else + container = "default:glass" +end + +minetest.register_craft({ + output = "bike:painter", + recipe = { + {"", container, ""}, + {"default:steel_ingot", "dye:red", "dye:green"}, + {"", rubber, "dye:blue"}, + }, +}) diff --git a/mods/bike/license.txt b/mods/bike/license.txt new file mode 100644 index 0000000..3e09557 --- /dev/null +++ b/mods/bike/license.txt @@ -0,0 +1,27 @@ +License +------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2012-2016 Various Minetest developers and contributors +Copyright (C) 2018 GreenDimond +Copyright (C) 2018 Hume2 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/bike/locale/bike.es.tr b/mods/bike/locale/bike.es.tr new file mode 100644 index 0000000..0014850 --- /dev/null +++ b/mods/bike/locale/bike.es.tr @@ -0,0 +1,5 @@ +# textdomain: bike +Bike=Bici +Bike Handles=Manillar bici +Bike Painter=Pintador de bici +Bike Wheel=Rueda bici \ No newline at end of file diff --git a/mods/bike/mod.conf b/mods/bike/mod.conf new file mode 100644 index 0000000..0ecf2a5 --- /dev/null +++ b/mods/bike/mod.conf @@ -0,0 +1,4 @@ +author = Hume2 +description = Adds a rideable bike with animations and extensive colors. +title = Bike +name = bike diff --git a/mods/bike/models/bike.b3d b/mods/bike/models/bike.b3d new file mode 100644 index 0000000..6ab69cb Binary files /dev/null and b/mods/bike/models/bike.b3d differ diff --git a/mods/bike/models/bike.blend b/mods/bike/models/bike.blend new file mode 100644 index 0000000..f8ba5a0 Binary files /dev/null and b/mods/bike/models/bike.blend differ diff --git a/mods/bike/textures/bike_handles.png b/mods/bike/textures/bike_handles.png new file mode 100644 index 0000000..2653607 Binary files /dev/null and b/mods/bike/textures/bike_handles.png differ diff --git a/mods/bike/textures/bike_inventory.png b/mods/bike/textures/bike_inventory.png new file mode 100644 index 0000000..ff7acfa Binary files /dev/null and b/mods/bike/textures/bike_inventory.png differ diff --git a/mods/bike/textures/bike_painter.png b/mods/bike/textures/bike_painter.png new file mode 100644 index 0000000..f9653df Binary files /dev/null and b/mods/bike/textures/bike_painter.png differ diff --git a/mods/bike/textures/bike_wheel.png b/mods/bike/textures/bike_wheel.png new file mode 100644 index 0000000..eced787 Binary files /dev/null and b/mods/bike/textures/bike_wheel.png differ diff --git a/mods/bike/textures/blank.png b/mods/bike/textures/blank.png new file mode 100644 index 0000000..26ea0a4 Binary files /dev/null and b/mods/bike/textures/blank.png differ diff --git a/mods/bike/textures/chain.png b/mods/bike/textures/chain.png new file mode 100644 index 0000000..fbc0667 Binary files /dev/null and b/mods/bike/textures/chain.png differ diff --git a/mods/bike/textures/gear.png b/mods/bike/textures/gear.png new file mode 100644 index 0000000..762a327 Binary files /dev/null and b/mods/bike/textures/gear.png differ diff --git a/mods/bike/textures/helmet.png b/mods/bike/textures/helmet.png new file mode 100644 index 0000000..b05f2eb Binary files /dev/null and b/mods/bike/textures/helmet.png differ diff --git a/mods/bike/textures/leather.png b/mods/bike/textures/leather.png new file mode 100644 index 0000000..38217bd Binary files /dev/null and b/mods/bike/textures/leather.png differ diff --git a/mods/bike/textures/metal_base.png b/mods/bike/textures/metal_base.png new file mode 100644 index 0000000..c41306c Binary files /dev/null and b/mods/bike/textures/metal_base.png differ diff --git a/mods/bike/textures/metal_black.png b/mods/bike/textures/metal_black.png new file mode 100644 index 0000000..0c47d2e Binary files /dev/null and b/mods/bike/textures/metal_black.png differ diff --git a/mods/bike/textures/metal_grey.png b/mods/bike/textures/metal_grey.png new file mode 100644 index 0000000..732f87b Binary files /dev/null and b/mods/bike/textures/metal_grey.png differ diff --git a/mods/bike/textures/spokes.png b/mods/bike/textures/spokes.png new file mode 100644 index 0000000..3da4555 Binary files /dev/null and b/mods/bike/textures/spokes.png differ diff --git a/mods/bike/textures/spokes.xcf b/mods/bike/textures/spokes.xcf new file mode 100644 index 0000000..ccf0690 Binary files /dev/null and b/mods/bike/textures/spokes.xcf differ diff --git a/mods/bike/textures/tread.png b/mods/bike/textures/tread.png new file mode 100644 index 0000000..831ee3d Binary files /dev/null and b/mods/bike/textures/tread.png differ diff --git a/mods/bike/textures/tread2.png b/mods/bike/textures/tread2.png new file mode 100644 index 0000000..244e528 Binary files /dev/null and b/mods/bike/textures/tread2.png differ diff --git a/mods/blossom_hedges/README.md b/mods/blossom_hedges/README.md new file mode 100644 index 0000000..bc113a4 --- /dev/null +++ b/mods/blossom_hedges/README.md @@ -0,0 +1,8 @@ +# Blossom Hedges + +Beautiful hedges made from flowers + +## Licenses + +- Code: GPL v3.0 +- Textures: CC BY-SA 4.0 diff --git a/mods/blossom_hedges/init.lua b/mods/blossom_hedges/init.lua new file mode 100644 index 0000000..6baa564 --- /dev/null +++ b/mods/blossom_hedges/init.lua @@ -0,0 +1,69 @@ +-- Blossom Hedges + +local S = minetest.get_translator(minetest.get_current_modname()) + +local hedges = { + { + "white_blue", + S("White & Blue"), + {"flowers:dandelion_white", "flowers:geranium"} + }, + { + "violet_blue", + S("Violet & Blue"), + {"flowers:viola", "flowers:geranium"} + }, + { + "red_pink", + S("Red & Pink"), + {"default:rose_bush", "flowers:geranium"} + }, + { + "yellow_orange", + S("Yellow & Orange"), + {"flowers:dandelion_yellow", "flowers:gerbera_daisy"} + } +} + +local function add_hedge(name, desc, recipe_items) + + local node_name = "blossom_hedges:" .. name.."".."hedge" + + local drop_items = recipe_items + + recipe_items[#recipe_items+1] = "group:leaves" + + minetest.register_node(node_name, { + description = S("@1 Hedge", desc), + drawtype = "allfaces_optional", + tiles = {"flowers_" .. name .. "_hedge" .. ".png"}, + wield_image = "flowers_" .. name .. "_hedge" .. ".png", + sunlight_propagates = true, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, flammable = 2, flower = 1, flora = 1}, + sounds = default.node_sound_leaves_defaults(), + drop = { + max_items = 1, + items = { + { + items = drop_items, + rarity = 1, + inherit_color = true, + } + } + } + }) + + minetest.register_craft({ + output = node_name, + type = "shapeless", + recipe = recipe_items, + }) + +end + +for _,item in pairs(hedges) do + add_hedge(unpack(item)) +end + diff --git a/mods/blossom_hedges/locale/blossom_hedges.es.tr b/mods/blossom_hedges/locale/blossom_hedges.es.tr new file mode 100644 index 0000000..c53c9d5 --- /dev/null +++ b/mods/blossom_hedges/locale/blossom_hedges.es.tr @@ -0,0 +1,7 @@ +# textdomain: blossom_hedges +@1 Hedge=Seto @1 +White & Blue=blanquiazul +Violet & Blue=violeta azulado +Yellow & Orange=amarillo anaranjado +Red & Pink=rojo rosáceo + diff --git a/mods/blossom_hedges/mod.conf b/mods/blossom_hedges/mod.conf new file mode 100644 index 0000000..b0604c9 --- /dev/null +++ b/mods/blossom_hedges/mod.conf @@ -0,0 +1,3 @@ +name = blossom_hedges +description = Beautiful hedges made from flowers +depends = flowers diff --git a/mods/blossom_hedges/textures/flowers_red_pink_hedge.png b/mods/blossom_hedges/textures/flowers_red_pink_hedge.png new file mode 100644 index 0000000..af27c36 Binary files /dev/null and b/mods/blossom_hedges/textures/flowers_red_pink_hedge.png differ diff --git a/mods/blossom_hedges/textures/flowers_violet_blue_hedge.png b/mods/blossom_hedges/textures/flowers_violet_blue_hedge.png new file mode 100644 index 0000000..17ba119 Binary files /dev/null and b/mods/blossom_hedges/textures/flowers_violet_blue_hedge.png differ diff --git a/mods/blossom_hedges/textures/flowers_white_blue_hedge.png b/mods/blossom_hedges/textures/flowers_white_blue_hedge.png new file mode 100644 index 0000000..00d42f2 Binary files /dev/null and b/mods/blossom_hedges/textures/flowers_white_blue_hedge.png differ diff --git a/mods/blossom_hedges/textures/flowers_yellow_orange_hedge.png b/mods/blossom_hedges/textures/flowers_yellow_orange_hedge.png new file mode 100644 index 0000000..f1619c9 Binary files /dev/null and b/mods/blossom_hedges/textures/flowers_yellow_orange_hedge.png differ diff --git a/mods/bonemeal/README.md b/mods/bonemeal/README.md new file mode 100644 index 0000000..e3ed954 --- /dev/null +++ b/mods/bonemeal/README.md @@ -0,0 +1,36 @@ +Bonemeal mod [bonemeal] + +This mod adds four new items into the game, bones which can be dug from normal +dirt which can be made into bonemeal, mulch which is is crafted using a tree and +8x leaves, and fertiliser which is a mixture of them both. + +Each item can be used on saplings and crops for a chance to grow them quicker as +well as dirt which will generate random grass, flowers or whichever decoration +is registered. + +Mulch has a strength of 1, Bonemeal 2 and Fertiliser 3 which means the stronger +the item, the more chance of growing saplings in low light, making crops sprout +quicker or simply decorate a larger area with grass and flowers. + +The api.txt document shows how to add your own saplings, crops and grasses to +the list by using one of the 3 commands included and the mod.lua file gives you +many examples by using some of the popular mods available. + +https://forum.minetest.net/viewtopic.php?f=9&t=16446 + +Changelog: + +- 0.1 - Initial release +- 0.2 - Added global on_use function for bonemeal growth +- 0.3 - Added strength to on_use global for new items (mulch and fertiliser) +- 0.4 - Added Intllib support and fr.txt file +- 0.5 - Added support for default bush and acacia bush saplings +- 0.6 - Using newer functions, Minetest 0.4.16 and above needed to run +- 0.7 - Can be used on papyrus and cactus now, added coral recipe, api addition +- 0.8 - Added support for farming redo's new garlic, pepper and onion crops +- 0.9 - Added support for farming redo's pea and beetroot crops, checks for place_param +- 1.0 - add_deco() now adds to existing item list while set_deco() replaces item list (thanks h-v-smacker) +- 1.1 - Added {can_bonemeal=1} group for special nodes +- 1.2 - Added support for minetest 5.0 cactus seedling, blueberry bush sapling and emergent jungle tree saplings, additional flowers and pine bush sapling. + +Lucky Blocks: 6 diff --git a/mods/bonemeal/api.txt b/mods/bonemeal/api.txt new file mode 100644 index 0000000..47b631d --- /dev/null +++ b/mods/bonemeal/api.txt @@ -0,0 +1,96 @@ + +Bonemeal API +============ + +This guide will show you how to add saplings, crops and dirt types for the +bonemeal mod to use from withhin your own mods. Please make sure that bonemeal +appears in the depends.txt file of your mod so everything work properly. + + +Function Usage +============== + + +Adding Crops +------------ + +bonemeal:add_crop({ + { nodename_start, growing_steps, seed_name } +}) + +This command is used to add new crops for bonemeal to work on. + +e.g. + +bonemeal:add_crop({ + {"farming:cotton_", 8, "farming:seed_cotton"}, + {"farming:wheat_", 8, "farming:seed_wheat"}, +}) + + +Adding Saplings +--------------- + +bonemeal:add_sapling({ + { sapling_node, function, soil_type[sand, dirt, nodename] } +}) + +This command will add new saplings for bonemeal to grow on sand, soil or a +specified node type. + +bonemeal:add_sapling({ + {"ethereal:palm_sapling", ethereal.grow_palm_tree, "soil"}, + {"ethereal:palm_sapling", ethereal.grow_palm_tree, "sand"}, +}) + + +Adding Dirt Decoration +---------------------- + +bonemeal:add_deco({ + { dirt_node, {grass_node_list}, {decor_node_list} } +}) + +This command will add grass and decoration to specific dirt types, use "" to +add an empty node. If some decorations have been already defined for this dirt type, new +will be added to the respective list. All empty ("") entries will be added regardless, +which allows to decrease the frequency of decoration emergence, if needed. + +e.g. + +bonemeal:add_deco({ + {"default:dirt_with_dry_grass", {"default:dry_grass_1", ""}, + {"flowers:rose", "flowers:viola"} } +}) + +Thus, add_deco() always adds (to) a definition, and never overrides. To discard an existing +definiton in favor of the new one, use + +bonemeal:set_deco({ + { dirt_node, {grass_node_list}, {decor_node_list} } +}) + +This command will set decoration for a given dirt type, fully replacing any existing definition. + + +Global ON_USE Function +---------------------- + +bonemeal:on_use(pos, strength, node) + +This function can be called from other mods to grow plants using alternative +bonemeal items and have the same effect. + + {pos} is the location to apply growing + {strength} is how strong to grow [low of 1 to high of 4] + {node} is the node at pos, but can be left nil to get_node itself + +Note: Higher strength items require lower light levels, and a strength of 4 +needs no light at all. + + +Final Words +=========== + +I hope this guide helps you add your own plants so you can grow them quickly +with the items included. Please check the mods.lua for more examples. diff --git a/mods/bonemeal/depends.txt b/mods/bonemeal/depends.txt new file mode 100644 index 0000000..ecc66d1 --- /dev/null +++ b/mods/bonemeal/depends.txt @@ -0,0 +1,8 @@ +default +intllib? +farming? +ethereal? +moretrees? +technic_worldgen? +lucky_block? +flowers? diff --git a/mods/bonemeal/description.txt b/mods/bonemeal/description.txt new file mode 100644 index 0000000..f85f0a2 --- /dev/null +++ b/mods/bonemeal/description.txt @@ -0,0 +1 @@ +Adds bone and bonemeal giving the ability to quickly grow plants and saplings. \ No newline at end of file diff --git a/mods/bonemeal/init.lua b/mods/bonemeal/init.lua new file mode 100644 index 0000000..f1422b2 --- /dev/null +++ b/mods/bonemeal/init.lua @@ -0,0 +1,637 @@ + +bonemeal = {} + +local S = minetest.get_translator(minetest.get_current_modname()) + +-- creative check +local creative_mode_cache = minetest.settings:get_bool("creative_mode") +function is_creative(name) + return creative_mode_cache or minetest.check_player_privs(name, {creative = true}) +end + + +-- default crops +local crops = { + {"farming:cotton_", 8, "farming:seed_cotton"}, + {"farming:wheat_", 8, "farming:seed_wheat"}, +} + + +-- special pine check for nearby snow +local function pine_grow(pos) + + if minetest.find_node_near(pos, 1, + {"default:snow", "default:snowblock", "default:dirt_with_snow"}) then + + default.grow_new_snowy_pine_tree(pos) + else + default.grow_new_pine_tree(pos) + end +end + + +-- default saplings +local saplings = { + {"default:sapling", default.grow_new_apple_tree, "soil"}, + {"default:junglesapling", default.grow_new_jungle_tree, "soil"}, + {"default:emergent_jungle_sapling", default.grow_new_emergent_jungle_tree, "soil"}, + {"default:acacia_sapling", default.grow_new_acacia_tree, "soil"}, + {"default:aspen_sapling", default.grow_new_aspen_tree, "soil"}, + {"default:pine_sapling", pine_grow, "soil"}, + {"default:bush_sapling", default.grow_bush, "soil"}, + {"default:acacia_bush_sapling", default.grow_acacia_bush, "soil"}, + {"default:large_cactus_seedling", default.grow_large_cactus, "sand"}, + {"default:blueberry_bush_sapling", default.grow_blueberry_bush, "soil"}, + {"default:pine_bush_sapling", default.grow_pine_bush, "soil"}, +} + +-- helper tables ( "" denotes a blank item ) +local green_grass = { + "default:grass_2", "default:grass_3", "default:grass_4", + "default:grass_5", "", "" +} + +local dry_grass = { + "default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4", + "default:dry_grass_5", "", "" +} + +local flowers = { + "flowers:dandelion_white", "flowers:dandelion_yellow", "flowers:geranium", + "flowers:rose", "flowers:tulip", "flowers:viola", "" +} + +-- 5.0 flower check +if minetest.registered_nodes["flowers:tulip_black"] then + flowers[#flowers + 1] = "flowers:tulip_black" + flowers[#flowers + 1] = "flowers:chrysanthemum_green" +end + +-- add additional bakedclay flowers if enabled +if minetest.get_modpath("bakedclay") then + flowers[#flowers + 1] = "bakedclay:delphinium" + flowers[#flowers + 1] = "bakedclay:thistle" + flowers[#flowers + 1] = "bakedclay:lazarus" + flowers[#flowers + 1] = "bakedclay:mannagrass" + flowers[#flowers + 1] = "" +end + +-- default biomes deco +local deco = { + {"default:dirt_with_dry_grass", dry_grass, flowers}, + {"default:sand", {}, {"default:dry_shrub", "", "", ""} }, + {"default:desert_sand", {}, {"default:dry_shrub", "", "", ""} }, + {"default:silver_sand", {}, {"default:dry_shrub", "", "", ""} }, +} + + +----- local functions + + +-- particles +local function particle_effect(pos) + + minetest.add_particlespawner({ + amount = 4, + time = 0.15, + minpos = pos, + maxpos = pos, + minvel = {x = -1, y = 2, z = -1}, + maxvel = {x = 1, y = 4, z = 1}, + minacc = {x = -1, y = -1, z = -1}, + maxacc = {x = 1, y = 1, z = 1}, + minexptime = 1, + maxexptime = 1, + minsize = 1, + maxsize = 3, + texture = "bonemeal_particle.png", + }) +end + + +-- tree type check +local function grow_tree(pos, object) + + if type(object) == "table" and object.axiom then + -- grow L-system tree + minetest.remove_node(pos) + minetest.spawn_tree(pos, object) + + elseif type(object) == "string" and minetest.registered_nodes[object] then + -- place node + minetest.set_node(pos, {name = object}) + + elseif type(object) == "function" then + -- function + object(pos) + end +end + + +-- sapling check +local function check_sapling(pos, nodename) + + -- what is sapling placed on? + local under = minetest.get_node({ + x = pos.x, + y = pos.y - 1, + z = pos.z + }) + + local can_grow, grow_on + + -- check list for sapling and function + for n = 1, #saplings do + + if saplings[n][1] == nodename then + + grow_on = saplings[n][3] + + -- sapling grows on top of specific node + if grow_on + and grow_on ~= "soil" + and grow_on ~= "sand" + and grow_on == under.name then + can_grow = true + end + + -- sapling grows on top of soil (default) + if can_grow == nil + and (grow_on == nil or grow_on == "soil") + and minetest.get_item_group(under.name, "soil") > 0 then + can_grow = true + end + + -- sapling grows on top of sand + if can_grow == nil + and grow_on == "sand" + and minetest.get_item_group(under.name, "sand") > 0 then + can_grow = true + end + + -- check if we can grow sapling + if can_grow then + particle_effect(pos) + grow_tree(pos, saplings[n][2]) + return + end + end + end +end + + +-- crops check +local function check_crops(pos, nodename, strength) + + local mod, crop, stage, nod, def + + -- grow registered crops + for n = 1, #crops do + + if string.find(nodename, crops[n][1]) + or nodename == crops[n][3] then + + -- separate mod and node name + mod = nodename:split(":")[1] .. ":" + crop = nodename:split(":")[2] + + -- get stage number or set to 0 for seed + stage = tonumber( crop:split("_")[2] ) or 0 + stage = math.min(stage + strength, crops[n][2]) + + -- check for place_param setting + nod = crops[n][1] .. stage + def = minetest.registered_nodes[nod] + def = def and def.place_param2 or 0 + + minetest.set_node(pos, {name = nod, param2 = def}) + + particle_effect(pos) + + return + end + end +end + + +-- check soil for specific decoration placement +local function check_soil(pos, nodename, strength) + + -- set radius according to strength + local side = strength - 1 + local tall = math.max(strength - 2, 0) + local floor + local groups = minetest.registered_items[nodename] + and minetest.registered_items[nodename].groups or {} + + -- only place decoration on one type of surface + if groups.soil then + floor = {"group:soil"} + elseif groups.sand then + floor = {"group:sand"} + else + floor = {nodename} + end + + -- get area of land with free space above + local dirt = minetest.find_nodes_in_area_under_air( + {x = pos.x - side, y = pos.y - tall, z = pos.z - side}, + {x = pos.x + side, y = pos.y + tall, z = pos.z + side}, floor) + + -- set default grass and decoration + local grass = green_grass + local decor = flowers + + -- choose grass and decoration to use on dirt patch + for n = 1, #deco do + + -- do we have a grass match? + if nodename == deco[n][1] then + grass = deco[n][2] or {} + decor = deco[n][3] or {} + end + end + + local pos2, nod, def + + -- loop through soil + for _,n in pairs(dirt) do + + pos2 = n + + pos2.y = pos2.y + 1 + + if math.random(1, 5) == 5 then + -- place random decoration (rare) + nod = decor[math.random(1, #decor)] or "" + else + -- place random grass (common) + nod = #grass > 0 and grass[math.random(1, #grass)] or "" + end + + if nod and nod ~= "" then + def = minetest.registered_nodes[nod] + def = def and def.place_param2 or 0 + minetest.set_node(pos2, {name = nod, param2 = def}) + end + + particle_effect(pos2) + end +end + + +-- global functions + + +-- add to sapling list +-- {sapling node, schematic or function name, "soil"|"sand"|specific_node} +--e.g. {"default:sapling", default.grow_new_apple_tree, "soil"} + +function bonemeal:add_sapling(list) + + for n = 1, #list do + table.insert(saplings, list[n]) + end +end + + +-- add to crop list to force grow +-- {crop name start_, growth steps, seed node (if required)} +-- e.g. {"farming:wheat_", 8, "farming:seed_wheat"} +function bonemeal:add_crop(list) + + for n = 1, #list do + table.insert(crops, list[n]) + end +end + + +-- add grass and flower/plant decoration for specific dirt types +-- {dirt_node, {grass_nodes}, {flower_nodes} +-- e.g. {"default:dirt_with_dry_grass", dry_grass, flowers} +-- if an entry already exists for a given dirt type, it will add new entries and all empty +-- entries, allowing to both add decorations and decrease their frequency. +function bonemeal:add_deco(list) + + for l = 1, #list do + + for n = 1, #deco do + + -- update existing entry + if list[l][1] == deco[n][1] then + + -- adding grass types + for _,extra in ipairs(list[l][2]) do + + if extra ~= "" then + + for __,entry in ipairs(deco[n][2]) do + + if extra == entry then + extra = false + break + end + end + end + + if extra then + table.insert(deco[n][2], extra) + end + end + + -- adding decoration types + for _,extra in ipairs(list[l][3]) do + + if extra ~= "" then + + for __,entry in ipairs(deco[n][3]) do + + if extra == entry then + extra = false + break + end + end + end + + if extra then + table.insert(deco[n][3], extra) + end + end + + list[l] = false + break + end + end + + if list[l] then + table.insert(deco, list[l]) + end + end +end + + +-- definitively set a decration scheme +-- this function will either add a new entry as is, or replace the existing one +function bonemeal:set_deco(list) + + for l = 1, #list do + + for n = 1, #deco do + + -- replace existing entry + if list[l][1] == deco[n][1] then + deco[n][2] = list[l][2] + deco[n][3] = list[l][3] + list[l] = false + break + end + end + + if list[l] then + table.insert(deco, list[l]) + end + end +end + + +-- global on_use function for bonemeal +function bonemeal:on_use(pos, strength, node) + + -- get node pointed at + local node = node or minetest.get_node(pos) + + -- return if nothing there + if node.name == "ignore" then + return + end + + -- make sure strength is between 1 and 4 + strength = strength or 1 + strength = math.max(strength, 1) + strength = math.min(strength, 4) + + -- papyrus and cactus + if node.name == "default:papyrus" then + + default.grow_papyrus(pos, node) + particle_effect(pos) + return + + elseif node.name == "default:cactus" then + + default.grow_cactus(pos, node) + particle_effect(pos) + return + end + + -- grow grass and flowers + if minetest.get_item_group(node.name, "soil") > 0 + or minetest.get_item_group(node.name, "sand") > 0 + or minetest.get_item_group(node.name, "can_bonemeal") > 0 then + check_soil(pos, node.name, strength) + return + end + + -- light check depending on strength (strength of 4 = no light needed) + if (minetest.get_node_light(pos) or 0) < (12 - (strength * 3)) then + return + end + + -- check for tree growth if pointing at sapling +-- if minetest.get_item_group(node.name, "sapling") > 0 + if math.random(1, (5 - strength)) == 1 then + check_sapling(pos, node.name) + return + end + + -- check for crop growth + check_crops(pos, node.name, strength) +end + + +----- items + + +-- mulch (strength 1) +minetest.register_craftitem("bonemeal:mulch", { + description = S("Mulch"), + inventory_image = "bonemeal_mulch.png", + + on_use = function(itemstack, user, pointed_thing) + + -- did we point at a node? + if pointed_thing.type ~= "node" then + return + end + + -- is area protected? + if minetest.is_protected(pointed_thing.under, user:get_player_name()) then + return + end + + -- take item if not in creative + if not is_creative(user:get_player_name()) then + itemstack:take_item() + end + + -- call global on_use function with strength of 1 + bonemeal:on_use(pointed_thing.under, 1) + + return itemstack + end, +}) + + +-- bonemeal (strength 2) +minetest.register_craftitem("bonemeal:bonemeal", { + description = S("Bone Meal"), + inventory_image = "bonemeal_item.png", + + on_use = function(itemstack, user, pointed_thing) + + -- did we point at a node? + if pointed_thing.type ~= "node" then + return + end + + -- is area protected? + if minetest.is_protected(pointed_thing.under, user:get_player_name()) then + return + end + + -- take item if not in creative + if not is_creative(user:get_player_name()) then + itemstack:take_item() + end + + -- call global on_use function with strength of 2 + bonemeal:on_use(pointed_thing.under, 2) + + return itemstack + end, +}) + + +-- fertiliser (strength 3) +minetest.register_craftitem("bonemeal:fertiliser", { + description = S("Fertiliser"), + inventory_image = "bonemeal_fertiliser.png", + + on_use = function(itemstack, user, pointed_thing) + + -- did we point at a node? + if pointed_thing.type ~= "node" then + return + end + + -- is area protected? + if minetest.is_protected(pointed_thing.under, user:get_player_name()) then + return + end + + -- take item if not in creative + if not is_creative(user:get_player_name()) then + itemstack:take_item() + end + + -- call global on_use function with strength of 3 + bonemeal:on_use(pointed_thing.under, 3) + + return itemstack + end, +}) + + +-- bone +minetest.register_craftitem("bonemeal:bone", { + description = S("Bone"), + inventory_image = "bonemeal_bone.png", +}) + +-- gelatin powder +minetest.register_craftitem("bonemeal:gelatin_powder", { + description = S("Gelatin Powder"), + inventory_image = "bonemeal_gelatin_powder.png", + groups = {food_gelatin = 1, flammable = 2}, +}) + + +--- crafting recipes + +-- gelatin powder +minetest.register_craft({ + output = "bonemeal:gelatin_powder 4", + recipe = { + {"bonemeal:bone", "bonemeal:bone", "bonemeal:bone"}, + {"bucket:bucket_water", "bucket:bucket_water", "bucket:bucket_water"}, + {"bucket:bucket_water", "default:torch", "bucket:bucket_water"}, + }, + replacements = { + {"bucket:bucket_water", "bucket:bucket_empty 5"}, + }, +}) + +-- bonemeal (from bone) +minetest.register_craft({ + type = "shapeless", + output = "bonemeal:bonemeal 2", + recipe = {"bonemeal:bone"}, +}) + +-- bonemeal (from player bones) +minetest.register_craft({ + type = "shapeless", + output = "bonemeal:bonemeal 4", + recipe = {"bones:bones"}, +}) + +-- bonemeal (from coral skeleton) +minetest.register_craft({ + type = "shapeless", + output = "bonemeal:bonemeal 2", + recipe = {"default:coral_skeleton"}, +}) + +-- mulch +minetest.register_craft({ + type = "shapeless", + output = "bonemeal:mulch 4", + recipe = { + "group:tree", "group:leaves", "group:leaves", + "group:leaves", "group:leaves", "group:leaves", + "group:leaves", "group:leaves", "group:leaves" + }, +}) + +-- fertiliser +minetest.register_craft({ + type = "shapeless", + output = "bonemeal:fertiliser 2", + recipe = {"bonemeal:bonemeal", "bonemeal:mulch"}, +}) + + +-- add bones to dirt +minetest.override_item("default:dirt", { + drop = { + max_items = 1, + items = { + { + items = {"bonemeal:bone"}, + rarity = 30, + }, + { + items = {"default:dirt"}, + } + } + }, +}) + + +-- add support for other mods +local path = minetest.get_modpath("bonemeal") + +dofile(path .. "/mods.lua") +dofile(path .. "/lucky_block.lua") + +print (S("[MOD] bonemeal loaded")) diff --git a/mods/bonemeal/license.txt b/mods/bonemeal/license.txt new file mode 100644 index 0000000..fec6f6a --- /dev/null +++ b/mods/bonemeal/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 TenPlus1 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mods/bonemeal/locale/bonemeal.es.tr b/mods/bonemeal/locale/bonemeal.es.tr new file mode 100644 index 0000000..1666404 --- /dev/null +++ b/mods/bonemeal/locale/bonemeal.es.tr @@ -0,0 +1,7 @@ +# textdomain: bonemeal +Bone=Hueso +Bone Meal=Harina de huesos +Fertiliser=Fertilizante +Gelatin Powder=Gelatina en polvo +Mulch=Abono +[MOD] bonemeal loaded=[MOD] bonemeal cargado diff --git a/mods/bonemeal/lucky_block.lua b/mods/bonemeal/lucky_block.lua new file mode 100644 index 0000000..d335d35 --- /dev/null +++ b/mods/bonemeal/lucky_block.lua @@ -0,0 +1,29 @@ + +-- add lucky blocks + +local function growy(pos, player) + + local dpos = minetest.find_node_near(pos, 1, "group:soil") + + if dpos then + bonemeal:on_use(dpos, 5) + end +end + + +if minetest.get_modpath("lucky_block") then + + lucky_block:add_blocks({ + {"lig"}, + {"dro", {"bonemeal:mulch"}, 10}, + {"dro", {"bonemeal:bonemeal"}, 10}, + {"dro", {"bonemeal:fertiliser"}, 10}, + {"cus", growy}, + {"nod", "default:chest", 0, { + {name = "bonemeal:mulch", max = 20}, + {name = "bonemeal:bonemeal", max = 15}, + {name = "bonemeal:fertiliser", max = 10}, + }}, + }) + +end diff --git a/mods/bonemeal/mod.conf b/mods/bonemeal/mod.conf new file mode 100644 index 0000000..fec08dc --- /dev/null +++ b/mods/bonemeal/mod.conf @@ -0,0 +1 @@ +name = bonemeal \ No newline at end of file diff --git a/mods/bonemeal/mods.lua b/mods/bonemeal/mods.lua new file mode 100644 index 0000000..0a51131 --- /dev/null +++ b/mods/bonemeal/mods.lua @@ -0,0 +1,143 @@ + +-- craft bones from animalmaterials into bonemeal +if minetest.get_modpath("animalmaterials") then + + minetest.register_craft({ + type = "shapeless", + output = "bonemeal:bonemeal 2", + recipe = {"animalmaterials:bone"}, + }) +end + + +if farming and farming.mod and farming.mod == "redo" then + + bonemeal:add_crop({ + {"farming:tomato_", 8}, + {"farming:corn_", 8}, + {"farming:melon_", 8}, + {"farming:pumpkin_", 8}, + {"farming:beanpole_", 5}, + {"farming:blueberry_", 4}, + {"farming:raspberry_", 4}, + {"farming:carrot_", 8}, + {"farming:cocoa_", 4}, + {"farming:coffee_", 5}, + {"farming:cucumber_", 4}, + {"farming:potato_", 4}, + {"farming:grapes_", 8}, + {"farming:rhubarb_", 3}, + {"farming:barley_", 7}, + {"farming:hemp_", 8}, + {"farming:chili_", 8}, + {"farming:garlic_", 5}, + {"farming:onion_", 5}, + {"farming:pepper_", 5}, + {"farming:pineapple_", 8}, + {"farming:pea_", 5}, + {"farming:beetroot_", 5}, + {"farming:rye_", 8}, + {"farming:oat_", 8}, + {"farming:rice_", 8}, + }) +end + + +if minetest.get_modpath("ethereal") then + + bonemeal:add_crop({ + {"ethereal:strawberry_", 8}, + {"ethereal:onion_", 5}, + }) + + bonemeal:add_sapling({ + {"ethereal:palm_sapling", ethereal.grow_palm_tree, "soil"}, + {"ethereal:palm_sapling", ethereal.grow_palm_tree, "sand"}, + {"ethereal:yellow_tree_sapling", ethereal.grow_yellow_tree, "soil"}, + {"ethereal:big_tree_sapling", ethereal.grow_big_tree, "soil"}, + {"ethereal:banana_tree_sapling", ethereal.grow_banana_tree, "soil"}, + {"ethereal:frost_tree_sapling", ethereal.grow_frost_tree, "soil"}, + {"ethereal:mushroom_sapling", ethereal.grow_mushroom_tree, "soil"}, + {"ethereal:willow_sapling", ethereal.grow_willow_tree, "soil"}, + {"ethereal:redwood_sapling", ethereal.grow_redwood_tree, "soil"}, + {"ethereal:orange_tree_sapling", ethereal.grow_orange_tree, "soil"}, + {"ethereal:bamboo_sprout", ethereal.grow_bamboo_tree, "soil"}, + {"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"}, + {"ethereal:sakura_sapling", ethereal.grow_sakura_tree, "soil"}, + }) + + local grass = {"default:grass_3", "default:grass_4", "default:grass_5", ""} + + bonemeal:add_deco({ + {"ethereal:crystal_dirt", {"ethereal:crystalgrass", "", "", "", ""}, {}}, + {"ethereal:fiery_dirt", {"ethereal:dry_shrub", "", "", "", ""}, {}}, + {"ethereal:prairie_dirt", grass, {"flowers:dandelion_white", + "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose", + "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"}}, + {"ethereal:gray_dirt", {}, {"ethereal:snowygrass", "", ""}}, + {"ethereal:cold_dirt", {}, {"ethereal:snowygrass", "", ""}}, + {"ethereal:mushroom_dirt", {}, {"flowers:mushroom_red", "flowers:mushroom_brown", "", "", ""}}, + {"ethereal:jungle_dirt", grass, {"default:junglegrass", "", "", ""}}, + {"ethereal:grove_dirt", grass, {"ethereal:fern", "", "", ""}}, + {"ethereal:bamboo_dirt", grass, {}}, + }) +end + + +if minetest.get_modpath("moretrees") then + + -- special fir check for snow + local function fir_grow(pos) + + if minetest.find_node_near(pos, 1, + {"default:snow", "default:snowblock", "default:dirt_with_snow"}) then + + moretrees.grow_fir_snow(pos) + else + moretrees.grow_fir(pos) + end + end + + bonemeal:add_sapling({ + {"moretrees:beech_sapling", moretrees.spawn_beech_object, "soil"}, + {"moretrees:apple_tree_sapling", moretrees.spawn_apple_tree_object, "soil"}, + {"moretrees:oak_sapling", moretrees.spawn_oak_object, "soil"}, + {"moretrees:sequoia_sapling", moretrees.spawn_sequoia_object, "soil"}, + --{"moretrees:birch_sapling", moretrees.spawn_birch_object, "soil"}, + {"moretrees:birch_sapling", moretrees.grow_birch, "soil"}, + {"moretrees:palm_sapling", moretrees.spawn_palm_object, "soil"}, + {"moretrees:palm_sapling", moretrees.spawn_palm_object, "sand"}, + {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "soil"}, + {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "sand"}, + --{"moretrees:spruce_sapling", moretrees.spawn_spruce_object, "soil"}, + {"moretrees:spruce_sapling", moretrees.grow_spruce, "soil"}, + {"moretrees:cedar_sapling", moretrees.spawn_cedar_object, "soil"}, + {"moretrees:poplar_sapling", moretrees.spawn_poplar_object, "soil"}, + {"moretrees:willow_sapling", moretrees.spawn_willow_object, "soil"}, + {"moretrees:rubber_tree_sapling", moretrees.spawn_rubber_tree_object, "soil"}, + {"moretrees:fir_sapling", fir_grow, "soil"}, + }) + +elseif minetest.get_modpath("technic_worldgen") then + + bonemeal:add_sapling({ + {"moretrees:rubber_tree_sapling", technic.rubber_tree_model, "soil"}, + }) +end + + +if minetest.get_modpath("caverealms") then + + local fil = minetest.get_modpath("caverealms") .. "/schematics/shroom.mts" + local add_shroom = function(pos) + + minetest.swap_node(pos, {name = "air"}) + + minetest.place_schematic( + {x = pos.x - 5, y = pos.y, z = pos.z - 5}, fil, 0, nil, false) + end + + bonemeal:add_sapling({ + {"caverealms:mushroom_sapling", add_shroom, "soil"}, + }) +end diff --git a/mods/bonemeal/screenshot.png b/mods/bonemeal/screenshot.png new file mode 100644 index 0000000..c4b9fa7 Binary files /dev/null and b/mods/bonemeal/screenshot.png differ diff --git a/mods/bonemeal/textures/bonemeal_bone.png b/mods/bonemeal/textures/bonemeal_bone.png new file mode 100644 index 0000000..eee3587 Binary files /dev/null and b/mods/bonemeal/textures/bonemeal_bone.png differ diff --git a/mods/bonemeal/textures/bonemeal_fertiliser.png b/mods/bonemeal/textures/bonemeal_fertiliser.png new file mode 100644 index 0000000..0888458 Binary files /dev/null and b/mods/bonemeal/textures/bonemeal_fertiliser.png differ diff --git a/mods/bonemeal/textures/bonemeal_gelatin_powder.png b/mods/bonemeal/textures/bonemeal_gelatin_powder.png new file mode 100644 index 0000000..e8b52e2 Binary files /dev/null and b/mods/bonemeal/textures/bonemeal_gelatin_powder.png differ diff --git a/mods/bonemeal/textures/bonemeal_item.png b/mods/bonemeal/textures/bonemeal_item.png new file mode 100644 index 0000000..6f02da2 Binary files /dev/null and b/mods/bonemeal/textures/bonemeal_item.png differ diff --git a/mods/bonemeal/textures/bonemeal_mulch.png b/mods/bonemeal/textures/bonemeal_mulch.png new file mode 100644 index 0000000..a63602a Binary files /dev/null and b/mods/bonemeal/textures/bonemeal_mulch.png differ diff --git a/mods/bonemeal/textures/bonemeal_particle.png b/mods/bonemeal/textures/bonemeal_particle.png new file mode 100644 index 0000000..71ef90f Binary files /dev/null and b/mods/bonemeal/textures/bonemeal_particle.png differ diff --git a/mods/boost_cart/README.md b/mods/boost_cart/README.md new file mode 100644 index 0000000..8b7324f --- /dev/null +++ b/mods/boost_cart/README.md @@ -0,0 +1,49 @@ +# Boost Cart +Based on (and fully compatible with) the mod "carts" by PilzAdam +and the one contained in the subgame "minetest_game". +Target: Run smoothly as possible, even on laggy servers. + +## Features +- A fast cart for your railway or roller coaster +- Easily configurable cart speed using the Advanced Settings +- Boost and brake rails +- By mesecons controlled Start-Stop rails +- Detector rails that send a mesecons signal when the cart drives over them +- Rail junction switching with the 'right/left' walking keys +- Handbrake with the 'back' key +- Support for non-minetest_game subgames + +## Settings +This mod can be adjusted to fit the preference of a player or server. Use the `Settings -> All Settings` dialog in the main menu or tune your +minetest.conf file manually: + +#### `boost_cart.speed_max = 10` +* Maximal speed of the cart in m/s +* Possible values: 1 ... 100 + +#### `boost_cart.punch_speed_max = 7` +* Maximal speed to which the driving player can accelerate the cart by punching from inside the cart. +* Possible values: -1 ... 100 +* Value `-1` will disable this feature. + +## License for everything +CC-0, if not specified otherwise below + + + Authors +--------- +Various authors +- carts_rail_*.png + +kddekadenz +- cart_bottom.png +- cart_side.png +- cart_top.png + +klankbeeld (CC-BY 3.0) +- http://freesound.org/people/klankbeeld/sounds/174042/ +- cart_rail.*.ogg + +Zeg9 +- cart.x +- cart.png \ No newline at end of file diff --git a/mods/boost_cart/cart_entity.lua b/mods/boost_cart/cart_entity.lua new file mode 100644 index 0000000..0edf447 --- /dev/null +++ b/mods/boost_cart/cart_entity.lua @@ -0,0 +1,447 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +function boost_cart:on_rail_step(entity, pos, distance) + -- Play rail sound + if entity.sound_counter <= 0 then + minetest.sound_play("cart_rail", { + pos = pos, + max_hear_distance = 40, + gain = 0.5 + }) + entity.sound_counter = math.random(4, 15) + end + entity.sound_counter = entity.sound_counter - distance + + if boost_cart.MESECONS then + boost_cart:signal_detector_rail(pos) + end +end + +local cart_entity = { + initial_properties = { + physical = false, + collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + visual = "mesh", + mesh = "cart.x", + visual_size = {x=1, y=1}, + textures = {"cart.png"}, + }, + + driver = nil, + punched = false, -- used to re-send velocity and position + velocity = {x=0, y=0, z=0}, -- only used on punch + old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch + old_pos = nil, + old_switch = 0, + sound_counter = 0, + railtype = nil, + attached_items = {} +} + +-- Model and textures +if boost_cart.MTG_CARTS then + cart_entity.initial_properties.mesh = "carts_cart.b3d" + cart_entity.initial_properties.textures = {"carts_cart.png"} +end + +function cart_entity:on_rightclick(clicker) + if not clicker or not clicker:is_player() then + return + end + local player_name = clicker:get_player_name() + if self.driver and player_name == self.driver then + self.driver = nil + boost_cart:manage_attachment(clicker, nil) + elseif not self.driver then + self.driver = player_name + boost_cart:manage_attachment(clicker, self.object) + + if default.player_set_animation then + -- player_api(/default) does not update the animation + -- when the player is attached, reset to default animation + default.player_set_animation(clicker, "stand") + end + end +end + +function cart_entity:on_activate(staticdata, dtime_s) + self.object:set_armor_groups({immortal=1}) + self.sound_counter = math.random(4, 15) + + if string.sub(staticdata, 1, string.len("return")) ~= "return" then + return + end + local data = minetest.deserialize(staticdata) + if type(data) ~= "table" then + return + end + self.railtype = data.railtype + self.old_dir = data.old_dir or self.old_dir + self.old_pos = data.old_pos or self.old_pos + -- Correct the position when the cart drives further after the last 'step()' + if self.old_pos and boost_cart:is_rail(self.old_pos, self.railtype) then + self.object:set_pos(self.old_pos) + end +end + +function cart_entity:get_staticdata() + return minetest.serialize({ + railtype = self.railtype, + old_dir = self.old_dir, + old_pos = self.old_pos + }) +end + +-- 0.5.x and later: When the driver leaves +function cart_entity:on_detach_child(child) + if child and child:get_player_name() == self.driver then + self.driver = nil + end +end + +function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) + local pos = self.object:get_pos() + local vel = self.object:get_velocity() + if not self.railtype or vector.equals(vel, {x=0, y=0, z=0}) then + local node = minetest.get_node(pos).name + self.railtype = minetest.get_item_group(node, "connect_to_raillike") + end + + if not puncher or not puncher:is_player() then + local cart_dir = boost_cart:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + self.velocity = vector.multiply(cart_dir, 3) + self.punched = true + return + end + + if puncher:get_player_control().sneak then + -- Pick up cart: Drop all attachments + if self.driver then + if self.old_pos then + self.object:set_pos(self.old_pos) + end + local player = minetest.get_player_by_name(self.driver) + boost_cart:manage_attachment(player, nil) + end + for _, obj_ in pairs(self.attached_items) do + if obj_ then + obj_:set_detach() + end + end + + local leftover = puncher:get_inventory():add_item("main", "carts:cart") + if not leftover:is_empty() then + minetest.add_item(pos, leftover) + end + + self.object:remove() + return + end + + -- Driver punches to accelerate the cart + if puncher:get_player_name() == self.driver then + if math.abs(vel.x + vel.z) > boost_cart.punch_speed_max then + return + end + end + + local punch_dir = boost_cart:velocity_to_dir(puncher:get_look_dir()) + punch_dir.y = 0 + local cart_dir = boost_cart:get_rail_direction(pos, punch_dir, nil, nil, self.railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + + local punch_interval = 1 + if tool_capabilities and tool_capabilities.full_punch_interval then + punch_interval = tool_capabilities.full_punch_interval + end + time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval) + local f = 3 * (time_from_last_punch / punch_interval) + + self.velocity = vector.multiply(cart_dir, f) + self.old_dir = cart_dir + self.punched = true +end + +local v3_len = vector.length +function cart_entity:on_step(dtime) + local vel = self.object:get_velocity() + if self.punched then + vel = vector.add(vel, self.velocity) + self.object:set_velocity(vel) + self.old_dir.y = 0 + elseif vector.equals(vel, {x=0, y=0, z=0}) then + return + end + + local pos = self.object:get_pos() + local cart_dir = boost_cart:velocity_to_dir(vel) + local same_dir = vector.equals(cart_dir, self.old_dir) + local update = {} + + if self.old_pos and not self.punched and same_dir then + local flo_pos = vector.round(pos) + local flo_old = vector.round(self.old_pos) + if vector.equals(flo_pos, flo_old) then + -- Do not check one node multiple times + return + end + end + + local ctrl, player + local distance = 1 + + -- Get player controls + if self.driver then + player = minetest.get_player_by_name(self.driver) + if player then + ctrl = player:get_player_control() + end + end + + local stop_wiggle = false + if self.old_pos and same_dir then + -- Detection for "skipping" nodes (perhaps use average dtime?) + -- It's sophisticated enough to take the acceleration in account + local acc = self.object:get_acceleration() + distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc)) + + local new_pos, new_dir = boost_cart:pathfinder( + pos, self.old_pos, self.old_dir, distance, ctrl, + self.old_switch, self.railtype + ) + + if new_pos then + -- No rail found: set to the expected position + pos = new_pos + update.pos = true + cart_dir = new_dir + end + elseif self.old_pos and self.old_dir.y ~= 1 and not self.punched then + -- Stop wiggle + stop_wiggle = true + end + + -- dir: New moving direction of the cart + -- switch_keys: Currently pressed L(1) or R(2) key, + -- used to ignore the key on the next rail node + local dir, switch_keys = boost_cart:get_rail_direction( + pos, cart_dir, ctrl, self.old_switch, self.railtype + ) + local dir_changed = not vector.equals(dir, self.old_dir) + + local acc = 0 + if stop_wiggle or vector.equals(dir, {x=0, y=0, z=0}) then + vel = {x=0, y=0, z=0} + local pos_r = vector.round(pos) + if not boost_cart:is_rail(pos_r, self.railtype) + and self.old_pos then + pos = self.old_pos + elseif not stop_wiggle then + pos = pos_r + else + pos.y = math.floor(pos.y + 0.5) + end + update.pos = true + update.vel = true + else + -- Direction change detected + if dir_changed then + vel = vector.multiply(dir, math.abs(vel.x + vel.z)) + update.vel = true + if dir.y ~= self.old_dir.y then + pos = vector.round(pos) + update.pos = true + end + end + -- Center on the rail + if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then + pos.x = math.floor(pos.x + 0.5) + update.pos = true + end + if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then + pos.z = math.floor(pos.z + 0.5) + update.pos = true + end + + -- Calculate current cart acceleration + acc = nil + + local acc_meta = minetest.get_meta(pos):get_string("cart_acceleration") + if acc_meta == "halt" and not self.punched then + -- Stop rail + vel = {x=0, y=0, z=0} + acc = false + pos = vector.round(pos) + update.pos = true + update.vel = true + end + if acc == nil then + -- Meta speed modifier + local speed_mod = tonumber(acc_meta) + if speed_mod and speed_mod ~= 0 then + -- Try to make it similar to the original carts mod + acc = speed_mod * 10 + end + end + if acc == nil and boost_cart.MTG_CARTS then + -- MTG Cart API adaption + local rail_node = minetest.get_node(vector.round(pos)) + local railparam = carts.railparams[rail_node.name] + if railparam and railparam.acceleration then + acc = railparam.acceleration + end + end + if acc ~= false then + -- Handbrake + if ctrl and ctrl.down then + acc = (acc or 0) - 2 + elseif acc == nil then + acc = -0.4 + end + end + + if acc then + -- Slow down or speed up, depending on Y direction + acc = acc + dir.y * -2.1 + else + acc = 0 + end + end + + -- Limit cart speed + local vel_len = vector.length(vel) + if vel_len > boost_cart.speed_max then + vel = vector.multiply(vel, boost_cart.speed_max / vel_len) + update.vel = true + end + if vel_len >= boost_cart.speed_max and acc > 0 then + acc = 0 + end + + self.object:set_acceleration(vector.multiply(dir, acc)) + + self.old_pos = vector.round(pos) + local old_y_dir = self.old_dir.y + if not vector.equals(dir, {x=0, y=0, z=0}) and not stop_wiggle then + self.old_dir = dir + else + -- Cart stopped, set the animation to 0 + self.old_dir.y = 0 + end + self.old_switch = switch_keys + + boost_cart:on_rail_step(self, self.old_pos, distance) + + if self.punched then + -- Collect dropped items + for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do + if not obj_:is_player() and + obj_:get_luaentity() and + not obj_:get_luaentity().physical_state and + obj_:get_luaentity().name == "__builtin:item" then + + obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0}) + self.attached_items[#self.attached_items + 1] = obj_ + end + end + self.punched = false + update.vel = true + end + + if not (update.vel or update.pos) then + return + end + -- Re-use "dir", localize self.old_dir + dir = self.old_dir + + local yaw = 0 + if dir.x < 0 then + yaw = 0.5 + elseif dir.x > 0 then + yaw = 1.5 + elseif dir.z < 0 then + yaw = 1 + end + self.object:set_yaw(yaw * math.pi) + + local anim = {x=0, y=0} + if dir.y == -1 then + anim = {x=1, y=1} + elseif dir.y == 1 then + anim = {x=2, y=2} + end + self.object:set_animation(anim, 1, 0) + + -- Change player model rotation, depending on the Y direction + if player and dir.y ~= old_y_dir then + local feet = {x=0, y=-4, z=0} + local eye = {x=0, y=-4, z=0} + + if dir.y ~= 0 then + -- TODO: Find a better way to calculate this + feet.y = feet.y + 4 + feet.z = -dir.y * 2 + + eye.z = -dir.y * 8 + end + player:set_attach(self.object, "", feet, + {x=dir.y * -30, y=0, z=0}) + player:set_eye_offset(eye, eye) + end + + if update.vel then + self.object:set_velocity(vel) + end + if update.pos then + if dir_changed then + self.object:set_pos(pos) + else + self.object:move_to(pos) + end + end +end + +minetest.register_entity(":carts:cart", cart_entity) + +-- Register item to place the entity +if not boost_cart.MTG_CARTS then + minetest.register_craftitem(":carts:cart", { + description = S("Cart").." "..S"(Sneak+Click to pick up)", + inventory_image = minetest.inventorycube( + "cart_top.png", + "cart_side.png", + "cart_side.png" + ), + wield_image = "cart_side.png", + on_place = function(itemstack, placer, pointed_thing) + if not pointed_thing.type == "node" then + return + end + if boost_cart:is_rail(pointed_thing.under) then + minetest.add_entity(pointed_thing.under, "carts:cart") + elseif boost_cart:is_rail(pointed_thing.above) then + minetest.add_entity(pointed_thing.above, "carts:cart") + else + return + end + + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end, + }) + + minetest.register_craft({ + output = "carts:cart", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + }, + }) +end diff --git a/mods/boost_cart/detector.lua b/mods/boost_cart/detector.lua new file mode 100644 index 0000000..41e38fd --- /dev/null +++ b/mods/boost_cart/detector.lua @@ -0,0 +1,61 @@ +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +local mesecons_rules = mesecon.rules.flat + +function boost_cart:turnoff_detector_rail(pos) + local node = minetest.get_node(pos) + if minetest.get_item_group(node.name, "detector_rail") == 1 then + if node.name == "boost_cart:detectorrail_on" then --has not been dug + minetest.swap_node(pos, {name = "boost_cart:detectorrail", param2=node.param2}) + end + mesecon.receptor_off(pos, mesecons_rules) + end +end + +function boost_cart:signal_detector_rail(pos) + local node = minetest.get_node(pos) + if minetest.get_item_group(node.name, "detector_rail") ~= 1 then + return + end + + if node.name == "boost_cart:detectorrail" then + minetest.swap_node(pos, {name = "boost_cart:detectorrail_on", param2=node.param2}) + end + mesecon.receptor_on(pos, mesecons_rules) + minetest.after(0.5, boost_cart.turnoff_detector_rail, boost_cart, pos) +end + +boost_cart:register_rail("boost_cart:detectorrail", { + description = S("Detector rail"), + tiles = { + "carts_rail_straight_dtc.png", "carts_rail_curved_dtc.png", + "carts_rail_t_junction_dtc.png", "carts_rail_crossing_dtc.png" + }, + groups = boost_cart:get_rail_groups({detector_rail = 1}), + + mesecons = {receptor = {state = "off", rules = mesecons_rules}}, +}) + +boost_cart:register_rail("boost_cart:detectorrail_on", { + description = "Detector rail ON (you hacker you)", + tiles = { + "carts_rail_straight_dtc_on.png", "carts_rail_curved_dtc_on.png", + "carts_rail_t_junction_dtc_on.png", "carts_rail_crossing_dtc_on.png" + }, + groups = boost_cart:get_rail_groups({ + detector_rail = 1, not_in_creative_inventory = 1 + }), + drop = "boost_cart:detectorrail", + + mesecons = {receptor = {state = "on", rules = mesecons_rules}}, +}) + +minetest.register_craft({ + output = "boost_cart:detectorrail 6", + recipe = { + {"default:steel_ingot", "mesecons:wire_00000000_off", "default:steel_ingot"}, + {"default:steel_ingot", "group:stick", "default:steel_ingot"}, + {"default:steel_ingot", "mesecons:wire_00000000_off", "default:steel_ingot"}, + }, +}) diff --git a/mods/boost_cart/doc/mod_api.txt b/mods/boost_cart/doc/mod_api.txt new file mode 100644 index 0000000..07bb488 --- /dev/null +++ b/mods/boost_cart/doc/mod_api.txt @@ -0,0 +1,71 @@ +boost_cart API +============== + +This file provides information about the API of boost_cart for the use in +mods. The API might change slightly when the development goes on, so avoid +using internal tables or functions which are not documented here. + + +Types +----- + +* `SwitchIgnore` -> `number/nil` + * Specifies which player control was pressed. This value is used to prefer + straight rails instead of preferring left and right rail checks. + * `1`: Ignore left rail + * `2`: Ignore right rail + * `nil`: Ignore no rail + + +Entity movement +--------------- +These functions are grouped so that they make sense and then sorted alphabetically. + +* `boost_cart:manage_attachment(player, obj)` + * Attaches or detaches the player to/from an object, depending on what is + supplied to `obj`. + * `player`: `ObjectRef` of the player + * `obj`: `ObjectRef` (to attach) or `nil` (to detach) +* `boost_cart:get_sign(n)` -> `number` + * Returns the sign for the given number. Values: `-1`, `0`, `1` + * `n`: any `number` +* `boost_cart:velocity_to_dir(vel)` -> `vector` + * Returns the cart direction depending on `vel`. Each coordinate can have + one of the `get_sign()` return values. + * `vel`: velocity as `vector` +* `boost_cart:boost_rail(pos, amount)` + * Sets the rail acceleration for the given position to `amount` and punches + carts which are at the given position. + * `pos`: `vector`, rail position + * `amount`: `number`, negative to brake, positive to boost +* `boost_cart:get_rail_direction(pos, dir, ctrl, old_switch, railtype)` + -> `vector, SwitchIgnore` + * Returns the direction to where the next rail is, and which player control that + should be ignored in the next call. + * `pos`: `vector`, position of the cart + * `dir`: `vector`, movement direction of the cart (see `velocity_to_dir()`) + * `ctrl`: Player controls table or `nil` (no player) + * `old_switch`: `SwitchIgnore` + * `railtype`: (optional) `number`, gets passed indirectly to `is_rail()` + + +Rail helper functions +--------------------- +* `boost_cart:get_rail_groups(groups)` -> `table` + * Returns a group table with preset values for a common rail node + * `groups`: (optional) `table`, additional groups append (or overwrite) + * Hint: To register an incompatible rail type, set the group + `connect_to_raillike` to the value returned by + `minetest.raillike_group(new_rail_type)` +* `boost_cart:is_rail(pos, [railtype])` -> `boolean` + * Returns whether the node at `pos` is a rail. When `railtype` is specified, + `true` is only returned when the node is in the same rail group. + * `pos`: `vector` of the node to check + * `railtype`: (optional) `number`, rail group number +* `boost_cart:register_rail(name, def)` + * Registers a new rail with preset node definition defaults as fallback + * `name`: `string`, node name of the new rail + * `def`: Node definition table, containing at least the following keys: + * `description` + * `groups` + * `tiles` diff --git a/mods/boost_cart/functions.lua b/mods/boost_cart/functions.lua new file mode 100644 index 0000000..77d2dde --- /dev/null +++ b/mods/boost_cart/functions.lua @@ -0,0 +1,268 @@ +function boost_cart:get_sign(z) + if z == 0 then + return 0 + else + return z / math.abs(z) + end +end + +function boost_cart:manage_attachment(player, obj) + if not player then + return + end + local wants_attach = obj ~= nil + local attached = player:get_attach() ~= nil + + if attached == wants_attach then + return + end + + local player_name = player:get_player_name() + boost_cart.player_attached[player_name] = wants_attach + + if wants_attach then + player:set_attach(obj, "", {x=0, y=-4, z=0}, {x=0, y=0, z=0}) + player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0}) + else + player:set_detach() + player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0}) + -- HACK in effect! Force updating the attachment rotation + player:set_properties({}) + end +end + +function boost_cart:velocity_to_dir(v) + if math.abs(v.x) > math.abs(v.z) then + return {x=self:get_sign(v.x), y=self:get_sign(v.y), z=0} + else + return {x=0, y=self:get_sign(v.y), z=self:get_sign(v.z)} + end +end + +local get_node = minetest.get_node +local get_item_group = minetest.get_item_group +function boost_cart:is_rail(pos, railtype) + local node = get_node(pos).name + if node == "ignore" then + local vm = minetest.get_voxel_manip() + local emin, emax = vm:read_from_map(pos, pos) + local area = VoxelArea:new{ + MinEdge = emin, + MaxEdge = emax, + } + local data = vm:get_data() + local vi = area:indexp(pos) + node = minetest.get_name_from_content_id(data[vi]) + end + if get_item_group(node, "rail") == 0 then + return false + end + if not railtype then + return true + end + return get_item_group(node, "connect_to_raillike") == railtype +end + +function boost_cart:check_front_up_down(pos, dir_, check_up, railtype) + local dir = vector.new(dir_) + local cur = nil + + -- Front + dir.y = 0 + cur = vector.add(pos, dir) + if self:is_rail(cur, railtype) then + return dir + end + -- Up + if check_up then + dir.y = 1 + cur = vector.add(pos, dir) + if self:is_rail(cur, railtype) then + return dir + end + end + -- Down + dir.y = -1 + cur = vector.add(pos, dir) + if self:is_rail(cur, railtype) then + return dir + end + return nil +end + +function boost_cart:get_rail_direction(pos_, dir, ctrl, old_switch, railtype) + local pos = vector.round(pos_) + local cur = nil + local left_check, right_check = true, true + + -- Check left and right + local left = {x=0, y=0, z=0} + local right = {x=0, y=0, z=0} + if dir.z ~= 0 and dir.x == 0 then + left.x = -dir.z + right.x = dir.z + elseif dir.x ~= 0 and dir.z == 0 then + left.z = dir.x + right.z = -dir.x + end + + local straight_priority = ctrl and dir.y ~= 0 + + -- Normal, to disallow rail switching up- & downhill + if straight_priority then + cur = self:check_front_up_down(pos, dir, true, railtype) + if cur then + return cur + end + end + + if ctrl then + if old_switch == 1 then + left_check = false + elseif old_switch == 2 then + right_check = false + end + if ctrl.left and left_check then + cur = self:check_front_up_down(pos, left, false, railtype) + if cur then + return cur, 1 + end + left_check = false + end + if ctrl.right and right_check then + cur = self:check_front_up_down(pos, right, false, railtype) + if cur then + return cur, 2 + end + right_check = true + end + end + + -- Normal + if not straight_priority then + cur = self:check_front_up_down(pos, dir, true, railtype) + if cur then + return cur + end + end + + -- Left, if not already checked + if left_check then + cur = self:check_front_up_down(pos, left, false, railtype) + if cur then + return cur + end + end + + -- Right, if not already checked + if right_check then + cur = self:check_front_up_down(pos, right, false, railtype) + if cur then + return cur + end + end + + -- Backwards + if not old_switch then + cur = self:check_front_up_down(pos, { + x = -dir.x, + y = dir.y, + z = -dir.z + }, true, railtype) + if cur then + return cur + end + end + + return {x=0, y=0, z=0} +end + +function boost_cart:pathfinder(pos_, old_pos, old_dir, distance, ctrl, + pf_switch, railtype) + + local pos = vector.round(pos_) + if vector.equals(old_pos, pos) then + return + end + + local pf_pos = vector.round(old_pos) + local pf_dir = vector.new(old_dir) + distance = math.min(boost_cart.path_distance_max, + math.floor(distance + 1)) + + for i = 1, distance do + pf_dir, pf_switch = self:get_rail_direction( + pf_pos, pf_dir, ctrl, pf_switch or 0, railtype) + + if vector.equals(pf_dir, {x=0, y=0, z=0}) then + -- No way forwards + return pf_pos, pf_dir + end + + pf_pos = vector.add(pf_pos, pf_dir) + + if vector.equals(pf_pos, pos) then + -- Success! Cart moved on correctly + return + end + end + -- Not found. Put cart to predicted position + return pf_pos, pf_dir +end + +function boost_cart:boost_rail(pos, amount) + minetest.get_meta(pos):set_string("cart_acceleration", tostring(amount)) + for _,obj_ in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do + if not obj_:is_player() and + obj_:get_luaentity() and + obj_:get_luaentity().name == "carts:cart" then + obj_:get_luaentity():on_punch() + end + end +end + +function boost_cart:register_rail(name, def_overwrite) + local sound_func = default.node_sound_metal_defaults + or default.node_sound_defaults + + local def = { + drawtype = "raillike", + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sounds = sound_func() + } + for k, v in pairs(def_overwrite) do + def[k] = v + end + if not def.inventory_image then + def.wield_image = def.tiles[1] + def.inventory_image = def.tiles[1] + end + + minetest.register_node(name, def) +end + +function boost_cart:get_rail_groups(additional_groups) + -- Get the default rail groups and add more when a table is given + local groups = { + dig_immediate = 2, + attached_node = 1, + rail = 1, + connect_to_raillike = 1 + } + if minetest.raillike_group then + groups.connect_to_raillike = minetest.raillike_group("rail") + end + if type(additional_groups) == "table" then + for k, v in pairs(additional_groups) do + groups[k] = v + end + end + return groups +end diff --git a/mods/boost_cart/init.lua b/mods/boost_cart/init.lua new file mode 100644 index 0000000..2eb3dff --- /dev/null +++ b/mods/boost_cart/init.lua @@ -0,0 +1,47 @@ + +if not minetest.features.object_use_texture_alpha then + error("[boost_cart] Your Minetest version is no longer supported." + .. " (Version < 5.0.0)") +end + +-- Load support for MT game translation. +local S = minetest.get_translator(minetest.get_current_modname()) + +boost_cart = {} +boost_cart.modpath = minetest.get_modpath("boost_cart") +boost_cart.MESECONS = minetest.global_exists("mesecon") +boost_cart.MTG_CARTS = minetest.global_exists("carts") and carts.pathfinder +boost_cart.PLAYER_API = minetest.global_exists("player_api") +boost_cart.player_attached = {} + +local function getNum(setting) + return tonumber(minetest.settings:get(setting)) +end + +-- Maximal speed of the cart in m/s +boost_cart.speed_max = getNum("boost_cart.speed_max") or 10 +-- Set to -1 to disable punching the cart from inside +boost_cart.punch_speed_max = getNum("boost_cart.punch_speed_max") or 7 +-- Maximal distance for the path correction (for dtime peaks) +boost_cart.path_distance_max = 3 + + +if boost_cart.PLAYER_API then + -- This is a table reference! + boost_cart.player_attached = player_api.player_attached +end + +dofile(boost_cart.modpath.."/functions.lua") +dofile(boost_cart.modpath.."/rails.lua") + +if boost_cart.MESECONS then + dofile(boost_cart.modpath.."/detector.lua") +--else +-- minetest.register_alias("carts:powerrail", "boost_cart:detectorrail") +-- minetest.register_alias("carts:powerrail", "boost_cart:detectorrail_on") +end + +if boost_cart.MTG_CARTS then + minetest.log("action", "[boost_cart] Overwriting definitions of similar carts mod") +end +dofile(boost_cart.modpath.."/cart_entity.lua") diff --git a/mods/boost_cart/locale/boost_cart.es.tr b/mods/boost_cart/locale/boost_cart.es.tr new file mode 100644 index 0000000..00f2f8c --- /dev/null +++ b/mods/boost_cart/locale/boost_cart.es.tr @@ -0,0 +1,9 @@ +# textdomain: boost_cart +Cart=Vagoneta +(Sneak+Click to pick up)=(Agacharse+Clic para recoger) +Rail=Raíl +Powered rail=Raíl energizado +Brake rail=Raíl de frenado +Detector rail=Rail detector +Cupper rail=Raíl de cobre +Start-stop rail=Raíl de comienzo-fin diff --git a/mods/boost_cart/mod.conf b/mods/boost_cart/mod.conf new file mode 100644 index 0000000..6ddf5ed --- /dev/null +++ b/mods/boost_cart/mod.conf @@ -0,0 +1,7 @@ +name = boost_cart +description = """ +Boost Cart +The mod that add a cart and new kinds of rails to your world. +""" +depends = default +optional_depends = mesecons, moreores, carts, player_api diff --git a/mods/boost_cart/models/cart.png b/mods/boost_cart/models/cart.png new file mode 100644 index 0000000..d4b12d6 Binary files /dev/null and b/mods/boost_cart/models/cart.png differ diff --git a/mods/boost_cart/models/cart.x b/mods/boost_cart/models/cart.x new file mode 100644 index 0000000..3325aaf --- /dev/null +++ b/mods/boost_cart/models/cart.x @@ -0,0 +1,339 @@ +xof 0303txt 0032 + +Frame Root { + FrameTransformMatrix { + 1.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 1.000000, 0.000000, + 0.000000, 1.000000,-0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 1.000000;; + } + Frame Cube { + FrameTransformMatrix { + 5.000000, 0.000000,-0.000000, 0.000000, + -0.000000, 3.535534, 3.535534, 0.000000, + 0.000000,-3.535534, 3.535534, 0.000000, + 0.000000,-3.000000, 3.000000, 1.000000;; + } + Mesh { //Cube_001 Mesh + 72; + -1.000000; 1.000000;-1.000000;, + -1.000000;-1.000000;-1.000000;, + 1.000000;-1.000000;-1.000000;, + 1.000000; 1.000000;-1.000000;, + -0.833334;-1.000000; 1.000000;, + -1.000000;-1.000000; 1.000000;, + -1.000000;-0.833333; 1.000000;, + -0.833334;-0.833333; 1.000000;, + -1.000000;-1.000000;-1.000000;, + -1.000000;-1.000000; 1.000000;, + 0.999999;-1.000001; 1.000000;, + 1.000000;-1.000000;-1.000000;, + 0.999999;-1.000001; 1.000000;, + 0.833332;-1.000000; 1.000000;, + 0.833333;-0.833334; 1.000000;, + 1.000000;-0.833334; 1.000000;, + 0.833332;-1.000000; 1.000000;, + -0.833334;-1.000000; 1.000000;, + -0.833334;-0.833333; 1.000000;, + 0.833333;-0.833334; 1.000000;, + 1.000000; 0.833333; 1.000000;, + 0.833334; 0.833333; 1.000000;, + 0.833334; 1.000000; 1.000000;, + 1.000000; 0.999999; 1.000000;, + 1.000000;-0.833334; 1.000000;, + 0.833333;-0.833334; 1.000000;, + 0.833334; 0.833333; 1.000000;, + 1.000000; 0.833333; 1.000000;, + 0.833334; 0.833333; 1.000000;, + -0.833333; 0.833333; 1.000000;, + -0.833333; 1.000000; 1.000000;, + 0.833334; 1.000000; 1.000000;, + 0.833334; 0.833333;-0.800000;, + -0.833333; 0.833333;-0.800000;, + -0.833333; 0.833333; 1.000000;, + 0.833334; 0.833333; 1.000000;, + -0.833333; 0.833333; 1.000000;, + -1.000000; 0.833333; 1.000000;, + -1.000000; 1.000000; 1.000000;, + -0.833333; 1.000000; 1.000000;, + -0.833334;-0.833333; 1.000000;, + -1.000000;-0.833333; 1.000000;, + -1.000000; 0.833333; 1.000000;, + -0.833333; 0.833333; 1.000000;, + 0.833333;-0.833334;-0.800000;, + -0.833334;-0.833333;-0.800000;, + -0.833333; 0.833333;-0.800000;, + 0.833334; 0.833333;-0.800000;, + -0.833333; 0.833333;-0.800000;, + -0.833334;-0.833333;-0.800000;, + -0.833334;-0.833333; 1.000000;, + -0.833333; 0.833333; 1.000000;, + -0.833334;-0.833333;-0.800000;, + 0.833333;-0.833334;-0.800000;, + 0.833333;-0.833334; 1.000000;, + -0.833334;-0.833333; 1.000000;, + 0.833333;-0.833334;-0.800000;, + 0.833334; 0.833333;-0.800000;, + 0.833334; 0.833333; 1.000000;, + 0.833333;-0.833334; 1.000000;, + -1.000000; 1.000000;-1.000000;, + -1.000000; 1.000000; 1.000000;, + -1.000000;-1.000000; 1.000000;, + -1.000000;-1.000000;-1.000000;, + -1.000000; 1.000000; 1.000000;, + -1.000000; 1.000000;-1.000000;, + 1.000000; 1.000000;-1.000000;, + 1.000000; 0.999999; 1.000000;, + 1.000000;-1.000000;-1.000000;, + 0.999999;-1.000001; 1.000000;, + 1.000000; 0.999999; 1.000000;, + 1.000000; 1.000000;-1.000000;; + 18; + 4;0;1;2;3;, + 4;4;5;6;7;, + 4;8;9;10;11;, + 4;12;13;14;15;, + 4;16;17;18;19;, + 4;20;21;22;23;, + 4;24;25;26;27;, + 4;28;29;30;31;, + 4;32;33;34;35;, + 4;36;37;38;39;, + 4;40;41;42;43;, + 4;44;45;46;47;, + 4;48;49;50;51;, + 4;52;53;54;55;, + 4;56;57;58;59;, + 4;60;61;62;63;, + 4;64;65;66;67;, + 4;68;69;70;71;; + MeshNormals { //Cube_001 Normals + 72; + 0.000000; 0.000000;-1.000000;, + 0.000000; 0.000000;-1.000000;, + 0.000000; 0.000000;-1.000000;, + 0.000000; 0.000000;-1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + -0.000000;-1.000000;-0.000000;, + -0.000000;-1.000000;-0.000000;, + -0.000000;-1.000000;-0.000000;, + -0.000000;-1.000000;-0.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + -0.000000;-1.000000; 0.000000;, + -0.000000;-1.000000; 0.000000;, + -0.000000;-1.000000; 0.000000;, + -0.000000;-1.000000; 0.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 0.000000;-0.000000; 1.000000;, + 1.000000;-0.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + -1.000000; 0.000000; 0.000000;, + -1.000000; 0.000000; 0.000000;, + -1.000000; 0.000000; 0.000000;, + -1.000000; 0.000000; 0.000000;, + -1.000000; 0.000000;-0.000000;, + -1.000000; 0.000000;-0.000000;, + -1.000000; 0.000000;-0.000000;, + -1.000000; 0.000000;-0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;, + 1.000000;-0.000000; 0.000000;; + 18; + 4;0;1;2;3;, + 4;4;5;6;7;, + 4;8;9;10;11;, + 4;12;13;14;15;, + 4;16;17;18;19;, + 4;20;21;22;23;, + 4;24;25;26;27;, + 4;28;29;30;31;, + 4;32;33;34;35;, + 4;36;37;38;39;, + 4;40;41;42;43;, + 4;44;45;46;47;, + 4;48;49;50;51;, + 4;52;53;54;55;, + 4;56;57;58;59;, + 4;60;61;62;63;, + 4;64;65;66;67;, + 4;68;69;70;71;; + } //End of Cube_001 Normals + MeshMaterialList { //Cube_001 Material List + 1; + 18; + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0;; + Material Material { + 0.640000; 0.640000; 0.640000; 1.000000;; + 96.078431; + 0.500000; 0.500000; 0.500000;; + 0.000000; 0.000000; 0.000000;; + TextureFilename {"cart.png";} + } + } //End of Cube_001 Material List + MeshTextureCoords { //Cube_001 UV Coordinates + 72; + 0.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 1.000000;, + 0.000000; 1.000000;, + 0.031250; 0.500000;, + -0.000000; 0.500000;, + -0.000000; 0.468750;, + 0.031250; 0.468750;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.500000;, + 0.468750; 0.468750;, + 0.500000; 0.468750;, + 0.500000; 0.500000;, + 0.468750; 0.500000;, + 0.031250; 0.468750;, + 0.468750; 0.468750;, + 0.468750; 0.500000;, + 0.031250; 0.500000;, + 0.468750; 0.000000;, + 0.500000; 0.000000;, + 0.500000; 0.031250;, + 0.468750; 0.031250;, + 0.468750; 0.031250;, + 0.500000; 0.031250;, + 0.500000; 0.468750;, + 0.468750; 0.468750;, + 0.468750; 0.031250;, + 0.031250; 0.031250;, + 0.031250; 0.000000;, + 0.468750; 0.000000;, + 1.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 0.031250; 0.031250;, + 0.000000; 0.031250;, + 0.000000; 0.000000;, + 0.031250; 0.000000;, + 0.031250; 0.468750;, + -0.000000; 0.468750;, + 0.000000; 0.031250;, + 0.031250; 0.031250;, + 0.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 1.000000;, + 0.000000; 1.000000;, + 1.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.500000;, + 1.000000; 0.000000;, + 1.000000; 0.500000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 0.500000; 0.500000;, + 0.500000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.500000;; + } //End of Cube_001 UV Coordinates + } //End of Cube_001 Mesh + } //End of Cube +} //End of Root Frame +AnimationSet { + Animation { + {Cube} + AnimationKey { //Position + 2; + 4; + 0;3; 0.000000, 0.000000, 0.000000;;, + 1;3; 0.000000, 3.000000, 3.000000;;, + 2;3; 0.000000,-3.000000, 3.000000;;, + 3;3; 0.000000,-3.000000, 3.000000;;; + } + AnimationKey { //Rotation + 0; + 4; + 0;4; -1.000000, 0.000000, 0.000000, 0.000000;;, + 1;4; -0.923880,-0.382683,-0.000000, 0.000000;;, + 2;4; -0.923880, 0.382683, 0.000000, 0.000000;;, + 3;4; -0.923880, 0.382683, 0.000000, 0.000000;;; + } + AnimationKey { //Scale + 1; + 4; + 0;3; 5.000000, 5.000000, 5.000000;;, + 1;3; 5.000000, 5.000000, 5.000000;;, + 2;3; 5.000000, 5.000000, 5.000000;;, + 3;3; 5.000000, 5.000000, 5.000000;;; + } + } +} //End of AnimationSet diff --git a/mods/boost_cart/rails.lua b/mods/boost_cart/rails.lua new file mode 100644 index 0000000..a79a20d --- /dev/null +++ b/mods/boost_cart/rails.lua @@ -0,0 +1,152 @@ +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Common rail registrations + +local regular_rail_itemname = "default:rail" +if minetest.registered_nodes["carts:rail"] then + -- MTG Compatibility + regular_rail_itemname = "carts:rail" +end + +boost_cart:register_rail(":"..regular_rail_itemname, { + description =S("Rail"), + tiles = { + "carts_rail_straight.png", "carts_rail_curved.png", + "carts_rail_t_junction.png", "carts_rail_crossing.png" + }, + groups = boost_cart:get_rail_groups() +}) + +-- Moreores' copper rail +local copperrail_registered = false +if minetest.get_modpath("moreores") then + minetest.register_alias("carts:copperrail", "moreores:copper_rail") + + local raildef = minetest.registered_nodes["moreores:copper_rail"] + if raildef and minetest.raillike_group then + -- Ensure that this rail uses the same connect_to_raillike + raildef.groups.connect_to_raillike = minetest.raillike_group("rail") + minetest.override_item("moreores:copper_rail", { + groups = raildef.groups + }) + copperrail_registered = true + end +end +if not copperrail_registered then + boost_cart:register_rail(":carts:copperrail", { + description = S("Copper rail"), + tiles = { + "carts_rail_straight_cp.png", "carts_rail_curved_cp.png", + "carts_rail_t_junction_cp.png", "carts_rail_crossing_cp.png" + }, + groups = boost_cart:get_rail_groups() + }) + + minetest.register_craft({ + output = "carts:copperrail 12", + recipe = { + {"default:copper_ingot", "", "default:copper_ingot"}, + {"default:copper_ingot", "group:stick", "default:copper_ingot"}, + {"default:copper_ingot", "", "default:copper_ingot"}, + } + }) +end + +-- Power rail +boost_cart:register_rail(":carts:powerrail", { + description = S("Powered rail"), + tiles = { + "carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png", + "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png" + }, + groups = boost_cart:get_rail_groups(), + after_place_node = function(pos, placer, itemstack) + if not mesecon then + minetest.get_meta(pos):set_string("cart_acceleration", "0.5") + end + end, + mesecons = { + effector = { + action_on = function(pos, node) + boost_cart:boost_rail(pos, 0.5) + end, + action_off = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "0") + end, + }, + }, +}) + +minetest.register_craft({ + output = "carts:powerrail 6", + recipe = { + {"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"}, + {"default:steel_ingot", "group:stick", "default:steel_ingot"}, + {"default:steel_ingot", "default:mese_crystal_fragment", "default:steel_ingot"}, + } +}) + +-- Brake rail +boost_cart:register_rail(":carts:brakerail", { + description = S("Brake rail"), + tiles = { + "carts_rail_straight_brk.png", "carts_rail_curved_brk.png", + "carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png" + }, + groups = boost_cart:get_rail_groups(), + after_place_node = function(pos, placer, itemstack) + if not mesecon then + minetest.get_meta(pos):set_string("cart_acceleration", "-0.3") + end + end, + mesecons = { + effector = { + action_on = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "-0.3") + end, + action_off = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "0") + end, + }, + }, +}) + +minetest.register_craft({ + output = "carts:brakerail 6", + recipe = { + {"default:steel_ingot", "default:coal_lump", "default:steel_ingot"}, + {"default:steel_ingot", "group:stick", "default:steel_ingot"}, + {"default:steel_ingot", "default:coal_lump", "default:steel_ingot"}, + } +}) + +boost_cart:register_rail("boost_cart:startstoprail", { + description = S("Start-stop rail"), + tiles = { + "carts_rail_straight_ss.png", "carts_rail_curved_ss.png", + "carts_rail_t_junction_ss.png", "carts_rail_crossing_ss.png" + }, + groups = boost_cart:get_rail_groups(), + after_place_node = function(pos, placer, itemstack) + if not mesecon then + minetest.get_meta(pos):set_string("cart_acceleration", "halt") + end + end, + mesecons = { + effector = { + action_on = function(pos, node) + boost_cart:boost_rail(pos, 0.5) + end, + action_off = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "halt") + end, + }, + }, +}) + +minetest.register_craft({ + type = "shapeless", + output = "boost_cart:startstoprail 2", + recipe = {"carts:powerrail", "carts:brakerail"}, +}) diff --git a/mods/boost_cart/screenshot.png b/mods/boost_cart/screenshot.png new file mode 100644 index 0000000..e9eaa5b Binary files /dev/null and b/mods/boost_cart/screenshot.png differ diff --git a/mods/boost_cart/settingtypes.txt b/mods/boost_cart/settingtypes.txt new file mode 100644 index 0000000..d64d88a --- /dev/null +++ b/mods/boost_cart/settingtypes.txt @@ -0,0 +1,6 @@ +# Maximal speed of the cart in m/s (min=1, max=100) +boost_cart.speed_max (Maximal speed) int 10 1 100 + +# Maximal speed to which the driving player can accelerate the cart by punching +# from inside the cart. -1 will disable this feature. (min=-1, max=100) +boost_cart.punch_speed_max (Maximal punch speed) int 7 -1 100 \ No newline at end of file diff --git a/mods/boost_cart/sounds/cart_rail.1.ogg b/mods/boost_cart/sounds/cart_rail.1.ogg new file mode 100644 index 0000000..ba2d9ef Binary files /dev/null and b/mods/boost_cart/sounds/cart_rail.1.ogg differ diff --git a/mods/boost_cart/sounds/cart_rail.2.ogg b/mods/boost_cart/sounds/cart_rail.2.ogg new file mode 100644 index 0000000..1b930f0 Binary files /dev/null and b/mods/boost_cart/sounds/cart_rail.2.ogg differ diff --git a/mods/boost_cart/sounds/cart_rail.3.ogg b/mods/boost_cart/sounds/cart_rail.3.ogg new file mode 100644 index 0000000..2db4991 Binary files /dev/null and b/mods/boost_cart/sounds/cart_rail.3.ogg differ diff --git a/mods/boost_cart/textures/cart_bottom.png b/mods/boost_cart/textures/cart_bottom.png new file mode 100644 index 0000000..e74ef2b Binary files /dev/null and b/mods/boost_cart/textures/cart_bottom.png differ diff --git a/mods/boost_cart/textures/cart_side.png b/mods/boost_cart/textures/cart_side.png new file mode 100644 index 0000000..1bd55e7 Binary files /dev/null and b/mods/boost_cart/textures/cart_side.png differ diff --git a/mods/boost_cart/textures/cart_top.png b/mods/boost_cart/textures/cart_top.png new file mode 100644 index 0000000..b763025 Binary files /dev/null and b/mods/boost_cart/textures/cart_top.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing.png b/mods/boost_cart/textures/carts_rail_crossing.png new file mode 100644 index 0000000..1591c70 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing_brk.png b/mods/boost_cart/textures/carts_rail_crossing_brk.png new file mode 100644 index 0000000..0e6adfa Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing_brk.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing_cp.png b/mods/boost_cart/textures/carts_rail_crossing_cp.png new file mode 100644 index 0000000..b2cd736 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing_cp.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing_dtc.png b/mods/boost_cart/textures/carts_rail_crossing_dtc.png new file mode 100644 index 0000000..8558c02 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing_dtc.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing_dtc_on.png b/mods/boost_cart/textures/carts_rail_crossing_dtc_on.png new file mode 100644 index 0000000..c5d0bf4 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing_dtc_on.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing_pwr.png b/mods/boost_cart/textures/carts_rail_crossing_pwr.png new file mode 100644 index 0000000..ca9eac4 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing_pwr.png differ diff --git a/mods/boost_cart/textures/carts_rail_crossing_ss.png b/mods/boost_cart/textures/carts_rail_crossing_ss.png new file mode 100644 index 0000000..d7b945a Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_crossing_ss.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved.png b/mods/boost_cart/textures/carts_rail_curved.png new file mode 100644 index 0000000..8db11f3 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved_brk.png b/mods/boost_cart/textures/carts_rail_curved_brk.png new file mode 100644 index 0000000..03f8bda Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved_brk.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved_cp.png b/mods/boost_cart/textures/carts_rail_curved_cp.png new file mode 100644 index 0000000..b950453 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved_cp.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved_dtc.png b/mods/boost_cart/textures/carts_rail_curved_dtc.png new file mode 100644 index 0000000..67cc18b Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved_dtc.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved_dtc_on.png b/mods/boost_cart/textures/carts_rail_curved_dtc_on.png new file mode 100644 index 0000000..b000d7b Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved_dtc_on.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved_pwr.png b/mods/boost_cart/textures/carts_rail_curved_pwr.png new file mode 100644 index 0000000..11d2dbf Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved_pwr.png differ diff --git a/mods/boost_cart/textures/carts_rail_curved_ss.png b/mods/boost_cart/textures/carts_rail_curved_ss.png new file mode 100644 index 0000000..934f499 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_curved_ss.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight.png b/mods/boost_cart/textures/carts_rail_straight.png new file mode 100644 index 0000000..36fdf4e Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight_brk.png b/mods/boost_cart/textures/carts_rail_straight_brk.png new file mode 100644 index 0000000..d68e396 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight_brk.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight_cp.png b/mods/boost_cart/textures/carts_rail_straight_cp.png new file mode 100644 index 0000000..232cee8 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight_cp.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight_dtc.png b/mods/boost_cart/textures/carts_rail_straight_dtc.png new file mode 100644 index 0000000..85a76b2 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight_dtc.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight_dtc_on.png b/mods/boost_cart/textures/carts_rail_straight_dtc_on.png new file mode 100644 index 0000000..68bfa14 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight_dtc_on.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight_pwr.png b/mods/boost_cart/textures/carts_rail_straight_pwr.png new file mode 100644 index 0000000..252dea4 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight_pwr.png differ diff --git a/mods/boost_cart/textures/carts_rail_straight_ss.png b/mods/boost_cart/textures/carts_rail_straight_ss.png new file mode 100644 index 0000000..b0f537e Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_straight_ss.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction.png b/mods/boost_cart/textures/carts_rail_t_junction.png new file mode 100644 index 0000000..0b55a0a Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction_brk.png b/mods/boost_cart/textures/carts_rail_t_junction_brk.png new file mode 100644 index 0000000..d6fc78a Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction_brk.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction_cp.png b/mods/boost_cart/textures/carts_rail_t_junction_cp.png new file mode 100644 index 0000000..e266bcc Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction_cp.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction_dtc.png b/mods/boost_cart/textures/carts_rail_t_junction_dtc.png new file mode 100644 index 0000000..b69c649 Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction_dtc.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction_dtc_on.png b/mods/boost_cart/textures/carts_rail_t_junction_dtc_on.png new file mode 100644 index 0000000..2a21d1f Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction_dtc_on.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction_pwr.png b/mods/boost_cart/textures/carts_rail_t_junction_pwr.png new file mode 100644 index 0000000..a2e0f1d Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction_pwr.png differ diff --git a/mods/boost_cart/textures/carts_rail_t_junction_ss.png b/mods/boost_cart/textures/carts_rail_t_junction_ss.png new file mode 100644 index 0000000..303c6cf Binary files /dev/null and b/mods/boost_cart/textures/carts_rail_t_junction_ss.png differ diff --git a/mods/boost_cart/textures/templates/crossing.png b/mods/boost_cart/textures/templates/crossing.png new file mode 100644 index 0000000..67b7168 Binary files /dev/null and b/mods/boost_cart/textures/templates/crossing.png differ diff --git a/mods/boost_cart/textures/templates/curved.png b/mods/boost_cart/textures/templates/curved.png new file mode 100644 index 0000000..a9070dc Binary files /dev/null and b/mods/boost_cart/textures/templates/curved.png differ diff --git a/mods/boost_cart/textures/templates/straight.png b/mods/boost_cart/textures/templates/straight.png new file mode 100644 index 0000000..9911b36 Binary files /dev/null and b/mods/boost_cart/textures/templates/straight.png differ diff --git a/mods/boost_cart/textures/templates/t_junction.png b/mods/boost_cart/textures/templates/t_junction.png new file mode 100644 index 0000000..8c6b621 Binary files /dev/null and b/mods/boost_cart/textures/templates/t_junction.png differ diff --git a/mods/brewing/.luacheckrc b/mods/brewing/.luacheckrc new file mode 100644 index 0000000..26798ef --- /dev/null +++ b/mods/brewing/.luacheckrc @@ -0,0 +1,20 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", + "playerphysics", + "flowers" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/brewing/README.md b/mods/brewing/README.md new file mode 100644 index 0000000..c69a9d8 --- /dev/null +++ b/mods/brewing/README.md @@ -0,0 +1,54 @@ +# Brewing [brewing] + +Create incredible potions for Minetest. + +**This mod requires Player Physics mod as hard dependency.** + + +## API + +### brewing.register_potion_craft + +``` + brewing.register_potion_craft({ + effect= "jump", + description= "Jump", --optional. if not, the description is the uppercased effect. + type= "add", + level= 1, + recipe = {'flowers:tulip', '', ''} +}) +``` + +- Effect: It is the effect on the player: "antigrav", "speed", "health", "ouhealth", "air", "ouair", "invisibility", "resist_fire" and "teleport". + +[ou= only one use] + +- Type: "add" (positive) or "sub" (negative) + +- Level: Intensity of the effect (1 to 3) + +- Recipe: The 3 ingredients to craft the potion. The recipe is SHAPED (the order matters). + +## Duration Time of the Effects + +- For Jump & Speed effects= 60s (lvl1), 30s (lvl2) and 15s (lvl3). +- For Health, Air and Resist Fire effects= 15s (lvl1), 3s (lvl2) and 60s (lvl3). +- For Invisibility effect= 3s (lvl1), 6s (lvl2) and 9s (lvl3). +- For Teleport effect= 5m (lvl1), 120m (lvl2) and 1h (lvl3). +- Note: "One Use Health" and "One Use Air" obviously have no time. + +## Recipe Book + +Click on the Recipe Book icon to check the potion crafting. + +## Dependencies + +- default, flowers + +Click on the Recipe Book icon to check the potion crafting. + +## Licenses + +- Code: GPL v3.0 +- Textures: CC BY-SA 4.0 +- Sounds: They have different licenses, see the 'sounds/LICENSE.MD' file. diff --git a/mods/brewing/api.lua b/mods/brewing/api.lua new file mode 100644 index 0000000..9c3361d --- /dev/null +++ b/mods/brewing/api.lua @@ -0,0 +1,90 @@ +local S, modname = ... + +-- Function to register the potions +brewing.register_potion = function(sname, name, fname, def) + local tps = {"add", "sub"} + for t=1, #tps do + for i=1, #def.types do + local sdata = def.types[i] + local tps_sign + if tps[t] == "add" then + tps_sign= "+" + else + tps_sign= "-" + end + local item_def = { + description = S("@1 Potion", name) .. " ("..S("lvl")..":".." "..tps_sign..sdata.type..")", + inventory_image = "potions_bottle.png^potions_"..(def.texture or sname)..".png^potions_"..tps[t]..sdata.type..".png", + drawtype = "plantlike", + paramtype = "light", + walkable = false, + groups = {dig_immediate=3,attached_node=1}, + --sounds = default.node_sound_glass_defaults(), + } + item_def.tiles = {item_def.inventory_image} + local flags = { + inv = false, + type = tps[t], + } + if t == 2 then + flags.inv = true + end + for key, val in pairs(brewing.effects[def.effect](sname, name, fname, sdata, flags)) do + item_def[key] = val + end + for key, val in pairs(sdata.set) do + item_def[key] = val + end + item_def["time"] = sdata.time + for key, val in pairs(sdata.effects) do + item_def.potions[key] = val + end + minetest.register_node(fname.."_"..tps[t]..sdata.type, item_def) + end + end +end + +-- Function to register the potion crafts + +brewing.register_potion_craft = function(def) + brewing.craft_list[#brewing.craft_list+1] = {["effect"] = def.effect, ["description"] = def.description, ["type"] = def.type, ["level"] = def.level, ["recipe"] = def.recipe} +end + +brewing.get_craft_result = function(ingredients) + --recipes are 2x3 + local output + local match + --To get the output of the first potion: minetest.chat_send_player("singleplayer", brewing.craftlist[1][1]) + --To get the first ingredient of the first potion: minetest.chat_send_player("singleplayer", brewing.craftlist[1][2][1][1]) + --for key, potion_craft in pairs(brewing.craftlist) do + for index, potion_craft in ipairs(brewing.craft_list) do + --To get the output of the potion: minetest.chat_send_player("singleplayer", potion_craft[1]) + --To get the first ingredient of the 1st row of the potion: minetest.chat_send_player("singleplayer", potion_craft[2][1][1]) + --To get the first ingredient of the 2nd row of the potion: minetest.chat_send_player("singleplayer", potion_craft[2][2][1]) + --To get the second ingredient of the 2nd row of the potion: minetest.chat_send_player("singleplayer", potion_craft[2][2][2]) + --check recipe concordance + --firstly in the 2 rows + for i= 1, 3, 1 do + match = false + if (potion_craft["recipe"][i] == ingredients[i]) or (potion_craft["recipe"][i] == '') then + match = true + end + if not match then --if an ingredient does not match + break + end + end + if match then --if coincidence with a potion_craft + output = modname ..":" .. potion_craft["effect"] .. "_".. potion_craft["type"] .. math.abs(potion_craft["level"]) + break + end + end + local item + if match == true then + item = ItemStack(output) + --minetest.chat_send_player("singleplayer", "match") + else + item = nil + --minetest.chat_send_player("singleplayer", "unmatched") + end + return item +end diff --git a/mods/brewing/brewing.conf b/mods/brewing/brewing.conf new file mode 100644 index 0000000..d0f4f39 --- /dev/null +++ b/mods/brewing/brewing.conf @@ -0,0 +1,9 @@ +#Change the name of the ignitor +ignitor_name = brewing:magic_dust +ignitor_image = brewing_ignitor_dust_gray.png + +flask_name = vessels:glass_bottle +#How much flask to be filled by each water bucket +filled_flasks = 5 + +liquid = bucket:bucket_water, bucket:bucket_river_water diff --git a/mods/brewing/cauldron.lua b/mods/brewing/cauldron.lua new file mode 100644 index 0000000..d88e231 --- /dev/null +++ b/mods/brewing/cauldron.lua @@ -0,0 +1,361 @@ +local S = ... + +local function uppercase(str) + return (str:gsub("^%l", string.upper)) +end + +-- Cauldron Form + +local formspec = + "size[8,9;]".. + "image_button[1,0;1,1;default_book_written.png;btn_recipe_book;]".. + "tooltip[btn_recipe_book;"..S("Recipe Book").."]".. + "label[0,1;"..S("Recipe").."]".. + "list[context;ing1;1,1;1,1;]".. + "list[context;ing2;2,1;1,1;]".. + "list[context;ing3;3,1;1,1;]".. + "image[3,2;1,1;brewing_arrow_ing_gray.png]".. + "image[0,4;1,1;"..brewing.settings.ignitor_image.."]".. + "list[context;ignitor;1,4;1,1;]".. + "image[2,4;1,1;brewing_arrow_gray.png]".. + "image[3,4;1,1;brewing_bucket_water_gray.png]".. + "list[context;water;4,4;1,1;]".. + "image[4,3;1,1;brewing_arrow_gray.png^[transformR90]]".. + "image[4,2;1,1;brewing_cauldron_form.png]".. + "image[5,0;1,1;brewing_vessels_glass_bottle_gray.png]".. + "list[current_name;flask;5,1;1,1;]".. + "image[5,2;1,1;brewing_arrow_gray.png]".. + "label[6,1;".. brewing.settings.filled_flasks .."x]".. + "list[current_name;dst;6,2;1,1;]".. + "list[current_player;main;0,5;8,4;]" + +--Recipe Book Form + +local function create_recipe_book_form() + local recipe_book_formspec = + "size[8,8;]".. + "real_coordinates[true]".. + "button_exit[3.5,6.6;1,1;btn_exit;"..S("Close").."]" + --Create the cells + local cells = "" + local potion_names = {} + local potion_idxs = "" + local ing1_idxs = "" + local ing2_idxs = "" + local ing3_idxs = "" + for index, potion_craft in ipairs(brewing.craft_list) do + local potion_texture + if potion_craft["effect"] == "jump" then + potion_texture = "potions_jump.png" + else + potion_texture = "potions_"..potion_craft["effect"]..".png" + end + local potion_exists + for idx, value in ipairs(potion_names) do + if value == potion_texture then + potion_exists = idx + else + potion_exists = nil + end + end + local potion_idx + if potion_exists then + potion_idx = potion_exists + else + local next_idx = #potion_names+1 + potion_names[next_idx]= potion_texture + potion_idx = next_idx + end + local ing_idxs = {} + for i = 1, 3, 1 do + local ingredient_image + if potion_craft["recipe"][i] == "" then + ingredient_image = "brewing_blank_ingredient.png" + else + ingredient_image = minetest.registered_items[potion_craft["recipe"][i]].inventory_image + if not ingredient_image then + ingredient_image = "brewing_blank_ingredient.png" + end + end + ing_idxs[i] = tostring(index).."="..ingredient_image + end + if index > 1 then + cells = cells .."," + end + local effect_type + if potion_craft["type"] == "add" then + effect_type = "+" + else + effect_type = "-" + end + local potion_name = "brewing:"..potion_craft["effect"].."_"..potion_craft["type"]..math.abs(potion_craft["level"]) + --minetest.chat_send_all(potion_name) + local potion_time= minetest.registered_items[potion_name].time + if potion_time == nil then + potion_time = "-" + else + potion_time = potion_time.."s" + end + local potion_craft_description + if potion_craft["description"] then + potion_craft_description = S(potion_craft["description"]) + else + potion_craft_description = S(uppercase(potion_craft["effect"])) + end + cells = cells .. potion_idx .. ",".. potion_craft_description.. ",".. S("lvl").. " ".. effect_type .. potion_craft["level"]..','..index..','..index..','..index..','..potion_time + if index > 1 then + ing1_idxs = ing1_idxs .. ',' + ing2_idxs = ing2_idxs .. ',' + ing3_idxs = ing3_idxs .. ',' + end + ing1_idxs = ing1_idxs .. ing_idxs[1] + ing2_idxs = ing2_idxs .. ing_idxs[2] + ing3_idxs = ing3_idxs .. ing_idxs[3] + end + for idx, value in ipairs(potion_names) do + if idx > 1 then + potion_idxs = potion_idxs.."," + end + potion_idxs = potion_idxs .. tostring(idx).."="..value + end + --minetest.chat_send_all(potion_idxs) + --local def = minetest.registered_items[potion_name] + recipe_book_formspec = + recipe_book_formspec .. + "tablecolumns[image,"..potion_idxs..";text;text;image,"..ing1_idxs..";image,"..ing2_idxs..";image,"..ing3_idxs..";text]".. + "table[0.375,0.375;7.2,6;table_potions;"..cells..";0]" + return recipe_book_formspec +end + +-- +-- Node callback functions +-- + +local function can_dig(pos, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + return inv:is_empty("water") and inv:is_empty("dst") and inv:is_empty("flask") +end + +local function is_valid_water(liquid_to_check) + local isvalid = false + for key, value in pairs(brewing.settings.liquid) do + if value == liquid_to_check then + isvalid = true + break + end + end + return isvalid +end + +--when an item is put into the inventory +local function allow_metadata_inventory_put(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + if listname == "water" then + local water_name= stack:get_name() + --check if is a valid water liquid + if is_valid_water(water_name) == true then + return stack:get_count() + else + return 0 + end + elseif listname == "ignitor" then + local iswater= stack:get_name() + if iswater == brewing.settings.ignitor_name then + return stack:get_count() + else + return 0 + end + elseif listname == "flask" then + local iswater= stack:get_name() + if iswater == brewing.settings.flask_name then + return stack:get_count() + else + return 0 + end + elseif listname == "dst" then + return 0 + else + return stack:get_count() + end +end + +--when an item is moved inside the inventory +local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local stack = inv:get_stack(from_list, from_index) + return allow_metadata_inventory_put(pos, to_list, to_index, stack, player) +end + +local function allow_metadata_inventory_take(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + return stack:get_count() +end + +local function decrease_stacks(pos, ing_listname, ing_stack, howmuch) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local count = ing_stack:get_count() + if count > 0 then + count = count - howmuch + if count < 0 then + count = 0 + end + ing_stack:set_count(count) + end + inv:set_stack(ing_listname, 1, ing_stack) +end + +local function try_to_make_potion(pos, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local ing1, ing2, ing3, ignitor, water, flask + local ing1_name, ing2_name, ing3_name, ignitor_name, water_name, flask_name + local flask_count + local brewed + local infotext + local update = true + while update do + update = false + ing1= inv:get_stack("ing1", 1) + ing1_name = ing1:get_name() + ing2= inv:get_stack("ing2", 1) + ing2_name = ing2:get_name() + ing3= inv:get_stack("ing3", 1) + ing3_name = ing3:get_name() + ignitor= inv:get_stack("ignitor", 1) + ignitor_name = ignitor:get_name() + water= inv:get_stack("water", 1) + water_name = water:get_name() + flask= inv:get_stack("flask", 1) + flask_name = flask:get_name() + flask_count = flask:get_count() + + --The list: {ingredient_list_name, ingredient_stack, ingredient_name, how_much_decrements_when_crafted} + local ing_list = {{"ing1", ing1, ing1_name, 1}, {"ing2", ing2, ing2_name, 1}, {"ing3", ing3, ing3_name, 1}, {"ignitor", ignitor, ignitor_name, 1}, {"flask", flask, flask_name, brewing.settings.filled_flasks}} + + local valid_water= is_valid_water(water_name) + + --minetest.chat_send_player("singleplayer", brewing.settings.ignitor_name) + + if ignitor_name== brewing.settings.ignitor_name and valid_water and flask_name== brewing.settings.flask_name and flask_count >= brewing.settings.filled_flasks then + --brewed, afterbrewed = minetest.get_craft_result({method = "normal", width =3, items = {ingplus1, ingplus2, ingplus3, ingminus1, ingminus2, ingminus3, ignitor, water, flask}}) + brewed = brewing.get_craft_result({ing1_name, ing2_name, ing3_name}) + if brewed ~= nil then + if inv:room_for_item("dst", brewed) then + brewed:set_count(brewing.settings.filled_flasks) --How much flask will be filled + inv:add_item("dst", brewed) --Make the potion/s!!! + --Decrease stacks of the ingredients + local ing_stack + local ing_list_name + for key, ing in pairs(ing_list) do + ing_list_name= ing[1] + ing_stack = ing[2] + local howmuch = ing[4] + decrease_stacks(pos, ing_list_name, ing_stack, howmuch) + end + --replace the water bucket--> + inv:set_stack("water", 1, ItemStack("bucket:bucket_empty 1")) + brewing.make_sound("player", player, "brewing_magic_realization") + --Message to player + --minetest.chat_send_player("singleplayer", S("Potion created!)") + end + end + end + infotext = "" + end + -- + -- Set meta values + -- + meta:set_string("formspec", formspec) + meta:set_string("infotext", infotext) + +end + +--Register Cauldron Node + +minetest.register_node("brewing:magic_cauldron", { + description = S("Magic Cauldron"), + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.375, -0.5, 0.5, -0.3125, 0.5}, -- NodeBox1 + {-0.5, -0.3125, -0.5, 0.5, 0.5, -0.375}, -- NodeBox2 + {-0.5, -0.3125, 0.375, 0.5, 0.5, 0.5}, -- NodeBox3 + {-0.5, -0.3125, -0.375, -0.375, 0.5, 0.375}, -- NodeBox4 + {0.375, -0.3125, -0.375, 0.5, 0.5, 0.375}, -- NodeBox5 + {0.375, -0.5, -0.5, 0.5, -0.375, -0.375}, -- NodeBox6 + {0.375, -0.5, 0.375, 0.5, -0.375, 0.5}, -- NodeBox7 + {-0.5, -0.5, -0.5, -0.375, -0.375, -0.375}, -- NodeBox8 + {-0.5, -0.5, 0.375, -0.375, -0.375, 0.5}, -- NodeBox9 + {-0.375, 0.3125, -0.375, 0.375, 0.375, 0.375}, -- NodeBox10 + }, + }, + tiles = { + "brewing_cauldron_top.png", "brewing_cauldron_side.png", + "brewing_cauldron_side.png", "brewing_cauldron_side.png", + "brewing_cauldron_side.png", "brewing_cauldron_side.png" + }, + use_texture_alpha = true, + paramtype2 = "facedir", + groups = {cracky=2}, + legacy_facedir_simple = true, + is_ground_content = false, + can_dig = can_dig, + sounds = default.node_sound_stone_defaults(), + drop = "brewing:magic_cauldron", + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", formspec) + local inv = meta:get_inventory() + inv:set_size('ing1', 1) + inv:set_size('ing2', 1) + inv:set_size('ing3', 1) + inv:set_size('ignitor', 1) + inv:set_size('water', 1) + inv:set_size('flask', 1) + inv:set_size('dst', 1) + end, + + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "ing1", drops) + default.get_inventory_drops(pos, "ing2", drops) + default.get_inventory_drops(pos, "ing3", drops) + default.get_inventory_drops(pos, "ignitor", drops) + default.get_inventory_drops(pos, "water", drops) + default.get_inventory_drops(pos, "flask", drops) + default.get_inventory_drops(pos, "dst", drops) + drops[#drops+1] = "brewing:magic_cauldron" + minetest.remove_node(pos) + return drops + end, + + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + try_to_make_potion(pos, player) + end, + + on_metadata_inventory_put = function(pos, listname, index, stack, player) + try_to_make_potion(pos, player) + end, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, + + on_receive_fields = function(pos, formname, fields, sender) + local player_name = sender:get_player_name() + if fields.btn_recipe_book then + minetest.show_formspec(player_name, "brewing:recipe_book", create_recipe_book_form()) + end + end, +}) + + diff --git a/mods/brewing/commands.lua b/mods/brewing/commands.lua new file mode 100644 index 0000000..b5d2f92 --- /dev/null +++ b/mods/brewing/commands.lua @@ -0,0 +1,13 @@ +minetest.register_chatcommand("effect", { + params = "none", + description = "get effect info", + func = function(name, param) + minetest.chat_send_player(name, "effects:") + local potions_e = brewing.players[name] + if potions_e~=nil then + for potion_name, val in pairs(potions_e) do + minetest.chat_send_player(name, potion_name .. "=" .. val) + end + end + end, +}) diff --git a/mods/brewing/effects.lua b/mods/brewing/effects.lua new file mode 100644 index 0000000..506d2e3 --- /dev/null +++ b/mods/brewing/effects.lua @@ -0,0 +1,227 @@ +local S = ... + +local function drink_particles(player) + local pos = player:get_pos() + minetest.add_particlespawner({ + amount = 20, + time = 0.001, + minpos = pos, + maxpos = pos, + minvel = vector.new(-2,-2,-2), + maxvel = vector.new(2,2,2), + minacc = {x=0, y=0, z=0}, + maxacc = {x=0, y=0, z=0}, + minexptime = 1.1, + maxexptime = 1.5, + minsize = 1, + maxsize = 2, + collisiondetection = false, + vertical = false, + texture = "bubble.png", + --playername = player:get_player_name() + }) +end + +--The Engine (Potions/Effects) Part!!! + +brewing.effects = {} + +brewing.effects.phys_override = function(effect_name, description_name, potion_name, sdata, flags) + local def = { + on_use = function(itemstack, user, pointed_thing) + brewing.make_sound("player", user, "brewing_magic_sound") + drink_particles(user) + brewing.grant(user, effect_name, potion_name.."_"..flags.type..sdata.type, description_name, sdata.time or 0, flags) + itemstack:take_item() + return itemstack + end, + potions = { + speed = 0, + jump = 0, + gravity = 0, + tnt = 0, + air = 0, + }, + } + return def +end + +brewing.effects.fixhp = function(sname, name, fname, sdata, flags) + local def = { + on_use = function(itemstack, user, pointed_thing) + brewing.make_sound("player", user, "brewing_magic_sound") + drink_particles(user) + for i=0, (sdata.time or 0) do + minetest.after(i, function() + local hp = user:get_hp() + if flags.inv==true then + hp = hp - (sdata.hp or 3) + else + hp = hp + (sdata.hp or 3) + end + hp = math.min(20, hp) + hp = math.max(0, hp) + user:set_hp(hp) + end) + end + itemstack:take_item() + return itemstack + end, + } + def.mobs = { + on_near = def.on_use, + } + return def +end + +brewing.effects.air = function(sname, name, fname, sdata, flags) + local def = { + on_use = function(itemstack, user, pointed_thing) + brewing.make_sound("player", user, "brewing_magic_sound") + drink_particles(user) + local potions_e = brewing.players[user:get_player_name()] + potions_e.air = potions_e.air + (sdata.time or 0) + for i=0, (sdata.time or 0) do + minetest.after(i, function(v_user, v_sdata) + local br = v_user:get_breath() + if flags.inv==true then + br = br - (v_sdata.br or 3) + else + br = br + (v_sdata.br or 3) + end + br = math.min(11, br) + br = math.max(0, br) + v_user:set_breath(br) + if i==(v_sdata.time or 0) then + potions_e.air = potions_e.air - (v_sdata.time or 0) + end + end, user, sdata) + end + itemstack:take_item() + return itemstack + end, + } + return def +end + +brewing.effects.invisibility = function(sname, name, fname, sdata, flags) + local def = { + on_use = function(itemstack, user, pointed_thing) + brewing.make_sound("player", user, "brewing_magic_sound") + drink_particles(user) + user:set_nametag_attributes({ + color = {a = 0, r = 255, g = 255, b = 255} + }) + user:set_properties({ + visual_size = {x = 0, y = 0}, + }) + local user_name = user:get_player_name() + minetest.chat_send_player(user_name, S("You are invisible thanks to a invisibility potion.")) + minetest.after(sdata.time, function(player, player_name) + if minetest.get_player_by_name(player_name) then + player:set_nametag_attributes({ + color = {a = 255, r = 255, g = 255, b = 255} + }) + player:set_properties({ + visual_size = {x = 1, y = 1}, + }) + minetest.chat_send_player(player_name, S("You are visible again.")) + end + end, user, user_name) + itemstack:take_item() + return itemstack + end, + } + return def +end + +brewing.effects.resist_fire = function(sname, name, fname, sdata, flags) + local def = { + on_use = function(itemstack, user, pointed_thing) + brewing.make_sound("player", user, "brewing_magic_sound") + drink_particles(user) + local user_name = user:get_player_name() + brewing.players[user_name]["resist_fire"] = true + user:get_meta():set_string("brewing:resist_fire", "true") + minetest.chat_send_player(user_name, S("You are able to resist fire thanks to a Resist Fire Potion.")) + minetest.after(sdata.time, function(player, player_name) + if minetest.get_player_by_name(player_name) then + brewing.players[player_name]["resist_fire"] = false + minetest.chat_send_player(player_name, S("The effect of the Resist Potion has worn off.")) + end + end, user, user_name) + itemstack:take_item() + return itemstack + end, + } + return def +end + +brewing.effects.teleport = function(sname, name, fname, sdata, flags) + local def = { + on_use = function(itemstack, user, pointed_thing) + brewing.make_sound("player", user, "brewing_magic_sound") + local user_name = user:get_player_name() + local teleport_pos = brewing.players[user_name]["teleport"] + if not teleport_pos then + brewing.players[user_name]["teleport"] = user:get_pos() + brewing.make_sound("player", user, "brewing_magic_sound") + minetest.chat_send_player(user_name, S("Your position was saved for teleport.")) + drink_particles(user) + minetest.after(sdata.time, function(player, player_name) + if minetest.get_player_by_name(player_name) and brewing.players[player_name]["teleport"] then + brewing.players[player_name]["teleport"] = nil + minetest.chat_send_player(player_name, S("The effect of the Teleport Potion has worn off.")) + end + end, user, user_name) + else + local teleport_node = minetest.get_node_or_nil(teleport_pos) + if not teleport_node then + minetest.get_voxel_manip():read_from_map(teleport_pos, teleport_pos) + teleport_node = minetest.get_node(teleport_pos) + end + if minetest.registered_nodes[teleport_node.name].drawtype == "airlike" then + user:set_pos(teleport_pos) + drink_particles(user) + brewing.make_sound("player", user, "brewing_magic_sound") + else + brewing.make_sound("player", user, "brewing_magic_fail") + minetest.chat_send_player(user_name, S("Failed teleport: The position is ocupied")) + end + brewing.players[user_name]["teleport"] = nil + end + itemstack:take_item() + return itemstack + end, + } + return def +end + +brewing.grant = function(player, effect_name, potion_name, description_name, time, flags) + local rootdef = minetest.registered_items[potion_name] + if rootdef == nil then + return + end + if rootdef.potions == nil then + return + end + local def = {} + for name, val in pairs(rootdef.potions) do + def[name] = val + end + if flags.inv==true then + def.gravity = 0 - def.gravity + def.speed = 0 - def.speed + def.jump = 0 - def.jump + def.tnt = 0 - def.tnt + end + local player_name = player:get_player_name() + playerphysics.add_physics_factor(player, effect_name, potion_name, def[effect_name]) + minetest.chat_send_player(player_name, S("You are under the effects of the").." "..description_name.." "..S("potion.")) + minetest.after(time, function() + if minetest.get_player_by_name(player_name)~=nil then + playerphysics.remove_physics_factor(player, effect_name, potion_name) + minetest.chat_send_player(player_name, S("The effects of the").." "..description_name.." "..S("potion have worn off.")) + end + end) +end diff --git a/mods/brewing/init.lua b/mods/brewing/init.lua new file mode 100644 index 0000000..e7b4de2 --- /dev/null +++ b/mods/brewing/init.lua @@ -0,0 +1,24 @@ +local modname = minetest.get_current_modname() + +local S = minetest.get_translator(modname) + +local modpath = minetest.get_modpath(modname) + +--global variables +brewing = {} +brewing.settings = {} +brewing.craft_list = {} --for potion crafts +brewing.effects = {} --for the player effects +brewing.players = {} --for the players + +assert(loadfile(modpath.. "/settings.lua"))(modpath) +assert(loadfile(modpath.. "/api.lua"))(S, modname) +assert(loadfile(modpath.. "/effects.lua"))(S) +assert(loadfile(modpath.. "/potions.lua"))(S) +assert(loadfile(modpath.. "/potion_crafts.lua"))() +assert(loadfile(modpath.. "/cauldron.lua"))(S) +assert(loadfile(modpath.. "/nodes.lua"))(S) +assert(loadfile(modpath.. "/player.lua"))() +assert(loadfile(modpath.. "/sound.lua"))() +assert(loadfile(modpath.. "/mushroom.lua"))(S) +assert(loadfile(modpath.. "/commands.lua"))() diff --git a/mods/brewing/locale/brewing.es.tr b/mods/brewing/locale/brewing.es.tr new file mode 100644 index 0000000..71b5d20 --- /dev/null +++ b/mods/brewing/locale/brewing.es.tr @@ -0,0 +1,41 @@ +# textdomain: brewing +Air=Aire +Anti-Gravity=Anti-gravedad +Close=Cerrar +Cortinarius Violaceus=Cortinarius Violaceus +Gliophorus Viridis=Gliophorus Viridis +Green Hygrocybe=Green Hygrocybe +Health=Salud +Jump=Salto +Invisibility=Invisibilidad +Resist Fire=Resistir Fuego +Teleport=Teletransporte +Leaiana Mycena=Leaiana Mycena +lvl=nivel +Magic Cauldron= Caldero mágico +Magic Crystal=Cristal mágico +Magic Dust= Polvo mágico +Magic Gem=Gema mágica +Magic Ore=Mineral mágico +One Use Air=Aire (un solo uso) +Ouair=Aire (un solo uso) +One Use Health=Salud (un solo uso) +Ouhealth=Salud (un solo uso) +Orange Mycena=Orange Mycena +Pluteus Chrysophaeus=Pluteus Chrysophaeus +potion.=. +potion have worn off.=han desaparecido. +@1 Potion=Poción @1 +Recipe=Receta +Recipe Book=Libro de recetas +Speed=Velocidad +The effects of the=Los efectos de la poción +type=tipo +You are under the effects of the=Estás bajos los efectos de la poción +You are invisible thanks to a invisibility potion.=Eres invisible gracias a una poción de invisibilidad. +You are visible again.=Eres visible otra vez. +You are able to resist fire thanks to a Resist Fire Potion.=Eres capaz de resistir el fuego gracias a la poción Resistir Fuego. +The effect of the Resist Potion has worn off.=El efecto de la poción Resistir Fuego ha desaparecido. +The effect of the Teleport Potion has worn off.=El efecto de la poción Teletransporte ha desaparecido. +Your position was saved for teleport.= Se ha guardado tu posición para teletransportarte. +Failed teleport: The position is ocupied= Teletransporte fallido: La posición estaba ocupada diff --git a/mods/brewing/mod.conf b/mods/brewing/mod.conf new file mode 100644 index 0000000..a64c6e4 --- /dev/null +++ b/mods/brewing/mod.conf @@ -0,0 +1,3 @@ +name = brewing +description = Magic Brewing System +depends = playerphysics, default, flowers diff --git a/mods/brewing/models/brewing._lua b/mods/brewing/models/brewing._lua new file mode 100644 index 0000000..c266d50 --- /dev/null +++ b/mods/brewing/models/brewing._lua @@ -0,0 +1,32 @@ +-- GENERATED CODE +-- Node Box Editor, version 0.9.0 +-- Namespace: test + +minetest.register_node("test:node_1", { + tiles = { + "default_wood.png", + "default_wood.png", + "default_wood.png", + "default_wood.png", + "default_wood.png", + "default_wood.png" + }, + drawtype = "nodebox", + paramtype = "light", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.375, -0.5, 0.5, -0.3125, 0.5}, -- NodeBox1 + {-0.5, -0.3125, -0.5, 0.5, 0.5, -0.375}, -- NodeBox2 + {-0.5, -0.3125, 0.375, 0.5, 0.5, 0.5}, -- NodeBox3 + {-0.5, -0.3125, -0.375, -0.375, 0.5, 0.375}, -- NodeBox4 + {0.375, -0.3125, -0.375, 0.5, 0.5, 0.375}, -- NodeBox5 + {0.375, -0.5, -0.5, 0.5, -0.375, -0.375}, -- NodeBox6 + {0.375, -0.5, 0.375, 0.5, -0.375, 0.5}, -- NodeBox7 + {-0.5, -0.5, -0.5, -0.375, -0.375, -0.375}, -- NodeBox8 + {-0.5, -0.5, 0.375, -0.375, -0.375, 0.5}, -- NodeBox9 + {-0.375, 0.3125, -0.375, 0.375, 0.375, 0.375}, -- NodeBox10 + } + } +}) + diff --git a/mods/brewing/models/cauldron.nbe b/mods/brewing/models/cauldron.nbe new file mode 100644 index 0000000..cc85b53 Binary files /dev/null and b/mods/brewing/models/cauldron.nbe differ diff --git a/mods/brewing/mushroom.lua b/mods/brewing/mushroom.lua new file mode 100644 index 0000000..57cbe77 --- /dev/null +++ b/mods/brewing/mushroom.lua @@ -0,0 +1,217 @@ +local S = ... + +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- Orange Mycena + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = "default:dirt_with_coniferous_litter", + sidelen = 16, + fill_ratio = 0.0005, + biomes = {"coniferous_forest"}, + decoration = "brewing:orange_mycena", + height = 1, + }) +end + +minetest.register_node("brewing:orange_mycena", { + description = S("Orange Mycena"), + tiles = {"brewing_orange_mycena.png"}, + inventory_image = "brewing_orange_mycena.png", + wield_image = "brewing_orange_mycena.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + stack_max = 99, + groups = {snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(3), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +-- Cortinarius Violaceus + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = "default:dirt_with_coniferous_litter", + sidelen = 16, + fill_ratio = 0.0005, + biomes = {"coniferous_forest"}, + decoration = "brewing:cortinarius_violaceus", + height = 1, + }) +end + +minetest.register_node("brewing:cortinarius_violaceus", { + description = S("Cortinarius Violaceus"), + tiles = {"brewing_cortinarius_violaceus.png"}, + inventory_image = "brewing_cortinarius_violaceus.png", + wield_image = "brewing_cortinarius_violaceus.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + stack_max = 99, + groups = {snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(-5), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +-- Gliophorus viridis + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = "default:dirt_with_rainforest_litter", + sidelen = 16, + fill_ratio = 0.0005, + biomes = {"rainforest"}, + decoration = "brewing:gliophorus_viridis", + height = 1, + }) +end + +minetest.register_node("brewing:gliophorus_viridis", { + description = S("Gliophorus Viridis"), + tiles = {"brewing_gliophorus_viridis.png"}, + inventory_image = "brewing_gliophorus_viridis.png", + wield_image = "brewing_gliophorus_viridis.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + stack_max = 99, + groups = {snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(-3), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +--Pluteus Chrysophaeus + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = "default:dirt_with_coniferous_litter", + sidelen = 16, + fill_ratio = 0.0005, + biomes = {"coniferous_forest"}, + decoration = "brewing:pluteus_chrysophaeus", + height = 1, + }) +end + +minetest.register_node("brewing:pluteus_chrysophaeus", { + description = S("Pluteus Chrysophaeus"), + tiles = {"brewing_pluteus_chrysophaeus.png"}, + inventory_image = "brewing_pluteus_chrysophaeus.png", + wield_image = "brewing_pluteus_chrysophaeus.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + stack_max = 99, + groups = {snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(4), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +--Leaiana Mycena + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = "default:dirt_with_rainforest_litter", + sidelen = 16, + fill_ratio = 0.0005, + biomes = {"rainforest"}, + decoration = "brewing:leaiana_mycena", + height = 1, + }) +end + +minetest.register_node("brewing:leaiana_mycena", { + description = S("Leaiana Mycena"), + tiles = {"brewing_leaiana_mycena.png"}, + inventory_image = "brewing_leaiana_mycena.png", + wield_image = "brewing_leaiana_mycena.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + stack_max = 99, + groups = {snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(4), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +-- Green Hygrocybe + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = "default:dirt_with_rainforest_litter", + sidelen = 16, + fill_ratio = 0.0005, + biomes = {"rainforest"}, + decoration = "brewing:green_hygrocybe", + height = 1, + }) +end + +minetest.register_node("brewing:green_hygrocybe", { + description = S("Green Hygrocybe"), + tiles = {"brewing_green_hygrocybe.png"}, + inventory_image = "brewing_green_hygrocybe.png", + wield_image = "brewing_green_hygrocybe.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + stack_max = 99, + groups = {snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(3), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +minetest.register_abm({ + label = "Brewing Mushroom spread", + nodenames = {"brewing:orange_mycena", "brewing:cortinarius_violaceus", "brewing:gliophorus_viridis", "brewing:pluteus_chrysophaeus", "brewing:leaiana_mycena", "brewing:green_hygrocybe"}, + interval = 11, + chance = 150, + action = function(...) + flowers.mushroom_spread(...) + end, +}) diff --git a/mods/brewing/nodes.lua b/mods/brewing/nodes.lua new file mode 100644 index 0000000..f4a5195 --- /dev/null +++ b/mods/brewing/nodes.lua @@ -0,0 +1,75 @@ +local S = ... + +--Brewing Cauldron +minetest.register_craft({ + output = '"brewing:magic_cauldron" 1', + recipe = { + {'default:steel_ingot', '', 'default:steel_ingot'}, + {'default:steel_ingot', 'brewing:magic_crystal', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'} + } +}) + +--Magic Ore/Gem... + +--Magic Ore +minetest.register_node("brewing:magic_ore", { + description = S("Magic Ore"), + tiles = {"default_stone.png^brewing_magic_gem.png"}, + groups = {cracky=3, stone=1}, + drop = { + max_items = 6, + items = { + { + items = {"brewing:magic_gem"}, + rarity = 6, + inherit_color = true, + }, + }, + }, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "brewing:magic_ore", + wherein = "default:stone", + clust_scarcity = 10*10*10, + clust_num_ores = 5, + clust_size = 5, + y_max = -256, + y_min = -512, +}) + +-- Magic Gem +minetest.register_craftitem("brewing:magic_gem", { + description = S("Magic Gem"), + inventory_image = "brewing_magic_gem.png", +}) + +minetest.register_craftitem("brewing:magic_crystal", { + description = S("Magic Crystal"), + inventory_image = "brewing_magic_crystal.png", +}) + +-- Magic Crystal +minetest.register_craft({ + output = '"brewing:magic_crystal" 6', + recipe = { + {'brewing:magic_gem'} + } +}) + +--Magic Dust +minetest.register_craftitem("brewing:magic_dust", { + description = S("Magic Dust"), + inventory_image = "brewing_magic_dust.png", + wield_image = "brewing_magic_dust.png" +}) + +minetest.register_craft({ + output = 'brewing:magic_dust 6', + recipe = { + {'brewing:magic_crystal'} + } +}) diff --git a/mods/brewing/player.lua b/mods/brewing/player.lua new file mode 100644 index 0000000..4cdf518 --- /dev/null +++ b/mods/brewing/player.lua @@ -0,0 +1,24 @@ +minetest.register_on_player_hpchange(function(player, hp_change, reason) + if reason.type == "node_damage" then + local player_name = player:get_player_name() + local player_pos = player:get_pos() + local node = minetest.get_node_or_nil(player_pos) + if node.name == "fire:permanent_flame" or node.name == "default:lava_source" + or node.name == "default:lava_flowing" then + if brewing.players[player_name] and brewing.players[player_name]["resist_fire"] then + return 0 --no damage + end + end + end + return hp_change +end, true) + +minetest.register_on_joinplayer(function(player) + local player_name = player:get_player_name() + brewing.players[player_name] = {} +end) + +minetest.register_on_leaveplayer(function(player) + local player_name = player:get_player_name() + brewing.players[player_name] = nil +end) diff --git a/mods/brewing/potion_crafts.lua b/mods/brewing/potion_crafts.lua new file mode 100644 index 0000000..e80ff74 --- /dev/null +++ b/mods/brewing/potion_crafts.lua @@ -0,0 +1,92 @@ +--Air + +brewing.register_potion_craft({ + effect= "ouair", + type= "add", + level= 2, + recipe = {'brewing:cortinarius_violaceus', 'flowers:mushroom_red', 'brewing:gliophorus_viridis'} +}) + +--Jump + +brewing.register_potion_craft({ + effect= "jump", + type= "add", + level= 1, + recipe = {'flowers:mushroom_brown', 'flowers:mushroom_red', 'brewing:gliophorus_viridis'} +}) + +brewing.register_potion_craft({ + effect= "jump", + type= "add", + level= 2, + recipe = {'brewing:orange_mycena', 'brewing:cortinarius_violaceus', 'brewing:gliophorus_viridis'} +}) + +--Health + +brewing.register_potion_craft({ + effect= "health", + type= "add", + level= 1, + recipe = {'flowers:mushroom_brown', 'flowers:mushroom_brown', 'flowers:mushroom_brown'} +}) + +brewing.register_potion_craft({ + effect= "health", + type= "add", + level= 2, + recipe = {'brewing:pluteus_chrysophaeus', 'brewing:leaiana_mycena', 'brewing:green_hygrocybe'} +}) + +brewing.register_potion_craft({ + effect= "health", + type= "sub", + level= -3, + recipe = {'flowers:mushroom_red', 'flowers:mushroom_red', 'flowers:mushroom_red'} +}) + +--Speed + +brewing.register_potion_craft({ + effect= "speed", + type= "add", + level= 2, + recipe = {'brewing:pluteus_chrysophaeus', 'brewing:green_hygrocybe', 'brewing:green_hygrocybe'} +}) + +--Invisibility + +brewing.register_potion_craft({ + effect= "invisibility", + type= "add", + level= 2, + recipe = {'brewing:leaiana_mycena', 'brewing:green_hygrocybe', 'brewing:green_hygrocybe'} +}) + +brewing.register_potion_craft({ + effect= "resist_fire", + description= "Resist Fire", + type= "add", + level= 2, + recipe = {'brewing:leaiana_mycena', 'brewing:cortinarius_violaceus', 'brewing:green_hygrocybe'} +}) + +--Teleport + +brewing.register_potion_craft({ + effect= "teleport", + description= "Teleport", + type= "add", + level= 2, + recipe = {'flowers:mushroom_red', 'brewing:pluteus_chrysophaeus', 'brewing:green_hygrocybe'} +}) + +brewing.register_potion_craft({ + effect= "teleport", + description= "Teleport", + type= "add", + level= 3, + recipe = {'brewing:leaiana_mycena', 'brewing:pluteus_chrysophaeus', 'flowers:mushroom_red'} +}) + diff --git a/mods/brewing/potions.lua b/mods/brewing/potions.lua new file mode 100644 index 0000000..e1b185f --- /dev/null +++ b/mods/brewing/potions.lua @@ -0,0 +1,280 @@ +local S = ... + +brewing.register_potion("speed", S("Speed"), "brewing:speed", { + effect = "phys_override", + types = { + { + type = 1, + set = {}, + effects = { + speed = 1, + }, + time = 60, + }, + { + type = 2, + set = {}, + effects = { + speed = 2, + }, + time = 30, + }, + { + type = 3, + set = {}, + effects = { + speed = 3, + }, + time = 15, + }, + } +}) + +brewing.register_potion("antigrav", S("Anti-Gravity"), "brewing:antigravity", { + effect = "phys_override", + types = { + { + type = 1, + set = {}, + effects = { + gravity = -0.1, + }, + time = 60, + }, + { + type = 2, + set = {}, + effects = { + gravity = -0.2, + }, + time = 30, + }, + { + type = 3, + set = {}, + effects = { + gravity = -0.3, + }, + time = 15, + }, + } +}) + +brewing.register_potion("jump", S("Jump"), "brewing:jump", { + effect = "phys_override", + types = { + { + type = 1, + set = {}, + effects = { + jump = 1.3, + }, + time = 60, + }, + { + type = 2, + set = {}, + effects = { + jump = 1.75, + }, + time = 30, + }, + { + type = 3, + set = {}, + effects = { + jump = 2.2, + }, + time = 15, + }, + } +}) + +brewing.register_potion("ouhealth", S("One Use Health"), "brewing:ouhealth", { + effect = "fixhp", + types = { + { + type = 1, + hp = 20, + set = {}, + effects = { + }, + }, + { + type = 2, + hp = 40, + set = {}, + effects = { + }, + }, + { + type = 3, + hp = 60, + set = {}, + effects = { + }, + }, + } +}) + +brewing.register_potion("health", S("Health"), "brewing:health", { + effect = "fixhp", + types = { + { + type = 1, + time = 15, + set = {}, + effects = { + }, + }, + { + type = 2, + time = 30, + set = {}, + effects = { + }, + }, + { + type = 3, + time = 60, + set = {}, + effects = { + }, + }, + } +}) + +brewing.register_potion("ouair", S("One Use Air"), "brewing:ouair", { + effect = "air", + types = { + { + type = 1, + br = 2, + set = {}, + effects = { + }, + }, + { + type = 2, + br = 5, + set = {}, + effects = { + }, + }, + { + type = 3, + br = 10, + set = {}, + effects = { + }, + }, + } +}) + +brewing.register_potion("air", S("Air"), "brewing:air", { + effect = "air", + types = { + { + type = 1, + time = 15, + set = {}, + effects = { + }, + }, + { + type = 2, + time = 30, + set = {}, + effects = { + }, + }, + { + type = 3, + time = 60, + set = {}, + effects = { + }, + }, + } +}) + +brewing.register_potion("invisibility", S("Invisibility"), "brewing:invisibility", { + effect = "invisibility", + types = { + { + type = 1, + set = {}, + effects = { + }, + time = 15, + }, + { + type = 2, + set = {}, + effects = { + }, + time = 30, + }, + { + type = 3, + set = {}, + effects = { + }, + time = 60, + }, + } +}) + +brewing.register_potion("resist_fire", S("Resist Fire"), "brewing:resist_fire", { + effect = "resist_fire", + types = { + { + type = 1, + set = {}, + effects = { + }, + time = 15, + }, + { + type = 2, + set = {}, + effects = { + }, + time = 30, + }, + { + type = 3, + set = {}, + effects = { + }, + time = 60, + }, + } +}) + +brewing.register_potion("teleport", S("Teleport"), "brewing:teleport", { + effect = "teleport", + types = { + { + type = 1, + set = {}, + effects = { + }, + time = 300, + }, + { + type = 2, + set = {}, + effects = { + }, + time = 1200, + }, + { + type = 3, + set = {}, + effects = { + }, + time = 3600, + }, + } +}) diff --git a/mods/brewing/settings.lua b/mods/brewing/settings.lua new file mode 100644 index 0000000..2c01af0 --- /dev/null +++ b/mods/brewing/settings.lua @@ -0,0 +1,22 @@ +local modpath = ... + +local function split(inputstr, sep) + if sep == nil then + sep = "%s" + end + local t={} + inputstr = inputstr:gsub("%s+", "") + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + table.insert(t, str) + end + return t +end + +local settings = Settings(modpath .. "/brewing.conf") + +brewing.settings.filled_flasks = tonumber(settings:get("filled_flasks")) +brewing.settings.ignitor_image= settings:get("ignitor_image") +brewing.settings.ignitor_name= settings:get("ignitor_name") +brewing.settings.flask_name= settings:get("flask_name") +brewing.settings.liquid = split(settings:get("liquid"), ',') + diff --git a/mods/brewing/sound.lua b/mods/brewing/sound.lua new file mode 100644 index 0000000..f769149 --- /dev/null +++ b/mods/brewing/sound.lua @@ -0,0 +1,10 @@ +function brewing.make_sound(dest_type, dest, soundfile, max_hear_distance) + if dest_type == "object" then + minetest.sound_play(soundfile, {object = dest, gain = 0.5, max_hear_distance = max_hear_distance or 10,}) + elseif dest_type == "player" then + local player_name = dest:get_player_name() + minetest.sound_play(soundfile, {to_player = player_name, gain = 0.5, max_hear_distance = max_hear_distance or 10,}) + elseif dest_type == "pos" then + minetest.sound_play(soundfile, {pos = dest, gain = 0.5, max_hear_distance = max_hear_distance or 10,}) + end +end diff --git a/mods/brewing/sounds/LICENSE.MD b/mods/brewing/sounds/LICENSE.MD new file mode 100644 index 0000000..449da7f --- /dev/null +++ b/mods/brewing/sounds/LICENSE.MD @@ -0,0 +1,15 @@ +-------------------------------------------- +file name: brewing_magic_realization.ogg +Author: renatalmar +https://freesound.org/people/renatalmar/sounds/264981/ +License: This work is licensed under the Creative Commons 0 License. +------------------------------- +file name: brewing_magic_sound.ogg +Author: olver +https://freesound.org/people/olver/sounds/417860/ +License: This work is licensed under the Creative Commons 0 License. +-------------------------------------------- +file name: brewing_magic_fail.ogg +Author: VincentM400 +https://freesound.org/people/VincentM400/sounds/249616/ +License: This work is licensed under the Attribution License. diff --git a/mods/brewing/sounds/brewing_magic_fail.ogg b/mods/brewing/sounds/brewing_magic_fail.ogg new file mode 100644 index 0000000..4550edb Binary files /dev/null and b/mods/brewing/sounds/brewing_magic_fail.ogg differ diff --git a/mods/brewing/sounds/brewing_magic_realization.ogg b/mods/brewing/sounds/brewing_magic_realization.ogg new file mode 100644 index 0000000..65f7da0 Binary files /dev/null and b/mods/brewing/sounds/brewing_magic_realization.ogg differ diff --git a/mods/brewing/sounds/brewing_magic_sound.ogg b/mods/brewing/sounds/brewing_magic_sound.ogg new file mode 100644 index 0000000..3fd3f13 Binary files /dev/null and b/mods/brewing/sounds/brewing_magic_sound.ogg differ diff --git a/mods/brewing/textures/brewing_arrow_gray.png b/mods/brewing/textures/brewing_arrow_gray.png new file mode 100644 index 0000000..9afda43 Binary files /dev/null and b/mods/brewing/textures/brewing_arrow_gray.png differ diff --git a/mods/brewing/textures/brewing_arrow_ing_gray.png b/mods/brewing/textures/brewing_arrow_ing_gray.png new file mode 100644 index 0000000..77e09ce Binary files /dev/null and b/mods/brewing/textures/brewing_arrow_ing_gray.png differ diff --git a/mods/brewing/textures/brewing_blank_ingredient.png b/mods/brewing/textures/brewing_blank_ingredient.png new file mode 100644 index 0000000..b30495f Binary files /dev/null and b/mods/brewing/textures/brewing_blank_ingredient.png differ diff --git a/mods/brewing/textures/brewing_bucket_water_gray.png b/mods/brewing/textures/brewing_bucket_water_gray.png new file mode 100644 index 0000000..53a0e23 Binary files /dev/null and b/mods/brewing/textures/brewing_bucket_water_gray.png differ diff --git a/mods/brewing/textures/brewing_cauldron_form.png b/mods/brewing/textures/brewing_cauldron_form.png new file mode 100644 index 0000000..3888b8a Binary files /dev/null and b/mods/brewing/textures/brewing_cauldron_form.png differ diff --git a/mods/brewing/textures/brewing_cauldron_side.png b/mods/brewing/textures/brewing_cauldron_side.png new file mode 100644 index 0000000..4ab67ba Binary files /dev/null and b/mods/brewing/textures/brewing_cauldron_side.png differ diff --git a/mods/brewing/textures/brewing_cauldron_top.png b/mods/brewing/textures/brewing_cauldron_top.png new file mode 100644 index 0000000..9a1a4d1 Binary files /dev/null and b/mods/brewing/textures/brewing_cauldron_top.png differ diff --git a/mods/brewing/textures/brewing_cortinarius_violaceus.png b/mods/brewing/textures/brewing_cortinarius_violaceus.png new file mode 100644 index 0000000..bf17d13 Binary files /dev/null and b/mods/brewing/textures/brewing_cortinarius_violaceus.png differ diff --git a/mods/brewing/textures/brewing_gliophorus_viridis.png b/mods/brewing/textures/brewing_gliophorus_viridis.png new file mode 100644 index 0000000..113f8d1 Binary files /dev/null and b/mods/brewing/textures/brewing_gliophorus_viridis.png differ diff --git a/mods/brewing/textures/brewing_green_hygrocybe.png b/mods/brewing/textures/brewing_green_hygrocybe.png new file mode 100644 index 0000000..ac6abdd Binary files /dev/null and b/mods/brewing/textures/brewing_green_hygrocybe.png differ diff --git a/mods/brewing/textures/brewing_ignitor_dust_gray.png b/mods/brewing/textures/brewing_ignitor_dust_gray.png new file mode 100644 index 0000000..478e395 Binary files /dev/null and b/mods/brewing/textures/brewing_ignitor_dust_gray.png differ diff --git a/mods/brewing/textures/brewing_leaiana_mycena.png b/mods/brewing/textures/brewing_leaiana_mycena.png new file mode 100644 index 0000000..dc88585 Binary files /dev/null and b/mods/brewing/textures/brewing_leaiana_mycena.png differ diff --git a/mods/brewing/textures/brewing_magic_crystal.png b/mods/brewing/textures/brewing_magic_crystal.png new file mode 100644 index 0000000..2f1e79c Binary files /dev/null and b/mods/brewing/textures/brewing_magic_crystal.png differ diff --git a/mods/brewing/textures/brewing_magic_dust.png b/mods/brewing/textures/brewing_magic_dust.png new file mode 100644 index 0000000..a4cfd39 Binary files /dev/null and b/mods/brewing/textures/brewing_magic_dust.png differ diff --git a/mods/brewing/textures/brewing_magic_gem.png b/mods/brewing/textures/brewing_magic_gem.png new file mode 100644 index 0000000..15054b5 Binary files /dev/null and b/mods/brewing/textures/brewing_magic_gem.png differ diff --git a/mods/brewing/textures/brewing_orange_mycena.png b/mods/brewing/textures/brewing_orange_mycena.png new file mode 100644 index 0000000..5c142c9 Binary files /dev/null and b/mods/brewing/textures/brewing_orange_mycena.png differ diff --git a/mods/brewing/textures/brewing_pluteus_chrysophaeus.png b/mods/brewing/textures/brewing_pluteus_chrysophaeus.png new file mode 100644 index 0000000..4bf4e47 Binary files /dev/null and b/mods/brewing/textures/brewing_pluteus_chrysophaeus.png differ diff --git a/mods/brewing/textures/brewing_vessels_glass_bottle_gray.png b/mods/brewing/textures/brewing_vessels_glass_bottle_gray.png new file mode 100644 index 0000000..c1412f5 Binary files /dev/null and b/mods/brewing/textures/brewing_vessels_glass_bottle_gray.png differ diff --git a/mods/brewing/textures/potions_add1.png b/mods/brewing/textures/potions_add1.png new file mode 100644 index 0000000..dd626ce Binary files /dev/null and b/mods/brewing/textures/potions_add1.png differ diff --git a/mods/brewing/textures/potions_add2.png b/mods/brewing/textures/potions_add2.png new file mode 100644 index 0000000..cf28d93 Binary files /dev/null and b/mods/brewing/textures/potions_add2.png differ diff --git a/mods/brewing/textures/potions_add3.png b/mods/brewing/textures/potions_add3.png new file mode 100644 index 0000000..058211b Binary files /dev/null and b/mods/brewing/textures/potions_add3.png differ diff --git a/mods/brewing/textures/potions_air.png b/mods/brewing/textures/potions_air.png new file mode 100644 index 0000000..6fe5d6f Binary files /dev/null and b/mods/brewing/textures/potions_air.png differ diff --git a/mods/brewing/textures/potions_antigrav.png b/mods/brewing/textures/potions_antigrav.png new file mode 100644 index 0000000..40dbdee Binary files /dev/null and b/mods/brewing/textures/potions_antigrav.png differ diff --git a/mods/brewing/textures/potions_bottle.png b/mods/brewing/textures/potions_bottle.png new file mode 100755 index 0000000..c1412f5 Binary files /dev/null and b/mods/brewing/textures/potions_bottle.png differ diff --git a/mods/brewing/textures/potions_health.png b/mods/brewing/textures/potions_health.png new file mode 100644 index 0000000..b615074 Binary files /dev/null and b/mods/brewing/textures/potions_health.png differ diff --git a/mods/brewing/textures/potions_invisibility.png b/mods/brewing/textures/potions_invisibility.png new file mode 100644 index 0000000..ff90342 Binary files /dev/null and b/mods/brewing/textures/potions_invisibility.png differ diff --git a/mods/brewing/textures/potions_jump.png b/mods/brewing/textures/potions_jump.png new file mode 100644 index 0000000..284c485 Binary files /dev/null and b/mods/brewing/textures/potions_jump.png differ diff --git a/mods/brewing/textures/potions_ouair.png b/mods/brewing/textures/potions_ouair.png new file mode 100644 index 0000000..174ece6 Binary files /dev/null and b/mods/brewing/textures/potions_ouair.png differ diff --git a/mods/brewing/textures/potions_ouhealth.png b/mods/brewing/textures/potions_ouhealth.png new file mode 100644 index 0000000..8b2064a Binary files /dev/null and b/mods/brewing/textures/potions_ouhealth.png differ diff --git a/mods/brewing/textures/potions_resist_fire.png b/mods/brewing/textures/potions_resist_fire.png new file mode 100644 index 0000000..344bf22 Binary files /dev/null and b/mods/brewing/textures/potions_resist_fire.png differ diff --git a/mods/brewing/textures/potions_speed.png b/mods/brewing/textures/potions_speed.png new file mode 100644 index 0000000..ec11c8f Binary files /dev/null and b/mods/brewing/textures/potions_speed.png differ diff --git a/mods/brewing/textures/potions_sub1.png b/mods/brewing/textures/potions_sub1.png new file mode 100644 index 0000000..4d8f2e6 Binary files /dev/null and b/mods/brewing/textures/potions_sub1.png differ diff --git a/mods/brewing/textures/potions_sub2.png b/mods/brewing/textures/potions_sub2.png new file mode 100644 index 0000000..1afdd76 Binary files /dev/null and b/mods/brewing/textures/potions_sub2.png differ diff --git a/mods/brewing/textures/potions_sub3.png b/mods/brewing/textures/potions_sub3.png new file mode 100644 index 0000000..183da95 Binary files /dev/null and b/mods/brewing/textures/potions_sub3.png differ diff --git a/mods/brewing/textures/potions_teleport.png b/mods/brewing/textures/potions_teleport.png new file mode 100644 index 0000000..6259430 Binary files /dev/null and b/mods/brewing/textures/potions_teleport.png differ diff --git a/mods/campfire/LICENSE.md b/mods/campfire/LICENSE.md new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/mods/campfire/LICENSE.md @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE 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. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/mods/campfire/README.md b/mods/campfire/README.md new file mode 100644 index 0000000..fc7d356 --- /dev/null +++ b/mods/campfire/README.md @@ -0,0 +1,37 @@ +CampFire mod by Doc + +[modified by Napiophelios] + +Depends: default, fire, beds, tnt, wool + +For Minetest 0.5.0 + +WARNING: + +This mod requires the use of a 16px texture pack. + +Inventory and weild images will look distorted if any thing other is used. + +----------------------------------------------- + +Original CampFire mod by Doc + +License of code : WTFPL + +https://github.com/Doc22/campfire-mod + +----------------------------------------------- + +Particles Function adapted from New Campfire mod by Pavel Litvinoff + +License of code : GPLv2.1 + +Copyright (C) 2017 Pavel Litvinoff + + + +----------------------------------------------- + +Node Timers and miscellaneous code fixes by Bell07 + +----------------------------------------------- diff --git a/mods/campfire/depends.txt b/mods/campfire/depends.txt new file mode 100644 index 0000000..0a66c5c --- /dev/null +++ b/mods/campfire/depends.txt @@ -0,0 +1,5 @@ +default +fire +tnt +beds? +wool? \ No newline at end of file diff --git a/mods/campfire/init.lua b/mods/campfire/init.lua new file mode 100644 index 0000000..6ebb0a8 --- /dev/null +++ b/mods/campfire/init.lua @@ -0,0 +1,388 @@ +--[[ +CampFire mod by Doc +[modified by Napiophelios] +Depends: default, beds, fire, wool +For Minetest 0.5.0 +----------------------------------------------- +Original CampFire mod by Doc +License of code : WTFPL +----------------------------------------------- +Node Swap ABM from NateS's More_fire mod +(solves the glitchy formspec transition) +More_fire mod +Licensed : CC by SA +----------------------------------------------- +Particle Functions from New Campfire mod by Pavel Litvinoff +License of code : GPLv2.1 +Copyright (C) 2017 Pavel Litvinoff + +--]] + +campfire = {} + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +--------------------- +--Particle Functions +--------------------- +local function fire_particles_on(pos) -- 3 layers of fire + local meta = minetest.get_meta(pos) + local id = minetest.add_particlespawner({ -- 1 layer big particles fire + amount = 9, + time = 3, + minpos = {x = pos.x - 0.1, y = pos.y-0.5, z = pos.z - 0.1}, + maxpos = {x = pos.x + 0.1, y = pos.y-0.1, z = pos.z + 0.1}, + minvel = {x= 0, y= 0, z= 0}, + maxvel = {x= 0, y= 0, z= 0}, + minacc = {x= 0, y= 0, z= 0}, + maxacc = {x= 0, y= 0, z= 0}, + minexptime = 0.75, + maxexptime = 1.25, + minsize = 4, + maxsize = 6, + collisiondetection = false, + vertical = true, + texture = "fire_basic_flame_animated.png", + animation = {type="vertical_frames", aspect_w=16, aspect_h=16, length = 1.15,}, + glow = 5, + }) + meta:set_int("layer_1", id) + + local id = minetest.add_particlespawner({ -- 2 layer smol particles fire + amount = 9, + time = 1, + minpos = {x = pos.x - 0.1, y = pos.y-0.5, z = pos.z - 0.1}, + maxpos = {x = pos.x + 0.1, y = pos.y-0.1, z = pos.z + 0.1}, + minvel = {x= 0, y= 0, z= 0}, + maxvel = {x= 0, y= 0, z= 0}, + minacc = {x= 0, y= 0, z= 0}, + maxacc = {x= 0, y= 0, z= 0}, + minexptime = 0.4, + maxexptime = 1.1, + minsize = 3, + maxsize = 4, + collisiondetection = false, + vertical = true, + texture = "fire_basic_flame_animated.png", + animation = {type="vertical_frames", aspect_w=16, aspect_h=16, length = 1.25,}, + glow = 5, + }) + meta:set_int("layer_2", id) + + local image_number = math.random(4) + local id = minetest.add_particlespawner({ --3 layer embers + amount = 1, + time = 1, + minpos = {x = pos.x - 0.1, y = pos.y - 0.05, z = pos.z - 0.1}, + maxpos = {x = pos.x + 0.2, y = pos.y + 0.2, z = pos.z + 0.2}, + minvel = {x= 0, y= 0.25, z= 0}, + maxvel = {x= 0, y= 0.75, z= 0}, + minacc = {x= 0, y= 0, z= 0}, + maxacc = {x= 0, y= 0.025, z= 0}, + minexptime = 0.5, + maxexptime = 1.5, + minsize = 0.05, + maxsize = 0.25, + collisiondetection = true, + glow = 3, + texture = "campfire_particle_"..image_number..".png", + }) + meta:set_int("layer_3", id) +end + +local function fire_particles_off(pos) + local meta = minetest.get_meta(pos) + local id_1 = meta:get_int("layer_1"); + local id_2 = meta:get_int("layer_2"); + local id_3 = meta:get_int("layer_3"); + minetest.delete_particlespawner(id_1) + minetest.delete_particlespawner(id_2) + minetest.delete_particlespawner(id_3) +end + +local function effect(pos, texture, vlc, acc, time, size) + local id = minetest.add_particle({ + pos = pos, + velocity = vlc, + acceleration = acc, + expirationtime = time, + size = size, + collisiondetection = true, + vertical = true, + texture = texture, + }) +end + +-- campfire progress / burning +local function check_and_burn(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + -- Get fuel status + local fuel + local fuellist = inv:get_list("fuel") + if fuellist then + fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + end + local fuel_time = meta:get_float("fuel_time") or 0 + local fully_item_burn_time = 0 + fuel_time = fuel_time - 0.25 + + -- Get cooking status + local cooked + local srclist = inv:get_list("src") + if srclist then + cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) + end + local src_time = meta:get_float("src_time") or 0 + src_time = src_time + 0.25 + +-- +-- local item_percent = 0 +-- if cooked.time > 0 then +-- item_percent = math.floor(src_time / cooked.time * 100) +-- end + + local is_burning + if fuel_time > 0 then -- still fuel in + is_burning = true + fully_item_burn_time = meta:get_float("fully_item_burn_time") + elseif fuel.time == 0 then -- no fuel, but item not burneable + is_burning = false + else -- take the next item + fuel_time = fuel.time + fully_item_burn_time = fuel.time + meta:set_float("fully_item_burn_time", fully_item_burn_time) + is_burning = true + local stack = inv:get_stack("fuel", 1) + stack:take_item() + inv:set_stack("fuel", 1, stack) + end + + if not is_burning then + meta:set_float("fuel_time", 0) + minetest.swap_node(pos, {name = 'campfire:campfire', param1 = 0}) + meta:set_string("infotext","The campfire is out.") +-- meta:set_string("formspec", campfire.campfire_active_formspec(item_percent)) + return is_burning + end + + meta:set_float("fuel_time", fuel_time) + local node = minetest.get_node(pos) + if node.name ~= "campfire:campfire_active" or math.random(2) == 1 then + minetest.sound_play({name="campfire_small", pos = pos, max_hear_distance = 8, gain = 0.1}) + minetest.swap_node(pos, {name = 'campfire:campfire_active'}) + end + fire_particles_on(pos) + local percent = math.floor(fuel_time / fully_item_burn_time * 100) + meta:set_string("infotext",S("Campfire active")..": "..percent.."%") + + + -- fire burns, check for cooking finished + if cooked and cooked.item and src_time >= cooked.time then + if inv:room_for_item("dst",cooked.item) then + inv:add_item("dst", cooked.item) + local srcstack = inv:get_stack("src", 1) + srcstack:take_item() + inv:set_stack("src", 1, srcstack) + else + print("Could not insert '"..cooked.item:to_string().."'") + end + meta:set_float("src_time", 0) + else + meta:set_float("src_time", src_time) + end + + return is_burning +end + +--------------- +-- Formspecs +--------------- +function campfire.campfire_active_formspec(pos) +local formspec = + "size[8,6]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "label[1,0.5;".." < "..S("Add Fuel").."]".. + "list[current_name;fuel;0,0.25;1,1;]".. + "list[current_name;src;4,0.25;1,1;]".. + "image[5,0.25;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "list[current_name;dst;6,0.25;2,1;]".. + "list[current_player;main;0,2;8,1;]".. + "list[current_player;main;0,3;8,3;8]".. + "listring[current_name;dst]".. + "listring[current_player;main]".. + "listring[current_name;src]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0,2) + return formspec + end + +campfire.campfire_formspec = + "size[8,6]".. + default.gui_bg.. + default.gui_bg_img.. + default.gui_slots.. + "label[1,0.5;".." < "..S("Add Fuel").."]".. + "list[current_name;fuel;0,0.25;1,1;]".. + "list[current_name;src;4,0.25;1,1;]".. + "image[5,0.25;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "list[current_name;dst;6,0.25;2,1;]".. + "list[current_player;main;0,2;8,1;]".. + "list[current_player;main;0,3;8,3;8]".. + "listring[current_name;dst]".. + "listring[current_player;main]".. + "listring[current_name;src]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0,2) + +--------- +--Nodes +--------- +minetest.register_node("campfire:campfire", { + description = S("Campfire"), + drawtype = "nodebox", + tiles = {'default_gravel.png^[colorize:#1f1f1f:100'}, + inventory_image = "[combine:32x32:0,0=fire_basic_flame.png:0,24=default_gravel.png", + wield_image = "[combine:32x32:0,0=fire_basic_flame.png:0,24=default_gravel.png", + walkable = false, + buildable_to = false, + sunlight_propagates = true, + groups = {oddly_breakable_by_hand=3, dig_immediate=2, attached_node=1}, + light_source =1, + paramtype = 'light', + sounds = default.node_sound_stone_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, 0.25, 0.25, -0.375, 0.375}, + {-0.3125, -0.5, 0.1875, -0.1875, -0.375, 0.3125}, + {-0.375, -0.5, -0.25, -0.25, -0.375, 0.25}, + {-0.3125, -0.5, -0.3125, -0.1875, -0.375, -0.1875}, + {-0.25, -0.5, -0.375, 0.25, -0.375, -0.25}, + {0.1875, -0.5, -0.3125, 0.3125, -0.375, -0.1875}, + {0.25, -0.5, -0.25, 0.375, -0.375, 0.25}, + {0.1875, -0.5, 0.1875, 0.3125, -0.375, 0.3125}, + } + }, + selection_box = { + type = "fixed", + fixed = {-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, + }, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string('formspec', campfire.campfire_formspec) + meta:set_string('infotext', 'Campfire'); + local inv = meta:get_inventory() + inv:set_size('fuel', 1) + inv:set_size("src", 1) + inv:set_size("dst", 2) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("fuel") then + return false + elseif not inv:is_empty("dst") then + return false + elseif not inv:is_empty("src") then + return false + end + return true + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + if check_and_burn(pos) then + minetest.get_node_timer(pos):start(1) + end + end +}) + +minetest.register_node("campfire:campfire_active", { + drawtype = "nodebox", + tiles = {'tnt_blast.png','default_gravel.png^[colorize:#1f1f1f:190'}, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + damage_per_second = 1, + drop = "", + paramtype = 'light', + light_source =8, + groups = {oddly_breakable_by_hand=1, dig_immediate=2, attached_node=1,not_in_creative_inventory =1}, + sounds = default.node_sound_stone_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, 0.25, 0.25, -0.375, 0.375}, + {-0.3125, -0.5, 0.1875, -0.1875, -0.375, 0.3125}, + {-0.375, -0.5, -0.25, -0.25, -0.375, 0.25}, + {-0.3125, -0.5, -0.3125, -0.1875, -0.375, -0.1875}, + {-0.25, -0.5, -0.375, 0.25, -0.375, -0.25}, + {0.1875, -0.5, -0.3125, 0.3125, -0.375, -0.1875}, + {0.25, -0.5, -0.25, 0.375, -0.375, 0.25}, + {0.1875, -0.5, 0.1875, 0.3125, -0.375, 0.3125}, + } + }, + selection_box = { + type = "fixed", + fixed ={-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, + }, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("fuel") then + return false + elseif not inv:is_empty("dst") then + return false + elseif not inv:is_empty("src") then + return false + end + return true + end, + + on_destruct = function(pos, oldnode, digger) + fire_particles_off(pos) + end, + on_timer = check_and_burn, +}) + +-- sleeping bag +if minetest.global_exists("beds") then +beds.register_bed("campfire:sleeping_mat", { + description = S("Sleeping Bag"), + inventory_image = "campfire_sleeping_mat.png", + wield_image = "campfire_sleeping_mat.png", + tiles = { + bottom = {"[combine:32x32:0,0=wool_brown.png:0,20=wool_brown.png"}, + top = { "[combine:32x32:0,0=wool_white.png:0,12=wool_brown.png" } + }, + nodebox = { + bottom = { + {-0.48, -0.5,-0.5, 0.48, -0.45, 0.5}, + }, + top = { + {-0.48, -0.5,-0.5, 0.48, -0.45, 0.5}, + } + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, -0.35, 1.5}, + recipe = { + {"wool:white", "wool:brown", "wool:brown"}, + }, +}) +end + + +----------------- +-- craft recipes +----------------- +minetest.register_craft({ + output = 'campfire:campfire', + recipe = { + {'', 'group:stone', ''}, + {'group:stone','default:stick', 'group:stone'}, + {'', 'group:stone', ''}, + } +}) diff --git a/mods/campfire/locale/campfire.es.tr b/mods/campfire/locale/campfire.es.tr new file mode 100644 index 0000000..ffb9add --- /dev/null +++ b/mods/campfire/locale/campfire.es.tr @@ -0,0 +1,5 @@ +# textdomain: campfire +Campfire=Fogata +Sleeping Bag=Saco de dormir +Add Fuel=Añade combustible +Campfire active=Fogata activa diff --git a/mods/campfire/mod.conf b/mods/campfire/mod.conf new file mode 100644 index 0000000..a33a9b0 --- /dev/null +++ b/mods/campfire/mod.conf @@ -0,0 +1 @@ +name = campfire diff --git a/mods/campfire/sounds/campfire_small.0.ogg b/mods/campfire/sounds/campfire_small.0.ogg new file mode 100644 index 0000000..456551c Binary files /dev/null and b/mods/campfire/sounds/campfire_small.0.ogg differ diff --git a/mods/campfire/sounds/license.txt b/mods/campfire/sounds/license.txt new file mode 100644 index 0000000..42521f0 --- /dev/null +++ b/mods/campfire/sounds/license.txt @@ -0,0 +1,25 @@ + + + =============================================== + +Minetest 0.4 mod: fire + +License of media (textures and sounds) +-------------------------------------- +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +http://creativecommons.org/licenses/by-sa/3.0/ + +Authors of media files +----------------------- + +fire_small.ogg sampled from: + http://www.freesound.org/people/dobroide/sounds/4211/ + +fire_basic_flame_animated.png: + Muadtralk + + =============================================== + +This file has been modified (reduced gain) and renamed: +campfire_small.ogg for this mod. + diff --git a/mods/campfire/textures/campfire_particle_1.png b/mods/campfire/textures/campfire_particle_1.png new file mode 100644 index 0000000..a188cba Binary files /dev/null and b/mods/campfire/textures/campfire_particle_1.png differ diff --git a/mods/campfire/textures/campfire_particle_2.png b/mods/campfire/textures/campfire_particle_2.png new file mode 100644 index 0000000..8e06292 Binary files /dev/null and b/mods/campfire/textures/campfire_particle_2.png differ diff --git a/mods/campfire/textures/campfire_particle_3.png b/mods/campfire/textures/campfire_particle_3.png new file mode 100644 index 0000000..a43d41f Binary files /dev/null and b/mods/campfire/textures/campfire_particle_3.png differ diff --git a/mods/campfire/textures/campfire_particle_4.png b/mods/campfire/textures/campfire_particle_4.png new file mode 100644 index 0000000..6e1cea8 Binary files /dev/null and b/mods/campfire/textures/campfire_particle_4.png differ diff --git a/mods/campfire/textures/campfire_sleeping_mat.png b/mods/campfire/textures/campfire_sleeping_mat.png new file mode 100644 index 0000000..7dfb4ef Binary files /dev/null and b/mods/campfire/textures/campfire_sleeping_mat.png differ diff --git a/mods/campfire/textures/license.txt b/mods/campfire/textures/license.txt new file mode 100644 index 0000000..e622358 --- /dev/null +++ b/mods/campfire/textures/license.txt @@ -0,0 +1,10 @@ + + +Textures by Napiophelios + +campfire_particle_1.png +campfire_particle_2.png +campfire_particle_3.png +campfire_particle_4.png + +Licenses : Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) \ No newline at end of file diff --git a/mods/cannons/bower.json b/mods/cannons/bower.json new file mode 100644 index 0000000..79558f9 --- /dev/null +++ b/mods/cannons/bower.json @@ -0,0 +1,27 @@ +{ + "name": "cannons", + "description": "To shoot insert muni and gunpowder and punch the cannon with a torch.", + "keywords": [ + "cannon", + "cannons", + "medieval", + "shoot" + ], + "forum": "http://forum.minetest.net/viewtopic.php?f=11&t=7744", + "screenshots": [ + "https://bitbucket.org/kingarthursteam/cannons/raw/master/screenshot.png", + "https://bitbucket.org/kingarthursteam/cannons/wiki/screenshots/screenshot_1531516.png", + "https://bitbucket.org/kingarthursteam/cannons/wiki/screenshots/screenshot_1849086.png", + "https://bitbucket.org/kingarthursteam/cannons/wiki/screenshots/screenshot_5781410.png" + ], + "authors": [ + "kingarthursteam", + "addi", + "Semmett9", + "eythen" + ], + "ignore": [ + "indev" + ], + "license": "CC-BY-SA-3.0" +} \ No newline at end of file diff --git a/mods/cannons/cannonballs.lua b/mods/cannons/cannonballs.lua new file mode 100644 index 0000000..8e9372b --- /dev/null +++ b/mods/cannons/cannonballs.lua @@ -0,0 +1,228 @@ +--++++++++++++++++++++++++++++++++++++ +--+ Meseball + +--++++++++++++++++++++++++++++++++++++ +local exploding={ + physical = false, + timer=0, + textures = {"default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png","default_mese_block.png"}, + lastpos={}, + damage=15, + visual = "cube", + visual_size = {x=0.5, y=0.5}, + range=1, + gravity=10, + velocity=30, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_mob_hit = function(self,pos,mob) + mob:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + cannons.nodehitparticles(pos,node) + cannons.destroy({x=pos.x, y=pos.y, z=pos.z},self.range) + minetest.sound_play("cannons_shot", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end, + +} +if cannons.config:get_bool("enable_explosion") then + cannons.register_muni("cannons:ball_exploding_stack_1",exploding) +end +local fire={ + physical = false, + timer=0, + textures = {"default_tree.png","default_tree.png","default_tree.png","default_tree.png","default_tree.png","default_tree.png"}, + lastpos={}, + damage=10, + visual = "cube", + visual_size = {x=0.5, y=0.5}, + range=2, + gravity=8, + velocity=35, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_mob_hit = function(self,pos,mob) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + cannons.nodehitparticles(pos,node) + pos = self.lastpos + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="fire:basic_flame"}) + minetest.sound_play("default_break_glass", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end, + +} +if cannons.config:get_bool("enable_fire") then + cannons.register_muni("cannons:ball_fire_stack_1",fire) +end + +--++++++++++++++++++++++++++++++++++++ +--+ Wooden Cannon ball + +--++++++++++++++++++++++++++++++++++++ + +cannons.register_muni("cannons:ball_wood_stack_1",{ + physical = false, + timer=0, + textures = {"cannons_wood_bullet.png"}, + lastpos={}, + damage=20, + range=1, + gravity=10, + velocity=40, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + minetest.chat_send_all(playername .." tried to catch a cannonball") + end, + on_mob_hit = function(self,pos,mob) + mob:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + cannons.nodehitparticles(pos,node) + if node.name == "default:dirt_with_grass" then + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:dirt"}) + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + elseif node.name == "default:water_source" then + minetest.sound_play("cannons_splash", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + else + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end + end, + +}) + +--++++++++++++++++++++++++++++++++++++ +--+ Stone Cannon ball + +--++++++++++++++++++++++++++++++++++++ + +cannons.register_muni("cannons:ball_stone_stack_1",{ + physical = false, + timer=0, + textures = {"cannons_bullet.png"}, + lastpos={}, + damage=20, + range=2, + gravity=10, + velocity=40, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + minetest.chat_send_all(playername .." tried to catch a cannonball") + end, + on_mob_hit = function(self,pos,mob) + mob:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + cannons.nodehitparticles(pos,node) + if node.name == "default:dirt_with_grass" then + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:dirt"}) + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + elseif node.name == "default:water_source" then + minetest.sound_play("cannons_splash", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + else + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end + end, + +}) + +--++++++++++++++++++++++++++++++++++++ +--+ Steel Cannon ball + +--++++++++++++++++++++++++++++++++++++ + +cannons.register_muni("cannons:ball_steel_stack_1",{ + physical = false, + timer=0, + textures = {"cannons_bullet_iron.png"}, + lastpos={}, + damage=30, + range=2, + gravity=5, + velocity=50, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + minetest.chat_send_all(playername .." tried to catch a canonball") + end, + on_mob_hit = function(self,pos,mob) + mob:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + cannons.nodehitparticles(pos,node) + if node.name == "default:dirt_with_grass" then + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:dirt"}) + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + elseif node.name == "default:water_source" then + minetest.sound_play("cannons_splash", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + else + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end + end, + +}) diff --git a/mods/cannons/convert.lua b/mods/cannons/convert.lua new file mode 100644 index 0000000..865a98d --- /dev/null +++ b/mods/cannons/convert.lua @@ -0,0 +1,70 @@ +minetest.register_abm({ + nodenames = {"cannons:cannon","cannons:bronze_canon","cannons:mithril_cannon"}, + --neighbors = {"cannons:stand","cannons.stand_wood"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local stand_pos = {x= pos.x,y= pos.y-1,z=pos.z} + local stand = minetest.get_node(stand_pos) + if stand.name == "cannons:stand" or stand.name == "cannons:stand_wood" then -- cannon stand with cannon + if stand.name == "cannons:stand" then + minetest.set_node(stand_pos, {name = "default:cobble"})--replace stand with cobblestone + else + minetest.set_node(stand_pos, {name = "default:wood"})--replace stand with cobblestone + end + if node.name == "cannons:cannon" then + node.name = "cannons:wood_stand_with_cannon_steel" + elseif node.name == "cannons:bronze_canon" then + node.name = "cannons:wood_stand_with_cannon_bronze" + elseif node.name == "cannons:mithril_cannon" then + node.name = "cannons:wood_stand_with_cannon_mithril" + --else if node.name == "cannons:bronze_canon" then + -- node.name = "cannons:wood_stand_with_bronze_cannon" + else --dont know what else can happen, but "Der Teufel ist ein Eichhörnchen" + node.name = "air" + end + + minetest.swap_node(pos, node) + + else --else its a single or disabled cannon + print("zweite if") + if node.name == "cannons:cannon" then + node.name = "cannons:cannon_steel" + elseif node.name == "cannons:canon_bronze" then + node.name = "cannons:bronze_cannon" + elseif node.name == "cannons:cannon_mithril" then + node.name = "cannons:cannon_mithril" + --else if node.name == "cannons:placeholder" then + -- node.name = "cannons:wood_stand_with_placeholder_cannon" + else --dont know what else can happen, but "Der Teufel ist ein Eichhörnchen" + node.name = "air" + end + minetest.swap_node(pos, node) + end + end, +}) +--abm to convert single cannonstands +minetest.register_abm({ + nodenames = {"cannons:stand","cannons:stand_wood"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local above_pos = {x= pos.x,y= pos.y+1,z=pos.z} + local above = minetest.get_node(above_pos) + --if above the stand a cannon... + if above.name == "cannons:cannon" or above.name == "cannons:bronze_canon" or above.name == "cannons:mithril_cannon" then + --do nothing, let the first abm do all + elseif above.name == "air" then + minetest.set_node(above_pos, {name = "cannons:wood_stand"}) + else + --replace single stands with a full block, and place the stand above it + if node.name == "cannons:stand" then + minetest.set_node(pos, {name = "default:cobble"})--replace stand with cobblestone + + else + minetest.set_node(pos, {name = "default:wood"})--replace stand with cobblestone + end + end + + end, +}) diff --git a/mods/cannons/depends.txt b/mods/cannons/depends.txt new file mode 100644 index 0000000..7182eff --- /dev/null +++ b/mods/cannons/depends.txt @@ -0,0 +1,6 @@ +default +bucket +mesecons? +locks? +moreores? +tnt? diff --git a/mods/cannons/description.txt b/mods/cannons/description.txt new file mode 100644 index 0000000..efc394e --- /dev/null +++ b/mods/cannons/description.txt @@ -0,0 +1,3 @@ +The Cannons mod adds Cannons to the game. +to shot insert muni and gunpowder and punch that with a torch. +the muni can destroy nodes and hurts players. \ No newline at end of file diff --git a/mods/cannons/functions.lua b/mods/cannons/functions.lua new file mode 100644 index 0000000..90ea6d6 --- /dev/null +++ b/mods/cannons/functions.lua @@ -0,0 +1,532 @@ + +function cannons.destroy(pos,range) + for x=-range,range do + for y=-range,range do + for z=-range,range do + if x*x+y*y+z*z <= range * range + range then + local np={x=pos.x+x,y=pos.y+y,z=pos.z+z} + local n = minetest.env:get_node(np) + if n.name ~= "air" then + minetest.env:remove_node(np) + end + end + end + end + end +end + +function cannons.sound_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name="cannons_walk", gain=1.0} + table.dig = table.dig or + {name="cannons_dig", gain=0.5} + table.dug = table.dug or + {name="default_dug_node", gain=0.5} + table.place = table.place or + {name="default_place_node_hard", gain=1.0} + return table +end +function cannons.inventory_modified(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local muni = inv:get_stack("muni", 1):to_table() + local gunpowder = inv:get_stack("gunpowder", 1):to_table(); + local addition = "" + if meta:get_string("owner") ~="" then + addition = " (owned by "..meta:get_string("owner")..")" + end + if muni == nil then + muni = false + else + muni = cannons.is_muni(muni.name) + end + if gunpowder == nil then + gunpowder = false; + else + gunpowder = cannons.is_gunpowder(gunpowder.name) + end + + if not muni and not gunpowder then + meta:set_string("infotext","Cannon has no muni and no gunpowder"..addition) + + elseif not muni then + meta:set_string("infotext","Cannon has no muni"..addition) + + elseif not gunpowder then + meta:set_string("infotext","Cannon has no gunpowder"..addition) + + else + meta:set_string("infotext","Cannon is ready"..addition) + end +end + +cannons.allow_metadata_inventory_put = function(pos, listname, index, stack, player) + + local meta = minetest.get_meta(pos) + if(meta:get_string("owner") ~="" and not( locks:lock_allow_use( pos, player ))) then + return 0; + end + local inv = meta:get_inventory() + stack = stack:to_table() + if listname == "gunpowder" and cannons.is_gunpowder(stack.name) then + return stack.count + elseif listname == "muni" and cannons.is_muni(stack.name) then + return stack.count + else return 0 + end + + end + +cannons.allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + + local meta = minetest.get_meta(pos) + if(meta:get_string("owner") ~="" and not( locks:lock_allow_use( pos, player ))) then + return 0; + end + local inv = meta:get_inventory() + local stack = inv:get_stack(from_list, from_index) + stack = stack:to_table() + if to_list == "gunpowder" and cannons.is_gunpowder(stack.name) then + return count + + elseif to_list == "muni" and cannons.is_muni(stack.name) then + return count + else + return 0 + end + end + +cannons.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("gunpowder") then + return false + elseif not inv:is_empty("muni") then + return false + else + return true + end + end + +cannons.formspec = + "size[8,9]".. + "list[current_name;muni;0,1;1,1;] label[0,0.5;Muni:]".. + "list[current_name;gunpowder;0,3;1,1;] label[0,2.5;Gunpowder:]".. + "list[current_player;main;0,5;8,4;]" +if default and default.gui_bg then + cannons.formspec = cannons.formspec..default.gui_bg; +end + +if default and default.gui_bg_img then + cannons.formspec = cannons.formspec..default.gui_bg_img; +end + +if default and default.gui_slots then + cannons.formspec = cannons.formspec..default.gui_slots; +end + +cannons.disabled_formspec = + "size[8,9]".. + "label[1,0.5;Cannon is Disabled. Place it on a cannonstand to activate it]".. + "list[current_player;main;0,5;8,4;]" + +if default and default.gui_bg then + cannons.disabled_formspec = cannons.disabled_formspec..default.gui_bg; +end + +if default and default.gui_bg_img then + cannons.disabled_formspec = cannons.disabled_formspec..default.gui_bg_img; +end + +if default and default.gui_slots then + cannons.disabled_formspec = cannons.disabled_formspec..default.gui_slots; +end + +cannons.on_construct = function(pos) + local node = minetest.get_node({x = pos.x ,y = pos.y, z = pos.z}) + if minetest.registered_items[node.name].cannons then + local meta = minetest.get_meta(pos) + meta:set_string("formspec", cannons.formspec) + meta:set_string("infotext", "Cannon has no muni and no gunpowder") + local inv = meta:get_inventory() + inv:set_size("gunpowder", 1) + inv:set_size("muni", 1) + else + local meta = minetest.get_meta(pos) + meta:set_string("formspec", cannons.disabled_formspec) + meta:set_string("infotext", "Cannon is out of order") + end +end + +cannons.stand_on_rightclick = function(pos, node, player, itemstack, pointed_thing) + if minetest.get_item_group(itemstack:get_name(), "cannon")>=1 then --if rightclicked with a cannon + local item = string.split(itemstack:get_name(),":")[2]; + node.name=node.name.."_with_"..item + ---print(node.name); + minetest.swap_node(pos, node) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", cannons.formspec) + meta:set_string("infotext", "Cannon has no muni and no gunpowder") + local inv = meta:get_inventory() + inv:set_size("gunpowder", 1) + inv:set_size("muni", 1) + itemstack:take_item(1) + return itemstack + end +end + +cannons.dug = function(pos, node, digger) + if not node or not type(node)=="table" then + return + end + if not digger or not digger:is_player() then + return + end + local cannons = minetest.registered_nodes[node.name].cannons + if cannons and cannons.stand and cannons.cannon then --node dug + node.name = cannons.stand + minetest.swap_node(pos, node)--replace node with the stand + local meta = minetest.get_meta(pos) + meta:set_string("formspec","") + meta:set_string("infotext", "place a cannon on this stand") + local inv = digger:get_inventory() + local stack = inv:add_item("main", ItemStack(cannons.cannon))--add the cannon to the ineentory + minetest.item_drop(stack, digger, pos) + end +end + +cannons.on_construct_locks = function(pos) + local node = minetest.get_node({x = pos.x ,y = pos.y-1, z = pos.z}) + if minetest.registered_nodes[node.name].groups.cannonstand then + local meta = minetest.get_meta(pos) + meta:set_string("formspec", cannons.formspec.. + "field[2,1.3;6,0.7;locks_sent_lock_command;Locked Cannon. Type /help for help:;]".. + "button[6,2;1.7,0.7;locks_sent_input;Proceed]") + meta:set_string("infotext", "Cannon has no muni and no gunpowder") + local inv = meta:get_inventory() + inv:set_size("gunpowder", 1) + inv:set_size("muni", 1) + else + local meta = minetest.get_meta(pos) + meta:set_string("formspec", cannons.disabled_formspec) + meta:set_string("infotext", "Cannon is out of order") + end +end + +function cannons.nodehitparticles(pos,node) +if type(minetest.registered_nodes[node.name]) == "table" and type(minetest.registered_nodes[node.name].tiles) == "table" and type(minetest.registered_nodes[node.name].tiles[1])== "string" then +local texture = minetest.registered_nodes[node.name].tiles[1] + minetest.add_particlespawner( + 30, --amount + 0.5, --time + {x=pos.x-0.3, y=pos.y+0.3, z=pos.z-0.3}, --minpos + {x=pos.x+0.3, y=pos.y+0.5, z=pos.z+0.3}, --maxpos + {x=0, y=2, z=0}, --minvel + {x=0, y=3, z=0}, --maxvel + {x=-4,y=-4,z=-4}, --minacc + {x=4,y=-4,z=4}, --maxacc + 0.1, --minexptime + 1, --maxexptime + 1, --minsize + 3, --maxsize + false, --collisiondetection + texture --texture + ) + end +end +function cannons.fire(pos,node,puncher) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local muni = inv:get_stack("muni", 1):to_table(); + local gunpowder = inv:get_stack("gunpowder", 1):to_table(); + local dir = {} + --print(muni ~= nil,cannons.is_muni(muni.name),inv:contains_item("muni",muni.name.." 1"),gunpowder ~= nil ,cannons.is_gunpowder(gunpowder.name),inv:contains_item("gunpowder",gunpowder.name.." 1")) + if muni ~= nil + and cannons.is_muni(muni.name) + and inv:contains_item("muni",muni.name.." 1") + and gunpowder ~= nil + and cannons.is_gunpowder(gunpowder.name) + and inv:contains_item("gunpowder",gunpowder.name.." 1") + + then + if puncher ~= nil then + dir=puncher:get_look_dir() + meta:set_string("dir", minetest.serialize(dir)) + else + dir = minetest.deserialize(meta:get_string("dir")); + if dir == nil then + return + end + end + minetest.sound_play("cannons_shot", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + + + inv:remove_item("muni", muni.name.." 1") + inv:remove_item("gunpowder", gunpowder.name.." 1") + cannons.inventory_modified(pos) + + + local settings = cannons.get_settings(muni.name) + local obj=minetest.env:add_entity(pos, cannons.get_entity(muni.name)) + obj:setvelocity({x=dir.x*settings.velocity, y=-1, z=dir.z*settings.velocity}) + obj:setacceleration({x=dir.x*-3, y=-settings.gravity, z=dir.z*-3}) + minetest.add_particlespawner(50,0.5, + pos, pos, + {x=dir.x*settings.velocity, y=-1, z=dir.z*settings.velocity}, {x=dir.x*settings.velocity/2, y=-1, z=dir.z*settings.velocity/2}, + {x=dir.x*-3/4, y=-settings.gravity*2, z=dir.z*-3/4}, {x=dir.x*-3/2, y=-settings.gravity, z=dir.z*-3/2}, + 0.1, 0.5,--time + 0.5, 1, + false, "cannons_gunpowder.png") + end +end + +function cannons.punched(pos, node, puncher) + if not puncher or not node then + return + end + local wield = puncher:get_wielded_item() + if not wield then + return + end + wield = wield:get_name() + if wield and wield == 'default:torch' then + cannons.fire(pos,node,puncher) + end +end + +--++++++++++++++++++++++++++++++++++++ +--+ cannons.register_muni + +--++++++++++++++++++++++++++++++++++++ + +cannons.registered_muni = {} + +function cannons.register_muni(node,entity) + cannons.registered_muni[node] = {} + cannons.registered_muni[node].entity = entity + local name = node:split(":") + cannons.registered_muni[node].entity.name ="cannons:entity_"..name[1].."_"..name[2] + cannons.registered_muni[node].entity.on_step = function(self, dtime) + self.timer=self.timer+dtime + if self.timer >= 0.3 then --easiesst less laggiest way to find out that it left his start position + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if node.name == "air" then + local objs = minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, self.range) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= self.name and obj:get_luaentity().name ~= "__builtin:item" then --something other found + local mob = obj + self.on_mob_hit(self,pos,mob) + end + elseif obj:is_player() then --player found + local player = obj + self.on_player_hit(self,pos,player) + end + end + elseif node.name ~= "air" then + self.on_node_hit(self,pos,node) + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} + end + end + cannons.registered_muni[node].obj = entity.name + minetest.register_entity(entity.name, cannons.registered_muni[node].entity) +end + +function cannons.is_muni(node) + return cannons.registered_muni[node] ~= nil +end +function cannons.get_entity(node) + return cannons.registered_muni[node].obj +end +function cannons.get_settings(node) + return cannons.registered_muni[node].entity +end + +--++++++++++++++++++++++++++++++++++++ +--+ cannons.register_gunpowder + +--++++++++++++++++++++++++++++++++++++ +cannons.registered_gunpowder = {} +function cannons.register_gunpowder(node) + cannons.registered_gunpowder[node] = true; +end + +function cannons.is_gunpowder(node) + return cannons.registered_gunpowder[node] ~= nil +end + + +--++++++++++++++++++++++++++++++++++++ +--+ cannons ball stack + +--++++++++++++++++++++++++++++++++++++ +function cannons.on_ball_punch(pos, node, puncher, pointed_thing) + if not puncher or not puncher:is_player() then + return + end + local nodearr = string.split(node.name,"_stack_"); + local item = nodearr[1]; + local level = tonumber(nodearr[2]); + puncher:get_inventory():add_item('main', item) + if level > 1 then + node.name = item.."_stack_"..level-1 + minetest.swap_node(pos,node); + else + minetest.remove_node(pos); + end +end + +function cannons.on_ball_rightclick(pos, node, player, itemstack, pointed_thing) + if not player or not player:is_player() then + return + end + local basename = string.split(itemstack:get_name(),"_stack_")[1]; + local nodearr = string.split(node.name,"_stack_"); + local item = nodearr[1]; + local level = tonumber(nodearr[2]); + if basename == item then + if level < 5 then + itemstack:take_item(1) + node.name = item.."_stack_"..level+1 + minetest.swap_node(pos,node); + return itemstack; + else + return itemstack + end + end + +end + +function cannons.generate_and_register_ball_node(name,nodedef) + minetest.register_alias(name, name.."_stack_1"); + nodedef.drawtype = "nodebox"; + nodedef.selection_box = nil; + nodedef.on_punch = cannons.on_ball_punch; + nodedef.on_rightclick = cannons.on_ball_rightclick; + local nodebox = { + type = "fixed", + fixed = {}, + }; --initialize empty nodebox + + for number = 1, 5, 1 do + nodebox.fixed[number] = cannons.nodeboxes.ball_stack.fixed[number];--copy a part to nodebox + nodedef.node_box = nodebox;--add nodebox to nodedef + nodedef.selection_box = table.copy(nodebox); + nodedef["drop"] = name.."_stack_1 "..number;--set drop + nodedef.name = name.."_stack_"..number;--set name + + minetest.register_node(nodedef.name, table.copy(nodedef))--register node + end + --register craft, to allow craft 5-stacks + minetest.register_craft({ + type = "shapeless", + output = name.."_stack_5", + recipe = { name,name,name,name,name}, + }) +end + +--++++++++++++++++++++++++++++++++++++ +--+ mesecons stuff + +--++++++++++++++++++++++++++++++++++++ +cannons.rules ={ + {x = 1, y = 0, z = 0}, + {x =-1, y = 0, z = 0}, + {x = 0, y = 0, z = 1}, + {x = 0, y = 0, z =-1} + } + +function cannons.meseconsfire(pos,node) + cannons.fire(pos,node) +end + +cannons.supportMesecons = { + effector = { + rules = cannons.rules, + action_on = cannons.meseconsfire, + } +} + + +--++++++++++++++++++++++++++++++++++++ +--+ cannons.nodeboxes + +--++++++++++++++++++++++++++++++++++++ +cannons.nodeboxes = {} +cannons.nodeboxes.ball = { + type = "fixed", + fixed = { + {-0.2, -0.5, -0.2, 0.2, -0.1, 0.2}, + + -- side , top , side , side , bottom, side, + + }, + } + +cannons.nodeboxes.ball_stack = { + type = "fixed", + fixed = { + {-0.4375, -0.5, 0.0625, -0.0625, -0.125, 0.4375}, -- unten_hinten_links + {0.125, -0.5, 0.125, 0.5, -0.125, 0.5}, -- unten_hinten_rechts + {-0.4375, -0.5, -0.375, -0.0625, -0.125, 0}, -- unten_vorne_links + {0.0625, -0.5, -0.4375, 0.4375, -0.125, -0.0625}, -- unten_vorne_rechts + {-0.1875, -0.125, -0.125, 0.1875, 0.25, 0.25}, -- oben_mitte + }, + } + +cannons.nodeboxes.cannon = { + type = "fixed", + fixed = { + {-0.2, 0.2, -0.7, 0.2, -0.2, 0.9}, -- barrle -- + {0.53, -0.1, 0.1, -0.53, 0.1, -0.1}, -- plinth -- + + -- side , top hight , depth , side , bottom, side, + + } + } +cannons.nodeboxes.stand = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}, -- bottom -- + {-0.5, -0.5, -0.5, -0.35, 0.0, 0.5}, -- side left -- + {0.35, -0.5, -0.5, 0.5, 0.0, 0.5}, -- side right -- + {0.35, -0.5, -0.2, 0.5, 0.2, 0.5}, -- side right -- + {-0.5, -0.5, -0.2, -0.35, 0.2, 0.5}, -- side left -- + + -- side , top , side , side , bottom, side, + + }, + } + +local apple={ + physical = false, + timer=0, + textures = {"default_apple.png"}, + lastpos={}, + damage=-10, + range=2, + gravity=10, + velocity=30, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + minetest.chat_send_player(playername ," this is not an easter egg!") + end, + on_mob_hit = function(self,pos,mob) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + pos = self.lastpos + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:apple"}) + minetest.sound_play("canons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end, + +} +cannons.register_muni("default:apple",apple) \ No newline at end of file diff --git a/mods/cannons/init.lua b/mods/cannons/init.lua new file mode 100644 index 0000000..b457ff9 --- /dev/null +++ b/mods/cannons/init.lua @@ -0,0 +1,43 @@ +cannons = {} +cannons.MODPATH = minetest.get_modpath(minetest.get_current_modname()) +local worldpath = minetest.get_worldpath() +cannons.config = Settings(worldpath.."/cannons.conf") + +local conf_table = cannons.config:to_table() + +--look into readme.txt how to change settings +local defaults = { + enable_explosion = "true", + enable_fire = "true", + convert_old_nodes = "false", +} + +for k, v in pairs(defaults) do + if conf_table[k] == nil then + cannons.config:set(k, v) + end +end + +dofile(cannons.MODPATH .."/functions.lua") +dofile(cannons.MODPATH .."/items.lua") +dofile(cannons.MODPATH .."/cannonballs.lua") + +if cannons.config:get_bool("convert_old_nodes") then + dofile(cannons.MODPATH .."/convert.lua") +end + +if minetest.get_modpath("tnt") then + minetest.log("info","TNT mod is aviable. registering some TNT stuff") + dofile(cannons.MODPATH .."/tnt.lua") +end + +if minetest.get_modpath("locks") then + minetest.log("warning","locks mod enabled. dont execute locks.lua because this is an unstable beta version!") + --dofile(cannons.MODPATH .."/locks.lua")--if the locks mod is installed execute this file +end +if minetest.get_modpath("moreores") then +minetest.log("info","moreores mod enabled. execute moreores.lua") + dofile(cannons.MODPATH .."/moreores.lua")--if the moreores mod is installed execute this file +end +minetest.log("info", "[MOD]"..minetest.get_current_modname().." -- loaded from "..minetest.get_modpath(minetest.get_current_modname())) + diff --git a/mods/cannons/items.lua b/mods/cannons/items.lua new file mode 100644 index 0000000..4589c99 --- /dev/null +++ b/mods/cannons/items.lua @@ -0,0 +1,404 @@ +--++++++++++++++++++++++++++++++++++++ +--+ Craft Items + +--++++++++++++++++++++++++++++++++++++ + +local S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_craftitem("cannons:gunpowder", { + groups = {gunpowder=1}, + description = S("Gunpowder"), + inventory_image = "cannons_gunpowder.png" +}) +cannons.register_gunpowder("cannons:gunpowder"); + +minetest.register_craftitem("cannons:salt", { + description = S("Salt"), + inventory_image = "cannons_salt.png" +}) + +minetest.register_craftitem("cannons:bucket_salt", { + description = S("Bucket with salt"), + inventory_image = "cannons_bucket_salt.png", + stack_max = 300 +}) + + +--++++++++++++++++++++++++++++++++++++ +--+ crafts + +--++++++++++++++++++++++++++++++++++++ + +minetest.register_craft({ + type = "shapeless", + output = 'cannons:salt 12', + recipe = { + "cannons:bucket_salt" + }, + replacements = { + {"cannons:bucket_salt", "bucket:bucket_empty"} + } +}) + +minetest.register_craft({ + type = "cooking", + output = 'cannons:bucket_salt', + recipe = 'bucket:bucket_water', + cooktime = 15 +}) + +minetest.register_craft({ + type = "shapeless", + output = 'cannons:gunpowder', + recipe = { + "default:coal_lump", "default:mese_crystal", "cannons:salt" + }, +}) + + +-- new crafts -- + +minetest.register_craft({ + output = "cannons:cannon_steel", + recipe = { + {"default:steelblock", "default:steelblock", "default:steelblock"}, + {"cannons:gunpowder", "default:mese_block", ""}, + {"default:steelblock", "default:steelblock", "default:steelblock"} + }, +}) + +minetest.register_craft({ + output = "cannons:cannon_bronze", + recipe = { + {"default:bronzeblock", "default:bronzeblock", "default:bronzeblock"}, + {"cannons:gunpowder", "default:mese_block", ""}, + {"default:bronzeblock", "default:bronzeblock", "default:bronzeblock"} + }, +}) + +--minetest.register_craft({ +-- output = 'cannons:stand', +-- recipe = { +-- {"default:wood", "", "default:wood"}, +-- {"default:wood", "default:steelblock", "default:cobble"}, +-- {"default:wood", "default:wood", "default:cobble"} +-- }, +--}) + +minetest.register_craft({ + output = 'cannons:wood_stand', + recipe = { + {"default:wood", "", "default:wood"}, + {"default:wood", "default:steelblock", "default:wood"}, + {"default:wood", "default:wood", "default:wood"} + }, +}) + + + +minetest.register_craft({ + output = 'cannons:ball_wood 5', + recipe = { + {"","default:wood",""}, + {"default:wood","default:wood","default:wood"}, + {"","default:wood",""}, + }, +}) + +minetest.register_craft({ + output = 'cannons:ball_stone', + recipe = { + {"default:stone"}, + }, +}) + +minetest.register_craft({ + output = 'cannons:ball_steel 2', + recipe = { + {"", "default:steel_ingot",""}, + {"default:steel_ingot","default:steel_ingot","default:steel_ingot"}, + {"", "default:steel_ingot",""}, + }, +}) + +if cannons.config:get_bool("enable_explosion") then +minetest.register_craft({ + output = 'cannons:ball_exploding 2', + recipe = { + {"","default:mese",""}, + {"default:mese","cannons:gunpowder","default:mese"}, + {"","default:mese",""}, + }, +}) +end + +if cannons.config:get_bool("enable_fire") then +minetest.register_craft({ + output = 'cannons:ball_fire 2', + recipe = { + {"","default:wood",""}, + {"default:wood","default:torch","default:wood"}, + {"","default:wood",""}, + }, +}) +end +--++++++++++++++++++++++++++++++++++++ +--+ cannon stuff + +--++++++++++++++++++++++++++++++++++++ + +--steel cannon +minetest.register_node("cannons:cannon_steel", { + description = S("steel cannon"), + stack_max = 1, + --tiles = {"cannon_cannon_top.png","cannon_cannon_top.png","cannon_cannon_side.png","cannon_cannon_side.png","cannon_cannon_top.png^cannons_rim.png","cannon_cannon_side.png"}, + tiles = {"cannons_steel_top.png","cannons_steel_side.png"}, + drawtype = "mesh", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + mesh = "cannon.obj", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=1,cannon=1}, + sounds = cannons.sound_defaults(), + --node_box = cannons.nodeboxes.cannon, + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) + +--bronze cannon +minetest.register_node("cannons:cannon_bronze", { + description = S("bronze cannon"), + stack_max = 1, + --tiles = {"cannon_cannon_top.png","cannon_cannon_top.png","cannon_cannon_side.png","cannon_cannon_side.png","cannon_cannon_top.png^cannons_rim.png","cannon_cannon_side.png"}, + tiles = {"cannons_bronze_top.png","cannons_bronze_side.png"}, + drawtype = "mesh", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + mesh = "cannon.obj", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=1,cannon=1}, + sounds = cannons.sound_defaults(), + --node_box = cannons.nodeboxes.cannon, + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) + +minetest.register_node("cannons:wood_stand", { + description = S("Wooden cannon stand"), + stack_max = 9, + --tiles = side other + tiles = {"default_wood.png^cannons_rim.png","default_wood.png"}, + selection_box = cannons.nodeboxes.stand, + collision_box = cannons.nodeboxes.stand, + mesh = "cannonstand.obj", + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {choppy=2,cannonstand=1}, + sounds = default.node_sound_wood_defaults(), + on_rightclick = cannons.stand_on_rightclick +}) + +minetest.register_node("cannons:ship_stand", { + description = S("Wooden cannon stand"), + stack_max = 9, + --tiles = wheel material side + tiles = {"cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"}, + selection_box = cannons.nodeboxes.stand, + collision_box = cannons.nodeboxes.stand, + mesh = "ship_cannonstand.obj", + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {choppy=2,cannonstand=1}, + sounds = default.node_sound_wood_defaults(), + on_rightclick = cannons.stand_on_rightclick +}) +--wooden stand with steel cannon +--in German: Holzständer mit Stahkanone +minetest.register_node("cannons:wood_stand_with_cannon_steel", { + description = S("wooden stand with steel cannon"), + cannons ={stand="cannons:wood_stand",cannon="cannons:cannon_steel"}, + stack_max = 0, + tiles = {"cannons_steel_top.png","cannons_steel_side.png","default_wood.png","default_wood.png^cannons_rim.png","cannons_steel_top.png"}, + mesh = "cannonstand_cannon.obj", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2,cannonstand=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + on_dig = cannons.dug, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) + +minetest.register_node("cannons:ship_stand_with_cannon_steel", { + description = S("ship stand with steel cannon"), + cannons ={stand="cannons:ship_stand",cannon="cannons:cannon_steel"}, + stack_max = 0, + tiles = {"cannons_steel_top.png","cannons_steel_side.png","cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"}, + mesh = "ship_cannonstand_cannon.obj", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2,cannonstand=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + on_dig = cannons.dug, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) + +minetest.register_node("cannons:ship_stand_with_cannon_bronze", { + description = S("ship stand with bronze cannon"), + cannons ={stand="cannons:ship_stand",cannon="cannons:cannon_bronze"}, + stack_max = 0, + tiles = {"cannons_bronze_top.png","cannons_bronze_side.png","cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"}, + mesh = "ship_cannonstand_cannon.obj", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2,cannonstand=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + on_dig = cannons.dug, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) +--wooden stand with bronze cannon -- +--in German: Holzständer mit Bronzekanone +minetest.register_node("cannons:wood_stand_with_cannon_bronze", { + description = S("wooden stand with bronze cannon"), + cannons ={stand="cannons:wood_stand",cannon="cannons:cannon_bronze"}, + stack_max = 0, + tiles = {"cannons_bronze_top.png","cannons_bronze_side.png","default_wood.png","default_wood.png^cannons_rim.png","cannons_steel_top.png"}, + mesh = "cannonstand_cannon.obj", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2,cannonstand=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + on_dig = cannons.dug, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) + +--++++++++++++++++++++++++++++++++++++ +--+ cannon balls + +--++++++++++++++++++++++++++++++++++++ + +--wood ball +cannons.generate_and_register_ball_node("cannons:ball_wood", { + description = S("Cannon Ball Wood"), + stack_max = 99, + tiles = {"default_wood.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + sounds = default.node_sound_wood_defaults(), + node_box = cannons.nodeboxes.ball, +}) + +--stone ball +cannons.generate_and_register_ball_node("cannons:ball_stone", { + description = S("Cannon Ball Stone"), + stack_max = 99, + tiles = {"default_stone.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), + node_box = cannons.nodeboxes.ball, +}) + +--steel ball +cannons.generate_and_register_ball_node("cannons:ball_steel", { + description = S("Cannon Ball Steel"), + stack_max = 99, + tiles = {"cannons_steel_top.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + --diggable = false, + sounds = cannons.sound_defaults(), +}) + +--explosion cannon ball +if cannons.config:get_bool("enable_explosion") then +cannons.generate_and_register_ball_node("cannons:ball_exploding", { + description = S("Exploding Cannon Ball"), + stack_max = 99, + tiles = {"default_mese_block.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + sounds = default.node_sound_wood_defaults(), +}) +end + +--fire cannon ball +if cannons.config:get_bool("enable_fire") then +cannons.generate_and_register_ball_node("cannons:ball_fire", { + description = S("Burning Cannon Ball"), + stack_max = 99, + tiles = {"default_tree.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + sounds = default.node_sound_wood_defaults(), + node_box = cannons.nodeboxes.ball, +}) +end + diff --git a/mods/cannons/license.txt b/mods/cannons/license.txt new file mode 100644 index 0000000..4911137 --- /dev/null +++ b/mods/cannons/license.txt @@ -0,0 +1,16 @@ +cannons_splash.1.ogg +cannons_splash.2.ogg +cannons_splash.3.ogg +cannons_splash.4.ogg +License: Public Domain +source: http://www.mediacollege.com/downloads/sound-effects/water/ + + +cannons_dig.1.ogg +cannons_dig.2.ogg +cannons_dig.3.ogg +cannons_dig.4.ogg +cannons_walk.1.ogg +cannons_walk.2.ogg +cannons_walk.3.ogg +License: Public Domain diff --git a/mods/cannons/locale/cannons.es.tr b/mods/cannons/locale/cannons.es.tr new file mode 100644 index 0000000..3c96b2b --- /dev/null +++ b/mods/cannons/locale/cannons.es.tr @@ -0,0 +1,24 @@ +# textdomain: cannons +Gunpowder=Pólvora para cañón +Salt=Sal +Bucket with salt=Balde con sal +steel cannon=Cañón de acero +bronze cannon=Cañón de bronce +Wooden cannon stand=Soporte para cañón de madera +Wooden cannon stand=Soporte para cañón de madera +wooden stand with steel cannon=Soporte de madera con cañón de acero +ship stand with steel cannon=Soporte para barco con cañón de acero +ship stand with bronze cannon=Soporte para barco con cañón de bronce +wooden stand with bronze cannon=Soporte de madera con cañón de bronce +Cannon Ball Wood=Bola de cañón de madera +Cannon Ball Stone=Bola de cañón de piedra +Cannon Ball Steel=Bola de cañón de acero +Exploding Cannon Ball=Bola de cañón explosiva +Burning Cannon Ball=Bola de cañón incendiaria +Cannon Ball mithril=Bola de cañón de mitrilo +ship stand with mithril cannon=Soporte para barco con cañón de mitrilo +wooden stand with mithril cannon=Soporte de madera con cañón de mitrilo +mithril cannon=Cañón de mitrilo + + + diff --git a/mods/cannons/locks.lua b/mods/cannons/locks.lua new file mode 100644 index 0000000..3dedd2d --- /dev/null +++ b/mods/cannons/locks.lua @@ -0,0 +1,64 @@ +--++++++++++++++++++++++++++++++++++++ +--+ shared locked cannon + +--++++++++++++++++++++++++++++++++++++ + + +minetest.register_node("cannons:shared_locked_cannon", { + description = "locked shareable Cannon", + stack_max = 1, + tiles = {"cannon_cannon_top.png","cannon_cannon_top.png","cannon_cannon_side.png","cannon_cannon_side.png","cannon_cannon_top.png^cannons_rim.png","cannon_cannon_side.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=1}, + sounds = cannons.sound_defaults(), + node_box = cannons.nodeboxes.cannon, + on_place = cannons.on_place, + on_punch = cannons.punched, + on_receive_fields = function(pos, formname, fields, sender) + locks:lock_handle_input( pos, formname, fields, sender ); + end, + after_place_node = function(pos, placer) + locks:lock_set_owner( pos, placer, "empty locked shareable cannon" ); + end, + --no mesecons support for this type of cannon! + --mesecons = {effector = { + -- rules = cannons.rules, + -- action_on = cannons.meseconsfire, + -- } + --}, + on_construct = cannons.on_construct_locks, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + if not inv:is_empty("gunpowder") then + return false + elseif not inv:is_empty("muni") then + return false + else + return locks:lock_allow_dig( pos, player ) + end + end, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if( not( locks:lock_allow_use( pos, player ))) then + return 0; + end + return stack:get_count() + end, + + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, + +}) + + +minetest.register_craft({ + output = 'cannons:shared_locked_cannon', + recipe = { + {'group:cannon', 'locks:lock',}, + }, +}) \ No newline at end of file diff --git a/mods/cannons/models/cannon.mtl b/mods/cannons/models/cannon.mtl new file mode 100644 index 0000000..343bda8 --- /dev/null +++ b/mods/cannons/models/cannon.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'cannon.blend' +# Material Count: 2 + +newmtl cannons_cannon_side.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.185098 0.185098 0.185098 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\textures\cannons_cannon_side.png + +newmtl cannons_cannon_top.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.191373 0.191373 0.191373 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\textures\cannons_cannon_top.png diff --git a/mods/cannons/models/cannonstand.mtl b/mods/cannons/models/cannonstand.mtl new file mode 100644 index 0000000..2bea41a --- /dev/null +++ b/mods/cannons/models/cannonstand.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'cannonstand.blend' +# Material Count: 2 + +newmtl _1 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.480000 0.294902 0.131765 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd cannonstand\_1.jpg + +newmtl default_wood +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.401569 0.310588 0.172549 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd cannonstand\default_wood.png diff --git a/mods/cannons/models/cannonstand_cannon.mtl b/mods/cannons/models/cannonstand_cannon.mtl new file mode 100644 index 0000000..41e217c --- /dev/null +++ b/mods/cannons/models/cannonstand_cannon.mtl @@ -0,0 +1,42 @@ +# Blender MTL File: 'cannon_cannonstand.blend' +# Material Count: 4 + +newmtl cannon_rim +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.480000 0.294902 0.131765 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\games\minetest_game\mods\default\textures\default_junglewood.png + +newmtl cannons_cannon_side.001 +Ns 92.156863 +Ka 0.000000 0.000000 0.000000 +Kd 0.148078 0.148078 0.148078 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\textures\cannons_steel_cannon_side.png + +newmtl cannons_cannon_top.001 +Ns 92.156863 +Ka 0.000000 0.000000 0.000000 +Kd 0.153098 0.153098 0.153098 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\textures\cannons_steel_cannon_top.png + +newmtl default_wood.004 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.401569 0.310588 0.172549 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd cannonstand\default_wood.png diff --git a/mods/cannons/models/ship_cannonstand.mtl b/mods/cannons/models/ship_cannonstand.mtl new file mode 100644 index 0000000..624dfd3 --- /dev/null +++ b/mods/cannons/models/ship_cannonstand.mtl @@ -0,0 +1,32 @@ +# Blender MTL File: 'ship_cannonstand.blend' +# Material Count: 3 + +newmtl default +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.401569 0.310588 0.172549 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\ship_cannonstand\default_wood.png + +newmtl side +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.480000 0.294902 0.131765 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\ship_cannonstand\_1.jpg + +newmtl wheels +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.480000 0.492549 0.501961 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\ship_cannonstand\Metal_Rough.jpg diff --git a/mods/cannons/models/ship_cannonstand_cannon.mtl b/mods/cannons/models/ship_cannonstand_cannon.mtl new file mode 100644 index 0000000..bca376f --- /dev/null +++ b/mods/cannons/models/ship_cannonstand_cannon.mtl @@ -0,0 +1,52 @@ +# Blender MTL File: 'ship_cannonstand_with_cannon.blend' +# Material Count: 5 + +newmtl cannons_cannon_side +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.185098 0.185098 0.185098 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\cannon\cannons_cannon_side.png + +newmtl cannons_cannon_top +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.191373 0.191373 0.191373 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\cannon\cannons_cannon_top.png + +newmtl default +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.401569 0.310588 0.172549 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\ship_cannonstand\default_wood.png + +newmtl side +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.480000 0.294902 0.131765 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\ship_cannonstand\_1.jpg + +newmtl wheels +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.480000 0.492549 0.501961 +Ks 0.165000 0.165000 0.165000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd D:\Programme\minetest\mods\cannons\indev\ship_cannonstand\Metal_Rough.jpg diff --git a/mods/cannons/moreores.lua b/mods/cannons/moreores.lua new file mode 100644 index 0000000..8ad197a --- /dev/null +++ b/mods/cannons/moreores.lua @@ -0,0 +1,153 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +--mithril cannon +minetest.register_node("cannons:cannon_mithril", { + description = S("mithril cannon"), + stack_max = 1, + tiles = {"cannons_mithril_top.png","cannons_mithril_side.png"}, + drawtype = "mesh", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + mesh = "cannon.obj", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=1,cannon=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) + +--wood stand with mithril cannon +minetest.register_node("cannons:wood_stand_with_cannon_mithril", { + description = S("wooden stand with mithril cannon"), + cannons ={stand="cannons:wood_stand",cannon="cannons:cannon_mithril"}, + stack_max = 0, + tiles = {"cannons_mithril_top.png","cannons_mithril_side.png","default_wood.png","default_wood.png^cannons_rim.png"}, + mesh = "cannonstand_cannon.obj", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2,cannonstand=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + on_dig = cannons.dug, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) +--ship_stand with mithril cannon +minetest.register_node("cannons:ship_stand_with_cannon_mithril", { + description = S("ship stand with mithril cannon"), + cannons ={stand="cannons:ship_stand",cannon="cannons:cannon_mithril"}, + stack_max = 0, + tiles = {"cannons_mithril_top.png","cannons_mithril_side.png","cannons_steel_top.png","default_wood.png","default_wood.png^cannons_rim.png"}, + mesh = "ship_cannonstand_cannon.obj", + selection_box = cannons.nodeboxes.cannon, + collision_box = cannons.nodeboxes.cannon, + drawtype = "mesh", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2,cannonstand=1}, + sounds = cannons.sound_defaults(), + on_punch = cannons.punched, + mesecons = cannons.supportMesecons, + on_construct = cannons.on_construct, + can_dig = cannons.can_dig, + on_dig = cannons.dug, + allow_metadata_inventory_put = cannons.allow_metadata_inventory_put, + allow_metadata_inventory_move = cannons.allow_metadata_inventory_move, + on_metadata_inventory_put = cannons.inventory_modified, + on_metadata_inventory_take = cannons.inventory_modified, + on_metadata_inventory_move = cannons.inventory_modified, +}) +--craft reziep mithrill cannon +minetest.register_craft({ + output = "cannons:cannon_mithril", + recipe = { + {"moreores:mithril_block", "moreores:mithril_block", "moreores:mithril_block"}, + {"cannons:gunpowder", "default:mese_block", ""}, + {"moreores:mithril_block", "moreores:mithril_block", "moreores:mithril_block"} + }, +}) + +--mithrill ball +cannons.generate_and_register_ball_node("cannons:ball_mithril", { + description = S("Cannon Ball mithril"), + stack_max = 9, + tiles = {"cannons_mithril_top.png"}, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky=2}, + sounds = cannons.sound_defaults(), + node_box = cannons.nodeboxes.ball, +}) + +minetest.register_craft({ + output = 'cannons:ball_mithril', + recipe = { + {"moreores:mithril_block"} + }, +}) + + +--mithril ball +cannons.register_muni("cannons:ball_mithril_stack_1",{ + physical = false, + timer=0, + textures = {"cannons_ball_mithril.png"}, + lastpos={}, + damage=60, + range=3, + gravity=5, + velocity=45, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + minetest.chat_send_all(playername .." tried to catch a canonball") + end, + on_mob_hit = function(self,pos,mob) + mob:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + cannons.nodehitparticles(pos,node) + if node.name == "default:dirt_with_grass" then + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:dirt"}) + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + elseif node.name == "default:water_source" then + minetest.sound_play("cannons_splash", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + else + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end + end, + +}) diff --git a/mods/cannons/readme.md b/mods/cannons/readme.md new file mode 100644 index 0000000..94a663c --- /dev/null +++ b/mods/cannons/readme.md @@ -0,0 +1,134 @@ +# Welcome to the cannons mod # +cannons is a mod for the game minetest written by Kingarthurs Team +(Semmett9, eythen, and addi) + +if you have some muni in the cannon and some gunpowder +you can shot the cannon if you punch it with a torch. + +the cannonball will damage the other players. +if it wears armor the damage will be calculated. + +## configure cannons ## +create a file caled cannons.conf in your world dir. + +add the folowing lines to it: + +``` +#!conf + + +enable_explosion = "true" +enable_fire = "true" +``` + + +now you can change it. eg. if you want to disable fire then cange +*enable_fire = "true"* +to +*enable_fire = "false"* + +thats all :-) + +## Dependencies + +* default +* bucket +* fire(optional) + +## get cannons +relases are in the [donwloads Tab](https://bitbucket.org/kingarthursteam/cannons/downloads#tag-downloads) +swith there to tab 'Tags' + +its also aviable as a git repo: + +``` +$ git clone https://kingarthursteam@bitbucket.org/kingarthursteam/canons.git +``` + +## Craft Rezieps + +Bucket with salt: + +![Bucket with salt salt](https://bitbucket.org/kingarthursteam/cannons/wiki/crafts/bucket_with_salt.png) + +Salt (shapeless): + +![salt](https://bitbucket.org/kingarthursteam/cannons/wiki/crafts/salt.png) + +Gunpowder (schapeless): + +![craft gunpowder](https://bitbucket.org/repo/bxGA9B/images/474788878-craft_gunpowder.gif) + +cannons: + +![cannon & bronce cannon](https://bitbucket.org/repo/bxGA9B/images/237489485-craft_cannon.gif) +Wooden stand: + +![wooden stand](https://bitbucket.org/kingarthursteam/cannons/wiki/crafts/woden_stand.png) + +Stone Stand: + +![stone stand](https://bitbucket.org/kingarthursteam/cannons/wiki/crafts/stone_stand.png) + +## Screenshots +![Cannon Tower](https://bitbucket.org/kingarthursteam/cannons/wiki/screenshots/screenshot_1531516.png) +![Cannon Tower 2](https://bitbucket.org/kingarthursteam/cannons/wiki/screenshots/screenshot_1849086.png) +![Cannon Tower 3](https://bitbucket.org/kingarthursteam/cannons/wiki/screenshots/screenshot_5781410.png) + +## Create your own Cannonball! + +``` +#!lua + +local ball_wood={ + physical = false, + timer=0, + textures = {"cannons_wood_bullet.png"}, + lastpos={}, + damage=20, + range=1, + gravity=10, + velocity=40, + name="cannons:wood_bullet", + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + local playername = player:get_player_name() + player:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + minetest.chat_send_all(playername .." tried to catch a cannonball") + end, + on_mob_hit = function(self,pos,mob) + mob:punch(self.object, 1.0, { + full_punch_interval=1.0, + damage_groups={fleshy=self.damage}, + }, nil) + self.object:remove() + end, + on_node_hit = function(self,pos,node) + if node.name == "default:dirt_with_grass" then + minetest.env:set_node({x=pos.x, y=pos.y, z=pos.z},{name="default:dirt"}) + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + elseif node.name == "default:water_source" then + minetest.sound_play("cannons_splash", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + else + minetest.sound_play("cannons_hit", + {pos = pos, gain = 1.0, max_hear_distance = 32,}) + self.object:remove() + end + end, + +} +cannons.register_muni("cannons:ball_wood",ball_wood) +``` + + + + +Have fun! \ No newline at end of file diff --git a/mods/cannons/screenshot.png b/mods/cannons/screenshot.png new file mode 100644 index 0000000..2bb5f16 Binary files /dev/null and b/mods/cannons/screenshot.png differ diff --git a/mods/cannons/sounds/cannons_dig.1.ogg b/mods/cannons/sounds/cannons_dig.1.ogg new file mode 100644 index 0000000..90ef8cf Binary files /dev/null and b/mods/cannons/sounds/cannons_dig.1.ogg differ diff --git a/mods/cannons/sounds/cannons_dig.2.ogg b/mods/cannons/sounds/cannons_dig.2.ogg new file mode 100644 index 0000000..5fca9ed Binary files /dev/null and b/mods/cannons/sounds/cannons_dig.2.ogg differ diff --git a/mods/cannons/sounds/cannons_dig.3.ogg b/mods/cannons/sounds/cannons_dig.3.ogg new file mode 100644 index 0000000..d723fa9 Binary files /dev/null and b/mods/cannons/sounds/cannons_dig.3.ogg differ diff --git a/mods/cannons/sounds/cannons_dig.4.ogg b/mods/cannons/sounds/cannons_dig.4.ogg new file mode 100644 index 0000000..43a2132 Binary files /dev/null and b/mods/cannons/sounds/cannons_dig.4.ogg differ diff --git a/mods/cannons/sounds/cannons_hit.ogg b/mods/cannons/sounds/cannons_hit.ogg new file mode 100644 index 0000000..edcea90 Binary files /dev/null and b/mods/cannons/sounds/cannons_hit.ogg differ diff --git a/mods/cannons/sounds/cannons_shot.ogg b/mods/cannons/sounds/cannons_shot.ogg new file mode 100644 index 0000000..8d5e4cf Binary files /dev/null and b/mods/cannons/sounds/cannons_shot.ogg differ diff --git a/mods/cannons/sounds/cannons_splash.1.ogg b/mods/cannons/sounds/cannons_splash.1.ogg new file mode 100644 index 0000000..cfea1af Binary files /dev/null and b/mods/cannons/sounds/cannons_splash.1.ogg differ diff --git a/mods/cannons/sounds/cannons_splash.2.ogg b/mods/cannons/sounds/cannons_splash.2.ogg new file mode 100644 index 0000000..889c494 Binary files /dev/null and b/mods/cannons/sounds/cannons_splash.2.ogg differ diff --git a/mods/cannons/sounds/cannons_splash.3.ogg b/mods/cannons/sounds/cannons_splash.3.ogg new file mode 100644 index 0000000..8172248 Binary files /dev/null and b/mods/cannons/sounds/cannons_splash.3.ogg differ diff --git a/mods/cannons/sounds/cannons_splash.4.ogg b/mods/cannons/sounds/cannons_splash.4.ogg new file mode 100644 index 0000000..df66825 Binary files /dev/null and b/mods/cannons/sounds/cannons_splash.4.ogg differ diff --git a/mods/cannons/sounds/cannons_walk.1.ogg b/mods/cannons/sounds/cannons_walk.1.ogg new file mode 100644 index 0000000..b407f53 Binary files /dev/null and b/mods/cannons/sounds/cannons_walk.1.ogg differ diff --git a/mods/cannons/sounds/cannons_walk.2.ogg b/mods/cannons/sounds/cannons_walk.2.ogg new file mode 100644 index 0000000..d307e9f Binary files /dev/null and b/mods/cannons/sounds/cannons_walk.2.ogg differ diff --git a/mods/cannons/sounds/cannons_walk.3.ogg b/mods/cannons/sounds/cannons_walk.3.ogg new file mode 100644 index 0000000..aacda59 Binary files /dev/null and b/mods/cannons/sounds/cannons_walk.3.ogg differ diff --git a/mods/cannons/textures/cannons_ball_mithril.png b/mods/cannons/textures/cannons_ball_mithril.png new file mode 100644 index 0000000..fdbab48 Binary files /dev/null and b/mods/cannons/textures/cannons_ball_mithril.png differ diff --git a/mods/cannons/textures/cannons_bronze_side.png b/mods/cannons/textures/cannons_bronze_side.png new file mode 100644 index 0000000..5a328d7 Binary files /dev/null and b/mods/cannons/textures/cannons_bronze_side.png differ diff --git a/mods/cannons/textures/cannons_bronze_top.png b/mods/cannons/textures/cannons_bronze_top.png new file mode 100644 index 0000000..0a8a587 Binary files /dev/null and b/mods/cannons/textures/cannons_bronze_top.png differ diff --git a/mods/cannons/textures/cannons_bucket_salt.png b/mods/cannons/textures/cannons_bucket_salt.png new file mode 100644 index 0000000..0d72f8e Binary files /dev/null and b/mods/cannons/textures/cannons_bucket_salt.png differ diff --git a/mods/cannons/textures/cannons_bullet.png b/mods/cannons/textures/cannons_bullet.png new file mode 100644 index 0000000..37ae175 Binary files /dev/null and b/mods/cannons/textures/cannons_bullet.png differ diff --git a/mods/cannons/textures/cannons_bullet_iron.png b/mods/cannons/textures/cannons_bullet_iron.png new file mode 100644 index 0000000..68e445a Binary files /dev/null and b/mods/cannons/textures/cannons_bullet_iron.png differ diff --git a/mods/cannons/textures/cannons_gunpowder.png b/mods/cannons/textures/cannons_gunpowder.png new file mode 100755 index 0000000..59bd438 Binary files /dev/null and b/mods/cannons/textures/cannons_gunpowder.png differ diff --git a/mods/cannons/textures/cannons_mithril_side.png b/mods/cannons/textures/cannons_mithril_side.png new file mode 100644 index 0000000..05d1186 Binary files /dev/null and b/mods/cannons/textures/cannons_mithril_side.png differ diff --git a/mods/cannons/textures/cannons_mithril_top.png b/mods/cannons/textures/cannons_mithril_top.png new file mode 100644 index 0000000..f520730 Binary files /dev/null and b/mods/cannons/textures/cannons_mithril_top.png differ diff --git a/mods/cannons/textures/cannons_rim.png b/mods/cannons/textures/cannons_rim.png new file mode 100644 index 0000000..f6c34df Binary files /dev/null and b/mods/cannons/textures/cannons_rim.png differ diff --git a/mods/cannons/textures/cannons_salt.png b/mods/cannons/textures/cannons_salt.png new file mode 100644 index 0000000..22490b2 Binary files /dev/null and b/mods/cannons/textures/cannons_salt.png differ diff --git a/mods/cannons/textures/cannons_salt_alt.png b/mods/cannons/textures/cannons_salt_alt.png new file mode 100644 index 0000000..921f3b9 Binary files /dev/null and b/mods/cannons/textures/cannons_salt_alt.png differ diff --git a/mods/cannons/textures/cannons_steel_side.png b/mods/cannons/textures/cannons_steel_side.png new file mode 100644 index 0000000..f8c26c4 Binary files /dev/null and b/mods/cannons/textures/cannons_steel_side.png differ diff --git a/mods/cannons/textures/cannons_steel_top.png b/mods/cannons/textures/cannons_steel_top.png new file mode 100644 index 0000000..d202aca Binary files /dev/null and b/mods/cannons/textures/cannons_steel_top.png differ diff --git a/mods/cannons/textures/cannons_wood_bullet.png b/mods/cannons/textures/cannons_wood_bullet.png new file mode 100644 index 0000000..0b4b612 Binary files /dev/null and b/mods/cannons/textures/cannons_wood_bullet.png differ diff --git a/mods/cannons/tnt.lua b/mods/cannons/tnt.lua new file mode 100644 index 0000000..09fc540 --- /dev/null +++ b/mods/cannons/tnt.lua @@ -0,0 +1,27 @@ +cannons.register_muni("tnt:tnt",{ + physical = false, + timer=0, + textures = {"tnt_top.png", "tnt_bottom.png", "tnt_side.png", "tnt_side.png", "tnt_side.png", "tnt_side.png"}, + lastpos={}, + damage=15, + visual = "cube", + visual_size = {x=0.5, y=0.5}, + range=1, + gravity=10, + velocity=20, + collisionbox = {-0.25,-0.25,-0.25, 0.25,0.25,0.25}, + on_player_hit = function(self,pos,player) + minetest.registered_nodes["tnt:tnt_burning"].on_timer(pos); + self.object:remove() + end, + on_mob_hit = function(self,pos,mob) + minetest.registered_nodes["tnt:tnt_burning"].on_timer(pos); + self.object:remove() + end, + on_node_hit = function(self,pos,node) + minetest.registered_nodes["tnt:tnt_burning"].on_timer(pos); + self.object:remove() + end, +}) + +cannons.register_gunpowder("tnt:gunpowder"); \ No newline at end of file diff --git a/mods/carpets/LICENSE b/mods/carpets/LICENSE new file mode 100644 index 0000000..8000a6f --- /dev/null +++ b/mods/carpets/LICENSE @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random + Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/mods/carpets/README.md b/mods/carpets/README.md new file mode 100644 index 0000000..5c90b5e --- /dev/null +++ b/mods/carpets/README.md @@ -0,0 +1,15 @@ +# Carpets mod for minetest + +This mod adds 15 colorized wool carpets to the minetest + +![](https://github.com/bell07/minetest-carpets/blob/master/screenshot.png) + +Maintained version, based on https://forum.minetest.net/viewtopic.php?t=15459 and https://forum.minetest.net/viewtopic.php?f=11&t=11637 + +License: LGPL-2.1+. + +The mod provides an api to register more carpets using template nodes +Example: +``` +carpets.register('default:dirt') -- registers carpet looks like dirt +``` diff --git a/mods/carpets/api.lua b/mods/carpets/api.lua new file mode 100644 index 0000000..75f6994 --- /dev/null +++ b/mods/carpets/api.lua @@ -0,0 +1,58 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +local carpet_proto = { + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5} + }, + groups = { + snappy = 2, + flammable = 3, + oddly_breakable_by_hand = 3, + choppy = 2, + carpet = 1, + } +} + +-- Register the carpet and recipe using material +-- material - already registered material item the textures and sounds applied from +-- def - optional additional - or overriding data passed to minetest.register_node() +carpets = {} + +function carpets.register(material, def) + local node = table.copy(carpet_proto) + if def then + for k,v in pairs(def) do + node[k] = v + end + end + + local material_def = minetest.registered_nodes[material] + node.description = S("Carpet ")..(node.description or material_def.description) + node.sounds = table.copy(node.sounds or material_def.sounds or default.node_sound_defaults()) + node.groups = table.copy(node.groups) + + if node.tiles then + node.tiles = table.copy(node.tiles) + elseif material_def.tiles[6] then + node.tiles = {material_def.tiles[6]} + else + node.tiles = table.copy(material_def.tiles) + end + + local name = "carpet:" .. (node.name or material:gsub(":", "_")) + node.name = nil + + minetest.register_node(":" .. name, node) + + minetest.register_craft({ + output = name .. " 32", + recipe = { + {"group:wool", "group:wool", "group:wool"}, + {"group:wool", material, "group:wool"} + } + }) +end diff --git a/mods/carpets/depends.txt b/mods/carpets/depends.txt new file mode 100644 index 0000000..35bc5e5 --- /dev/null +++ b/mods/carpets/depends.txt @@ -0,0 +1 @@ +wool? diff --git a/mods/carpets/description.txt b/mods/carpets/description.txt new file mode 100644 index 0000000..29d806b --- /dev/null +++ b/mods/carpets/description.txt @@ -0,0 +1,8 @@ +Carpets mod for minetest + +This mod adds 15 colorized wool carpets to the minetest. + +License: LGPL-2.1+ + +The mod provides an api to register more carpets using template nodes +Example: carpets.register('default:dirt') -- registers carpet looks like dirt diff --git a/mods/carpets/init.lua b/mods/carpets/init.lua new file mode 100644 index 0000000..11d0916 --- /dev/null +++ b/mods/carpets/init.lua @@ -0,0 +1,25 @@ +local modpath = minetest.get_modpath(minetest.get_current_modname()) +dofile(modpath .. "/api.lua") + +if minetest.get_modpath("wool") then + local nodenames = { + "wool:black", + "wool:blue", + "wool:brown", + "wool:cyan", + "wool:dark_green", + "wool:dark_grey", + "wool:green", + "wool:grey", + "wool:magenta", + "wool:orange", + "wool:pink", + "wool:red", + "wool:violet", + "wool:white", + "wool:yellow", + } + for _, nodename in ipairs(nodenames) do + carpets.register(nodename) + end +end diff --git a/mods/carpets/locale/carpets.es.tr b/mods/carpets/locale/carpets.es.tr new file mode 100644 index 0000000..b1b4755 --- /dev/null +++ b/mods/carpets/locale/carpets.es.tr @@ -0,0 +1,2 @@ +# textdomain: carpets +Carpet=Alfombra \ No newline at end of file diff --git a/mods/carpets/mod.conf b/mods/carpets/mod.conf new file mode 100644 index 0000000..1a77313 --- /dev/null +++ b/mods/carpets/mod.conf @@ -0,0 +1 @@ +name = carpets diff --git a/mods/carpets/screenshot.png b/mods/carpets/screenshot.png new file mode 100644 index 0000000..e9d876e Binary files /dev/null and b/mods/carpets/screenshot.png differ diff --git a/mods/climatez/.luacheckrc b/mods/climatez/.luacheckrc new file mode 100644 index 0000000..560847f --- /dev/null +++ b/mods/climatez/.luacheckrc @@ -0,0 +1,18 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/climatez/LICENSE.md b/mods/climatez/LICENSE.md new file mode 100644 index 0000000..b3b5885 --- /dev/null +++ b/mods/climatez/LICENSE.md @@ -0,0 +1,27 @@ +# Licenses + +- Source code: GPLv3. + +- Textures: CC BY-SA 4.0 + +- Sounds: + +-- "climatez_rain.ogg" +Author: unfa +https://freesound.org/people/unfa/sounds/177479/ +License: This work is licensed under the Creative Commons 0 License. + +-- "climatez_thunder.ogg" +Author: elmoustachio +https://freesound.org/people/elmoustachio/sounds/476735/ +License: This work is licensed under the Creative Commons 0 License. + +# Mentions + +- I take some code from the Weather Mod by theFox6: +https://forum.minetest.net/viewtopic.php?t=5245 +https://github.com/theFox6/minetest_mod_weather + +- I take some ideas from the mod: +Regional Weather Bundle by TestificateMods +https://forum.minetest.net/viewtopic.php?t=24569 diff --git a/mods/climatez/climatez.conf b/mods/climatez/climatez.conf new file mode 100644 index 0000000..3a0c186 --- /dev/null +++ b/mods/climatez/climatez.conf @@ -0,0 +1,24 @@ +#Climate Min Height +climate_min_height = -10 +#Chance of the a new volume climate to be created +##in seconds +climate_change_ratio = 600 +#Volume of the regional climates (sphere) +climate_radius = 80 +#Average time of the climate +climate_duration = 80 +#Random deviation for the duration +climate_duration_random_ratio = 0.45 +#Await this min time between climates +climate_period = 600 +#Sounds +climate_rain_sound = true +#Storm Chance +##Chance of the rain being stormy +storm_chance = 5 +##Lightning Effect +lightning = true +lightning_chance = 300 +thunder_sound = true +##Dust Screen Effect for Sandstorms +dust_effect = true diff --git a/mods/climatez/engine.lua b/mods/climatez/engine.lua new file mode 100644 index 0000000..d720965 --- /dev/null +++ b/mods/climatez/engine.lua @@ -0,0 +1,645 @@ +local modpath = ... +local climatez = {} +climatez.wind = {} +climatez.climates = {} +climatez.players = {} +climatez.settings = {} + +--Settings + +local settings = Settings(modpath .. "/climatez.conf") + +climatez.settings.climate_min_height = tonumber(settings:get("climate_min_height")) +climatez.settings.climate_change_ratio = tonumber(settings:get("climate_change_ratio")) +climatez.settings.radius = tonumber(settings:get("climate_radius")) +climatez.settings.climate_duration = tonumber(settings:get("climate_duration")) +climatez.settings.duration_random_ratio = tonumber(settings:get("climate_duration_random_ratio")) +climatez.settings.climate_period = tonumber(settings:get("climate_period")) +climatez.settings.climate_rain_sound = settings:get_bool("climate_rain_sound") +climatez.settings.thunder_sound = settings:get_bool("thunder_sound") +climatez.settings.storm_chance = tonumber(settings:get("storm_chance")) +climatez.settings.lightning = settings:get_bool("lightning") +climatez.settings.lightning_chance = tonumber(settings:get("lightning_chance")) +climatez.settings.dust_effect = settings:get_bool("dust_effect") + +local climate_max_height = tonumber(minetest.settings:get('cloud_height', true)) or 120 +local check_light = minetest.is_yes(minetest.settings:get_bool('light_roofcheck', true)) + +local timer = 0 -- A timer to create climates each x seconds an for lightning too. + +--Helper Functions + +function remove_table_by_key(tab, key) + local i = 0 + local keys, values = {},{} + for k, v in pairs(tab) do + i = i + 1 + keys[i] = k + values[i] = v + end + + while i > 0 do + if keys[i] == key then + table.remove(keys, i) + table.remove(values, i) + break + end + i = i - 1 + end + + local new_tab = {} + + for j = 1, #keys do + new_tab[keys[j]] = values[j] + end + + return new_tab +end + +local function player_inside_climate(player_pos) + --This function returns the climate_id if inside and true/false if the climate is enabled or not + --check altitude + if (player_pos.y < climatez.settings.climate_min_height) or (player_pos.y > climate_max_height) then + return false, nil, nil + end + --check if on water + player_pos.y = player_pos.y + 1 + local node_name = minetest.get_node(player_pos).name + if minetest.registered_nodes[node_name] and ( + minetest.registered_nodes[node_name]["liquidtype"] == "source" or + minetest.registered_nodes[node_name]["liquidtype"] == "flowing") then + return false, nil, true + end + player_pos.y = player_pos.y - 1 + --If sphere's centre coordinates is (cx,cy,cz) and its radius is r, + --then point (x,y,z) is in the sphere if (x−cx)2+(y−cy)2+(z−cz)2 math.sqrt((player_pos.x - climate_center.x)^2+ + (player_pos.y - climate_center.y)^2 + + (player_pos.z - climate_center.z)^2 + ) then + if climatez.climates[i].disabled then + return i, true, false + else + return i, false, false + end + end + end + return false, false, false +end + +local function has_light(minp, maxp) + local manip = minetest.get_voxel_manip() + local e1, e2 = manip:read_from_map(minp, maxp) + local area = VoxelArea:new{MinEdge=e1, MaxEdge=e2} + local data = manip:get_light_data() + local node_num = 0 + local light = false + + for i in area:iterp(minp, maxp) do + node_num = node_num + 1 + if node_num < 5 then + if data[i] and data[i] == 15 then + light = true + break + end + else + node_num = 0 + end + end + + return light +end + +--DOWNFALLS REGISTRATIONS + +climatez.registered_downfalls = {} + +local function register_downfall(name, def) + local new_def = table.copy(def) + climatez.registered_downfalls[name] = new_def +end + +register_downfall("rain", { + min_pos = {x = -15, y = 10, z = -15}, + max_pos = {x = 15, y = 10, z = 15}, + falling_speed = 10, + amount = 20, + exptime = 1, + size = 1, + texture = "climatez_rain.png", +}) + +register_downfall("storm", { + min_pos = {x = -15, y = 20, z = -15}, + max_pos = {x = 15, y = 20, z = 15}, + falling_speed = 20, + amount = 30, + exptime = 1, + size = 1, + texture = "climatez_rain.png", +}) + +register_downfall("snow", { + min_pos = {x = -15, y = 10, z= -15}, + max_pos = {x = 15, y = 10, z = 15}, + falling_speed = 5, + amount = 10, + exptime = 5, + size = 1, + texture= {"climatez_snow.png", "climatez_snow2.png", "climatez_snow3.png"}, +}) + +register_downfall("sand", { + min_pos = {x = -20, y = -4, z = -20}, + max_pos = {x = 20, y = 4, z = 20}, + falling_speed = -1, + amount = 25, + exptime = 1, + size = 4, + texture = "climatez_sand.png", +}) + +--WIND STUFF + +local function create_wind() + local wind = { + x = math.random(0,5), + y = 0, + z = math.random(0,5) + } + return wind +end + +function get_player_wind(player_name) + local player = minetest.get_player_by_name(player_name) + if not player then + return + end + local player_pos = player:get_pos() + local climate_id = player_inside_climate(player_pos) + if climate_id then + return climatez.climates[climate_id].wind + else + return create_wind() + end +end + +--LIGHTING + +local function show_lightning(player_name) + local player = minetest.get_player_by_name(player_name) + if not player then + return + end + local hud_id = player:hud_add({ + hud_elem_type = "image", + text = "climatez_lightning.png", + position = {x=0, y=0}, + scale = {x=-100, y=-100}, + alignment = {x=1, y=1}, + offset = {x=0, y=0} + }) + --save the lightning per player, NOT per climate + player:get_meta():set_int("climatez:lightning", hud_id) + if climatez.settings.thunder_sound then + minetest.sound_play("climatez_thunder", { + to_player = player_name, + loop = false, + gain = 1.0, + }) + end +end + +local function remove_lightning(player_name) + local player = minetest.get_player_by_name(player_name) + if not player then + return + end + local meta = player:get_meta() + local hud_id = meta:get_int("climatez:lightning") + player:hud_remove(hud_id) + meta:set_int("climatez:lightning", -1) +end + +-- CLIMATE PLAYERS FUNCTIONS + +local function add_climate_player(player_name, climate_id, downfall_type) + local player = minetest.get_player_by_name(player_name) + climatez.players[player_name] = { + climate_id = climate_id, + sky_color = nil, + clouds_color = nil, + rain_sound_handle = nil, + disabled = false, + hud_id = nil, + downfall_type = downfall_type, + } + local downfall_sky_color, downfall_clouds_color + + if downfall_type == "rain" or downfall_type == "storm" or downfall_type == "snow" then + downfall_sky_color = "#808080" + downfall_clouds_color = "#C0C0C0" + else --"sand" + downfall_sky_color = "#DEB887" + downfall_clouds_color = "#DEB887" + end + climatez.players[player_name].sky_color = player:get_sky().sky_color or "#8cbafa" + player:set_sky({ + sky_color = { + day_sky = downfall_sky_color, + } + }) + climatez.players[player_name].clouds_color = player:get_clouds().color or "#fff0f0e5" + player:set_clouds({ + color = downfall_clouds_color, + }) + + if downfall_type == "sand" and climatez.settings.dust_effect then + climatez.players[player_name].hud_id = player:hud_add({ + hud_elem_type = "image", + text = "climatez_dust.png", + position = {x=0, y=0}, + scale = {x=-100, y=-100}, + alignment = {x=1, y=1}, + offset = {x=0, y=0} + }) + end + + if climatez.settings.climate_rain_sound and (downfall_type == "rain" or downfall_type== "storm") then + local rain_sound_handle = minetest.sound_play("climatez_rain", { + to_player = player_name, + loop = true, + gain = 1.0, + }) + climatez.players[player_name].rain_sound_handle = rain_sound_handle + end + + --minetest.chat_send_all(player_name.." added to climate "..tostring(climate_id)) +end + +local function remove_climate_player_effects(player_name) + local player = minetest.get_player_by_name(player_name) + if not player then + return + end + player:set_sky({ + sky_color = { + day_sky = climatez.players[player_name].sky_color, + } + }) + player:set_clouds({ + color = climatez.players[player_name].clouds_color, + }) + + local climate_id = climatez.players[player_name].climate_id + local downfall_type = climatez.players[player_name].downfall_type + + local rain_sound_handle = climatez.players[player_name].rain_sound_handle + if rain_sound_handle and climatez.settings.climate_rain_sound + and (downfall_type == "rain" or downfall_type == "storm") then + minetest.sound_stop(rain_sound_handle) + end + + if downfall_type == "sand" and climatez.settings.dust_effect then + player:hud_remove(climatez.players[player_name].hud_id) + end + + local lightning = player:get_meta():get_int("climatez:lightning") + if downfall_type == "storm" and lightning > 0 then + remove_lightning(player_name) + end + +end + +local function remove_climate_player(player_name) + remove_climate_player_effects(player_name) + --remove the player--> + climatez.players = remove_table_by_key(climatez.players, player_name) +end + +local function remove_climate_players(climate_id) + for _player_name, _climate in pairs(climatez.players) do + local _climate_id = _climate.climate_id + if _climate_id == climate_id then + local _player = minetest.get_player_by_name(_player_name) + if _player then + remove_climate_player(_player_name) + --minetest.chat_send_all(_player_name.." removed from climate") + end + end + end +end + +--CLIMATE FUNCTIONS + +local function get_id() + local id + --search for a free position + for i= 1, (#climatez.climates+1) do + if not climatez.climates[i] then + id = i + break + end + end + return id +end + +local climate = { + --A disabled climate is a not removed climate, + --but inactive, so another climate changes are not allowed yet. + id = nil, + disabled = false, + center = {}, + downfall_type = "", + wind = {}, + timer = 0, + end_time = 0, + + new = function(self, climate_id, player_name) + + local new_climate = {} + + setmetatable(new_climate, self) + + self.__index = self + + --Get the climate_id + new_climate.id = climate_id + + --program climate's end + local climate_duration = climatez.settings.climate_duration + local climate_duration_random_ratio = climatez.settings.duration_random_ratio + --minetest.chat_send_all(tostring(climate_id)) + new_climate.end_time = (math.random(climate_duration - (climate_duration*climate_duration_random_ratio), + climate_duration + (climate_duration*climate_duration_random_ratio))) + + --Get the center of the climate + local player = minetest.get_player_by_name(player_name) + new_climate.center = player:get_pos() + + --Get the downfall type + + --Firstly get some biome data + local biome_data = minetest.get_biome_data(new_climate.center) + local biome_heat = biome_data.heat + local biome_humidity = biome_data.humidity + + local downfall_type + + if biome_heat > 28 and biome_humidity >= 35 then + local chance = math.random(climatez.settings.storm_chance) + if chance == 1 then + downfall_type = "storm" + else + downfall_type = "rain" + end + elseif biome_heat >= 50 and biome_humidity <= 20 then + downfall_type = "sand" + elseif biome_heat <= 28 then + downfall_type = "snow" + end + + if not downfall_type then + downfall_type = "rain" + end + + new_climate.downfall_type = downfall_type + + --minetest.chat_send_all(tostring(biome_heat).. ", "..downfall_type) + + --Get the wind of the climate + --Create wind + local wind = create_wind() + + --strong wind if a storm + if downfall_type == "storm" then + wind = { + x = wind.x * 2, + y = wind.y, + z = wind.z * 2, + } + end + + --very strong wind if a sandstorm + if downfall_type == "sand" then + if wind.x < 1 then + wind.x = 1 + wind.y = 1 + end + wind = { + x = wind.x * 5, + y = wind.y, + z = wind.z * 5, + } + end + + new_climate.wind = wind + + --save the player + add_climate_player(player_name, new_climate.id, new_climate.downfall_type) + + return new_climate + + end, + + on_timer = function(self) + --minetest.chat_send_all(tostring(self.timer)) + if not(self.disabled) and self.timer >= self.end_time then + self:remove() --remove the climate + self.timer = 0 + elseif self.disabled and self.timer > climatez.settings.climate_period then + --remove the climate after the period time: + climatez.climates = remove_table_by_key(climatez.climates, self.id) + --minetest.chat_send_all("end of period time") + end + end, + + remove = function(self) + --remove the players + remove_climate_players(self.id) + --disable the climate, but do not remove it + self.disabled = true + end, + + stop = function(self) + --remove the players + remove_climate_players(self.id) + --remove the climate + climatez.climates = remove_table_by_key(climatez.climates, self.id) + end, + + apply = function(self, _player_name) + + local _player = minetest.get_player_by_name(_player_name) + + local _player_pos = _player:get_pos() + + local downfall = climatez.registered_downfalls[self.downfall_type] + local wind_pos = vector.multiply(self.wind, -1) + local minp = vector.add(vector.add(_player_pos, downfall.min_pos), wind_pos) + local maxp = vector.add(vector.add(_player_pos, downfall.max_pos), wind_pos) + + --Check if in player in interiors or not + if check_light and not has_light(minp, maxp) then + return + end + + local vel = {x = self.wind.x, y = - downfall.falling_speed, z = self.wind.z} + local acc = {x = 0, y = 0, z = 0} + local exp = downfall.exptime + + local downfall_texture + if type(downfall.texture) == "table" then + downfall_texture = downfall.texture[math.random(#downfall.texture)] + else + downfall_texture = downfall.texture + end + + minetest.add_particlespawner({ + amount = downfall.amount, time=0.5, + minpos = minp, maxpos = maxp, + minvel = vel, maxvel = vel, + minacc = acc, maxacc = acc, + minexptime = exp, maxexptime = exp, + minsize = downfall.size, maxsize= downfall.size, + collisiondetection = true, collision_removal = true, + vertical = true, + texture = downfall_texture, playername = _player_name + }) + + --Lightning + if self.downfall_type == "storm" and climatez.settings.lightning then + local lightning = _player:get_meta():get_int("climatez:lightning") + --minetest.chat_send_all(tostring(lightning)) + --minetest.chat_send_all(tonumber(timer)) + if lightning <= 0 then + local chance = math.random(climatez.settings.lightning_chance) + if chance == 1 then + show_lightning(_player_name) + minetest.after(0.15, remove_lightning, _player_name) + end + end + end + + --minetest.chat_send_all("Climate created by ".._player_name) + end +} + +--CLIMATE CORE: GLOBALSTEP + +minetest.register_globalstep(function(dtime) + --Update the climate timers + for _, _climate in pairs(climatez.climates) do + _climate.timer = _climate.timer + dtime + _climate:on_timer() + end + timer = timer + dtime + if timer >= 1 then + for _, player in ipairs(minetest.get_connected_players()) do + local player_name = player:get_player_name() + local player_pos = player:get_pos() + local climate_id, climate_disabled, on_water = player_inside_climate(player_pos) + --minetest.chat_send_all(player_name .. " in climate "..tostring(climate_id)) + local _climate = climatez.players[player_name] + if _climate and on_water then + remove_climate_player(player_name) + elseif climate_id and not(climate_disabled) and _climate then + local _climate_id = _climate.climate_id --check if player still inside the climate + if not(climate_id == _climate_id) then + remove_climate_player(player_name) + --minetest.chat_send_all(player_name.." abandoned a climate") + end + elseif climate_id and not(climate_disabled) and not(_climate) then --another player enter into the climate + local downfall_type = climatez.climates[climate_id].downfall_type + add_climate_player(player_name, climate_id, downfall_type) + --minetest.chat_send_all(player_name.." entered into the climate") + elseif not(climate_id) and not(_climate) then --chance to create a climate + if not climate_disabled then --if not in a disabled climate + local chance = math.random(climatez.settings.climate_change_ratio) + if chance == 1 then + local new_climate_id = get_id() + climatez.climates[new_climate_id] = climate:new(new_climate_id, player_name) + --minetest.chat_send_all(player_name.." created a climate id="..new_climate_id) + end + end + end + end + timer = 0 + end + --Apply the climates to the players with climate defined + for _player_name, _climate in pairs(climatez.players) do + local player = minetest.get_player_by_name(_player_name) + if player and _climate then + if not(_climate.disabled) then + if climatez.climates[_climate.climate_id] then + climatez.climates[_climate.climate_id]:apply(_player_name) + end + end + end + end +end) + +--COMMANDS + +minetest.register_chatcommand("climatez", { + privs = { + server = true, + }, + description = "Climate Functions", + func = function(name, param) + local subcommand, player_name + local i = 0 + for word in string.gmatch(param, "([%a%d_-]+)") do + if i == 0 then + subcommand = word + else + player_name = word + end + i = i + 1 + end + if not(subcommand == "stop") and not(subcommand == "start") then + return true, "Error: The subcomands for the climatez command are 'stop | start'" + end + --if subcommand then + --minetest.chat_send_all("subcommand =".. subcommand) + --end + --if player_name then + --minetest.chat_send_all("player name =".. player_name) + --end + if subcommand == "stop" then + if player_name then --remove the climate only for that player + local player = minetest.get_player_by_name(player_name) + if player then + if climatez.players[player_name] then + remove_climate_player_effects(player_name) + climatez.players[player_name].disabled = true + else + minetest.chat_send_player(player_name, player_name .. " ".. "is not inside any climate.") + end + else + minetest.chat_send_player(name, "The player "..player_name.." is not online.") + end + else + local player = minetest.get_player_by_name(name) + if player then + if climatez.players[name] then + climatez.climates[climatez.players[name].climate_id]:stop() + else + minetest.chat_send_player(name, "You are not inside any climate.") + end + end + end + elseif subcommand == "start" then + local player = minetest.get_player_by_name(name) + if player then + if climatez.players[name] then + climatez.climates[climatez.players[name].climate_id]:stop() + end + local new_climate_id = get_id() + climatez.climates[new_climate_id] = climate:new(new_climate_id, name) + end + end + end, +}) diff --git a/mods/climatez/init.lua b/mods/climatez/init.lua new file mode 100644 index 0000000..1048c4f --- /dev/null +++ b/mods/climatez/init.lua @@ -0,0 +1,12 @@ +-- +-- Climatez +-- License:GPLv3 +-- + +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + assert(loadfile(modpath .. "/engine.lua"))(modpath) +end diff --git a/mods/climatez/mod.conf b/mods/climatez/mod.conf new file mode 100644 index 0000000..fde10a9 --- /dev/null +++ b/mods/climatez/mod.conf @@ -0,0 +1,2 @@ +name = climatez +description = A weather mod diff --git a/mods/climatez/sounds/climatez_rain.ogg b/mods/climatez/sounds/climatez_rain.ogg new file mode 100644 index 0000000..7fa5651 Binary files /dev/null and b/mods/climatez/sounds/climatez_rain.ogg differ diff --git a/mods/climatez/sounds/climatez_thunder.ogg b/mods/climatez/sounds/climatez_thunder.ogg new file mode 100644 index 0000000..b4acdef Binary files /dev/null and b/mods/climatez/sounds/climatez_thunder.ogg differ diff --git a/mods/climatez/textures/climatez_dust.png b/mods/climatez/textures/climatez_dust.png new file mode 100644 index 0000000..2fd2a27 Binary files /dev/null and b/mods/climatez/textures/climatez_dust.png differ diff --git a/mods/climatez/textures/climatez_lightning.png b/mods/climatez/textures/climatez_lightning.png new file mode 100644 index 0000000..f2b88fc Binary files /dev/null and b/mods/climatez/textures/climatez_lightning.png differ diff --git a/mods/climatez/textures/climatez_rain.png b/mods/climatez/textures/climatez_rain.png new file mode 100644 index 0000000..495afa4 Binary files /dev/null and b/mods/climatez/textures/climatez_rain.png differ diff --git a/mods/climatez/textures/climatez_sand.png b/mods/climatez/textures/climatez_sand.png new file mode 100644 index 0000000..565ef4b Binary files /dev/null and b/mods/climatez/textures/climatez_sand.png differ diff --git a/mods/climatez/textures/climatez_snow.png b/mods/climatez/textures/climatez_snow.png new file mode 100644 index 0000000..74bf6a1 Binary files /dev/null and b/mods/climatez/textures/climatez_snow.png differ diff --git a/mods/climatez/textures/climatez_snow2.png b/mods/climatez/textures/climatez_snow2.png new file mode 100644 index 0000000..182d460 Binary files /dev/null and b/mods/climatez/textures/climatez_snow2.png differ diff --git a/mods/climatez/textures/climatez_snow3.png b/mods/climatez/textures/climatez_snow3.png new file mode 100644 index 0000000..161d252 Binary files /dev/null and b/mods/climatez/textures/climatez_snow3.png differ diff --git a/mods/cool_trees/LICENSE.md b/mods/cool_trees/LICENSE.md new file mode 100644 index 0000000..9ba6e10 --- /dev/null +++ b/mods/cool_trees/LICENSE.md @@ -0,0 +1,3 @@ +Models, icons and textures by runs. +License: GPLv3 + diff --git a/mods/cool_trees/README.md b/mods/cool_trees/README.md new file mode 100644 index 0000000..8af65a5 --- /dev/null +++ b/mods/cool_trees/README.md @@ -0,0 +1 @@ +# cool_trees diff --git a/mods/cool_trees/baldcypress/init.lua b/mods/cool_trees/baldcypress/init.lua new file mode 100644 index 0000000..6219830 --- /dev/null +++ b/mods/cool_trees/baldcypress/init.lua @@ -0,0 +1,267 @@ +-- +-- Bald Cypress +-- +local modname = "baldcypress" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Bald Cypress + +local function grow_new_baldcypress_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-4, y = pos.y, z = pos.z-4}, modpath.."/schematics/baldcypress.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + name = "baldcypress:baldcypress_tree", + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.0005, + spread = {x = 250, y = 250, z = 250}, + seed = 678, + octaves = 3, + persist = 0.66 + }, + biomes = {"coniferous_forest_ocean"}, + height = 2, + y_min = 0, + y_max = 0, + schematic = modpath.."/schematics/baldcypress.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("baldcypress:sapling", { + description = S("Bald Cypress Tree Sapling"), + drawtype = "plantlike", + tiles = {"baldcypress_sapling.png"}, + inventory_image = "baldcypress_sapling.png", + wield_image = "baldcypress_sapling.png", + paramtype = "light", + --sunlight_propagates = true, + walkable = false, + on_timer = grow_new_baldcypress_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "baldcypress:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("baldcypress:trunk", { + description = S("Bald Cypress Trunk"), + tiles = { + "baldcypress_trunk_top.png", + "baldcypress_trunk_top.png", + "baldcypress_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- baldcypress wood +minetest.register_node("baldcypress:wood", { + description = S("Bald Cypress Wood"), + tiles = {"baldcypress_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- baldcypress tree leaves +minetest.register_node("baldcypress:leaves", { + description = S("Bald Cypress Leaves"), + drawtype = "allfaces_optional", + tiles = {"baldcypress_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"baldcypress:sapling"}, rarity = 20}, + {items = {"baldcypress:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +minetest.register_node("baldcypress:dry_branches", { + description = S("Bald Cypress Dry Branches"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"baldcypress_dry_branches.png"}, + use_texture_alpha = "clip", + inventory_image = "baldcypress_dry_branches.png", + wield_image = "baldcypress_dry_branches.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("baldcypress:liana", { + description = S("Bald Cypress Liana"), + drawtype = "nodebox", + walkable = false, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"baldcypress_liana.png"}, + use_texture_alpha = "clip", + inventory_image = "baldcypress_liana.png", + wield_image = "baldcypress_liana.png", + is_ground_content = false, + node_box = { + type = "fixed", + fixed = {-0.25, -0.5, 0.0, 0.25, 0.5, 0.0} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1, + }, + sounds = default.node_sound_leaves_defaults(), +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "baldcypress:wood 4", + recipe = {{"baldcypress:trunk"}} +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "baldcypress:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "baldcypress:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "baldcypress:convert_baldcypress_saplings_to_node_timer", + nodenames = {"baldcypress:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"baldcypress:trunk"}, + leaves = {"baldcypress:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Bald Cypress Wood Fence"), + texture = "baldcypress_wood.png", + material = "baldcypress:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("baldcypress:fence", table.copy(fence)) + fence.description = S("Bald Cypress Fence Rail") + default.register_fence_rail("baldcypress:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Bald Cypress Fence Gate") + doors.register_fencegate("baldcypress:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "baldcypress_trunk", + "baldcypress:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"baldcypress_wood.png"}, + S("Bald Cypress Stair"), + S("Bald Cypress Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("baldcypress", "wood", "baldcypress:wood", { + description = "Bald Cypress", + tiles = {"baldcypress_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +--Support for bonemeal + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"baldcypress:sapling", grow_new_baldcypress_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/baldcypress/locale/baldcypress.es.tr b/mods/cool_trees/baldcypress/locale/baldcypress.es.tr new file mode 100644 index 0000000..0501a3f --- /dev/null +++ b/mods/cool_trees/baldcypress/locale/baldcypress.es.tr @@ -0,0 +1,12 @@ +# textdomain: baldcypress +Bald Cypress Trunk=Madera de criprés calvo +Bald Cypress Wood=Tablas de criprés calvo +Bald Cypress Leaves=Hojas de criprés calvo +Bald Cypress Tree Sapling=Retoño de criprés calvo +Bald Cypress Tree Stair=Escaleras de criprés calvo +Bald Cypress Slab=Losa de de criprés calvo +Inner Bald Cypress Stair=Escaleras de criprés calvo interior +Outer Bald Cypress Stair=Escaleras de criprés calvo exterior +Bald Cypress Slab=Losa de criprés calvo +Bald Cypress Dry Branches=Ramas secas de ciprés calvo +Bald Cypress Liana=Liana de ciprés calvo diff --git a/mods/cool_trees/baldcypress/mod.conf b/mods/cool_trees/baldcypress/mod.conf new file mode 100644 index 0000000..746838c --- /dev/null +++ b/mods/cool_trees/baldcypress/mod.conf @@ -0,0 +1,4 @@ +name = baldcypress +description = Bald Cypress for Swamps +depends = default +optional_depends = stairs, bonemeal, swampz, doors, moreblocks diff --git a/mods/cool_trees/baldcypress/schematics/baldcypress.lua b/mods/cool_trees/baldcypress/schematics/baldcypress.lua new file mode 100644 index 0000000..32377d4 --- /dev/null +++ b/mods/cool_trees/baldcypress/schematics/baldcypress.lua @@ -0,0 +1,2325 @@ +schematic = { + size = {x=11, y=19, z=11}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + {ypos=12, prob=254}, + {ypos=13, prob=254}, + {ypos=14, prob=254}, + {ypos=15, prob=254}, + {ypos=16, prob=254}, + {ypos=17, prob=254}, + {ypos=18, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:trunk", prob=254, param2=21}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:trunk", prob=254, param2=23}, + {name="baldcypress:trunk", prob=254, param2=21}, + {name="baldcypress:trunk", prob=254, param2=21}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:dry_branches", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=9}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:trunk", prob=254, param2=23}, + {name="baldcypress:trunk", prob=254, param2=23}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=2}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=2}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=3}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:dry_branches", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=1}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=18}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=2}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=12}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:trunk", prob=254, param2=2}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=1}, + {name="baldcypress:trunk", prob=254, param2=2}, + {name="baldcypress:dry_branches", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:trunk", prob=254, param2=22}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="baldcypress:trunk", prob=254, param2=3}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:dry_branches", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:trunk", prob=254, param2=7}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="baldcypress:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/baldcypress/schematics/baldcypress.mts b/mods/cool_trees/baldcypress/schematics/baldcypress.mts new file mode 100644 index 0000000..aef5070 Binary files /dev/null and b/mods/cool_trees/baldcypress/schematics/baldcypress.mts differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_dry_branches.png b/mods/cool_trees/baldcypress/textures/baldcypress_dry_branches.png new file mode 100644 index 0000000..32c7e19 Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_dry_branches.png differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_leaves.png b/mods/cool_trees/baldcypress/textures/baldcypress_leaves.png new file mode 100644 index 0000000..c6e501d Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_leaves.png differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_liana.png b/mods/cool_trees/baldcypress/textures/baldcypress_liana.png new file mode 100644 index 0000000..100e320 Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_liana.png differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_sapling.png b/mods/cool_trees/baldcypress/textures/baldcypress_sapling.png new file mode 100644 index 0000000..c41e468 Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_sapling.png differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_trunk.png b/mods/cool_trees/baldcypress/textures/baldcypress_trunk.png new file mode 100644 index 0000000..7fbf71c Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_trunk.png differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_trunk_top.png b/mods/cool_trees/baldcypress/textures/baldcypress_trunk_top.png new file mode 100644 index 0000000..8d4564d Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_trunk_top.png differ diff --git a/mods/cool_trees/baldcypress/textures/baldcypress_wood.png b/mods/cool_trees/baldcypress/textures/baldcypress_wood.png new file mode 100644 index 0000000..c8b57e4 Binary files /dev/null and b/mods/cool_trees/baldcypress/textures/baldcypress_wood.png differ diff --git a/mods/cool_trees/bamboo/init.lua b/mods/cool_trees/bamboo/init.lua new file mode 100644 index 0000000..4334c58 --- /dev/null +++ b/mods/cool_trees/bamboo/init.lua @@ -0,0 +1,292 @@ +-- +-- Bamboo +-- + +-- Thanks to VanessaE, Tenplus1, paramat and all others who +-- contribute to this mod + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +bamboo = {} + +-- bamboo stalk with leaves + +local ai = {name = "air", param1 = 000} +local bt = {name = "bamboo:trunk", param1 = 255} +local bf = {name = "bamboo:trunk", param1 = 255, force_place = true} +local fd = {name = "default:dirt", param1 = 255, force_place = true} +local lp = {name = "bamboo:leaves", param1 = 255} +local lr = {name = "bamboo:leaves", param1 = 100} + +bamboo.bambootree = { + + size = {x = 3, y = 18, z = 3}, + + data = { + + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + lr, lr, lr, + lr, lp, lr, + ai, lp, ai, + ai, ai, ai, + + ai, fd, ai, + ai, bf, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + ai, bt, ai, + lr, bt, lr, + lr, lp, lr, + ai, lp, ai, + ai, lr, ai, + + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + ai, ai, ai, + lr, lr, lr, + lr, lp, lr, + ai, lp, ai, + ai, ai, ai, + + }, + + yslice_prob = { + {ypos = 3, prob = 127}, + {ypos = 4, prob = 127}, + {ypos = 5, prob = 127}, + {ypos = 6, prob = 127}, + {ypos = 7, prob = 127}, + {ypos = 8, prob = 127}, + {ypos = 9, prob = 127}, + {ypos = 10, prob = 127}, + {ypos = 11, prob = 127}, + {ypos = 12, prob = 127}, + }, +} + + +local function grow_new_bambootree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + bamboo.bambootree, "0", nil, false) +end + +-- +-- Decoration +-- + +minetest.register_decoration({ + name = "bamboo:bamboo_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.005, + scale = 0.001, + spread = {x = 240, y = 240, z = 240}, + seed = 2776, + octaves = 3, + persist = 0.65 + }, + biomes = {"grassland"}, + y_min = 2, + y_max = 20, + schematic = bamboo.bambootree, + flags = "place_center_x, place_center_z", +}) + +-- +-- Nodes +-- + +-- Bamboo (thanks to Nelo-slay on DeviantArt for the free Bamboo base image) +minetest.register_node("bamboo:trunk", { + description = S("Bamboo"), + drawtype = "plantlike", + tiles = {"bamboo.png"}, + inventory_image = "bamboo.png", + wield_image = "bamboo.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + climbable = true, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 1, flammable = 2, tree = 1}, + sounds = default.node_sound_leaves_defaults(), + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, + +}) + +-- bamboo wood +minetest.register_node("bamboo:wood", { + description = S("Bamboo Wood"), + tiles = {"bamboo_floor.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- bamboo stalk leaves +minetest.register_node("bamboo:leaves", { + description = S("Bamboo Leaves"), + drawtype = "allfaces_optional", + tiles = {"bamboo_leaves.png"}, + paramtype = "light", + walkable = false, + climbable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"bamboo:sprout"}, rarity = 10}, + {items = {"bamboo:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + + +-- Bamboo Sprout +minetest.register_node("bamboo:sprout", { + description = S("Bamboo Sprout"), + drawtype = "plantlike", + tiles = {"bamboo_sprout.png"}, + inventory_image = "bamboo_sprout.png", + wield_image = "bamboo_sprout.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + groups = { + snappy = 3, attached_node = 1, flammable = 2, + dig_immediate = 3, ethereal_sapling = 1 + }, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 0, 4 / 16} + }, + on_use = minetest.item_eat(2), + grown_height = 11, + on_timer = grow_new_bambootree_tree, + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, +}) + +-- crafts +minetest.register_craft({ + output = "bamboo:wood 4", + recipe = {{"bamboo:trunk"}} +}) + +default.register_leafdecay({ + trunks = {"bamboo:trunk"}, + leaves = {"bamboo:leaves"}, + radius = 3, +}) + +minetest.register_lbm({ + name = "bamboo:convert_bambootree_sprouts_to_node_timer", + nodenames = {"bamboo:sprout"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"bamboo:sprout", grow_new_bambootree_tree, "soil"}, + }) +end + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Bamboo Wood Fence"), + texture = "bamboo_floor.png", + material = "bamboo:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("bamboo:fence", table.copy(fence)) + fence.description = S("Bamboo Fence Rail") + default.register_fence_rail("bamboo:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Bamboo Fence Gate") + doors.register_fencegate("bamboo:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "bamboo_trunk", + "bamboo:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"bamboo_floor.png"}, + S("Bamboo Stair"), + S("Bamboo Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("bamboo", "wood", "bamboo:wood", { + description = "Bamboo", + tiles = {"bamboo_floor.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end diff --git a/mods/cool_trees/bamboo/locale/bamboo.es.tr b/mods/cool_trees/bamboo/locale/bamboo.es.tr new file mode 100644 index 0000000..42a950e --- /dev/null +++ b/mods/cool_trees/bamboo/locale/bamboo.es.tr @@ -0,0 +1,7 @@ +# textdomain: bamboo +Bamboo=Bambú +Bamboo Leaves=Hojas de bambú +Bamboo Sprout=Brote de bambú +Bamboo Wood=Tablas de bambú +Bamboo Stair=Escaleras de bambú +Bamboo Slab=Losa de bambú diff --git a/mods/cool_trees/bamboo/mod.conf b/mods/cool_trees/bamboo/mod.conf new file mode 100644 index 0000000..7846643 --- /dev/null +++ b/mods/cool_trees/bamboo/mod.conf @@ -0,0 +1,4 @@ +name = bamboo +description = Bamboo Tree for Grassland +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/bamboo/textures/bamboo.png b/mods/cool_trees/bamboo/textures/bamboo.png new file mode 100644 index 0000000..4f9c2b1 Binary files /dev/null and b/mods/cool_trees/bamboo/textures/bamboo.png differ diff --git a/mods/cool_trees/bamboo/textures/bamboo_floor.png b/mods/cool_trees/bamboo/textures/bamboo_floor.png new file mode 100644 index 0000000..1a83cb9 Binary files /dev/null and b/mods/cool_trees/bamboo/textures/bamboo_floor.png differ diff --git a/mods/cool_trees/bamboo/textures/bamboo_leaves.png b/mods/cool_trees/bamboo/textures/bamboo_leaves.png new file mode 100644 index 0000000..dfe698e Binary files /dev/null and b/mods/cool_trees/bamboo/textures/bamboo_leaves.png differ diff --git a/mods/cool_trees/bamboo/textures/bamboo_sprout.png b/mods/cool_trees/bamboo/textures/bamboo_sprout.png new file mode 100644 index 0000000..4d8279e Binary files /dev/null and b/mods/cool_trees/bamboo/textures/bamboo_sprout.png differ diff --git a/mods/cool_trees/birch/init.lua b/mods/cool_trees/birch/init.lua new file mode 100644 index 0000000..ad14b9b --- /dev/null +++ b/mods/cool_trees/birch/init.lua @@ -0,0 +1,315 @@ +-- +-- Birch Tree +-- + +local modname = "birch" +local modpath = minetest.get_modpath(modname) + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +birch = {} + + +-- birch tree + +local ai = {name = "air", param1 = 000} +local tr = {name = "birch:trunk", param1 = 255, force_place = true} +local lp = {name = "birch:leaves", param1 = 255} +local lr = {name = "birch:leaves", param1 = 255} + +birch.birchtree = { + + size = {x = 5, y = 7, z = 5}, + + data = { + + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + lr, lp, lp, lp, lr, + lr, lp, lp, lp, lr, + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + lp, lp, lp, lp, lp, + lp, lp, lp, lp, lp, + ai, lr, lp, lr, ai, + ai, ai, lp, ai, ai, + + ai, ai, tr, ai, ai, + ai, ai, tr, ai, ai, + ai, ai, tr, ai, ai, + lp, lp, tr, lp, lp, + lp, lp, tr, lp, lp, + ai, lp, tr, lp, ai, + ai, lp, lp, lp, ai, + + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + lp, lp, lp, lp, lp, + lp, lp, lp, lp, lp, + ai, lr, lp, lr, ai, + ai, ai, lp, ai, ai, + + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + lr, lp, lp, lp, lr, + lr, lp, lp, lp, lr, + ai, ai, ai, ai, ai, + ai, ai, ai, ai, ai, + + }, + + yslice_prob = { + {ypos = 1, prob = 127} + }, +} + + +local function grow_new_birch_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, birch.birchtree, "0", nil, false) +end + +-- +-- Decoration +-- + +local place_on +local biomes +local offset +local scale + +if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.01 + scale = 0.001 +else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.008 + scale = 0.001 +end + +minetest.register_decoration({ + name = "birch:birch_tree", + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 255, y = 255, z = 255}, + seed = 32, + octaves = 3, + persist = 0.67 + }, + biomes = {biomes}, + y_min = 1, + y_max = 80, + schematic = birch.birchtree, + flags = "place_center_x, place_center_z", + place_offset_y = 1, +}) + +-- +-- Nodes +-- + +minetest.register_node("birch:sapling", { + description = S("Birch Sapling"), + drawtype = "plantlike", + tiles = {"birch_sapling.png"}, + inventory_image = "birch_sapling.png", + wield_image = "birch_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_birch_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "birch:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +-- birch trunk +minetest.register_node("birch:trunk", { + description = S("Birch Trunk"), + tiles = { + "birch_trunk_top.png", + "birch_trunk_top.png", + "birch_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node, + is_ground_content = false, +}) + +-- birch wood +minetest.register_node("birch:wood", { + description = S("Birch Wood"), + tiles = {"birch_wood.png"}, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- birch tree leaves +minetest.register_node("birch:leaves", { + description = S("Birch Leaves"), + drawtype = "allfaces_optional", + tiles = {"birch_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"birch:sapling"}, rarity = 20}, + {items = {"birch:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "birch:wood 4", + recipe = {{"birch:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "birch:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "birch:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "birch:convert_birch_saplings_to_node_timer", + nodenames = {"birch:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"birch:trunk"}, + leaves = {"birch:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Birch Fence"), + texture = "birch_wood.png", + material = "birch:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("birch:fence", table.copy(fence)) + fence.description = S("Birch Fence Rail") + default.register_fence_rail("birch:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Birch Fence Gate") + doors.register_fencegate("birch:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "birch_trunk", + "birch:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"birch_wood.png"}, + S("Birch Tree Stair"), + S("Birch Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("birch", "wood", "birch:wood", { + description = "Birch", + tiles = {"birch_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"birch:sapling", grow_new_birch_tree, "soil"}, + }) +end + +--Door + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_birch_wood", { + tiles = {{ name = "birch_door_wood.png", backface_culling = true }}, + description = S("Birch Wood Door"), + inventory_image = "birch_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"birch:wood", "birch:wood"}, + {"birch:wood", "birch:wood"}, + {"birch:wood", "birch:wood"}, + } + }) +end + diff --git a/mods/cool_trees/birch/locale/birch.es.tr b/mods/cool_trees/birch/locale/birch.es.tr new file mode 100644 index 0000000..863c2f5 --- /dev/null +++ b/mods/cool_trees/birch/locale/birch.es.tr @@ -0,0 +1,11 @@ +# textdomain: birch +Birch Sapling=Retoño de abedul +Birch Trunk=Madera de abedul +Birch Wood=Tablas de abedul +Birch Leaves=Hojas de abedul +Birch Tree Stair=Escaleras de abedul +Birch Tree Slab=Losa de abedul +Inner Birch Tree Stair=Escaleras de abedul interior +Outer Birch Tree Stair=Escaleras de abedul exterior +Birch Slab=Losa de abedul +Birch Wood Door=Puerta de abedul diff --git a/mods/cool_trees/birch/mod.conf b/mods/cool_trees/birch/mod.conf new file mode 100644 index 0000000..42d874e --- /dev/null +++ b/mods/cool_trees/birch/mod.conf @@ -0,0 +1,4 @@ +name = birch +description = Birch Tree for Grassland +depends = default +optional_depends = stairs, bonemeal, rainf, doors, moreblocks diff --git a/mods/cool_trees/birch/textures/birch_door_wood.png b/mods/cool_trees/birch/textures/birch_door_wood.png new file mode 100644 index 0000000..4076136 Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_door_wood.png differ diff --git a/mods/cool_trees/birch/textures/birch_item_wood.png b/mods/cool_trees/birch/textures/birch_item_wood.png new file mode 100644 index 0000000..ebabd22 Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_item_wood.png differ diff --git a/mods/cool_trees/birch/textures/birch_leaves.png b/mods/cool_trees/birch/textures/birch_leaves.png new file mode 100644 index 0000000..6b53e2e Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_leaves.png differ diff --git a/mods/cool_trees/birch/textures/birch_sapling.png b/mods/cool_trees/birch/textures/birch_sapling.png new file mode 100644 index 0000000..4e97ec9 Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_sapling.png differ diff --git a/mods/cool_trees/birch/textures/birch_trunk.png b/mods/cool_trees/birch/textures/birch_trunk.png new file mode 100644 index 0000000..73a6dbc Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_trunk.png differ diff --git a/mods/cool_trees/birch/textures/birch_trunk_top.png b/mods/cool_trees/birch/textures/birch_trunk_top.png new file mode 100644 index 0000000..5edfb4d Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_trunk_top.png differ diff --git a/mods/cool_trees/birch/textures/birch_wood.png b/mods/cool_trees/birch/textures/birch_wood.png new file mode 100644 index 0000000..792b9c8 Binary files /dev/null and b/mods/cool_trees/birch/textures/birch_wood.png differ diff --git a/mods/cool_trees/cherrytree/init.lua b/mods/cool_trees/cherrytree/init.lua new file mode 100644 index 0000000..4e75a35 --- /dev/null +++ b/mods/cool_trees/cherrytree/init.lua @@ -0,0 +1,306 @@ +-- +-- Cherrytree +-- +local modname = "cherrytree" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") +local fruit_grow_time = 1200 + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Cherry Fruit + +minetest.register_node("cherrytree:cherries", { + description = S("Cherries"), + drawtype = "plantlike", + tiles = {"cherrytree_cherries.png"}, + inventory_image = "cherrytree_cherries.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "cherrytree:cherries", param2 = 1}) + end, + + on_dig = function(pos, node, digger) + if digger:is_player() then + local inv = digger:get_inventory() + if inv:room_for_item("main", "cherrytree:cherries") then + inv:add_item("main", "cherrytree:cherries") + end + end + minetest.remove_node(pos) + pos.y = pos.y + 1 + local node_above = minetest.get_node_or_nil(pos) + if node_above and node_above.param2 == 0 and node_above.name == "cherrytree:blossom_leaves" then + --20% of variation on time + local twenty_percent = fruit_grow_time * 0.2 + local grow_time = math.random(fruit_grow_time - twenty_percent, fruit_grow_time + twenty_percent) + minetest.get_node_timer(pos):start(grow_time) + end + end, +}) + +-- Cherrytree + +local function grow_new_cherrytree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/cherrytree.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "cherrytree:cherry_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.00005, + spread = {x = 250, y = 250, z = 250}, + seed = 1242, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 32, + schematic = modpath.."/schematics/cherrytree.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("cherrytree:sapling", { + description = S("Cherrytree Tree Sapling"), + drawtype = "plantlike", + tiles = {"cherrytree_sapling.png"}, + inventory_image = "cherrytree_sapling.png", + wield_image = "cherrytree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_cherrytree_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "cherrytree:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("cherrytree:trunk", { + description = S("Cherrytree Trunk"), + tiles = { + "cherrytree_trunk_top.png", + "cherrytree_trunk_top.png", + "cherrytree_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- cherrytree wood +minetest.register_node("cherrytree:wood", { + description = S("Cherrytree Wood"), + tiles = {"cherrytree_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- cherrytree tree leaves +minetest.register_node("cherrytree:blossom_leaves", { + description = S("Cherrytree Blossom Leaves"), + drawtype = "allfaces_optional", + tiles = {"cherrytree_blossom_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"cherrytree:sapling"}, rarity = 20}, + {items = {"cherrytree:blossom_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, + + on_timer = function(pos) + pos.y = pos.y - 1 + local node = minetest.get_node_or_nil(pos) + if node and node.name == "air" then + minetest.set_node(pos, {name = "cherrytree:cherries"}) + return false + else + return true + end + end +}) + +-- cherrytree tree leaves +minetest.register_node("cherrytree:leaves", { + description = S("Cherrytree Leaves"), + drawtype = "allfaces_optional", + tiles = {"cherrytree_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"cherrytree:sapling"}, rarity = 20}, + {items = {"cherrytree:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "cherrytree:wood 4", + recipe = {{"cherrytree:trunk"}} +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "cherrytree:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "cherrytree:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "cherrytree:convert_cherrytree_saplings_to_node_timer", + nodenames = {"cherrytree:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"cherrytree:trunk"}, + leaves = {"cherrytree:leaves"}, + radius = 3, +}) + +default.register_leafdecay({ + trunks = {"cherrytree:trunk"}, + leaves = {"cherrytree:blossom_leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Cherry Tree Wood Fence"), + texture = "cherrytree_wood.png", + material = "cherrytree:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("cherrytree:fence", table.copy(fence)) + fence.description = S("Cherry Tree Fence Rail") + default.register_fence_rail("cherrytree:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Cherry Tree Fence Gate") + doors.register_fencegate("cherrytree:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "cherrytree_trunk", + "cherrytree:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"cherrytree_wood.png"}, + S("Cherry Tree Stair"), + S("Cherry Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("cherrytree", "wood", "cherrytree:wood", { + description = "Cherry Tree", + tiles = {"cherrytree_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +--Support for bonemeal + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"cherrytree:sapling", grow_new_cherrytree_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/cherrytree/locale/cherrytree.es.tr b/mods/cool_trees/cherrytree/locale/cherrytree.es.tr new file mode 100644 index 0000000..2274c25 --- /dev/null +++ b/mods/cool_trees/cherrytree/locale/cherrytree.es.tr @@ -0,0 +1,12 @@ +# textdomain: cherrytree +Cherries=Cerezas +Cherrytree Trunk=Madera de cerezo +Cherrytree Wood=Tablas de cerezo +Cherrytree Leaves=Hojas de cerezo +Cherrytree Blossom Leaves=Flores de cerezo +Cherrytree Tree Sapling=Retoño de cerezo +Cherry Tree Stair=Escaleras de cerezo +Cherry Tree Slab=Losa de cerezo +Inner Cherrytree Stair=Escaleras de cerezo interior +Outer Cherrytree Stair=Escaleras de cerezo exterior +Cherrytree Slab=Losa de cerezo \ No newline at end of file diff --git a/mods/cool_trees/cherrytree/mod.conf b/mods/cool_trees/cherrytree/mod.conf new file mode 100644 index 0000000..d6fcb7d --- /dev/null +++ b/mods/cool_trees/cherrytree/mod.conf @@ -0,0 +1,4 @@ +name = cherrytree +description = Cherry Tree for Decidious Forest +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/cherrytree/schematics/cherrytree.lua b/mods/cool_trees/cherrytree/schematics/cherrytree.lua new file mode 100644 index 0000000..c383bb8 --- /dev/null +++ b/mods/cool_trees/cherrytree/schematics/cherrytree.lua @@ -0,0 +1,224 @@ +schematic = { + size = {x=6, y=7, z=5}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:cherries", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=126, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:cherries", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:trunk", prob=254, param2=3}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:trunk", prob=254, param2=3}, + {name="cherrytree:trunk", prob=254, param2=3}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:trunk", prob=254, param2=3}, + {name="cherrytree:blossom_leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="cherrytree:blossom_leaves", prob=126, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="cherrytree:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/cherrytree/schematics/cherrytree.mts b/mods/cool_trees/cherrytree/schematics/cherrytree.mts new file mode 100644 index 0000000..af90e86 Binary files /dev/null and b/mods/cool_trees/cherrytree/schematics/cherrytree.mts differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_blossom_leaves.png b/mods/cool_trees/cherrytree/textures/cherrytree_blossom_leaves.png new file mode 100644 index 0000000..ce3a8cc Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_blossom_leaves.png differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_cherries.png b/mods/cool_trees/cherrytree/textures/cherrytree_cherries.png new file mode 100644 index 0000000..cbf9d1d Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_cherries.png differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_leaves.png b/mods/cool_trees/cherrytree/textures/cherrytree_leaves.png new file mode 100644 index 0000000..4845aef Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_leaves.png differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_sapling.png b/mods/cool_trees/cherrytree/textures/cherrytree_sapling.png new file mode 100644 index 0000000..ef6715d Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_sapling.png differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_trunk.png b/mods/cool_trees/cherrytree/textures/cherrytree_trunk.png new file mode 100644 index 0000000..55107e0 Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_trunk.png differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_trunk_top.png b/mods/cool_trees/cherrytree/textures/cherrytree_trunk_top.png new file mode 100644 index 0000000..41b8753 Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_trunk_top.png differ diff --git a/mods/cool_trees/cherrytree/textures/cherrytree_wood.png b/mods/cool_trees/cherrytree/textures/cherrytree_wood.png new file mode 100644 index 0000000..d145e61 Binary files /dev/null and b/mods/cool_trees/cherrytree/textures/cherrytree_wood.png differ diff --git a/mods/cool_trees/chestnuttree/init.lua b/mods/cool_trees/chestnuttree/init.lua new file mode 100644 index 0000000..b11c327 --- /dev/null +++ b/mods/cool_trees/chestnuttree/init.lua @@ -0,0 +1,296 @@ +-- +-- Chestnuttree +-- + +local modname = "chestnuttree" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +--Chesnut Bur + +minetest.register_node("chestnuttree:bur", { + description = S("Chestnut Bur"), + drawtype = "plantlike", + tiles = {"chestnuttree_bur.png"}, + inventory_image = "chestnuttree_bur.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "chestnuttree:bur", param2 = 1}) + end, +}) + +--Chesnut Fruit + +minetest.register_craftitem("chestnuttree:fruit", { + description = S("Chestnut"), + inventory_image = "chestnuttree_fruit.png", + on_use = minetest.item_eat(2), + groups = {flammable = 2, food = 2}, +}) + +minetest.register_craft({ + output = "chestnuttree:fruit", + recipe = { + {'chestnuttree:bur'} + } +}) + +-- chestnuttree + +local function grow_new_chestnuttree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-6, y = pos.y, z = pos.z-6}, modpath.."/schematics/chestnuttree.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + local place_on + local biomes + local offset + local scale + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00004 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.00005 + scale = 0.00004 + end + + minetest.register_decoration({ + name = "chestnuttree:chestnut_tree", + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 250, y = 250, z = 250}, + seed = 278, + octaves = 3, + persist = 0.66 + }, + biomes = {biomes}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/chestnuttree.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + place_offset_y = 1, + }) +end + +-- +-- Nodes +-- + +minetest.register_node("chestnuttree:sapling", { + description = S("Chestnut Tree Sapling"), + drawtype = "plantlike", + tiles = {"chestnuttree_sapling.png"}, + inventory_image = "chestnuttree_sapling.png", + wield_image = "chestnuttree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_chestnuttree_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "chestnuttree:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("chestnuttree:trunk", { + description = S("Chestnut Tree Trunk"), + tiles = { + "chestnuttree_trunk_top.png", + "chestnuttree_trunk_top.png", + "chestnuttree_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node, +}) + +-- chestnuttree wood +minetest.register_node("chestnuttree:wood", { + description = S("Chestnut Tree Wood"), + tiles = {"chestnuttree_wood.png"}, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- chestnuttree tree leaves +minetest.register_node("chestnuttree:leaves", { + description = S("Chestnut Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"chestnuttree_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"chestnuttree:sapling"}, rarity = 20}, + {items = {"chestnuttree:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "chestnuttree:wood 4", + recipe = {{"chestnuttree:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "chestnuttree:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "chestnuttree:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "chestnuttree:convert_chestnuttree_saplings_to_node_timer", + nodenames = {"chestnuttree:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"chestnuttree:trunk"}, + leaves = {"chestnuttree:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Chestnut Tree Wood Fence"), + texture = "chestnuttree_wood.png", + material = "chestnuttree:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("chestnuttree:fence", table.copy(fence)) + fence.description = S("Chestnut Tree Fence Rail") + default.register_fence_rail("chestnuttree:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Chestnut Tree Fence Gate") + doors.register_fencegate("chestnuttree:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "chestnuttree_trunk", + "chestnuttree:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"chestnuttree_wood.png"}, + S("Chestnut Tree Stair"), + S("Chestnut Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("chestnuttree", "wood", "chestnuttree:wood", { + description = "Chestnut Tree", + tiles = {"chestnuttree_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"chestnuttree:sapling", grow_new_chestnuttree_tree, "soil"}, + }) +end + +--Door + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_chestnut_wood", { + tiles = {{ name = "chesnuttree_door_wood.png", backface_culling = true }}, + description = S("Chestnut Wood Door"), + inventory_image = "chestnuttree_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"chestnuttree:wood", "chestnuttree:wood"}, + {"chestnuttree:wood", "chestnuttree:wood"}, + {"chestnuttree:wood", "chestnuttree:wood"}, + } + }) +end diff --git a/mods/cool_trees/chestnuttree/locale/chestnuttree.es.tr b/mods/cool_trees/chestnuttree/locale/chestnuttree.es.tr new file mode 100644 index 0000000..ecc7f74 --- /dev/null +++ b/mods/cool_trees/chestnuttree/locale/chestnuttree.es.tr @@ -0,0 +1,12 @@ +# textdomain: chestnuttree +Chestnut=Castaña +Chestnut Bur=Zurrón de castaña +Chestnut Tree Inner Stair=Escalera interior de castaño +Chestnut Tree Leaves=Hojas de castaño +Chestnut Tree Outer Stair=Escalera exterior de castaño +Chestnut Tree Slab=Losa de castaño +Chestnut Tree Stair=Escalera de castaño +Chestnut Tree Sapling=Retoño de castaño +Chestnut Tree Trunk=Madera de castaño +Chestnut Tree Wood=Tablas de castaño +Chestnut Wood Door=Puerta de castaño diff --git a/mods/cool_trees/chestnuttree/mod.conf b/mods/cool_trees/chestnuttree/mod.conf new file mode 100644 index 0000000..6ad1a2e --- /dev/null +++ b/mods/cool_trees/chestnuttree/mod.conf @@ -0,0 +1,4 @@ +name = chestnuttree +description = Chesnut Tree for Grassland +depends = default +optional_depends = stairs, bonemeal, rainf, doors, moreblocks diff --git a/mods/cool_trees/chestnuttree/schematics/chestnuttree.lua b/mods/cool_trees/chestnuttree/schematics/chestnuttree.lua new file mode 100644 index 0000000..51f345e --- /dev/null +++ b/mods/cool_trees/chestnuttree/schematics/chestnuttree.lua @@ -0,0 +1,2386 @@ +schematic = { + size = {x=13, y=13, z=14}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + {ypos=12, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=9}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=7}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=9}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=174, param2=1}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=2}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=3}, + {name="chestnuttree:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=18}, + {name="chestnuttree:trunk", prob=254, param2=18}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=23}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=2}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=1}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:trunk", prob=254, param2=9}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=12}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=174, param2=1}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=7}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=7}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=4}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=7}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=5}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=7}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=128, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:trunk", prob=254, param2=7}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:bur", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:leaves", prob=254, param2=0}, + {name="chestnuttree:bur", prob=174, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="chestnuttree:leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/chestnuttree/schematics/chestnuttree.mts b/mods/cool_trees/chestnuttree/schematics/chestnuttree.mts new file mode 100644 index 0000000..eaac526 Binary files /dev/null and b/mods/cool_trees/chestnuttree/schematics/chestnuttree.mts differ diff --git a/mods/cool_trees/chestnuttree/textures/chesnuttree_door_wood.png b/mods/cool_trees/chestnuttree/textures/chesnuttree_door_wood.png new file mode 100644 index 0000000..87339d3 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chesnuttree_door_wood.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_bur.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_bur.png new file mode 100644 index 0000000..58a3a97 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_bur.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_fruit.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_fruit.png new file mode 100644 index 0000000..59c1400 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_fruit.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_item_wood.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_item_wood.png new file mode 100644 index 0000000..f7c6dd7 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_item_wood.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_leaves.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_leaves.png new file mode 100644 index 0000000..1a8be43 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_leaves.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_sapling.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_sapling.png new file mode 100644 index 0000000..a7e6e3a Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_sapling.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_trunk.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_trunk.png new file mode 100644 index 0000000..c648438 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_trunk.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_trunk_top.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_trunk_top.png new file mode 100644 index 0000000..872991e Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_trunk_top.png differ diff --git a/mods/cool_trees/chestnuttree/textures/chestnuttree_wood.png b/mods/cool_trees/chestnuttree/textures/chestnuttree_wood.png new file mode 100644 index 0000000..fe44e75 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/chestnuttree_wood.png differ diff --git a/mods/cool_trees/chestnuttree/textures/ts_chestnuttree_front.png b/mods/cool_trees/chestnuttree/textures/ts_chestnuttree_front.png new file mode 100644 index 0000000..a537794 Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/ts_chestnuttree_front.png differ diff --git a/mods/cool_trees/chestnuttree/textures/ts_chestnuttree_front_right.png b/mods/cool_trees/chestnuttree/textures/ts_chestnuttree_front_right.png new file mode 100644 index 0000000..e685d2a Binary files /dev/null and b/mods/cool_trees/chestnuttree/textures/ts_chestnuttree_front_right.png differ diff --git a/mods/cool_trees/clementinetree/init.lua b/mods/cool_trees/clementinetree/init.lua new file mode 100644 index 0000000..78f4189 --- /dev/null +++ b/mods/cool_trees/clementinetree/init.lua @@ -0,0 +1,260 @@ +-- +-- Clementinetree +-- + +local modname = "clementinetree" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_node("clementinetree:clementine", { + description = S("Clementine"), + drawtype = "plantlike", + tiles = {"clementinetree_clementine.png"}, + inventory_image = "clementinetree_clementine.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "clementinetree:clementine", param2 = 1}) + end, +}) + +-- clementinetree + +local function grow_new_clementinetree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/clementinetree.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "clementinetree:clementine_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.00004, + spread = {x = 250, y = 250, z = 250}, + seed = 3456, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/clementinetree.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("clementinetree:sapling", { + description = S("Clementine Tree Sapling"), + drawtype = "plantlike", + tiles = {"clementinetree_sapling.png"}, + inventory_image = "clementinetree_sapling.png", + wield_image = "clementinetree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_clementinetree_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "clementinetree:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("clementinetree:trunk", { + description = S("Clementine Tree Trunk"), + tiles = { + "clementinetree_trunk_top.png", + "clementinetree_trunk_top.png", + "clementinetree_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node, +}) + +-- clementinetree wood +minetest.register_node("clementinetree:wood", { + description = S("Clementine Tree Wood"), + tiles = {"clementinetree_wood.png"}, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- clementinetree tree leaves +minetest.register_node("clementinetree:leaves", { + description = S("Clementine Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"clementinetree_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"clementinetree:sapling"}, rarity = 20}, + {items = {"clementinetree:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "clementinetree:wood 4", + recipe = {{"clementinetree:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "clementinetree:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "clementinetree:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "clementinetree:convert_clementinetree_saplings_to_node_timer", + nodenames = {"clementinetree:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"clementinetree:trunk"}, + leaves = {"clementinetree:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Clementine Tree Wood Fence"), + texture = "clementinetree_wood.png", + material = "clementinetree:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("clementinetree:fence", table.copy(fence)) + fence.description = S("Clementine Tree Fence Rail") + default.register_fence_rail("clementinetree:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Clementine Tree Fence Gate") + doors.register_fencegate("clementinetree:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "clementinetree_trunk", + "clementinetree:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"clementinetree_wood.png"}, + S("Clementine Tree Stair"), + S("Clementine Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("clementinetree", "wood", "clementinetree:wood", { + description = "Clementine Tree", + tiles = {"clementinetree_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"clementinetree:sapling", grow_new_clementinetree_tree, "soil"}, + }) +end + + +--Door + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_clementinetree_wood", { + tiles = {{ name = "clementinetree_door_wood.png", backface_culling = true }}, + description = S("Clementine Wood Door"), + inventory_image = "clementinetree_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"clementinetree:wood", "clementinetree:wood"}, + {"clementinetree:wood", "clementinetree:wood"}, + {"clementinetree:wood", "clementinetree:wood"}, + } + }) +end diff --git a/mods/cool_trees/clementinetree/locale/clementinetree.es.tr b/mods/cool_trees/clementinetree/locale/clementinetree.es.tr new file mode 100644 index 0000000..09787a0 --- /dev/null +++ b/mods/cool_trees/clementinetree/locale/clementinetree.es.tr @@ -0,0 +1,11 @@ +# textdomain: clementinetree +Clementine=Clementina +Clementine Tree Inner Stair=Escalera interior de clementinero +Clementine Tree Leaves=Hojas de clementinero +Clementine Tree Outer Stair=Escalera exterior de clementinero +Clementine Tree Slab=Losa de clementinero +Clementine Tree Stair=Escalera de clementinero +Clementine Tree Sapling=Retoño de clementinero +Clementine Tree Trunk=Madera de clementinero +Clementine Tree Wood=Tablas de clementinero +Clementine Wood Door=Puerta de clementinero diff --git a/mods/cool_trees/clementinetree/mod.conf b/mods/cool_trees/clementinetree/mod.conf new file mode 100644 index 0000000..a87dc93 --- /dev/null +++ b/mods/cool_trees/clementinetree/mod.conf @@ -0,0 +1,4 @@ +name = clementinetree +description = Clementine Tree for Decidious Forest +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/clementinetree/schematics/clementinetree.lua b/mods/cool_trees/clementinetree/schematics/clementinetree.lua new file mode 100644 index 0000000..98f1d9e --- /dev/null +++ b/mods/cool_trees/clementinetree/schematics/clementinetree.lua @@ -0,0 +1,164 @@ +schematic = { + size = {x=5, y=6, z=5}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:trunk", prob=254, param2=21}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:clementine", prob=254, param2=1}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="clementinetree:trunk", prob=254, param2=20}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:trunk", prob=254, param2=20}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:clementine", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="clementinetree:leaves", prob=126, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="clementinetree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} + diff --git a/mods/cool_trees/clementinetree/schematics/clementinetree.mts b/mods/cool_trees/clementinetree/schematics/clementinetree.mts new file mode 100644 index 0000000..2934580 Binary files /dev/null and b/mods/cool_trees/clementinetree/schematics/clementinetree.mts differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_clementine.png b/mods/cool_trees/clementinetree/textures/clementinetree_clementine.png new file mode 100644 index 0000000..d0e2e85 Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_clementine.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_door_wood.png b/mods/cool_trees/clementinetree/textures/clementinetree_door_wood.png new file mode 100644 index 0000000..1d3ac59 Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_door_wood.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_item_wood.png b/mods/cool_trees/clementinetree/textures/clementinetree_item_wood.png new file mode 100644 index 0000000..df6836f Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_item_wood.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_leaves.png b/mods/cool_trees/clementinetree/textures/clementinetree_leaves.png new file mode 100644 index 0000000..1666ccd Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_leaves.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_sapling.png b/mods/cool_trees/clementinetree/textures/clementinetree_sapling.png new file mode 100644 index 0000000..13d34f6 Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_sapling.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_trunk.png b/mods/cool_trees/clementinetree/textures/clementinetree_trunk.png new file mode 100644 index 0000000..db33bdd Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_trunk.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_trunk_top.png b/mods/cool_trees/clementinetree/textures/clementinetree_trunk_top.png new file mode 100644 index 0000000..09c4750 Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_trunk_top.png differ diff --git a/mods/cool_trees/clementinetree/textures/clementinetree_wood.png b/mods/cool_trees/clementinetree/textures/clementinetree_wood.png new file mode 100644 index 0000000..d76008d Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/clementinetree_wood.png differ diff --git a/mods/cool_trees/clementinetree/textures/ts_clementinetree_front.png b/mods/cool_trees/clementinetree/textures/ts_clementinetree_front.png new file mode 100644 index 0000000..5db121c Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/ts_clementinetree_front.png differ diff --git a/mods/cool_trees/clementinetree/textures/ts_clementinetree_front_right.png b/mods/cool_trees/clementinetree/textures/ts_clementinetree_front_right.png new file mode 100644 index 0000000..60918ca Binary files /dev/null and b/mods/cool_trees/clementinetree/textures/ts_clementinetree_front_right.png differ diff --git a/mods/cool_trees/ebony/init.lua b/mods/cool_trees/ebony/init.lua new file mode 100644 index 0000000..478c7e8 --- /dev/null +++ b/mods/cool_trees/ebony/init.lua @@ -0,0 +1,314 @@ +-- +-- Ebony +-- + +local modname = "ebony" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Ebony + +local function grow_new_ebony_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-5}, modpath.."/schematics/ebony.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "ebony:ebony_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0.005, + scale = 0.002, + spread = {x = 250, y = 250, z = 250}, + seed = 1007, + octaves = 3, + persist = 0.66 + }, + biomes = {"rainforest"}, + height = 2, + y_min = 1, + y_max = 62, + schematic = modpath.."/schematics/ebony.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + place_offset_y = -1, + }) +end + +-- +-- Nodes +-- + +minetest.register_node("ebony:sapling", { + description = S("Ebony Tree Sapling"), + drawtype = "plantlike", + tiles = {"ebony_sapling.png"}, + inventory_image = "ebony_sapling.png", + wield_image = "ebony_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_ebony_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "ebony:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("ebony:trunk", { + description = S("Ebony Trunk"), + tiles = { + "ebony_trunk_top.png", + "ebony_trunk_top.png", + "ebony_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- ebony wood +minetest.register_node("ebony:wood", { + description = S("Ebony Wood"), + tiles = {"ebony_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- ebony tree leaves +minetest.register_node("ebony:leaves", { + description = S("Ebony Leaves"), + drawtype = "allfaces_optional", + tiles = {"ebony_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"ebony:sapling"}, rarity = 20}, + {items = {"ebony:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Creeper/Vines... +-- + +minetest.register_node("ebony:creeper", { + description = S("Ebony Creeper"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"ebony_creeper.png"}, + use_texture_alpha = "clip", + inventory_image = "ebony_creeper.png", + wield_image = "ebony_creeper.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("ebony:creeper_leaves", { + description = S("Ebony Creeper with Leaves"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"ebony_creeper_leaves.png"}, + use_texture_alpha = "clip", + inventory_image = "ebony_creeper_leaves.png", + wield_image = "ebony_creeper_leaves.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("ebony:liana", { + description = S("Ebony Liana"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"ebony_liana.png"}, + use_texture_alpha = "clip", + inventory_image = "ebony_liana.png", + wield_image = "ebony_liana.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.0, 0.5, 0.5, 0.0} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1, + }, + sounds = default.node_sound_leaves_defaults(), +}) + +--Persimmon Kaki + +minetest.register_node("ebony:persimmon", { + description = S("Persimmon"), + drawtype = "plantlike", + tiles = {"ebony_persimmon.png"}, + inventory_image = "ebony_persimmon.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(4), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "ebony:persimmon", param2 = 1}) + end, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "ebony:wood 4", + recipe = {{"ebony:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "ebony:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "ebony:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "ebony:convert_ebony_saplings_to_node_timer", + nodenames = {"ebony:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"ebony:trunk"}, + leaves = {"ebony:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Ebony Wood Fence"), + texture = "ebony_wood.png", + material = "ebony:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("ebony:fence", table.copy(fence)) + fence.description = S("Ebony Fence Rail") + default.register_fence_rail("ebony:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Ebony Fence Gate") + doors.register_fencegate("ebony:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "ebony_trunk", + "ebony:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"ebony_wood.png"}, + S("Ebony Stair"), + S("Ebony Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("ebony", "wood", "ebony:wood", { + description = "Ebony", + tiles = {"ebony_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"ebony:sapling", grow_new_ebony_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/ebony/locale/ebony.es.tr b/mods/cool_trees/ebony/locale/ebony.es.tr new file mode 100644 index 0000000..03d6b6b --- /dev/null +++ b/mods/cool_trees/ebony/locale/ebony.es.tr @@ -0,0 +1,13 @@ +# textdomain: ebony +Ebony Trunk=Madera de ébano +Ebony Wood=Tablas de ébano +Ebony Leaves=Hojas de ébano +Ebony Creeper=Enredadera de ébano +Ebony Creeper with Leaves=Enredadera colgante con hojas de ébano +Ebony Liana=Liana de ébano +Ebony Tree Sapling=Retoño de árbol de ébano +Ebony Stair=Escaleras de ébano +Inner Ebony Stair=Escaleras de ébano interior +Outer Ebony Stair=Escaleras de ébano exterior +Ebony Slab=Losa de ébano +Persimmon=Kaki diff --git a/mods/cool_trees/ebony/mod.conf b/mods/cool_trees/ebony/mod.conf new file mode 100644 index 0000000..4a6c079 --- /dev/null +++ b/mods/cool_trees/ebony/mod.conf @@ -0,0 +1,4 @@ +name = ebony +description = Ebony Tree for Rainforest Biome +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/ebony/schematics/ebony.lua b/mods/cool_trees/ebony/schematics/ebony.lua new file mode 100644 index 0000000..0ed6faa --- /dev/null +++ b/mods/cool_trees/ebony/schematics/ebony.lua @@ -0,0 +1,2081 @@ +schematic = { + size = {x=11, y=17, z=11}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + {ypos=12, prob=254}, + {ypos=13, prob=254}, + {ypos=14, prob=254}, + {ypos=15, prob=254}, + {ypos=16, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=126, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:persimmon", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:persimmon", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=3}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=126, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:persimmon", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:persimmon", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=3}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper_leaves", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper_leaves", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper_leaves", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:persimmon", prob=126, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:liana", prob=254, param2=3}, + {name="ebony:creeper", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper", prob=254, param2=3}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper", prob=254, param2=3}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper_leaves", prob=254, param2=3}, + {name="ebony:liana", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=3}, + {name="ebony:trunk", prob=254, param2=3}, + {name="ebony:trunk", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:creeper", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=3}, + {name="ebony:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=2}, + {name="ebony:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:creeper_leaves", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=126, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="ebony:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=3}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:creeper_leaves", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=2}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:trunk", prob=254, param2=1}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:liana", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="ebony:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/ebony/schematics/ebony.mts b/mods/cool_trees/ebony/schematics/ebony.mts new file mode 100644 index 0000000..213f427 Binary files /dev/null and b/mods/cool_trees/ebony/schematics/ebony.mts differ diff --git a/mods/cool_trees/ebony/textures/ebony_creeper.png b/mods/cool_trees/ebony/textures/ebony_creeper.png new file mode 100644 index 0000000..8e4ff75 Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_creeper.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_creeper_leaves.png b/mods/cool_trees/ebony/textures/ebony_creeper_leaves.png new file mode 100644 index 0000000..3bbef0f Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_creeper_leaves.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_leaves.png b/mods/cool_trees/ebony/textures/ebony_leaves.png new file mode 100644 index 0000000..a3505c6 Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_leaves.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_liana.png b/mods/cool_trees/ebony/textures/ebony_liana.png new file mode 100644 index 0000000..610722a Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_liana.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_persimmon.png b/mods/cool_trees/ebony/textures/ebony_persimmon.png new file mode 100644 index 0000000..3e8557c Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_persimmon.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_sapling.png b/mods/cool_trees/ebony/textures/ebony_sapling.png new file mode 100644 index 0000000..93968dd Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_sapling.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_trunk.png b/mods/cool_trees/ebony/textures/ebony_trunk.png new file mode 100644 index 0000000..6c7b2fc Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_trunk.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_trunk_top.png b/mods/cool_trees/ebony/textures/ebony_trunk_top.png new file mode 100644 index 0000000..7546b85 Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_trunk_top.png differ diff --git a/mods/cool_trees/ebony/textures/ebony_wood.png b/mods/cool_trees/ebony/textures/ebony_wood.png new file mode 100644 index 0000000..853ecdc Binary files /dev/null and b/mods/cool_trees/ebony/textures/ebony_wood.png differ diff --git a/mods/cool_trees/hollytree/init.lua b/mods/cool_trees/hollytree/init.lua new file mode 100644 index 0000000..18138bb --- /dev/null +++ b/mods/cool_trees/hollytree/init.lua @@ -0,0 +1,244 @@ +-- +-- Hollytree +-- +local modname = "hollytree" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Hollytree + +local function grow_new_hollytree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-4, y = pos.y, z = pos.z-4}, modpath.."/schematics/hollytree.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + local place_on + local biomes + local offset + local scale + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00005 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.00008 + scale = 0.00005 + end + + minetest.register_decoration({ + name = "hollytree:holly_tree", + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 250, y = 250, z = 250}, + seed = 789, + octaves = 3, + persist = 0.66 + }, + biomes = {biomes}, + y_min = 1, + y_max = 32, + schematic = modpath.."/schematics/hollytree.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("hollytree:sapling", { + description = S("Holly Tree Sapling"), + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"hollytree_sapling.png"}, + inventory_image = "hollytree_sapling.png", + wield_image = "hollytree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_hollytree_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "hollytree:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("hollytree:trunk", { + description = S("Holly Tree Trunk"), + tiles = { + "hollytree_trunk_top.png", + "hollytree_trunk_top.png", + "hollytree_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- hollytree wood +minetest.register_node("hollytree:wood", { + description = S("Holly Tree Wood"), + tiles = {"hollytree_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- hollytree tree leaves +minetest.register_node("hollytree:leaves", { + description = S("Holly Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"hollytree_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"hollytree:sapling"}, rarity = 20}, + {items = {"hollytree:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "hollytree:wood 4", + recipe = {{"hollytree:trunk"}} +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "hollytree:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "hollytree:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "hollytree:convert_hollytree_saplings_to_node_timer", + nodenames = {"hollytree:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"hollytree:trunk"}, + leaves = {"hollytree:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Holly Tree Wood Fence"), + texture = "hollytree_wood.png", + material = "hollytree:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("hollytree:fence", table.copy(fence)) + fence.description = S("Holly Tree Fence Rail") + default.register_fence_rail("hollytree:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Holly Tree Fence Gate") + doors.register_fencegate("hollytree:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "hollytree_trunk", + "hollytree:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"hollytree_wood.png"}, + S("Holly Tree Stair"), + S("Holly Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("hollytree", "wood", "hollytree:wood", { + description = "Holly Tree", + tiles = {"hollytree_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +--Support for bonemeal + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"hollytree:sapling", grow_new_hollytree_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/hollytree/locale/hollytree.es.tr b/mods/cool_trees/hollytree/locale/hollytree.es.tr new file mode 100644 index 0000000..063044a --- /dev/null +++ b/mods/cool_trees/hollytree/locale/hollytree.es.tr @@ -0,0 +1,11 @@ +# textdomain: hollytree +Holly Tree Trunk=Madera de acebo +Holly Tree Wood=Tablas de acebo +Holly Tree Leaves=Hojas de acebo +Holly Tree Wood=Tablas de acebo +Holly Tree Sapling=Retoño de acebo +Holly TreeTree Stair=Escaleras de acebo +Holly TreeTree Slab=Losa de acebo +Inner Holly Tree Tree Stair=Escaleras de acebo interior +Outer Holly Tree Tree Stair=Escaleras de acebo exterior +Holly Tree Slab=Losa de acebo diff --git a/mods/cool_trees/hollytree/mod.conf b/mods/cool_trees/hollytree/mod.conf new file mode 100644 index 0000000..704a819 --- /dev/null +++ b/mods/cool_trees/hollytree/mod.conf @@ -0,0 +1,4 @@ +name = hollytree +description = Hollytree +depends = default +optional_depends = stairs, bonemeal, rainf, doors, moreblocks diff --git a/mods/cool_trees/hollytree/schematics/hollytree.lua b/mods/cool_trees/hollytree/schematics/hollytree.lua new file mode 100644 index 0000000..2e52ec6 --- /dev/null +++ b/mods/cool_trees/hollytree/schematics/hollytree.lua @@ -0,0 +1,1099 @@ +schematic = { + size = {x=10, y=12, z=9}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=9}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=9}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=9}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=9}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=9}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=08}, + {name="hollytree:trunk", prob=254, param2=08}, + {name="hollytree:trunk", prob=254, param2=08}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=02}, + {name="hollytree:trunk", prob=254, param2=02}, + {name="hollytree:trunk", prob=254, param2=02}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=2}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=2}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=08}, + {name="hollytree:trunk", prob=254, param2=08}, + {name="hollytree:trunk", prob=254, param2=2}, + {name="hollytree:trunk", prob=254, param2=02}, + {name="hollytree:trunk", prob=254, param2=02}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=7}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=7}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=7}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=7}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:trunk", prob=254, param2=7}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="hollytree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/hollytree/schematics/hollytree.mts b/mods/cool_trees/hollytree/schematics/hollytree.mts new file mode 100644 index 0000000..f0865e7 Binary files /dev/null and b/mods/cool_trees/hollytree/schematics/hollytree.mts differ diff --git a/mods/cool_trees/hollytree/textures/hollytree_leaves.png b/mods/cool_trees/hollytree/textures/hollytree_leaves.png new file mode 100644 index 0000000..39b3a14 Binary files /dev/null and b/mods/cool_trees/hollytree/textures/hollytree_leaves.png differ diff --git a/mods/cool_trees/hollytree/textures/hollytree_sapling.png b/mods/cool_trees/hollytree/textures/hollytree_sapling.png new file mode 100644 index 0000000..05b19b3 Binary files /dev/null and b/mods/cool_trees/hollytree/textures/hollytree_sapling.png differ diff --git a/mods/cool_trees/hollytree/textures/hollytree_trunk.png b/mods/cool_trees/hollytree/textures/hollytree_trunk.png new file mode 100644 index 0000000..f6178d0 Binary files /dev/null and b/mods/cool_trees/hollytree/textures/hollytree_trunk.png differ diff --git a/mods/cool_trees/hollytree/textures/hollytree_trunk_top.png b/mods/cool_trees/hollytree/textures/hollytree_trunk_top.png new file mode 100644 index 0000000..95c1df0 Binary files /dev/null and b/mods/cool_trees/hollytree/textures/hollytree_trunk_top.png differ diff --git a/mods/cool_trees/hollytree/textures/hollytree_wood.png b/mods/cool_trees/hollytree/textures/hollytree_wood.png new file mode 100644 index 0000000..34c4c87 Binary files /dev/null and b/mods/cool_trees/hollytree/textures/hollytree_wood.png differ diff --git a/mods/cool_trees/jacaranda/init.lua b/mods/cool_trees/jacaranda/init.lua new file mode 100644 index 0000000..b07af3a --- /dev/null +++ b/mods/cool_trees/jacaranda/init.lua @@ -0,0 +1,225 @@ +-- +-- Jacaranda +-- +local modname = "jacaranda" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Jacaranda + +local function grow_new_jacaranda_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-3, y = pos.y, z = pos.z-3}, modpath.."/schematics/jacaranda.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "jacaranda:jacaranda_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.00005, + spread = {x = 250, y = 250, z = 250}, + seed = 663, + octaves = 3, + persist = 0.66 + }, + biomes = {"rainforest"}, + y_min = 1, + y_max = 32, + schematic = modpath.."/schematics/jacaranda.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("jacaranda:sapling", { + description = S("Jacaranda Tree Sapling"), + drawtype = "plantlike", + tiles = {"jacaranda_sapling.png"}, + inventory_image = "jacaranda_sapling.png", + wield_image = "jacaranda_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_jacaranda_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "jacaranda:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("jacaranda:trunk", { + description = S("Jacaranda Trunk"), + tiles = { + "jacaranda_trunk_top.png", + "jacaranda_trunk_top.png", + "jacaranda_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- jacaranda wood +minetest.register_node("jacaranda:wood", { + description = S("Jacaranda Wood"), + tiles = {"jacaranda_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- jacaranda tree leaves +minetest.register_node("jacaranda:blossom_leaves", { + description = S("Jacaranda Blossom Leaves"), + drawtype = "allfaces_optional", + tiles = {"jacaranda_blossom_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"jacaranda:sapling"}, rarity = 20}, + {items = {"jacaranda:blossom_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "jacaranda:wood 4", + recipe = {{"jacaranda:trunk"}} +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "jacaranda:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "jacaranda:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "jacaranda:convert_jacaranda_saplings_to_node_timer", + nodenames = {"jacaranda:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"jacaranda:trunk"}, + leaves = {"jacaranda:blossom_leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Jaceranda Tree Wood Fence"), + texture = "jacaranda_wood.png", + material = "jacaranda:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("jacaranda:fence", table.copy(fence)) + fence.description = S("Jaceranda Tree Fence Rail") + default.register_fence_rail("jacaranda:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Jaceranda Tree Fence Gate") + doors.register_fencegate("jacaranda:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "jacaranda_trunk", + "jacaranda:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"jacaranda_wood.png"}, + S("Jacaranda Tree Stair"), + S("Jacaranda Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("jacaranda", "wood", "jacaranda:wood", { + description = "Jacaranda Tree", + tiles = {"jacaranda_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"jacaranda:sapling", grow_new_jacaranda_tree, "soil"}, + }) +end + + diff --git a/mods/cool_trees/jacaranda/locale/jacaranda.es.tr b/mods/cool_trees/jacaranda/locale/jacaranda.es.tr new file mode 100644 index 0000000..73ee410 --- /dev/null +++ b/mods/cool_trees/jacaranda/locale/jacaranda.es.tr @@ -0,0 +1,10 @@ +# textdomain: jacaranda +Jacaranda Trunk=Madera de jacaranda +Jacaranda Wood=Tablas de jacaranda +Jacaranda Blossom Leaves=Flores de jacaranda +Jacaranda Tree Sapling=Retoño de jacaranda +Jacaranda Tree Stair=Escaleras de jacaranda +Jacaranda Tree Slab=Losa de jacaranda +Inner Jacaranda Tree Stair=Escaleras de jacaranda interior +Outer Jacaranda Tree Stair=Escaleras de jacaranda exterior +Jacaranda Slab=Losa de jacaranda diff --git a/mods/cool_trees/jacaranda/mod.conf b/mods/cool_trees/jacaranda/mod.conf new file mode 100644 index 0000000..b5d07e0 --- /dev/null +++ b/mods/cool_trees/jacaranda/mod.conf @@ -0,0 +1,4 @@ +name = jacaranda +description = Jacaranda for jungles +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/jacaranda/schematics/jacaranda.lua b/mods/cool_trees/jacaranda/schematics/jacaranda.lua new file mode 100644 index 0000000..c138329 --- /dev/null +++ b/mods/cool_trees/jacaranda/schematics/jacaranda.lua @@ -0,0 +1,407 @@ +schematic = { + size = {x=7, y=8, z=7}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:trunk", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:trunk", prob=254, param2=3}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:trunk", prob=254, param2=3}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:trunk", prob=254, param2=3}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="jacaranda:blossom_leaves", prob=128, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="jacaranda:blossom_leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/jacaranda/schematics/jacaranda.mts b/mods/cool_trees/jacaranda/schematics/jacaranda.mts new file mode 100644 index 0000000..bb06030 Binary files /dev/null and b/mods/cool_trees/jacaranda/schematics/jacaranda.mts differ diff --git a/mods/cool_trees/jacaranda/textures/jacaranda_blossom_leaves.png b/mods/cool_trees/jacaranda/textures/jacaranda_blossom_leaves.png new file mode 100644 index 0000000..4863796 Binary files /dev/null and b/mods/cool_trees/jacaranda/textures/jacaranda_blossom_leaves.png differ diff --git a/mods/cool_trees/jacaranda/textures/jacaranda_sapling.png b/mods/cool_trees/jacaranda/textures/jacaranda_sapling.png new file mode 100644 index 0000000..c3792e7 Binary files /dev/null and b/mods/cool_trees/jacaranda/textures/jacaranda_sapling.png differ diff --git a/mods/cool_trees/jacaranda/textures/jacaranda_trunk.png b/mods/cool_trees/jacaranda/textures/jacaranda_trunk.png new file mode 100644 index 0000000..b548558 Binary files /dev/null and b/mods/cool_trees/jacaranda/textures/jacaranda_trunk.png differ diff --git a/mods/cool_trees/jacaranda/textures/jacaranda_trunk_top.png b/mods/cool_trees/jacaranda/textures/jacaranda_trunk_top.png new file mode 100644 index 0000000..5b97808 Binary files /dev/null and b/mods/cool_trees/jacaranda/textures/jacaranda_trunk_top.png differ diff --git a/mods/cool_trees/jacaranda/textures/jacaranda_wood.png b/mods/cool_trees/jacaranda/textures/jacaranda_wood.png new file mode 100644 index 0000000..2dd349e Binary files /dev/null and b/mods/cool_trees/jacaranda/textures/jacaranda_wood.png differ diff --git a/mods/cool_trees/larch/init.lua b/mods/cool_trees/larch/init.lua new file mode 100644 index 0000000..82435b8 --- /dev/null +++ b/mods/cool_trees/larch/init.lua @@ -0,0 +1,262 @@ +-- +-- Larch +-- +local modname = "larch" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Larch + +local function grow_new_larch_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-5}, modpath.."/schematics/larch.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "larch:larch_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.0005, + spread = {x = 250, y = 250, z = 250}, + seed = 542, + octaves = 3, + persist = 0.66 + }, + biomes = {"coniferous_forest"}, + y_min = 1, + y_max = 32, + place_offset_y = 1, + schematic = modpath.."/schematics/larch.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("larch:sapling", { + description = S("Larch Tree Sapling"), + drawtype = "plantlike", + tiles = {"larch_sapling.png"}, + inventory_image = "larch_sapling.png", + wield_image = "larch_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_larch_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "larch:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("larch:trunk", { + description = S("Larch Trunk"), + tiles = { + "larch_trunk_top.png", + "larch_trunk_top.png", + "larch_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- larch wood +minetest.register_node("larch:wood", { + description = S("Larch Wood"), + tiles = {"larch_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- larch tree leaves +minetest.register_node("larch:leaves", { + description = S("Larch Leaves"), + drawtype = "allfaces_optional", + tiles = {"larch_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"larch:sapling"}, rarity = 20}, + {items = {"larch:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +minetest.register_node("larch:moss", { + description = S("Larch Moss"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"larch_moss.png"}, + use_texture_alpha = "clip", + inventory_image = "larch_moss.png", + wield_image = "larch_moss.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1, + falling_node = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "larch:wood 4", + recipe = {{"larch:trunk"}} +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "larch:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "larch:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "larch:convert_larch_saplings_to_node_timer", + nodenames = {"larch:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"larch:trunk"}, + leaves = {"larch:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Larch Tree Wood Fence"), + texture = "larch_wood.png", + material = "larch:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("larch:fence", table.copy(fence)) + fence.description = S("Larch Tree Fence Rail") + default.register_fence_rail("larch:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Larch Tree Fence Gate") + doors.register_fencegate("larch:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "larch_trunk", + "larch:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"larch_wood.png"}, + S("Larch Tree Stair"), + S("Larch Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("larch", "wood", "larch:wood", { + description = "larch Tree", + tiles = {"larch_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"larch:sapling", grow_new_larch_tree, "soil"}, + }) +end + +--Door + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_larch_wood", { + tiles = {{ name = "larch_door_wood.png", backface_culling = true }}, + description = S("Larch Wood Door"), + inventory_image = "larch_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"larch:wood", "larch:wood"}, + {"larch:wood", "larch:wood"}, + {"larch:wood", "larch:wood"}, + } + }) +end + diff --git a/mods/cool_trees/larch/locale/larch.es.tr b/mods/cool_trees/larch/locale/larch.es.tr new file mode 100644 index 0000000..1f7d96a --- /dev/null +++ b/mods/cool_trees/larch/locale/larch.es.tr @@ -0,0 +1,9 @@ +# textdomain: larch +Larch Sapling=Retoño de alerce +Larch Trunk=Madera de alerce +Larch Wood=Tablas de alerce +Larch Leaves=Hojas de alerce +Larch Tree Outer Stair=Escalera exterior de alerce +Larch Tree Slab=Losa de alerce +Larch Stair=Escalera de alerce +Larch Wood Door=Puerta de alerce diff --git a/mods/cool_trees/larch/mod.conf b/mods/cool_trees/larch/mod.conf new file mode 100644 index 0000000..c8212e9 --- /dev/null +++ b/mods/cool_trees/larch/mod.conf @@ -0,0 +1,4 @@ +name = larch +description = Larch Tree +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/larch/schematics/larch.lua b/mods/cool_trees/larch/schematics/larch.lua new file mode 100644 index 0000000..481bda1 --- /dev/null +++ b/mods/cool_trees/larch/schematics/larch.lua @@ -0,0 +1,2203 @@ +schematic = { + size = {x=11, y=18, z=11}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + {ypos=12, prob=254}, + {ypos=13, prob=254}, + {ypos=14, prob=254}, + {ypos=15, prob=254}, + {ypos=16, prob=254}, + {ypos=17, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=7}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=7}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=9}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=3}, + {name="larch:moss", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=12}, + {name="larch:trunk", prob=254, param2=18}, + {name="larch:trunk", prob=254, param2=1}, + {name="larch:trunk", prob=254, param2=18}, + {name="larch:trunk", prob=254, param2=18}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=18}, + {name="larch:trunk", prob=254, param2=2}, + {name="larch:trunk", prob=254, param2=12}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=1}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=1}, + {name="larch:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=1}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:moss", prob=254, param2=2}, + {name="larch:trunk", prob=254, param2=9}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:trunk", prob=254, param2=12}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:moss", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:trunk", prob=254, param2=9}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="larch:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/larch/schematics/larch.mts b/mods/cool_trees/larch/schematics/larch.mts new file mode 100644 index 0000000..f1f9687 Binary files /dev/null and b/mods/cool_trees/larch/schematics/larch.mts differ diff --git a/mods/cool_trees/larch/textures/larch_door_wood.png b/mods/cool_trees/larch/textures/larch_door_wood.png new file mode 100644 index 0000000..6cbc1ff Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_door_wood.png differ diff --git a/mods/cool_trees/larch/textures/larch_item_wood.png b/mods/cool_trees/larch/textures/larch_item_wood.png new file mode 100644 index 0000000..c3894b0 Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_item_wood.png differ diff --git a/mods/cool_trees/larch/textures/larch_leaves.png b/mods/cool_trees/larch/textures/larch_leaves.png new file mode 100644 index 0000000..3b92c9d Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_leaves.png differ diff --git a/mods/cool_trees/larch/textures/larch_moss.png b/mods/cool_trees/larch/textures/larch_moss.png new file mode 100644 index 0000000..096aace Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_moss.png differ diff --git a/mods/cool_trees/larch/textures/larch_sapling.png b/mods/cool_trees/larch/textures/larch_sapling.png new file mode 100644 index 0000000..7005cb0 Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_sapling.png differ diff --git a/mods/cool_trees/larch/textures/larch_trunk.png b/mods/cool_trees/larch/textures/larch_trunk.png new file mode 100644 index 0000000..a914099 Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_trunk.png differ diff --git a/mods/cool_trees/larch/textures/larch_trunk_top.png b/mods/cool_trees/larch/textures/larch_trunk_top.png new file mode 100644 index 0000000..22b3829 Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_trunk_top.png differ diff --git a/mods/cool_trees/larch/textures/larch_wood.png b/mods/cool_trees/larch/textures/larch_wood.png new file mode 100644 index 0000000..8a0cc37 Binary files /dev/null and b/mods/cool_trees/larch/textures/larch_wood.png differ diff --git a/mods/cool_trees/lemontree/init.lua b/mods/cool_trees/lemontree/init.lua new file mode 100644 index 0000000..3426222 --- /dev/null +++ b/mods/cool_trees/lemontree/init.lua @@ -0,0 +1,301 @@ +-- +-- Lemontree +-- + +local modname = "lemontree" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") +local fruit_grow_time = 1200 + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Lemon Fruit + +minetest.register_node("lemontree:lemon", { + description = S("Lemon"), + drawtype = "plantlike", + tiles = {"lemontree_lemon.png"}, + inventory_image = "lemontree_lemon.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "lemontree:lemon", param2 = 1}) + end, + + on_dig = function(pos, node, digger) + if digger:is_player() then + local inv = digger:get_inventory() + if inv:room_for_item("main", "lemontree:lemon") then + inv:add_item("main", "lemontree:lemon") + end + end + minetest.remove_node(pos) + pos.y = pos.y + 1 + local node_above = minetest.get_node_or_nil(pos) + if node_above and node_above.param2 == 0 and node_above.name == "lemontree:leaves" then + local timer = minetest.get_node_timer(pos) + timer:start(fruit_grow_time) + end + end, +}) + +-- lemontree + +local function grow_new_lemontree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-2, y = pos.y, z = pos.z-2}, modpath.."/schematics/lemontree.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "lemontree:lemon_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.00005, + spread = {x = 250, y = 250, z = 250}, + seed = 5690, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/lemontree.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("lemontree:sapling", { + description = S("Lemon Tree Sapling"), + drawtype = "plantlike", + tiles = {"lemontree_sapling.png"}, + inventory_image = "lemontree_sapling.png", + wield_image = "lemontree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_lemontree_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "lemontree:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + return itemstack + end, +}) + +minetest.register_node("lemontree:trunk", { + description = S("Lemon Tree Trunk"), + tiles = { + "lemontree_trunk_top.png", + "lemontree_trunk_top.png", + "lemontree_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- lemontree wood +minetest.register_node("lemontree:wood", { + description = S("Lemon Tree Wood"), + tiles = {"lemontree_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- lemontree tree leaves +minetest.register_node("lemontree:leaves", { + description = S("Lemon Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"lemontree_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"lemontree:sapling"}, rarity = 20}, + {items = {"lemontree:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, + + on_timer = function(pos) + pos.y = pos.y - 1 + local node = minetest.get_node_or_nil(pos) + if node and node.name == "air" then + minetest.set_node(pos, {name = "lemontree:lemon"}) + return false + else + return true + end + end +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "lemontree:wood 4", + recipe = {{"lemontree:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "lemontree:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "lemontree:wood", + burntime = 7, +}) + +minetest.register_lbm({ + name = "lemontree:convert_lemontree_saplings_to_node_timer", + nodenames = {"lemontree:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"lemontree:trunk"}, + leaves = {"lemontree:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Lemon Tree Wood Fence"), + texture = "lemontree_wood.png", + material = "lemontree:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("lemontree:fence", table.copy(fence)) + fence.description = S("Lemon Tree Fence Rail") + default.register_fence_rail("lemontree:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Lemon Tree Fence Gate") + doors.register_fencegate("lemontree:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "lemontree_trunk", + "lemontree:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"lemontree_wood.png"}, + S("Lemon Tree Stair"), + S("Lemon Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("lemontree", "wood", "lemontree:wood", { + description = "Lemon Tree", + tiles = {"lemontree_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"lemontree:sapling", grow_new_lemontree_tree, "soil"}, + }) +end + +if minetest.get_modpath("cork") ~= nil then + minetest.register_node("lemontree:trunk_nobark", { + description = S("Lemon Tree Trunk"), + tiles = { + "lemontree_trunk_top.png", + "lemontree_trunk_top.png", + "lemontree_trunk_nobark.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, + }) + + minetest.register_craft({ + output = "lemontree:wood 4", + recipe = {{"lemontree:trunk_nobark"}} + }) + + minetest.register_craft({ + type = "fuel", + recipe = "lemontree:trunk_nobark", + burntime = 25, + }) +end diff --git a/mods/cool_trees/lemontree/locale/lemontree.es.tr b/mods/cool_trees/lemontree/locale/lemontree.es.tr new file mode 100644 index 0000000..feaf6da --- /dev/null +++ b/mods/cool_trees/lemontree/locale/lemontree.es.tr @@ -0,0 +1,10 @@ +# textdomain: lemontree +Lemon Tree Inner Stair=Escalera interior de limonero +Lemon Tree Leaves=Hojas de limonero +Lemon Tree Outer Stair=Escalera exterior de limonero +Lemon Tree Sapling=Retoño de limonero +Lemon Tree Slab=Losa de limonero +Lemon Tree Stair=Escalera de limonero +Lemon Tree Trunk=Madera de limonero +Lemon Tree Wood=Tablas de limonero +Lemon=Limón \ No newline at end of file diff --git a/mods/cool_trees/lemontree/mod.conf b/mods/cool_trees/lemontree/mod.conf new file mode 100644 index 0000000..6b31775 --- /dev/null +++ b/mods/cool_trees/lemontree/mod.conf @@ -0,0 +1,4 @@ +name = lemontree +description = Lemon Tree for Decidious Forest +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/lemontree/schematics/lemontree.lua b/mods/cool_trees/lemontree/schematics/lemontree.lua new file mode 100644 index 0000000..83b5634 --- /dev/null +++ b/mods/cool_trees/lemontree/schematics/lemontree.lua @@ -0,0 +1,189 @@ +schematic = { + size = {x=5, y=7, z=5}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:lemon", prob=64, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:trunk", prob=126, param2=20}, + {name="lemontree:lemon", prob=126, param2=0}, + {name="lemontree:trunk", prob=254, param2=9}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:trunk", prob=254, param2=0, force_place=true}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=240}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:trunk", prob=254, param2=0, force_place=true}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:trunk", prob=254, param2=22, force_place=true}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:lemon", prob=126, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:lemon", prob=126, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=240}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:trunk", prob=254, param2=9}, + {name="lemontree:lemon", prob=126, param2=0}, + {name="lemontree:trunk", prob=126, param2=23}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="lemontree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/lemontree/schematics/lemontree.mts b/mods/cool_trees/lemontree/schematics/lemontree.mts new file mode 100644 index 0000000..11dbcf7 Binary files /dev/null and b/mods/cool_trees/lemontree/schematics/lemontree.mts differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_leaves.png b/mods/cool_trees/lemontree/textures/lemontree_leaves.png new file mode 100644 index 0000000..fb16804 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_leaves.png differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_lemon.png b/mods/cool_trees/lemontree/textures/lemontree_lemon.png new file mode 100644 index 0000000..48bc974 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_lemon.png differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_sapling.png b/mods/cool_trees/lemontree/textures/lemontree_sapling.png new file mode 100644 index 0000000..3a01760 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_sapling.png differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_trunk.png b/mods/cool_trees/lemontree/textures/lemontree_trunk.png new file mode 100644 index 0000000..1bc9da3 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_trunk.png differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_trunk_nobark.png b/mods/cool_trees/lemontree/textures/lemontree_trunk_nobark.png new file mode 100644 index 0000000..3e464a6 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_trunk_nobark.png differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_trunk_top.png b/mods/cool_trees/lemontree/textures/lemontree_trunk_top.png new file mode 100644 index 0000000..c372127 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_trunk_top.png differ diff --git a/mods/cool_trees/lemontree/textures/lemontree_wood.png b/mods/cool_trees/lemontree/textures/lemontree_wood.png new file mode 100644 index 0000000..99da9f3 Binary files /dev/null and b/mods/cool_trees/lemontree/textures/lemontree_wood.png differ diff --git a/mods/cool_trees/lemontree/textures/ts_lemontree_front.png b/mods/cool_trees/lemontree/textures/ts_lemontree_front.png new file mode 100644 index 0000000..4d7521e Binary files /dev/null and b/mods/cool_trees/lemontree/textures/ts_lemontree_front.png differ diff --git a/mods/cool_trees/lemontree/textures/ts_lemontree_front_right.png b/mods/cool_trees/lemontree/textures/ts_lemontree_front_right.png new file mode 100644 index 0000000..ff619be Binary files /dev/null and b/mods/cool_trees/lemontree/textures/ts_lemontree_front_right.png differ diff --git a/mods/cool_trees/mahogany/init.lua b/mods/cool_trees/mahogany/init.lua new file mode 100644 index 0000000..2e6748d --- /dev/null +++ b/mods/cool_trees/mahogany/init.lua @@ -0,0 +1,290 @@ +-- +-- Mahogany +-- + +local modname = "mahogany" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Mahogany + +local function grow_new_mahogany_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-3, y = pos.y, z = pos.z-3}, modpath.."/schematics/mahogany.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "mahogany:mahogany_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0.005, + scale = 0.005, + spread = {x = 250, y = 250, z = 250}, + seed = 345, + octaves = 3, + persist = 0.66 + }, + biomes = {"rainforest"}, + height = 2, + y_min = 1, + y_max = 62, + schematic = modpath.."/schematics/mahogany.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("mahogany:sapling", { + description = S("Mahogany Tree Sapling"), + drawtype = "plantlike", + tiles = {"mahogany_sapling.png"}, + inventory_image = "mahogany_sapling.png", + wield_image = "mahogany_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_mahogany_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "mahogany:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("mahogany:trunk", { + description = S("Mahogany Trunk"), + tiles = { + "mahogany_trunk_top.png", + "mahogany_trunk_top.png", + "mahogany_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- mahogany wood +minetest.register_node("mahogany:wood", { + description = S("Mahogany Wood"), + tiles = {"mahogany_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- mahogany tree leaves +minetest.register_node("mahogany:leaves", { + description = S("Mahogany Leaves"), + drawtype = "allfaces_optional", + tiles = {"mahogany_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"mahogany:sapling"}, rarity = 20}, + {items = {"mahogany:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Creeper/Vines... +-- + +minetest.register_node("mahogany:creeper", { + description = S("Mahogany Creeper"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"mahogany_creeper.png"}, + use_texture_alpha = "clip", + inventory_image = "mahogany_creeper.png", + wield_image = "mahogany_creeper.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("mahogany:flower_creeper", { + description = S("Mahogany Flower Creeper"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"mahogany_flower_creeper.png"}, + use_texture_alpha = "clip", + inventory_image = "mahogany_flower_creeper.png", + wield_image = "mahogany_flower_creeper.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1, falling_node = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("mahogany:hanging_creeper", { + description = S("Mahogany Hanging Creeper"), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {"mahogany_hanging_creeper.png"}, + use_texture_alpha = "clip", + inventory_image = "mahogany_hanging_creeper.png", + wield_image = "mahogany_hanging_creeper.png", + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.0, 0.5, 0.5, 0.0} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1, falling_node = 1 + }, + sounds = default.node_sound_leaves_defaults(), +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "mahogany:wood 4", + recipe = {{"mahogany:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "mahogany:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "mahogany:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "mahogany:convert_mahogany_saplings_to_node_timer", + nodenames = {"mahogany:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"mahogany:trunk"}, + leaves = {"mahogany:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Mahogany Wood Fence"), + texture = "mahogany_wood.png", + material = "mahogany:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("mahogany:fence", table.copy(fence)) + fence.description = S("Mahogany Fence Rail") + default.register_fence_rail("mahogany:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Mahogany Fence Gate") + doors.register_fencegate("mahogany:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "mahogany_trunk", + "mahogany:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"mahogany_wood.png"}, + S("Mahogany Stair"), + S("Mahogany Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("mahogany", "wood", "mahogany:wood", { + description = "Mahogany", + tiles = {"mahogany_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +--Support for bonemeal + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"mahogany:sapling", grow_new_mahogany_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/mahogany/locale/mahogany.es.tr b/mods/cool_trees/mahogany/locale/mahogany.es.tr new file mode 100644 index 0000000..73e6827 --- /dev/null +++ b/mods/cool_trees/mahogany/locale/mahogany.es.tr @@ -0,0 +1,12 @@ +# textdomain: mahogany +Mahogany Trunk=Madera de caoba +Mahogany Wood=Tablas de caoba +Mahogany Leaves=Hojas de caoba +Mahogany Creeper=Enredadera de caoba +Mahogany Hanging Creeper=Enredadera colgante de caoba +Mahogany Flower Creeper=Enredadera florida de caoba +Mahogany Tree Sapling=Retoño de árbol de caoba +Mahogany Stair=Escaleras de caoba +Inner Mahogany Stair=Escaleras de caoba interior +Outer Mahogany Stair=Escaleras de caoba exterior +Mahogany Slab=Losa de caoba \ No newline at end of file diff --git a/mods/cool_trees/mahogany/mod.conf b/mods/cool_trees/mahogany/mod.conf new file mode 100644 index 0000000..9619a80 --- /dev/null +++ b/mods/cool_trees/mahogany/mod.conf @@ -0,0 +1,4 @@ +name = mahogany +description = Mahogany Tree for Rainforest Biome +depends = default +optional_depends = stairs, bonemeal, rainf, doors, moreblocks diff --git a/mods/cool_trees/mahogany/schematics/mahogany.lua b/mods/cool_trees/mahogany/schematics/mahogany.lua new file mode 100644 index 0000000..1650d52 --- /dev/null +++ b/mods/cool_trees/mahogany/schematics/mahogany.lua @@ -0,0 +1,857 @@ +local schematic = { + size = {x=7, y=17, z=7}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + {ypos=12, prob=254}, + {ypos=13, prob=254}, + {ypos=14, prob=254}, + {ypos=15, prob=254}, + {ypos=16, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ignore", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ignore", prob=0, param2=0}, + {name="mahogany:trunk", prob=254, param2=3}, + {name="ignore", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:trunk", prob=254, param2=2}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=3}, + {name="mahogany:hanging_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=2}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="ignore", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=1}, + {name="mahogany:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=2}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:trunk", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=1}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:flower_creeper", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:hanging_creeper", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="mahogany:leaves", prob=126, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="mahogany:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/mahogany/schematics/mahogany.mts b/mods/cool_trees/mahogany/schematics/mahogany.mts new file mode 100644 index 0000000..3e34293 Binary files /dev/null and b/mods/cool_trees/mahogany/schematics/mahogany.mts differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_creeper.png b/mods/cool_trees/mahogany/textures/mahogany_creeper.png new file mode 100644 index 0000000..4c0e081 Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_creeper.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_flower_creeper.png b/mods/cool_trees/mahogany/textures/mahogany_flower_creeper.png new file mode 100644 index 0000000..b2fa2d9 Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_flower_creeper.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_hanging_creeper.png b/mods/cool_trees/mahogany/textures/mahogany_hanging_creeper.png new file mode 100644 index 0000000..b9a7047 Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_hanging_creeper.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_leaves.png b/mods/cool_trees/mahogany/textures/mahogany_leaves.png new file mode 100644 index 0000000..603a83f Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_leaves.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_sapling.png b/mods/cool_trees/mahogany/textures/mahogany_sapling.png new file mode 100644 index 0000000..5711c3d Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_sapling.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_trunk.png b/mods/cool_trees/mahogany/textures/mahogany_trunk.png new file mode 100644 index 0000000..eb7ae5f Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_trunk.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_trunk_top.png b/mods/cool_trees/mahogany/textures/mahogany_trunk_top.png new file mode 100644 index 0000000..21162ed Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_trunk_top.png differ diff --git a/mods/cool_trees/mahogany/textures/mahogany_wood.png b/mods/cool_trees/mahogany/textures/mahogany_wood.png new file mode 100644 index 0000000..0e7eefd Binary files /dev/null and b/mods/cool_trees/mahogany/textures/mahogany_wood.png differ diff --git a/mods/cool_trees/maple/init.lua b/mods/cool_trees/maple/init.lua new file mode 100644 index 0000000..4aaf27b --- /dev/null +++ b/mods/cool_trees/maple/init.lua @@ -0,0 +1,254 @@ +-- +-- Maple +-- + +local modname = "maple" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Maple + +local function grow_new_maple_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-3, y = pos.y-1, z = pos.z-3}, modpath.."/schematics/maple.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0005 + scale = 0.0002 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.0002 + scale = 0.0002 + end + + minetest.register_decoration({ + name = "maple:maple_tree", + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 250, y = 250, z = 250}, + seed = 3462, + octaves = 3, + persist = 0.66 + }, + biomes = {biomes}, + y_min = 1, + y_max = 62, + schematic = modpath.."/schematics/maple.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("maple:sapling", { + description = S("Maple Tree Sapling"), + drawtype = "plantlike", + tiles = {"maple_sapling.png"}, + inventory_image = "maple_sapling.png", + wield_image = "maple_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_maple_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "maple:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("maple:trunk", { + description = S("Maple Trunk"), + tiles = { + "maple_trunk_top.png", + "maple_trunk_top.png", + "maple_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- maple wood +minetest.register_node("maple:wood", { + description = S("Maple Wood"), + tiles = {"maple_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- maple tree leaves +minetest.register_node("maple:leaves", { + description = S("Maple Leaves"), + drawtype = "allfaces_optional", + tiles = {"maple_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"maple:sapling"}, rarity = 20}, + {items = {"maple:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "maple:wood 4", + recipe = {{"maple:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "maple:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "maple:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "maple:convert_maple_saplings_to_node_timer", + nodenames = {"maple:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"maple:trunk"}, + leaves = {"maple:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Maple Wood Fence"), + texture = "maple_wood.png", + material = "maple:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("maple:fence", table.copy(fence)) + fence.description = S("Maple Fence Rail") + default.register_fence_rail("maple:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Maple Fence Gate") + doors.register_fencegate("maple:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "maple_trunk", + "maple:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"maple_wood.png"}, + S("Maple Stair"), + S("Maple Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("maple", "wood", "maple:wood", { + description = "Maple", + tiles = {"maple_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"maple:sapling", grow_new_maple_tree, "soil"}, + }) +end + +--Door + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_maple_wood", { + tiles = {{ name = "maple_door_wood.png", backface_culling = true }}, + description = S("Maple Wood Door"), + inventory_image = "maple_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"maple:wood", "maple:wood"}, + {"maple:wood", "maple:wood"}, + {"maple:wood", "maple:wood"}, + } + }) +end + + diff --git a/mods/cool_trees/maple/locale/maple.es.tr b/mods/cool_trees/maple/locale/maple.es.tr new file mode 100644 index 0000000..d445612 --- /dev/null +++ b/mods/cool_trees/maple/locale/maple.es.tr @@ -0,0 +1,10 @@ +# textdomain: maple +Maple Trunk=Madera de arce +Maple Wood=Tablas de arce +Maple Leaves=Hojas de arce +Maple Tree Sapling=Retoño de árbol de arce +Maple Stair=Escaleras de arce +Inner Maple Stair=Escaleras de arce +Outer Maple Stair=Escaleras de arce +Maple Slab=Losa de arce +Maple Wood Door=Puerta de arce diff --git a/mods/cool_trees/maple/mod.conf b/mods/cool_trees/maple/mod.conf new file mode 100644 index 0000000..bb1632b --- /dev/null +++ b/mods/cool_trees/maple/mod.conf @@ -0,0 +1,4 @@ +name = maple +description = Maple Tree +depends = default +optional_depends = stairs, bonemeal, rainf, doors, moreblocks diff --git a/mods/cool_trees/maple/schematics/maple.lua b/mods/cool_trees/maple/schematics/maple.lua new file mode 100644 index 0000000..5e6b639 --- /dev/null +++ b/mods/cool_trees/maple/schematics/maple.lua @@ -0,0 +1,898 @@ +schematic = { + size = {x=8, y=11, z=10}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=20}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=2}, + {name="maple:trunk", prob=254, param2=12}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=2}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=20}, + {name="maple:trunk", prob=254, param2=18}, + {name="maple:trunk", prob=254, param2=7}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=7}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=7}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=7}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=20}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=7}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="maple:trunk", prob=254, param2=12}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:trunk", prob=254, param2=3}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="maple:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/maple/schematics/maple.mts b/mods/cool_trees/maple/schematics/maple.mts new file mode 100644 index 0000000..f5d02b6 Binary files /dev/null and b/mods/cool_trees/maple/schematics/maple.mts differ diff --git a/mods/cool_trees/maple/textures/maple_door_wood.png b/mods/cool_trees/maple/textures/maple_door_wood.png new file mode 100644 index 0000000..01fbad1 Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_door_wood.png differ diff --git a/mods/cool_trees/maple/textures/maple_item_wood.png b/mods/cool_trees/maple/textures/maple_item_wood.png new file mode 100644 index 0000000..54152e1 Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_item_wood.png differ diff --git a/mods/cool_trees/maple/textures/maple_leaves.png b/mods/cool_trees/maple/textures/maple_leaves.png new file mode 100644 index 0000000..94c4a96 Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_leaves.png differ diff --git a/mods/cool_trees/maple/textures/maple_sapling.png b/mods/cool_trees/maple/textures/maple_sapling.png new file mode 100644 index 0000000..b37f43f Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_sapling.png differ diff --git a/mods/cool_trees/maple/textures/maple_trunk.png b/mods/cool_trees/maple/textures/maple_trunk.png new file mode 100644 index 0000000..2b899a1 Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_trunk.png differ diff --git a/mods/cool_trees/maple/textures/maple_trunk_top.png b/mods/cool_trees/maple/textures/maple_trunk_top.png new file mode 100644 index 0000000..ceb6f75 Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_trunk_top.png differ diff --git a/mods/cool_trees/maple/textures/maple_wood.png b/mods/cool_trees/maple/textures/maple_wood.png new file mode 100644 index 0000000..17b5a5c Binary files /dev/null and b/mods/cool_trees/maple/textures/maple_wood.png differ diff --git a/mods/cool_trees/modpack.txt b/mods/cool_trees/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/cool_trees/oak/init.lua b/mods/cool_trees/oak/init.lua new file mode 100644 index 0000000..5eb2e6d --- /dev/null +++ b/mods/cool_trees/oak/init.lua @@ -0,0 +1,273 @@ +-- +-- Oak +-- + +local modname = "oak" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +--Acorn + +minetest.register_node("oak:acorn", { + description = S("Acorn"), + drawtype = "plantlike", + tiles = {"oak_acorn.png"}, + inventory_image = "oak_acorn.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "oak:acorn", param2 = 1}) + end, +}) + +-- oak + +local function grow_new_oak_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-5}, modpath.."/schematics/oak.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00004 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.0008 + scale = 0.00004 + end + + minetest.register_decoration({ + name = "oak:oak_tree", + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 250, y = 250, z = 250}, + seed = 6431, + octaves = 3, + persist = 0.66 + }, + biomes = {biomes}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/oak.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + place_offset_y = 0, + }) +end + +-- +-- Nodes +-- + +minetest.register_node("oak:sapling", { + description = S("Oak Sapling"), + drawtype = "plantlike", + tiles = {"oak_sapling.png"}, + inventory_image = "oak_sapling.png", + wield_image = "oak_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_oak_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "oak:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("oak:trunk", { + description = S("Oak Trunk"), + tiles = { + "oak_trunk_top.png", + "oak_trunk_top.png", + "oak_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node, +}) + +-- oak wood +minetest.register_node("oak:wood", { + description = S("Oak Wood"), + tiles = {"oak_wood.png"}, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- oak tree leaves +minetest.register_node("oak:leaves", { + description = S("Oak Leaves"), + drawtype = "allfaces_optional", + tiles = {"oak_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"oak:sapling"}, rarity = 20}, + {items = {"oak:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "oak:wood 4", + recipe = {{"oak:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "oak:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "oak:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "oak:convert_oak_saplings_to_node_timer", + nodenames = {"oak:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"oak:trunk"}, + leaves = {"oak:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Oak Wood Fence"), + texture = "oak_wood.png", + material = "oak:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("oak:fence", table.copy(fence)) + fence.description = S("Oak Fence Rail") + default.register_fence_rail("oak:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Oak Fence Gate") + doors.register_fencegate("oak:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "oak_trunk", + "oak:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"oak_wood.png"}, + S("Oak Stair"), + S("Oak Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("oak", "wood", "oak:wood", { + description = "Oak", + tiles = {"oak_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"oak:sapling", grow_new_oak_tree, "soil"}, + }) +end + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_oak_wood", { + tiles = {{ name = "oak_door_wood.png", backface_culling = true }}, + description = S("Oak Wood Door"), + inventory_image = "oak_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"oak:wood", "oak:wood"}, + {"oak:wood", "oak:wood"}, + {"oak:wood", "oak:wood"}, + } + }) +end diff --git a/mods/cool_trees/oak/locale/oak.es.tr b/mods/cool_trees/oak/locale/oak.es.tr new file mode 100644 index 0000000..854ce49 --- /dev/null +++ b/mods/cool_trees/oak/locale/oak.es.tr @@ -0,0 +1,11 @@ +# textdomain: oak +Acorn=Bellota +Oak Sapling=Retoño de roble +Oak Trunk=Madera de roble +Oak Wood=Tablas de roble +Oak Inner Stair=Escalera interior de roble +Oak Leaves=Hojas de roble +Oak Outer Stair=Escalera exterior de roble +Oak Slab=Losa de roble +Oak Stair=Escalera de roble +Oak Wood Door=Puerta de roble diff --git a/mods/cool_trees/oak/mod.conf b/mods/cool_trees/oak/mod.conf new file mode 100644 index 0000000..af102d4 --- /dev/null +++ b/mods/cool_trees/oak/mod.conf @@ -0,0 +1,4 @@ +name = oak +description = Oak Tree +depends = default +optional_depends = stairs, bonemeal, rainf, doors, moreblocks diff --git a/mods/cool_trees/oak/schematics/oak.lua b/mods/cool_trees/oak/schematics/oak.lua new file mode 100644 index 0000000..e775887 --- /dev/null +++ b/mods/cool_trees/oak/schematics/oak.lua @@ -0,0 +1,2081 @@ +schematic = { + size = {x=11, y=17, z=11}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + {ypos=12, prob=254}, + {ypos=13, prob=254}, + {ypos=14, prob=254}, + {ypos=15, prob=254}, + {ypos=16, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=9}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=2}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=2}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=2}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=2}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:trunk", prob=254, param2=12}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:trunk", prob=254, param2=18}, + {name="oak:trunk", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=12}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:acorn", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:trunk", prob=254, param2=7}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="oak:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/oak/schematics/oak.mts b/mods/cool_trees/oak/schematics/oak.mts new file mode 100644 index 0000000..e215079 Binary files /dev/null and b/mods/cool_trees/oak/schematics/oak.mts differ diff --git a/mods/cool_trees/oak/textures/oak_acorn.png b/mods/cool_trees/oak/textures/oak_acorn.png new file mode 100644 index 0000000..38f161a Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_acorn.png differ diff --git a/mods/cool_trees/oak/textures/oak_door_wood.png b/mods/cool_trees/oak/textures/oak_door_wood.png new file mode 100644 index 0000000..2c7871b Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_door_wood.png differ diff --git a/mods/cool_trees/oak/textures/oak_item_wood.png b/mods/cool_trees/oak/textures/oak_item_wood.png new file mode 100644 index 0000000..281d717 Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_item_wood.png differ diff --git a/mods/cool_trees/oak/textures/oak_leaves.png b/mods/cool_trees/oak/textures/oak_leaves.png new file mode 100644 index 0000000..6ed1850 Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_leaves.png differ diff --git a/mods/cool_trees/oak/textures/oak_sapling.png b/mods/cool_trees/oak/textures/oak_sapling.png new file mode 100644 index 0000000..f719cc8 Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_sapling.png differ diff --git a/mods/cool_trees/oak/textures/oak_trunk.png b/mods/cool_trees/oak/textures/oak_trunk.png new file mode 100644 index 0000000..6e24157 Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_trunk.png differ diff --git a/mods/cool_trees/oak/textures/oak_trunk_top.png b/mods/cool_trees/oak/textures/oak_trunk_top.png new file mode 100644 index 0000000..974e8e3 Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_trunk_top.png differ diff --git a/mods/cool_trees/oak/textures/oak_wood.png b/mods/cool_trees/oak/textures/oak_wood.png new file mode 100644 index 0000000..8d45fbe Binary files /dev/null and b/mods/cool_trees/oak/textures/oak_wood.png differ diff --git a/mods/cool_trees/palm/init.lua b/mods/cool_trees/palm/init.lua new file mode 100644 index 0000000..5a3816c --- /dev/null +++ b/mods/cool_trees/palm/init.lua @@ -0,0 +1,334 @@ +-- Palm Tree +-- + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +local modname = "palm" +local modpath = minetest.get_modpath(modname) + +local function grow_new_palm_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-3}, modpath.."/schematics/palmtree.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +minetest.register_decoration({ + name = "palm:palm_tree", + deco_type = "schematic", + place_on = {"default:sand"}, + sidelen = 16, + noise_params = { + offset = 0.001, + scale = 0.002, + spread = {x = 250, y = 250, z = 250}, + seed = 2337, + octaves = 3, + persist = 0.66 + }, + biomes = {"sandstone_desert_ocean", "desert_ocean"}, + y_min = 1, + y_max = 2, + schematic = modpath.."/schematics/palmtree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", +}) + +-- +-- Nodes +-- + +minetest.register_node("palm:sapling", { + description = S("Palm Sapling"), + drawtype = "plantlike", + tiles = {"palm_sapling.png"}, + inventory_image = "palm_sapling.png", + wield_image = "palm_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_palm_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "palm:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +-- palm trunk (thanks to VanessaE for palm textures) +minetest.register_node("palm:trunk", { + description = S("Palm Trunk"), + tiles = { + "palm_trunk_top.png", + "palm_trunk_top.png", + "palm_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- palm wood +minetest.register_node("palm:wood", { + description = S("Palm Wood"), + tiles = {"palm_wood.png"}, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- palm tree leaves +minetest.register_node("palm:leaves", { + description = S("Palm Leaves"), + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.4375, -0.5, 0.5, -0.5, 0.5}, + }, + }, + tiles = { + "palm_leaves.png", + }, + paramtype = "light", + paramtype2 = "facedir", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"palm:sapling"}, rarity = 10}, + {items = {"palm:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- Coconut (Gives 4 coconut slices, each heal 1/2 heart) +minetest.register_node("palm:coconut", { + description = S("Coconut"), + drawtype = "normal", + walkable = false, + paramtype = "light", + sunlight_propagates = true, + tiles = {"palm_coconut_top.png", "palm_coconut_side.png"}, + --inventory_image = "palm_coconut_side.png", + --wield_image = "palm_coconut_side.png", + selection_box = { + type = "fixed", + fixed = {-0.31, -0.43, -0.31, 0.31, 0.44, 0.31} + }, + groups = { + snappy = 1, oddly_breakable_by_hand = 1, cracky = 1, + choppy = 1, flammable = 1, leafdecay = 3, leafdecay_drop = 1 + }, + drop = "palm:coconut_slice 4", + sounds = default.node_sound_wood_defaults(), +}) + +-- Candle from Wax and String/Cotton +minetest.register_node("palm:candle", { + description = S("Coconut Wax Candle"), + drawtype = "plantlike", + inventory_image = "palm_candle_static.png", + wield_image = "palm_candle_static.png", + tiles = { + { + name = "palm_candle.png", + animation={ + type="vertical_frames", + aspect_w = 32, + aspect_h = 32, + length = 1.0 + } + }, + }, + paramtype = "light", + light_source = 11, + sunlight_propagates = true, + walkable = false, + groups = {dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.15, 0, 0.15 } + }, +}) + +if minetest.get_modpath("doors") ~= nil then + doors.register("door_palm", { + tiles = {{ name = "palm_door_wood.png", backface_culling = true }}, + description = S("Palm Door"), + inventory_image = "palm_door_wood_inv.png", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + recipe = { + {"palm:wood", "palm:wood"}, + {"palm:leaves", "palm:leaves"}, + {"palm:wood", "palm:wood"}, + } + }) +end + +-- +-- Craftitems +-- + +-- Coconut Slice (Heals half heart when eaten) +minetest.register_craftitem("palm:coconut_slice", { + description = S("Coconut Slice"), + inventory_image = "palm_coconut_slice.png", + wield_image = "palm_coconut_slice.png", + on_use = minetest.item_eat(1), +}) + +-- Palm Wax +minetest.register_craftitem("palm:wax", { + description = S("Palm Wax"), + inventory_image = "palm_wax.png", + wield_image = "palm_wax.png", +}) + +-- +-- Recipes +-- + +minetest.register_craft({ + type = "cooking", + cooktime = 10, + output = "palm:wax", + recipe = "palm:leaves" +}) + + +minetest.register_craft({ + output = "palm:wood 4", + recipe = {{"palm:trunk"}} +}) + +minetest.register_craft({ + output = "palm:candle 2", + recipe = { + {"farming:cotton"}, + {"palm:wax"}, + {"palm:wax"}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "palm:sapling", + burntime = 10, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "palm:trunk", + burntime = 34, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "palm:wood", + burntime = 9, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "palm:leaves", + burntime = 2, +}) + +minetest.register_lbm({ + name = "palm:convert_palmtree_saplings_to_node_timer", + nodenames = {"palm:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"palm:trunk"}, + leaves = {"palm:leaves", "palm:coconut"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Palm Tree Wood Fence"), + texture = "palm_wood.png", + material = "palm:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("palm:fence", table.copy(fence)) + fence.description = S("Palm Tree Fence Rail") + default.register_fence_rail("palm:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Palm Tree Fence Gate") + doors.register_fencegate("palm:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "palm_trunk", + "palm:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"palm_wood.png"}, + S("Palm Tree Stair"), + S("Palm Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("palm", "wood", "palm:wood", { + description = "Palm", + tiles = {"palm_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"palm:sapling", grow_new_palm_tree, "soil"}, + {"palm:sapling", grow_new_palm_tree, "sand"}, + }) +end diff --git a/mods/cool_trees/palm/locale/palm.es.tr b/mods/cool_trees/palm/locale/palm.es.tr new file mode 100644 index 0000000..bf0c347 --- /dev/null +++ b/mods/cool_trees/palm/locale/palm.es.tr @@ -0,0 +1,15 @@ +# textdomain: palm +Palm Sapling=Retoño de palmera +Palm Trunk=Madera de palmera +Palm Wood=Tablas de palmera +Palm Leaves=Hojas de palmera +Coconut=Coco +Coconut Wax Candle=Vela de cera de coco +Palm Door=Puerta de palmera +Coconut Slice=Coco partido +Palm Wax=Cera de coco +Palm Tree Stair=Escaleras de palmera +Palm Tree Slab=Losa de palmera +Inner Palm Stair=Escaleras de palmera interior +Outer Palm Stair=Escaleras de palmera exterior +Palm Slab=Losa de palmera \ No newline at end of file diff --git a/mods/cool_trees/palm/mod.conf b/mods/cool_trees/palm/mod.conf new file mode 100644 index 0000000..b7c4944 --- /dev/null +++ b/mods/cool_trees/palm/mod.conf @@ -0,0 +1,4 @@ +name = palm +description = Palm Tree for deserts +depends = default, doors +optional_depends = stairs, bonemeal, moreblocks diff --git a/mods/cool_trees/palm/schematics/palmtree.mts b/mods/cool_trees/palm/schematics/palmtree.mts new file mode 100644 index 0000000..f052e5c Binary files /dev/null and b/mods/cool_trees/palm/schematics/palmtree.mts differ diff --git a/mods/cool_trees/palm/textures/palm_candle.png b/mods/cool_trees/palm/textures/palm_candle.png new file mode 100644 index 0000000..0ed21b4 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_candle.png differ diff --git a/mods/cool_trees/palm/textures/palm_candle_static.png b/mods/cool_trees/palm/textures/palm_candle_static.png new file mode 100644 index 0000000..b7c7157 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_candle_static.png differ diff --git a/mods/cool_trees/palm/textures/palm_coconut.png b/mods/cool_trees/palm/textures/palm_coconut.png new file mode 100644 index 0000000..9d2731c Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_coconut.png differ diff --git a/mods/cool_trees/palm/textures/palm_coconut_side.png b/mods/cool_trees/palm/textures/palm_coconut_side.png new file mode 100644 index 0000000..062f0eb Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_coconut_side.png differ diff --git a/mods/cool_trees/palm/textures/palm_coconut_slice.png b/mods/cool_trees/palm/textures/palm_coconut_slice.png new file mode 100755 index 0000000..2348009 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_coconut_slice.png differ diff --git a/mods/cool_trees/palm/textures/palm_coconut_top.png b/mods/cool_trees/palm/textures/palm_coconut_top.png new file mode 100644 index 0000000..09f29f4 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_coconut_top.png differ diff --git a/mods/cool_trees/palm/textures/palm_door_wood.png b/mods/cool_trees/palm/textures/palm_door_wood.png new file mode 100644 index 0000000..dfb68e7 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_door_wood.png differ diff --git a/mods/cool_trees/palm/textures/palm_door_wood_inv.png b/mods/cool_trees/palm/textures/palm_door_wood_inv.png new file mode 100644 index 0000000..8a1e137 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_door_wood_inv.png differ diff --git a/mods/cool_trees/palm/textures/palm_leaves.png b/mods/cool_trees/palm/textures/palm_leaves.png new file mode 100644 index 0000000..57948c9 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_leaves.png differ diff --git a/mods/cool_trees/palm/textures/palm_sapling.png b/mods/cool_trees/palm/textures/palm_sapling.png new file mode 100644 index 0000000..2199d28 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_sapling.png differ diff --git a/mods/cool_trees/palm/textures/palm_trunk.png b/mods/cool_trees/palm/textures/palm_trunk.png new file mode 100644 index 0000000..a36ae28 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_trunk.png differ diff --git a/mods/cool_trees/palm/textures/palm_trunk_top.png b/mods/cool_trees/palm/textures/palm_trunk_top.png new file mode 100644 index 0000000..d4e87de Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_trunk_top.png differ diff --git a/mods/cool_trees/palm/textures/palm_wax.png b/mods/cool_trees/palm/textures/palm_wax.png new file mode 100644 index 0000000..fc91658 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_wax.png differ diff --git a/mods/cool_trees/palm/textures/palm_wood.png b/mods/cool_trees/palm/textures/palm_wood.png new file mode 100644 index 0000000..372b780 Binary files /dev/null and b/mods/cool_trees/palm/textures/palm_wood.png differ diff --git a/mods/cool_trees/pineapple/init.lua b/mods/cool_trees/pineapple/init.lua new file mode 100644 index 0000000..151820a --- /dev/null +++ b/mods/cool_trees/pineapple/init.lua @@ -0,0 +1,133 @@ +-- +-- Pineapple +-- + +local modname = "pineapple" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Pineapple + +local function grow_new_pineapple_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x, y = pos.y, z = pos.z}, modpath.."/schematics/pineapple.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "pineapple:pineapple_shrub", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.00004, + spread = {x = 250, y = 250, z = 250}, + seed = 299, + octaves = 3, + persist = 0.66 + }, + biomes = {"rainforest"}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/pineapple.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + place_offset_y = 1, + }) +end + +-- +-- Nodes +-- + +-- pineapple +minetest.register_node("pineapple:pineapple", { + description = S("Pineapple"), + drawtype = "plantlike_rooted", + tiles = {"pineapple_pineapple.png"}, + special_tiles = { + nil, + nil, + "pineapple_pineapple_leaves.png", + "pineapple_pineapple_leaves.png", + "pineapple_pineapple_leaves.png", + "pineapple_pineapple_leaves.png" + }, + inventory_image = "pineapple_pineapple_inv.png", + wield_image = "pineapple_pineapple_inv.png", + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, + on_use = minetest.item_eat(3, "pineapple:sapling"), +}) + + +minetest.register_node("pineapple:sapling", { + description = S("Pineapple Sapling"), + drawtype = "plantlike", + tiles = {"pineapple_pineapple_leaves.png"}, + inventory_image = "pineapple_pineapple_leaves.png", + wield_image = "pineapple_pineapple_leaves.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_pineapple_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "pineapple:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +-- +-- Craftitems +-- + +minetest.register_lbm({ + name = "pineapple:convert_pineapple_saplings_to_node_timer", + nodenames = {"pineapple:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"pineapple:sapling", grow_new_pineapple_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/pineapple/locale/pineapple.es.tr b/mods/cool_trees/pineapple/locale/pineapple.es.tr new file mode 100644 index 0000000..64492d0 --- /dev/null +++ b/mods/cool_trees/pineapple/locale/pineapple.es.tr @@ -0,0 +1,3 @@ +# textdomain: pineapple +Pineapple=Piña +Pineapple Sapling=Retoño de piña diff --git a/mods/cool_trees/pineapple/mod.conf b/mods/cool_trees/pineapple/mod.conf new file mode 100644 index 0000000..3293928 --- /dev/null +++ b/mods/cool_trees/pineapple/mod.conf @@ -0,0 +1,4 @@ +name = pineapple +description = Pineapple tree for the jungle +depends = default +optional_depends = bonemeal diff --git a/mods/cool_trees/pineapple/schematics/pineapple.mts b/mods/cool_trees/pineapple/schematics/pineapple.mts new file mode 100644 index 0000000..a48b0a9 Binary files /dev/null and b/mods/cool_trees/pineapple/schematics/pineapple.mts differ diff --git a/mods/cool_trees/pineapple/textures/pineapple_leaves.png b/mods/cool_trees/pineapple/textures/pineapple_leaves.png new file mode 100644 index 0000000..32a5841 Binary files /dev/null and b/mods/cool_trees/pineapple/textures/pineapple_leaves.png differ diff --git a/mods/cool_trees/pineapple/textures/pineapple_pineapple.png b/mods/cool_trees/pineapple/textures/pineapple_pineapple.png new file mode 100644 index 0000000..5336b78 Binary files /dev/null and b/mods/cool_trees/pineapple/textures/pineapple_pineapple.png differ diff --git a/mods/cool_trees/pineapple/textures/pineapple_pineapple_inv.png b/mods/cool_trees/pineapple/textures/pineapple_pineapple_inv.png new file mode 100644 index 0000000..18581ce Binary files /dev/null and b/mods/cool_trees/pineapple/textures/pineapple_pineapple_inv.png differ diff --git a/mods/cool_trees/pineapple/textures/pineapple_pineapple_leaves.png b/mods/cool_trees/pineapple/textures/pineapple_pineapple_leaves.png new file mode 100644 index 0000000..bd0df74 Binary files /dev/null and b/mods/cool_trees/pineapple/textures/pineapple_pineapple_leaves.png differ diff --git a/mods/cool_trees/plumtree/init.lua b/mods/cool_trees/plumtree/init.lua new file mode 100644 index 0000000..2d48078 --- /dev/null +++ b/mods/cool_trees/plumtree/init.lua @@ -0,0 +1,288 @@ +-- +-- Plumtree +-- +local modname = "plumtree" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") +local fruit_grow_time = 1200 + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Plum Fruit + +minetest.register_node("plumtree:plum", { + description = S("Plum"), + drawtype = "plantlike", + tiles = {"plumtree_plum.png"}, + inventory_image = "plumtree_plum.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "plumtree:plum", param2 = 1}) + end, + + on_dig = function(pos, node, digger) + if digger:is_player() then + local inv = digger:get_inventory() + if inv:room_for_item("main", "plumtree:plum") then + inv:add_item("main", "plumtree:plum") + end + end + minetest.remove_node(pos) + pos.y = pos.y + 1 + local node_above = minetest.get_node_or_nil(pos) + if node_above and node_above.param2 == 0 and node_above.name == "plumtree:blossom_leaves" then + --20% of variation on time + local twenty_percent = fruit_grow_time * 0.2 + local grow_time = math.random(fruit_grow_time - twenty_percent, fruit_grow_time + twenty_percent) + minetest.get_node_timer(pos):start(grow_time) + end + end, +}) + +-- Plumtree + +local function grow_new_plumtree_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-4, y = pos.y-1, z = pos.z-4}, modpath.."/schematics/plumtree.mts", "0", nil, true) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + + local place_on + local biomes + local offset + local scale + +if minetest.get_modpath("rainf") then + place_on = "rainf:meadow" + biomes = "rainf" + offset = 0.0008 + scale = 0.00004 + else + place_on = "default:dirt_with_grass" + biomes = "grassland" + offset = 0.00005 + scale = 0.00004 + end + + minetest.register_decoration({ + name = "plumtree:plum_tree", + deco_type = "schematic", + place_on = {place_on}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 250, y = 250, z = 250}, + seed = 23278, + octaves = 3, + persist = 0.66 + }, + biomes = {biomes}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/plumtree.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("plumtree:sapling", { + description = S("Plumtree Tree Sapling"), + drawtype = "plantlike", + tiles = {"plumtree_sapling.png"}, + inventory_image = "plumtree_sapling.png", + wield_image = "plumtree_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_plumtree_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "plumtree:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("plumtree:trunk", { + description = S("Plumtree Trunk"), + tiles = { + "plumtree_trunk_top.png", + "plumtree_trunk_top.png", + "plumtree_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- plumtree wood +minetest.register_node("plumtree:wood", { + description = S("Plumtree Wood"), + tiles = {"plumtree_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + + +-- plumtree tree leaves +minetest.register_node("plumtree:leaves", { + description = S("Plumtree Leaves"), + drawtype = "allfaces_optional", + tiles = {"plumtree_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"plumtree:sapling"}, rarity = 20}, + {items = {"plumtree:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "plumtree:wood 4", + recipe = {{"plumtree:trunk"}} +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "plumtree:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "plumtree:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "plumtree:convert_plumtree_saplings_to_node_timer", + nodenames = {"plumtree:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"plumtree:trunk"}, + leaves = {"plumtree:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Plum Tree Wood Fence"), + texture = "plumtree_wood.png", + material = "plumtree:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("plumtree:fence", table.copy(fence)) + fence.description = S("Plum Tree Fence Rail") + default.register_fence_rail("plumtree:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Plum Tree Fence Gate") + doors.register_fencegate("plumtree:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "plumtree_trunk", + "plumtree:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"plumtree_wood.png"}, + S("Plum Tree Stair"), + S("Plum Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("plumtree", "wood", "plumtree:wood", { + description = "Plum Tree", + tiles = {"plumtree_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +--Support for bonemeal + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"plumtree:sapling", grow_new_plumtree_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/plumtree/locale/plumtree.es.tr b/mods/cool_trees/plumtree/locale/plumtree.es.tr new file mode 100644 index 0000000..af21aa6 --- /dev/null +++ b/mods/cool_trees/plumtree/locale/plumtree.es.tr @@ -0,0 +1,11 @@ +# textdomain: plumtree +Plum=Ciruela +Plumtree Trunk=Madera de ciruelo +Plumtree Wood=Tablas de ciruelo +Plumtree Leaves=Hojas de ciruelo +Plumtree Tree Sapling=Retoño de ciruelo +Plum Tree Stair=Escaleras de ciruelo +Plum Tree Slab=Losa de ciruelo +Inner Plumtree Stair=Escaleras de ciruelo interior +Outer Plumtree Stair=Escaleras de ciruelo exterior +Plumtree Slab=Losa de ciruelo diff --git a/mods/cool_trees/plumtree/mod.conf b/mods/cool_trees/plumtree/mod.conf new file mode 100644 index 0000000..374554a --- /dev/null +++ b/mods/cool_trees/plumtree/mod.conf @@ -0,0 +1,4 @@ +name = plumtree +description = Plum Tree +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/plumtree/schematics/plumtree.lua b/mods/cool_trees/plumtree/schematics/plumtree.lua new file mode 100644 index 0000000..ca9c594 --- /dev/null +++ b/mods/cool_trees/plumtree/schematics/plumtree.lua @@ -0,0 +1,883 @@ +schematic = { + size = {x=9, y=12, z=8}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=20}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=18}, + {name="plumtree:trunk", prob=254, param2=18}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=2}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=3}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:trunk", prob=254, param2=3}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:plum", prob=254, param2=1}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="plumtree:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/plumtree/schematics/plumtree.mts b/mods/cool_trees/plumtree/schematics/plumtree.mts new file mode 100644 index 0000000..1bef805 Binary files /dev/null and b/mods/cool_trees/plumtree/schematics/plumtree.mts differ diff --git a/mods/cool_trees/plumtree/textures/plumtree_leaves.png b/mods/cool_trees/plumtree/textures/plumtree_leaves.png new file mode 100644 index 0000000..774db34 Binary files /dev/null and b/mods/cool_trees/plumtree/textures/plumtree_leaves.png differ diff --git a/mods/cool_trees/plumtree/textures/plumtree_plum.png b/mods/cool_trees/plumtree/textures/plumtree_plum.png new file mode 100644 index 0000000..46f691f Binary files /dev/null and b/mods/cool_trees/plumtree/textures/plumtree_plum.png differ diff --git a/mods/cool_trees/plumtree/textures/plumtree_sapling.png b/mods/cool_trees/plumtree/textures/plumtree_sapling.png new file mode 100644 index 0000000..5a69b39 Binary files /dev/null and b/mods/cool_trees/plumtree/textures/plumtree_sapling.png differ diff --git a/mods/cool_trees/plumtree/textures/plumtree_trunk.png b/mods/cool_trees/plumtree/textures/plumtree_trunk.png new file mode 100644 index 0000000..ccf397d Binary files /dev/null and b/mods/cool_trees/plumtree/textures/plumtree_trunk.png differ diff --git a/mods/cool_trees/plumtree/textures/plumtree_trunk_top.png b/mods/cool_trees/plumtree/textures/plumtree_trunk_top.png new file mode 100644 index 0000000..cec6dda Binary files /dev/null and b/mods/cool_trees/plumtree/textures/plumtree_trunk_top.png differ diff --git a/mods/cool_trees/plumtree/textures/plumtree_wood.png b/mods/cool_trees/plumtree/textures/plumtree_wood.png new file mode 100644 index 0000000..23bead4 Binary files /dev/null and b/mods/cool_trees/plumtree/textures/plumtree_wood.png differ diff --git a/mods/cool_trees/pomegranate/init.lua b/mods/cool_trees/pomegranate/init.lua new file mode 100644 index 0000000..ddb3b10 --- /dev/null +++ b/mods/cool_trees/pomegranate/init.lua @@ -0,0 +1,254 @@ +-- +-- Pomegranate +-- + +local modname = "pomegranate" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_node("pomegranate:pomegranate", { + description = S("Pomegranate"), + drawtype = "plantlike", + tiles = {"pomegranate.png"}, + inventory_image = "pomegranate.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "pomegranate:pomegranate", param2 = 1}) + end, +}) + +-- pomegranate + +local function grow_new_pomegranate_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-1, y = pos.y, z = pos.z-1}, modpath.."/schematics/pomegranate.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "pomegranate:pomegranate_tree", + deco_type = "schematic", + place_on = {"default:dry_dirt"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.00004, + spread = {x = 250, y = 250, z = 250}, + seed = 978, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_min = 1, + y_max = 80, + schematic = modpath.."/schematics/pomegranate.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("pomegranate:sapling", { + description = S("Pomegranate Tree Sapling"), + drawtype = "plantlike", + tiles = {"pomegranate_sapling.png"}, + inventory_image = "pomegranate_sapling.png", + wield_image = "pomegranate_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_pomegranate_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "pomegranate:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("pomegranate:trunk", { + description = S("Pomegranate Tree Trunk"), + tiles = { + "pomegranate_trunk_top.png", + "pomegranate_trunk_top.png", + "pomegranate_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + on_place = minetest.rotate_node, +}) + +-- pomegranate wood +minetest.register_node("pomegranate:wood", { + description = S("Pomegranate Tree Wood"), + tiles = {"pomegranate_wood.png"}, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- pomegranate tree leaves +minetest.register_node("pomegranate:leaves", { + description = S("Pomegranate Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"pomegranate_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"pomegranate:sapling"}, rarity = 20}, + {items = {"pomegranate:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +minetest.register_craftitem("pomegranate:section", { + description = S("Pomegranate Section"), + inventory_image = "pomegranate_section.png", + on_use = minetest.item_eat(3), + groups = {flammable = 2, food = 2}, +}) + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "pomegranate:wood 4", + recipe = {{"pomegranate:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "pomegranate:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "pomegranate:wood", + burntime = 7, +}) + +minetest.register_craft({ + output = "pomegranate:section 4", + recipe = {{"pomegranate:pomegranate"}} +}) + +minetest.register_lbm({ + name = "pomegranate:convert_pomegranate_saplings_to_node_timer", + nodenames = {"pomegranate:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"pomegranate:trunk"}, + leaves = {"pomegranate:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Pomegranate Tree Wood Fence"), + texture = "pomegranate_wood.png", + material = "pomegranate:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("pomegranate:fence", table.copy(fence)) + fence.description = S("Pomegranate Tree Fence Rail") + default.register_fence_rail("pomegranate:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Pomegranate Tree Fence Gate") + doors.register_fencegate("pomegranate:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "pomegranate_trunk", + "pomegranate:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"pomegranate_wood.png"}, + S("Pomegranate Tree Stair"), + S("Pomegranate Tree Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("pomegranate", "wood", "pomegranate:wood", { + description = "Pomegranate Tree", + tiles = {"pomegranate_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"pomegranate:sapling", grow_new_pomegranate_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/pomegranate/locale/pomegranate.es.tr b/mods/cool_trees/pomegranate/locale/pomegranate.es.tr new file mode 100644 index 0000000..16717d1 --- /dev/null +++ b/mods/cool_trees/pomegranate/locale/pomegranate.es.tr @@ -0,0 +1,11 @@ +# textdomain: pomegranate +Pomegranate=Granada +Pomegranate Section=Gajo de granada +Pomegranate Tree Inner Stair=Escalera interior de granado +Pomegranate Tree Leaves=Hojas de granado +Pomegranate Tree Outer Stair=Escalera exterior de granado +Pomegranate Tree Slab=Losa de granado +Pomegranate Tree Stair=Escalera de granado +Pomegranate Tree Sapling=Retoño de granado +Pomegranate Tree Trunk=Madera de granado +Pomegranate Tree Wood=Tablas de granado diff --git a/mods/cool_trees/pomegranate/mod.conf b/mods/cool_trees/pomegranate/mod.conf new file mode 100644 index 0000000..93529ec --- /dev/null +++ b/mods/cool_trees/pomegranate/mod.conf @@ -0,0 +1,4 @@ +name = pomegranate +description = Pomegranate Tree for Savanha +depends = default +optional_depends = stairs, bonemeal, doors, moreblocks diff --git a/mods/cool_trees/pomegranate/schematics/pomegranate.lua b/mods/cool_trees/pomegranate/schematics/pomegranate.lua new file mode 100644 index 0000000..045e1f1 --- /dev/null +++ b/mods/cool_trees/pomegranate/schematics/pomegranate.lua @@ -0,0 +1,67 @@ +schematic = { + size = {x=3, y=6, z=3}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:pomegranate", prob=126, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="pomegranate:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="pomegranate:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="pomegranate:trunk", prob=254, param2=1}, + {name="air", prob=0, param2=0}, + {name="pomegranate:pomegranate", prob=126, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:pomegranate", prob=126, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="pomegranate:leaves", prob=126, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:pomegranate", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="pomegranate:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/pomegranate/schematics/pomegranate.mts b/mods/cool_trees/pomegranate/schematics/pomegranate.mts new file mode 100644 index 0000000..4c72f99 Binary files /dev/null and b/mods/cool_trees/pomegranate/schematics/pomegranate.mts differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate.png b/mods/cool_trees/pomegranate/textures/pomegranate.png new file mode 100644 index 0000000..dd0c353 Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate.png differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate_leaves.png b/mods/cool_trees/pomegranate/textures/pomegranate_leaves.png new file mode 100644 index 0000000..347d2a4 Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate_leaves.png differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate_sapling.png b/mods/cool_trees/pomegranate/textures/pomegranate_sapling.png new file mode 100644 index 0000000..11d28fb Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate_sapling.png differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate_section.png b/mods/cool_trees/pomegranate/textures/pomegranate_section.png new file mode 100644 index 0000000..80e4817 Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate_section.png differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate_trunk.png b/mods/cool_trees/pomegranate/textures/pomegranate_trunk.png new file mode 100644 index 0000000..6d59621 Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate_trunk.png differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate_trunk_top.png b/mods/cool_trees/pomegranate/textures/pomegranate_trunk_top.png new file mode 100644 index 0000000..0955011 Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate_trunk_top.png differ diff --git a/mods/cool_trees/pomegranate/textures/pomegranate_wood.png b/mods/cool_trees/pomegranate/textures/pomegranate_wood.png new file mode 100644 index 0000000..ae9287f Binary files /dev/null and b/mods/cool_trees/pomegranate/textures/pomegranate_wood.png differ diff --git a/mods/cool_trees/willow/init.lua b/mods/cool_trees/willow/init.lua new file mode 100644 index 0000000..50e87d4 --- /dev/null +++ b/mods/cool_trees/willow/init.lua @@ -0,0 +1,224 @@ +-- +-- Willow +-- + +local modname = "willow" +local modpath = minetest.get_modpath(modname) +local mg_name = minetest.get_mapgen_setting("mg_name") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Willow + +local function grow_new_willow_tree(pos) + if not default.can_grow(pos) then + -- try a bit later again + minetest.get_node_timer(pos):start(math.random(240, 600)) + return + end + minetest.remove_node(pos) + minetest.place_schematic({x = pos.x-5, y = pos.y, z = pos.z-5}, modpath.."/schematics/willow.mts", "0", nil, false) +end + +-- +-- Decoration +-- + +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + name = "willow:willow_tree", + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = 0.0005, + scale = 0.0002, + spread = {x = 250, y = 250, z = 250}, + seed = 23, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest_shore"}, + height = 2, + y_min = -1, + y_max = 62, + schematic = modpath.."/schematics/willow.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + }) +end + +-- +-- Nodes +-- + +minetest.register_node("willow:sapling", { + description = S("Willow Tree Sapling"), + drawtype = "plantlike", + tiles = {"willow_sapling.png"}, + inventory_image = "willow_sapling.png", + wield_image = "willow_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_new_willow_tree, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(2400,4800)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "willow:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 6, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("willow:trunk", { + description = S("Willow Trunk"), + tiles = { + "willow_trunk_top.png", + "willow_trunk_top.png", + "willow_trunk.png" + }, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + paramtype2 = "facedir", + is_ground_content = false, + on_place = minetest.rotate_node, +}) + +-- willow wood +minetest.register_node("willow:wood", { + description = S("Willow Wood"), + tiles = {"willow_wood.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), +}) + +-- willow tree leaves +minetest.register_node("willow:leaves", { + description = S("Willow Leaves"), + drawtype = "allfaces_optional", + tiles = {"willow_leaves.png"}, + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, leafdecay = 3, leaves = 1, flammable = 2}, + drop = { + max_items = 1, + items = { + {items = {"willow:sapling"}, rarity = 20}, + {items = {"willow:leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + after_place_node = default.after_place_leaves, +}) + +-- +-- Craftitems +-- + +-- +-- Recipes +-- + +minetest.register_craft({ + output = "willow:wood 4", + recipe = {{"willow:trunk"}} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "willow:trunk", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "willow:wood", + burntime = 7, +}) + + +minetest.register_lbm({ + name = "willow:convert_willow_saplings_to_node_timer", + nodenames = {"willow:sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(1200, 2400)) + end +}) + +default.register_leafdecay({ + trunks = {"willow:trunk"}, + leaves = {"willow:leaves"}, + radius = 3, +}) + +-- Fence +if minetest.settings:get_bool("cool_fences", true) then + local fence = { + description = S("Willow Wood Fence"), + texture = "willow_wood.png", + material = "willow:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + default.register_fence("willow:fence", table.copy(fence)) + fence.description = S("Willow Fence Rail") + default.register_fence_rail("willow:fence_rail", table.copy(fence)) + + if minetest.get_modpath("doors") ~= nil then + fence.description = S("Willow Fence Gate") + doors.register_fencegate("willow:gate", table.copy(fence)) + end +end + +--Stairs + +if minetest.get_modpath("stairs") ~= nil then + stairs.register_stair_and_slab( + "willow_trunk", + "willow:trunk", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"willow_wood.png"}, + S("Willow Stair"), + S("Willow Slab"), + default.node_sound_wood_defaults() + ) +end + +-- stairsplus/moreblocks +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("willow", "wood", "willow:wood", { + description = "Willow", + tiles = {"willow_wood.png"}, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) +end + +if minetest.get_modpath("bonemeal") ~= nil then + bonemeal:add_sapling({ + {"willow:sapling", grow_new_willow_tree, "soil"}, + }) +end diff --git a/mods/cool_trees/willow/locale/willow.es.tr b/mods/cool_trees/willow/locale/willow.es.tr new file mode 100644 index 0000000..1ee80e9 --- /dev/null +++ b/mods/cool_trees/willow/locale/willow.es.tr @@ -0,0 +1,9 @@ +# textdomain: willow +Willow Trunk=Madera de sauce +Willow Wood=Tablas de sauce +Willow Leaves=Hojas de sauce +Willow Tree Sapling=Retoño de árbol de sauce +Willow Stair=Escaleras de sauce +Inner Willow Stair=Escaleras de sauce interior +Outer Willow Stair=Escaleras de sauce exterior +Willow Slab=Losa de sauce diff --git a/mods/cool_trees/willow/mod.conf b/mods/cool_trees/willow/mod.conf new file mode 100644 index 0000000..633ef3e --- /dev/null +++ b/mods/cool_trees/willow/mod.conf @@ -0,0 +1,4 @@ +name = willow +description = Willow Tree for Swampy Biomes +depends = default +optional_depends = stairs, bonemeal, swampz, doors, moreblocks diff --git a/mods/cool_trees/willow/schematics/willow.lua b/mods/cool_trees/willow/schematics/willow.lua new file mode 100644 index 0000000..86dbeb6 --- /dev/null +++ b/mods/cool_trees/willow/schematics/willow.lua @@ -0,0 +1,1099 @@ +schematic = { + size = {x=9, y=12, z=10}, + yslice_prob = { + {ypos=0, prob=254}, + {ypos=1, prob=254}, + {ypos=2, prob=254}, + {ypos=3, prob=254}, + {ypos=4, prob=254}, + {ypos=5, prob=254}, + {ypos=6, prob=254}, + {ypos=7, prob=254}, + {ypos=8, prob=254}, + {ypos=9, prob=254}, + {ypos=10, prob=254}, + {ypos=11, prob=254}, + }, + data = { + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=22}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:trunk", prob=254, param2=23}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=2}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:trunk", prob=254, param2=21}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=2}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=3}, + {name="willow:trunk", prob=254, param2=3}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=23}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=22}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=1}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=2}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=1}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=1}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=22}, + {name="willow:trunk", prob=254, param2=22}, + {name="willow:trunk", prob=254, param2=21}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=2}, + {name="willow:trunk", prob=254, param2=2}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=23}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:trunk", prob=254, param2=3}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=1}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=21}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=20}, + {name="willow:trunk", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="willow:leaves", prob=254, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + {name="air", prob=0, param2=0}, + }, +} diff --git a/mods/cool_trees/willow/schematics/willow.mts b/mods/cool_trees/willow/schematics/willow.mts new file mode 100644 index 0000000..eaec2ba Binary files /dev/null and b/mods/cool_trees/willow/schematics/willow.mts differ diff --git a/mods/cool_trees/willow/textures/willow_leaves.png b/mods/cool_trees/willow/textures/willow_leaves.png new file mode 100644 index 0000000..96d3fc6 Binary files /dev/null and b/mods/cool_trees/willow/textures/willow_leaves.png differ diff --git a/mods/cool_trees/willow/textures/willow_sapling.png b/mods/cool_trees/willow/textures/willow_sapling.png new file mode 100644 index 0000000..abcab08 Binary files /dev/null and b/mods/cool_trees/willow/textures/willow_sapling.png differ diff --git a/mods/cool_trees/willow/textures/willow_trunk.png b/mods/cool_trees/willow/textures/willow_trunk.png new file mode 100644 index 0000000..7dd404f Binary files /dev/null and b/mods/cool_trees/willow/textures/willow_trunk.png differ diff --git a/mods/cool_trees/willow/textures/willow_trunk_top.png b/mods/cool_trees/willow/textures/willow_trunk_top.png new file mode 100644 index 0000000..560556e Binary files /dev/null and b/mods/cool_trees/willow/textures/willow_trunk_top.png differ diff --git a/mods/cool_trees/willow/textures/willow_wood.png b/mods/cool_trees/willow/textures/willow_wood.png new file mode 100644 index 0000000..af57e11 Binary files /dev/null and b/mods/cool_trees/willow/textures/willow_wood.png differ diff --git a/mods/crops/.gitignore b/mods/crops/.gitignore new file mode 100644 index 0000000..8b38e58 --- /dev/null +++ b/mods/crops/.gitignore @@ -0,0 +1,3 @@ +## Generic ignorable patterns and files +*~ +debug.txt diff --git a/mods/crops/.luacheckrc b/mods/crops/.luacheckrc new file mode 100644 index 0000000..15eed66 --- /dev/null +++ b/mods/crops/.luacheckrc @@ -0,0 +1,15 @@ +unused_args = false +allow_defined_top = true + +read_globals = { + "DIR_DELIM", + "minetest", "core", + "dump", + "vector", "nodeupdate", + "VoxelManip", "VoxelArea", + "PseudoRandom", "ItemStack", + "intllib", + "default", + table = { fields = { "copy", "getn" } } +} + diff --git a/mods/crops/LICENSE b/mods/crops/LICENSE new file mode 100644 index 0000000..e657693 --- /dev/null +++ b/mods/crops/LICENSE @@ -0,0 +1,38 @@ + +Crops - a minetest mod that adds more farming crops + +See spdx.org/licenses to see what the License Identifiers used below mean. + +=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ + +All source code (lua): + (C) Auke Kok + LGPL-2.0+ + +All textures, models: + (C) Auke Kok + CC-BY-SA-3.0 + +Translations: + - de.po + (C) 2017 LNJ + LGPL-2.0+ + +Sounds: + - crops_watercan_splash* + http://freesound.org/people/junggle/sounds/27361/ + http://profiles.google.com/jun66le + CC-BY-3.0 + - crops_watercan_entering.ogg + http://freesound.org/people/Quistard/sounds/166824/ + CC-BY-3.0 + - crops_flies.ogg + http://www.freesound.org/people/galeku/sounds/46938/ + CC0-1.0 + - crops_watercan_watering.ogg + http://www.freesound.org/people/Eakoontz/sounds/151736/ + CC0-1.0 + +* Sounds edited with audacity + +=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ diff --git a/mods/crops/Makefile b/mods/crops/Makefile new file mode 100644 index 0000000..2586844 --- /dev/null +++ b/mods/crops/Makefile @@ -0,0 +1,10 @@ + +PROJECT = crops +all: release + +release: + VERSION=`git describe --tags`; \ + git archive --format zip --output "$(PROJECT)-$${VERSION}.zip" --prefix=$(PROJECT)/ master + +poupdate: + ../intllib/tools/xgettext.sh *.lua diff --git a/mods/crops/cooking.lua b/mods/crops/cooking.lua new file mode 100644 index 0000000..1d58bf2 --- /dev/null +++ b/mods/crops/cooking.lua @@ -0,0 +1,75 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- +-- cooking recipes that don't go directly with any of the +-- crops in this mod - either these combine them in new +-- ways or use other items +-- + +-- Intllib +local S = crops.intllib + +minetest.register_craftitem("crops:unbaked_clay_bowl", { + description = S("Unbaked clay bowl"), + inventory_image = "crops_unbaked_clay_bowl.png", +}) + +minetest.register_craft({ + output = "crops:unbaked_clay_bowl", + recipe = { + { "", "", "" }, + { "default:clay_lump", "", "default:clay_lump" }, + { "", "default:clay_lump", "" } + } +}) + +minetest.register_craftitem("crops:clay_bowl", { + description = S("Clay bowl"), + inventory_image = "crops_clay_bowl.png", + groups = { food_bowl=1 } +}) + +minetest.register_craft({ + type = "cooking", + output = "crops:clay_bowl", + recipe = "crops:unbaked_clay_bowl" +}) + +minetest.register_craftitem("crops:vegetable_stew", { + description = S("Bowl of vegetable stew"), + inventory_image = "crops_bowl_vegetable_stew.png", + groups = { eatable=1 }, + on_use = minetest.item_eat(8, "crops:clay_bowl"), +}) + +minetest.register_craft({ + type = "cooking", + output = "crops:vegetable_stew", + recipe = "crops:uncooked_vegetable_stew" +}) + +minetest.register_craftitem("crops:uncooked_vegetable_stew", { + description = S("Bowl of uncooked vegetable stew"), + inventory_image = "crops_bowl_uncooked_vegetable_stew.png", + groups = { eatable=1 }, + on_use = minetest.item_eat(2, "crops:clay_bowl") +}) + +minetest.register_craft({ + output = "crops:uncooked_vegetable_stew", + recipe = { + { "", "", "" }, + { "crops:green_bean", "crops:potato", "crops:tomato" }, + { "", "group:food_bowl", "" } + } +}) diff --git a/mods/crops/corn.lua b/mods/crops/corn.lua new file mode 100644 index 0000000..0826cab --- /dev/null +++ b/mods/crops/corn.lua @@ -0,0 +1,347 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +minetest.register_node("crops:corn", { + description = S("Corn"), + inventory_image = "crops_corn.png", + wield_image = "crops_corn.png", + tiles = { "crops_corn_base_seed.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = true, + paramtype = "light", + node_placement_prediction = "crops:corn_base_seed", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:corn_base_seed", param2 = 3}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +minetest.register_craftitem("crops:corn_cob", { + description = S("Corn Cob"), + inventory_image = "crops_corn_cob.png", +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:corn", + recipe = { "crops:corn_cob" } +}) + +minetest.register_craftitem("crops:corn_on_the_cob", { + description = S("Corn on the Cob"), + inventory_image = "crops_corn_on_the_cob.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "cooking", + output = "crops:corn_on_the_cob", + recipe = "crops:corn_cob" +}) + +minetest.register_node("crops:corn_base_seed", { + visual = "mesh", + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + tiles = { "crops_corn_base_seed.png" }, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1}, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.3, 0.5} + } +}) + +minetest.register_abm({ + nodenames = { "crops:corn_base_seed" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + minetest.swap_node(pos, { name = "crops:corn_base_1", param2 = 3 }) + end +}) + +minetest.register_node("crops:corn_base_1", { + visual = "mesh", + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_base_1.png" }, + waving = 1, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_abm({ + nodenames = { "crops:corn_base_1" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + if not minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name == "air" then + return + end + minetest.swap_node(pos, { name = "crops:corn_base_2", param2 = 3 }) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + minetest.set_node(above , { name = "crops:corn_top_1", param2 = 3 }) + local meta = minetest.get_meta(above) + meta:set_int("crops_top_half", 1) + end +}) + +minetest.register_node("crops:corn_base_2", { + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_base_2.png" }, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = function(pos, node, digger) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.get_node(above).name == "crops:corn_top_1" or minetest.get_node(above).name == "crops:corn_top_2" then + minetest.remove_node(above) + minetest.remove_node(pos) + return + end + if not minetest.get_node(above).name == "crops:corn_top_3" then + minetest.remove_node(pos) + end + + local meta = minetest.get_meta(pos) + local damage = meta:get_int("crops_damage") + local drops = {} + -- 0 - 2-4 + -- 50 - 2-3 + -- 100 - 1-1 + for i = 1,math.random(2 - (damage / 100), 4 - (3 * (damage / 100))) do + table.insert(drops, ('crops:corn_cob')) + end + minetest.set_node(pos, { name = "crops:corn_base_3", param2 = 3 }) + minetest.set_node(above, { name = "crops:corn_top_4", param2 = 3 }) + core.handle_node_drops(above, drops, digger) + end +}) + +minetest.register_node("crops:corn_base_3", { + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_base_3.png" }, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = function(pos, node, digger) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.get_node(above).name == "crops:corn_top_4" then + minetest.remove_node(above) + end + minetest.remove_node(pos) + end +}) + +minetest.register_node("crops:corn_top_1", { + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_base_1.png" }, + waving = 1, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = function(pos, node, digger) + local below = {x = pos.x, y = pos.y - 1, z = pos.z} + if not minetest.get_node(below).name == "crops:base_2" then + return + end + minetest.remove_node(below) + minetest.remove_node(pos) + end +}) + +minetest.register_abm({ + nodenames = { "crops:corn_top_1" }, + neighbors = { "crops:corn_base_2" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if minetest.get_node_light(pos, nil) < crops.settings.light then + return + end + minetest.swap_node(pos, { name = "crops:corn_top_2", param2 = 3 }) + end +}) + +minetest.register_node("crops:corn_top_2", { + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_top_1.png" }, + waving = 1, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + + on_dig = function(pos, node, digger) + local below = {x = pos.x, y = pos.y - 1, z = pos.z} + if not minetest.get_node(below).name == "crops:base_2" then + return + end + minetest.remove_node(below) + minetest.remove_node(pos) + end +}) + +minetest.register_abm({ + nodenames = { "crops:corn_top_2" }, + neighbors = { "crops:corn_base_2" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + -- we don't call crops.grow here otherwise there would be 2 abm's hitting + -- this stack, and dmg needs to be applied to the bottom part + if minetest.get_node_light(pos, nil) < crops.settings.light then + return + end + minetest.swap_node(pos, { name = "crops:corn_top_3", param2 = 3 }) + end +}) + +minetest.register_node("crops:corn_top_3", { + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_top_2.png" }, + waving = 1, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + + on_dig = function(pos, node, digger) + local below = { x = pos.x, y = pos.y - 1, z = pos.z } + local meta = minetest.get_meta(below) + local damage = meta:get_int("crops_damage") + local drops = {} + -- 0 - 2-4 + -- 50 - 2-3 + -- 100 - 1-1 + for i = 1,math.random(2 - (damage / 100), 4 - (3 * (damage / 100))) do + table.insert(drops, ('crops:corn_cob')) + end + crops.die(below) + core.handle_node_drops(pos, drops, digger) + end +}) + +minetest.register_node("crops:corn_top_4", { + description = S("Corn plant"), + drawtype = "plantlike", + paramtype2 = "meshoptions", + tiles = { "crops_corn_top_3.png" }, + waving = 1, + use_texture_alpha = true, + walkable = false, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + + on_dig = function(pos, node, digger) + local below = {x = pos.x, y = pos.y - 1, z = pos.z} + if minetest.get_node(below).name == "crops:corn_base_3" then + minetest.remove_node(below) + end + minetest.remove_node(pos) + end +}) + +crops.corn_die = function(pos) + minetest.set_node(pos, { name = "crops:corn_base_3", param2 = 3 }) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + minetest.set_node(above, { name = "crops:corn_top_4", param2 = 3 }) +end + +local properties = { + die = crops.corn_die, + waterstart = 40, + wateruse = 1, + night = 5, + soak = 60, + soak_damage = 75, + wither = 10, + wither_damage = 5, + doublesize = true, +} + +crops.register({ name = "crops:corn_base_seed", properties = properties }) +crops.register({ name = "crops:corn_base_1", properties = properties }) +crops.register({ name = "crops:corn_base_2", properties = properties }) +crops.register({ name = "crops:corn_base_3", properties = properties }) + diff --git a/mods/crops/crops_settings.txt b/mods/crops/crops_settings.txt new file mode 100644 index 0000000..e6fa8aa --- /dev/null +++ b/mods/crops/crops_settings.txt @@ -0,0 +1,10 @@ + +-- +-- crops_settings.txt +-- +-- These are the default difficulty settings for the crops mod. You can uncomment +-- the "easy" or "difficult" settings if you wish, or come up with your own values. +-- + +-- Valid values are "easy", "normal", and "difficult" +crops.difficulty = "easy" diff --git a/mods/crops/depends.txt b/mods/crops/depends.txt new file mode 100644 index 0000000..657056a --- /dev/null +++ b/mods/crops/depends.txt @@ -0,0 +1,3 @@ +default +farming +intllib? diff --git a/mods/crops/description.txt b/mods/crops/description.txt new file mode 100644 index 0000000..8b85a22 --- /dev/null +++ b/mods/crops/description.txt @@ -0,0 +1,5 @@ +This mod expands the basic set of farming-related crops that minetest_game offers. It adds melons, potatoes, tomatoes, green beans and corn. The mod also implements plant humidity - you will have to water plants to make sure they're not dried out, or make sure they don't get over-watered. + +Mod specific settings can be changed in the "crops_settings.txt" file in the world folder. + +For more information, go to: http://goo.gl/wf0XLh diff --git a/mods/crops/init.lua b/mods/crops/init.lua new file mode 100644 index 0000000..0e5e4aa --- /dev/null +++ b/mods/crops/init.lua @@ -0,0 +1,385 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +crops = {} +crops.plants = {} +crops.settings = {} + +local settings = {} +settings.easy = { + chance = 4, + interval = 30, + light = 8, + watercan = 25, + watercan_max = 90, + watercan_uses = 20, + damage_chance = 8, + damage_interval = 30, + damage_tick_min = 0, + damage_tick_max = 1, + damage_max = 25, + hydration = false, +} +settings.normal = { + chance = 8, + interval = 30, + light = 10, + watercan = 25, + watercan_max = 90, + watercan_uses = 20, + damage_chance = 8, + damage_interval = 30, + damage_tick_min = 0, + damage_tick_max = 5, + damage_max = 50, + hydration = true, +} +settings.difficult = { + chance = 16, + interval = 30, + light = 13, + watercan = 25, + watercan_max = 100, + watercan_uses = 20, + damage_chance = 4, + damage_interval = 30, + damage_tick_min = 3, + damage_tick_max = 7, + damage_max = 100, + hydration = true, +} + + +local worldpath = minetest.get_worldpath() +local modpath = minetest.get_modpath(minetest.get_current_modname()) + +-- Load support for intllib. +local S, _ = dofile(modpath .. "/intllib.lua") +crops.intllib = S + + +dofile(modpath .. "/crops_settings.txt") + +if io.open(worldpath .. "/crops_settings.txt", "r") == nil then + io.input(modpath .. "/crops_settings.txt") + io.output(worldpath .. "/crops_settings.txt") + + local size = 4096 + while true do + local buf = io.read(size) + if not buf then + io.close() + break + end + io.write(buf) + end +else + dofile(worldpath .. "/crops_settings.txt") +end + +if not crops.difficulty then + crops.difficulty = "normal" + minetest.log("error", "[crops] "..S("Defaulting to \"normal\" difficulty settings")) +end +crops.settings = settings[crops.difficulty] +if not crops.settings then + minetest.log("error", "[crops] "..S("Defaulting to \"normal\" difficulty settings")) + crops.settings = settings.normal +end +if crops.settings.hydration then + minetest.log("action", "[crops] "..S("Hydration and dehydration mechanics are enabled.")) +end + +local find_plant = function(node) + for i = 1,table.getn(crops.plants) do + if crops.plants[i].name == node.name then + return crops.plants[i] + end + end + minetest.log("error", "[crops] "..S("Unable to find plant \"@1\" in crops table", node.name)) + return nil +end + +crops.register = function(plantdef) + table.insert(crops.plants, plantdef) +end + +crops.plant = function(pos, node) + minetest.set_node(pos, node) + local meta = minetest.get_meta(pos) + local plant = find_plant(node) + meta:set_int("crops_water", math.max(plant.properties.waterstart, 1)) + meta:set_int("crops_damage", 0) +end + +crops.can_grow = function(pos) + if minetest.get_node_light(pos) < crops.settings.light then + return false + end + local node = minetest.get_node(pos) + local plant = find_plant(node) + if not plant then + return false + end + local meta = minetest.get_meta(pos) + if crops.settings.hydration then + local water = meta:get_int("crops_water") + if water < plant.properties.wither or water > plant.properties.soak then + if math.random(0,1) == 0 then + return false + end + end + -- growing costs water! + meta:set_int("crops_water", math.max(1, water - 10)) + end + + -- damaged plants are less likely to grow + local damage = meta:get_int("crops_damage") + if not damage == 0 then + if math.random(math.min(50, damage), 100) > 75 then + return false + end + end + + -- allow the plant to grow + return true +end + +crops.particles = function(pos, flag) + if flag == 0 then + -- wither (0) + minetest.add_particlespawner({ + amount = 1 * crops.settings.interval, + time = crops.settings.interval, + minpos = { x = pos.x - 0.4, y = pos.y - 0.4, z = pos.z - 0.4 }, + maxpos = { x = pos.x + 0.4, y = pos.y + 0.4, z = pos.z + 0.4 }, + minvel = { x = 0, y = 0.2, z = 0 }, + maxvel = { x = 0, y = 0.4, z = 0 }, + minacc = { x = 0, y = 0, z = 0 }, + maxacc = { x = 0, y = 0.2, z = 0 }, + minexptime = 3, + maxexptime = 5, + minsize = 1, + maxsize = 2, + collisiondetection = false, + texture = "crops_wither.png", + vertical = true, + }) + elseif flag == 1 then + -- soak (1) + minetest.add_particlespawner({ + amount = 8 * crops.settings.interval, + time = crops.settings.interval, + minpos = { x = pos.x - 0.4, y = pos.y - 0.4, z = pos.z - 0.4 }, + maxpos = { x = pos.x + 0.4, y = pos.y - 0.4, z = pos.z + 0.4 }, + minvel = { x = -0.04, y = 0, z = -0.04 }, + maxvel = { x = 0.04, y = 0, z = 0.04 }, + minacc = { x = 0, y = 0, z = 0 }, + maxacc = { x = 0, y = 0, z = 0 }, + minexptime = 3, + maxexptime = 5, + minsize = 1, + maxsize = 2, + collisiondetection = false, + texture = "crops_soak.png", + vertical = false, + }) + elseif flag == 2 then + -- watering (2) + minetest.add_particlespawner({ + amount = 30, + time = 3, + minpos = { x = pos.x - 0.4, y = pos.y - 0.4, z = pos.z - 0.4 }, + maxpos = { x = pos.x + 0.4, y = pos.y + 0.4, z = pos.z + 0.4 }, + minvel = { x = 0, y = 0.0, z = 0 }, + maxvel = { x = 0, y = 0.0, z = 0 }, + minacc = { x = 0, y = -9.81, z = 0 }, + maxacc = { x = 0, y = -9.81, z = 0 }, + minexptime = 2, + maxexptime = 2, + minsize = 1, + maxsize = 3, + collisiondetection = false, + texture = "crops_watering.png", + vertical = true, + }) + else + -- withered/rotting (3) + minetest.add_particlespawner({ + amount = 20, + time = 30, + minpos = { x = pos.x + 0.3, y = pos.y - 0.5, z = pos.z - 0.5 }, + maxpos = { x = pos.x + 0.5, y = pos.y + 0.5, z = pos.z + 0.5 }, + minvel = { x = -0.6, y = -0.1, z = -0.2 }, + maxvel = { x = -0.4, y = 0.1, z = 0.2 }, + minacc = { x = 0.4, y = 0, z = -0.1 }, + maxacc = { x = 0.5, y = 0, z = 0.1 }, + minexptime = 2, + maxexptime = 4, + minsize = 1, + maxsize = 1, + collisiondetection = false, + texture = "crops_flies.png", + vertical = true, + }) + minetest.add_particlespawner({ + amount = 20, + time = 30, + minpos = { x = pos.x - 0.3, y = pos.y - 0.5, z = pos.z - 0.5 }, + maxpos = { x = pos.x - 0.5, y = pos.y + 0.5, z = pos.z + 0.5 }, + minvel = { x = 0.6, y = -0.1, z = -0.2 }, + maxvel = { x = 0.4, y = 0.1, z = 0.2 }, + minacc = { x = -0.4, y = 0, z = -0.1 }, + maxacc = { x = -0.5, y = 0, z = 0.1 }, + minexptime = 2, + maxexptime = 4, + minsize = 1, + maxsize = 1, + collisiondetection = false, + texture = "crops_flies.png", + vertical = true, + }) + minetest.add_particlespawner({ + amount = 20, + time = 30, + minpos = { x = pos.x - 0.5, y = pos.y - 0.5, z = pos.z + 0.3 }, + maxpos = { x = pos.x + 0.5, y = pos.y + 0.5, z = pos.z + 0.5 }, + minvel = { z = -0.6, y = -0.1, x = -0.2 }, + maxvel = { z = -0.4, y = 0.1, x = 0.2 }, + minacc = { z = 0.4, y = 0, x = -0.1 }, + maxacc = { z = 0.5, y = 0, x = 0.1 }, + minexptime = 2, + maxexptime = 4, + minsize = 1, + maxsize = 1, + collisiondetection = false, + texture = "crops_flies.png", + vertical = true, + }) + minetest.add_particlespawner({ + amount = 20, + time = 30, + minpos = { x = pos.x - 0.5, y = pos.y - 0.5, z = pos.z - 0.3 }, + maxpos = { x = pos.x + 0.5, y = pos.y + 0.5, z = pos.z - 0.5 }, + minvel = { z = 0.6, y = -0.1, x = -0.2 }, + maxvel = { z = 0.4, y = 0.1, x = 0.2 }, + minacc = { z = -0.4, y = 0, x = -0.1 }, + maxacc = { z = -0.5, y = 0, x = 0.1 }, + minexptime = 2, + maxexptime = 4, + minsize = 1, + maxsize = 1, + collisiondetection = false, + texture = "crops_flies.png", + vertical = true, + }) + end +end + +crops.die = function(pos) + crops.particles(pos, 3) + local node = minetest.get_node(pos) + local plant = find_plant(node) + plant.properties.die(pos) + minetest.sound_play("crops_flies", {pos=pos, gain=0.8}) +end + +if crops.settings.hydration then + dofile(modpath .. "/tools.lua") +end + +-- crop nodes, crafts, craftitems +dofile(modpath .. "/melon.lua") +dofile(modpath .. "/pumpkin.lua") +dofile(modpath .. "/corn.lua") +dofile(modpath .. "/tomato.lua") +dofile(modpath .. "/potato.lua") +dofile(modpath .. "/polebean.lua") + +local nodenames = {} +for i = 1,table.getn(crops.plants) do + table.insert(nodenames, crops.plants[i].name) +end + +-- water handling code +if crops.settings.hydration then + minetest.register_abm({ + nodenames = nodenames, + interval = crops.settings.damage_interval, + chance = crops.settings.damage_chance, + action = function(pos, node, active_object_count, active_object_count_wider) + local meta = minetest.get_meta(pos) + local water = meta:get_int("crops_water") + local damage = meta:get_int("crops_damage") + + -- get plant specific data + local plant = find_plant(node) + if plant == nil then + return + end + + -- increase water for nearby water sources + local f = minetest.find_node_near(pos, 1, {"default:water_source", "default:water_flowing"}) + if not f == nil then + water = math.min(100, water + 2) + else + f = minetest.find_node_near(pos, 2, {"default:water_source", "default:water_flowing"}) + if not f == nil then + water = math.min(100, water + 1) + end + end + + if minetest.get_node_light(pos, nil) < plant.properties.night then + -- compensate for light: at night give some water back to the plant + water = math.min(100, water + 1) + else + -- dry out the plant + water = math.max(1, water - plant.properties.wateruse) + end + + meta:set_int("crops_water", water) + + -- for convenience, copy water attribute to top half + if not plant.properties.doublesize == nil and plant.properties.doublesize then + local above = { x = pos.x, y = pos.y + 1, z = pos.z} + local abovemeta = minetest.get_meta(above) + abovemeta:set_int("crops_water", water) + end + + if water <= plant.properties.wither_damage then + crops.particles(pos, 0) + damage = damage + math.random(crops.settings.damage_tick_min, crops.settings.damage_tick_max) + elseif water <= plant.properties.wither then + crops.particles(pos, 0) + return + elseif water >= plant.properties.soak_damage then + crops.particles(pos, 1) + damage = damage + math.random(crops.settings.damage_tick_min, crops.settings.damage_tick_max) + elseif water >= plant.properties.soak then + crops.particles(pos, 1) + return + end + meta:set_int("crops_damage", math.min(crops.settings.damage_max, damage)) + + -- is it dead? + if damage >= 100 then + crops.die(pos) + end + end + }) +end + +-- cooking recipes that mix craftitems +dofile(modpath .. "/cooking.lua") +dofile(modpath .. "/mapgen.lua") + +minetest.log("action", "[crops] "..S("Loaded!")) diff --git a/mods/crops/intllib.lua b/mods/crops/intllib.lua new file mode 100644 index 0000000..c7af2c2 --- /dev/null +++ b/mods/crops/intllib.lua @@ -0,0 +1,44 @@ +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/crops/locale/de.po b/mods/crops/locale/de.po new file mode 100644 index 0000000..f533cb0 --- /dev/null +++ b/mods/crops/locale/de.po @@ -0,0 +1,152 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-30 08:37+0200\n" +"PO-Revision-Date: 2017-02-20 16:54-0300\n" +"Last-Translator: LNJ2\n" +"Language-Team: German\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Ungebackene Lehmschale" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Lehmschale" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Schale voll Gemseeintopf" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Schale voll mit roher Gemseeintopf" + +#: corn.lua +msgid "Corn" +msgstr "Mais" + +#: corn.lua +msgid "Corn Cob" +msgstr "Maiskolben" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Gebackener Maiskolben" + +#: corn.lua +msgid "Corn plant" +msgstr "Maispflanze" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Benutze standard Schwierigkeitsgrad \"normal\"" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Hydrierungs- und Dehydrierungsmechaniken sind aktiviert." + +#: init.lua +#, fuzzy +msgid "Unable to find plant \"@1\" in crops table" +msgstr "Konnte Pflanze \"@1\" nicht in der Tabelle finden" + +#: init.lua +msgid "Loaded!" +msgstr "" + +#: melon.lua +msgid "Melon seed" +msgstr "Melonensamen" + +#: melon.lua +msgid "Melon plant" +msgstr "Melonenpflanze" + +#: melon.lua +msgid "Melon slice" +msgstr "Melonenscheibe" + +#: melon.lua +msgid "Melon" +msgstr "Melone" + +#: polebean.lua +msgid "Green Bean" +msgstr "Grne Bohne" + +#: polebean.lua +msgid "Beanpoles" +msgstr "Bohnenstangen" + +#: polebean.lua +msgid "Green bean seed" +msgstr "Samen einer Grnen Bohne" + +#: polebean.lua +msgid "Green Bean plant" +msgstr "Grne Bohnenpflanze" + +#: potato.lua +msgid "Potato eyes" +msgstr "Kartoffelaugen" + +#: potato.lua +msgid "Potato plant" +msgstr "Kartoffelpflanze" + +#: potato.lua +msgid "Potato" +msgstr "Kartoffel" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Acker mit Kartoffeln" + +#: pumpkin.lua +msgid "Pumpkin seed" +msgstr "Krbissamen" + +#: pumpkin.lua +msgid "Pumpkin plant" +msgstr "Krbispflanze" + +#: pumpkin.lua +msgid "Roasted pumpkin" +msgstr "Gersteter Krbis" + +#: pumpkin.lua +msgid "Pumpkin" +msgstr "Krbis" + +#: tomato.lua +msgid "Tomato seed" +msgstr "Tomatensamen" + +#: tomato.lua +msgid "Tomato plant" +msgstr "Tomatenpflanze" + +#: tomato.lua +msgid "Tomato" +msgstr "Tomate" + +#: tools.lua +msgid "Watering Can" +msgstr "Giekanne" + +#: tools.lua +msgid "Hydrometer" +msgstr "Hydrometer" diff --git a/mods/crops/locale/es.po b/mods/crops/locale/es.po new file mode 100644 index 0000000..721c889 --- /dev/null +++ b/mods/crops/locale/es.po @@ -0,0 +1,151 @@ +# Spanish translations for PACKAGE package +# Traducciones al español para el paquete PACKAGE. +# Copyright (C) 2017 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Diego Martínez , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-30 08:37+0200\n" +"PO-Revision-Date: 2017-02-20 16:54-0300\n" +"Last-Translator: Diego Martínez \n" +"Language-Team: Spanish\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Tazón de arcilla sin cocer" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Tazón de arcilla" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Tazón de sopa de vegetales" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Tazón de sopa de vegetales sin cocer" + +#: corn.lua +msgid "Corn" +msgstr "Maíz" + +#: corn.lua +msgid "Corn Cob" +msgstr "Elote" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Mazorca de maíz" + +#: corn.lua +msgid "Corn plant" +msgstr "Planta de maíz" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Se usará la dificultad \"normal\" por defecto" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Mecánica de hidratación y deshidratación activada." + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "No se pudo encontrar la planta \"@1\" en la tabla de cosechas" + +#: init.lua +msgid "Loaded!" +msgstr "¡Cargado!" + +#: melon.lua +msgid "Melon seed" +msgstr "Semilla de sandía" + +#: melon.lua +msgid "Melon plant" +msgstr "Planta de sandía" + +#: melon.lua +msgid "Melon slice" +msgstr "Trozo de sandía" + +#: melon.lua +msgid "Melon" +msgstr "Sandía" + +#: polebean.lua +msgid "Green Bean" +msgstr "Judía" + +#: polebean.lua +msgid "Beanpoles" +msgstr "Poste para judías" + +#: polebean.lua +msgid "Green bean seed" +msgstr "Semilla de judía" + +#: polebean.lua +msgid "Green Bean plant" +msgstr "Planta de judías" + +#: potato.lua +msgid "Potato eyes" +msgstr "Ojos de patata" + +#: potato.lua +msgid "Potato plant" +msgstr "Planta de patata" + +#: potato.lua +msgid "Potato" +msgstr "Patata" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Suelo con patatas" + +#: pumpkin.lua +msgid "Pumpkin seed" +msgstr "Semillas de calabaza" + +#: pumpkin.lua +msgid "Pumpkin plant" +msgstr "Planta de calabaza" + +#: pumpkin.lua +msgid "Roasted pumpkin" +msgstr "Calabaza asada" + +#: pumpkin.lua +msgid "Pumpkin" +msgstr "Calabaza" + +#: tomato.lua +msgid "Tomato seed" +msgstr "Semilla de tomate" + +#: tomato.lua +msgid "Tomato plant" +msgstr "Planta de tomate" + +#: tomato.lua +msgid "Tomato" +msgstr "Tomate" + +#: tools.lua +msgid "Watering Can" +msgstr "Regadera" + +#: tools.lua +msgid "Hydrometer" +msgstr "Hidrómetro" diff --git a/mods/crops/locale/fr.po b/mods/crops/locale/fr.po new file mode 100644 index 0000000..04cfc13 --- /dev/null +++ b/mods/crops/locale/fr.po @@ -0,0 +1,151 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-30 08:37+0200\n" +"PO-Revision-Date: 2017-04-30 08:48+0200\n" +"Last-Translator: fat115 \n" +"Language-Team: French\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.12\n" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Bol en argile crue" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Bol en terre cuite" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Bol de soupe de légumes" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Bol de soupe de légumes non-cuite" + +#: corn.lua +msgid "Corn" +msgstr "Maïs" + +#: corn.lua +msgid "Corn Cob" +msgstr "Épi de maïs" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Épi de maïs grillé" + +#: corn.lua +msgid "Corn plant" +msgstr "Plant de Maïs" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Réglage par défaut : \"normal\"" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Les mécanismes d'hydratation et de déshydratation sont activés." + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "Impossible de trouver la plante \"@1\" dans le tableau crops" + +#: init.lua +msgid "Loaded!" +msgstr "Chargé !" + +#: melon.lua +msgid "Melon seed" +msgstr "Graine de Pastèque" + +#: melon.lua +msgid "Melon plant" +msgstr "Pied de Pastèque" + +#: melon.lua +msgid "Melon slice" +msgstr "Tranche de Pastèque" + +#: melon.lua +msgid "Melon" +msgstr "Pastèque" + +#: polebean.lua +msgid "Green Bean" +msgstr "Haricot vert" + +#: polebean.lua +msgid "Beanpoles" +msgstr "Tuteur pour haricots" + +#: polebean.lua +msgid "Green bean seed" +msgstr "Graine de haricot vert" + +#: polebean.lua +msgid "Green Bean plant" +msgstr "Plant de haricot vert" + +#: potato.lua +msgid "Potato eyes" +msgstr "Yeux de pomme de terre" + +#: potato.lua +msgid "Potato plant" +msgstr "Plant de pomme de terre" + +#: potato.lua +msgid "Potato" +msgstr "Pomme de terre" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Terre labourée avec pommes de terres" + +#: pumpkin.lua +msgid "Pumpkin seed" +msgstr "Graines de citrouille" + +#: pumpkin.lua +msgid "Pumpkin plant" +msgstr "Plant de citrouille" + +#: pumpkin.lua +msgid "Roasted pumpkin" +msgstr "Citrouille grillée" + +#: pumpkin.lua +msgid "Pumpkin" +msgstr "Citrouille" + +#: tomato.lua +msgid "Tomato seed" +msgstr "Graines de tomate" + +#: tomato.lua +msgid "Tomato plant" +msgstr "Pied de tomate" + +#: tomato.lua +msgid "Tomato" +msgstr "Tomate" + +#: tools.lua +msgid "Watering Can" +msgstr "Arrosoir" + +#: tools.lua +msgid "Hydrometer" +msgstr "Hydromètre" diff --git a/mods/crops/locale/it.po b/mods/crops/locale/it.po new file mode 100644 index 0000000..c82e973 --- /dev/null +++ b/mods/crops/locale/it.po @@ -0,0 +1,151 @@ +# ITALIAN LOCALE FOR THE CROPS MODULE +# Copyright (C) 2017 Auke Kok +# This file is distributed under the same license as the CROPS package. +# Hamlet , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: crops module's Italian translation\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-20 17:17-0300\n" +"PO-Revision-Date: 2017-08-17 22:03+0100\n" +"Last-Translator: H4mlet \n" +"Language-Team: ITALIANO\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.6.10\n" + +#: melon.lua +msgid "Melon seed" +msgstr "Seme di anguria" + +#: melon.lua +msgid "Melon plant" +msgstr "Pianta di anguria" + +#: melon.lua +msgid "Melon slice" +msgstr "Fetta di anguria" + +#: melon.lua +msgid "Melon" +msgstr "Anguria" + +#: tomato.lua +msgid "Tomato seed" +msgstr "Seme di pomodoro" + +#: tomato.lua +msgid "Tomato plant" +msgstr "Pianta di pomodoro" + +#: tomato.lua +msgid "Tomato" +msgstr "Pomodoro" + +#: polebean.lua +msgid "Green Bean" +msgstr "Fagiolo verde" + +#: polebean.lua +msgid "Beanpoles" +msgstr "Palo per fagioli" + +#: polebean.lua +msgid "Green bean seed" +msgstr "Seme di fagiolo verde" + +#: polebean.lua +msgid "Green Bean plant" +msgstr "Pianta di fagiolo verde" + +#: tools.lua +msgid "Watering Can" +msgstr "Innaffiatoio" + +#: tools.lua +msgid "Hydrometer" +msgstr "Idrometro" + +#: pumpkin.lua +msgid "Pumpkin seed" +msgstr "Seme di zucca" + +#: pumpkin.lua +msgid "Pumpkin plant" +msgstr "Pianta di zucca" + +#: pumpkin.lua +msgid "Roasted pumpkin" +msgstr "Zucca arrostita" + +#: pumpkin.lua +msgid "Pumpkin" +msgstr "Zucca" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Utilizzo delle impostazioni di difficoltà \"normal\"" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Le meccaniche di idratazione e disidratazione sono abilitate." + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "Impossibile trovare la pianta \"@1\" nella tabella delle messi" + +#: init.lua +msgid "Loaded!" +msgstr "Caricato!" + +#: potato.lua +msgid "Potato eyes" +msgstr "Germogli di patata" + +#: potato.lua +msgid "Potato plant" +msgstr "Pianta di patata" + +#: potato.lua +msgid "Potato" +msgstr "Patata" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Terreno con patate" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Ciotola di argilla cruda" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Ciotola di argilla" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Ciotola di stufato vegetale" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Ciotola di stufato vegetale crudo" + +#: corn.lua +msgid "Corn" +msgstr "Granoturco" + +#: corn.lua +msgid "Corn Cob" +msgstr "Pannocchia" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Pannocchia arrostita" + +#: corn.lua +msgid "Corn plant" +msgstr "Pianta di granoturco" diff --git a/mods/crops/locale/pt.po b/mods/crops/locale/pt.po new file mode 100644 index 0000000..ecfe6d4 --- /dev/null +++ b/mods/crops/locale/pt.po @@ -0,0 +1,150 @@ +# Portuguese translation for Crops mod. +# Copyright (C) 2017 +# This file is distributed under the same license as the PACKAGE package. +# BrunoMine , 2017. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-20 17:17-0300\n" +"PO-Revision-Date: 2017-08-17 17:54-0300\n" +"Last-Translator: BrunoMine \n" +"Language-Team: \n" +"Language: Portuguese\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Gtranslator 2.91.7\n" + +#: melon.lua +msgid "Melon seed" +msgstr "Semente de Melancia" + +#: melon.lua +msgid "Melon plant" +msgstr "Planta de Melancia" + +#: melon.lua +msgid "Melon slice" +msgstr "Pedaço de Melancia" + +#: melon.lua +msgid "Melon" +msgstr "Melancia" + +#: tomato.lua +msgid "Tomato seed" +msgstr "Semente de Tomate" + +#: tomato.lua +msgid "Tomato plant" +msgstr "Planta de Tomate" + +#: tomato.lua +msgid "Tomato" +msgstr "Tomate" + +#: polebean.lua +msgid "Green Bean" +msgstr "Feijao Verde" + +#: polebean.lua +msgid "Beanpoles" +msgstr "Apoio de Feijao" + +#: polebean.lua +msgid "Green bean seed" +msgstr "Semente de Feijao Verde" + +#: polebean.lua +msgid "Green Bean plant" +msgstr "Planta de Feijao Verde" + +#: tools.lua +msgid "Watering Can" +msgstr "Regador" + +#: tools.lua +msgid "Hydrometer" +msgstr "Hydrometro" + +#: pumpkin.lua +msgid "Pumpkin seed" +msgstr "Semente de Abobora" + +#: pumpkin.lua +msgid "Pumpkin plant" +msgstr "Planta de Abobora" + +#: pumpkin.lua +msgid "Roasted pumpkin" +msgstr "Abobora Assada" + +#: pumpkin.lua +msgid "Pumpkin" +msgstr "Abobora" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "Padrao para configuraçoes de dificuldade \"normal\"" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "Mecanica de hidrataçao e desidrataçao esta habilitada." + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "Impossivel encontrar a planta \"@1\" na tabela de culturas" + +#: init.lua +msgid "Loaded!" +msgstr "Carregado!" + +#: potato.lua +msgid "Potato eyes" +msgstr "Raizes de Batata" + +#: potato.lua +msgid "Potato plant" +msgstr "Planta de Batata" + +#: potato.lua +msgid "Potato" +msgstr "Batata" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "Solo com Batatas" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "Tigela de Barro Fresco" + +#: cooking.lua +msgid "Clay bowl" +msgstr "Tigela de Barro" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "Tigela de Ensopado de Vegetais" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "Tigela de Vegetais Crus" + +#: corn.lua +msgid "Corn" +msgstr "Milho" + +#: corn.lua +msgid "Corn Cob" +msgstr "Espiga de Milho" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "Milho na Espiga" + +#: corn.lua +msgid "Corn plant" +msgstr "Planta de Milho" diff --git a/mods/crops/locale/template.pot b/mods/crops/locale/template.pot new file mode 100644 index 0000000..d8eb19c --- /dev/null +++ b/mods/crops/locale/template.pot @@ -0,0 +1,150 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-30 08:37+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: cooking.lua +msgid "Unbaked clay bowl" +msgstr "" + +#: cooking.lua +msgid "Clay bowl" +msgstr "" + +#: cooking.lua +msgid "Bowl of vegetable stew" +msgstr "" + +#: cooking.lua +msgid "Bowl of uncooked vegetable stew" +msgstr "" + +#: corn.lua +msgid "Corn" +msgstr "" + +#: corn.lua +msgid "Corn Cob" +msgstr "" + +#: corn.lua +msgid "Corn on the Cob" +msgstr "" + +#: corn.lua +msgid "Corn plant" +msgstr "" + +#: init.lua +msgid "Defaulting to \"normal\" difficulty settings" +msgstr "" + +#: init.lua +msgid "Hydration and dehydration mechanics are enabled." +msgstr "" + +#: init.lua +msgid "Unable to find plant \"@1\" in crops table" +msgstr "" + +#: init.lua +msgid "Loaded!" +msgstr "" + +#: melon.lua +msgid "Melon seed" +msgstr "" + +#: melon.lua +msgid "Melon plant" +msgstr "" + +#: melon.lua +msgid "Melon slice" +msgstr "" + +#: melon.lua +msgid "Melon" +msgstr "" + +#: polebean.lua +msgid "Green Bean" +msgstr "" + +#: polebean.lua +msgid "Beanpoles" +msgstr "" + +#: polebean.lua +msgid "Green bean seed" +msgstr "" + +#: polebean.lua +msgid "Green Bean plant" +msgstr "" + +#: potato.lua +msgid "Potato eyes" +msgstr "" + +#: potato.lua +msgid "Potato plant" +msgstr "" + +#: potato.lua +msgid "Potato" +msgstr "" + +#: potato.lua +msgid "Soil with potatoes" +msgstr "" + +#: pumpkin.lua +msgid "Pumpkin seed" +msgstr "" + +#: pumpkin.lua +msgid "Pumpkin plant" +msgstr "" + +#: pumpkin.lua +msgid "Roasted pumpkin" +msgstr "" + +#: pumpkin.lua +msgid "Pumpkin" +msgstr "" + +#: tomato.lua +msgid "Tomato seed" +msgstr "" + +#: tomato.lua +msgid "Tomato plant" +msgstr "" + +#: tomato.lua +msgid "Tomato" +msgstr "" + +#: tools.lua +msgid "Watering Can" +msgstr "" + +#: tools.lua +msgid "Hydrometer" +msgstr "" diff --git a/mods/crops/mapgen.lua b/mods/crops/mapgen.lua new file mode 100644 index 0000000..24607ad --- /dev/null +++ b/mods/crops/mapgen.lua @@ -0,0 +1,48 @@ + +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name ~= "v6" and mg_name ~= "singlenode" then + minetest.register_decoration({ + deco_type = "simple", + place_on = { "default:dirt_with_grass" }, + sidelen = 16, + noise_params = { + offset = -0.02, + scale = 0.02, + spread = {x = 200, y = 200, z = 200}, + seed = 90459126, + octaves = 3, + persist = 0.6 + }, + biomes = {"grassland", "deciduous_forest", "coniferous_forest"}, + y_min = 1, + y_max = 31000, + decoration = "crops:melon_plant_4" + }) + minetest.register_decoration({ + deco_type = "simple", + place_on = { "default:dirt_with_grass" }, + sidelen = 16, + noise_params = { + offset = -0.02, + scale = 0.02, + spread = {x = 200, y = 200, z = 200}, + seed = 26294592, + octaves = 3, + persist = 0.6 + }, + biomes = {"deciduous_forest", "coniferous_forest", "tundra"}, + y_min = 1, + y_max = 31000, + decoration = "crops:pumpkin_plant_4" + }) +end + +-- drop potatoes when digging in dirt +minetest.override_item("default:dirt_with_grass", { + drop = { + items = { + { items = {'default:dirt'}}, + { items = {'crops:potato'}, rarity = 500 } + } + } +}) diff --git a/mods/crops/melon.lua b/mods/crops/melon.lua new file mode 100644 index 0000000..696b108 --- /dev/null +++ b/mods/crops/melon.lua @@ -0,0 +1,249 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +local faces = { + [1] = { x = -1, z = 0, r = 3, o = 1, m = 14 }, + [2] = { x = 1, z = 0, r = 1, o = 3, m = 16 }, + [3] = { x = 0, z = -1, r = 2, o = 0, m = 5 }, + [4] = { x = 0, z = 1, r = 0, o = 2, m = 11 } +} + +minetest.register_node("crops:melon_seed", { + description = S("Melon seed"), + inventory_image = "crops_melon_seed.png", + wield_image = "crops_melon_seed.png", + tiles = { "crops_melon_plant_1.png" }, + drawtype = "plantlike", + waving = 1, + sunlight_propagates = false, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + node_placement_prediction = "crops:melon_plant_1", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:melon_plant_1"}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +for stage = 1, 6 do +minetest.register_node("crops:melon_plant_" .. stage , { + description = S("Melon plant"), + tiles = { "crops_melon_plant_" .. stage .. ".png" }, + drawtype = "plantlike", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = "crops:melon_seed", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + (((math.min(stage, 4)) + 1) / 5), 0.5} + } +}) +end + +minetest.register_node("crops:melon_plant_5_attached", { + visual = "mesh", + mesh = "crops_plant_extra_face.obj", + description = S("Melon plant"), + tiles = { "crops_melon_stem.png", "crops_melon_plant_4.png" }, + drawtype = "mesh", + paramtype2 = "facedir", + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = "crops:melon_seed", + sounds = default.node_sound_leaves_defaults(), +}) + + +minetest.register_craftitem("crops:melon_slice", { + description = S("Melon slice"), + inventory_image = "crops_melon_slice.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:melon_seed", + recipe = { "crops:melon_slice" } +}) + +-- +-- the melon "block" +-- +minetest.register_node("crops:melon", { + description = S("Melon"), + tiles = { + "crops_melon_top.png", + "crops_melon_bottom.png", + "crops_melon.png", + }, + sunlight_propagates = false, + use_texture_alpha = false, + walkable = true, + groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 }, + paramtype2 = "facedir", + drop = {}, + sounds = default.node_sound_wood_defaults({ + dig = { name = "default_dig_oddly_breakable_by_hand" }, + dug = { name = "default_dig_choppy" } + }), + on_dig = function(pos, node, digger) + for face = 1, 4 do + local s = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } + local n = minetest.get_node(s) + if n.name == "crops:melon_plant_5_attached" then + -- make sure it was actually attached to this stem + if n.param2 == faces[face].o then + minetest.swap_node(s, { name = "crops:melon_plant_4" }) + end + end + end + local meta = minetest.get_meta(pos) + local damage = meta:get_int("crops_damage") + local drops = {} + -- 0 dmg - 3-5 + -- 50 dmg - 2-3 + -- 100 dmg - 1-1 + for i = 1,math.random(3 - (2 * (damage / 100)), 5 - (4 * (damage / 100))) do + table.insert(drops, ('crops:melon_slice')) + end + core.handle_node_drops(pos, drops, digger) + minetest.remove_node(pos) + end +}) + +-- +-- grows a plant to mature size +-- +minetest.register_abm({ + nodenames = { "crops:melon_plant_1", "crops:melon_plant_2", "crops:melon_plant_3","crops:melon_plant_4" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local n = string.gsub(node.name, "4", "5") + n = string.gsub(n, "3", "4") + n = string.gsub(n, "2", "3") + n = string.gsub(n, "1", "2") + minetest.swap_node(pos, { name = n }) + end +}) + +-- +-- grows a melon +-- +minetest.register_abm({ + nodenames = { "crops:melon_plant_5" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + for face = 1, 4 do + local t = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } + if minetest.get_node(t).name == "crops:melon" then + return + end + end + local r = math.random(1, 4) + local t = { x = pos.x + faces[r].x, y = pos.y, z = pos.z + faces[r].z } + local n = minetest.get_node(t) + if n.name == "ignore" then + return + end + + if minetest.registered_nodes[minetest.get_node({ x = t.x, y = t.y - 1, z = t.z }).name].walkable == false then + return + end + + if minetest.registered_nodes[n.name].drawtype == "plantlike" or + minetest.registered_nodes[n.name].groups.flora == 1 or + n.name == "air" then + minetest.swap_node(pos, {name = "crops:melon_plant_5_attached", param2 = faces[r].r}) + minetest.set_node(t, {name = "crops:melon", param2 = faces[r].m}) + local meta = minetest.get_meta(pos) + local damage = meta:get_int("crops_damage") + local water = meta:get_int("crops_water") + -- growing a melon costs 25 water! + meta:set_int("crops_water", math.max(0, water - 25)) + meta = minetest.get_meta(t) + -- reflect plants' damage in the melon yield + meta:set_int("crops_damage", damage) + end + end +}) + +-- +-- return a melon to a normal one if there is no melon attached, so it can +-- grow a new melon again +-- +minetest.register_abm({ + nodenames = { "crops:melon_plant_5_attached" }, + interval = crops.settings.interval, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + for face = 1, 4 do + local t = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } + if minetest.get_node(t).name == "crops:melon" then + return + end + end + minetest.swap_node(pos, {name = "crops:melon_plant_4" }) + end +}) + +crops.melon_die = function(pos) + minetest.set_node(pos, { name = "crops:melon_plant_6" }) +end + +local properties = { + die = crops.melon_die, + waterstart = 20, + wateruse = 1, + night = 5, + soak = 80, + soak_damage = 90, + wither = 20, + wither_damage = 10, +} + +crops.register({ name = "crops:melon_plant_1", properties = properties }) +crops.register({ name = "crops:melon_plant_2", properties = properties }) +crops.register({ name = "crops:melon_plant_3", properties = properties }) +crops.register({ name = "crops:melon_plant_4", properties = properties }) +crops.register({ name = "crops:melon_plant_5", properties = properties }) +crops.register({ name = "crops:melon_plant_5_attached", properties = properties }) diff --git a/mods/crops/mod.conf b/mods/crops/mod.conf new file mode 100644 index 0000000..7f7691a --- /dev/null +++ b/mods/crops/mod.conf @@ -0,0 +1 @@ +name = crops diff --git a/mods/crops/polebean.lua b/mods/crops/polebean.lua new file mode 100644 index 0000000..afe8fb1 --- /dev/null +++ b/mods/crops/polebean.lua @@ -0,0 +1,309 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +minetest.register_craft({ + output = "crops:beanpoles", + recipe = { + {'', '', ''}, + {'default:stick', '', 'default:stick'}, + {'default:stick', '', 'default:stick'}, + } +}) + +minetest.register_craftitem("crops:green_bean", { + description = S("Green Bean"), + inventory_image = "crops_green_bean.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:green_bean_seed", + recipe = { "crops:green_bean" } +}) + +local function crops_beanpole_on_dig(pos, node, digger) + local bottom + local bottom_n + local top + local top_n + local drops = {} + + if node.name == "crops:beanpole_base" or + node.name == "crops:beanpole_plant_base_1" or + node.name == "crops:beanpole_plant_base_2" or + node.name == "crops:beanpole_plant_base_3" or --grown tall enough for top section + node.name == "crops:beanpole_plant_base_4" or --flowering + node.name == "crops:beanpole_plant_base_5" or --ripe + node.name == "crops:beanpole_plant_base_6" --harvested + then + bottom = pos + bottom_n = node + top = { x = pos.x, y = pos.y + 1, z = pos.z } + top_n = minetest.get_node(top) + elseif node.name == "crops:beanpole_top" or + node.name == "crops:beanpole_plant_top_1" or + node.name == "crops:beanpole_plant_top_2" or --flowering + node.name == "crops:beanpole_plant_top_3" or --ripe + node.name == "crops:beanpole_plant_top_4" --harvested + then + top = pos + top_n = node + bottom = { x = pos.x, y = pos.y - 1, z = pos.z } + bottom_n = minetest.get_node(bottom) + else + -- ouch, this shouldn't happen + print("beanpole on_dig falsely attached to: " .. pos.x .. "," .. pos.y .. "," .. pos.z) + return + end + + if bottom_n.name == "crops:beanpole_base" and top_n.name == "crops:beanpole_top" then + -- bare beanpole + table.insert(drops, "crops:beanpoles") + minetest.remove_node(bottom) + minetest.remove_node(top) + elseif ( + bottom_n.name == "crops:beanpole_plant_base_1" or + bottom_n.name == "crops:beanpole_plant_base_2" or + bottom_n.name == "crops:beanpole_plant_base_3" or + bottom_n.name == "crops:beanpole_plant_base_4" + ) and ( + top_n.name == "crops:beanpole_top" or + top_n.name == "crops:beanpole_plant_top_1" or + top_n.name == "crops:beanpole_plant_top_2" + ) then + -- non-ripe + for i = 1,4 do + table.insert(drops, "default:stick") + end + minetest.set_node(bottom, { name = "crops:beanpole_base"}) + minetest.set_node(top, { name = "crops:beanpole_top"}) + elseif bottom_n.name == "crops:beanpole_plant_base_5" and top_n.name == "crops:beanpole_plant_top_3" then + -- ripe beanpole + local meta = minetest.get_meta(bottom) + local damage = meta:get_int("crops_damage") + -- 0 - 3-7 + -- 50 - 2-4 + -- 100 - 1-1 + for i = 1,math.random(3 - (2 * (damage / 100)),7 - (6 * (damage / 100))) do + table.insert(drops, "crops:green_bean") + end + crops.die(bottom) + elseif bottom_n.name == "crops:beanpole_plant_base_6" and top_n.name == "crops:beanpole_plant_top_4" then + -- harvested beans + for i = 1,math.random(3,4) do + table.insert(drops, "default:stick") + end + minetest.remove_node(bottom) + minetest.remove_node(top) + else + -- ouch, this shouldn't happen + print("beanpole on_dig can't handle blocks at to: " .. + bottom.x .. "," .. bottom.y .. "," .. bottom.z .. + " and " .. top.x .. "," .. top.y .. "," .. top.z) + print("removing a " .. node.name .. " at " .. + pos.x .. "," .. pos.y .. "," .. pos.z) + minetest.remove_node(pos) + return + end + + core.handle_node_drops(pos, drops, digger) +end + +minetest.register_node("crops:beanpole_base", { + description = "", + drawtype = "plantlike", + tiles = { "crops_beanpole_base.png" }, + use_texture_alpha = true, + walkable = true, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = crops_beanpole_on_dig, +}) + +minetest.register_node("crops:beanpole_top", { + description = "", + drawtype = "plantlike", + tiles = { "crops_beanpole_top.png" }, + use_texture_alpha = true, + walkable = true, + sunlight_propagates = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = crops_beanpole_on_dig, +}) + +minetest.register_node("crops:beanpoles", { + description = S("Beanpoles"), + inventory_image = "crops_beanpole_top.png", + wield_image = "crops_beanpole_top.png", + tiles = { "crops_beanpole_base.png" }, + drawtype = "plantlike", + sunlight_propagates = true, + use_texture_alpha = true, + paramtype = "light", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + node_placement_prediction = "crops:beanpole_base", + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + local top = { x = pointed_thing.above.x, y = pointed_thing.above.y + 1, z = pointed_thing.above.z } + if not minetest.get_node(top).name == "air" then + return + end + minetest.set_node(pointed_thing.above, {name="crops:beanpole_base"}) + minetest.set_node(top, {name="crops:beanpole_top"}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +minetest.register_craftitem("crops:green_bean_seed", { + description = S("Green bean seed"), + inventory_image = "crops_green_bean_seed.png", + wield_image = "crops_green_bean_seed.png", + node_placement_prediction = "", -- disabled, prediction assumes pointed_think.above! + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if under.name == "crops:beanpole_base" then + crops.plant(pointed_thing.under, {name="crops:beanpole_plant_base_1"}) + local above = { x = pointed_thing.under.x, y = pointed_thing.under.y + 1, z = pointed_thing.under.z} + local meta = minetest.get_meta(above) + meta:set_int("crops_top_half", 1) + elseif under.name == "crops:beanpole_top" then + local below = { x = pointed_thing.under.x, y = pointed_thing.under.y - 1, z = pointed_thing.under.z } + if minetest.get_node(below).name == "crops:beanpole_base" then + crops.plant(below, {name="crops:beanpole_plant_base_1"}) + local meta = minetest.get_meta(pointed_thing.under) + meta:set_int("crops_top_half", 1) + else + return + end + else + return + end + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +for stage = 1,6 do +minetest.register_node("crops:beanpole_plant_base_" .. stage, { + description = S("Green Bean plant"), + tiles = { "crops_beanpole_plant_base_" .. stage .. ".png" }, + drawtype = "plantlike", + sunlight_propagates = true, + use_texture_alpha = true, + paramtype = "light", + walkable = false, + groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = crops_beanpole_on_dig +}) +end + +for stage = 1,4 do +minetest.register_node("crops:beanpole_plant_top_" .. stage, { + description = S("Green Bean plant"), + tiles = { "crops_beanpole_plant_top_" .. stage .. ".png" }, + drawtype = "plantlike", + sunlight_propagates = true, + use_texture_alpha = true, + paramtype = "light", + walkable = true, + groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + on_dig = crops_beanpole_on_dig +}) +end + +minetest.register_abm({ + nodenames = { + "crops:beanpole_plant_base_1", + "crops:beanpole_plant_base_2", + "crops:beanpole_plant_base_3", + "crops:beanpole_plant_base_4" + }, + interval = crops.settings.interval, + chance = crops.settings.chance, + neighbors = { "group:soil" }, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + if node.name == "crops:beanpole_plant_base_1" then + minetest.swap_node(pos, { name = "crops:beanpole_plant_base_2"}) + elseif node.name == "crops:beanpole_plant_base_2" then + minetest.swap_node(pos, { name = "crops:beanpole_plant_base_3"}) + elseif node.name == "crops:beanpole_plant_base_3" then + local apos = {x = pos.x, y = pos.y + 1, z = pos.z} + local above = minetest.get_node(apos) + if above.name == "crops:beanpole_top" then + minetest.set_node(apos, { name = "crops:beanpole_plant_top_1" }) + local meta = minetest.get_meta(apos) + meta:set_int("crops_top_half", 1) + elseif above.name == "crops:beanpole_plant_top_1" then + minetest.swap_node(pos, { name = "crops:beanpole_plant_base_4" }) + minetest.swap_node(apos, { name = "crops:beanpole_plant_top_2" }) + end + elseif node.name == "crops:beanpole_plant_base_4" then + local apos = {x = pos.x, y = pos.y + 1, z = pos.z} + minetest.swap_node(pos, { name = "crops:beanpole_plant_base_5" }) + minetest.swap_node(apos, { name = "crops:beanpole_plant_top_3" }) + end + end +}) + +crops.beanpole_die = function(pos) + minetest.set_node(pos, { name = "crops:beanpole_plant_base_6" }) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + minetest.set_node(above, { name = "crops:beanpole_plant_top_4" }) +end + +local properties = { + die = crops.beanpole_die, + waterstart = 30, + wateruse = 1, + night = 5, + soak = 60, + soak_damage = 75, + wither = 25, + wither_damage = 15, + doublesize = true, +} + +crops.register({ name = "crops:beanpole_plant_base_1", properties = properties }) +crops.register({ name = "crops:beanpole_plant_base_2", properties = properties }) +crops.register({ name = "crops:beanpole_plant_base_3", properties = properties }) +crops.register({ name = "crops:beanpole_plant_base_4", properties = properties }) +crops.register({ name = "crops:beanpole_plant_base_5", properties = properties }) + diff --git a/mods/crops/potato.lua b/mods/crops/potato.lua new file mode 100644 index 0000000..6f5130a --- /dev/null +++ b/mods/crops/potato.lua @@ -0,0 +1,196 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +minetest.register_node("crops:potato_eyes", { + description = S("Potato eyes"), + inventory_image = "crops_potato_eyes.png", + wield_image = "crops_potato_eyes.png", + tiles = { "crops_potato_plant_1.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = false, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + node_placement_prediction = "crops:potato_plant_1", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, -0.4, 0.45} + }, + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:potato_plant_1", param2 = 3}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +for stage = 1, 5 do +minetest.register_node("crops:potato_plant_" .. stage , { + description = S("Potato plant"), + tiles = { "crops_potato_plant_" .. stage .. ".png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45} + } +}) +end + +minetest.register_craftitem("crops:potato", { + description = S("Potato"), + inventory_image = "crops_potato.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:potato_eyes", + recipe = { "crops:potato" } +}) + +-- +-- the potatoes "block" +-- +minetest.register_node("crops:soil_with_potatoes", { + description = S("Soil with potatoes"), + tiles = { "default_dirt.png^crops_potato_soil.png", "default_dirt.png" }, + sunlight_propagates = false, + use_texture_alpha = false, + walkable = true, + groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2, soil=1 }, + paramtype2 = "facedir", + drop = {max_items = 5, items = { + { items = {'crops:potato'}, rarity = 1 }, + { items = {'crops:potato'}, rarity = 1 }, + { items = {'crops:potato'}, rarity = 1 }, + { items = {'crops:potato'}, rarity = 2 }, + { items = {'crops:potato'}, rarity = 5 }, + }}, + sounds = default.node_sound_dirt_defaults(), + on_dig = function(pos, node, digger) + local drops = {} + -- damage 0 = drops 3-5 + -- damage 50 = drops 1-3 + -- damage 100 = drops 0-1 + local meta = minetest.get_meta(pos) + local damage = meta:get_int("crops_damage") + for i = 1, math.random(3 - (3 * damage / 100), 5 - (4 * (damage / 100))) do + table.insert(drops, "crops:potato") + end + core.handle_node_drops(pos, drops, digger) + minetest.set_node(pos, { name = "farming:soil" }) + local above = { x = pos.x, y = pos.y + 1, z = pos.z } + if minetest.get_node(above).name == "crops:potato_plant_4" then + minetest.set_node(above, { name = "air" }) + end + end +}) + +-- +-- grows a plant to mature size +-- +minetest.register_abm({ + nodenames = { "crops:potato_plant_1", "crops:potato_plant_2", "crops:potato_plant_3" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local below = { x = pos.x, y = pos.y - 1, z = pos.z } + if not minetest.registered_nodes[minetest.get_node(below).name].groups.soil then + return + end + local meta = minetest.get_meta(pos) + local damage = meta:get_int("crops_damage") + if damage == 100 then + crops.die(pos) + return + end + local n = string.gsub(node.name, "3", "4") + n = string.gsub(n, "2", "3") + n = string.gsub(n, "1", "2") + minetest.swap_node(pos, { name = n, param2 = 3 }) + end +}) + +-- +-- grows the final potatoes in the soil beneath +-- +minetest.register_abm({ + nodenames = { "crops:potato_plant_4" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local below = { x = pos.x, y = pos.y - 1, z = pos.z } + if not minetest.registered_nodes[minetest.get_node(below).name].groups.soil then + return + end + local meta = minetest.get_meta(pos) + local damage = meta:get_int("crops_damage") + minetest.set_node(below, { name = "crops:soil_with_potatoes" }) + meta = minetest.get_meta(below) + meta:set_int("crops_damage", damage) + end +}) + +crops.potato_die = function(pos) + minetest.set_node(pos, { name = "crops:potato_plant_5", param2 = 3 }) + local below = { x = pos.x, y = pos.y - 1, z = pos.z } + local node = minetest.get_node(below) + if node.name == "crops:soil_with_potatoes" then + local meta = minetest.get_meta(below) + meta:set_int("crops_damage", 100) + end +end + +local properties = { + die = crops.potato_die, + waterstart = 30, + wateruse = 1, + night = 5, + soak = 80, + soak_damage = 90, + wither = 20, + wither_damage = 10, +} + +crops.register({ name = "crops:potato_plant_1", properties = properties }) +crops.register({ name = "crops:potato_plant_2", properties = properties }) +crops.register({ name = "crops:potato_plant_3", properties = properties }) +crops.register({ name = "crops:potato_plant_4", properties = properties }) diff --git a/mods/crops/pumpkin.lua b/mods/crops/pumpkin.lua new file mode 100644 index 0000000..a64757d --- /dev/null +++ b/mods/crops/pumpkin.lua @@ -0,0 +1,260 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +local faces = { + [1] = { x = -1, z = 0, r = 3, o = 1, m = 14 }, + [2] = { x = 1, z = 0, r = 1, o = 3, m = 16 }, + [3] = { x = 0, z = -1, r = 2, o = 0, m = 5 }, + [4] = { x = 0, z = 1, r = 0, o = 2, m = 11 } +} + +minetest.register_node("crops:pumpkin_seed", { + description = S("Pumpkin seed"), + inventory_image = "crops_pumpkin_seed.png", + wield_image = "crops_pumpkin_seed.png", + tiles = { "crops_pumpkin_plant_1.png" }, + drawtype = "plantlike", + waving = 1, + sunlight_propagates = false, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + node_placement_prediction = "crops:pumpkin_plant_1", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:pumpkin_plant_1"}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +for stage = 1, 6 do +minetest.register_node("crops:pumpkin_plant_" .. stage , { + description = S("Pumpkin plant"), + tiles = { "crops_pumpkin_plant_" .. stage .. ".png" }, + drawtype = "plantlike", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = "crops:pumpkin_seed", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + (((math.min(stage, 4)) + 1) / 5), 0.5} + } +}) +end + +minetest.register_node("crops:pumpkin_plant_5_attached", { + visual = "mesh", + mesh = "crops_plant_extra_face.obj", + description = S("Pumpkin plant"), + tiles = { "crops_pumpkin_stem.png", "crops_pumpkin_plant_4.png" }, + drawtype = "mesh", + paramtype2 = "facedir", + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = "crops:pumpkin_seed", + sounds = default.node_sound_leaves_defaults(), +}) + + +minetest.register_craftitem("crops:roasted_pumpkin", { + description = S("Roasted pumpkin"), + inventory_image = "crops_roasted_pumpkin.png", + on_use = minetest.item_eat(2) +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:pumpkin_seed", + recipe = { "crops:pumpkin" } +}) + +minetest.register_craft({ + type = "cooking", + output = "crops:roasted_pumpkin", + recipe = "crops:pumpkin" +}) + +-- +-- the pumpkin "block" +-- +minetest.register_node("crops:pumpkin", { + description = S("Pumpkin"), + tiles = { + "crops_pumpkin_top.png", + "crops_pumpkin_bottom.png", + "crops_pumpkin.png" + }, + sunlight_propagates = false, + use_texture_alpha = false, + walkable = true, + groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 }, + paramtype2 = "facedir", + sounds = default.node_sound_wood_defaults({ + dig = { name = "default_dig_oddly_breakable_by_hand" }, + dug = { name = "default_dig_choppy" } + }), + after_dig_node = function(pos, node) + for face = 1, 4 do + local s = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } + local n = minetest.get_node(s) + if n.name == "crops:pumpkin_plant_5_attached" then + -- make sure it was actually attached to this stem + if n.param2 == faces[face].o then + minetest.swap_node(s, { name = "crops:pumpkin_plant_4" }) + end + end + end + end +}) + +-- +-- grows a plant to mature size +-- +minetest.register_abm({ + nodenames = { "crops:pumpkin_plant_1", "crops:pumpkin_plant_2", "crops:pumpkin_plant_3","crops:pumpkin_plant_4" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local n = string.gsub(node.name, "4", "5") + n = string.gsub(n, "3", "4") + n = string.gsub(n, "2", "3") + n = string.gsub(n, "1", "2") + minetest.swap_node(pos, { name = n }) + end +}) + +-- +-- grows a pumpkin +-- +minetest.register_abm({ + nodenames = { "crops:pumpkin_plant_5" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + for face = 1, 4 do + local t = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } + if minetest.get_node(t).name == "crops:pumpkin" then + return + end + end + local r = math.random(1, 4) + local t = { x = pos.x + faces[r].x, y = pos.y, z = pos.z + faces[r].z } + local n = minetest.get_node(t) + if n.name == "ignore" then + return + end + + if minetest.registered_nodes[minetest.get_node({ x = t.x, y = t.y - 1, z = t.z }).name].walkable == false then + return + end + + if minetest.registered_nodes[n.name].drawtype == "plantlike" or + minetest.registered_nodes[n.name].groups.flora == 1 or + n.name == "air" then + minetest.set_node(t, {name = "crops:pumpkin", param2 = faces[r].m}) + + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_pumpkin_ttl") + local damage = meta:get_int("crops_damage") + if ttl == 0 then + -- damage 0 - regrows 3-4 + -- damage 50 - drops 1-2 + -- damage 100 - drops 0-1 + ttl = math.random(3 - (3 * (damage / 100)), 4 - (3 * (damage / 100))) + end + if ttl > 1 then + minetest.swap_node(pos, {name = "crops:pumpkin_plant_5_attached", param2 = faces[r].r}) + meta:set_int("crops_pumpkin_ttl", ttl - 1) + else + crops.die(pos) + end + local water = meta:get_int("crops_water") + -- growing a pumpkin costs 25 water! + meta:set_int("crops_water", math.max(0, water - 25)) + end + end +}) + +-- +-- return a pumpkin to a normal one if there is no pumpkin attached, so it can +-- grow a new pumpkin again +-- +minetest.register_abm({ + nodenames = { "crops:pumpkin_plant_5_attached" }, + interval = crops.settings.interval, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + for face = 1, 4 do + local t = { x = pos.x + faces[face].x, y = pos.y, z = pos.z + faces[face].z } + if minetest.get_node(t).name == "crops:pumpkin" then + return + end + end + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_pumpkin_ttl") + if ttl > 1 then + minetest.swap_node(pos, { name = "crops:pumpkin_plant_4" }) + meta:set_int("crops_pumpkin_ttl", ttl) + else + crops.die(pos) + end + end +}) + +crops.pumpkin_die = function(pos) + minetest.set_node(pos, { name = "crops:pumpkin_plant_6" }) +end + +local properties = { + die = crops.pumpkin_die, + waterstart = 40, + wateruse = 1, + night = 5, + soak = 80, + soak_damage = 90, + wither = 10, + wither_damage = 5, +} + +crops.register({ name = "crops:pumpkin_plant_1", properties = properties }) +crops.register({ name = "crops:pumpkin_plant_2", properties = properties }) +crops.register({ name = "crops:pumpkin_plant_3", properties = properties }) +crops.register({ name = "crops:pumpkin_plant_4", properties = properties }) +crops.register({ name = "crops:pumpkin_plant_5", properties = properties }) +crops.register({ name = "crops:pumpkin_plant_5_attached", properties = properties }) diff --git a/mods/crops/readme.md b/mods/crops/readme.md new file mode 100644 index 0000000..6d62342 --- /dev/null +++ b/mods/crops/readme.md @@ -0,0 +1,162 @@ +## Crops - more farming crops mod for minetest + +Copyright (C) 2015 - Auke Kok + +This minetest mod expands the basic set of farming-related crops that +`minetest_game` offers. A list of crops/crafts is below. + +## Configuration + +A default configuration file, `crops_settings.txt` will be added +to your world folder that contains suggested `easy`, `normal` (the +default) and `difficult` settings for this mod. You can currently tune +the ABM interval/chance, and required light level for plant growth. + +## Hydration mechanic + +This feature is disabled in the `easy` setting. + +Plants need water. Plants need more water when they grow. This mod +implements mechanics of plant hydration and what happens when you +over-water or not water your plants properly: Plants may wither or +soak, and if they wither/soak too much, the plant will get damaged. + +You can see that plants are under stress visually. When a plant +withers, there will be particles that are steam/smoke-like floating +upwards from the plant. When a plant is over-watered, water bubbles +can be seen at the plant base. These are implemented as particles. + +In the default difficulty settings, plants don't accrue enough damage +to kill the plant. But at difficult settings, withering will end up +resulting in plant death, or the loss of crop entirely. At default +settings, plants will yield significantly less harvest if not taken +care of! So if you do decide to not water your plants, make sure you +don't let them sit around for days and harvest them as soon as they +are ripe to limit the effects. + +Environment factors can influence hydration: nearby water, night time +moisture. And of course, the watering can. The watering can holds +20 watering charges, and it takes 3-4 charges to water a plant from +completely dry to maximum wetness. Some plants will want more water, +some will do better with less, so make sure you use a hydrometer to +measure plant humidity. Recipes for the watering can and hydrometer +are listed below. + +## Plants + +1. Melons and pumpkins + +Melon plants grow from melon seeds. Once a plant is mature (there +are 5 stages) it will spawn a melon block adjacent to the plant. +The melon block can be harvested by punching, and yields 3-5 +melon slices. The melon slice can be crafted to a melon seed. + +Pumpkins grow from pumpkin seeds, and are harvested to yield a +pumpkin block. Each block can be cooked to yield one or more +roast pumpkin chunks, which can be eaten. You can also craft +the blocks to seeds. A pumpkin plant will only yield limited amounts +of pumpkins. After a while they automatically wither. + +2. Corn. + +Corn plants are 2 blocks high, and yield corn cobs. These can be +cooked to corn-on-the-cob, or processed to make corn seed (corn +kernels, basically). + +Digging a mature plant yields the corn cob. A harvested corn plant +"wilts", and needs to be dug away to make the land usable, or can +be left as ornamental 2-block plant. Digging either top or bottom +block works in all cases. + +3. Tomatoes. + +Tomatoes appear to work simple enough, until you harvest them +the first time: The plant stays! However, after the 3rd to 5th +harvest, the plant wilts and needs to be removed, since no more +tomatoes will grow on the plant. Per harvest you can get 1-2 +tomatoes only. You can craft the tomatoes to tomato seeds, as +expected. + +4. Potatoes. + +The plants themselves don't drop anything. Only if the plant matures +can you dig potatoes from the soil. If you can reach the soil from the +side you can save yourself one dig by digging the soil as that will +remove the plant from the top, but otherwise you need to dig twice: +once to remove the plant, once to dig out the potatoes. + +You get 3-5 potatoes. Each potato gives one (set of) "potato eyes" +which are the clones that can grow back to potatoes. Be careful not +to dig the plant when there's flowers! You have to wait until the soil +below shows potatoes. It's fairly easy to see the difference, though. + +5. Green Beans + +These green beans are unnaturally green, but there's so many +of them that grow on a vine! Sadly, these beans don't grow beans +unsupported, so you stick some sticks together to make a beanpole, +something like this way: + +empty empty empty +stick empty stick +stick empty stick + +There, that should help the viney bean plant to grow to 2 meters +high. It has remarkable purple flowers, that pop all over the plant +just before the beans grow. + +Sadly, once the beans are picked, this plant turns into an unusable +mess that makes it hard for the next plant to grow on the beanpole, +so you salvage the beanpole's sticks after harvesting in order to +make more beanpoles again. It's a bit of work, but worth it, these +beans are delicious! + + +## Cooking / Crafting + +The corn cobs can be cooked directly to make Corn-on-the-Cob. + +This mod includes a bowl recipe. The bowl is made from clay lumps, +which results in an unbaked clay bowl that needs to be baked in an +oven to be usable: + +empty empty empty +clay_lump empty clay_lump +empty clay_lump empty + +Pumpkin blocks can be cooked whole, and yield roasted pumpkin. It's +okay as food, but it takes a lot of work. + +You can fill these bowls (or any group:food_bowl) with vegetables to +craft an uncooked vegetable stew: + +empty empty empty +grean_beans potato tomato +empty clay_bowl empty + +The uncooked vegetable stew obviously needs to be cooked as well in +an oven. The resulting Vegetable Stew bowl gives a lot of hears back, +which is worth the effort. + +The watering can can be made as follows: + +steel_ingot empty empty +steel_ingot empty steel_ingot +empty steel_ingot empty + +To fill the watering can, left click any block of water. To use, +left click a plant. The damage bar on the icon indicates the fill +level of the watering can. + +The hydrometer can be crafted like this: + +mese_crystal_fragment empty empty +empty steel_ingot empty +empty empty steel_ingot + +Left-click any plant with the hydrometer, and the charge bar indicates +the humidity level of the plant: a dry plant will have 0% humidity +and be a small red bar or no bar at all, and a soaked plant will +have a full green bar. Be careful though! Some plants prefer to be +at mid-level (yellow) instead of full wetness! + diff --git a/mods/crops/screenshot.png b/mods/crops/screenshot.png new file mode 100644 index 0000000..3cbf879 Binary files /dev/null and b/mods/crops/screenshot.png differ diff --git a/mods/crops/sounds/crops_flies.ogg b/mods/crops/sounds/crops_flies.ogg new file mode 100644 index 0000000..b5d3941 Binary files /dev/null and b/mods/crops/sounds/crops_flies.ogg differ diff --git a/mods/crops/sounds/crops_watercan_entering.ogg b/mods/crops/sounds/crops_watercan_entering.ogg new file mode 100644 index 0000000..68212bc Binary files /dev/null and b/mods/crops/sounds/crops_watercan_entering.ogg differ diff --git a/mods/crops/sounds/crops_watercan_splash_big.ogg b/mods/crops/sounds/crops_watercan_splash_big.ogg new file mode 100644 index 0000000..19c4b5e Binary files /dev/null and b/mods/crops/sounds/crops_watercan_splash_big.ogg differ diff --git a/mods/crops/sounds/crops_watercan_splash_quiet.ogg b/mods/crops/sounds/crops_watercan_splash_quiet.ogg new file mode 100644 index 0000000..9518e17 Binary files /dev/null and b/mods/crops/sounds/crops_watercan_splash_quiet.ogg differ diff --git a/mods/crops/sounds/crops_watercan_splash_small.ogg b/mods/crops/sounds/crops_watercan_splash_small.ogg new file mode 100644 index 0000000..7c02b3e Binary files /dev/null and b/mods/crops/sounds/crops_watercan_splash_small.ogg differ diff --git a/mods/crops/sounds/crops_watercan_watering.ogg b/mods/crops/sounds/crops_watercan_watering.ogg new file mode 100644 index 0000000..f1fc2d5 Binary files /dev/null and b/mods/crops/sounds/crops_watercan_watering.ogg differ diff --git a/mods/crops/textures/crops_beanpole_base.png b/mods/crops/textures/crops_beanpole_base.png new file mode 100644 index 0000000..f9f6073 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_base.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_base_1.png b/mods/crops/textures/crops_beanpole_plant_base_1.png new file mode 100644 index 0000000..905c4aa Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_base_1.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_base_2.png b/mods/crops/textures/crops_beanpole_plant_base_2.png new file mode 100644 index 0000000..fa7b421 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_base_2.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_base_3.png b/mods/crops/textures/crops_beanpole_plant_base_3.png new file mode 100644 index 0000000..a3678c2 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_base_3.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_base_4.png b/mods/crops/textures/crops_beanpole_plant_base_4.png new file mode 100644 index 0000000..cdc87ea Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_base_4.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_base_5.png b/mods/crops/textures/crops_beanpole_plant_base_5.png new file mode 100644 index 0000000..99d6528 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_base_5.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_base_6.png b/mods/crops/textures/crops_beanpole_plant_base_6.png new file mode 100644 index 0000000..291bd94 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_base_6.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_top_1.png b/mods/crops/textures/crops_beanpole_plant_top_1.png new file mode 100644 index 0000000..c6b9086 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_top_1.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_top_2.png b/mods/crops/textures/crops_beanpole_plant_top_2.png new file mode 100644 index 0000000..ed9629d Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_top_2.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_top_3.png b/mods/crops/textures/crops_beanpole_plant_top_3.png new file mode 100644 index 0000000..4b340c5 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_top_3.png differ diff --git a/mods/crops/textures/crops_beanpole_plant_top_4.png b/mods/crops/textures/crops_beanpole_plant_top_4.png new file mode 100644 index 0000000..29be63b Binary files /dev/null and b/mods/crops/textures/crops_beanpole_plant_top_4.png differ diff --git a/mods/crops/textures/crops_beanpole_top.png b/mods/crops/textures/crops_beanpole_top.png new file mode 100644 index 0000000..5416a60 Binary files /dev/null and b/mods/crops/textures/crops_beanpole_top.png differ diff --git a/mods/crops/textures/crops_bowl_uncooked_vegetable_stew.png b/mods/crops/textures/crops_bowl_uncooked_vegetable_stew.png new file mode 100644 index 0000000..d2baa9b Binary files /dev/null and b/mods/crops/textures/crops_bowl_uncooked_vegetable_stew.png differ diff --git a/mods/crops/textures/crops_bowl_vegetable_stew.png b/mods/crops/textures/crops_bowl_vegetable_stew.png new file mode 100644 index 0000000..2079682 Binary files /dev/null and b/mods/crops/textures/crops_bowl_vegetable_stew.png differ diff --git a/mods/crops/textures/crops_clay_bowl.png b/mods/crops/textures/crops_clay_bowl.png new file mode 100644 index 0000000..25097c1 Binary files /dev/null and b/mods/crops/textures/crops_clay_bowl.png differ diff --git a/mods/crops/textures/crops_corn.png b/mods/crops/textures/crops_corn.png new file mode 100644 index 0000000..a24dd14 Binary files /dev/null and b/mods/crops/textures/crops_corn.png differ diff --git a/mods/crops/textures/crops_corn_base_1.png b/mods/crops/textures/crops_corn_base_1.png new file mode 100644 index 0000000..ccf95cb Binary files /dev/null and b/mods/crops/textures/crops_corn_base_1.png differ diff --git a/mods/crops/textures/crops_corn_base_2.png b/mods/crops/textures/crops_corn_base_2.png new file mode 100644 index 0000000..893a831 Binary files /dev/null and b/mods/crops/textures/crops_corn_base_2.png differ diff --git a/mods/crops/textures/crops_corn_base_3.png b/mods/crops/textures/crops_corn_base_3.png new file mode 100644 index 0000000..367e993 Binary files /dev/null and b/mods/crops/textures/crops_corn_base_3.png differ diff --git a/mods/crops/textures/crops_corn_base_seed.png b/mods/crops/textures/crops_corn_base_seed.png new file mode 100644 index 0000000..fe54542 Binary files /dev/null and b/mods/crops/textures/crops_corn_base_seed.png differ diff --git a/mods/crops/textures/crops_corn_cob.png b/mods/crops/textures/crops_corn_cob.png new file mode 100644 index 0000000..40e6bf6 Binary files /dev/null and b/mods/crops/textures/crops_corn_cob.png differ diff --git a/mods/crops/textures/crops_corn_on_the_cob.png b/mods/crops/textures/crops_corn_on_the_cob.png new file mode 100644 index 0000000..04894fd Binary files /dev/null and b/mods/crops/textures/crops_corn_on_the_cob.png differ diff --git a/mods/crops/textures/crops_corn_top_1.png b/mods/crops/textures/crops_corn_top_1.png new file mode 100644 index 0000000..f3cef38 Binary files /dev/null and b/mods/crops/textures/crops_corn_top_1.png differ diff --git a/mods/crops/textures/crops_corn_top_2.png b/mods/crops/textures/crops_corn_top_2.png new file mode 100644 index 0000000..94317eb Binary files /dev/null and b/mods/crops/textures/crops_corn_top_2.png differ diff --git a/mods/crops/textures/crops_corn_top_3.png b/mods/crops/textures/crops_corn_top_3.png new file mode 100644 index 0000000..fd8ea71 Binary files /dev/null and b/mods/crops/textures/crops_corn_top_3.png differ diff --git a/mods/crops/textures/crops_flies.png b/mods/crops/textures/crops_flies.png new file mode 100644 index 0000000..b047a61 Binary files /dev/null and b/mods/crops/textures/crops_flies.png differ diff --git a/mods/crops/textures/crops_green_bean.png b/mods/crops/textures/crops_green_bean.png new file mode 100644 index 0000000..eb1ad66 Binary files /dev/null and b/mods/crops/textures/crops_green_bean.png differ diff --git a/mods/crops/textures/crops_green_bean_seed.png b/mods/crops/textures/crops_green_bean_seed.png new file mode 100644 index 0000000..f9c9459 Binary files /dev/null and b/mods/crops/textures/crops_green_bean_seed.png differ diff --git a/mods/crops/textures/crops_hydrometer.png b/mods/crops/textures/crops_hydrometer.png new file mode 100644 index 0000000..65e1732 Binary files /dev/null and b/mods/crops/textures/crops_hydrometer.png differ diff --git a/mods/crops/textures/crops_melon.png b/mods/crops/textures/crops_melon.png new file mode 100644 index 0000000..874ede1 Binary files /dev/null and b/mods/crops/textures/crops_melon.png differ diff --git a/mods/crops/textures/crops_melon_bottom.png b/mods/crops/textures/crops_melon_bottom.png new file mode 100644 index 0000000..7bb2d21 Binary files /dev/null and b/mods/crops/textures/crops_melon_bottom.png differ diff --git a/mods/crops/textures/crops_melon_plant_1.png b/mods/crops/textures/crops_melon_plant_1.png new file mode 100644 index 0000000..798c10d Binary files /dev/null and b/mods/crops/textures/crops_melon_plant_1.png differ diff --git a/mods/crops/textures/crops_melon_plant_2.png b/mods/crops/textures/crops_melon_plant_2.png new file mode 100644 index 0000000..bc0dd6e Binary files /dev/null and b/mods/crops/textures/crops_melon_plant_2.png differ diff --git a/mods/crops/textures/crops_melon_plant_3.png b/mods/crops/textures/crops_melon_plant_3.png new file mode 100644 index 0000000..5d06c29 Binary files /dev/null and b/mods/crops/textures/crops_melon_plant_3.png differ diff --git a/mods/crops/textures/crops_melon_plant_4.png b/mods/crops/textures/crops_melon_plant_4.png new file mode 100644 index 0000000..9195c33 Binary files /dev/null and b/mods/crops/textures/crops_melon_plant_4.png differ diff --git a/mods/crops/textures/crops_melon_plant_5.png b/mods/crops/textures/crops_melon_plant_5.png new file mode 100644 index 0000000..9b24d8b Binary files /dev/null and b/mods/crops/textures/crops_melon_plant_5.png differ diff --git a/mods/crops/textures/crops_melon_plant_6.png b/mods/crops/textures/crops_melon_plant_6.png new file mode 100644 index 0000000..f08c514 Binary files /dev/null and b/mods/crops/textures/crops_melon_plant_6.png differ diff --git a/mods/crops/textures/crops_melon_seed.png b/mods/crops/textures/crops_melon_seed.png new file mode 100644 index 0000000..f572bb3 Binary files /dev/null and b/mods/crops/textures/crops_melon_seed.png differ diff --git a/mods/crops/textures/crops_melon_slice.png b/mods/crops/textures/crops_melon_slice.png new file mode 100644 index 0000000..259e4a3 Binary files /dev/null and b/mods/crops/textures/crops_melon_slice.png differ diff --git a/mods/crops/textures/crops_melon_stem.png b/mods/crops/textures/crops_melon_stem.png new file mode 100644 index 0000000..7ab2c02 Binary files /dev/null and b/mods/crops/textures/crops_melon_stem.png differ diff --git a/mods/crops/textures/crops_melon_top.png b/mods/crops/textures/crops_melon_top.png new file mode 100644 index 0000000..70ebe66 Binary files /dev/null and b/mods/crops/textures/crops_melon_top.png differ diff --git a/mods/crops/textures/crops_potato.png b/mods/crops/textures/crops_potato.png new file mode 100644 index 0000000..88843ee Binary files /dev/null and b/mods/crops/textures/crops_potato.png differ diff --git a/mods/crops/textures/crops_potato_eyes.png b/mods/crops/textures/crops_potato_eyes.png new file mode 100644 index 0000000..e45d5f8 Binary files /dev/null and b/mods/crops/textures/crops_potato_eyes.png differ diff --git a/mods/crops/textures/crops_potato_plant_1.png b/mods/crops/textures/crops_potato_plant_1.png new file mode 100644 index 0000000..8d481f4 Binary files /dev/null and b/mods/crops/textures/crops_potato_plant_1.png differ diff --git a/mods/crops/textures/crops_potato_plant_2.png b/mods/crops/textures/crops_potato_plant_2.png new file mode 100644 index 0000000..061ad4d Binary files /dev/null and b/mods/crops/textures/crops_potato_plant_2.png differ diff --git a/mods/crops/textures/crops_potato_plant_3.png b/mods/crops/textures/crops_potato_plant_3.png new file mode 100644 index 0000000..a0593a6 Binary files /dev/null and b/mods/crops/textures/crops_potato_plant_3.png differ diff --git a/mods/crops/textures/crops_potato_plant_4.png b/mods/crops/textures/crops_potato_plant_4.png new file mode 100644 index 0000000..9e29b5a Binary files /dev/null and b/mods/crops/textures/crops_potato_plant_4.png differ diff --git a/mods/crops/textures/crops_potato_plant_5.png b/mods/crops/textures/crops_potato_plant_5.png new file mode 100644 index 0000000..2909223 Binary files /dev/null and b/mods/crops/textures/crops_potato_plant_5.png differ diff --git a/mods/crops/textures/crops_potato_soil.png b/mods/crops/textures/crops_potato_soil.png new file mode 100644 index 0000000..cb471ca Binary files /dev/null and b/mods/crops/textures/crops_potato_soil.png differ diff --git a/mods/crops/textures/crops_pumpkin.png b/mods/crops/textures/crops_pumpkin.png new file mode 100644 index 0000000..81fb2e3 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin.png differ diff --git a/mods/crops/textures/crops_pumpkin_bottom.png b/mods/crops/textures/crops_pumpkin_bottom.png new file mode 100644 index 0000000..315fdc6 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_bottom.png differ diff --git a/mods/crops/textures/crops_pumpkin_plant_1.png b/mods/crops/textures/crops_pumpkin_plant_1.png new file mode 100644 index 0000000..1a33321 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_plant_1.png differ diff --git a/mods/crops/textures/crops_pumpkin_plant_2.png b/mods/crops/textures/crops_pumpkin_plant_2.png new file mode 100644 index 0000000..1131783 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_plant_2.png differ diff --git a/mods/crops/textures/crops_pumpkin_plant_3.png b/mods/crops/textures/crops_pumpkin_plant_3.png new file mode 100644 index 0000000..d7497a5 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_plant_3.png differ diff --git a/mods/crops/textures/crops_pumpkin_plant_4.png b/mods/crops/textures/crops_pumpkin_plant_4.png new file mode 100644 index 0000000..9dc781a Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_plant_4.png differ diff --git a/mods/crops/textures/crops_pumpkin_plant_5.png b/mods/crops/textures/crops_pumpkin_plant_5.png new file mode 100644 index 0000000..144f5e2 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_plant_5.png differ diff --git a/mods/crops/textures/crops_pumpkin_plant_6.png b/mods/crops/textures/crops_pumpkin_plant_6.png new file mode 100644 index 0000000..ff46604 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_plant_6.png differ diff --git a/mods/crops/textures/crops_pumpkin_seed.png b/mods/crops/textures/crops_pumpkin_seed.png new file mode 100644 index 0000000..bf4fb05 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_seed.png differ diff --git a/mods/crops/textures/crops_pumpkin_stem.png b/mods/crops/textures/crops_pumpkin_stem.png new file mode 100644 index 0000000..db6d1b6 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_stem.png differ diff --git a/mods/crops/textures/crops_pumpkin_top.png b/mods/crops/textures/crops_pumpkin_top.png new file mode 100644 index 0000000..9c917c0 Binary files /dev/null and b/mods/crops/textures/crops_pumpkin_top.png differ diff --git a/mods/crops/textures/crops_roasted_pumpkin.png b/mods/crops/textures/crops_roasted_pumpkin.png new file mode 100644 index 0000000..42ff0f0 Binary files /dev/null and b/mods/crops/textures/crops_roasted_pumpkin.png differ diff --git a/mods/crops/textures/crops_soak.png b/mods/crops/textures/crops_soak.png new file mode 100644 index 0000000..39311c4 Binary files /dev/null and b/mods/crops/textures/crops_soak.png differ diff --git a/mods/crops/textures/crops_tomato.png b/mods/crops/textures/crops_tomato.png new file mode 100644 index 0000000..e0f9719 Binary files /dev/null and b/mods/crops/textures/crops_tomato.png differ diff --git a/mods/crops/textures/crops_tomato_plant_1.png b/mods/crops/textures/crops_tomato_plant_1.png new file mode 100644 index 0000000..16ebd68 Binary files /dev/null and b/mods/crops/textures/crops_tomato_plant_1.png differ diff --git a/mods/crops/textures/crops_tomato_plant_2.png b/mods/crops/textures/crops_tomato_plant_2.png new file mode 100644 index 0000000..c0d4044 Binary files /dev/null and b/mods/crops/textures/crops_tomato_plant_2.png differ diff --git a/mods/crops/textures/crops_tomato_plant_3.png b/mods/crops/textures/crops_tomato_plant_3.png new file mode 100644 index 0000000..d06d801 Binary files /dev/null and b/mods/crops/textures/crops_tomato_plant_3.png differ diff --git a/mods/crops/textures/crops_tomato_plant_4.png b/mods/crops/textures/crops_tomato_plant_4.png new file mode 100644 index 0000000..a01da2c Binary files /dev/null and b/mods/crops/textures/crops_tomato_plant_4.png differ diff --git a/mods/crops/textures/crops_tomato_plant_5.png b/mods/crops/textures/crops_tomato_plant_5.png new file mode 100644 index 0000000..741e627 Binary files /dev/null and b/mods/crops/textures/crops_tomato_plant_5.png differ diff --git a/mods/crops/textures/crops_tomato_plant_6.png b/mods/crops/textures/crops_tomato_plant_6.png new file mode 100644 index 0000000..55212d2 Binary files /dev/null and b/mods/crops/textures/crops_tomato_plant_6.png differ diff --git a/mods/crops/textures/crops_tomato_seed.png b/mods/crops/textures/crops_tomato_seed.png new file mode 100644 index 0000000..f32d3f2 Binary files /dev/null and b/mods/crops/textures/crops_tomato_seed.png differ diff --git a/mods/crops/textures/crops_unbaked_clay_bowl.png b/mods/crops/textures/crops_unbaked_clay_bowl.png new file mode 100644 index 0000000..ec8d21e Binary files /dev/null and b/mods/crops/textures/crops_unbaked_clay_bowl.png differ diff --git a/mods/crops/textures/crops_watering.png b/mods/crops/textures/crops_watering.png new file mode 100644 index 0000000..e06226e Binary files /dev/null and b/mods/crops/textures/crops_watering.png differ diff --git a/mods/crops/textures/crops_watering_can.png b/mods/crops/textures/crops_watering_can.png new file mode 100644 index 0000000..2e57dc0 Binary files /dev/null and b/mods/crops/textures/crops_watering_can.png differ diff --git a/mods/crops/textures/crops_wither.png b/mods/crops/textures/crops_wither.png new file mode 100644 index 0000000..edb591a Binary files /dev/null and b/mods/crops/textures/crops_wither.png differ diff --git a/mods/crops/tomato.lua b/mods/crops/tomato.lua new file mode 100644 index 0000000..f70d914 --- /dev/null +++ b/mods/crops/tomato.lua @@ -0,0 +1,201 @@ + +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +minetest.register_node("crops:tomato_seed", { + description = S("Tomato seed"), + inventory_image = "crops_tomato_seed.png", + wield_image = "crops_tomato_seed.png", + tiles = { "crops_tomato_plant_1.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + node_placement_prediction = "crops:tomato_plant_1", + groups = { snappy=3,flammable=3,flora=1,attached_node=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + if minetest.get_item_group(under.name, "soil") <= 1 then + return + end + crops.plant(pointed_thing.above, {name="crops:tomato_plant_1", param2 = 1}) + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +}) + +for stage = 1, 4 do +minetest.register_node("crops:tomato_plant_" .. stage , { + description = S("Tomato plant"), + tiles = { "crops_tomato_plant_" .. stage .. ".png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45} + } +}) +end + +minetest.register_node("crops:tomato_plant_5" , { + description = S("Tomato plant"), + tiles = { "crops_tomato_plant_5.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45} + }, + on_dig = function(pos, node, digger) + local drops = {} + for i = 1, math.random(1, 2) do + table.insert(drops, "crops:tomato") + end + core.handle_node_drops(pos, drops, digger) + + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_tomato_ttl") + if ttl > 1 then + minetest.swap_node(pos, { name = "crops:tomato_plant_4", param2 = 1}) + meta:set_int("crops_tomato_ttl", ttl - 1) + else + crops.die(pos) + end + end +}) + +minetest.register_node("crops:tomato_plant_6", { + description = S("Tomato plant"), + tiles = { "crops_tomato_plant_6.png" }, + drawtype = "plantlike", + paramtype2 = "meshoptions", + waving = 1, + sunlight_propagates = true, + use_texture_alpha = true, + walkable = false, + paramtype = "light", + groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 }, + drop = {}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45} + }, +}) + +minetest.register_craftitem("crops:tomato", { + description = S("Tomato"), + inventory_image = "crops_tomato.png", + on_use = minetest.item_eat(1) +}) + +minetest.register_craft({ + type = "shapeless", + output = "crops:tomato_seed", + recipe = { "crops:tomato" } +}) + +-- +-- grows a plant to mature size +-- +minetest.register_abm({ + nodenames = { "crops:tomato_plant_1", "crops:tomato_plant_2", "crops:tomato_plant_3" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local n = string.gsub(node.name, "4", "5") + n = string.gsub(n, "3", "4") + n = string.gsub(n, "2", "3") + n = string.gsub(n, "1", "2") + minetest.swap_node(pos, { name = n, param2 = 1 }) + end +}) + +-- +-- grows a tomato +-- +minetest.register_abm({ + nodenames = { "crops:tomato_plant_4" }, + neighbors = { "group:soil" }, + interval = crops.settings.interval, + chance = crops.settings.chance, + action = function(pos, node, active_object_count, active_object_count_wider) + if not crops.can_grow(pos) then + return + end + local meta = minetest.get_meta(pos) + local ttl = meta:get_int("crops_tomato_ttl") + local damage = meta:get_int("crops_damage") + if ttl == 0 then + -- damage 0 - drops 4-6 + -- damage 50 - drops 2-3 + -- damage 100 - drops 0-1 + ttl = math.random(4 - (4 * (damage / 100)), 6 - (5 * (damage / 100))) + end + if ttl > 1 then + minetest.swap_node(pos, { name = "crops:tomato_plant_5", param2 = 1 }) + meta:set_int("crops_tomato_ttl", ttl) + else + crops.die(pos) + end + end +}) + +crops.tomato_die = function(pos) + minetest.set_node(pos, { name = "crops:tomato_plant_6", param2 = 1 }) +end + +local properties = { + die = crops.tomato_die, + waterstart = 19, + wateruse = 1, + night = 5, + soak = 80, + soak_damage = 90, + wither = 20, + wither_damage = 10, +} +crops.register({ name = "crops:tomato_plant_1", properties = properties }) +crops.register({ name = "crops:tomato_plant_2", properties = properties }) +crops.register({ name = "crops:tomato_plant_3", properties = properties }) +crops.register({ name = "crops:tomato_plant_4", properties = properties }) +crops.register({ name = "crops:tomato_plant_5", properties = properties }) diff --git a/mods/crops/tools.lua b/mods/crops/tools.lua new file mode 100644 index 0000000..c6f9ee9 --- /dev/null +++ b/mods/crops/tools.lua @@ -0,0 +1,125 @@ +--[[ + +Copyright (C) 2015 - Auke Kok + +"crops" is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as +published by the Free Software Foundation; either version 2.1 +of the license, or (at your option) any later version. + +--]] + +-- Intllib +local S = crops.intllib + +minetest.register_tool("crops:watering_can", { + description = S("Watering Can"), + inventory_image = "crops_watering_can.png", + liquids_pointable = true, + range = 2.5, + stack_max = 1, + wear = 65535, + tool_capabilities = {}, + on_use = function(itemstack, user, pointed_thing) + local pos = pointed_thing.under + local ppos = pos + if not pos then + return itemstack + end + -- filling it up? + local wear = itemstack:get_wear() + if minetest.get_item_group(minetest.get_node(pos).name, "water") >= 3 then + if wear ~= 1 then + minetest.sound_play("crops_watercan_entering", {pos=pos, gain=0.8}) + minetest.after(math.random()/2, function(p) + if math.random(2) == 1 then + minetest.sound_play("crops_watercan_splash_quiet", {pos=p, gain=0.1}) + end + if math.random(3) == 1 then + minetest.after(math.random()/2, function(pp) + minetest.sound_play("crops_watercan_splash_small", {pos=pp, gain=0.7}) + end, p) + end + if math.random(3) == 1 then + minetest.after(math.random()/2, function(pp) + minetest.sound_play("crops_watercan_splash_big", {pos=pp, gain=0.7}) + end, p) + end + end, pos) + itemstack:set_wear(1) + end + return itemstack + end + -- using it on a top-half part of a plant? + local meta = minetest.get_meta(pos) + if meta:get_int("crops_top_half") == 1 then + meta = minetest.get_meta({x=pos.x, y=pos.y-1, z=pos.z}) + end + -- using it on a plant? + local water = meta:get_int("crops_water") + if water < 1 then + return itemstack + end + -- empty? + if wear == 65534 then + return itemstack + end + crops.particles(ppos, 2) + minetest.sound_play("crops_watercan_watering", {pos=pos, gain=0.8}) + water = math.min(water + crops.settings.watercan, crops.settings.watercan_max) + meta:set_int("crops_water", water) + + if not minetest.settings:get_bool("creative_mode") then + itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses))) + end + return itemstack + end, +}) + +minetest.register_tool("crops:hydrometer", { + description = S("Hydrometer"), + inventory_image = "crops_hydrometer.png", + liquids_pointable = false, + range = 2.5, + stack_max = 1, + tool_capabilities = { + }, + on_use = function(itemstack, user, pointed_thing) + local pos = pointed_thing.under + if not pos then + return itemstack + end + -- doublesize plant? + local meta = minetest.get_meta(pos) + if meta:get_int("crops_top_half") == 1 then + meta = minetest.get_meta({x=pos.x, y=pos.y-1, z=pos.z}) + end + + -- using it on a plant? + local water = meta:get_int("crops_water") + if water == nil then + itemstack:set_wear(65534) + return itemstack + end + itemstack:set_wear(65535 - ((65534 / 100) * water)) + return itemstack + end, +}) + +minetest.register_craft({ + output = "crops:watering_can", + recipe = { + { "default:steel_ingot", "", "" }, + { "default:steel_ingot", "", "default:steel_ingot" }, + { "", "default:steel_ingot", "" }, + }, +}) + +minetest.register_craft({ + output = "crops:hydrometer", + recipe = { + { "default:mese_crystal_fragment", "", "" }, + { "", "default:steel_ingot", "" }, + { "", "", "default:steel_ingot" }, + }, +}) diff --git a/mods/crops/tools/updatepo.sh b/mods/crops/tools/updatepo.sh new file mode 100755 index 0000000..b1bac47 --- /dev/null +++ b/mods/crops/tools/updatepo.sh @@ -0,0 +1,23 @@ +#! /bin/bash + +# To create a new translation: +# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot + +cd "$(dirname "${BASH_SOURCE[0]}")/.."; + +# Extract translatable strings. +xgettext --from-code=UTF-8 \ + --keyword=S \ + --keyword=NS:1,2 \ + --keyword=N_ \ + --sort-by-file \ + --add-comments='Translators:' \ + --add-location=file \ + -o locale/template.pot \ + $(find . -name '*.lua') + +# Update translations. +find locale -name '*.po' | while read -r file; do + echo $file + msgmerge --update $file locale/template.pot; +done diff --git a/mods/cute_deco/init.lua b/mods/cute_deco/init.lua new file mode 100644 index 0000000..e69de29 diff --git a/mods/cute_deco/nodeboxes/simple_chair.nbe b/mods/cute_deco/nodeboxes/simple_chair.nbe new file mode 100644 index 0000000..ca3092b --- /dev/null +++ b/mods/cute_deco/nodeboxes/simple_chair.nbe @@ -0,0 +1,35 @@ +-- GENERATED CODE +-- Node Box Editor, version 0.9.0 +-- Namespace: test + +minetest.register_node("test:node_1", { + tiles = { + "default_wood.png", + "default_wood.png", + "default_wood.png", + "default_wood.png", + "default_wood.png", + "default_wood.png" + }, + drawtype = "nodebox", + paramtype = "light", + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, -0.25, -0.1875, -0.125, -0.1875}, -- NodeBox1 + {0.1875, -0.5, -0.25, 0.25, -0.125, -0.1875}, -- NodeBox2 + {-0.1875, -0.3125, -0.25, 0.1875, -0.25, -0.1875}, -- NodeBox3 + {-0.1875, -0.3125, 0.1875, 0.25, -0.25, 0.25}, -- NodeBox4 + {-0.25, -0.5, 0.1875, -0.1875, -0.125, 0.25}, -- NodeBox5 + {0.1875, -0.5, 0.1875, 0.25, -0.125, 0.25}, -- NodeBox6 + {-0.25, -0.3125, -0.1875, -0.1875, -0.25, 0.1875}, -- NodeBox7 + {0.1875, -0.3125, -0.1875, 0.25, -0.25, 0.1875}, -- NodeBox8 + {-0.25, -0.125, -0.25, 0.25, -0.0625, 0.25}, -- NodeBox9 + {-0.25, -0.0625, -0.25, -0.1875, 0.5, -0.1875}, -- NodeBox10 + {0.1875, -0.0625, -0.25, 0.25, 0.5, -0.1875}, -- NodeBox11 + {-0.1875, 0.125, -0.25, 0.1875, 0.1875, -0.1875}, -- NodeBox12 + {-0.1875, 0.375, -0.25, 0.1875, 0.4375, -0.1875}, -- NodeBox13 + } + } +}) + diff --git a/mods/dlg/dlgs/actor.dlg b/mods/dlg/dlgs/actor.dlg new file mode 100644 index 0000000..bf0eadd --- /dev/null +++ b/mods/dlg/dlgs/actor.dlg @@ -0,0 +1,40 @@ +local actor +local lines = {} + +actor = "" + +lines[id] = { + conditions = { + name("name"), + at(pos, radius), + has_item("item", amount), + biome("biome"), + night, + hp(points), + node("name"), + light(level) + }, + text = "", + choices = { --max 4 + { text = "", + actions = {}, + next = id, + end_conversation, --default, overriden by next + } + }, + }, + actions = { + add_item("item", amount), + remove_item("item", amount), + teleport(pos), + health(points), + damage(points), + kill, + ban, + play_sound("sound"), + }, + next = id, --overriden by choices, + end_conversation, --default, overriden by choices and next +} + +dlg.register_dialogue(actor, dlg.register_lines(lines)) diff --git a/mods/dlg/init.lua b/mods/dlg/init.lua new file mode 100644 index 0000000..62b4d0d --- /dev/null +++ b/mods/dlg/init.lua @@ -0,0 +1,33 @@ +dlg = {} + +dlg.dialogues = {} + +function dlg.register_dialogue(actor, dialogue) + table.insert(dlg.dialogues, dialogue, actor) +end + +function dlg.register_lines(dialogue, lines) + local dialogue = {} + dialogue.lines = {} + for key, value in pairs(lines) do + dialogue.lines[key] = value + end + return dialogue +end + +function dlg.check_conditions(conditions) + for id, condition in pairs(conditions) do + + end +end + +function dlg.start_conversation(actor) + local dialogue = dialogues["actor"] + for id, line in pairs(dialogue) do + local condition = false + local line_conditions = line.conditions + if line_conditions then + condition = dlg.check_conditions(line_conditions) + end + end +end diff --git a/mods/emeralds/LICENSE.txt b/mods/emeralds/LICENSE.txt new file mode 100755 index 0000000..cce7753 --- /dev/null +++ b/mods/emeralds/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 EvergreenTree + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/emeralds/README.txt b/mods/emeralds/README.txt new file mode 100755 index 0000000..4520c61 --- /dev/null +++ b/mods/emeralds/README.txt @@ -0,0 +1,123 @@ +Emeralds Mod + +This mod adds emerald ore and some decorative blocks to minetest. It has been made by cloning the textures and the code of the quartz mod and modifying them. Credit for the original code and textures goes to the author of the quartz mod. I changed the code and names to emerald and I redesigned the textures to look like emerald. Emeralds are twice as rare as quartz but that's not much. 2.0.0 Changes: I have now added an emerald sword and emerald tools. Emerald tools and sword textures are modified from the diamond tools and sword textures. Emerald tools and sword code are the same as bronze tools except their number of uses is twice as much. Since emerald ore is not so rare, I figured it would be good way to make emerald tools valuable, as their durability classifies between mese and diamond. + +Version: 2.0.0 +License: MIT (see LICENSE.txt) + +Dependencies: +default (found in minetest_game) +stairs (found in minetest_game) +moreblocks (optional, for stairsplus support) + +Please report bugs at the github issue tracker: +https://github.com/CC10MAGIC/emeralds/issues + +Crafting: + +Emerald Block: +c = emerald crystal x = nothing + +x|x|x +----- +c|c|x +----- +c|c|x + +Emerald Pillar: +q = emerald block x = nothing + +x|x|x +----- +x|q|x +----- +x|x|x + + +Emerald Slab: +q = emerald block x = nothing + +x|x|x +----- +x|x|x +----- +q|q|q + +Emerald Stairs: +q = emerald block x = nothing + +q|x|x +q|q|x +q|q|q + +Emerald Pillar Slab: +q = emerald pillar x = nothing + +x|x|x +----- +x|x|x +----- +q|q|q + +Chiseled Emerald: +q = emerald slab x = nothing + +x|x|x +----- +x|q|x +----- +x|q|x + +Emerald Crystal Piece (used to make emerald sword and tools): +c = emerald crystal x = nothing + +x|x|x +----- +x|c|x +----- +x|x|x + +Emerald Pickaxe: +c = emerald crystal s = stick x = nothing + +c|c|c +----- +x|s|x +----- +x|s|x + +Emerald Axe: +c = emerald crystal s = stick x = nothing + +x|c|c +----- +x|s|c +----- +x|s|x + +Emerald Shovel: +c = emerald crystal s = stick x = nothing + +x|c|x +----- +x|s|x +----- +x|s|x + +Emerald Hoe: +c = emerald crystal s = stick x = nothing + +x|c|c +----- +x|s|x +----- +x|s|x + +Emerald Sword: +c = emerald crystal s = stick x = nothing + +x|c|x +----- +x|c|x +----- +x|s|x \ No newline at end of file diff --git a/mods/emeralds/depends.txt b/mods/emeralds/depends.txt new file mode 100755 index 0000000..4451908 --- /dev/null +++ b/mods/emeralds/depends.txt @@ -0,0 +1,3 @@ +default +stairs +moreblocks? diff --git a/mods/emeralds/description.txt b/mods/emeralds/description.txt new file mode 100755 index 0000000..54d1450 --- /dev/null +++ b/mods/emeralds/description.txt @@ -0,0 +1 @@ +Adds emerald ore and some decorative emerald blocks diff --git a/mods/emeralds/emeralds.lua b/mods/emeralds/emeralds.lua new file mode 100644 index 0000000..9558385 --- /dev/null +++ b/mods/emeralds/emeralds.lua @@ -0,0 +1,392 @@ +local path,modpath = ... +local settings = Settings(path .. "/settings.txt") + +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +-- +-- Item Registration +-- + +-- Emerald Crystal +minetest.register_craftitem("emeralds:emerald_crystal", { + description = S("Emerald Crystal"), + inventory_image = "emerald_crystal_full.png", +}) +minetest.register_craftitem("emeralds:emerald_crystal_piece", { + description = S("Emerald Crystal Piece"), + inventory_image = "emerald_crystal_piece.png", +}) + +-- +-- Node Registration +-- + +-- Ore +minetest.register_node("emeralds:emerald_ore", { + description = S("Emerald Ore"), + tiles = {"default_stone.png^emerald_ore.png"}, + groups = {cracky=3, stone=1}, + drop = 'emeralds:emerald_crystal', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "emeralds:emerald_ore", + wherein = "default:stone", + clust_scarcity = 12*12*12, + clust_num_ores = 5, + clust_size = 5, + y_max = -256, + y_min = -512, +}) + +-- Emerald Block +minetest.register_node("emeralds:block", { + description = S("Emerald Block"), + tiles = {"emerald_block.png"}, + groups = {cracky=3, oddly_breakable_by_hand=1}, + sounds = default.node_sound_glass_defaults(), +}) + +-- Chiseled Emerald +minetest.register_node("emeralds:chiseled", { + description = S("Chiseled Emerald"), + tiles = {"emerald_chiseled.png"}, + groups = {cracky=3, oddly_breakable_by_hand=1}, + sounds = default.node_sound_glass_defaults(), +}) + +-- Emerald Pillar +minetest.register_node("emeralds:pillar", { + description = S("Emerald Pillar"), + paramtype2 = "facedir", + tiles = {"emerald_pillar_top.png", "emerald_pillar_top.png", "emerald_pillar_side.png"}, + groups = {cracky=3, oddly_breakable_by_hand=1}, + sounds = default.node_sound_glass_defaults(), + on_place = minetest.rotate_node +}) + +-- Stairs & Slabs +stairs.register_stair_and_slab("emeraldblock", "emeralds:block", + {cracky=3, oddly_breakable_by_hand=1}, + {"emerald_block.png"}, + S("Emerald Stair"), + S("Emerald Slab"), + default.node_sound_glass_defaults() +) + + stairs.register_stair_and_slab("emeraldstair", "emeralds:pillar", + {cracky=3, oddly_breakable_by_hand=1}, + {"emerald_pillar_top.png", "emerald_pillar_top.png", "emerald_pillar_side.png"}, + S("Emerald Pillar Stair"), + S("Emerald Pillar Slab"), + default.node_sound_glass_defaults() +) + +-- +-- Crafting +-- + +-- Emerald Crystal Piece +minetest.register_craft({ + output = '"emeralds:emerald_crystal_piece" 3', + recipe = { + {'emeralds:emerald_crystal'} + } +}) + +-- Emerald Crystal Piece +minetest.register_craft({ + output = 'emeralds:emerald_dust', + recipe = { + {'emeralds:emerald_crystal_piece'} + } +}) + +-- Emerald Block +minetest.register_craft({ + output = '"emeralds:block" 4', + recipe = { + {'emeralds:emerald_crystal', 'emeralds:emerald_crystal', ''}, + {'emeralds:emerald_crystal', 'emeralds:emerald_crystal', ''}, + {'', '', ''} + } +}) + +-- Chiseled Emerald +minetest.register_craft({ + output = 'emeralds:chiseled 2', + recipe = { + {'stairs:slab_emeraldblock', '', ''}, + {'stairs:slab_emeraldblock', '', ''}, + {'', '', ''}, + } +}) + +-- Chiseled Emerald (for stairsplus) +minetest.register_craft({ + output = 'emeralds:chiseled 2', + recipe = { + {'emeralds:slab_block', '', ''}, + {'emeralds:slab_block', '', ''}, + {'', '', ''}, + } +}) + +-- Emerald Pillar +minetest.register_craft({ + output = 'emeralds:pillar 2', + recipe = { + {'emeralds:block', '', ''}, + {'emeralds:block', '', ''}, + {'', '', ''}, + } +}) + +--Emerald Pickaxe +minetest.register_craft({ + output = 'emeralds:emerald_pickaxe', + recipe = { + {'emeralds:emerald_crystal_piece', 'emeralds:emerald_crystal_piece', 'emeralds:emerald_crystal_piece'}, + {'', 'default:stick', ''}, + {'', 'default:stick', ''}, + } +}) + +--Emerald Axe +minetest.register_craft({ + output = 'emeralds:emerald_axe', + recipe = { + {'', 'emeralds:emerald_crystal_piece', 'emeralds:emerald_crystal_piece'}, + {'', 'default:stick', 'emeralds:emerald_crystal_piece'}, + {'', 'default:stick', ''}, + } +}) + +--Emerald Shovel +minetest.register_craft({ + output = 'emeralds:emerald_shovel', + recipe = { + {'', 'emeralds:emerald_crystal_piece', ''}, + {'', 'default:stick', ''}, + {'', 'default:stick', ''}, + } +}) + +--Emerald Hoe +minetest.register_craft({ + output = 'emeralds:emerald_hoe', + recipe = { + {'', 'emeralds:emerald_crystal_piece', 'emeralds:emerald_crystal_piece'}, + {'', 'default:stick', ''}, + {'', 'default:stick', ''}, + } +}) + +--Emerald Sword +minetest.register_craft({ + output = 'emeralds:emerald_sword', + recipe = { + {'', 'emeralds:emerald_crystal_piece', ''}, + {'', 'emeralds:emerald_crystal_piece', ''}, + {'', 'default:stick', ''}, + } +}) +-- +-- ABMS +-- + +local dirs2 = {12, 9, 18, 7, 12} + +-- Replace all instances of the horizontal emerald pillar with the +minetest.register_abm({ + nodenames = {"emeralds:pillar_horizontal"}, + interval = 1, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local fdir = node.param2 or 0 + nfdir = dirs2[fdir+1] + minetest.add_node(pos, {name = "emeralds:pillar", param2 = nfdir}) + end, +}) + +-- +-- Compatibility with stairsplus +-- + +if minetest.get_modpath("moreblocks") and settings:get_bool("ENABLE_STAIRSPLUS") then + register_stair_slab_panel_micro("emerald", "block", "emeralds:block", + {cracky=3}, + {"emerald_block.png"}, + "Emerald Block", + "block", + 0 + ) + + register_stair_slab_panel_micro("emerald", "chiseled", "emeralds:chiseled", + {cracky=3}, + {"emerald_chiseled.png"}, + "Chiseled Emerald", + "chiseled", + 0 + ) + + register_stair_slab_panel_micro("emerald", "pillar", "emeralds:pillar", + {cracky=3}, + {"emerald_pillar_top.png", "emerald_pillar_top.png", "emerald_pillar_side.png"}, + "Emerald Pillar", + "pillar", + 0 + ) + + table.insert(circular_saw.known_stairs, "emeralds:block") + table.insert(circular_saw.known_stairs, "emeralds:chiseled") + table.insert(circular_saw.known_stairs, "emeralds:pillar") +end + +-- +-- Deprecated +-- + +if settings:get_bool("ENABLE_HORIZONTAL_PILLAR") then + -- Emerald Pillar (horizontal) + minetest.register_node("emeralds:pillar_horizontal", { + description = S("Emerald Pillar Horizontal"), + tiles = {"emerald_pillar_side.png", "emerald_pillar_side.png", "emerald_pillar_side.png^[transformR90", + "emerald_pillar_side.png^[transformR90", "emerald_pillar_top.png", "emerald_pillar_top.png"}, + paramtype2 = "facedir", + drop = 'emeralds:pillar', + groups = {cracky=3, oddly_breakable_by_hand=1, not_in_creative_inventory=1}, + sounds = default.node_sound_glass_defaults(), + }) +end + +-- Tools Registration + + +-- Emerald Pickaxe +minetest.register_tool("emeralds:emerald_pickaxe", { + description = S("Emerald Pickaxe"), + inventory_image = "emerald_pickaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=60, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, +}) + +-- Emerald Axe +minetest.register_tool("emeralds:emerald_axe", { + description = S("Emerald Axe"), + inventory_image = "emerald_axe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=60, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, +}) + +-- Emerald Shovel +minetest.register_tool("emeralds:emerald_shovel", { + description = S("Emerald Shovel"), + inventory_image = "emerald_shovel.png", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=80, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, +}) + +-- Emerald Hoe +farming.register_hoe("emeralds:emerald_hoe", { + description = S("Emerald Hoe"), + inventory_image = "emerald_hoe.png", + max_uses = 440, + material = "emeralds:emerald_crystal_piece" +}) + +-- Emerald Sword +minetest.register_tool("emeralds:emerald_sword", { + description = S("Emerald Sword"), + inventory_image = "emerald_sword.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=80, maxlevel=2}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, +}) + +-- Cluttering Registration + +--Emerald Ring +minetest.register_craftitem("emeralds:emerald_ring", { + description = S("Emerald Ring"), + inventory_image = "emerald_ring.png", + wield_image = "emerald_ring.png" +}) + +minetest.register_craft({ + type = "shaped", + output = "emeralds:emerald_ring", + recipe = { + {"", "", ""}, + {"", "emeralds:emerald_ore", ""}, + {"", "default:steel_ingot", ""}, + } +}) + +minetest.register_craft({ + type = "cooking", + output = "emeralds:emerald_ore", + recipe = "emeralds:emerald_ring", + cooktime = 3, +}) + +--Emerald Wand +minetest.register_craftitem("emeralds:emerald_wand", { + description = S("Emerald Wand"), + inventory_image = "emerald_wand.png", + wield_image = "emerald_wand.png" +}) + +minetest.register_craft({ + type = "shaped", + output = "emeralds:emerald_wand", + recipe = { + {"", "emeralds:emerald_ore", ""}, + {"", "group:wood", ""}, + {"", "group:wood", ""}, + } +}) + +minetest.register_craft({ + type = "cooking", + output = "emeralds:emerald_ore", + recipe = "emeralds:emerald_wand", + cooktime = 3, +}) + +--Emerald Dust +minetest.register_craftitem("emeralds:emerald_dust", { + description = S("Emerald Dust"), + inventory_image = "emerald_dust.png", + wield_image = "emerald_dust.png" +}) diff --git a/mods/emeralds/init.lua b/mods/emeralds/init.lua new file mode 100755 index 0000000..8e5d6e0 --- /dev/null +++ b/mods/emeralds/init.lua @@ -0,0 +1,3 @@ +local path = minetest.get_modpath("emeralds") +local modpath = path .. "/emeralds.lua" +assert(loadfile(modpath))(path, modpath) \ No newline at end of file diff --git a/mods/emeralds/locale/emeralds.es.tr b/mods/emeralds/locale/emeralds.es.tr new file mode 100644 index 0000000..3be3918 --- /dev/null +++ b/mods/emeralds/locale/emeralds.es.tr @@ -0,0 +1,20 @@ +# textdomain: emeralds +Emerald Crystal=Trozo de cristal de esmeralda +Emerald Ore=Esmeralda +Emerald Block=Bloque de esmeralda +Chiseled Emerald=Esmeralda tallada +Emerald Pillar=Pilar de esmeralda +Emerald Stair=Escalera de esmeralda +Emerald Slab=Losa de esmeralda +Emerald Pillar Stair=Escalera pilar de esmeralda +Emerald Pillar Slab=Losa pilar de esmeralda +Emerald Pillar Horizontal=Pilar horizontal de esmeralda +Emerald Pickaxe=Pico de esmeralda +Emerald Axe=Hacha de esmeralda +Emerald Shovel=Pala de esmeralda +Emerald Hoe=Azada de esmeralda +Emerald Sword=Espada de esmeralda +Emerald Ring=Anillo con esmeralda +Emerald Wand=Vara con esmeralda +Emerald Dust=Polvo de esmeralda +Emerald Potion=Poción de esmeralda \ No newline at end of file diff --git a/mods/emeralds/mod.conf b/mods/emeralds/mod.conf new file mode 100755 index 0000000..c50e79c --- /dev/null +++ b/mods/emeralds/mod.conf @@ -0,0 +1,2 @@ +name = emeralds +depends = farming diff --git a/mods/emeralds/settings.txt b/mods/emeralds/settings.txt new file mode 100755 index 0000000..3a11106 --- /dev/null +++ b/mods/emeralds/settings.txt @@ -0,0 +1,7 @@ +# Set this to true to allow usage of the stairsplus mod in moreblocks + +ENABLE_STAIRSPLUS = false + +# This enables the old horizontal pillar block(deprecated, be sure to convert them back to normal pillars) + +ENABLE_HORIZONTAL_PILLAR = true diff --git a/mods/emeralds/textures/emerald_axe.png b/mods/emeralds/textures/emerald_axe.png new file mode 100755 index 0000000..e93fe93 Binary files /dev/null and b/mods/emeralds/textures/emerald_axe.png differ diff --git a/mods/emeralds/textures/emerald_block.png b/mods/emeralds/textures/emerald_block.png new file mode 100644 index 0000000..d74d7f3 Binary files /dev/null and b/mods/emeralds/textures/emerald_block.png differ diff --git a/mods/emeralds/textures/emerald_chiseled.png b/mods/emeralds/textures/emerald_chiseled.png new file mode 100755 index 0000000..8df04ba Binary files /dev/null and b/mods/emeralds/textures/emerald_chiseled.png differ diff --git a/mods/emeralds/textures/emerald_crystal_full.png b/mods/emeralds/textures/emerald_crystal_full.png new file mode 100644 index 0000000..2aca7ab Binary files /dev/null and b/mods/emeralds/textures/emerald_crystal_full.png differ diff --git a/mods/emeralds/textures/emerald_crystal_piece.png b/mods/emeralds/textures/emerald_crystal_piece.png new file mode 100755 index 0000000..c13b5d8 Binary files /dev/null and b/mods/emeralds/textures/emerald_crystal_piece.png differ diff --git a/mods/emeralds/textures/emerald_dust.png b/mods/emeralds/textures/emerald_dust.png new file mode 100644 index 0000000..422ffd7 Binary files /dev/null and b/mods/emeralds/textures/emerald_dust.png differ diff --git a/mods/emeralds/textures/emerald_hoe.png b/mods/emeralds/textures/emerald_hoe.png new file mode 100755 index 0000000..3c0e1f9 Binary files /dev/null and b/mods/emeralds/textures/emerald_hoe.png differ diff --git a/mods/emeralds/textures/emerald_ore.png b/mods/emeralds/textures/emerald_ore.png new file mode 100644 index 0000000..2aca7ab Binary files /dev/null and b/mods/emeralds/textures/emerald_ore.png differ diff --git a/mods/emeralds/textures/emerald_pickaxe.png b/mods/emeralds/textures/emerald_pickaxe.png new file mode 100755 index 0000000..1b206bd Binary files /dev/null and b/mods/emeralds/textures/emerald_pickaxe.png differ diff --git a/mods/emeralds/textures/emerald_pillar_side.png b/mods/emeralds/textures/emerald_pillar_side.png new file mode 100755 index 0000000..0974391 Binary files /dev/null and b/mods/emeralds/textures/emerald_pillar_side.png differ diff --git a/mods/emeralds/textures/emerald_pillar_side_horizontal.png b/mods/emeralds/textures/emerald_pillar_side_horizontal.png new file mode 100755 index 0000000..e8e1ad5 Binary files /dev/null and b/mods/emeralds/textures/emerald_pillar_side_horizontal.png differ diff --git a/mods/emeralds/textures/emerald_pillar_top.png b/mods/emeralds/textures/emerald_pillar_top.png new file mode 100755 index 0000000..5013ad3 Binary files /dev/null and b/mods/emeralds/textures/emerald_pillar_top.png differ diff --git a/mods/emeralds/textures/emerald_potion.png b/mods/emeralds/textures/emerald_potion.png new file mode 100644 index 0000000..d3cf6cd Binary files /dev/null and b/mods/emeralds/textures/emerald_potion.png differ diff --git a/mods/emeralds/textures/emerald_ring.png b/mods/emeralds/textures/emerald_ring.png new file mode 100644 index 0000000..740737f Binary files /dev/null and b/mods/emeralds/textures/emerald_ring.png differ diff --git a/mods/emeralds/textures/emerald_shovel.png b/mods/emeralds/textures/emerald_shovel.png new file mode 100755 index 0000000..1c1421c Binary files /dev/null and b/mods/emeralds/textures/emerald_shovel.png differ diff --git a/mods/emeralds/textures/emerald_sword.png b/mods/emeralds/textures/emerald_sword.png new file mode 100755 index 0000000..c1925f9 Binary files /dev/null and b/mods/emeralds/textures/emerald_sword.png differ diff --git a/mods/emeralds/textures/emerald_wand.png b/mods/emeralds/textures/emerald_wand.png new file mode 100644 index 0000000..c4e6ba3 Binary files /dev/null and b/mods/emeralds/textures/emerald_wand.png differ diff --git a/mods/emeralds/textures/rubi_block.png b/mods/emeralds/textures/rubi_block.png new file mode 100644 index 0000000..1311634 Binary files /dev/null and b/mods/emeralds/textures/rubi_block.png differ diff --git a/mods/emeralds/textures/rubi_crystal_full.png b/mods/emeralds/textures/rubi_crystal_full.png new file mode 100644 index 0000000..826e640 Binary files /dev/null and b/mods/emeralds/textures/rubi_crystal_full.png differ diff --git a/mods/emeralds/textures/rubi_ore.png b/mods/emeralds/textures/rubi_ore.png new file mode 100644 index 0000000..826e640 Binary files /dev/null and b/mods/emeralds/textures/rubi_ore.png differ diff --git a/mods/enchantz/.gitignore b/mods/enchantz/.gitignore new file mode 100644 index 0000000..ef02689 --- /dev/null +++ b/mods/enchantz/.gitignore @@ -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/* diff --git a/mods/enchantz/.luacheckrc b/mods/enchantz/.luacheckrc new file mode 100644 index 0000000..a21bce1 --- /dev/null +++ b/mods/enchantz/.luacheckrc @@ -0,0 +1,7 @@ +unused_args = false +allow_defined_top = true + +read_globals = { + "minetest", + "default", +} diff --git a/mods/enchantz/LICENSE b/mods/enchantz/LICENSE new file mode 100644 index 0000000..c36855e --- /dev/null +++ b/mods/enchantz/LICENSE @@ -0,0 +1,685 @@ ++----------------------------------------------------------------------+ +| Copyright (c) 2015-2016 kilbith | +| | +| Code: GPL version 3 | +| Textures: WTFPL (credits: Gambit) | +| Sounds: | +| - xdecor_enchanting.ogg - by Timbre - CC BY-SA-NC | +| freesound.org/people/Timbre/sounds/221683/ | ++----------------------------------------------------------------------+ + + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/mods/enchantz/README.md b/mods/enchantz/README.md new file mode 100644 index 0000000..97a7a74 --- /dev/null +++ b/mods/enchantz/README.md @@ -0,0 +1,9 @@ +## Enchantz ## + +##### A mod adding a Minecraft-inspired Enchantment Table to Minetest. ##### +##### 3 enchants are proposed for the default tools, and 2 enchants for the armors from [3d_armor](https://github.com/stujones11/minetest-3d_armor). ##### + +##### This mod is originating from [X-Decor](https://github.com/kilbith/xdecor). ##### + +![Preview](https://lut.im/oWfKNfxAA4/n9jqwFpJOdUdo8yT.png) +![Preview2](http://i.imgur.com/X9MkQzV.png) diff --git a/mods/enchantz/init.lua b/mods/enchantz/init.lua new file mode 100644 index 0000000..08da025 --- /dev/null +++ b/mods/enchantz/init.lua @@ -0,0 +1,359 @@ +screwdriver = screwdriver or {} +local ceil, abs, random = math.ceil, math.abs, math.random + +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Cost in Mese crystal(s) for enchantz. +local mese_cost = 1 + +-- Force of the enchantments. +local enchantz = { + uses = 1.2, -- Durability + times = 0.1, -- Efficiency + damages = 1, -- Sharpness + strength = 1.2, -- Armor strength (3d_armor only) + speed = 0.2, -- Player speed (3d_armor only) + jump = 0.2 -- Player jumping (3d_armor only) +} + +local function cap(str) return str:gsub("^%l", string.upper) end +local function to_percent(orig_value, final_value) + return abs(ceil(((final_value - orig_value) / orig_value) * 100)) +end + +function enchantz:get_tooltip(enchant, orig_caps, fleshy) + local bonus = {durable=0, efficiency=0, damages=0} + if orig_caps then + bonus.durable = to_percent(orig_caps.uses, orig_caps.uses * enchantz.uses) + local sum_caps_times = 0 + for i=1, #orig_caps.times do + sum_caps_times = sum_caps_times + orig_caps.times[i] + end + local average_caps_time = sum_caps_times / #orig_caps.times + bonus.efficiency = to_percent(average_caps_time, average_caps_time - enchantz.times) + end + if fleshy then + bonus.damages = to_percent(fleshy, fleshy + enchantz.damages) + end + + local specs = { -- not finished, to complete + durable = {"#00baff", " (+"..bonus.durable.."%)", S("Durable")}, + fast = {"#74ff49", " (+"..bonus.efficiency.."%)", S("Fast")}, + sharp = {"#ffff00", " (+"..bonus.damages.."%)", S("Sharp")}, + strong = {"#ff3d3d", "", S("Strong")}, + speed = {"#fd5eff", "", S("Speed")} + } + return minetest.colorize and + minetest.colorize(specs[enchant][1], + "\n"..specs[enchant][3]..specs[enchant][2]) or + "\n"..specs[enchant][3]..specs[enchant][2] +end + + +function enchantz.formspec(pos, num) + local meta = minetest.get_meta(pos) + local formspec = "size[9,9;]".. + "bgcolor[#080808BB;true]".. + "background[0,0;9,9;enchantz_ui.png]".. + "label[0.9,2.5;"..S("Item").."]".. + "label[2,2.5;"..S("Mese").."]".. + "list[context;tool;0.9,2.9;1,1;]".. + "list[context;mese;2,2.9;1,1;]".. + "list[current_player;main;0.5,4.5;8,4;]".. + "image[2,2.9;1,1;enchantz_mese_layout.png]".. + "tooltip[sharp;"..S("Your weapon inflicts more damages").."]".. + "tooltip[durable;"..S("Your tool last longer").."]".. + "tooltip[fast;"..S("Your tool digs faster").."]".. + "tooltip[strong;"..S("Your armor is more resistant").."]".. + "tooltip[speed;"..S("Your speed is increased").."]".. + default.gui_slots..default.get_hotbar_bg(0.5,4.5) + + local enchant_buttons = { + "image_button[3.9,0.85;4,0.92;enchantz_bg_btn.png;fast;"..S("Efficiency").."]".. + "image_button[3.9,1.77;4,1.12;enchantz_bg_btn.png;durable;"..S("Durability").."]", + "image_button[3.9,0.85;4,0.92;enchantz_bg_btn.png;strong;"..S("Strength").."]", + "image_button[3.9,2.9;4,0.92;enchantz_bg_btn.png;sharp;"..S("Sharpness").."]", + [[ image_button[3.9,0.85;4,0.92;enchantz_bg_btn.png;strong;Strength] + image_button[3.9,1.77;4,1.12;enchantz_bg_btn.png;speed;Speed] ]] + } + + formspec = formspec..(enchant_buttons[num] or "") + meta:set_string("formspec", formspec) +end + +function enchantz.on_put(pos, listname, _, stack) + if listname == "tool" then + local stackname = stack:get_name() + local tool_groups = { + "axe, pick, shovel", + "chestplate, leggings, helmet", + "sword", "boots" + } + + for idx, tools in pairs(tool_groups) do + if tools:find(stackname:match(":(%w+)")) then + enchantz.formspec(pos, idx) + end + end + end +end + +function enchantz.fields(pos, _, fields, sender) + if not next(fields) or fields.quit then + return + end + local inv = minetest.get_meta(pos):get_inventory() + local tool = inv:get_stack("tool", 1) + local mese = inv:get_stack("mese", 1) + local orig_wear = tool:get_wear() + local mod, name = tool:get_name():match("(.*):(.*)") + local enchanted_tool = (mod or "")..":enchanted_"..(name or "").."_"..next(fields) + + if mese:get_count() >= mese_cost and minetest.registered_tools[enchanted_tool] then + minetest.sound_play("xdecor_enchantz", {to_player=sender:get_player_name(), gain=0.8}) + tool:replace(enchanted_tool) + tool:add_wear(orig_wear) + mese:take_item(mese_cost) + inv:set_stack("mese", 1, mese) + inv:set_stack("tool", 1, tool) + end +end + +function enchantz.dig(pos) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("tool") and inv:is_empty("mese") +end + +local function allowed(tool) + if not tool then return false end + for item in pairs(minetest.registered_tools) do + if item:find("enchanted_"..tool) then return true end + end + return false +end + +function enchantz.put(_, listname, _, stack) + local item = stack:get_name():match("[^:]+$") + if listname == "mese" and item == "mese_crystal" then + return stack:get_count() + elseif listname == "tool" and allowed(item) then + return 1 + end + return 0 +end + +function enchantz.on_take(pos, listname) + if listname == "tool" then enchantz.formspec(pos, nil) end +end + +function enchantz.construct(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Enchantment Table")) + enchantz.formspec(pos, nil) + + local inv = meta:get_inventory() + inv:set_size("tool", 1) + inv:set_size("mese", 1) + + minetest.add_entity({x=pos.x, y=pos.y+0.85, z=pos.z}, "xdecor:book_open") + local timer = minetest.get_node_timer(pos) + timer:start(5.0) +end + +function enchantz.destruct(pos) + for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.9)) do + if obj and obj:get_luaentity() and + obj:get_luaentity().name == "xdecor:book_open" then + obj:remove() break + end + end +end + +function enchantz.timer(pos) + local num = #minetest.get_objects_inside_radius(pos, 0.9) + if num == 0 then + minetest.add_entity({x=pos.x, y=pos.y+0.85, z=pos.z}, "xdecor:book_open") + end + + local minp = {x=pos.x-2, y=pos.y, z=pos.z-2} + local maxp = {x=pos.x+2, y=pos.y+1, z=pos.z+2} + local bookshelves = minetest.find_nodes_in_area(minp, maxp, "default:bookshelf") + if #bookshelves == 0 then return true end + + local bookshelf_pos = bookshelves[random(1, #bookshelves)] + local x = pos.x - bookshelf_pos.x + local y = bookshelf_pos.y - pos.y + local z = pos.z - bookshelf_pos.z + + if tostring(x..z):find(2) then + minetest.add_particle({ + pos = bookshelf_pos, + velocity = {x=x, y=2-y, z=z}, + acceleration = {x=0, y=-2.2, z=0}, + expirationtime = 1, + size = 2, + texture = "xdecor_glyph"..random(1,18)..".png" + }) + end + return true +end + +minetest.register_node(":xdecor:enchantment_table", { + description = S("Enchantment Table"), + paramtype = "light", + paramtype2 = "facedir", + tiles = {"enchantz_enchtable_top.png", "enchantz_enchtable_bottom.png", + "enchantz_enchtable_side.png", "enchantz_enchtable_side.png", + "enchantz_enchtable_side.png", "enchantz_enchtable_side.png"}, + groups = {cracky=1, level=1}, + sounds = default.node_sound_stone_defaults(), + on_rotate = screwdriver.rotate_simple, + can_dig = enchantz.dig, + on_timer = enchantz.timer, + on_construct = enchantz.construct, + on_destruct = enchantz.destruct, + on_receive_fields = enchantz.fields, + on_metadata_inventory_put = enchantz.on_put, + on_metadata_inventory_take = enchantz.on_take, + allow_metadata_inventory_put = enchantz.put, + allow_metadata_inventory_move = function() return 0 end +}) + +minetest.register_entity(":xdecor:book_open", { + visual = "sprite", + visual_size = {x=0.75, y=0.75}, + collisionbox = {0}, + physical = false, + textures = {"enchantz_book_open.png"}, + on_activate = function(self) + local pos = self.object:getpos() + local pos_under = {x=pos.x, y=pos.y-1, z=pos.z} + + if minetest.get_node(pos_under).name ~= "xdecor:enchantment_table" then + self.object:remove() + end + end +}) + +minetest.register_craft({ + output = "xdecor:enchantment_table", + recipe = { + {"", "default:book", ""}, + {"default:diamond", "default:obsidian", "default:diamond"}, + {"default:obsidian", "default:obsidian", "default:obsidian"} + } +}) + +function enchantz:register_tools(mod, def) + for tool in pairs(def.tools) do + for material in def.materials:gmatch("[%w_]+") do + for enchant in def.tools[tool].enchants:gmatch("[%w_]+") do + + local original_tool = minetest.registered_tools[mod..":"..tool.."_"..material] + if not original_tool then + --minetest.log(mod..":"..tool.."_"..material) + break + end + + if original_tool.tool_capabilities then + local original_damage_groups = original_tool.tool_capabilities.damage_groups + local original_groupcaps = original_tool.tool_capabilities.groupcaps + local groupcaps = table.copy(original_groupcaps) + local fleshy = original_damage_groups.fleshy + local full_punch_interval = original_tool.tool_capabilities.full_punch_interval + local max_drop_level = original_tool.tool_capabilities.max_drop_level + local group = next(original_groupcaps) + + if enchant == "durable" then + groupcaps[group].uses = ceil(original_groupcaps[group].uses * enchantz.uses) + elseif enchant == "fast" then + for i, time in pairs(original_groupcaps[group].times) do + groupcaps[group].times[i] = time - enchantz.times + end + elseif enchant == "sharp" then + fleshy = fleshy + enchantz.damages + end + + minetest.register_tool(":"..mod..":enchanted_"..tool.."_"..material.."_"..enchant, { + description = S("Enchanted "..cap(material).." "..cap(tool)).. + self:get_tooltip(enchant, original_groupcaps[group], fleshy), + inventory_image = original_tool.inventory_image.."^[colorize:violet:75", + wield_image = original_tool.wield_image, + groups = {not_in_creative_inventory=1}, + tool_capabilities = { + groupcaps = groupcaps, damage_groups = {fleshy = fleshy}, + full_punch_interval = full_punch_interval, max_drop_level = max_drop_level + }, + light_source = 8 or minetest.LIGHT_MAX, + }) + end + + if mod == "3d_armor" then + local original_armor_groups = original_tool.groups + local armorcaps = {} + armorcaps.not_in_creative_inventory = 1 + + for armor_group, value in pairs(original_armor_groups) do + if enchant == "strong" then + armorcaps[armor_group] = ceil(value * enchantz.strength) + elseif enchant == "speed" then + armorcaps[armor_group] = value + armorcaps.physics_speed = enchantz.speed + armorcaps.physics_jump = enchantz.jump + end + end + + minetest.register_tool(":"..mod..":enchanted_"..tool.."_"..material.."_"..enchant, { + description = S("Enchanted "..cap(material).." "..cap(tool)) .. + self:get_tooltip(enchant), + inventory_image = original_tool.inventory_image, + texture = "3d_armor_"..tool.."_"..material, + wield_image = original_tool.wield_image, + groups = armorcaps, + wear = 0 + }) + end + end + end + end +end + +local tools = { + { + mod = "default", + materials = "steel, bronze, mese, diamond" + }, + { + mod = "moreores", + materials = "silver, mithril" + } +} + +for i = 1, #tools do + if minetest.get_modpath(tools[i].mod) ~= nil then + enchantz:register_tools(tools[i].mod, { + materials = tools[i].materials, + tools = { + axe = {enchants = "durable, fast"}, + pick = {enchants = "durable, fast"}, + shovel = {enchants = "durable, fast"}, + sword = {enchants = "sharp"} + } + }) + end +end + +local materials_3darmor = "steel, bronze, diamond" +if minetest.get_modpath("moreores") ~= nil then --moreores (optional) + materials_3darmor = materials_3darmor .. ", mithril" +end + +enchantz:register_tools("3d_armor", { + materials = materials_3darmor, + tools = { + boots = {enchants = "strong, speed"}, + chestplate = {enchants = "strong"}, + helmet = {enchants = "strong"}, + leggings = {enchants = "strong"} + } +}) diff --git a/mods/enchantz/locale/enchantz.es.tr b/mods/enchantz/locale/enchantz.es.tr new file mode 100644 index 0000000..140eaae --- /dev/null +++ b/mods/enchantz/locale/enchantz.es.tr @@ -0,0 +1,61 @@ +# textdomain: enchantz +Enchantment Table=Mesa de encantamiento +Enchanted=Encantado +Sharpness=Afilado +Strength=Fuerza +Efficiency=Rendimiento +Durability=Durabilidad +Durable=Durable +Fast=Rápido +Sharp=Afilado +Strong=Fuerte +Speed=Veloz +Your weapon inflicts more damages=Tu arma inflige más daño +Your tool last longer=Tu herramienta dura más +Your tool digs faster=Tu herramienta cava más rápido +Your armor is more resistant=Tu armadura es más resistente +Your speed is increased=Tu velocidad se incrementa +Enchanted Steel Axe=Hacha de acero encantada +Enchanted Steel Pick=Pico de acero encantado +Enchanted Steel Shovel=Pala de acero encantada +Enchanted Steel Sword=Espada de acero encantada +Enchanted Bronze Axe=Hacha de bronce encantada +Enchanted Bronze Pick=Pico de bronce encantado +Enchanted Bronze Shovel=Pala de bronce encantada +Enchanted Bronze Sword=Espada de bronce encantada +Enchanted Mese Axe=Hacha de mese encantada +Enchanted Mese Pick=Pico de mese encantado +Enchanted Mese Shovel=Pala de mese encantada +Enchanted Mese Sword=Espada de mese encantada +Enchanted Diamond Axe=Hacha de diamante encantada +Enchanted Diamond Pick=Pico de diamante encantado +Enchanted Diamond Shovel=Pala de diamante encantada +Enchanted Diamond Sword=Espada de diamante encantada +Enchanted Steel Boots=Botas de acero encantadas +Enchanted Steel Chestplate=Peto de acero encantado +Enchanted Steel Helmet=Casco de acero encantado +Enchanted Steel Leggins=Polainas de acero encantadas +Enchanted Bronze Boots=Botas de bronce encantadas +Enchanted Bronze Chestplate=Peto de bronce encantado +Enchanted Bronze Helmet=Casco de bronce encantado +Enchanted Bronze Leggins=Polainas de bronce encantadas +Enchanted Gold Boots=Botas de oro encantadas +Enchanted Gold Chestplate=Peto de oro encantado +Enchanted Gold Helmet=Casco de oro encantado +Enchanted Gold Leggins=Polainas de oro encantadas +Enchanted Diamond Boots=Botas de diamante encantadas +Enchanted Diamond Chestplate=Peto de diamante encantado +Enchanted Diamond Helmet=Casco de diamante encantado +Enchanted Diamond Leggins=Polainas de diamante encantadas +Enchanted Silver Axe=Hacha de plata encantada +Enchanted Silver Pick=Pico de plata encantado +Enchanted Silver Shovel=Pala de plata encantada +Enchanted Silver Sword=Espada de plata encantada +Enchanted Mithril Axe=Hacha de mitrilo encantada +Enchanted Mithril Pick=Pico de mitrilo encantado +Enchanted Mithril Shovel=Pala de mitrilo encantada +Enchanted Mithril Sword=Espada de mitrilo encantada +Enchanted Mithril Boots=Botas de mitrilo encantadas +Enchanted Mithril Chestplate=Peto de mitrilo encantado +Enchanted Mithril Helmet=Casco de mitrilo encantado +Enchanted Mithril Leggins=Polainas de mitrilo encantadas diff --git a/mods/enchantz/mod.conf b/mods/enchantz/mod.conf new file mode 100644 index 0000000..dab0bac --- /dev/null +++ b/mods/enchantz/mod.conf @@ -0,0 +1,3 @@ +name = enchantz +depends = default +optional_depends = moreores, 3darmor diff --git a/mods/enchantz/screenshot.png b/mods/enchantz/screenshot.png new file mode 100644 index 0000000..eb3d083 Binary files /dev/null and b/mods/enchantz/screenshot.png differ diff --git a/mods/enchantz/sounds/xdecor_enchanting.ogg b/mods/enchantz/sounds/xdecor_enchanting.ogg new file mode 100644 index 0000000..882e9ee Binary files /dev/null and b/mods/enchantz/sounds/xdecor_enchanting.ogg differ diff --git a/mods/enchantz/textures/enchantz_bg_btn.png b/mods/enchantz/textures/enchantz_bg_btn.png new file mode 100644 index 0000000..990a788 Binary files /dev/null and b/mods/enchantz/textures/enchantz_bg_btn.png differ diff --git a/mods/enchantz/textures/enchantz_book_open.png b/mods/enchantz/textures/enchantz_book_open.png new file mode 100644 index 0000000..508e808 Binary files /dev/null and b/mods/enchantz/textures/enchantz_book_open.png differ diff --git a/mods/enchantz/textures/enchantz_enchtable_bottom.png b/mods/enchantz/textures/enchantz_enchtable_bottom.png new file mode 100644 index 0000000..781be5c Binary files /dev/null and b/mods/enchantz/textures/enchantz_enchtable_bottom.png differ diff --git a/mods/enchantz/textures/enchantz_enchtable_side.png b/mods/enchantz/textures/enchantz_enchtable_side.png new file mode 100644 index 0000000..c03654d Binary files /dev/null and b/mods/enchantz/textures/enchantz_enchtable_side.png differ diff --git a/mods/enchantz/textures/enchantz_enchtable_top.png b/mods/enchantz/textures/enchantz_enchtable_top.png new file mode 100644 index 0000000..3a3f703 Binary files /dev/null and b/mods/enchantz/textures/enchantz_enchtable_top.png differ diff --git a/mods/enchantz/textures/enchantz_mese_layout.png b/mods/enchantz/textures/enchantz_mese_layout.png new file mode 100644 index 0000000..02d6248 Binary files /dev/null and b/mods/enchantz/textures/enchantz_mese_layout.png differ diff --git a/mods/enchantz/textures/enchantz_ui.png b/mods/enchantz/textures/enchantz_ui.png new file mode 100644 index 0000000..1413b7b Binary files /dev/null and b/mods/enchantz/textures/enchantz_ui.png differ diff --git a/mods/enchantz/textures/xdecor_glyph1.png b/mods/enchantz/textures/xdecor_glyph1.png new file mode 100644 index 0000000..a5ac3f5 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph1.png differ diff --git a/mods/enchantz/textures/xdecor_glyph10.png b/mods/enchantz/textures/xdecor_glyph10.png new file mode 100644 index 0000000..d002147 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph10.png differ diff --git a/mods/enchantz/textures/xdecor_glyph11.png b/mods/enchantz/textures/xdecor_glyph11.png new file mode 100644 index 0000000..c9cd9ff Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph11.png differ diff --git a/mods/enchantz/textures/xdecor_glyph12.png b/mods/enchantz/textures/xdecor_glyph12.png new file mode 100644 index 0000000..dc5dd1d Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph12.png differ diff --git a/mods/enchantz/textures/xdecor_glyph13.png b/mods/enchantz/textures/xdecor_glyph13.png new file mode 100644 index 0000000..45c6d5a Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph13.png differ diff --git a/mods/enchantz/textures/xdecor_glyph14.png b/mods/enchantz/textures/xdecor_glyph14.png new file mode 100644 index 0000000..6862387 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph14.png differ diff --git a/mods/enchantz/textures/xdecor_glyph15.png b/mods/enchantz/textures/xdecor_glyph15.png new file mode 100644 index 0000000..0db3a9e Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph15.png differ diff --git a/mods/enchantz/textures/xdecor_glyph16.png b/mods/enchantz/textures/xdecor_glyph16.png new file mode 100644 index 0000000..d10a72b Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph16.png differ diff --git a/mods/enchantz/textures/xdecor_glyph17.png b/mods/enchantz/textures/xdecor_glyph17.png new file mode 100644 index 0000000..2b374e8 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph17.png differ diff --git a/mods/enchantz/textures/xdecor_glyph18.png b/mods/enchantz/textures/xdecor_glyph18.png new file mode 100644 index 0000000..e762e35 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph18.png differ diff --git a/mods/enchantz/textures/xdecor_glyph2.png b/mods/enchantz/textures/xdecor_glyph2.png new file mode 100644 index 0000000..eb1e74f Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph2.png differ diff --git a/mods/enchantz/textures/xdecor_glyph3.png b/mods/enchantz/textures/xdecor_glyph3.png new file mode 100644 index 0000000..e82145e Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph3.png differ diff --git a/mods/enchantz/textures/xdecor_glyph4.png b/mods/enchantz/textures/xdecor_glyph4.png new file mode 100644 index 0000000..e93f238 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph4.png differ diff --git a/mods/enchantz/textures/xdecor_glyph5.png b/mods/enchantz/textures/xdecor_glyph5.png new file mode 100644 index 0000000..f0635bf Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph5.png differ diff --git a/mods/enchantz/textures/xdecor_glyph6.png b/mods/enchantz/textures/xdecor_glyph6.png new file mode 100644 index 0000000..c93976c Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph6.png differ diff --git a/mods/enchantz/textures/xdecor_glyph7.png b/mods/enchantz/textures/xdecor_glyph7.png new file mode 100644 index 0000000..1e4ff02 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph7.png differ diff --git a/mods/enchantz/textures/xdecor_glyph8.png b/mods/enchantz/textures/xdecor_glyph8.png new file mode 100644 index 0000000..2f2b86c Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph8.png differ diff --git a/mods/enchantz/textures/xdecor_glyph9.png b/mods/enchantz/textures/xdecor_glyph9.png new file mode 100644 index 0000000..4b3e366 Binary files /dev/null and b/mods/enchantz/textures/xdecor_glyph9.png differ diff --git a/mods/explosions/LICENSE.txt b/mods/explosions/LICENSE.txt new file mode 100644 index 0000000..65c5ca8 --- /dev/null +++ b/mods/explosions/LICENSE.txt @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser 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 +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/mods/explosions/README.md b/mods/explosions/README.md new file mode 100644 index 0000000..fbbde93 --- /dev/null +++ b/mods/explosions/README.md @@ -0,0 +1,117 @@ +# Explosions + +Explosions API mod for Minetest. + +## Description + +This mod adds a common API to generate ray-traced explosions in Minetest. +Ray-traced explosion are more realistic than what is currently used to simulate +explosions. It allows different nodes to have different blast resistances, and +will allow nodes with high blast resistance to absorb blasts, protecting weaker +nodes or entities behind them. This mod only exposes one function +`explosions.explode' which is used to create explosions of various strengths +and shapes. + +The computation-intensive parts of the mod has been optimized to allow for +larger explosions and more faster world updating. + +Requires Minetest 5.1.0 or later. + +## Documentation + +### `explosions.explode(pos, explosion_def)` + +Create an explosion at position. + +- `pos` position where the explosion should start from +- `explosion_def` contains the properties of the explosion + +### Explosion definition properties + +#### `strength` + +Each explosion has a strength which determines how much damage it will do, both +to entities and to the environment. A higher strength value will lead to more +powerful explosions. + +#### `shape` + +A shape is an array of normalized vectors. Each vector define the direction of +each ray in the explosion. When creating custom shapes it is important that +enough rays are specified so the explosion does not create artifacts (like +flying nodes in the environment). + +If unspecified the shape becomes a sphere which is generated by the mod and +contains an appropriate number of rays. These spheres will only be generated +once for each different radius of the explosions. + +#### `radius` + +Rays need to die at some point. This is specified by the radius property +which define the maximum distance each ray will go. Entities or nodes past +this radius will not be affected by the explosion. If unspecified it becomes +the cube root of `strength`. + +### Blast resistance + +This mod also adds a new group for nodes, `blast_resistance` which is used to +define how resistant different materials are to explosions. When a node does +not have a defined blast resistance, the mod will calculate it from other nodes +groups (like `cracky`/`crumbly`, `dig_immediate` and `level`). The algorithm +used for that is quite arbitrary and not described here (look at source-code if +interested). + +Following is a table which lists the calculated blast resistance for some +materials in the default game: + +| Node type | Blast resistance | +| :------------ | ---------------: | +| Diamond | 1000 | +| Obsidian | 500 | +| Iron block | 500 | +| Gold block | 200 | +| Lava | 100 | +| Stone | 100 | +| Planks | 75 | +| Dirt/Sand | 50 | +| Water | 50 | +| Leaves | 12.5 | + +### Node blast callbacks + +Each node type can define callback functions which get called when the node get +hit by a ray. The callback functions get specified from +`minetest.register_node` among the other callback functions. + +The callbacks are called after the entire explosion has been traced, but before +the environment is updated. If code in the callback updates nodes in the +environment in any way, those changes **must be** be wrapped in a call to +`minetest.after`, otherwise the changes will not have any effect. If the +callback returns true, the node will be removed, otherwise it will stay. + +#### `on_blast_break(pos, strength, dir)` + +Gets called when a ray hits the node and has enough strength to go through it. +The default behavior for this is to remove the node from the map. Nodes can be +made indestructible (while still having low blast resistance) by defining this +to an empty function. + +- `pos` position of the node +- `strength` strength of the ray which hit the node +- `dir` direction of the ray which hit the node + +#### `on_blast_shock(pos, strength, dir)` + +Gets called when a ray hits the node but does not have enough strength to go +through it. The default behavior is to make the node fly away with a velocity +proportional to the strength of the ray which hit it. Possible applications of +this callback could be to make stone turn into cobblestone, or wood catch fire. + +- `pos` position of the node +- `strength` strength of the ray which hit the node +- `dir` direction of the ray which hit the node + +## Credits + +This API mod was created by Elias Åström. It is released under the LGPL +license, see [the license file](./LICENSE.txt) for more information. diff --git a/mods/explosions/init.lua b/mods/explosions/init.lua new file mode 100644 index 0000000..0a8bc5a --- /dev/null +++ b/mods/explosions/init.lua @@ -0,0 +1,483 @@ +--[[ .__ .__ + ____ ___ _________ | | ____ _____|__| ____ ____ ______ + _/ __ \\ \/ /\____ \| | / _ \/ ___/ |/ _ \ / \ / ___/ + \ ___/ > < | |_> > |_( <_> )___ \| ( <_> ) | \\___ \ + \___ >__/\_ \| __/|____/\____/____ >__|\____/|___| /____ > + \/ \/|__| \/ \/ \/ + + Explosion API mod for Minetest + + This mod adds a common API to generate ray-traced explosions in Minetest. + Ray-traced explosion are more realistic than what is currently used to + simulate explosions. It allows different nodes to have different blast + resistances, and will allow nodes with high blast resistance to absorb + blasts, protecting weaker nodes or entities behind them. This mod only + exposes one function `explosions.explode' which is used to create + explosions of various strengths and shapes. + + The computation-intensive parts of the mod has been optimized to allow for + larger explosions and faster world updating. + + This mod was created by Elias Astrom and is released + under the LGPL license. +--]] + +explosions = {} + +-- Saved sphere explosion shapes for various radiuses +local sphere_shapes = {} + +-- Saved node definitions in table using cid-keys for faster look-up. +local node_defs = {} +local node_br = {} + +-- Set to false to opt-out of flying nodes. +local flying_nodes = minetest.settings:get_bool("explosions_flying_nodes", true) + +local AIR_CID = minetest.get_content_id('air') + +-- Calculate blast resistance for a node +-- +-- If node has group `blast_resistance' use its value as the blast resistance, +-- otherwise calculate it from other node groups (like `crumbly', +-- `dig_immediate' and `level'). +local function get_blastres(name, def) + if def and def.groups and def.groups.blast_resistance then + return def.groups.blast_resistance + end + + local instant_br = { [0] = math.huge, 25, 12.5, 6.25 } + local oddly_br = { [0] = math.huge, 100, 75, 50 } + local crumbly_br = { [0] = math.huge, 100, 75, 50 } + local choppy_br = { [0] = math.huge, 100, 75, 50 } + local snappy_br = { [0] = math.huge, 50, 25, 12.5 } + local cracky_br = { [0] = math.huge, 200, 150, 100 } + local liquid_br = { [0] = math.huge, 200, 100, 50 } + local level_mul = { [0] = 1, 1.5, 2.5, 5 } + local res + res = math.huge + res = math.min(res, instant_br[minetest.get_item_group(name, 'dig_immediate')]) + res = math.min(res, oddly_br[ + minetest.get_item_group(name, 'oddly_breakable_by_hand') + ]) + res = math.min(res, crumbly_br[minetest.get_item_group(name, 'crumbly')]) + res = math.min(res, choppy_br[minetest.get_item_group(name, 'choppy')]) + res = math.min(res, snappy_br[minetest.get_item_group(name, 'snappy')]) + res = math.min(res, cracky_br[minetest.get_item_group(name, 'cracky')]) + res = math.min(res, liquid_br[minetest.get_item_group(name, 'liquid')]) + res = res * level_mul[minetest.get_item_group(name, 'level')] + + -- nodes without definition (like "air") get 0 as blast resistance + if res == math.huge then + res = 0 + end + + return res +end + +minetest.after(0, function() + -- Store node definitions by content ids to improve efficiency. + for name, def in pairs(minetest.registered_nodes) do + node_defs[minetest.get_content_id(name)] = def + def.groups.blast_resistance = get_blastres(name, def) + node_br[minetest.get_content_id(name)] = get_blastres(name) + end + setmetatable(node_defs, {}) +end) + +-- Compute the rays which make up a sphere with radius. Returns a list of rays +-- which can be used to trace explosions. This function is not efficient +-- (especially for larger radiuses), so the generated rays for various radiuses +-- should be cached and reused. +-- +-- Should be possible to improve by using a midpoint circle algorithm multiple +-- times to create the sphere, currently uses more of a brute-force approach. +local function compute_sphere_rays(radius) + local rays = {} + local sphere = {} + + for y = -radius, radius do + for z = -radius, radius do + for x = -radius, 0, 1 do + local d = x * x + y * y + z * z + if d <= radius * radius then + local pos = { x = x, y = y, z = z } + sphere[minetest.hash_node_position(pos)] = pos + break + end + end + end + end + + for y = -radius, radius do + for z = -radius, radius do + for x = radius, 0, -1 do + local d = x * x + y * y + z * z + if d <= radius * radius then + local pos = { x = x, y = y, z = z } + sphere[minetest.hash_node_position(pos)] = pos + break + end + end + end + end + + for x = -radius, radius do + for z = -radius, radius do + for y = -radius, 0, 1 do + local d = x * x + y * y + z * z + if d <= radius * radius then + local pos = { x = x, y = y, z = z } + sphere[minetest.hash_node_position(pos)] = pos + break + end + end + end + end + + for x = -radius, radius do + for z = -radius, radius do + for y = radius, 0, -1 do + local d = x * x + y * y + z * z + if d <= radius * radius then + local pos = { x = x, y = y, z = z } + sphere[minetest.hash_node_position(pos)] = pos + break + end + end + end + end + + for x = -radius, radius do + for y = -radius, radius do + for z = -radius, 0, 1 do + local d = x * x + y * y + z * z + if d <= radius * radius then + local pos = { x = x, y = y, z = z } + sphere[minetest.hash_node_position(pos)] = pos + break + end + end + end + end + + for x = -radius, radius do + for y = -radius, radius do + for z = radius, 0, -1 do + local d = x * x + y * y + z * z + if d <= radius * radius then + local pos = { x = x, y = y, z = z } + sphere[minetest.hash_node_position(pos)] = pos + break + end + end + end + end + + for _, pos in pairs(sphere) do + rays[#rays + 1] = vector.normalize(pos) + end + + return rays +end + +-- Traces the rays of an explosion, and updates the environment. +-- +-- Parameters: +-- pos - Where the rays in the explosion should start from +-- strength - The strength of each ray +-- raydirs - The directions for each ray +-- radius - The maximum distance each ray will go +-- +-- Note that this function has been very optimized, it contains much code which +-- has been inlined to avoid function calls and unnecessary table creation, +-- which makes it around 66 % faster. +local function trace_explode(pos, strength, raydirs, radius) + local vm = minetest.get_voxel_manip() + + -- We need node data that for all nodes within radius, plus one to do the + -- flying node check. In very rare cases we also need one extra radius. + local emin, emax = vm:read_from_map( + vector.subtract(pos, radius + 2), + vector.add(pos, radius + 2)) + local emin_x = emin.x + local emin_y = emin.y + local emin_z = emin.z + + local ystride = (emax.x - emin_x + 1) + local zstride = ystride * (emax.y - emin_y + 1) + local pos_x = pos.x + local pos_y = pos.y + local pos_z = pos.z + + local area = VoxelArea:new { + MinEdge = emin, + MaxEdge = emax + } + local data = vm:get_data() + local rnd = {} + local callbacks = {} + + for i = 1, #raydirs do + local rpos_x = pos.x + local rpos_y = pos.y + local rpos_z = pos.z + local rdir_x = raydirs[i].x + local rdir_y = raydirs[i].y + local rdir_z = raydirs[i].z + local rstr = strength + + for r = 0, radius do + local npos_x = math.floor(rpos_x + 0.5) + local npos_y = math.floor(rpos_y + 0.5) + local npos_z = math.floor(rpos_z + 0.5) + + local ndir_x = npos_x - math.floor(pos.x) + local ndir_y = npos_y - math.floor(pos.y) + local ndir_z = npos_z - math.floor(pos.z) + r = math.hypot(ndir_x, math.hypot(ndir_y, ndir_z)) + 1 + + local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride + + npos_x - emin_x + 1 + + local cid = data[idx] + local def = node_defs[cid] + local br = node_br[cid] + local hash = (npos_z + 32768) * 65536 * 65536 + + (npos_y + 32768) * 65536 + + npos_x + 32768 + + -- Every node gets a uniformly random value between one and two, this + -- gets multiplied by the blast resistance. This makes explosions + -- unpredictable and makes them do damage to the environment proportional + -- to the amount of TNTs in the blast. + if not rnd[idx] then + rnd[idx] = 2 * math.random() + end + + -- As the explosion expands, it will have more surface area, so the force + -- on the blocks will be lower. We simulate this by multiplying the + -- blast resistance by a factor. The formula for the surface area of a + -- sphere is `pi r^2', so we use `r * r' as the factor. + local res = br * r * r + if rstr >= res * rnd[idx] then + local params = callbacks[hash] + if not params or rstr > params.rstr then + callbacks[hash] = { + callback = def and def.on_blast_break or 1, + npos_x = npos_x, + npos_y = npos_y, + npos_z = npos_z, + rstr = rstr / (r * r), + idx = idx, + } + rstr = rstr - res + elseif rstr > params.rstr then + params.callback = def and def.on_blast_shock or 1 + params.npos_x = npos_x + params.npos_y = npos_y + params.npos_z = npos_z + params.rstr = rstr / (r * r) + end + else + local params = callbacks[hash] + if not callbacks[hash] then + callbacks[hash] = { + callback = def and def.on_blast_shock or 2, + npos_x = npos_x, + npos_y = npos_y, + npos_z = npos_z, + rstr = rstr / (r * r), + idx = idx + } + elseif rstr > params.rstr then + params.npos_x = npos_x + params.npos_y = npos_y + params.npos_z = npos_z + params.rstr = rstr / (r * r) + end + break + end + rpos_x = rpos_x + rdir_x + rpos_y = rpos_y + rdir_y + rpos_z = rpos_z + rdir_z + end + end + + -- Update entities + local objs = minetest.get_objects_inside_radius(pos, radius) + for _, obj in pairs(objs) do + local opos = obj:get_pos() + local npos_x = math.floor(opos.x + 0.5) + local npos_y = math.floor(opos.y + 1.0) + local npos_z = math.floor(opos.z + 0.5) + local hash = (npos_z + 32768) * 65536 * 65536 + + (npos_y + 32768) * 65536 + + npos_x + 32768 + local params = callbacks[hash] + + if not params then + break + end + + local def = minetest.registered_entities[obj.name] + local callback = def and def.on_blast_hit + local rstr = params.rstr + + local odir_x = opos.x - pos.x + local odir_y = opos.y - pos.y + if odir_y == 0 then + odir_y = 0.0000001 -- Avoiding odir_len becoming exactly zero + end + local odir_z = opos.z - pos.z + + local odir_len = math.hypot(odir_x, math.hypot(odir_y, odir_z)) + + odir_x = odir_x / odir_len + odir_y = odir_y / odir_len + odir_z = odir_z / odir_len + + local dmg = rstr * 0.2 + + if not callback or + callback(obj, rstr, { x = odir_x, y = odir_y, z = odir_z }) then + if not obj:get_armor_groups().immortal then + obj:punch(obj, 1.0, { + full_punch_interval = 1.0, + damage_groups = { fleshy = dmg } + }) + end + end + if not callback and not obj:is_player() then + local vel = obj:get_velocity() + if vel then + local push = rstr * 0.05 + vel.x = vel.x + odir_x * push + vel.y = vel.y + odir_y * push + vel.z = vel.z + odir_z * push + obj:set_velocity(vel) + end + end + if not callback and obj:is_player() then + local push = rstr * 0.05 + local vel = {} + vel.x = odir_x * push + vel.y = odir_y * push + vel.z = odir_z * push + obj:add_player_velocity(vel) + end + end + + -- How many nodes get destroyed by explosion (for logging) + local n_break = 0 + + -- Handle callbacks + for _, params in pairs(callbacks) do + local idx = params.idx + + if data[idx] ~= AIR_CID then + local callback = params.callback + local npos_x = params.npos_x + local npos_y = params.npos_y + local npos_z = params.npos_z + local rstr = params.rstr + + if callback == 1 then + n_break = n_break + 1 + data[idx] = AIR_CID + else + local ndir_x = npos_x - pos.x + local ndir_y = npos_y - pos.y + local ndir_z = npos_z - pos.z + local ndir_len = math.hypot(ndir_x, math.hypot(ndir_y, ndir_z)) + ndir_x = ndir_x / ndir_len + ndir_y = ndir_y / ndir_len + ndir_z = ndir_z / ndir_len + + if callback == 2 then + if rstr > 50 * rnd[idx] then + local push = rstr * 0.05 + + local npos2_x = math.floor(npos_x + ndir_x + 0.5) + local npos2_y = math.floor(npos_y + ndir_y + 0.5) + local npos2_z = math.floor(npos_z + ndir_z + 0.5) + + local idx2 = (npos2_z - emin_z) * zstride + (npos2_y - emin_y) * + ystride + npos2_x - emin_x + 1 + + local def2 = node_defs[data[idx2]] + + -- Check if the node can actually fly + if flying_nodes and def2 and (def2.liquidtype or 'none') == 'none' and + def2.buildable_to then + local npos = { x = npos_x, y = npos_y, z = npos_z } + local meta = minetest.get_meta(npos) + local node = minetest.get_node(npos) + node.level = minetest.get_node_level(npos) + local ent = minetest.add_entity(npos, '__builtin:falling_node') + ent:get_luaentity():set_node(node, meta and meta:to_table() or {}) + + ent:set_velocity({ + x = ndir_x * push, + y = ndir_y * push, + z = ndir_z * push + }) + + data[idx] = AIR_CID + end + end + else + local npos = { x = npos_x, y = npos_y, z = npos_z } + local ndir = { x = ndir_x, y = ndir_y, z = ndir_z } + + if callback(npos, rstr, ndir) then + data[idx] = AIR_CID + end + end + end + end + end + + -- Log explosion + minetest.log('action', 'Explosion at ' .. minetest.pos_to_string(pos) .. + ' with strength ' .. strength .. ' and radius ' .. radius .. + ' destroys ' .. n_break .. ' nodes') + + -- Update environment + vm:set_data(data) + vm:write_to_map(data) + vm:update_liquids() +end + +-- Create an undirected explosion with strength at pos. +-- +-- Parameters: +-- pos - The position where the explosion originates from +-- explosion_def - Table with properties that define the explosion +-- +-- Explosion definition properties: +-- strength - The blast strength of the explosion +-- shape - The shape of the explosion. It is an array of normalized vectors +-- which determine the direction of each ray in the explosion. When +-- omitted the shape becomes a sphere with appropriate number of +-- rays. +-- radius - The maximum distance each ray will go. Entities or nodes past +-- this radius will not be affected by the explosion. If omitted, +-- it is the cube root of the strength value. +function explosions.explode(pos, explosion_def) + assert(explosion_def) + local strength = explosion_def.strength + assert(strength) + local radius = explosion_def.radius or math.ceil(strength ^ (1 / 3)) + + local shape = explosion_def.shape + + if not shape then + if not sphere_shapes[radius] then + sphere_shapes[radius] = compute_sphere_rays(radius) + end + shape = sphere_shapes[radius] + end + + trace_explode(pos, strength, shape, radius) +end diff --git a/mods/explosions/settingtypes.txt b/mods/explosions/settingtypes.txt new file mode 100644 index 0000000..382c1df --- /dev/null +++ b/mods/explosions/settingtypes.txt @@ -0,0 +1,3 @@ +# If false then flying nodes are never thrown by explosions. +explosions_flying_nodes (Flying Nodes) bool true + diff --git a/mods/farbows/.luacheckrc b/mods/farbows/.luacheckrc new file mode 100644 index 0000000..4de6466 --- /dev/null +++ b/mods/farbows/.luacheckrc @@ -0,0 +1,19 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", + "mobkit" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/farbows/README.md b/mods/farbows/README.md new file mode 100644 index 0000000..9b6dff3 --- /dev/null +++ b/mods/farbows/README.md @@ -0,0 +1,23 @@ +# Minetest Mod: farbows + +Just like all the other bow mods but this time with Raycast. + +Depends: rcbows, default, farming + +## Features + +- Place/Rightclick to charge +- Punch/Leftclick to fire + +## Bows + +- The Wooden and Mese Bows only throw normal arrows. + +- The Flaming Bow can throw normal, fire, explosive or water arrows. +If you get several arrows in the inventory, it will be loaded the first one +(in the inventory the order is left-to-right and top-to-down). + +## License + +- Code: GPLv3.0 +- Textures: CC BY-SA 4.0 diff --git a/mods/farbows/init.lua b/mods/farbows/init.lua new file mode 100644 index 0000000..b2d3429 --- /dev/null +++ b/mods/farbows/init.lua @@ -0,0 +1,247 @@ +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +rcbows.register_arrow("farbows:e_arrow", { + damage = 5, + inventory_arrow = { + name = "farbows:inv_arrow", + description = S("Arrow"), + inventory_image = "farbows_arrow.png", + }, + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +minetest.register_craft({ + output = "farbows:inv_arrow 5", + type = "shaped", + recipe = { + {"", "", "default:steel_ingot"}, + {"", "default:stick", ""}, + {"farming:cotton", "", ""}, + } +}) + +rcbows.register_arrow("farbows:mese_arrow", { + damage = 8, + inventory_arrow = { + name = "farbows:inv_mese_arrow", + description = S("Mese Arrow"), + inventory_image = "farbows_mese_arrow.png", + }, + embed = { + texture = "farbows_arrow_stick.png", + groups = {"dirt", "wood", "leaf"}, + }, + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +minetest.register_craft({ + output = "farbows:inv_arrow 5", + type = "shaped", + recipe = { + {"", "", "default:steel_ingot"}, + {"", "default:stick", ""}, + {"farming:cotton", "", ""}, + } +}) + +rcbows.register_arrow("farbows:fire_arrow", { + projectile_texture = "farbows_proyectile_arrow", + damage = 7, + inventory_arrow = { + name = "farbows:inv_fire_arrow", + description = S("Fire Arrow"), + inventory_image = "farbows_arrow_fire.png", + }, + drop = "farbows:inv_arrow", + effects = { + replace_node = "fire:basic_flame", + trail_particle = "farbows_particle_fire.png", + }, + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +minetest.register_craft({ + output = "farbows:inv_fire_arrow 2", + type = "shaped", + recipe = { + {"", "", "default:steel_ingot"}, + {"", "default:torch", ""}, + {"farming:cotton", "", ""}, + } +}) + +rcbows.register_arrow("farbows:explosive_arrow", { + projectile_texture = "farbows_proyectile_arrow", + damage = 12, + inventory_arrow = { + name = "farbows:inv_explosive_arrow", + description = S("Explosive Arrow"), + inventory_image = "farbows_arrow_explosive.png", + }, + drop = "", + effects = { + explosion = { + mod = "tnt", + damage = 3, + radius = 5, + }, + trail_particle = "farbows_particle_fire.png", + }, + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +minetest.register_craft({ + output = "farbows:inv_explosive_arrow", + type = "shaped", + recipe = { + {"", "", "default:steel_ingot"}, + {"", "default:stick", "tnt:tnt_stick"}, + {"farming:cotton", "", ""}, + } +}) + +rcbows.register_arrow("farbows:water_arrow", { + projectile_texture = "farbows_water_arrow", + damage = 2, + inventory_arrow = { + name = "farbows:inv_water_arrow", + description = S("Water Arrow"), + inventory_image = "farbows_arrow_water.png", + }, + drop = "bucket:bucket_empty", + effects = { + trail_particle = "default_water.png", + water = { + radius = 5, + flame_node = "fire:basic_flame", + particles = true, + }, + }, + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +minetest.register_craft({ + output = "farbows:inv_water_arrow", + type = "shaped", + recipe = { + {"", "", "default:steel_ingot"}, + {"", "default:stick", "bucket:bucket_water"}, + {"farming:cotton", "", ""}, + } +}) + +rcbows.register_bow("farbows:bow_wood", { + description = S("Wooden Far Bow"), + image = "farbows_bow_wood.png", + strength = 30, + uses = 150, + charge_time = 0.5, + recipe = { + {"", "group:wood", "farming:string"}, + {"group:wood", "", "farming:string"}, + {"", "group:wood", "farming:string"}, + }, + base_texture = "farbows_base_bow_wood.png", + overlay_empty = "farbows_overlay_empty.png", + overlay_charged = "farbows_overlay_charged.png", + arrows = "farbows:e_arrow", + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +rcbows.register_bow("farbows:bow_mese", { + description = S("Mese Far Bow"), + image = "farbows_bow_mese.png", + strength = 60, + uses = 800, + charge_time = 0.8, + recipe = { + {"", "default:mese_crystal", "farming:string"}, + {"default:mese_crystal", "", "farming:string"}, + {"", "default:mese_crystal", "farming:string"}, + }, + base_texture = "farbows_base_bow_mese.png", + overlay_empty = "farbows_overlay_empty.png", + overlay_charged = "farbows_overlay_charged.png", + arrows = {"farbows:mese_arrow", "farbows:e_arrow"}, + sounds = { + max_hear_distance = 10, + gain = 0.4, + }, +}) + +rcbows.register_bow("farbows:bow_flaming", { + description = S("Flaming Far Bow"), + image = "farbows_bow_flaming.png", + strength = 100, + uses = 1500, + charge_time = 0.8, + recipe = { + {"", "default:obsidian_shard", "farming:string"}, + {"default:gold_lump", "", "farming:string"}, + {"", "default:obsidian_shard", "farming:string"}, + }, + base_texture = "farbows_base_bow_flaming.png", + overlay_empty = "farbows_overlay_empty.png", + overlay_charged = "farbows_overlay_flaming_charged.png", + arrows = {"farbows:explosive_arrow", "farbows:fire_arrow", "farbows:water_arrow", "farbows:e_arrow"}, + sounds = { + max_hear_distance = 10, + gain = 0.4, + } +}) + +rcbows.register_bow("farbows:crossbow", { + description = S("Crossbow"), + image = "farbows_crossbow.png", + strength = 80, + uses = 1000, + charge_time = 1.0, + recipe = { + {"", "group:wood", "farming:string"}, + {"farbows:tripwire", "", "farming:string"}, + {"", "group:wood", "farming:string"}, + }, + base_texture = "farbows_base_crossbow.png", + overlay_empty = "farbows_crossbow_overlay_empty.png", + overlay_charged = "farbows_crossbow_overlay_charged.png", + arrows = {"farbows:e_arrow"}, + sounds = { + max_hear_distance = 10, + gain = 0.4, + } +}) + +minetest.register_craftitem("farbows:tripwire", { + description = S("Tripwire Hook"), + inventory_image = "farbows_tripwire.png", +}) + + +minetest.register_craft({ + output = "farbows:tripwire 2", + type = "shaped", + recipe = { + {"", "default:steel_ingot", ""}, + {"", "default:stick", ""}, + {"", "group:wood", ""}, + } +}) diff --git a/mods/farbows/locale/farbows.es.tr b/mods/farbows/locale/farbows.es.tr new file mode 100644 index 0000000..f787dd7 --- /dev/null +++ b/mods/farbows/locale/farbows.es.tr @@ -0,0 +1,10 @@ +# textdomain: farbows +Arrow=Flecha +Wooden Far Bow=Arco largo de madera +Mese Far Bow=Arco largo de Mese +Crossbow=Ballesta +Flaming Far Bow=Arco largo flamígero +Fire Arrow=Flecha de fuego +Tripwire Hook=Gancho de cuerda +Explosive Arrow=Flecha explosiva +Water Arrow=Flecha extinguidora diff --git a/mods/farbows/mod.conf b/mods/farbows/mod.conf new file mode 100644 index 0000000..dd956f0 --- /dev/null +++ b/mods/farbows/mod.conf @@ -0,0 +1,2 @@ +name = farbows +depends = default, rcbows, farming, fire, tnt diff --git a/mods/farbows/textures/farbows_arrow.png b/mods/farbows/textures/farbows_arrow.png new file mode 100644 index 0000000..9963b33 Binary files /dev/null and b/mods/farbows/textures/farbows_arrow.png differ diff --git a/mods/farbows/textures/farbows_arrow_explosive.png b/mods/farbows/textures/farbows_arrow_explosive.png new file mode 100644 index 0000000..4e3fc29 Binary files /dev/null and b/mods/farbows/textures/farbows_arrow_explosive.png differ diff --git a/mods/farbows/textures/farbows_arrow_fire.png b/mods/farbows/textures/farbows_arrow_fire.png new file mode 100644 index 0000000..02a6790 Binary files /dev/null and b/mods/farbows/textures/farbows_arrow_fire.png differ diff --git a/mods/farbows/textures/farbows_arrow_stick.png b/mods/farbows/textures/farbows_arrow_stick.png new file mode 100644 index 0000000..5ebb9b2 Binary files /dev/null and b/mods/farbows/textures/farbows_arrow_stick.png differ diff --git a/mods/farbows/textures/farbows_arrow_water.png b/mods/farbows/textures/farbows_arrow_water.png new file mode 100644 index 0000000..8da84ef Binary files /dev/null and b/mods/farbows/textures/farbows_arrow_water.png differ diff --git a/mods/farbows/textures/farbows_base_bow_flaming.png b/mods/farbows/textures/farbows_base_bow_flaming.png new file mode 100644 index 0000000..6b40abc Binary files /dev/null and b/mods/farbows/textures/farbows_base_bow_flaming.png differ diff --git a/mods/farbows/textures/farbows_base_bow_mese.png b/mods/farbows/textures/farbows_base_bow_mese.png new file mode 100644 index 0000000..21e437e Binary files /dev/null and b/mods/farbows/textures/farbows_base_bow_mese.png differ diff --git a/mods/farbows/textures/farbows_base_bow_wood.png b/mods/farbows/textures/farbows_base_bow_wood.png new file mode 100644 index 0000000..883c0ef Binary files /dev/null and b/mods/farbows/textures/farbows_base_bow_wood.png differ diff --git a/mods/farbows/textures/farbows_base_crossbow.png b/mods/farbows/textures/farbows_base_crossbow.png new file mode 100644 index 0000000..2739d69 Binary files /dev/null and b/mods/farbows/textures/farbows_base_crossbow.png differ diff --git a/mods/farbows/textures/farbows_bow_flaming.png b/mods/farbows/textures/farbows_bow_flaming.png new file mode 100644 index 0000000..66fbff4 Binary files /dev/null and b/mods/farbows/textures/farbows_bow_flaming.png differ diff --git a/mods/farbows/textures/farbows_bow_mese.png b/mods/farbows/textures/farbows_bow_mese.png new file mode 100644 index 0000000..b9c8435 Binary files /dev/null and b/mods/farbows/textures/farbows_bow_mese.png differ diff --git a/mods/farbows/textures/farbows_bow_wood.png b/mods/farbows/textures/farbows_bow_wood.png new file mode 100644 index 0000000..396cf07 Binary files /dev/null and b/mods/farbows/textures/farbows_bow_wood.png differ diff --git a/mods/farbows/textures/farbows_crossbow.png b/mods/farbows/textures/farbows_crossbow.png new file mode 100644 index 0000000..9bbdd4a Binary files /dev/null and b/mods/farbows/textures/farbows_crossbow.png differ diff --git a/mods/farbows/textures/farbows_crossbow_overlay_charged.png b/mods/farbows/textures/farbows_crossbow_overlay_charged.png new file mode 100644 index 0000000..34fdc12 Binary files /dev/null and b/mods/farbows/textures/farbows_crossbow_overlay_charged.png differ diff --git a/mods/farbows/textures/farbows_crossbow_overlay_empty.png b/mods/farbows/textures/farbows_crossbow_overlay_empty.png new file mode 100644 index 0000000..287c0fb Binary files /dev/null and b/mods/farbows/textures/farbows_crossbow_overlay_empty.png differ diff --git a/mods/farbows/textures/farbows_mese_arrow.png b/mods/farbows/textures/farbows_mese_arrow.png new file mode 100644 index 0000000..523e508 Binary files /dev/null and b/mods/farbows/textures/farbows_mese_arrow.png differ diff --git a/mods/farbows/textures/farbows_overlay_charged.png b/mods/farbows/textures/farbows_overlay_charged.png new file mode 100644 index 0000000..4348b5f Binary files /dev/null and b/mods/farbows/textures/farbows_overlay_charged.png differ diff --git a/mods/farbows/textures/farbows_overlay_empty.png b/mods/farbows/textures/farbows_overlay_empty.png new file mode 100644 index 0000000..968fd02 Binary files /dev/null and b/mods/farbows/textures/farbows_overlay_empty.png differ diff --git a/mods/farbows/textures/farbows_overlay_flaming_charged.png b/mods/farbows/textures/farbows_overlay_flaming_charged.png new file mode 100644 index 0000000..a94ac81 Binary files /dev/null and b/mods/farbows/textures/farbows_overlay_flaming_charged.png differ diff --git a/mods/farbows/textures/farbows_particle_fire.png b/mods/farbows/textures/farbows_particle_fire.png new file mode 100644 index 0000000..66720e5 Binary files /dev/null and b/mods/farbows/textures/farbows_particle_fire.png differ diff --git a/mods/farbows/textures/farbows_tripwire.png b/mods/farbows/textures/farbows_tripwire.png new file mode 100644 index 0000000..4bd0609 Binary files /dev/null and b/mods/farbows/textures/farbows_tripwire.png differ diff --git a/mods/findbiome/README.md b/mods/findbiome/README.md new file mode 100644 index 0000000..04c6319 --- /dev/null +++ b/mods/findbiome/README.md @@ -0,0 +1,23 @@ +# Minetest mod: findbiome + +## Description +This is a mod to help with mod/game development for Minetest. +It adds a command (“findbiome”) to find a biome nearby and teleport you to it +and another command (“listbiomes”) to list biomes. + +Version: 1.0.1 + +## Known limitations +There's no guarantee you will always find the biome, even if it exists in the world. +This can happen if the biome is very obscure or small, but usually you should be +able to find the biome. + +If the biome could not be found, just move to somewhere else and try again. + +## Authors +- paramat (MIT License) +- Wuzzy (MIT License) + +See license.txt for license information. + +This mod is based on the algorithm of the "spawn" mod from Minetest Game 5.0.0. diff --git a/mods/findbiome/init.lua b/mods/findbiome/init.lua new file mode 100644 index 0000000..ce7fd97 --- /dev/null +++ b/mods/findbiome/init.lua @@ -0,0 +1,320 @@ +local S = minetest.get_translator("findbiome") + +local mod_biomeinfo = minetest.get_modpath("biomeinfo") ~= nil +local mg_name = minetest.get_mapgen_setting("mg_name") +local water_level = tonumber(minetest.get_mapgen_setting("water_level")) + +-- Calculate the maximum playable limit +local mapgen_limit = tonumber(minetest.get_mapgen_setting("mapgen_limit")) +local chunksize = tonumber(minetest.get_mapgen_setting("chunksize")) +local playable_limit = math.max(mapgen_limit - (chunksize + 1) * 16, 0) + +-- Parameters +------------- + +-- Resolution of search grid in nodes. +local res = 64 +-- Number of points checked in the square search grid (edge * edge). +local checks = 128 * 128 + +-- End of parameters +-------------------- + +-- Direction table + +local dirs = { + {x = 0, y = 0, z = 1}, + {x = -1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}, + {x = 1, y = 0, z = 0}, +} + +-- Returns true if pos is within the world boundaries +local function is_in_world(pos) + return not (math.abs(pos.x) > playable_limit or math.abs(pos.y) > playable_limit or math.abs(pos.z) > playable_limit) +end + +-- Checks if pos is within the biome's boundaries. If it isn't, places pos inside the boundaries. +local function adjust_pos_to_biome_limits(pos, biome_id) + local bpos = table.copy(pos) + local biome_name = minetest.get_biome_name(biome_id) + local biome = minetest.registered_biomes[biome_name] + if not biome then + minetest.log("error", "[findbiome] adjust_pos_to_biome_limits non-existing biome!") + return bpos, true + end + local axes = {"y", "x", "z"} + local out_of_bounds = false + for a=1, #axes do + local ax = axes[a] + local min, max + if biome[ax.."_min"] then + min = biome[ax.."_min"] + else + min = -playable_limit + end + if biome[ax.."_max"] then + max = biome[ax.."_max"] + else + max = playable_limit + end + min = tonumber(min) + max = tonumber(max) + if bpos[ax] < min then + out_of_bounds = true + bpos[ax] = min + if max-min > 16 then + bpos[ax] = math.max(bpos[ax] + 8, -playable_limit) + end + end + if bpos[ax] > max then + out_of_bounds = true + bpos[ax] = max + if max-min > 16 then + bpos[ax] = math.min(bpos[ax] - 8, playable_limit) + end + end + end + return bpos, out_of_bounds +end + +-- Find the special default biome +local function find_default_biome() + local all_biomes = minetest.registered_biomes + local biome_count = 0 + for b, biome in pairs(all_biomes) do + biome_count = biome_count + 1 + end + -- Trivial case: No biomes registered, default biome is everywhere. + if biome_count == 0 then + local y = minetest.get_spawn_level(0, 0) + if not y then + y = 0 + end + return { x = 0, y = y, z = 0 } + end + local pos = {} + -- Just check a lot of random positions + -- It's a crappy algorithm but better than nothing. + for i=1, 100 do + pos.x = math.random(-playable_limit, playable_limit) + pos.y = math.random(-playable_limit, playable_limit) + pos.z = math.random(-playable_limit, playable_limit) + local biome_data = minetest.get_biome_data(pos) + if biome_data and minetest.get_biome_name(biome_data.biome) == "default" then + return pos + end + end + return nil +end + +local function find_biome(pos, biomes) + pos = vector.round(pos) + -- Pos: Starting point for biome checks. This also sets the y co-ordinate for all + -- points checked, so the suitable biomes must be active at this y. + + -- Initial variables + + local edge_len = 1 + local edge_dist = 0 + local dir_step = 0 + local dir_ind = 1 + local success = false + local spawn_pos + local biome_ids + + -- Get next position on square search spiral + local function next_pos() + if edge_dist == edge_len then + edge_dist = 0 + dir_ind = dir_ind + 1 + if dir_ind == 5 then + dir_ind = 1 + end + dir_step = dir_step + 1 + edge_len = math.floor(dir_step / 2) + 1 + end + + local dir = dirs[dir_ind] + local move = vector.multiply(dir, res) + + edge_dist = edge_dist + 1 + + return vector.add(pos, move) + end + + -- Position search + local function search() + local attempt = 1 + while attempt < 3 do + for iter = 1, checks do + local biome_data = minetest.get_biome_data(pos) + -- Sometimes biome_data is nil + local biome = biome_data and biome_data.biome + for id_ind = 1, #biome_ids do + local biome_id = biome_ids[id_ind] + pos = adjust_pos_to_biome_limits(pos, biome_id) + local spos = table.copy(pos) + if biome == biome_id then + local good_spawn_height = pos.y <= water_level + 16 and pos.y >= water_level + local spawn_y = minetest.get_spawn_level(spos.x, spos.z) + if spawn_y then + spawn_pos = {x = spos.x, y = spawn_y, z = spos.z} + elseif not good_spawn_height then + spawn_pos = {x = spos.x, y = spos.y, z = spos.z} + elseif attempt >= 2 then + spawn_pos = {x = spos.x, y = spos.y, z = spos.z} + end + if spawn_pos then + local adjusted_pos, outside = adjust_pos_to_biome_limits(spawn_pos, biome_id) + if is_in_world(spawn_pos) and not outside then + return true + end + end + end + end + + pos = next_pos() + end + attempt = attempt + 1 + end + return false + end + local function search_v6() + if not mod_biomeinfo then return + false + end + for iter = 1, checks do + local found_biome = biomeinfo.get_v6_biome(pos) + for i = 1, #biomes do + local searched_biome = biomes[i] + if found_biome == searched_biome then + local spawn_y = minetest.get_spawn_level(pos.x, pos.z) + if spawn_y then + spawn_pos = {x = pos.x, y = spawn_y, z = pos.z} + if is_in_world(spawn_pos) then + return true + end + end + end + end + + pos = next_pos() + end + + return false + end + + if mg_name == "v6" then + success = search_v6() + else + -- Table of suitable biomes + biome_ids = {} + for i=1, #biomes do + local id = minetest.get_biome_id(biomes[i]) + if not id then + return nil, false + end + table.insert(biome_ids, id) + end + success = search() + end + return spawn_pos, success + +end + +local mods_loaded = false +minetest.register_on_mods_loaded(function() + mods_loaded = true +end) + +-- Regiver chat commands +do + minetest.register_chatcommand("findbiome", { + description = S("Find and teleport to biome"), + params = S(""), + privs = { debug = true, teleport = true }, + func = function(name, param) + if not mods_loaded then + return false + end + local player = minetest.get_player_by_name(name) + if not player then + return false, S("No player.") + end + local pos = player:get_pos() + local invalid_biome = true + if mg_name == "v6" then + if not mod_biomeinfo then + return false, S("Not supported. The “biomeinfo” mod is required for v6 mapgen support!") + end + local biomes = biomeinfo.get_active_v6_biomes() + for b=1, #biomes do + if param == biomes[b] then + invalid_biome = false + break + end + end + else + if param == "default" then + local biome_pos = find_default_biome() + if biome_pos then + player:set_pos(biome_pos) + return true, S("Biome found at @1.", minetest.pos_to_string(biome_pos)) + else + return false, S("No biome found!") + end + end + local id = minetest.get_biome_id(param) + if id then + invalid_biome = false + end + end + if invalid_biome then + return false, S("Biome does not exist!") + end + local biome_pos, success = find_biome(pos, {param}) + if success then + player:set_pos(biome_pos) + return true, S("Biome found at @1.", minetest.pos_to_string(biome_pos)) + else + return false, S("No biome found!") + end + end, + }) + + minetest.register_chatcommand("listbiomes", { + description = S("List all biomes"), + params = "", + privs = { debug = true }, + func = function(name, param) + if not mods_loaded then + return false + end + local biomes + local b = 0 + if mg_name == "v6" then + if not mod_biomeinfo then + return false, S("Not supported. The “biomeinfo” mod is required for v6 mapgen support!") + end + biomes = biomeinfo.get_active_v6_biomes() + b = #biomes + else + biomes = {} + for k,v in pairs(minetest.registered_biomes) do + table.insert(biomes, k) + b = b + 1 + end + end + if b == 0 then + return true, S("No biomes.") + else + table.sort(biomes) + for b=1, #biomes do + minetest.chat_send_player(name, biomes[b]) + end + return true + end + end, + }) +end diff --git a/mods/findbiome/license.txt b/mods/findbiome/license.txt new file mode 100644 index 0000000..a466aab --- /dev/null +++ b/mods/findbiome/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2018 paramat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/findbiome/locale/findbiome.de.tr b/mods/findbiome/locale/findbiome.de.tr new file mode 100644 index 0000000..d62332e --- /dev/null +++ b/mods/findbiome/locale/findbiome.de.tr @@ -0,0 +1,10 @@ +# textdomain: findbiome +Find and teleport to biome=Ein Biom finden und hinteleportieren += +No player.=Kein Spieler +Biome does not exist!=Biom existiert nicht! +Biome found at @1.=Biom gefunden bei @1. +No biome found!=Kein Biom gefunden! +List all biomes=Alle Biome auflisten +No biomes.=Keine Biome. +Not supported. The “biomeinfo” mod is required for v6 mapgen support!=Nicht unterstützt. Die Mod „biomeinfo“ wird für Unterstützung des v6-Kartengenerators benötigt. diff --git a/mods/findbiome/locale/template.txt b/mods/findbiome/locale/template.txt new file mode 100644 index 0000000..f3dcc19 --- /dev/null +++ b/mods/findbiome/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: findbiome +Find and teleport to biome= += +No player.= +Biome does not exist!= +Biome found at @1.= +No biome found!= +List all biomes= +No biomes.= +Not supported. The “biomeinfo” mod is required for v6 mapgen support!= diff --git a/mods/findbiome/mod.conf b/mods/findbiome/mod.conf new file mode 100644 index 0000000..a8ab4e3 --- /dev/null +++ b/mods/findbiome/mod.conf @@ -0,0 +1,3 @@ +name=findbiome +description=Add commands to list and find biomes +optional_depends=biomeinfo diff --git a/mods/fireworkz/.luacheckrc b/mods/fireworkz/.luacheckrc new file mode 100644 index 0000000..4de6466 --- /dev/null +++ b/mods/fireworkz/.luacheckrc @@ -0,0 +1,19 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", + "mobkit" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/fireworkz/LGPL (v2.1).md b/mods/fireworkz/LGPL (v2.1).md new file mode 100644 index 0000000..f98ef13 --- /dev/null +++ b/mods/fireworkz/LGPL (v2.1).md @@ -0,0 +1,159 @@ +GNU Lesser General Public License, version 2.1 + + The latest version of the LGPL, version 3 + Why you shouldn't use the Lesser GPL for your next library + What to do if you see a possible LGPL violation + Translations of LGPLv2.1 + The GNU Lesser General Public License version 2.1 (LGPLv2.1) in other formats: plain text, Texinfo, standalone HTML, Docbook, Markdown, ODF, RTF, and LaTeX + Old versions of the LGPL + +This GNU Lesser General Public License counts as the successor of the GNU Library General Public License. For an explanation of why this change was necessary, read the Why you shouldn't use the Lesser GPL for your next library article. +Table of Contents + + GNU LESSER GENERAL PUBLIC LICENSE + Preamble + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + How to Apply These Terms to Your New Libraries + +GNU LESSER GENERAL PUBLIC LICENSE + +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, 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 this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. + + (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), 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 distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +END OF TERMS AND CONDITIONS diff --git a/mods/fireworkz/LICENSE.md b/mods/fireworkz/LICENSE.md new file mode 100644 index 0000000..4ac4d8d --- /dev/null +++ b/mods/fireworkz/LICENSE.md @@ -0,0 +1,28 @@ +# Licenses + +This is a derivative work. + +- Source code of this copy: LGPLv2.1 +- Textures: Textures: CC BY-SA 4.0 (by runs) +- Sounds: Look at the sounds/LICENSE.md file. + +## Original code + +Author: googol +Minetest Mod: new_fireworks +Link: https://forum.minetest.net/viewtopic.php?t=16721 +Code: https://bitbucket.org/g00g01/new_fireworks/get/edaae6eeb27e.zip + +## Stated changes + +Date: May 08, 2020 + +- Totally new textures. +- Changed sounds. +- Fixed some style coding. +- Translation support. +- New craft for the rockets. +- New feature: Use the rockets (lef-click) to launch them in the pointed thing. +- New feature: Put the rockets (right-click) on ground and ignite them with a torch (configurable). +- Mesecons: "Firework Rocket Launcher". +- Bug Fixed: Always the first launching (since the server start) did not worked. diff --git a/mods/fireworkz/README.md b/mods/fireworkz/README.md new file mode 100644 index 0000000..98f8814 --- /dev/null +++ b/mods/fireworkz/README.md @@ -0,0 +1,27 @@ +# Fireworkz Mod + +A mod for Minetest. + +It adds some firework rockets. + +A fork of 'new_fireworks' mod from googol. + +## Instructions + +- Craft the rockets. +- Use the rockets (lef-click) to launch them in the pointed thing. +- Put the rockets (right-click) on the ground and ignite them with a torch (configurable). + +## Licenses + +- Source Code: LGPLv2.1+ +- Textures: CC BY-SA 4.0 (by runs) +- Sounds: See inside the 'sounds' folder. + +## Depends + +- default + + + + diff --git a/mods/fireworkz/depends.txt b/mods/fireworkz/depends.txt new file mode 100644 index 0000000..562cf63 --- /dev/null +++ b/mods/fireworkz/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/fireworkz/description.txt b/mods/fireworkz/description.txt new file mode 100644 index 0000000..f32ded1 --- /dev/null +++ b/mods/fireworkz/description.txt @@ -0,0 +1 @@ +This mod adds to the minetest Fireworks. diff --git a/mods/fireworkz/fireworkz.conf b/mods/fireworkz/fireworkz.conf new file mode 100644 index 0000000..f3ae8d0 --- /dev/null +++ b/mods/fireworkz/fireworkz.conf @@ -0,0 +1,6 @@ +#Sounds +igniter = default:torch +ignition_time = 3 +max_hear_distance_fuse = 5 +max_hear_distance_launch = 13 +max_hear_distance_bang = 90 diff --git a/mods/fireworkz/init.lua b/mods/fireworkz/init.lua new file mode 100644 index 0000000..3ed5faf --- /dev/null +++ b/mods/fireworkz/init.lua @@ -0,0 +1,428 @@ +fireworkz = {} + +--Variables +local modname = "fireworkz" +local modpath = minetest.get_modpath(modname) +local S = minetest.get_translator(minetest.get_current_modname()) + +--Settings +fireworkz.settings = {} +local settings = Settings(modpath .. "/fireworkz.conf") +fireworkz.settings.igniter = settings:get("igniter") or "default:torch" +fireworkz.settings.ignition_time = tonumber(settings:get("ignition_time")) or 3 +fireworkz.settings.max_hear_distance_fuse = tonumber(settings:get("max_hear_distance_fuse")) or 5 +fireworkz.settings.max_hear_distance_launch = tonumber(settings:get("max_hear_distance_launch")) or 13 +fireworkz.settings.max_hear_distance_bang = tonumber(settings:get("max_hear_distance_bang")) or 90 + +local variant_list = { + --{colour = "default", figure = "", form = "", desc = ""}, + {colour = "red", figure = "default", form = "", desc = S("Red")}, + {colour = "green", figure = "default", form = "", desc = S("Green")}, + {colour = "blue", figure = "default", form = "", desc = S("Blue")}, + {colour = "yellow", figure = "default", form = "", desc = S("Yellow")}, + {colour = "white", figure = "default", form = "", desc = S("White")}, + {colour = "red", figure = "ball", form = "", desc = S("Red")}, + {colour = "green", figure = "ball", form = "", desc = S("Green")}, + {colour = "blue", figure = "ball", form = "", desc = S("Blue")}, + {colour = "yellow", figure = "ball", form = "", desc = S("Yellow")}, + {colour = "white", figure = "ball", form = "", desc = S("White")}, + {colour = "red", figure = "custom", form = "love", desc = S("Red")}, + {colour = "blue_white_red", figure = "ball_default_love", form = "", desc = S("Blue-White-Love"), + rdt = { + {color = "blue", figure = "ball", form = ""}, + {color = "yellow", figure = "default", form = ""}, + --{color = "red", figure = "custom", form = "love"}, + } + }, + {colour = "green_yellow_red", figure = "ball_default_love", form = "", desc = S("Green-Yellow-Love"), + rdt = { + {color = "green", figure = "ball", form = ""}, + {color = "yellow", figure = "default", form = ""}, + {color = "red", figure = "custom", form = "love"}, + } + }, +} + +--Functions + +local function default_figure(r) + local tab = {} + local num = 1 + for x=-r, r, 0.02 do + for y=-r, r, 0.02 do + for z=-r, r, 0.02 do + if x*x + y*y + z*z <= r*r then + local v = math.random(21,35) --velocity + if math.random(1,2) > 1 then + local xrand = math.random(-5, 5) * 0.001 + local yrand = math.random(-5, 5) * 0.001 + local zrand = math.random(-5, 5) * 0.001 + tab[num] = {x=x+xrand, y=y+yrand, z=z+zrand, v=v} + end + num = num + 1 + end + end + end + end + return tab +end + +local function ball_figure(r) + local tab = {} + local num = 1 + for x= -r, r, 0.01 do + for y= -r, r, 0.01 do + for z= -r, r, 0.01 do + if x*x + y*y + z*z <= r*r and x*x + y*y + z*z >= (r-0.005) * (r-0.005) then + if math.random(1,4) > 1 then + local xrand = math.random(-3, 3) * 0.001 + local yrand = math.random(-3, 3) * 0.001 + local zrand = math.random(-3, 3) * 0.001 + tab[num] = {x= x+xrand, y= y+yrand, z= z+zrand, v= 43} + end + num = num + 1 + end + end + end + end + return tab +end + +local function custom_figure(form) + local tab = {} + if form == "love" then + tab[1] = {x=0,y=0,z=0,v=60} + tab[2] = {x=0,y=0,z=-0.02,v=60} + tab[3] = {x=0.01,y=0,z=-0.03,v=60} + tab[4] = {x=0.02,y=0,z=-0.04,v=60} + tab[5] = {x=0.03,y=0,z=-0.04,v=60} + tab[6] = {x=0.04,y=0,z=-0.03,v=60} + tab[7] = {x=0.05,y=0,z=-0.02,v=60} + tab[8] = {x=0.05,y=0,z=-0.01,v=60} + tab[9] = {x=0.04,y=0,z=0,v=60} + tab[10] = {x=0.04,y=0,z=0.01,v=60} + tab[11] = {x=0.03,y=0,z=0.02,v=60} + tab[12] = {x=0.02,y=0,z=0.03,v=60} + tab[13] = {x=0.01,y=0,z=0.04,v=60} + tab[14] = {x=0,y=0,z=0.05,v=60} + tab[15] = {x=-0.01,y=0,z=0.04,v=60} + tab[16] = {x=-0.02,y=0,z=0.03,v=60} + tab[17] = {x=-0.03,y=0,z=0.02,v=60} + tab[18] = {x=-0.04,y=0,z=0.01,v=60} + tab[19] = {x=-0.04,y=0,z=0,v=60} + tab[20] = {x=-0.05,y=0,z=-0.01,v=60} + tab[21] = {x=-0.05,y=0,z=-0.02,v=60} + tab[22] = {x=-0.04,y=0,z=-0.03,v=60} + tab[23] = {x=-0.03,y=0,z=-0.04,v=60} + tab[24] = {x=-0.02,y=0,z=-0.04,v=60} + tab[25] = {x=-0.01,y=0,z=-0.03,v=60} + else + tab[1] = {x=0,y=0,z=0,v=0} + end + return tab +end + +-- Activate fireworks + +local function partcl_gen(pos, tab, size_min, size_max, colour) + for _,i in pairs(tab) do + minetest.add_particle({ + pos = {x=pos.x, y=pos.y, z=pos.z}, + velocity = {x= i.x*i.v, y= i.y*i.v, z= i.z*i.v}, + acceleration = {x=0, y=-1.5, z=0}, + expirationtime = 3, + size = math.random(size_min, size_max), + --collisiondetection = true, + --collision_removal = false, + vertical = false, + animation = {type="vertical_frames", aspect_w=9, aspect_h=9, length = 3.5,}, + glow = 30, + texture = "anim_"..colour.."_star.png", + }) + end +end + + +-- Entity Definition +local rocket = { + physical = true, --collides with things + wield_image = "rocket_default.png", + collisionbox = {0, -0.5 ,0 ,0 ,0.5 ,0}, + visual = "sprite", + textures = {"rocket_default.png"}, + timer = 0, + rocket_firetime = 0, + rocket_flytime = 0, + rdt = {} -- rocket data table +} + +--Entity Registration +minetest.register_entity("fireworkz:rocket", rocket) + +function rocket:on_activate(staticdata) + minetest.sound_play("fireworkz_rocket", {pos=self.object:getpos(), max_hear_distance = fireworkz.settings.max_hear_distance_launch, gain = 1,}) + self.rocket_flytime = math.random(13,15)/10 + self.object:setvelocity({x=0, y=9, z=0}) + self.object:setacceleration({x= math.random(-5, 5), y= 33, z= math.random(-5, 5)}) +end + +-- Called periodically +function rocket:on_step(dtime) + self.timer = self.timer + dtime + self.rocket_firetime = self.rocket_firetime + dtime + if self.rocket_firetime > 0.1 then + local pos = self.object:getpos() + self.rocket_firetime = 0 + local xrand = math.random(-15, 15) / 10 + minetest.add_particle({ + pos = {x=pos.x, y=pos.y - 0.4, z=pos.z}, + velocity = {x=xrand, y=-3, z=xrand}, + acceleration = {x=0, y=0, z=0}, + expirationtime = 1.5, + size = 3, + collisiondetection = true, + vertical = false, + animation = {type="vertical_frames", aspect_w=9, aspect_h=9, length = 1.6,}, + glow = 10, + texture = "anim_white_star.png", + }) + end + if self.timer > self.rocket_flytime then + if #self.rdt > 0 then + minetest.sound_play("fireworkz_bang", {pos= self.object:get_pos(), max_hear_distance = fireworkz.settings.max_hear_distance_bang, gain = 3,}) + for _, i in pairs(self.rdt) do + local pos = self.object:getpos() + if i.figure == "ball" then + partcl_gen(pos, ball_figure(0.1), 4, 4, i.color) + elseif i.figure == "default" then + partcl_gen(pos, default_figure(0.1), 2, 4, i.color) + elseif i.figure == "custom" then + partcl_gen(pos, custom_figure(i.form), 7, 7, i.color) + end + end + end + self.object:remove() + end +end + +--Nodes +for _, i in pairs(variant_list) do + local figure_desc = "" + if i.figure == "default" then + figure_desc = S("Default") + elseif i.figure == "ball" then + figure_desc = S("Ball") + elseif i.figure == "ball_default_love" then + figure_desc = S("Love Ball") + elseif i.figure == "custom" then + figure_desc = S("Custom") + end + local inv_image = "rocket_" + if not(i.figure == "") then + inv_image = inv_image .. i.figure .. "_" + end + inv_image = inv_image .. i.colour .. ".png" + + local rdt = i.rdt or {{color = i.colour, figure = i.figure, form = i.form},} + + minetest.register_node("fireworkz:rocket_"..i.figure.."_"..i.colour, { + description = S("Rocket").." (".. i.desc .. "|"..figure_desc..")", + drawtype = "plantlike", + light_source = 5, + inventory_image = inv_image, + tiles = {"rocket_default.png"}, + wield_image = "rocket_default.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + groups = {choppy = 3, explody = 1, firework = 1}, + + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local wielded_item = clicker:get_wielded_item() + local wielded_item_name = wielded_item:get_name() + if wielded_item_name == fireworkz.settings.igniter then + minetest.sound_play("fireworkz_fuse", {pos= pos, fireworkz.settings.max_hear_distance_fuse, gain = 1,}) + minetest.after(fireworkz.settings.ignition_time, function(node, pos) + local rocket_node = minetest.get_node(pos) + if rocket_node.name == node.name then + minetest.remove_node(pos) + fireworkz.launch(pos, rdt) + end + end, node, pos) + end + end, + + on_use = function(itemstack, user, pointed_thing) + local pos = minetest.get_pointed_thing_position(pointed_thing, true) + if pos then + fireworkz.launch(pos, rdt) + end + end, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("firework:rdt", minetest.serialize(rdt)) + end, + }) +end + +fireworkz.launch = function(pos, rdt) + local obj = minetest.add_entity(pos, "fireworkz:rocket") --activate + local obj_ent = obj:get_luaentity() + obj_ent.rdt = rdt +end + +-- Craffitems + +minetest.register_craft({ + output = "fireworkz:rocket_default", + recipe = { + {"tnt:gunpowder"}, + {"default:paper"}, + {"default:coal_lump"} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_default_red", + recipe = { + {"default:tin_lump", "tnt:gunpowder", "dye:red"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_default_green", + recipe = { + {"default:tin_lump", "tnt:gunpowder", "dye:green"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_default_blue", + recipe = { + {"default:tin_lump", "tnt:gunpowder", "dye:blue"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_default_yellow", + recipe = { + {"default:tin_lump", "tnt:gunpowder", "dye:yellow"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_default_white", + recipe = { + {"default:tin_lump", "tnt:gunpowder", "dye:white"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_red", + recipe = { + {"default:iron_lump", "tnt:gunpowder", "dye:red"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_green", + recipe = { + {"default:iron_lump", "tnt:gunpowder", "dye:green"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_blue", + recipe = { + {"default:iron_lump", "tnt:gunpowder", "dye:blue"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_yellow", + recipe = { + {"default:iron_lump", "tnt:gunpowder", "dye:yellow"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_white", + recipe = { + {"default:iron_lump", "tnt:gunpowder", "dye:white"}, + {"", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_default_love_blue_white_red", + recipe = { + {"default:mese_crystal", "tnt:gunpowder", "dye:blue"}, + {"dye:white", "default:paper", ""}, + {"", "default:coal_lump", ""} + }, +}) + +minetest.register_craft({ + output = "fireworkz:rocket_ball_default_love_green_yellow_red", + recipe = { + {"default:diamond", "tnt:gunpowder", "dye:green"}, + {"dye:yellow", "default:paper", "dye:red"}, + {"", "default:coal_lump", ""} + }, +}) + +--Mesecons Support + +if minetest.get_modpath("mesecons") ~= nil then + minetest.register_node("fireworkz:launcher", { + description = S("Firework Rocket Launcher"), + tiles = {"fireworkz_rocket_launcher.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), + mesecons = {effector = { + action_on = function (pos, node) + pos.y = pos. y + 1 + local node = minetest.get_node_or_nil(pos) + if node then + if node.name:sub(1, 16) == "fireworkz:rocket" then + local meta = minetest.get_meta(pos) + local rdt = minetest.deserialize(meta:get_string("firework:rdt")) + minetest.remove_node(pos) + fireworkz.launch(pos, rdt) + end + end + end, + }} + }) + minetest.register_craft({ + output = "fireworkz:launcher", + type = "shaped", + recipe = { + {"", "tnt:gunpowder", ""}, + {"", "default:mese", ""}, + {"", "default:steelblock", ""} + }, + }) +end diff --git a/mods/fireworkz/locale/fireworkz.es.tr b/mods/fireworkz/locale/fireworkz.es.tr new file mode 100644 index 0000000..4c23d6a --- /dev/null +++ b/mods/fireworkz/locale/fireworkz.es.tr @@ -0,0 +1,14 @@ +# textdomain: fireworkz +Rocket=Cohete +Red=Rojo +Green=Verde +Blue=Azul +Yellow=Amarillo +White=Blanco +Blue-White-Love=Amor blanco-azulado +Green-Yellow-Love=Amor verde-amarillo +Default=Defecto +Ball=Bola +Love Ball=Bola de amor +Custom=Personalizado +Firework Rocket Launcher=Lanzador de fuegos artificiales diff --git a/mods/fireworkz/mod.conf b/mods/fireworkz/mod.conf new file mode 100644 index 0000000..986ca23 --- /dev/null +++ b/mods/fireworkz/mod.conf @@ -0,0 +1,3 @@ +name = fireworkz +depends = default, tnt +optional_depends = mesecons diff --git a/mods/fireworkz/sounds/LICENSE.md b/mods/fireworkz/sounds/LICENSE.md new file mode 100644 index 0000000..044f37d --- /dev/null +++ b/mods/fireworkz/sounds/LICENSE.md @@ -0,0 +1,16 @@ +#Sound Licenses + +File: fireworkz_fuse.ogg +Author: j1987 +License: This work is licensed under the Creative Commons 0 License. +URL: https://freesound.org/people/j1987/sounds/140715/ + +File: fireworks_rocket.ogg +Author: Stephan +License: Public Domain (CC0 equivalent) +URL: http://soundbible.com/692-Fireworks.html + +File: fireworks_bang.ogg +File: MrAuralization +License: This work is licensed under the Attribution License. (CC) +URL: https://freesound.org/people/MrAuralization/sounds/212677/ diff --git a/mods/fireworkz/sounds/fireworkz_bang.ogg b/mods/fireworkz/sounds/fireworkz_bang.ogg new file mode 100644 index 0000000..17adac3 Binary files /dev/null and b/mods/fireworkz/sounds/fireworkz_bang.ogg differ diff --git a/mods/fireworkz/sounds/fireworkz_fuse.ogg b/mods/fireworkz/sounds/fireworkz_fuse.ogg new file mode 100644 index 0000000..902d470 Binary files /dev/null and b/mods/fireworkz/sounds/fireworkz_fuse.ogg differ diff --git a/mods/fireworkz/sounds/fireworkz_rocket.ogg b/mods/fireworkz/sounds/fireworkz_rocket.ogg new file mode 100644 index 0000000..31ed818 Binary files /dev/null and b/mods/fireworkz/sounds/fireworkz_rocket.ogg differ diff --git a/mods/fireworkz/textures/anim_blue_star.png b/mods/fireworkz/textures/anim_blue_star.png new file mode 100644 index 0000000..0de81ec Binary files /dev/null and b/mods/fireworkz/textures/anim_blue_star.png differ diff --git a/mods/fireworkz/textures/anim_green_star.png b/mods/fireworkz/textures/anim_green_star.png new file mode 100644 index 0000000..ea54db3 Binary files /dev/null and b/mods/fireworkz/textures/anim_green_star.png differ diff --git a/mods/fireworkz/textures/anim_red_star.png b/mods/fireworkz/textures/anim_red_star.png new file mode 100644 index 0000000..ae29d94 Binary files /dev/null and b/mods/fireworkz/textures/anim_red_star.png differ diff --git a/mods/fireworkz/textures/anim_white_star.png b/mods/fireworkz/textures/anim_white_star.png new file mode 100644 index 0000000..487705a Binary files /dev/null and b/mods/fireworkz/textures/anim_white_star.png differ diff --git a/mods/fireworkz/textures/anim_yellow_star.png b/mods/fireworkz/textures/anim_yellow_star.png new file mode 100644 index 0000000..22bde83 Binary files /dev/null and b/mods/fireworkz/textures/anim_yellow_star.png differ diff --git a/mods/fireworkz/textures/fireworkz_rocket_launcher.png b/mods/fireworkz/textures/fireworkz_rocket_launcher.png new file mode 100644 index 0000000..db090b4 Binary files /dev/null and b/mods/fireworkz/textures/fireworkz_rocket_launcher.png differ diff --git a/mods/fireworkz/textures/rocket_ball_blue.png b/mods/fireworkz/textures/rocket_ball_blue.png new file mode 100644 index 0000000..af18a67 Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_blue.png differ diff --git a/mods/fireworkz/textures/rocket_ball_default_love_blue_white_red.png b/mods/fireworkz/textures/rocket_ball_default_love_blue_white_red.png new file mode 100644 index 0000000..de9e413 Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_default_love_blue_white_red.png differ diff --git a/mods/fireworkz/textures/rocket_ball_default_love_green_yellow_red.png b/mods/fireworkz/textures/rocket_ball_default_love_green_yellow_red.png new file mode 100644 index 0000000..0288d34 Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_default_love_green_yellow_red.png differ diff --git a/mods/fireworkz/textures/rocket_ball_green.png b/mods/fireworkz/textures/rocket_ball_green.png new file mode 100644 index 0000000..45c55a8 Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_green.png differ diff --git a/mods/fireworkz/textures/rocket_ball_red.png b/mods/fireworkz/textures/rocket_ball_red.png new file mode 100644 index 0000000..c143e5a Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_red.png differ diff --git a/mods/fireworkz/textures/rocket_ball_white.png b/mods/fireworkz/textures/rocket_ball_white.png new file mode 100644 index 0000000..f9cd983 Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_white.png differ diff --git a/mods/fireworkz/textures/rocket_ball_yellow.png b/mods/fireworkz/textures/rocket_ball_yellow.png new file mode 100644 index 0000000..3ec60ed Binary files /dev/null and b/mods/fireworkz/textures/rocket_ball_yellow.png differ diff --git a/mods/fireworkz/textures/rocket_custom_red.png b/mods/fireworkz/textures/rocket_custom_red.png new file mode 100644 index 0000000..9af5780 Binary files /dev/null and b/mods/fireworkz/textures/rocket_custom_red.png differ diff --git a/mods/fireworkz/textures/rocket_default.png b/mods/fireworkz/textures/rocket_default.png new file mode 100644 index 0000000..ddeb986 Binary files /dev/null and b/mods/fireworkz/textures/rocket_default.png differ diff --git a/mods/fireworkz/textures/rocket_default_blue.png b/mods/fireworkz/textures/rocket_default_blue.png new file mode 100644 index 0000000..d1b2ce0 Binary files /dev/null and b/mods/fireworkz/textures/rocket_default_blue.png differ diff --git a/mods/fireworkz/textures/rocket_default_green.png b/mods/fireworkz/textures/rocket_default_green.png new file mode 100644 index 0000000..31e1c41 Binary files /dev/null and b/mods/fireworkz/textures/rocket_default_green.png differ diff --git a/mods/fireworkz/textures/rocket_default_red.png b/mods/fireworkz/textures/rocket_default_red.png new file mode 100644 index 0000000..a5f6e7d Binary files /dev/null and b/mods/fireworkz/textures/rocket_default_red.png differ diff --git a/mods/fireworkz/textures/rocket_default_white.png b/mods/fireworkz/textures/rocket_default_white.png new file mode 100644 index 0000000..ea8e073 Binary files /dev/null and b/mods/fireworkz/textures/rocket_default_white.png differ diff --git a/mods/fireworkz/textures/rocket_default_yellow.png b/mods/fireworkz/textures/rocket_default_yellow.png new file mode 100644 index 0000000..ad251c6 Binary files /dev/null and b/mods/fireworkz/textures/rocket_default_yellow.png differ diff --git a/mods/fishing/credits.txt b/mods/fishing/credits.txt new file mode 100644 index 0000000..1617ecd --- /dev/null +++ b/mods/fishing/credits.txt @@ -0,0 +1,6 @@ +-------------------- +CREDITS FOR TEXTURES +-------------------- + +- John Smith Legacy +https://www.johnsmithlegacy.co.uk/ diff --git a/mods/fishing/depends.txt b/mods/fishing/depends.txt new file mode 100644 index 0000000..331d858 --- /dev/null +++ b/mods/fishing/depends.txt @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/mods/fishing/fishing.lua b/mods/fishing/fishing.lua new file mode 100644 index 0000000..a38d3d5 --- /dev/null +++ b/mods/fishing/fishing.lua @@ -0,0 +1,238 @@ + +local modpath, S = ... + +fishing = { + isfishing= false, + timeout= 120.0, + fishes ={}, + get_nodehabitat = function(pointed_thing) + local node = minetest.get_node(pointed_thing.under).name + local node_habitat + if node == "default:water_source" then + node_habitat = "sea" + elseif node == "default:river_water_source" then + node_habitat = "river" + else + node_habitat = nil + end + return node_habitat + end, + registerfish = function(fish) + --habitats are "river", "sea" or "clutter" + fishing.fishes[#fishing.fishes+1] = fish + end, + --custom function to get only array values of tables, not keys + arrayvalues = function(arr) + local i = 0 + return function() i = i + 1; return arr[i] end + end, + registerfishes = function() + local i + for fish in fishing.arrayvalues(fishing.fishes) do + minetest.register_craftitem(fish.name, { + description = S(fish.description), + inventory_image = fish.inventory_image..".png", + wield_image = fish.wield_image..".png", + groups = {food = 3, fish = 3, flammable = 3}, + on_use = minetest.item_eat(fish.hp_cooked_eat), + }) + if not(fish.habitat == "clutter") then + minetest.register_craftitem(fish.name.."_cooked", { + description = S(fish.description.." ".."Cooked"), + inventory_image = fish.inventory_image.."_cooked.png", + wield_image = fish.wield_image.."_cooked.png", + groups = {food = 3, fish = 3, flammable = 3}, + on_use = minetest.item_eat(fish.hp_cooked_eat), + }) + minetest.register_craft({ + type = "cooking", + output = fish.name.."_cooked", + recipe = fish.name, + cooktime = fish.cooktime, + }) + end + end + end, +} + +-- Register Raw Fishes +fishing.registerfish{name="fishing:salmon", description="Salmon", habitat= "river", inventory_image="fishing_salmon", wield_image="fishing_salmon", hp_raw_eat=1, hp_cooked_eat=3, cooktime = 2} +fishing.registerfish{name="fishing:pufferfish", description="Pufferfish", habitat= "sea", inventory_image="fishing_pufferfish", wield_image="fishing_pufferfish", hp_raw_eat=-5, hp_cooked_eat=-3, cooktime = 2} +fishing.registerfish{name="fishing:sole", description="Sole", habitat= "sea", inventory_image="fishing_sole", wield_image="fishing_sole", hp_raw_eat=1, hp_cooked_eat=3, cooktime = 2} +fishing.registerfish{name="fishing:gilt_head_bream", description="Gilt Head Bream", habitat= "sea", inventory_image="fishing_gilt_head_bream", wield_image="fishing_gilt_head_bream", hp_raw_eat=1, hp_cooked_eat=3, cooktime = 2} +fishing.registerfish{name="fishing:snapper", description="Snapper", habitat= "sea", inventory_image="fishing_snapper", wield_image="fishing_snapper", hp_raw_eat=1, hp_cooked_eat=2, cooktime = 2} +fishing.registerfish{name="fishing:pufferfish", description="Pufferfish", habitat= "sea", inventory_image="fishing_pufferfish", wield_image="fishing_pufferfish", hp_raw_eat=-5, hp_cooked_eat=-3, cooktime = 2} +fishing.registerfish{name="fishing:clownfish", description="Clownfish", habitat= "sea", inventory_image="fishing_clownfish", wield_image="fishing_clownfish", hp_raw_eat=1, hp_cooked_eat=2, cooktime = 2} +fishing.registerfish{name="fishing:trout", description="Trout", habitat= "river", inventory_image="fishing_trout", wield_image="fishing_trout", hp_raw_eat=1, hp_cooked_eat=2, cooktime = 2} +fishing.registerfish{name="fishing:diamond_ring", description="Diamond Ring", habitat= "clutter", inventory_image="fishing_diamond_ring", wield_image="fishing_diamond_ring", nil, nil, nil} + +-- Register Raw & Cooked Fishes and cooking crafts +fishing.registerfishes() + +minetest.register_craft({ + type = "shaped", + output = "fishing:diamond_ring", + recipe = { + {"", "", ""}, + {"", "default:diamond", ""}, + {"", "default:steel_ingot", ""}, + } +}) + +minetest.register_craft({ + type = "cooking", + output = "default:diamond", + recipe = "fishing:diamond_ring", + cooktime = 3, +}) + +-- Worm +minetest.register_craftitem("fishing:worm", { + description = S("Worm"), + inventory_image = "fishing_worm.png", + wield_image = "fishing_worm.png", +}) + +-- Fishing Rod +minetest.register_craftitem("fishing:fishing_rod", { + description = S("Fishing Rod"), + inventory_image = "fishing_rod.png", + wield_image = "fishing_rod.png", +}) + +minetest.register_craft({ + output = "fishing:fishing_rod", + recipe = { + {"","","default:stick"}, + {"", "default:stick", "farming:string"}, + {"default:stick", "", "farming:string"}, + } +}) + +-- Sift through 2 Dirt Blocks to find Worm +minetest.register_craft({ + output = "fishing:worm", + recipe = { + {"default:dirt","default:dirt"}, + } +}) + +local function fishing_rod_node_timer(pos, elapsed) + +end + +-- Fishing Rod (Baited) +minetest.register_craftitem("fishing:fishing_rod_baited", { + description = S("Baited Fishing Rod"), + inventory_image = "fishing_rod_baited.png", + wield_image = "fishing_rod_wield.png", + --wield_keyframes = {{x = 0, y = 0, z = 20, duration = 5}}, + stack_max = 1, + liquids_pointable = true, + on_timer = fishing_rod_node_timer, + on_use = function (itemstack, user, pointed_thing) + + if pointed_thing.type ~= "node" then + return + end + + --local pos= minetest.get_pointed_thing_position(pointed_thing, above) + + --if fishing.isfishing == false and node_habitat ~= nil then + --fishing.isfishing = true + --itemstack.wield_image = "fishing_rod_baited.png" + --minetest.get_node_timer(pos):start(fishing.timeout) + --else + --fishing.isfishing = false + --wield_image = "fishing_rod_wield.png" + --minetest.get_node_timer(pos):stop() + --return + --end + + local node_habitat = fishing.get_nodehabitat(pointed_thing) + + if (node_habitat ~= nil and math.random(1, 100) < 10) then + --Search for fishes accordingly habitat + local fish + local fishesbyhabitat = {} + for fish in fishing.arrayvalues(fishing.fishes) do + if fish.habitat == node_habitat then + fishesbyhabitat[#fishesbyhabitat+1] = fish + end + end + + local fishedfish = fishesbyhabitat[math.random(1, #fishesbyhabitat)] + + local fishedfish_name = fishedfish[1] + + --minetest.chat_send_player("singleplayer", fishedfish_name) + + --local chance_diamond_ring= math.random(1, 100) + + --if chance_diamond_ring < 2 then + --fishtype= fishing.fish[5] + --end + + local inv = user:get_inventory() + + if inv:room_for_item("main", {name = fishedfish_name}) then + + local user_pos = user:getpos() + user_pos.y = user_pos.y+0.5 + + local fish_pos = minetest.get_pointed_thing_position(pointed_thing, above) + + local vel = vector.multiply(vector.subtract(user_pos, fish_pos), 1) + vel.y = vel.y + 0.6 + + minetest.add_particlespawner({ + amount = 5, + time = 1, + minpos = fish_pos, + maxpos = fish_pos, + minvel = {x=1, y=1, z=0}, + maxvel = {x=1, y=1, z=0}, + minacc = {x=1, y=1, z=1}, + maxacc = {x=1, y=1, z=1}, + minexptime = 1, + maxexptime = 1, + minsize = 1, + maxsize = 1, + collisiondetection = false, + vertical = false, + texture = "default_water.png", + playername = "singleplayer" + }) + + local fish_inv_img = minetest.registered_craftitems[fishedfish.name].inventory_image + + minetest.add_particle({ + pos = fish_pos, + velocity = vel, + acceleration = {x=1, y=1, z=1}, + expirationtime = 1, + size = 2, + collisiondetection = false, + vertical = false, + texture = fish_inv_img, + playername = "singleplayer" + }) + + minetest.sound_play("fishing") + + inv:add_item("main", {name = fishedfish.name}) + + return ItemStack("fishing:fishing_rod") + else + minetest.chat_send_player(user:get_player_name(), + S("Inventory full, Fish Got Away!")) + end + end + end, +}) + +minetest.register_craft({ + type = "shapeless", + output = "fishing:fishing_rod_baited", + recipe = {"fishing:fishing_rod", "fishing:worm"}, +}) diff --git a/mods/fishing/init.lua b/mods/fishing/init.lua new file mode 100644 index 0000000..b5fc55e --- /dev/null +++ b/mods/fishing/init.lua @@ -0,0 +1,8 @@ +local modname = "fishing" + +local modpath = minetest.get_modpath(modname) + +-- Load support for intllib. +local S = minetest.get_translator(minetest.get_current_modname()) + +assert(loadfile(modpath .. "/fishing.lua"))(modpath, S) diff --git a/mods/fishing/license.txt b/mods/fishing/license.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/mods/fishing/license.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/mods/fishing/locale/fishing.es.tr b/mods/fishing/locale/fishing.es.tr new file mode 100644 index 0000000..f07563d --- /dev/null +++ b/mods/fishing/locale/fishing.es.tr @@ -0,0 +1,21 @@ +# textdomain: fishing +Worm=Gusano +Fishing Rod=Caña de pescar +Baited Fishing Rod=Caña de pescar con cebo +Raw Fish=Pescado crudo +Salmon=Salmón +Salmon Cooked=Salmón cocinado +Pufferfish=Pez globo +Pufferfish Cooked=Pez globo cocinado +Clownfish=Pez payaso +Clownfish Cooked=Pez payaso cocinado +Trout=Trucha +Trout Cooked=Trucha cocinada +Gilt Head Bream=Dorada +Gilt Head Bream Cooked=Dorada cocinada +Snapper=Pargo +Snapper Cooked=Pargo cocinado +Sole=Lenguado +Sole Cooked=Lenguado cocinado +Diamond Ring=Anillo con diamante +Inventory full, Fish Got Away!=¡Tienes el inventario lleno, el pez se escapó! diff --git a/mods/fishing/sounds/fishing.ogg b/mods/fishing/sounds/fishing.ogg new file mode 100644 index 0000000..b5daa0f Binary files /dev/null and b/mods/fishing/sounds/fishing.ogg differ diff --git a/mods/fishing/textures/fishing_clownfish.png b/mods/fishing/textures/fishing_clownfish.png new file mode 100644 index 0000000..22b105c Binary files /dev/null and b/mods/fishing/textures/fishing_clownfish.png differ diff --git a/mods/fishing/textures/fishing_clownfish_cooked.png b/mods/fishing/textures/fishing_clownfish_cooked.png new file mode 100644 index 0000000..bb4f39a Binary files /dev/null and b/mods/fishing/textures/fishing_clownfish_cooked.png differ diff --git a/mods/fishing/textures/fishing_diamond_ring.png b/mods/fishing/textures/fishing_diamond_ring.png new file mode 100644 index 0000000..ec9da05 Binary files /dev/null and b/mods/fishing/textures/fishing_diamond_ring.png differ diff --git a/mods/fishing/textures/fishing_gilt_head_bream.png b/mods/fishing/textures/fishing_gilt_head_bream.png new file mode 100644 index 0000000..4ba319b Binary files /dev/null and b/mods/fishing/textures/fishing_gilt_head_bream.png differ diff --git a/mods/fishing/textures/fishing_gilt_head_bream_cooked.png b/mods/fishing/textures/fishing_gilt_head_bream_cooked.png new file mode 100644 index 0000000..ec5e460 Binary files /dev/null and b/mods/fishing/textures/fishing_gilt_head_bream_cooked.png differ diff --git a/mods/fishing/textures/fishing_pufferfish.png b/mods/fishing/textures/fishing_pufferfish.png new file mode 100644 index 0000000..f6b37c2 Binary files /dev/null and b/mods/fishing/textures/fishing_pufferfish.png differ diff --git a/mods/fishing/textures/fishing_pufferfish_cooked.png b/mods/fishing/textures/fishing_pufferfish_cooked.png new file mode 100644 index 0000000..1304b0c Binary files /dev/null and b/mods/fishing/textures/fishing_pufferfish_cooked.png differ diff --git a/mods/fishing/textures/fishing_rod.png b/mods/fishing/textures/fishing_rod.png new file mode 100644 index 0000000..199ae41 Binary files /dev/null and b/mods/fishing/textures/fishing_rod.png differ diff --git a/mods/fishing/textures/fishing_rod_baited.png b/mods/fishing/textures/fishing_rod_baited.png new file mode 100644 index 0000000..3998d8e Binary files /dev/null and b/mods/fishing/textures/fishing_rod_baited.png differ diff --git a/mods/fishing/textures/fishing_rod_wield.png b/mods/fishing/textures/fishing_rod_wield.png new file mode 100644 index 0000000..f15e9bb Binary files /dev/null and b/mods/fishing/textures/fishing_rod_wield.png differ diff --git a/mods/fishing/textures/fishing_salmon.png b/mods/fishing/textures/fishing_salmon.png new file mode 100644 index 0000000..3652a96 Binary files /dev/null and b/mods/fishing/textures/fishing_salmon.png differ diff --git a/mods/fishing/textures/fishing_salmon_cooked.png b/mods/fishing/textures/fishing_salmon_cooked.png new file mode 100644 index 0000000..0b01ada Binary files /dev/null and b/mods/fishing/textures/fishing_salmon_cooked.png differ diff --git a/mods/fishing/textures/fishing_snapper.png b/mods/fishing/textures/fishing_snapper.png new file mode 100644 index 0000000..f6fd022 Binary files /dev/null and b/mods/fishing/textures/fishing_snapper.png differ diff --git a/mods/fishing/textures/fishing_snapper_cooked.png b/mods/fishing/textures/fishing_snapper_cooked.png new file mode 100644 index 0000000..6c9dbe1 Binary files /dev/null and b/mods/fishing/textures/fishing_snapper_cooked.png differ diff --git a/mods/fishing/textures/fishing_sole.png b/mods/fishing/textures/fishing_sole.png new file mode 100644 index 0000000..04302f4 Binary files /dev/null and b/mods/fishing/textures/fishing_sole.png differ diff --git a/mods/fishing/textures/fishing_sole_cooked.png b/mods/fishing/textures/fishing_sole_cooked.png new file mode 100644 index 0000000..19001eb Binary files /dev/null and b/mods/fishing/textures/fishing_sole_cooked.png differ diff --git a/mods/fishing/textures/fishing_trout.png b/mods/fishing/textures/fishing_trout.png new file mode 100644 index 0000000..bc6e1e3 Binary files /dev/null and b/mods/fishing/textures/fishing_trout.png differ diff --git a/mods/fishing/textures/fishing_trout_cooked.png b/mods/fishing/textures/fishing_trout_cooked.png new file mode 100644 index 0000000..edf3856 Binary files /dev/null and b/mods/fishing/textures/fishing_trout_cooked.png differ diff --git a/mods/fishing/textures/fishing_worm.png b/mods/fishing/textures/fishing_worm.png new file mode 100644 index 0000000..ceb5fec Binary files /dev/null and b/mods/fishing/textures/fishing_worm.png differ diff --git a/mods/flower_pot/.gitignore b/mods/flower_pot/.gitignore new file mode 100644 index 0000000..ce3cbfc --- /dev/null +++ b/mods/flower_pot/.gitignore @@ -0,0 +1,2 @@ +# Backup files +*~ diff --git a/mods/flower_pot/LICENSE.txt b/mods/flower_pot/LICENSE.txt new file mode 100644 index 0000000..6f6a256 --- /dev/null +++ b/mods/flower_pot/LICENSE.txt @@ -0,0 +1,16 @@ +License for Code +---------------- + +Copyright (C) 2016 cd2 (cdqwertz) + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +http://www.gnu.org/licenses/lgpl-2.1.html + +License for Media +----------------- + +CC-BY-SA 3.0 UNPORTED. Created by cd2 (cdqwertz) diff --git a/mods/flower_pot/README.md b/mods/flower_pot/README.md new file mode 100644 index 0000000..1f3c97f --- /dev/null +++ b/mods/flower_pot/README.md @@ -0,0 +1,29 @@ +#flower pot mod +This mod adds some flower pots to your world. + +##License +see LICENSE.txt + +##Crafting +Flower Pot: + +| C | | C | +|---|---|---| +| C | | C | +| C | C | C | + + C : Clay Brick + +| F | D | | +|---|---|---| +| | | | +| | | | + + F : Flower Pot (empty) + D : Dirt/Sand + +##Bugs +Report bugs on the forum topic or open a issue on GitHub. + +##created by +cd2 (cdqwertz) - cdqwertz.github.io diff --git a/mods/flower_pot/depends.txt b/mods/flower_pot/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/mods/flower_pot/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/flower_pot/description.txt b/mods/flower_pot/description.txt new file mode 100644 index 0000000..27a1f90 --- /dev/null +++ b/mods/flower_pot/description.txt @@ -0,0 +1,17 @@ +This mod adds some flower pots to your world. + +Crafting: +Flower Pot: + +| C | - | C | +| C | - | C | +| C | C | C | + + C : Clay Brick + +| F | D | + + F : Flower Pot (empty) + D : Dirt/Sand + +created by cd2 (cdqwertz) - cdqwertz.github.io diff --git a/mods/flower_pot/init.lua b/mods/flower_pot/init.lua new file mode 100644 index 0000000..c335d37 --- /dev/null +++ b/mods/flower_pot/init.lua @@ -0,0 +1,79 @@ +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_node("flower_pot:flower_pot", { + description = S("Flower Pot"), + tiles = {"default_dirt.png^flower_pot_top.png","flower_pot_side.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = {{-1/2, -3/8, -1/2, 1/2, -2/8, 1/2}, + {-1/2, -1/2, -1/2, -3/8, 1/2, 1/2}, + {3/8, -1/2, -1/2, 1/2, 1/2, 1/2}, + {-1/2, -3/8, -1/2, 1/2, 1/2, -3/8}, + {-1/2, -3/8, 3/8, 1/2, 1/2, 1/2}, + {-3/8, 0, -3/8, 3/8, 15/32, 3/8}}, + }, + paramtype = "light", + is_ground_content = false, + groups = {cracky = 3, soil=3, grassland = 1, wet = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("flower_pot:flower_pot_sand", { + description = S("Flower Pot with Sand"), + tiles = {"default_desert_sand.png^flower_pot_top.png","flower_pot_side.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = {{-1/2, -3/8, -1/2, 1/2, -2/8, 1/2}, + {-1/2, -1/2, -1/2, -3/8, 1/2, 1/2}, + {3/8, -1/2, -1/2, 1/2, 1/2, 1/2}, + {-1/2, -3/8, -1/2, 1/2, 1/2, -3/8}, + {-1/2, -3/8, 3/8, 1/2, 1/2, 1/2}, + {-3/8, 0, -3/8, 3/8, 15/32, 3/8}}, + }, + paramtype = "light", + is_ground_content = false, + groups = {cracky = 3, soil=3, desert = 1, wet = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("flower_pot:flower_pot_empty", { + description = S("Flower Pot (empty)"), + tiles = {"flower_pot_side.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = {{-1/2, -3/8, -1/2, 1/2, -2/8, 1/2}, + {-1/2, -1/2, -1/2, -3/8, 1/2, 1/2}, + {3/8, -1/2, -1/2, 1/2, 1/2, 1/2}, + {-1/2, -3/8, -1/2, 1/2, 1/2, -3/8}, + {-1/2, -3/8, 3/8, 1/2, 1/2, 1/2}}, + }, + paramtype = "light", + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = "flower_pot:flower_pot_empty", + recipe = { + {"default:clay_brick", "", "default:clay_brick"}, + {"default:clay_brick", "", "default:clay_brick"}, + {"default:clay_brick", "default:clay_brick", "default:clay_brick"} + } +}) + +minetest.register_craft({ + type = "shapeless", + output = "flower_pot:flower_pot", + recipe = {"default:dirt", "flower_pot:flower_pot_empty"} +}) + +minetest.register_craft({ + type = "shapeless", + output = "flower_pot:flower_pot_sand", + recipe = {"group:sand", "flower_pot:flower_pot_empty"} +}) diff --git a/mods/flower_pot/locale/flower_pot.es.tr b/mods/flower_pot/locale/flower_pot.es.tr new file mode 100644 index 0000000..ae84c60 --- /dev/null +++ b/mods/flower_pot/locale/flower_pot.es.tr @@ -0,0 +1,4 @@ +# textdomain: flower_pot +Flower Pot=Maceta de flores +Flower Pot with Sand=Maceta de flores con arena +Flower Pot (empty)=Maceta de flores (vacía) \ No newline at end of file diff --git a/mods/flower_pot/screenshot.png b/mods/flower_pot/screenshot.png new file mode 100644 index 0000000..55737e0 Binary files /dev/null and b/mods/flower_pot/screenshot.png differ diff --git a/mods/flower_pot/textures/flower_pot_side.png b/mods/flower_pot/textures/flower_pot_side.png new file mode 100644 index 0000000..6e1da4e Binary files /dev/null and b/mods/flower_pot/textures/flower_pot_side.png differ diff --git a/mods/flower_pot/textures/flower_pot_top.png b/mods/flower_pot/textures/flower_pot_top.png new file mode 100644 index 0000000..287f83c Binary files /dev/null and b/mods/flower_pot/textures/flower_pot_top.png differ diff --git a/mods/guidebooks/.gitattributes b/mods/guidebooks/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/mods/guidebooks/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/mods/guidebooks/.gitignore b/mods/guidebooks/.gitignore new file mode 100644 index 0000000..6fd0a37 --- /dev/null +++ b/mods/guidebooks/.gitignore @@ -0,0 +1,41 @@ +# Compiled Lua sources +luac.out + +# luarocks build files +*.src.rock +*.zip +*.tar.gz + +# Object files +*.o +*.os +*.ko +*.obj +*.elf + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo +*.def +*.exp + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + diff --git a/mods/guidebooks/README.txt b/mods/guidebooks/README.txt new file mode 100644 index 0000000..6d8b17c --- /dev/null +++ b/mods/guidebooks/README.txt @@ -0,0 +1,71 @@ +guidebooks (c) by PolySaken + +guidebooks is licensed under a +Creative Commons Attribution-ShareAlike 4.0 International License. + +You should have received a copy of the license along with this +work. If not, see http://creativecommons.org/licenses/by-sa/4.0/ + +-- API -- + +- Creating a new book +guideBooks.Common.register_guideBook("modname:itemname", { --modname is the name of your mod, itemname is whatever you want + description_short="Book", -- The name of your book + description_long="A book about books", -- an optional field to give your book an extra description + inventory_image="modname_book.png", -- The image of the book when in the inventory + wield_image="modname_book_wield.png", -- An optional image of the book when in the hand + style={ -- a table of values that describe how your book looks + cover={ --- The very first page of your book + w=5, ---- how wide should the cover be? + h=8, ---- how tall should the cover be? + bg="modname_cover.png", ---- the file name of an image to use for the cover + next="modname_next.png" ---- the filename of an image to use for the 'next page' button + }, + page={ --- The generic page style + w=10, ---- How wide is the book? (2*cover width works best) + h=8, ---- How tall is the book? (usually same as cover height) + bg="modname_bg.png", ---- the background image for the open book + next="modname_next.png", ---- the filename of an image to use for the 'next page' button + prev="modname_prev.png", ---- the filename of an image to use for the 'previous page' button + start="modname_start.png" ---- the filename of an image to use for the 'first page' button + }, + buttonGeneric="modname_button.png", --- A generic button image + }, + ptype=false, -- When true, the book will only display text1 on each page +}) + + +-- Adding a section +currently a maximum of 28 sections per index is supported, meaning a book can store 784 sections if all of the sections in the main index are masters. +(this can be circumvented by building custom directories using the 'extra' field of a page, but is not recommended) + +guideBooks.Common.register_section( + "modname:itemname", -- The name of a registered book + "section_1", -- The name to give the section, only string values supported + { -- A list of preset values (you could also put page definitions here.) + description="Section 1", --- The display name of the section + hidden=false, --- Whether the section is visible in the main index (set to true to hide) + master=false, --- Whether this section leads to an index (set to true to create a new index under this section) + slave=false, --- Set to false to show in the main index, set to the name of another section to show in that index. cannot be used with master=true + Pages={ --- The pages to preload into the section (use only for certain instances when required) + Index={} ---- A special page used only by the 'Main' section that loads after the cover + }, + locked=false --- If this is true, only players with the meta field ::unlocked=="true" will be able to see this section + } +) + +The sections 'Hidden' and 'Main' exist in any book by default + +-- adding pages +guideBooks.Common.register_page( + "modname:itemname", -- The name of a registered book + "section_1", -- The name of a section in the book + 1, -- the page number (or name in the case of special pages such as Index) + { -- content definition + text1="foo bar", --- the text to display on the first half of the page + text2="lorem ipsum dolor sit amet", --- the text to display on the second half of the page + extra="background[0,0;5,8;modname_image.png;false]" --- A minetest formspec string used to add extra content to a page, such as an image + } +) + +The page 'Index' exists in the 'Main' section by default but can be overriden. diff --git a/mods/guidebooks/init.lua b/mods/guidebooks/init.lua new file mode 100644 index 0000000..995cfa3 --- /dev/null +++ b/mods/guidebooks/init.lua @@ -0,0 +1,304 @@ +-- API Documentation can be found in README.txt +guideBooks = {} +local c = {} +guideBooks.registered = {} +guideBooks.indices = {} +guideBooks.locks={} + +local genSecList=function(reg, meta, reader, book, def) + if not reg.sections.Main.Pages.Index.registered then + local y=-0.1 + local x=1 + local num=0 + local form=reg.pageTmp + for _,v in pairs(reg.sectionOrder) do + local _ = v + local v= reg.sections[_] + if _ ~= "Main" and _ ~= "Hidden" and not v.hidden and not v.slave and v.isUnLocked(reader, book:get_name(), _) then + if def.ptype then + if v.master then + form=form.."style[gotoM_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w)-2)..",0.7;"..def.style.buttonGeneric..";gotoM_".._..";"..(v.description or _).."]" + y=y+0.6 + num=num+1 + else + form=form.."style[goto_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w)-2)..",0.7;"..def.style.buttonGeneric..";goto_".._..";"..(v.description or _).."]" + y=y+0.6 + num=num+1 + end + else + if v.master then + form=form.."style[gotoM_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w/2)-2)..",0.5;"..def.style.buttonGeneric..";gotoM_".._..";"..(v.description or _).."]" + y=y+0.6 + num=num+1 + if num>13 then x=(def.style.page.w/2)+1 y=-0.1 num=0 end + else + form=form.."style[goto_".._..";border=false]image_button["..x..","..y..";"..((def.style.page.w/2)-2)..",0.5;"..def.style.buttonGeneric..";goto_".._..";"..(v.description or _).."]" + y=y+0.6 + num=num+1 + if num>13 then x=(def.style.page.w/2)+1 y=-0.1 num=0 end + end + end + end + end + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form) + meta:set_string("guidebooks:place", "Main:Index") + else + local form=reg.sections.Main.Pages.Index.form + if reg.sections.Main.Pages.Index.text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-1)..";;;"..reg.sections.Main.Pages.Index.text1.."]" end + if reg.sections.Main.Pages.Index.text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-1)..";;;"..reg.sections.Main.Pages.Index.text2.."]" end + form=form..reg.prevTmp + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form) + meta:set_string("guidebooks:place", "Main:Index") + end +end + +c.register_guideBook = function(name, def) + local _def = {} + + _def.ptype=def.ptype or false + + _def.description=def.description_short or string.split(name, ":")[1].." Guidebook" + if def.description_long then _def.description=_def.description.."\n"..def.description_long end + + _def.inventory_image=def.inventory_image or "guidebooks_book.png" + _def.wield_image=def.wield_image or _def.inventory_image + + _def.stack_max=1 + + _def.style={} + if def.style.cover then + _def.style.cover={w=def.style.cover.w or 5, h=def.style.cover.h or 8, bg=def.style.cover.bg or "guidebooks_cover.png", next=def.style.cover.next or "guidebooks_nxtBtn.png"} + else + _def.style.cover={w=5, h=8, bg="guidebooks_cover.png", next="guidebooks_nxtBtn.png"} + end + if def.style.page then + _def.style.page={w=def.style.page.w or 10, h=def.style.page.h or 8, bg=def.style.page.bg or "guidebooks_bg.png", next=def.style.page.next or "guidebooks_nxtBtn.png", prev=def.style.page.prev or "guidebooks_prvBtn.png", begn=def.style.page.start or "guidebooks_bgnBtn.png"} + else + _def.style.page= {w=10, h=8, bg="guidebooks_bg.png", next="guidebooks_nxtBtn.png", prev="guidebooks_prvBtn.png", begn="guidebooks_bgnBtn.png"} + end + + _def.style.buttonGeneric=def.style.buttonGeneric or "guidebooks_bscBtn.png" + + _def.groups={book=1, guide=1, flammable=1} + + minetest.register_craft({ + type="fuel", + recipe=name, + burntime=30 + }) + + _def.on_use=function(book, reader, pointed_thing) + local meta=book:get_meta() + local def=minetest.registered_items[book:get_name()] + local reg=guideBooks.registered[book:get_name()] + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + return book + end + + minetest.register_on_player_receive_fields(function(reader, formname, fields) + local book=reader:get_wielded_item() + local meta=book:get_meta() + if formname=="guideBooks:book_"..book:get_name() then + local def=minetest.registered_items[book:get_name()] + local reg=guideBooks.registered[book:get_name()] + local seg=string.split(meta:get_string("guidebooks:place"), ":") + if fields.beginning then + genSecList(reg, meta, reader, book, def) + elseif fields.next then + if #seg == 2 then + local pn=tonumber(seg[2]) + if type(pn)=="number" then + pn=pn+1 + if reg.sections[seg[1]] then + if reg.sections[seg[1]].Pages[pn] then + local form=reg.sections[seg[1]].Pages[pn].form + if reg.ptype then + if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w))..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end + else + if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end + if reg.sections[seg[1]].Pages[pn].text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text2.."]" end + end + if reg.sections[seg[1]].Pages[pn+1] then + form=form..reg.nextTmp + end + if reg.sections[seg[1]].Pages[pn-1] then + form=form..reg.prevTmp + end + meta:set_string("guidebooks:place", seg[1]..":"..pn) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form) + else + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + end + else + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + end + else + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + end + else + genSecList(reg, meta, reader, book, def) + end + minetest.after(0, function()reader:set_wielded_item(book)end) + elseif fields.prev then + if #seg == 2 then + local pn=tonumber(seg[2]) + if type(pn)=="number" then + pn=pn-1 + if reg.sections[seg[1]] then + if reg.sections[seg[1]].Pages[pn] then + local form=reg.sections[seg[1]].Pages[pn].form + if reg.ptype then + if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w))..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end + else + if reg.sections[seg[1]].Pages[pn].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text1.."]" end + if reg.sections[seg[1]].Pages[pn].text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-1)..";;;"..reg.sections[seg[1]].Pages[pn].text2.."]" end + end + if reg.sections[seg[1]].Pages[pn+1] then + form=form..reg.nextTmp + end + if reg.sections[seg[1]].Pages[pn-1] then + form=form..reg.prevTmp + end + meta:set_string("guidebooks:place", seg[1]..":"..pn) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form) + else + if meta:get_string("guidebooks:place")=="Main:Index" then + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + else + genSecList(reg, meta, reader, book, def) + end + end + else + if meta:get_string("guidebooks:place")=="Main:Index" then + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + else + genSecList(reg, meta, reader, book, def) + end + end + else + if meta:get_string("guidebooks:place")=="Main:Index" then + meta:set_string("guidebooks:place", nil) + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), reg.coverTmp) + else + genSecList(reg, meta, reader, book, def) + end + end + end + reader:set_wielded_item(book) + else + for _,v in pairs(reg.sections) do + if fields["goto_".._] then + if v.Pages[1] then + local form=v.Pages[1].form + if reg.ptype then + if v.Pages[1].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w))..","..(def.style.page.h-0.5)..";;;"..v.Pages[1].text1.."]" end + else + if v.Pages[1].text1 then form=form.."textarea[0.5,0.5;"..((def.style.page.w/2)-1)..","..(def.style.page.h-0.5)..";;;"..v.Pages[1].text1.."]" end + if v.Pages[1].text2 then form=form.."textarea["..((def.style.page.w/2)+0.5)..",0.5;"..((def.style.page.w/2)-0.5)..","..(def.style.page.h-0.5)..";;;"..v.Pages[1].text2.."]" end + end + if v.Pages[2] then + form=form..reg.nextTmp + end + meta:set_string("guidebooks:place", _..":".."1") + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form) + end + end + if fields["gotoM_".._] then + if v.master then + if guideBooks.indices[book:get_name().._] then + local y=-0.1 + local x=1 + local num=0 + local form=reg.pageTmp + for __,v in pairs(reg.sections) do + if v.slave and v.slave==_ and not v.hidden and v.isUnLocked(reader, book:get_name(), __) then + form=form.."style[goto_"..__..";border=false]image_button["..x..","..y..";"..((def.style.page.w/2)-2)..",0.5;"..def.style.buttonGeneric..";goto_"..__..";"..(v.description or _).."]" + y=y+0.6 + num=num+1 + if num>13 then x=(def.style.page.w/2)+1 y=-0.1 num=0 end + end + end + minetest.show_formspec(reader:get_player_name(), "guideBooks:book_"..book:get_name(), form) + meta:set_string("guidebooks:place", "Sub:Index") + end + end + end + end + reader:set_wielded_item(book) + end + end + end) + + local cover="".. + "size[".._def.style.cover.w..",".._def.style.cover.h.."]".. + "background[0,0;0,0;".._def.style.cover.bg..";true]".. + "style[next;border=false]".. + "image_button["..(_def.style.cover.w-0.7)..","..(_def.style.cover.h-0.5)..";1,1;".._def.style.cover.next..";next;]" + local page="".. + "size[".._def.style.page.w..",".._def.style.page.h.."]".. + "background[0,0;0,0;".._def.style.page.bg..";true]".. + "style[beginning;border=false]image_button[-0.3,-0.3;1,1;".._def.style.page.begn..";beginning;]" + + local next="style[next;border=false]image_button["..(_def.style.page.w-0.7)..","..(_def.style.page.h-0.5)..";1,1;".._def.style.page.next..";next;]" + local prev="style[prev;border=false]image_button[0,"..(_def.style.page.h-0.5)..";1,1;".._def.style.page.prev..";prev;]" + local begn="style[beginning;border=false]image_button[-0.3,-0.3;1,1;".._def.style.page.begn..";beginning;]" + + guideBooks.registered[name]={coverTmp=cover, pageTmp=page, nextTmp=next, prevTmp=prev, begnTmp=begn, sections={Main={Pages={Index={}}}, Hidden={Pages={}}}, sectionOrder={}, ptype=_def.ptype} + + minetest.register_craftitem(name, _def) +end + +c.register_section = function(book, name, def) + if guideBooks.registered[book] then + def.Pages = def.Pages or {} + if def.Pages.Index then + def.Pages.Index.Registered=true + end + def.name=name + if def.slave and def.master then error("Attempt to register slave as index") end + if def.slave then + if guideBooks.registered[book].sections[def.slave] and guideBooks.registered[book].sections[def.slave].master and guideBooks.indices[book..def.slave] then + guideBooks.indices[book..def.slave][name]=def + else + error("Attempt to register slave to non-existent master") + end + end + if def.master then + guideBooks.indices[book..name]={} + end + def.name=name + def.isUnLocked = function(player, book, section) + return (not def.locked) or player:get_meta():get_string(book..":"..section..":".."unlocked") == "true" + end + guideBooks.registered[book].sections[name]=def + guideBooks.registered[book].sectionOrder[#guideBooks.registered[book].sectionOrder+1]=name + else + error("Attempt to register section in non-existent guide") + end +end + +c.register_page = function(book, section, num, def) + if guideBooks.registered[book] then + if guideBooks.registered[book].sections[section] then + local _def={} + _def.registered=true + _def.form =def.form or guideBooks.registered[book].pageTmp + if def.extra then _def.form=_def.form..def.extra end + if def.text1 then _def.text1=def.text1 end + if def.text2 then _def.text2=def.text2 end + guideBooks.registered[book].sections[section].Pages[num]=_def + else + error("Attempt to register page in non-existent section") + end + else + error("Attempt to register page in non-existent guide") + end +end + +guideBooks.Common=c diff --git a/mods/guidebooks/license.txt b/mods/guidebooks/license.txt new file mode 100644 index 0000000..a314c88 --- /dev/null +++ b/mods/guidebooks/license.txt @@ -0,0 +1,427 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the Licensor. The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/mods/guidebooks/mod.conf b/mods/guidebooks/mod.conf new file mode 100644 index 0000000..caad1db --- /dev/null +++ b/mods/guidebooks/mod.conf @@ -0,0 +1,2 @@ +name = guidebooks +description = A library for registering functional in-game documentation 'guidebooks'. \ No newline at end of file diff --git a/mods/guidebooks/screenshot.png b/mods/guidebooks/screenshot.png new file mode 100644 index 0000000..eeff0e1 Binary files /dev/null and b/mods/guidebooks/screenshot.png differ diff --git a/mods/guidebooks/textures/guidebooks_bg.png b/mods/guidebooks/textures/guidebooks_bg.png new file mode 100644 index 0000000..c02e06f Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_bg.png differ diff --git a/mods/guidebooks/textures/guidebooks_bgnBtn.png b/mods/guidebooks/textures/guidebooks_bgnBtn.png new file mode 100644 index 0000000..cdb088c Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_bgnBtn.png differ diff --git a/mods/guidebooks/textures/guidebooks_book.png b/mods/guidebooks/textures/guidebooks_book.png new file mode 100644 index 0000000..72c9550 Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_book.png differ diff --git a/mods/guidebooks/textures/guidebooks_bscBtn.png b/mods/guidebooks/textures/guidebooks_bscBtn.png new file mode 100644 index 0000000..9b927f0 Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_bscBtn.png differ diff --git a/mods/guidebooks/textures/guidebooks_cover.png b/mods/guidebooks/textures/guidebooks_cover.png new file mode 100644 index 0000000..ae72702 Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_cover.png differ diff --git a/mods/guidebooks/textures/guidebooks_map.png b/mods/guidebooks/textures/guidebooks_map.png new file mode 100644 index 0000000..74e69dc Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_map.png differ diff --git a/mods/guidebooks/textures/guidebooks_nxtBtn.png b/mods/guidebooks/textures/guidebooks_nxtBtn.png new file mode 100644 index 0000000..ef1df33 Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_nxtBtn.png differ diff --git a/mods/guidebooks/textures/guidebooks_prvBtn.png b/mods/guidebooks/textures/guidebooks_prvBtn.png new file mode 100644 index 0000000..b0a2bbf Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_prvBtn.png differ diff --git a/mods/guidebooks/textures/guidebooks_title.png b/mods/guidebooks/textures/guidebooks_title.png new file mode 100644 index 0000000..886884a Binary files /dev/null and b/mods/guidebooks/textures/guidebooks_title.png differ diff --git a/mods/hangglider/GNU_GPL.txt b/mods/hangglider/GNU_GPL.txt new file mode 100755 index 0000000..1451535 --- /dev/null +++ b/mods/hangglider/GNU_GPL.txt @@ -0,0 +1,185 @@ +GNU GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. + +TERMS AND CONDITIONS +0. Definitions. +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + +a) The work must carry prominent notices stating that you modified it, and giving a relevant date. +b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. +c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. +d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + +a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. +b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. +c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. +d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. +e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + +a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or +b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or +c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or +d) Limiting the use for publicity purposes of names of licensors or authors of the material; or +e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or +f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/mods/hangglider/GNU_LGPL.txt b/mods/hangglider/GNU_LGPL.txt new file mode 100644 index 0000000..f166cc5 --- /dev/null +++ b/mods/hangglider/GNU_LGPL.txt @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! \ No newline at end of file diff --git a/mods/hangglider/LICENSE.txt b/mods/hangglider/LICENSE.txt new file mode 100755 index 0000000..407255a --- /dev/null +++ b/mods/hangglider/LICENSE.txt @@ -0,0 +1,53 @@ +License for the Hangglider mod +------------------------------ +Copyright (C) 2018 Piezo_ +Copyright (C) 2018 kestral246 +Copyright (C) 2016 cd2 (cdqwertz) + +This mod is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This mod is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this mod. If not, see . + + +--- +License for the original paraglider mod by cdqwertz +(available as part of "rpgtest", found at https://forum.minetest.net/viewtopic.php?t=13761) +------------------------------------------------------------------------------------------ + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +http://www.gnu.org/licenses/lgpl-2.1.html + + +--- +License for Media +----------------- + +Textures: + glider_inventory.png: CC-BY-SA 3.0 UNPORTED. Created by cd2 (cdqwertz) + glider_struts.png: CC-BY-SA 3.0, Piezo_. + Default wood and wool textures from minetest-game. + +Models and sounds: + CC BY-SA (4.0) by Piezo_. + hangglider_flak_shot: tnt_explode sound from minetest_game (CC BY-SA 3.0) diff --git a/mods/hangglider/depends.txt b/mods/hangglider/depends.txt new file mode 100755 index 0000000..6bae540 --- /dev/null +++ b/mods/hangglider/depends.txt @@ -0,0 +1,5 @@ +default +wool +minetest_systemd? +areas? +player_monoids? diff --git a/mods/hangglider/init.lua b/mods/hangglider/init.lua new file mode 100644 index 0000000..dc8cc4e --- /dev/null +++ b/mods/hangglider/init.lua @@ -0,0 +1,383 @@ +-- Hangglider mod for Minetest +-- Original code by Piezo_ (orderofthefourthwall@gmail.com) +-- 2018-11-14 + +-- Modifications by David G (kestral246@gmail.com) +-- 2018-11-24 +-- For Minetest 5.x, glider's set_attach needs to be offset by 1 node +-- Switch to alternate commented line below with correct offset. +-- Additional tuning of parameters. +-- Commented out debug hud display code, prefixed with "--debug:". + +-- 2018-11-22 +-- Give visual indication that hangglider is equiped. +-- Display simple overlay with blurred struts when equiped. +-- Issue: don't know how to disable overlay in third person view. +-- Also Unequip hangglider when landing on water. +-- Attempt to linearize parabolic flight path. +-- Start gravity stronger, but gradually reduce it as descent velocity increases. +-- Don't use airstopper when equipped from the ground (descent velocity is low). +-- Slightly increase flight speed to 1.25. +-- Unequip/equip cycling mid-flight should not fly farther than continuous flight. +-- When equipping mid-air (descent velocity higher), use airstopper but increase descent slope afterwards. +-- Create airbreak flag so all equips mid-flight use faster descent. +-- Reset airbreak flag only when land (canExist goes false). +-- Issue: it wouldn't reset if land in water, use fly, and launch from air, before I added test for water, +-- not sure if there are other such cases. +-- Temporarily add hud debug display to show descent velocity, gravity override, and airbreak flag. +-- Still in process of tuning all the parameters. + + +-- Modifications by Piezo_ +-- 2018-11-25 +-- hud overlay and debug can be enabled/disabled +-- Added blender-rendered overlay for struts using the actual model. +-- Reduced airbreak penalty severity +-- gave glider limited durability. +-- Improved gravity adjustment function. +-- Changed airbreaking process +-- Removed airbreak penalty, as any 'advantage' seems minimal after new adjustments +-- Removed airbreak until minetest devs are smart enough to implement better serverside players. +-- Simplified liquid check. + +-- Modifications by gpcf +-- 2018-12-09 +-- get shot down while flying over protected areas marked as no-fly-zones (flak, from German Flugabwehrkanone) +-- set these areas with the /area_flak command + +-- Modifications by SpaghettiToastBook +-- 2018-12-29 +-- Physics overrides use player_monoids mod if available + +local S = minetest.get_translator(minetest.get_current_modname()) + +local HUD_Overlay = true --show glider struts as overlay on HUD +local debug = false --show debug info in top-center of hud +local moveModelUp = false +if tonumber(string.sub(minetest.get_version().string, 1, 1)) and tonumber(string.sub(minetest.get_version().string, 1, 1)) > 4 then + moveModelUp = true +end +hangglider = {} --Make this global, so other mods can tell if hangglider exists. +hangglider.use = {} +if HUD_Overlay then +hangglider.id = {} -- hud id for displaying overlay with struts +end +if debug then hangglider.debug = {} end -- hud id for debug data +--hangglider.airbreak = {} -- true if falling fast when equip +--[[ +minetest.register_entity("hangglider:airstopper", { --A one-instant entity that catches the player and stops them. + is_visible = false, + physical = false, + immortal = true, + attach = nil, + on_step = function(self, _) + local canExist = false + if self.attach then + local player = self.attach + if player:is_player() then + local pname = player:get_player_name() + canExist = true + if player:get_player_velocity().y < 0.5 and player:get_player_velocity().y > -0.5 then + --Let go when the player actually stops, as that's the whole point. + if hangglider.use[pname] then + if moveModelUp then + minetest.add_entity(player:get_pos(), "hangglider:glider"):set_attach(player, "", {x=0,y=10,z=0}, {x=0,y=0,z=0}) + else + minetest.add_entity(player:get_pos(), "hangglider:glider"):set_attach(player, "", {x=0,y=0,z=0}, {x=0,y=0,z=0}) + end + end + canExist = false + end + end + if not canExist then + player:set_detach() + end + end + if not canExist then + self.object:remove() + end + end +})]] + +if core.global_exists("areas") then + hangglider.flak = true + -- chat command definition essentially copied from areas mod. + minetest.register_chatcommand("area_flak",{ + params = "", + description = "Toggle airspace restrictions for area ", + func = function(name, param) + local id = tonumber(param) + if not id then + return false, "Invalid usage, see /help area_flak." + end + + if not areas:isAreaOwner(id, name) then + return false, "Area "..id.." does not exist" + .." or is not owned by you." + end + local open = not areas.areas[id].flak + -- Save false as nil to avoid inflating the DB. + areas.areas[id].flak = open or nil + areas:save() + return true, ("Area's airspace %s."):format(open and "closed" or "opened") + end + }) +end + +if core.global_exists("minetestd") and minetestd.services.physicsctl.enabled then +minetestd.physicsctl.register_physics_effect("hangglider", + function(player) -- check + return hangglider.use[player:get_player_name()] + end, + function(phys, player) -- blend + local vel_y = player:get_player_velocity().y + if debug then player:hud_change(hangglider.debug[pname].id, "text", vel_y..', '..player:get_physics_override().gravity..', '..tostring(hangglider.airbreak[pname])) end + phys.gravity = phys.gravity*((vel_y + 3)/20) + if vel_y < 0 and vel_y > -3 then + phys.speed = (math.abs(vel_y/2) + 0.75) + elseif vel_y <= -3 then --Cap our gliding movement speed. + phys.speed = 2.25 + end + phys.jump = 0 + end, + 7 -- effect order +) +end + +hangglider.can_fly = function (pname, pos) + -- Checks if the player will get shot down at the position + if wardzones then + local zone = wardzones.getZone(pos) + if zone then + return (minetest.check_player_privs(pname, {protection_bypass=true}) or wardzones.checkPlayerZoneAccess(pname, zone) or not zone["data"]["no_fly"]) + end + end + if areas and minetest.is_protected(vector.round(pos), pname) then + if hangglider.flak then + for id, area in pairs(areas:getAreasAtPos(pos)) do + if area.flak then + return false + end + end + end + end + return true +end + +hangglider.shot_sound = function (pos) + minetest.sound_play("hangglider_flak_shot", { + pos = pos, + max_hear_distance = 30, + gain = 10.0, + }) +end + +local physics_attrs = {"jump", "speed", "gravity"} +local function apply_physics_override(player, overrides) + if player_monoids then + for _, attr in pairs(physics_attrs) do + if overrides[attr] then + player_monoids[attr]:add_change(player, overrides[attr], "hangglider:glider") + end + end + else + player:set_physics_override(overrides) + end +end + +local function remove_physics_override(player, overrides) + for _, attr in pairs(physics_attrs) do + if overrides[attr] then + if core.global_exists("player_monoids") then + player_monoids[attr]:del_change(player, "hangglider:glider") + else + player:set_physics_override({[attr] = 1}) + end + end + end +end + +local step_v +minetest.register_entity("hangglider:glider", { + visual = "mesh", + visual_size = {x = 12, y = 12}, + collisionbox = {0,0,0,0,0,0}, + mesh = "glider.obj", + immortal = true, + static_save = false, + textures = {"wool_white.png","default_wood.png"}, + on_step = function(self, dtime) + local canExist = false + if self.object:get_attach() then + local player = self.object:get_attach("parent") + if player then + local pos = player:getpos() + local pname = player:get_player_name() + if hangglider.use[pname] then + local mrn_name = minetest.registered_nodes[minetest.get_node(vector.new(pos.x, pos.y-0.5, pos.z)).name] + if mrn_name then + if not (mrn_name.walkable or mrn_name.liquidtype ~= "none") then + canExist = true + + if not minetestd then + step_v = player:get_player_velocity().y + if step_v < 0 and step_v > -3 then + apply_physics_override(player, {speed=math.abs(step_v/2) + 0.75}) + elseif step_v <= -3 then --Cap our gliding movement speed. + apply_physics_override(player, {speed=2.25}) + else + remove_physics_override(player, {speed=1}) + end + if debug then player:hud_change(hangglider.debug[pname].id, "text", step_v..', '..player:get_physics_override().gravity..', '..tostring(hangglider.airbreak[pname])) end + apply_physics_override(player, {gravity=((step_v + 3)/20)}) + end + --[[local vel = player:get_player_velocity() + if debug then player:hud_change(hangglider.debug[pname].id, "text", vel.y..', '..grav..', '..tostring(hangglider.airbreak[pname])) end + + player:set_physics_override({gravity = (vel.y + 2.0)/20}) + ]]end + end + end + if not hangglider.can_fly(pname,pos) then + if not self.warned then -- warning shot + self.warned = 0 + hangglider.shot_sound(pos) + minetest.chat_send_player(pname, "Protected area! You will be shot down in two seconds by anti-aircraft guns!") + end + self.warned = self.warned + dtime + if self.warned > 2 then -- shoot down + player:set_hp(1) + player:get_inventory():remove_item("main", ItemStack("hangglider:hangglider")) + hangglider.shot_sound(pos) + canExist = false + end + end + if not canExist then + + if not minetestd then + remove_physics_override(player, { + gravity=1, + jump = 1, + speed = 1,}) + end + hangglider.use[pname] = false + if HUD_Overlay then + player:hud_change(hangglider.id[pname], "text", "blank.png") + end + --hangglider.airbreak[pname] = false + end + end + end + if not canExist then + self.object:set_detach() + self.object:remove() + end + end +}) + +minetest.register_on_dieplayer(function(player) + remove_physics_override(player, { + gravity = 1, + jump = 1, + }) + hangglider.use[player:get_player_name()] = false +end) + + +minetest.register_on_joinplayer(function(player) + local pname = player:get_player_name() + remove_physics_override(player, { + gravity = 1, + jump = 1, + }) + hangglider.use[pname] = false + if HUD_Overlay then + hangglider.id[pname] = player:hud_add({ + hud_elem_type = "image", + text = "blank.png", + position = {x=0, y=0}, + scale = {x=-100, y=-100}, + alignment = {x=1, y=1}, + offset = {x=0, y=0} + }) end + if debug then + hangglider.debug[pname] = {id = player:hud_add({hud_elem_type = "text", + position = {x=0.5, y=0.1}, + text = "-", + number = 0xFF0000}), -- red text + -- ht = {50,50,50}, + } + end + --hangglider.airbreak[pname] = false +end) + +minetest.register_on_leaveplayer(function(player) + local pname = player:get_player_name() + hangglider.use[pname] = nil + if HUD_Overlay then hangglider.id[pname] = nil end + if debug then hangglider.debug[pname] = nil end + --hangglider.airbreak[pname] = nil +end) + +minetest.register_tool("hangglider:hangglider", { + description = S("Glider"), + inventory_image = "glider_item.png", + stack_max=1, + on_use = function(itemstack, player, pointed_thing) + if not player then + return + end + local pos = player:get_pos() + local pname = player:get_player_name() + if not hangglider.use[pname] then --Equip + minetest.sound_play("bedsheet", {pos=pos, max_hear_distance = 8, gain = 1.0}) + if HUD_Overlay then player:hud_change(hangglider.id[pname], "text", "glider_struts.png") end + local airbreak = false + local vel = player:get_player_velocity().y + --[[if vel < -1.5 then -- engage mid-air, falling fast, so stop but ramp velocity more quickly + --hangglider.airbreak[pname] = true + airbreak = true + local stopper = minetest.add_entity(pos, "hangglider:airstopper") + minetest.after(0, function(stopper, player) --"Extreme Measures" + stopper:set_pos(player:get_pos()) + stopper:get_luaentity().attach = player + player:set_attach( stopper, "", {x=0,y=0,z=0}, {x=0,y=0,z=0}) + end, stopper, player) + end]] + if not airbreak then + if moveModelUp then + minetest.add_entity(pos, "hangglider:glider"):set_attach(player, "", {x=0,y=10,z=0}, {x=0,y=0,z=0}) + else + minetest.add_entity(pos, "hangglider:glider"):set_attach(player, "", {x=0,y=0,z=0}, {x=0,y=0,z=0}) + end + end + hangglider.use[pname] = true + apply_physics_override(player, {jump = 0}) + -- if minetest 0.4.x use this: + + -- if minetest 5.x use this: + -- minetest.add_entity(player:get_pos(), "hangglider:glider"):set_attach(player, "", {x=0,y=10,z=0}, {x=0,y=0,z=0}) + itemstack:set_wear(itemstack:get_wear() + 255) + return itemstack + elseif hangglider.use[pname] then --Unequip + if HUD_Overlay then player:hud_change(hangglider.id[pname], "text", "default_wood.png^[colorize:#0000:255") end + hangglider.use[pname] = false + end + end, + sound = {breaks = "default_tool_breaks"}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "hangglider:hangglider", + recipe = {"default:paper", "default:paper", "default:paper", "default:paper", "hangglider:hangglider", "default:paper", "default:paper", "default:paper", "default:paper"}, +}) + +minetest.register_craft({ + output = "hangglider:hangglider", + recipe = { + {"wool:white", "wool:white", "wool:white"}, + {"default:stick", "", "default:stick"}, + {"", "default:stick", ""}, + } +}) diff --git a/mods/hangglider/locale/hangglider.es.tr b/mods/hangglider/locale/hangglider.es.tr new file mode 100644 index 0000000..13cf26e --- /dev/null +++ b/mods/hangglider/locale/hangglider.es.tr @@ -0,0 +1,2 @@ +# textdomain: hangglider +Glider=Planeador diff --git a/mods/hangglider/mod.conf b/mods/hangglider/mod.conf new file mode 100644 index 0000000..a6d5a68 --- /dev/null +++ b/mods/hangglider/mod.conf @@ -0,0 +1 @@ +name = hangglider diff --git a/mods/hangglider/screenshot.png b/mods/hangglider/screenshot.png new file mode 100644 index 0000000..06c66ec Binary files /dev/null and b/mods/hangglider/screenshot.png differ diff --git a/mods/hangglider/sounds/bedsheet.ogg b/mods/hangglider/sounds/bedsheet.ogg new file mode 100755 index 0000000..b664830 Binary files /dev/null and b/mods/hangglider/sounds/bedsheet.ogg differ diff --git a/mods/hangglider/sounds/hangglider_flak_shot.ogg b/mods/hangglider/sounds/hangglider_flak_shot.ogg new file mode 100644 index 0000000..a414ea0 Binary files /dev/null and b/mods/hangglider/sounds/hangglider_flak_shot.ogg differ diff --git a/mods/hangglider/textures/glider_item.png b/mods/hangglider/textures/glider_item.png new file mode 100755 index 0000000..9640f9c Binary files /dev/null and b/mods/hangglider/textures/glider_item.png differ diff --git a/mods/hangglider/textures/glider_struts.png b/mods/hangglider/textures/glider_struts.png new file mode 100644 index 0000000..da71a8a Binary files /dev/null and b/mods/hangglider/textures/glider_struts.png differ diff --git a/mods/hbarmor/README.md b/mods/hbarmor/README.md new file mode 100644 index 0000000..c410a9b --- /dev/null +++ b/mods/hbarmor/README.md @@ -0,0 +1,42 @@ +# HUD bar for `3d_armor` [`hbarmor`] + +* Version: 0.4.0 + +## Description +This mod adds a simple HUD bar which displays the current damage +of the player's armor (from the 3D Armor [`3d_armor`] mod) as a percentage (rounded). + +100% armor means the armor is in perfect shape. 0% means the armor is almost destroyed +or non-existant. Note that to reach 100%, the player must wear at least 4 different +pieces of armor in perfect shape. + +The armor bar also does not tell anything about the armor's strength, +only how worn out it already is. + +By default, the armor bar is hidden if the player wears no armor. + +## Dependencies +* HUD bars [`hudbars`], major version 1 +* 3D Armor [`3d_armor`] (tested with Minetest 0.4.14) + +## Licensing +This mod is entirly free softare. + +### Source code + +* License: MIT License (see below) +* Authors: Wuzzy, forked from the mod “Better HUD (and hunger)” [`hud`] by BlockMen (2013-2014) + +### Textures + +* `hbarmor_icon.png`—Stu ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen +* `hbarmor_bgicon.png`—Stu (CC BY-SA 3.0), modified by BlockMen +* `hbarmor_bar.png`—Wuzzy (MIT License) + +Everything else is under the MIT License: +© Copyright BlockMen (2013-2014) + +This program is free software. It comes without any warranty, to +the extent permitted by applicable law. You can redistribute it +and/or modify it under the terms of the MIT License. +See for more details. diff --git a/mods/hbarmor/description.txt b/mods/hbarmor/description.txt new file mode 100644 index 0000000..02a8a34 --- /dev/null +++ b/mods/hbarmor/description.txt @@ -0,0 +1 @@ +Adds a HUD bar displaying the current damage of the player's armor. diff --git a/mods/hbarmor/init.lua b/mods/hbarmor/init.lua new file mode 100644 index 0000000..9a2159b --- /dev/null +++ b/mods/hbarmor/init.lua @@ -0,0 +1,154 @@ +local S +if (minetest.get_modpath("intllib")) then + S = intllib.Getter() +else + S = function ( s ) return s end +end + +--if (not armor) or (not armor.def) then + --minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!") +--end + +local hbarmor = {} + +-- HUD statbar values +hbarmor.armor = {} + +-- Stores if player's HUD bar has been initialized so far. +hbarmor.player_active = {} + +-- Time difference in seconds between updates to the HUD armor bar. +-- Increase this number for slow servers. +hbarmor.tick = 0.1 + +-- If true, the armor bar is hidden when the player does not wear any armor +hbarmor.autohide = true + +--load custom settings +local set = minetest.settings:get_bool("hbarmor_autohide") +if set ~= nil then + hbarmor.autohide = set +end + +set = minetest.settings:get("hbarmor_tick") +if tonumber(set) ~= nil then + hbarmor.tick = tonumber(set) +end + + +local must_hide = function(playername, arm) + return ((not armor.def[playername].count or armor.def[playername].count == 0) and arm == 0) +end + +local arm_printable = function(arm) + return math.ceil(math.floor(arm+0.5)) +end + +local function custom_hud(player) + local name = player:get_player_name() + + if minetest.settings:get_bool("enable_damage") then + local ret = hbarmor.get_armor(player) + if ret == false then + minetest.log("error", "[hbarmor] Call to hbarmor.get_armor in custom_hud returned with false!") + end + local arm = tonumber(hbarmor.armor[name]) + if not arm then arm = 0 end + local hide + if hbarmor.autohide then + hide = must_hide(name, arm) + else + hide = false + end + hb.init_hudbar(player, "armor", arm_printable(arm), nil, hide) + end +end + +--register and define armor HUD bar +hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, S("%s: %d%%")) + +function hbarmor.get_armor(player) + if not player or not armor.def then + return false + end + local name = player:get_player_name() + local def = armor.def[name] or nil + if def and def.state and def.count then + hbarmor.set_armor(name, def.state, def.count) + else + return false + end + return true +end + +function hbarmor.set_armor(player_name, ges_state, items) + local max_items = 4 + if items == 5 then + max_items = items + end + local max = max_items * 65535 + local lvl = max - ges_state + lvl = lvl/max + if ges_state == 0 and items == 0 then + lvl = 0 + end + + hbarmor.armor[player_name] = math.max(0, math.min(lvl* (items * (100 / max_items)), 100)) +end + +-- update hud elemtens if value has changed +local function update_hud(player) + local name = player:get_player_name() + --armor + local arm = tonumber(hbarmor.armor[name]) + if not arm then + arm = 0 + hbarmor.armor[name] = 0 + end + if hbarmor.autohide then + -- hide armor bar completely when there is none + if must_hide(name, arm) then + hb.hide_hudbar(player, "armor") + else + hb.change_hudbar(player, "armor", arm_printable(arm)) + hb.unhide_hudbar(player, "armor") + end + else + hb.change_hudbar(player, "armor", arm_printable(arm)) + end +end + +minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + custom_hud(player) + hbarmor.player_active[name] = true +end) + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + hbarmor.player_active[name] = false +end) + +local main_timer = 0 +local timer = 0 +minetest.register_globalstep(function(dtime) + main_timer = main_timer + dtime + timer = timer + dtime + if main_timer > hbarmor.tick or timer > 4 then + if minetest.settings:get_bool("enable_damage") then + if main_timer > hbarmor.tick then main_timer = 0 end + for _,player in ipairs(minetest.get_connected_players()) do + local name = player:get_player_name() + if hbarmor.player_active[name] == true then + local ret = hbarmor.get_armor(player) + if ret == false then + minetest.log("error", "[hbarmor] Call to hbarmor.get_armor in globalstep returned with false!") + end + -- update all hud elements + update_hud(player) + end + end + end + end + if timer > 4 then timer = 0 end +end) diff --git a/mods/hbarmor/locale/de.txt b/mods/hbarmor/locale/de.txt new file mode 100644 index 0000000..5a6bacd --- /dev/null +++ b/mods/hbarmor/locale/de.txt @@ -0,0 +1,2 @@ +Armor = Panzerung +%s: %d%% = %s: %d%% diff --git a/mods/hbarmor/locale/es.txt b/mods/hbarmor/locale/es.txt new file mode 100644 index 0000000..a0cb163 --- /dev/null +++ b/mods/hbarmor/locale/es.txt @@ -0,0 +1,4 @@ +Armadura = + +# Format string for displaying the armor. E.g. "Armor: 100%" +%s: %d%% = diff --git a/mods/hbarmor/locale/it.txt b/mods/hbarmor/locale/it.txt new file mode 100644 index 0000000..a2f704b --- /dev/null +++ b/mods/hbarmor/locale/it.txt @@ -0,0 +1,4 @@ +Armor = Armatura + +# Format string for displaying the armor. E.g. "Armor: 100%" +%s: %d%% = diff --git a/mods/hbarmor/locale/template.txt b/mods/hbarmor/locale/template.txt new file mode 100644 index 0000000..d898abe --- /dev/null +++ b/mods/hbarmor/locale/template.txt @@ -0,0 +1,4 @@ +Armor = + +# Format string for displaying the armor. E.g. "Armor: 100%" +%s: %d%% = diff --git a/mods/hbarmor/mod.conf b/mods/hbarmor/mod.conf new file mode 100644 index 0000000..47352c1 --- /dev/null +++ b/mods/hbarmor/mod.conf @@ -0,0 +1 @@ +name = hbarmor diff --git a/mods/hbarmor/screenshot.png b/mods/hbarmor/screenshot.png new file mode 100644 index 0000000..907cf90 Binary files /dev/null and b/mods/hbarmor/screenshot.png differ diff --git a/mods/hbarmor/settingtypes.txt b/mods/hbarmor/settingtypes.txt new file mode 100644 index 0000000..067d504 --- /dev/null +++ b/mods/hbarmor/settingtypes.txt @@ -0,0 +1,7 @@ +#If true, automatically hides the armor HUD bar when the player wears no +#armor. Otherwise, the armor bar shows “0%”. +hbarmor_autohide (Automatically hide armor HUD bar) bool true + +#Time difference in seconds between updates to the armor HUD bar. +#Increase this number for slow servers. +hbarmor_tick (Armor HUD bar update frequency) float 0.1 0.0 4.0 diff --git a/mods/hbarmor/settingtypes.txt_ b/mods/hbarmor/settingtypes.txt_ new file mode 100644 index 0000000..067d504 --- /dev/null +++ b/mods/hbarmor/settingtypes.txt_ @@ -0,0 +1,7 @@ +#If true, automatically hides the armor HUD bar when the player wears no +#armor. Otherwise, the armor bar shows “0%”. +hbarmor_autohide (Automatically hide armor HUD bar) bool true + +#Time difference in seconds between updates to the armor HUD bar. +#Increase this number for slow servers. +hbarmor_tick (Armor HUD bar update frequency) float 0.1 0.0 4.0 diff --git a/mods/hbarmor/textures/hbarmor_bar.png b/mods/hbarmor/textures/hbarmor_bar.png new file mode 100644 index 0000000..3c65224 Binary files /dev/null and b/mods/hbarmor/textures/hbarmor_bar.png differ diff --git a/mods/hbarmor/textures/hbarmor_bgicon.png b/mods/hbarmor/textures/hbarmor_bgicon.png new file mode 100644 index 0000000..bb3cce7 Binary files /dev/null and b/mods/hbarmor/textures/hbarmor_bgicon.png differ diff --git a/mods/hbarmor/textures/hbarmor_icon.png b/mods/hbarmor/textures/hbarmor_icon.png new file mode 100644 index 0000000..6a5a763 Binary files /dev/null and b/mods/hbarmor/textures/hbarmor_icon.png differ diff --git a/mods/hbhunger/README.md b/mods/hbhunger/README.md new file mode 100644 index 0000000..759b794 --- /dev/null +++ b/mods/hbhunger/README.md @@ -0,0 +1,97 @@ +# Hunger with HUD bar [`hbhunger`] + +* Version: 1.0.1 + +## Using the mod + +This mod adds a mechanic for hunger. +This mod depends on the HUD bars mod [`hudbars`], version 1.4.1 or any later version +starting with “1.” or “2.”. + +## About hunger +This mod adds a hunger mechanic to the game. Players get a new attribute called “satiation”: + +* A new player starts with 20 satiation points out of 30 +* Actions like digging, placing and walking cause exhaustion, which lower the satiation +* Every 800 seconds you lose 1 satiation point without doing anything +* At 1 or 0 satiation you will suffer damage and die in case you don't eat something +* If your satiation is 16 or higher, you will slowly regenerate health points +* Eating food will increase your satiation (Duh!) + +Important: Eating food will not directly increase your health anymore, as long as the food +item is supported by this mod (see below). + +Careful! Some foods may be poisoned. If you eat a poisoned item, you may still get a satiation +boost, but for a brief period you lose health points because of food poisoning. However, +food poisoning can never kill you. + +## Statbar mode +If you use the statbar mode of the HUD Bars mod, these things are important to know: +As with all mods using HUD Bars, the bread statbar symbols represent the rough percentage +out of 30 satiation points, in steps of 5%, so the symbols give you an estimate of your +satiation. This is different from the hunger mod by BlockMen. + +You gain health at 5.5 symbols or more, as 5.5 symbols correspond to 16 satiation points. +You *may* lose health at exactly 0.5 symbols, as 0.5 symbols correspond to 1-2 satiation points. + +## Supported food +All mods which add food through standard measures (`minetest.item_eat`) are already +supported automatically. Poisoned food needs special support. + +### Known supported food mods +* Apple from Minetest Game [`default`] +* Red and brown mushroom from Minetest Game [`flowers`] +* Bread from Minetest Game [`farming`] +* [`animalmaterials`] (Mob Framework (`mobf` modpack)) +* Bushes [`bushes`] +* [`bushes_classic`] +* Creatures [`creatures`] +* [`dwarves`] (beer and such) +* Docfarming [`docfarming`] +* Ethereal / Ethereal NG [`ethereal`] +* Farming Redo [`farming`] by TenPlus1 +* Farming plus [`farming_plus`] +* Ferns [`ferns`] +* Fishing [`fishing`] +* [`fruit`] +* Glooptest [`glooptest`] +* JKMod ([`jkanimals`], [`jkfarming`], [`jkwine`]) +* [`kpgmobs`] +* [`mobfcooking`] +* [`mooretrees`] +* [`mtfoods`] +* [`mushroom`] +* [`mush45`] +* Seaplants [`sea`] +* Simple mobs [`mobs`] +* Pizza [`pizza`] +* Not So Simple Mobs [`nssm`] + +### Supported mods without optional dependency (mods provide their own support) + +* Food ([`food`], [`food_basic`]) +* Sweet Foods [`food_sweet`] + +### Examples + +* Eating an apple (from Minetest Game) increases your satiation by 2; +* eating a bread (from Minetest Game) increases your satiation by 4. + +## Licensing +This mod is free software. + +### Source code + +* License: [LGPL v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) +* Author: by Wuzzy (2015-2016) +* Forked from the “Better HUD (and hunger)” mod by BlockMen (2013-2015), + most code comes from this mod. + +### Textures + +* `hbhunger_icon.png`—PilzAdam ([MIT License](https://opensource.org/licenses/MIT)), modified by BlockMen +* `hbhunger_bgicon.png`—PilzAdam (MIT License), modified by BlockMen +* `hbhunger_bar.png—Wuzzy` (MIT License) +* `hbhunger_icon_health_poison.png`—celeron55 ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen, modified again by Wuzzy +* Everything else: MIT License, by BlockMen and Wuzzy + diff --git a/mods/hbhunger/hunger.lua b/mods/hbhunger/hunger.lua new file mode 100644 index 0000000..05f3564 --- /dev/null +++ b/mods/hbhunger/hunger.lua @@ -0,0 +1,487 @@ +-- Keep these for backwards compatibility +function hbhunger.save_hunger(player) + hbhunger.set_hunger_raw(player) +end +function hbhunger.load_hunger(player) + hbhunger.get_hunger_raw(player) +end + +-- wrapper for minetest.item_eat (this way we make sure other mods can't break this one) +local org_eat = core.do_item_eat +core.do_item_eat = function(hp_change, replace_with_item, itemstack, user, pointed_thing) + local old_itemstack = itemstack + itemstack = hbhunger.eat(hp_change, replace_with_item, itemstack, user, pointed_thing) + for _, callback in pairs(core.registered_on_item_eats) do + local result = callback(hp_change, replace_with_item, itemstack, user, pointed_thing, old_itemstack) + if result then + return result + end + end + return itemstack +end + +-- food functions +local food = hbhunger.food + +function hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound) + food[name] = {} + food[name].saturation = hunger_change -- hunger points added + food[name].replace = replace_with_item -- what item is given back after eating + food[name].poisen = poisen -- time its poisening + food[name].healing = heal -- amount of HP + food[name].sound = sound -- special sound that is played when eating +end + +function hbhunger.eat(hp_change, replace_with_item, itemstack, user, pointed_thing) + local item = itemstack:get_name() + local def = food[item] + if not def then + def = {} + if type(hp_change) ~= "number" then + hp_change = 1 + core.log("error", "Wrong on_use() definition for item '" .. item .. "'") + end + def.saturation = hp_change * 1.3 + def.replace = replace_with_item + end + local func = hbhunger.item_eat(def.saturation, def.replace, def.poisen, def.healing, def.sound) + return func(itemstack, user, pointed_thing) +end + +-- Poison player +local function poisenp(tick, time, time_left, player) + -- First check if player is still there + if not player:is_player() then + return + end + time_left = time_left + tick + if time_left < time then + minetest.after(tick, poisenp, tick, time, time_left, player) + else + hbhunger.poisonings[player:get_player_name()] = hbhunger.poisonings[player:get_player_name()] - 1 + if hbhunger.poisonings[player:get_player_name()] <= 0 then + -- Reset HUD bar color + hb.change_hudbar(player, "health", nil, nil, "hudbars_icon_health.png", nil, "hudbars_bar_health.png") + end + end + if player:get_hp()-1 > 0 then + player:set_hp(player:get_hp()-1) + end + +end + +function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound) + return function(itemstack, user, pointed_thing) + if itemstack:take_item() ~= nil and user ~= nil then + local name = user:get_player_name() + local h = tonumber(hbhunger.hunger[name]) + local hp = user:get_hp() + if h == nil or hp == nil then + return + end + minetest.sound_play( + {name = sound or "hbhunger_eat_generic", + gain = 1}, + {object=user, + max_hear_distance = 16, + pitch = 1 + math.random(-10, 10)*0.005,} + ) + + -- Saturation + if h < 30 and hunger_change then + h = h + hunger_change + if h > 30 then h = 30 end + hbhunger.hunger[name] = h + hbhunger.set_hunger_raw(user) + end + -- Healing + if hp < 20 and heal then + hp = hp + heal + if hp > 20 then hp = 20 end + user:set_hp(hp) + end + -- Poison + if poisen then + -- Set poison bar + hb.change_hudbar(user, "health", nil, nil, "hbhunger_icon_health_poison.png", nil, "hbhunger_bar_health_poison.png") + hbhunger.poisonings[name] = hbhunger.poisonings[name] + 1 + poisenp(1, poisen, 0, user) + end + + if itemstack:get_count() == 0 then + itemstack:add_item(replace_with_item) + else + local inv = user:get_inventory() + if inv:room_for_item("main", replace_with_item) then + inv:add_item("main", replace_with_item) + else + minetest.add_item(user:getpos(), replace_with_item) + end + end + end + return itemstack + end +end + +if minetest.get_modpath("default") ~= nil then + hbhunger.register_food("default:apple", 2) +end +if minetest.get_modpath("flowers") ~= nil then + hbhunger.register_food("flowers:mushroom_brown", 1) + hbhunger.register_food("flowers:mushroom_red", 1, "", 3) +end +if minetest.get_modpath("farming") ~= nil then + hbhunger.register_food("farming:bread", 4) +end + +if minetest.get_modpath("mobs") ~= nil then + if mobs.mod ~= nil and mobs.mod == "redo" then + hbhunger.register_food("mobs:cheese", 4) + hbhunger.register_food("mobs:meat", 8) + hbhunger.register_food("mobs:meat_raw", 4) + hbhunger.register_food("mobs:rat_cooked", 4) + hbhunger.register_food("mobs:honey", 2) + hbhunger.register_food("mobs:pork_raw", 3, "", 3) + hbhunger.register_food("mobs:pork_cooked", 8) + hbhunger.register_food("mobs:chicken_cooked", 6) + hbhunger.register_food("mobs:chicken_raw", 2, "", 3) + hbhunger.register_food("mobs:chicken_egg_fried", 2) + if minetest.get_modpath("bucket") then + hbhunger.register_food("mobs:bucket_milk", 3, "bucket:bucket_empty") + end + else + hbhunger.register_food("mobs:meat", 6) + hbhunger.register_food("mobs:meat_raw", 3) + hbhunger.register_food("mobs:rat_cooked", 5) + end +end + +if minetest.get_modpath("moretrees") ~= nil then + hbhunger.register_food("moretrees:coconut_milk", 1) + hbhunger.register_food("moretrees:raw_coconut", 2) + hbhunger.register_food("moretrees:acorn_muffin", 3) + hbhunger.register_food("moretrees:spruce_nuts", 1) + hbhunger.register_food("moretrees:pine_nuts", 1) + hbhunger.register_food("moretrees:fir_nuts", 1) +end + +if minetest.get_modpath("dwarves") ~= nil then + hbhunger.register_food("dwarves:beer", 2) + hbhunger.register_food("dwarves:apple_cider", 1) + hbhunger.register_food("dwarves:midus", 2) + hbhunger.register_food("dwarves:tequila", 2) + hbhunger.register_food("dwarves:tequila_with_lime", 2) + hbhunger.register_food("dwarves:sake", 2) +end + +if minetest.get_modpath("animalmaterials") ~= nil then + hbhunger.register_food("animalmaterials:milk", 2) + hbhunger.register_food("animalmaterials:meat_raw", 3) + hbhunger.register_food("animalmaterials:meat_pork", 3) + hbhunger.register_food("animalmaterials:meat_beef", 3) + hbhunger.register_food("animalmaterials:meat_chicken", 3) + hbhunger.register_food("animalmaterials:meat_lamb", 3) + hbhunger.register_food("animalmaterials:meat_venison", 3) + hbhunger.register_food("animalmaterials:meat_undead", 3, "", 3) + hbhunger.register_food("animalmaterials:meat_toxic", 3, "", 5) + hbhunger.register_food("animalmaterials:meat_ostrich", 3) + hbhunger.register_food("animalmaterials:fish_bluewhite", 2) + hbhunger.register_food("animalmaterials:fish_clownfish", 2) +end + +if minetest.get_modpath("fishing") ~= nil then + hbhunger.register_food("fishing:fish_raw", 2) + hbhunger.register_food("fishing:fish_cooked", 5) + hbhunger.register_food("fishing:sushi", 6) + hbhunger.register_food("fishing:shark", 4) + hbhunger.register_food("fishing:shark_cooked", 8) + hbhunger.register_food("fishing:pike", 4) + hbhunger.register_food("fishing:pike_cooked", 8) +end + +if minetest.get_modpath("glooptest") ~= nil then + hbhunger.register_food("glooptest:kalite_lump", 1) +end + +if minetest.get_modpath("bushes") ~= nil then + hbhunger.register_food("bushes:sugar", 1) + hbhunger.register_food("bushes:strawberry", 2) + hbhunger.register_food("bushes:berry_pie_raw", 3) + hbhunger.register_food("bushes:berry_pie_cooked", 4) + hbhunger.register_food("bushes:basket_pies", 15) +end + +if minetest.get_modpath("bushes_classic") then + -- bushes_classic mod, as found in the plantlife modpack + local berries = { + "strawberry", + "blackberry", + "blueberry", + "raspberry", + "gooseberry", + "mixed_berry"} + for _, berry in ipairs(berries) do + if berry ~= "mixed_berry" then + hbhunger.register_food("bushes:"..berry, 1) + end + hbhunger.register_food("bushes:"..berry.."_pie_raw", 2) + hbhunger.register_food("bushes:"..berry.."_pie_cooked", 5) + hbhunger.register_food("bushes:basket_"..berry, 15) + end +end + +if minetest.get_modpath("mushroom") ~= nil then + hbhunger.register_food("mushroom:brown", 1) + hbhunger.register_food("mushroom:red", 1, "", 3) + -- mushroom potions: red = strong poison, brown = light restorative + if minetest.get_modpath("vessels") then + hbhunger.register_food("mushroom:brown_essence", 1, "vessels:glass_bottle", nil, 4) + hbhunger.register_food("mushroom:poison", 1, "vessels:glass_bottle", 10) + end +end + +if minetest.get_modpath("docfarming") ~= nil then + hbhunger.register_food("docfarming:carrot", 3) + hbhunger.register_food("docfarming:cucumber", 2) + hbhunger.register_food("docfarming:corn", 3) + hbhunger.register_food("docfarming:potato", 4) + hbhunger.register_food("docfarming:bakedpotato", 5) + hbhunger.register_food("docfarming:raspberry", 3) +end + +if minetest.get_modpath("farming_plus") ~= nil then + hbhunger.register_food("farming_plus:carrot_item", 3) + hbhunger.register_food("farming_plus:banana", 2) + hbhunger.register_food("farming_plus:orange_item", 2) + hbhunger.register_food("farming:pumpkin_bread", 4) + hbhunger.register_food("farming_plus:strawberry_item", 2) + hbhunger.register_food("farming_plus:tomato_item", 2) + hbhunger.register_food("farming_plus:potato_item", 4) + hbhunger.register_food("farming_plus:rhubarb_item", 2) +end + +if minetest.get_modpath("mtfoods") ~= nil then + hbhunger.register_food("mtfoods:dandelion_milk", 1) + hbhunger.register_food("mtfoods:sugar", 1) + hbhunger.register_food("mtfoods:short_bread", 4) + hbhunger.register_food("mtfoods:cream", 1) + hbhunger.register_food("mtfoods:chocolate", 2) + hbhunger.register_food("mtfoods:cupcake", 2) + hbhunger.register_food("mtfoods:strawberry_shortcake", 2) + hbhunger.register_food("mtfoods:cake", 3) + hbhunger.register_food("mtfoods:chocolate_cake", 3) + hbhunger.register_food("mtfoods:carrot_cake", 3) + hbhunger.register_food("mtfoods:pie_crust", 3) + hbhunger.register_food("mtfoods:apple_pie", 3) + hbhunger.register_food("mtfoods:rhubarb_pie", 2) + hbhunger.register_food("mtfoods:banana_pie", 3) + hbhunger.register_food("mtfoods:pumpkin_pie", 3) + hbhunger.register_food("mtfoods:cookies", 2) + hbhunger.register_food("mtfoods:mlt_burger", 5) + hbhunger.register_food("mtfoods:potato_slices", 2) + hbhunger.register_food("mtfoods:potato_chips", 3) + --mtfoods:medicine + hbhunger.register_food("mtfoods:casserole", 3) + hbhunger.register_food("mtfoods:glass_flute", 2) + hbhunger.register_food("mtfoods:orange_juice", 2) + hbhunger.register_food("mtfoods:apple_juice", 2) + hbhunger.register_food("mtfoods:apple_cider", 2) + hbhunger.register_food("mtfoods:cider_rack", 2) +end + +if minetest.get_modpath("fruit") ~= nil then + hbhunger.register_food("fruit:apple", 2) + hbhunger.register_food("fruit:pear", 2) + hbhunger.register_food("fruit:bananna", 3) + hbhunger.register_food("fruit:orange", 2) +end + +if minetest.get_modpath("mush45") ~= nil then + hbhunger.register_food("mush45:meal", 4) +end + +if minetest.get_modpath("seaplants") ~= nil then + hbhunger.register_food("seaplants:kelpgreen", 1) + hbhunger.register_food("seaplants:kelpbrown", 1) + hbhunger.register_food("seaplants:seagrassgreen", 1) + hbhunger.register_food("seaplants:seagrassred", 1) + hbhunger.register_food("seaplants:seasaladmix", 6) + hbhunger.register_food("seaplants:kelpgreensalad", 1) + hbhunger.register_food("seaplants:kelpbrownsalad", 1) + hbhunger.register_food("seaplants:seagrassgreensalad", 1) + hbhunger.register_food("seaplants:seagrassgreensalad", 1) +end + +if minetest.get_modpath("mobfcooking") ~= nil then + hbhunger.register_food("mobfcooking:cooked_pork", 6) + hbhunger.register_food("mobfcooking:cooked_ostrich", 6) + hbhunger.register_food("mobfcooking:cooked_beef", 6) + hbhunger.register_food("mobfcooking:cooked_chicken", 6) + hbhunger.register_food("mobfcooking:cooked_lamb", 6) + hbhunger.register_food("mobfcooking:cooked_venison", 6) + hbhunger.register_food("mobfcooking:cooked_fish", 6) +end + +if minetest.get_modpath("creatures") ~= nil then + hbhunger.register_food("creatures:meat", 6) + hbhunger.register_food("creatures:flesh", 3) + hbhunger.register_food("creatures:rotten_flesh", 3, "", 3) +end + +if minetest.get_modpath("ethereal") then + hbhunger.register_food("ethereal:strawberry", 1) + hbhunger.register_food("ethereal:banana", 4) + hbhunger.register_food("ethereal:pine_nuts", 1) + hbhunger.register_food("ethereal:bamboo_sprout", 0, "", 3) + hbhunger.register_food("ethereal:fern_tubers", 1) + hbhunger.register_food("ethereal:banana_bread", 7) + hbhunger.register_food("ethereal:mushroom_plant", 2) + hbhunger.register_food("ethereal:coconut_slice", 2) + hbhunger.register_food("ethereal:golden_apple", 4, "", nil, 10) + hbhunger.register_food("ethereal:wild_onion_plant", 2) + hbhunger.register_food("ethereal:mushroom_soup", 4, "ethereal:bowl") + hbhunger.register_food("ethereal:mushroom_soup_cooked", 6, "ethereal:bowl") + hbhunger.register_food("ethereal:hearty_stew", 6, "ethereal:bowl", 3) + hbhunger.register_food("ethereal:hearty_stew_cooked", 10, "ethereal:bowl") + if minetest.get_modpath("bucket") then + hbhunger.register_food("ethereal:bucket_cactus", 2, "bucket:bucket_empty") + end + hbhunger.register_food("ethereal:fish_raw", 2) + hbhunger.register_food("ethereal:fish_cooked", 5) + hbhunger.register_food("ethereal:seaweed", 1) + hbhunger.register_food("ethereal:yellowleaves", 1, "", nil, 1) + hbhunger.register_food("ethereal:sashimi", 4) + hbhunger.register_food("ethereal:orange", 2) +end + +if minetest.get_modpath("farming") and farming.mod == "redo" then + hbhunger.register_food("farming:bread", 6) + hbhunger.register_food("farming:potato", 1) + hbhunger.register_food("farming:baked_potato", 6) + hbhunger.register_food("farming:cucumber", 4) + hbhunger.register_food("farming:tomato", 4) + hbhunger.register_food("farming:carrot", 3) + hbhunger.register_food("farming:carrot_gold", 6, "", nil, 8) + hbhunger.register_food("farming:corn", 3) + hbhunger.register_food("farming:corn_cob", 5) + hbhunger.register_food("farming:melon_slice", 2) + hbhunger.register_food("farming:pumpkin_slice", 1) + hbhunger.register_food("farming:pumpkin_bread", 9) + hbhunger.register_food("farming:coffee_cup", 2, "farming:drinking_cup") + hbhunger.register_food("farming:coffee_cup_hot", 3, "farming:drinking_cup", nil, 2) + hbhunger.register_food("farming:cookie", 2) + hbhunger.register_food("farming:chocolate_dark", 3) + hbhunger.register_food("farming:donut", 4) + hbhunger.register_food("farming:donut_chocolate", 6) + hbhunger.register_food("farming:donut_apple", 6) + hbhunger.register_food("farming:raspberries", 1) + hbhunger.register_food("farming:blueberries", 1) + hbhunger.register_food("farming:muffin_blueberry", 4) + if minetest.get_modpath("vessels") then + hbhunger.register_food("farming:smoothie_raspberry", 2, "vessels:drinking_glass") + end + hbhunger.register_food("farming:rhubarb", 1) + hbhunger.register_food("farming:rhubarb_pie", 6) + hbhunger.register_food("farming:beans", 1) +end + +if minetest.get_modpath("kpgmobs") ~= nil then + hbhunger.register_food("kpgmobs:uley", 3) + hbhunger.register_food("kpgmobs:meat", 6) + hbhunger.register_food("kpgmobs:rat_cooked", 5) + hbhunger.register_food("kpgmobs:med_cooked", 4) + if minetest.get_modpath("bucket") then + hbhunger.register_food("kpgmobs:bucket_milk", 4, "bucket:bucket_empty") + end +end + +if minetest.get_modpath("jkfarming") ~= nil then + hbhunger.register_food("jkfarming:carrot", 3) + hbhunger.register_food("jkfarming:corn", 3) + hbhunger.register_food("jkfarming:melon_part", 2) + hbhunger.register_food("jkfarming:cake", 3) +end + +if minetest.get_modpath("jkanimals") ~= nil then + hbhunger.register_food("jkanimals:meat", 6) +end + +if minetest.get_modpath("jkwine") ~= nil then + hbhunger.register_food("jkwine:grapes", 2) + hbhunger.register_food("jkwine:winebottle", 1) +end + +if minetest.get_modpath("cooking") ~= nil then + hbhunger.register_food("cooking:meat_beef_cooked", 4) + hbhunger.register_food("cooking:fish_bluewhite_cooked", 3) + hbhunger.register_food("cooking:fish_clownfish_cooked", 1) + hbhunger.register_food("cooking:meat_chicken_cooked", 2) + hbhunger.register_food("cooking:meat_cooked", 2) + hbhunger.register_food("cooking:meat_pork_cooked", 3) + hbhunger.register_food("cooking:meat_toxic_cooked", -3) + hbhunger.register_food("cooking:meat_venison_cooked", 3) + hbhunger.register_food("cooking:meat_undead_cooked", 1) +end + +-- ferns mod of plantlife_modpack +if minetest.get_modpath("ferns") ~= nil then + hbhunger.register_food("ferns:fiddlehead", 1, "", 1) + hbhunger.register_food("ferns:fiddlehead_roasted", 3) + hbhunger.register_food("ferns:ferntuber_roasted", 3) + hbhunger.register_food("ferns:horsetail_01", 1) +end + +if minetest.get_modpath("pizza") ~= nil then + hbhunger.register_food("pizza:pizza", 30, "", nil, 30) + hbhunger.register_food("pizza:pizzaslice", 5, "", nil, 5) +end + +if minetest.get_modpath("nssm") then + hbhunger.register_food("nssm:werewolf_leg", 3) + hbhunger.register_food("nssm:heron_leg", 2) + hbhunger.register_food("nssm:chichibios_heron_leg", 4) + hbhunger.register_food("nssm:crocodile_tail", 3) + hbhunger.register_food("nssm:duck_legs", 1) + hbhunger.register_food("nssm:ant_leg", 1) + hbhunger.register_food("nssm:spider_leg", 1) + hbhunger.register_food("nssm:tentacle", 2) + hbhunger.register_food("nssm:worm_flesh", 2, "", 2) -- poisonous + hbhunger.register_food("nssm:amphibian_heart", 1) + hbhunger.register_food("nssm:raw_scrausics_wing", 1) + -- superfoods + hbhunger.register_food("nssm:phoenix_nuggets", 20, "", nil, 20) + hbhunger.register_food("nssm:phoenix_tear", 20, "", nil, 20) +end + +-- player-action based hunger changes +function hbhunger.handle_node_actions(pos, oldnode, player, ext) + -- is_fake_player comes from the pipeworks, we are not interested in those + if not player or not player:is_player() or player.is_fake_player == true then + return + end + local name = player:get_player_name() + local exhaus = hbhunger.exhaustion[name] + if exhaus == nil then return end + local new = hbhunger.EXHAUST_PLACE + -- placenode event + if not ext then + new = hbhunger.EXHAUST_DIG + end + -- assume its send by main timer when movement detected + if not pos and not oldnode then + new = hbhunger.EXHAUST_MOVE + end + exhaus = exhaus + new + if exhaus > hbhunger.EXHAUST_LVL then + exhaus = 0 + local h = tonumber(hbhunger.hunger[name]) + h = h - 1 + if h < 0 then h = 0 end + hbhunger.hunger[name] = h + hbhunger.set_hunger_raw(player) + end + hbhunger.exhaustion[name] = exhaus +end + +minetest.register_on_placenode(hbhunger.handle_node_actions) +minetest.register_on_dignode(hbhunger.handle_node_actions) diff --git a/mods/hbhunger/init.lua b/mods/hbhunger/init.lua new file mode 100644 index 0000000..ee5019f --- /dev/null +++ b/mods/hbhunger/init.lua @@ -0,0 +1,150 @@ +local S = minetest.get_translator("hbhunger") + +if minetest.settings:get_bool("enable_damage") then + +hbhunger = {} +hbhunger.food = {} + +-- HUD statbar values +hbhunger.hunger = {} +hbhunger.hunger_out = {} + +-- Count number of poisonings a player has at once +hbhunger.poisonings = {} + +-- HUD item ids +local hunger_hud = {} + +hbhunger.HUD_TICK = 0.1 + +--Some hunger settings +hbhunger.exhaustion = {} -- Exhaustion is experimental! + +hbhunger.HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken +hbhunger.EXHAUST_DIG = 3 -- exhaustion increased this value after digged node +hbhunger.EXHAUST_PLACE = 1 -- exhaustion increased this value after placed +hbhunger.EXHAUST_MOVE = 0.3 -- exhaustion increased this value if player movement detected +hbhunger.EXHAUST_LVL = 160 -- at what exhaustion player satiation gets lowerd + + +--load custom settings +local set = io.open(minetest.get_modpath("hbhunger").."/hbhunger.conf", "r") +if set then + dofile(minetest.get_modpath("hbhunger").."/hbhunger.conf") + set:close() +end + +local function custom_hud(player) + hb.init_hudbar(player, "satiation", hbhunger.get_hunger_raw(player)) +end + +dofile(minetest.get_modpath("hbhunger").."/hunger.lua") + +-- register satiation hudbar +hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = "hbhunger_icon.png", bgicon = "hbhunger_bgicon.png", bar = "hbhunger_bar.png" }, 20, 30, false, nil, { format_value = "%.1f", format_max_value = "%d" }) + +-- update hud elemtens if value has changed +local function update_hud(player) + local name = player:get_player_name() + --hunger + local h_out = tonumber(hbhunger.hunger_out[name]) + local h = tonumber(hbhunger.hunger[name]) + if h_out ~= h then + hbhunger.hunger_out[name] = h + hb.change_hudbar(player, "satiation", h) + end +end + +hbhunger.get_hunger_raw = function(player) + local inv = player:get_inventory() + if not inv then return nil end + local hgp = inv:get_stack("hunger", 1):get_count() + if hgp == 0 then + hgp = 21 + inv:set_stack("hunger", 1, ItemStack({name=":", count=hgp})) + else + hgp = hgp + end + return hgp-1 +end + +hbhunger.set_hunger_raw = function(player) + local inv = player:get_inventory() + local name = player:get_player_name() + local value = hbhunger.hunger[name] + if not inv or not value then return nil end + if value > 30 then value = 30 end + if value < 0 then value = 0 end + + inv:set_stack("hunger", 1, ItemStack({name=":", count=value+1})) + + return true +end + +minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + local inv = player:get_inventory() + inv:set_size("hunger",1) + hbhunger.hunger[name] = hbhunger.get_hunger_raw(player) + hbhunger.hunger_out[name] = hbhunger.hunger[name] + hbhunger.exhaustion[name] = 0 + hbhunger.poisonings[name] = 0 + custom_hud(player) + hbhunger.set_hunger_raw(player) +end) + +minetest.register_on_respawnplayer(function(player) + -- reset hunger (and save) + local name = player:get_player_name() + hbhunger.hunger[name] = 20 + hbhunger.set_hunger_raw(player) + hbhunger.exhaustion[name] = 0 +end) + +local main_timer = 0 +local timer = 0 +local timer2 = 0 +minetest.register_globalstep(function(dtime) + main_timer = main_timer + dtime + timer = timer + dtime + timer2 = timer2 + dtime + if main_timer > hbhunger.HUD_TICK or timer > 4 or timer2 > hbhunger.HUNGER_TICK then + if main_timer > hbhunger.HUD_TICK then main_timer = 0 end + for _,player in ipairs(minetest.get_connected_players()) do + local name = player:get_player_name() + + local h = tonumber(hbhunger.hunger[name]) + local hp = player:get_hp() + if timer > 4 then + -- heal player by 1 hp if not dead and satiation is > 15 (of 30) + if h > 15 and hp > 0 and player:get_breath() > 0 then + player:set_hp(hp+1) + -- or damage player by 1 hp if satiation is < 2 (of 30) + elseif h <= 1 then + if hp-1 >= 0 then player:set_hp(hp-1) end + end + end + -- lower satiation by 1 point after xx seconds + if timer2 > hbhunger.HUNGER_TICK then + if h > 0 then + h = h-1 + hbhunger.hunger[name] = h + hbhunger.set_hunger_raw(player) + end + end + + -- update all hud elements + update_hud(player) + + local controls = player:get_player_control() + -- Determine if the player is walking + if controls.up or controls.down or controls.left or controls.right then + hbhunger.handle_node_actions(nil, nil, player) + end + end + end + if timer > 4 then timer = 0 end + if timer2 > hbhunger.HUNGER_TICK then timer2 = 0 end +end) + +end diff --git a/mods/hbhunger/locale/hbhunger.de.tr b/mods/hbhunger/locale/hbhunger.de.tr new file mode 100644 index 0000000..4223564 --- /dev/null +++ b/mods/hbhunger/locale/hbhunger.de.tr @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation=Sättigung diff --git a/mods/hbhunger/locale/hbhunger.it.tr b/mods/hbhunger/locale/hbhunger.it.tr new file mode 100644 index 0000000..b99dc61 --- /dev/null +++ b/mods/hbhunger/locale/hbhunger.it.tr @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation=Sazietà diff --git a/mods/hbhunger/locale/hbhunger.ms.tr b/mods/hbhunger/locale/hbhunger.ms.tr new file mode 100644 index 0000000..67f08f7 --- /dev/null +++ b/mods/hbhunger/locale/hbhunger.ms.tr @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation=Kekenyangan diff --git a/mods/hbhunger/locale/hbhunger.pt.tr b/mods/hbhunger/locale/hbhunger.pt.tr new file mode 100644 index 0000000..82be594 --- /dev/null +++ b/mods/hbhunger/locale/hbhunger.pt.tr @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation=Saciedade diff --git a/mods/hbhunger/locale/hbhunger.ru.tr b/mods/hbhunger/locale/hbhunger.ru.tr new file mode 100644 index 0000000..afd6e66 --- /dev/null +++ b/mods/hbhunger/locale/hbhunger.ru.tr @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation=голод diff --git a/mods/hbhunger/locale/template.txt b/mods/hbhunger/locale/template.txt new file mode 100644 index 0000000..84ad832 --- /dev/null +++ b/mods/hbhunger/locale/template.txt @@ -0,0 +1,2 @@ +# textdomain:hbhunger +Satiation= diff --git a/mods/hbhunger/mod.conf b/mods/hbhunger/mod.conf new file mode 100644 index 0000000..da6c465 --- /dev/null +++ b/mods/hbhunger/mod.conf @@ -0,0 +1,4 @@ +name = hbhunger +description = Adds a simple hunger meachanic with satiation, food poisoning and different healing. +depends = hudbars +optional_depends = default, flowers, animalmaterials, bucket, bushes, bushes_classic, cooking, creatures, docfarming, dwarves, ethereal, farming, farming_plus, ferns, fishing, fruit, glooptest, jkanimals, jkfarming, jkwine, kpgmobs, mobfcooking, mobs, moretrees, mtfoods, mush45, mushroom, seaplants, pizza, nssm diff --git a/mods/hbhunger/screenshot.png b/mods/hbhunger/screenshot.png new file mode 100644 index 0000000..5af6583 Binary files /dev/null and b/mods/hbhunger/screenshot.png differ diff --git a/mods/hbhunger/sounds/hbhunger_eat_generic.ogg b/mods/hbhunger/sounds/hbhunger_eat_generic.ogg new file mode 100644 index 0000000..b6acd07 Binary files /dev/null and b/mods/hbhunger/sounds/hbhunger_eat_generic.ogg differ diff --git a/mods/hbhunger/textures/hbhunger_bar.png b/mods/hbhunger/textures/hbhunger_bar.png new file mode 100644 index 0000000..c94bf52 Binary files /dev/null and b/mods/hbhunger/textures/hbhunger_bar.png differ diff --git a/mods/hbhunger/textures/hbhunger_bar_health_poison.png b/mods/hbhunger/textures/hbhunger_bar_health_poison.png new file mode 100644 index 0000000..255a287 Binary files /dev/null and b/mods/hbhunger/textures/hbhunger_bar_health_poison.png differ diff --git a/mods/hbhunger/textures/hbhunger_bgicon.png b/mods/hbhunger/textures/hbhunger_bgicon.png new file mode 100644 index 0000000..07e21e7 Binary files /dev/null and b/mods/hbhunger/textures/hbhunger_bgicon.png differ diff --git a/mods/hbhunger/textures/hbhunger_icon.png b/mods/hbhunger/textures/hbhunger_icon.png new file mode 100644 index 0000000..a5cc2a1 Binary files /dev/null and b/mods/hbhunger/textures/hbhunger_icon.png differ diff --git a/mods/hbhunger/textures/hbhunger_icon_health_poison.png b/mods/hbhunger/textures/hbhunger_icon_health_poison.png new file mode 100644 index 0000000..8ce2db8 Binary files /dev/null and b/mods/hbhunger/textures/hbhunger_icon_health_poison.png differ diff --git a/mods/hbsprint/LICENSE b/mods/hbsprint/LICENSE new file mode 100644 index 0000000..82da218 --- /dev/null +++ b/mods/hbsprint/LICENSE @@ -0,0 +1,504 @@ +GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +(This is the first released version of the Lesser GPL. It also counts +as the successor of the GNU Library Public License, version 2, hence +the version number 2.1.) + + Preamble + +The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + +To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + +Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + +When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + +We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + +For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + +Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + +GNU LESSER GENERAL PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + +You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + +2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. + +b) You must cause the files modified to carry prominent notices +stating that you changed the files and the date of any change. + +c) You must cause the whole of the work to be licensed at no +charge to all third parties under the terms of this License. + +d) If a facility in the modified Library refers to a function or a +table of data to be supplied by an application program that uses +the facility, other than as an argument passed when the facility +is invoked, then you must make a good faith effort to ensure that, +in the event an application does not supply such function or +table, the facility still operates, and performs whatever part of +its purpose remains meaningful. + +(For example, a function in a library to compute square roots has +a purpose that is entirely well-defined independent of the +application. Therefore, Subsection 2d requires that any +application-supplied function or table used by this function must +be optional: if the application does not supply it, the square +root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + +Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + +a) Accompany the work with the complete corresponding +machine-readable source code for the Library including whatever +changes were used in the work (which must be distributed under +Sections 1 and 2 above); and, if the work is an executable linked +with the Library, with the complete machine-readable "work that +uses the Library", as object code and/or source code, so that the +user can modify the Library and then relink to produce a modified +executable containing the modified Library. (It is understood +that the user who changes the contents of definitions files in the +Library will not necessarily be able to recompile the application +to use the modified definitions.) + +b) Use a suitable shared library mechanism for linking with the +Library. A suitable mechanism is one that (1) uses at run time a +copy of the library already present on the user's computer system, +rather than copying library functions into the executable, and (2) +will operate properly with a modified version of the library, if +the user installs one, as long as the modified version is +interface-compatible with the version that the work was made with. + +c) Accompany the work with a written offer, valid for at +least three years, to give the same user the materials +specified in Subsection 6a, above, for a charge no more +than the cost of performing this distribution. + +d) If distribution of the work is made by offering access to copy +from a designated place, offer equivalent access to copy the above +specified materials from the same place. + +e) Verify that the user has already received a copy of these +materials or that you have already sent this user a copy. + +For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + +It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + +7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work +based on the Library, uncombined with any other library +facilities. This must be distributed under the terms of the +Sections above. + +b) Give prominent notice with the combined library of the fact +that part of it is a work based on the Library, and explaining +where to find the accompanying uncombined form of the same work. + +8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + +11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Libraries + +If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + +{description} +Copyright (C) {year} {fullname} + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 +USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in the +library `Frob' (a library for tweaking knobs) written by James Random +Hacker. + +{signature of Ty Coon}, 1 April 1990 +Ty Coon, President of Vice + +That's all there is to it! diff --git a/mods/hbsprint/README.md b/mods/hbsprint/README.md new file mode 100644 index 0000000..c080bd7 --- /dev/null +++ b/mods/hbsprint/README.md @@ -0,0 +1,37 @@ +# hbSprint + +## Description +A flexible sprint mod supporting stamina, hunger and coexistance with other physics altering mods. + +## Licensing +- LGPLv2.1/CC BY-SA 3.0. Particle code: copyright (c) 2017 Elijah Duffy. +- sprint_stamina_\*icon textures: + - CC0 + - Created by Jordan Irwin (AntumDeluge) + - Based on [Running man icon by manio1](https://openclipart.org/detail/254287) + +## Notes +hbSprint can be played with Minetest 0.4.16 or above. +It has no dependencies, but it supports on [hudbars](http://repo.or.cz/w/minetest_hudbars.git), [hbhunger](http://repo.or.cz/w/minetest_hbhunger.git) and [player_monoids](https://github.com/minetest-mods/player_monoids). + +## List of features + +- Displays and drains stamina (by default, if hudbars is present). Hides stamina bar if full. +- Displays and drains satiation (by default, if hbhunger is present) +- Drains air faster while sprinting on walkable ground but in water (by default) +- Requires only forward key to be pressed, not left and right (by default) +- Requires walkable ground (no water surface sprinting) +- Particle spawning based on ground type (Thanks to [octacian](https://github.com/octacian/sprint/)) +- All variables customizable in Advanced settings or directly in minetest.conf + + +## Known issues +- Forward double tap support not implemented + +## Bug reports and suggestions +You can report bugs or suggest ideas by [filing an issue](http://github.com/tacotexmex/hbsprint/issues/new). + +## Links +* [Download ZIP](https://github.com/tacotexmex/hbsprint/archive/master.zip) +* [Source](https://github.com/tacotexmex/hbsprint/) +* [Forum thread](https://forum.minetest.net/viewtopic.php?f=9&t=18069&p=282981) diff --git a/mods/hbsprint/depends.txt b/mods/hbsprint/depends.txt new file mode 100644 index 0000000..77322de --- /dev/null +++ b/mods/hbsprint/depends.txt @@ -0,0 +1,4 @@ +player_monoids? +hudbars? +hbhunger? +hunger_ng? diff --git a/mods/hbsprint/description.txt b/mods/hbsprint/description.txt new file mode 100644 index 0000000..4de59ff --- /dev/null +++ b/mods/hbsprint/description.txt @@ -0,0 +1 @@ +A flexible sprint mod supporting stamina, hunger and monoids. diff --git a/mods/hbsprint/init.lua b/mods/hbsprint/init.lua new file mode 100644 index 0000000..c685a97 --- /dev/null +++ b/mods/hbsprint/init.lua @@ -0,0 +1,224 @@ +-- Vars + +local speed = tonumber(minetest.settings:get ("sprint_speed")) or 1.3 +local jump = tonumber(minetest.settings:get ("sprint_jump")) or 1.1 +local key = minetest.settings:get ("sprint_key") or "Use" +local dir = minetest.settings:get_bool("sprint_forward_only") ~= false +local particles = tonumber(minetest.settings:get ("sprint_particles")) or 2 +local stamina = minetest.settings:get_bool("sprint_stamina") ~= false +local stamina_drain = tonumber(minetest.settings:get ("sprint_stamina_drain")) or 2 +local replenish = tonumber(minetest.settings:get ("sprint_stamina_replenish")) or 2 +local starve = minetest.settings:get_bool("sprint_starve") ~= false +local starve_drain = tonumber(minetest.settings:get ("sprint_starve_drain")) or 0.5 +local starve_limit = tonumber(minetest.settings:get ("sprint_starve_limit")) or 6 +local breath = minetest.settings:get_bool("sprint_breath") ~= false +local breath_drain = tonumber(minetest.settings:get ("sprint_breath_drain")) or 1 +local autohide = minetest.settings:get_bool("hudbars_autohide_stamina") ~= false + +local sprint_timer_step = 0.5 +local sprint_timer = 0 +local stamina_timer = 0 +local breath_timer = 0 + +local mod_hudbars = minetest.get_modpath("hudbars") or false +local mod_player_monoids = minetest.get_modpath("player_monoids") or false +local mod_playerphysics = minetest.get_modpath("playerphysics") or false +local starve +if minetest.get_modpath("hbhunger") then + starve = "hbhunger" +elseif minetest.get_modpath("hunger_ng") then + starve = "hunger_ng" + --starve_drain = starve_drain * -1 +else + starve = false +end +if minetest.settings:get_bool("creative_mode") then + starve = false +end +-- Functions + +local function start_sprint(player) + if player:get_meta():get("hbsprint:sprinting") == "false" then + if mod_player_monoids then + player_monoids.speed:add_change(player, speed, "hbsprint:speed") + player_monoids.jump:add_change(player, jump, "hbsprint:jump") + elseif mod_playerphysics then + playerphysics.add_physics_factor(player, "speed", "hbsprint:speed", speed) + playerphysics.add_physics_factor(player, "jump", "hbsprint:jump", jump) + else + player:set_physics_override({speed = speed, jump = jump}) + end + end +end + +local function stop_sprint(player) + if player:get_meta():get("hbsprint:sprinting") == "true" then + if mod_player_monoids then + player_monoids.speed:del_change(player, "hbsprint:speed") + player_monoids.jump:del_change(player, "hbsprint:jump") + elseif mod_playerphysics then + playerphysics.remove_physics_factor(player, "speed", "hbsprint:speed") + playerphysics.remove_physics_factor(player, "jump", "hbsprint:jump") + else + player:set_physics_override({speed = 1, jump = 1}) + end + end +end + +local function drain_stamina(player) + local player_stamina = player:get_meta():get_float("hbsprint:stamina") or 20 + if player_stamina > 0 then + player:get_meta():set_float("hbsprint:stamina", player_stamina - stamina_drain) + end + if mod_hudbars then + if autohide and player_stamina < 20 then hb.unhide_hudbar(player, "stamina") end + hb.change_hudbar(player, "stamina", player_stamina) + end +end + +local function replenish_stamina(player) + local stamina = player:get_meta():get_float("hbsprint:stamina") or 20 + if not stamina then + return + end + local player_stamina = tonumber(stamina) + if player_stamina < 20 then + player:get_meta():set_float("hbsprint:stamina", player_stamina + stamina_drain) + end + if mod_hudbars then + hb.change_hudbar(player, "stamina", player_stamina) + if autohide and player_stamina == 20 then + hb.hide_hudbar(player, "stamina") + end + end +end + +local function drain_hunger(player, hunger, name) + if hunger > 0 then + local newhunger = hunger - starve_drain + if starve == "hbhunger" then + hbhunger.hunger[name] = newhunger + hbhunger.set_hunger_raw(player) + elseif starve == "hunger_ng" then + hunger_ng.alter_hunger(name, - starve_drain, "Sprinting") + end + end +end + +local function drain_breath(player) + local player_breath = player:get_breath() + if player_breath < 11 then + player_breath = player_breath - breath_drain + if player_breath > 0 then + player:set_breath(player_breath) + end + end +end + +local function create_particles(player, name, pos, ground) + if ground and ground.name ~= "air" and ground.name ~= "ignore" then + local def = minetest.registered_nodes[ground.name] + local tile = def.tiles[1] or def.inventory_image or "" + if type(tile) == "string" then + for i = 1, particles do + minetest.add_particle({ + pos = {x = pos.x + math.random(-1,1) * math.random() / 2, y = pos.y + 0.1, z = pos.z + math.random(-1,1) * math.random() / 2}, + velocity = {x = 0, y = 5, z = 0}, + acceleration = {x = 0, y = -13, z = 0}, + expirationtime = math.random(), + size = math.random() + 0.5, + vertical = false, + texture = tile, + }) + end + end + end +end + +-- Registrations + +if mod_hudbars and stamina then + hb.register_hudbar( + "stamina", + 0xFFFFFF, + "Stamina", + { + bar = "sprint_stamina_bar.png", + icon = "sprint_stamina_icon.png", + bgicon = "sprint_stamina_bgicon.png" + }, + 20, + 20, + autohide) +end + +minetest.register_on_joinplayer(function(player) + if mod_hudbars and stamina then hb.init_hudbar(player, "stamina", 20, 20, autohide) end + player:get_meta():set_float("hbsprint:stamina", 20) +end) + +minetest.register_globalstep(function(dtime) + sprint_timer = sprint_timer + dtime + stamina_timer = stamina_timer + dtime + breath_timer = breath_timer + dtime + if sprint_timer >= sprint_timer_step then + for _,player in ipairs(minetest.get_connected_players()) do + local ctrl = player:get_player_control() + local key_press = false + if key == "Use" and dir then + key_press = ctrl.aux1 and ctrl.up and not ctrl.left and not ctrl.right + elseif key == "Use" and not dir then + key_press = ctrl.aux1 + end + -- if key == "W" and dir then + -- key_press = ctrl.aux1 and ctrl.up or key_press and ctrl.up + -- elseif key == "W" then + -- key_press = ctrl.aux1 or key_press and key_tap + -- end + + if key_press then + local name = player:get_player_name() + local hunger = 30 + local pos = player:get_pos() + local ground = minetest.get_node_or_nil({x=pos.x, y=pos.y-1, z=pos.z}) + local walkable = false + local player_stamina = player:get_meta():get_float("hbsprint:stamina") or 20 + if starve == "hbhunger" then + hunger = tonumber(hbhunger.hunger[name]) + elseif starve == "hunger_ng" then + hunger = hunger_ng.get_hunger_information(name).hunger.exact + end + if ground ~= nil then + local ground_def = minetest.registered_nodes[ground.name] + if ground_def then + walkable = minetest.registered_nodes[ground.name].walkable + end + end + if player_stamina > 0 and hunger > starve_limit and walkable then + start_sprint(player) + player:get_meta():set_string("hbsprint:sprinting", "true") + if stamina then drain_stamina(player) end + if starve then drain_hunger(player, hunger, name) end + if breath then + if breath_timer >= 2 then + drain_breath(player) + breath_timer = 0 + end + end + if particles then create_particles(player, name, pos, ground) end + else + stop_sprint(player) + player:get_meta():set_string("hbsprint:sprinting", "false") + end + else + stop_sprint(player) + player:get_meta():set_string("hbsprint:sprinting", "false") + if stamina_timer >= replenish then + if stamina then replenish_stamina(player) end + stamina_timer = 0 + end + end + end + sprint_timer = 0 + end +end) diff --git a/mods/hbsprint/mod.conf b/mods/hbsprint/mod.conf new file mode 100644 index 0000000..4433f1a --- /dev/null +++ b/mods/hbsprint/mod.conf @@ -0,0 +1 @@ +name = hbsprint diff --git a/mods/hbsprint/settingtypes.txt b/mods/hbsprint/settingtypes.txt new file mode 100644 index 0000000..9771219 --- /dev/null +++ b/mods/hbsprint/settingtypes.txt @@ -0,0 +1,39 @@ +#Sprint speed multiplier +sprint_speed (Sprint speed multiplier) float 1.3 + +#Sprint jump multiplier +sprint_jump (Sprint jump multiplier) float 1.1 + +#Use a key to sprint +sprint_key (Sprint key) enum Use Use + +#Require player to move forward only to be able to sprint +sprint_forward_only (Sprint forward only) bool true + +#The amount of particles to spawn behind a sprinting player +sprint_particles (Particles) float 2 + +#Drain stamina while sprinting +sprint_stamina (Stamina) bool true + +#The amount of stamina to drain while sprinting +sprint_stamina_drain (Stamina drain) float 2 + +#The amount of seconds before starting to replenish stamina +sprint_stamina_replenish (Stamina replenish) float 2 + +#Drain satiation while sprinting +sprint_starve (Starve) bool false + +#The amount of satiation to drain while sprinting +sprint_starve_drain (Starve drain) float 0.5 + +#Drain air while sprinting under water +sprint_breath (Breath) bool true + +#The amount of air to drain while sprinting under water +sprint_breath_drain (Breath drain) float 1 + +#If enabled (default), the stamina indicators in the HUD will be automatically hidden shortly +#after stamina has filled up. Otherwise, stamina will always be displayed. +hudbars_autohide_stamina (Automatically hide staminal indicator) bool true diff --git a/mods/hbsprint/textures/sprint_stamina_bar.png b/mods/hbsprint/textures/sprint_stamina_bar.png new file mode 100644 index 0000000..55e1462 Binary files /dev/null and b/mods/hbsprint/textures/sprint_stamina_bar.png differ diff --git a/mods/hbsprint/textures/sprint_stamina_bgicon.png b/mods/hbsprint/textures/sprint_stamina_bgicon.png new file mode 100644 index 0000000..8e56295 Binary files /dev/null and b/mods/hbsprint/textures/sprint_stamina_bgicon.png differ diff --git a/mods/hbsprint/textures/sprint_stamina_icon.png b/mods/hbsprint/textures/sprint_stamina_icon.png new file mode 100644 index 0000000..89fce3b Binary files /dev/null and b/mods/hbsprint/textures/sprint_stamina_icon.png differ diff --git a/mods/hot_air_balloons/README.md b/mods/hot_air_balloons/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/mods/hot_air_balloons/README.md @@ -0,0 +1 @@ + diff --git a/mods/hot_air_balloons/README.txt b/mods/hot_air_balloons/README.txt new file mode 100644 index 0000000..00af589 --- /dev/null +++ b/mods/hot_air_balloons/README.txt @@ -0,0 +1,57 @@ +This mod adds craftable and ridable hot air balloons to minetest. +Controls: + right click with coal lump: increase heat and buoyancy (*) + right click without coal: enter or leave balloon + left, right, up, down (default WASD): accelerate the balloon + sneak (default shift): decrease heat, lowering buoyancy + jump (default space): turn the balloon towards where the player is looking + + + +optional dependencies: + default, bucket (enable crafting recipe 1 if installed together) + mcl_core, mcl_mobitems, mcl_buckets (enable crafting recipe 2 if installed together) + + +Crafting recipe 1 (Minetest Game and most derivatives): +[P] := paper +[W] := wood +[L] := lava bucket +[ ] := nothing + +[P][P][P] +[P][L][P] +[ ][W][ ] + +Crafting recipe 2 (MineClone 2): +[L] := leather +[W] := wood +[V] := lava bucket +[S] := string + +[L][L][L] +[L][V][L] +[S][W][S] + +(*)any item with the "coal" group works for fuel. Higher coal group means higher heat + Note that coal blocks and ore from the default mod don't have the coal group + +See license.txt for proper license information. + +Author of code +---------------------------------------- +NetherEran (LGPL v2.1) + +Authors of media (models, textures) +---------------------------------------- +Textures +-------- +NetherEran (CC BY-SA 3.0): + hot_air_balloons_balloon.png + hot_air_balloons_balloon_flame.png + hot_air_balloons_balloon_model.png --Contains default_wood.png (by BlockMen) and default_aspen_wood.png (by sofar) (derived from default_pine_wood by paramat) + +Models +-------- +NetherEran (CC BY-SA 3.0): + ballon.blend (= hot_air_balloons_balloon.obj) diff --git a/mods/hot_air_balloons/absent_ballooner_rescuing.lua b/mods/hot_air_balloons/absent_ballooner_rescuing.lua new file mode 100644 index 0000000..b80c3e1 --- /dev/null +++ b/mods/hot_air_balloons/absent_ballooner_rescuing.lua @@ -0,0 +1,101 @@ +--localize things for better performance +local serialize = minetest.serialize +local add_entity = minetest.add_entity +local after = minetest.after + +--for storing which players left while in a balloon +local storage = minetest.get_mod_storage() +local absent_ballooners = minetest.deserialize(storage:get_string("absent_ballooners")) or {} + + +--putting leaving people into storage +local leave_while_ballooning = function(player) + local parent = player:get_attach() + if parent and not parent:is_player() + then + local balloon_type = parent:get_luaentity().balloon_type + if balloon_type + then + --remove() only works if someone else is in the area, + --hence the need for mark_for_deletion + parent:remove() + absent_ballooners[player:get_player_name()] = balloon_type + end + end +end + +--same as on_leave but for all players at once +local on_shutdown = function() + local connected_players = minetest.get_connected_players() + for i, p in ipairs(connected_players) + do + leave_while_ballooning(p) + end + storage:set_string("absent_ballooners", serialize(absent_ballooners)) +end +--putting leaving people into storage and saving storage +local on_leave = function(player) + leave_while_ballooning(player) + storage:set_string("absent_ballooners", serialize(absent_ballooners)) +end + +minetest.register_on_leaveplayer(on_leave) +minetest.register_on_shutdown(on_shutdown) + +--checking if player who joined was ballooning when they left +--if so spawn a new balloon and set them as attachment +local on_join = function(player) + if player + then + local name = player:get_player_name() + if absent_ballooners[name] + then + local pos = player:get_pos() + + --for compatibility with version 1.1 of the mod + if absent_ballooners[name] == true + then + absent_ballooners[name] = "hot_air_balloons:balloon" + end + --minetest doesn't seem to like add_entity on init so a minetest.after is used + --player is set as pilot in on_activate + after(2, + function() + --concatenating "P" with name signals that player should be set as attach + add_entity(pos, absent_ballooners[name], "P" .. name) + end) + end + end +end +minetest.register_on_joinplayer(on_join) + + +--called in on_activate if balloon was spawned to rescue an absent ballooner +local set_rescue = function(self, playername) + local player = minetest.get_player_by_name(playername) + self.pilot = playername + if not player --player logged off right away + then + self.object:remove() + return + end + player:set_attach(self.object, "", + {x = 0, y = 1, z = 0}, {x = 0, y = 0, z = 0}) + absent_ballooners[playername] = nil +end +--set as get_staticdata +local mark_for_deletion = function(self) + if self.pilot + then + --pilot logged off while ballooning, deleting balloon on next activation + return "R" + else + --normally save and load balloon + return "" + end +end + + +return set_rescue, mark_for_deletion + + diff --git a/mods/hot_air_balloons/api.txt b/mods/hot_air_balloons/api.txt new file mode 100644 index 0000000..97f1feb --- /dev/null +++ b/mods/hot_air_balloons/api.txt @@ -0,0 +1,30 @@ +API functions: + hot_air_balloons.get_entity(name, mesh_name, texture_name) + arguments: + 'name': string in the format "modname:entityname" + 'mesh_name': string in the format "modname_meshFileName" + 'texture_name': string in the format "modname_textureFileName" + Example usage: minetest.register_entity(hot_air_balloons.get_entity(foo, raa, see)) + you can also store the values in a local variable and change the fields of the entity definition table before registering the entity. + passing the entity name to the function is used when a balloon pilot logs off + + + + hot_air_balloons.get_item(name, description, texture, object_name) + arguments: + 'name': string in the format "modname:itemname" + 'description': string that appears in the tooltip. Use minetest.translate with this. + 'texture': string in the format "modname_textureFileName" + 'object_name' is the name specified in hot_air_balloons.get_entity + Example usage: minetest.register_craftitem(hot_air_balloons.get_item(foo, raa, see, mon)) + returns an item name and an item definition table + as with get_entity you can store the item definition table and change its fields before registering the item. + + + +explanation of the custom fields of the entitiy definition table: + pilot: stores the player name of the pilot or nil if there is no pilot + heat: integer in the interval [0, 12000) + Decides wether to fly up or down + balloon_type: entity name of the balloon, e.g."hot_air_balloons:balloon". + used to make the balloon log off and log back in together with its pilot \ No newline at end of file diff --git a/mods/hot_air_balloons/craft.lua b/mods/hot_air_balloons/craft.lua new file mode 100644 index 0000000..d75d1ab --- /dev/null +++ b/mods/hot_air_balloons/craft.lua @@ -0,0 +1,62 @@ +--This file adds crafting recipes depending on which dependencies are installed + + +if minetest.get_modpath("default") and + minetest.get_modpath("bucket") +then + minetest.register_craft( + { + output = "hot_air_balloons:item", + recipe = + { + {"default:paper", "default:paper", "default:paper"}, + {"default:paper", "bucket:bucket_lava", "default:paper"}, + {"", "group:wood", "" }, + }, + }) + minetest.register_craft( + { + type = "fuel", + recipe = "hot_air_balloons:item", + burntime = 20, + }) + return +end +if minetest.get_modpath("mcl_buckets") and + minetest.get_modpath("mcl_mobitems") and + minetest.get_modpath("mcl_core") +then + minetest.register_craft( + { + output = "hot_air_balloons:item", + recipe = + { + {"mcl_mobitems:leather", "mcl_mobitems:leather", "mcl_mobitems:leather"}, + {"mcl_mobitems:leather", "bucket:bucket_lava", "mcl_mobitems:leather"}, + {"mcl_mobitems:string", "group:wood", "mcl_mobitems:string" }, + }, + }) + minetest.register_craft( + { + type = "fuel", + recipe = "hot_air_balloons:item", + burntime = 20, + }) + return +end +--[[ +minetest.register_craft( +{ + type = "aircraft" +} +]] + +--make balloon work with mcl2 creative mode + +--announce in chat if no crafting recipe was added. +minetest.after(2, + function() + minetest.chat_send_all("Optional dependencies for hot_air_balloons are missing so no crafting recipe was added.\n".. + "Install either 'default' and 'bucket' or 'mcl_core', 'mcl_mobitems' 'and mcl_buckets' if this bothers you.\n".. + "All other functions of the mod should be unaffected by this.") + end) \ No newline at end of file diff --git a/mods/hot_air_balloons/depends.txt b/mods/hot_air_balloons/depends.txt new file mode 100644 index 0000000..a2d05cb --- /dev/null +++ b/mods/hot_air_balloons/depends.txt @@ -0,0 +1,5 @@ +default? +bucket? +mcl_buckets? +mcl_mobitems? +mcl_core? \ No newline at end of file diff --git a/mods/hot_air_balloons/init.lua b/mods/hot_air_balloons/init.lua new file mode 100644 index 0000000..497ffb3 --- /dev/null +++ b/mods/hot_air_balloons/init.lua @@ -0,0 +1,223 @@ +--localize functions for better performance +local string_byte = string.byte +local string_sub = string.sub +local get_item_group = minetest.get_item_group +local add_particlespawner = minetest.add_particlespawner +local add_item = minetest.add_item +local get_node = minetest.get_node +local add_entity = minetest.add_entity + +local modpath = minetest.get_modpath("hot_air_balloons") +local set_rescue, mark_for_deletion_if_piloted = dofile(modpath .. "/absent_ballooner_rescuing.lua") +local handle_movement = dofile(modpath .. "/movement.lua") + +local is_in_creative = function(name) + return creative and creative.is_enabled_for + and creative.is_enabled_for(name) +end + +local get_fire_particle = function (pos) + pos.y = pos.y + 3 + return { + amount = 3, + time = 1, + minpos = pos, + maxpos = pos, + minvel = {x = 0, y = 1, z = 0}, + maxvel = {x = 0, y = 1, z = 0}, + minexptime = 1, + maxexptime = 1, + minsize = 10, + maxsize = 5, + collisiondetection = false, + vertical = false, + texture = "hot_air_balloons_flame.png" + } +end + +local add_heat = function(self, player) + local item_stack = player:get_wielded_item() + local item_name = item_stack:get_name() + local group_coal = get_item_group(item_name, "coal") + if group_coal == 0 + then + return false + end + local heat = self.heat + heat = heat + 1200 * group_coal --1 min until heat is back to original + if heat < 12000 --cap heat at 12000 (10 min) + then + self.heat = heat + --adding particle effect + local pos = self.object:get_pos() + add_particlespawner(get_fire_particle(pos)) + if not is_in_creative(player:get_player_name()) + then + item_stack:take_item() + player:set_wielded_item(item_stack) + end + end + return true +end + +--global table, has fields get_entity_def and get_item_def +--custom balloons right now turn into normal ones when the pilot leaves +hot_air_balloons = {} +hot_air_balloons.get_entity = function(name, mesh_name, texture_name) + return + name, + { + initial_properties = + { + hp_max = 1, + physical = true, + weight = 5, + collisionbox = {-0.65, -0.01, -0.65, 0.65, 1.11, 0.65}, + visual = "mesh", + mesh = "hot_air_balloons_balloon.obj", + textures = {"hot_air_balloons_balloon_model.png"}, + is_visible = true, + makes_footstep_sound = false, + automatic_rotate = false, + backface_culling = false, + }, + heat = 0, + balloon_type = name, + + on_step = function(self, dtime) + --decrease heat, move + if self.heat > 0 + then + self.heat = self.heat - 1 + end + handle_movement(self) + end, + on_rightclick = function (self, clicker) + --if hoding coal, increase heat, else mount/dismount + if not clicker or not clicker:is_player() + then + return + end + --checking if clicker is holding coal + --heating balloon and returning if yes + if add_heat(self, clicker) + then + return + end + + --if not holding coal: + local playername = clicker:get_player_name() + if self.pilot and self.pilot == playername + then + self.pilot = nil + clicker:set_detach() + elseif not self.pilot + then + --attach + self.pilot = playername + clicker:set_attach(self.object, "", + {x = 0, y = 1, z = 0}, {x = 0, y = 0, z = 0}) + end + end, + --if pilot leaves start sinking and prepare for next pilot + on_detach_child = function(self, child) + self.heat = 0 + self.object:setvelocity({x = 0, y = 0, z = 0}) + end, + + on_activate = function(self, staticdata, dtime_s) + self.object:set_armor_groups({punch_operable = 1}) + --so balloons don't get lost + self.object:setvelocity({x = 0, y = 0, z = 0}) + + --checking if balloon was spawned from item or unloaded without pilot + if staticdata == "" + then + return + end + --checking if balloon should despawn when pilot logged off + local first_char = string_byte(staticdata) + --ballooner logged off, balloon will respawn when ballooner logs back in + if first_char == 82 --chr 82 = R + then + self.object:remove() + return + --absent ballooner logged back in + elseif first_char == 80 --chr 80 = P + then + set_rescue(self, string_sub(staticdata, 2)) + end + end, + + get_staticdata = mark_for_deletion_if_piloted, + + + on_punch = function(self, puncher) --drop balloon item + if self.pilot + then + return + elseif not (puncher and puncher:is_player()) + then + return + else + self.object:remove() + local inv = puncher:get_inventory() + if not is_in_creative(puncher:get_player_name()) + or not inv:contains_item("main", "hot_air_balloons:item") + then + local leftover = inv:add_item("main", "hot_air_balloons:item") + if not leftover:is_empty() + then + if self.object then + add_item(self.object:get_pos(), leftover) + end + end + end + end + end, + } +end + +hot_air_balloons.get_item = function(name, description, texture, object_name) +return + name, + { + description = description, + inventory_image = texture, + stack_max = 1, + liquids_pointable = true, + groups = {flammable = 2}, + on_place = + function (itemstack, placer, pointed_thing) + --places balloon if the clicked thing is a node and the above node is air + if pointed_thing.type == "node" + and get_node (pointed_thing.above).name == "air" + then + if not is_in_creative(placer:get_player_name()) + then + itemstack:take_item() + end + local pos_to_place = pointed_thing.above + pos_to_place.y = pos_to_place.y - 0.5 --subtracting 0.5 to place on ground + add_entity(pointed_thing.above, object_name) + end + --add remaining items to inventory + return itemstack + end + } +end +--registering the balloon entity, item and recepies + +minetest.register_entity(hot_air_balloons.get_entity( + "hot_air_balloons:balloon", + "hot_air_balloons_balloon.obj", + "hot_air_balloons_balloon_model.png")) + +minetest.register_craftitem(hot_air_balloons.get_item( + "hot_air_balloons:item", + minetest.translate("hot_air_balloons", "Hot Air Balloon"), + "hot_air_balloons_balloon.png", + "hot_air_balloons:balloon")) + + +dofile(modpath .. "/craft.lua") diff --git a/mods/hot_air_balloons/license.txt b/mods/hot_air_balloons/license.txt new file mode 100644 index 0000000..8dc6208 --- /dev/null +++ b/mods/hot_air_balloons/license.txt @@ -0,0 +1,54 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2019 NetherEran + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2010-2018: + + NetherEran + BlockMen + sofar + paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ \ No newline at end of file diff --git a/mods/hot_air_balloons/locale/hot_air_balloons.de.tr b/mods/hot_air_balloons/locale/hot_air_balloons.de.tr new file mode 100644 index 0000000..610cc41 --- /dev/null +++ b/mods/hot_air_balloons/locale/hot_air_balloons.de.tr @@ -0,0 +1,2 @@ +# textdomain:hot_air_balloons +Hot Air Balloon=Heißluftballon \ No newline at end of file diff --git a/mods/hot_air_balloons/locale/hot_air_balloons.es.tr b/mods/hot_air_balloons/locale/hot_air_balloons.es.tr new file mode 100644 index 0000000..05f331e --- /dev/null +++ b/mods/hot_air_balloons/locale/hot_air_balloons.es.tr @@ -0,0 +1,2 @@ +# textdomain:hot_air_balloons +Hot Air Balloon=Globo Aerostático \ No newline at end of file diff --git a/mods/hot_air_balloons/locale/hot_air_balloons.ro.tr b/mods/hot_air_balloons/locale/hot_air_balloons.ro.tr new file mode 100644 index 0000000..99cf77d --- /dev/null +++ b/mods/hot_air_balloons/locale/hot_air_balloons.ro.tr @@ -0,0 +1,2 @@ +# textdomain:hot_air_balloons +Hot Air Balloon=Balon cu aer cald \ No newline at end of file diff --git a/mods/hot_air_balloons/mod.conf b/mods/hot_air_balloons/mod.conf new file mode 100644 index 0000000..aa27390 --- /dev/null +++ b/mods/hot_air_balloons/mod.conf @@ -0,0 +1,4 @@ +name = hot_air_balloons +author = Eran +description = Adds craftable and controllable hot air balloons. +optional_depends = default, bucket, mcl_buckets, mcl_mobitems, mcl_core diff --git a/mods/hot_air_balloons/models/balloon.blend b/mods/hot_air_balloons/models/balloon.blend new file mode 100644 index 0000000..68cecf6 Binary files /dev/null and b/mods/hot_air_balloons/models/balloon.blend differ diff --git a/mods/hot_air_balloons/movement.lua b/mods/hot_air_balloons/movement.lua new file mode 100644 index 0000000..4b52a80 --- /dev/null +++ b/mods/hot_air_balloons/movement.lua @@ -0,0 +1,209 @@ +--localize global functions +local vector_new = vector.new +local math_hypot = math.hypot +local atan = math.atan +local cos = math.cos +local sin = math.sin +local abs = math.abs +local pi = math.pi +local min = math.min + +--max speed settings +local max_ballooning_vertical_speed = 1 +local max_ballooning_horizontal_speed = 3 + +local function is_water_is_air(pos) + local node_name = minetest.get_node(pos).name + return minetest.get_item_group(node_name, "water") > 0, + node_name == "air" +end +local function get_vertical_acceleration(self) + local heat = self.heat + local vel_y = self.object:getvelocity().y + local acc_candidate = heat / 1000 - 0.5 + + --enforce max speed + if vel_y > max_ballooning_vertical_speed + and acc_candidate * vel_y > 0 + then + return 0 + else + return acc_candidate + end +end + +--if balloon is submerged +local function float_up(self, vel) + self.submerged = true + vel.y = 1 + return vel +end + +local function swim(self, vel) + --allow controls, allow up + local pos = self.object:get_pos() + --keep y constant or rising + local acc_y = get_vertical_acceleration(self) + + if self.submerged or acc_y < 0 + then + self.submerged = false + vel.y = 0 + return 0, vel + else + return acc_y, vel + end +end + + +local tau = pi * 2 +--returns the radian equivalent of a in the range [0, tau) +local function to_radian(a) + if a < 0 + then + return to_radian(a + tau) + elseif a >= tau + then + return to_radian(a - tau) + else + return a + end +end +--decides which is the shortest way to rotate towards where the player is looking +local function get_rotate_direction(a, b) + return to_radian(a - b) < to_radian(b - a) +end + +--rotates the balloon towards where the player is looking +local pi_192ths = pi / 192 --radians to turn each step +local function rotate(self, player) + -- + pi so it finishes rotating when looking towards where the player is looking + local player_yaw = player:get_look_horizontal() + pi + local self_yaw = self.object:getyaw() + + if get_rotate_direction(player_yaw, self_yaw) + then + self.object:setyaw(to_radian(self_yaw - pi_192ths)) + else + self.object:setyaw(to_radian(self_yaw + pi_192ths)) + end +end + +--takes wasd and turns it into a 2d vector +local pi_halves = pi / 2 +function get_direction(right, left, up, down) + local inline, cross = 0, 0 + local move = right or left or up or down + if left then cross = 1 end + if right then cross = cross - 1 end + if up then inline = 1 end + if down then inline = inline - 1 end + local arg + if inline < 0 + then + return atan(cross / inline) + pi, move + elseif inline > 0 + then + return atan(cross / inline), move + else + return pi_halves * cross, move + end +end + + +--[[ +space to rotate where the player is looking +wasd to apply acceleration +shift to let out hot air, cooling the balloon +]] +local function handle_control(self, vel) + if not self.pilot + then + return 0, 0 + end + local player = minetest.get_player_by_name(self.pilot) + if not player --player left, balloon should get deleted + then + return 0, 0 + end + local control = player:get_player_control() + if control.sneak --lowering heat quickly + then + local heat = self.heat - 30 + if heat < 0 + then + self.heat = 0 + else + self.heat = heat + end + end + + if control.jump --rotate towards player yaw + then + rotate(self, player) + end + + --taking direction from get_direction + --and turning it into radians. + --if max speed is reached, only acceleration in the opposite direction is applied. + local dir_radians, move = get_direction(control.right, control.left, control.up, control.down) + if move and math_hypot(vel.x, vel.z) + then + dir_radians = dir_radians + player:get_look_horizontal() + local x, z = -sin(dir_radians), cos(dir_radians) + if math_hypot(vel.x, vel.z) > max_ballooning_horizontal_speed + then + if x * vel.x > 0 + then + x = 0 + end + if z * vel.z > 0 + then + z = 0 + end + end + return x, z + end + return 0, 0 +end + +--[[handle movement in different cases +movement restrictions: + -on ground: only vertical movement + -on water: free movement, though vertical only if up + -submerged: free movement, vertical goes up automatically + -in air: completely free movement +]] + +return function(self) + local pos_in = self.object:get_pos() + local pos_under = vector_new(pos_in.x, pos_in.y - 0.1, pos_in.z) + local on_water, in_air = is_water_is_air(pos_under) + local acc = vector_new(0, 0, 0) + local vel = self.object:getvelocity() + + + if is_water_is_air(pos_in) --if submerged + then + vel = float_up(self, vel) + acc.x, acc.z = handle_control(self, vel) + self.object:setvelocity(vel) + elseif on_water --if on water + then + acc.y, vel = swim(self, vel) + self.object:setvelocity(vel) + acc.x, acc.z = handle_control(self, vel) + elseif in_air + then + --allow controls and height change + acc.y = get_vertical_acceleration(self) + acc.x, acc.z = handle_control(self, vel) + else --if on ground + --only allow height change + acc.y = get_vertical_acceleration(self) + vel.x = 0 + vel.z = 0 + self.object:setvelocity(vel) + end + self.object:setacceleration(acc) +end diff --git a/mods/hot_air_balloons/screenshot.png b/mods/hot_air_balloons/screenshot.png new file mode 100644 index 0000000..f1395b2 Binary files /dev/null and b/mods/hot_air_balloons/screenshot.png differ diff --git a/mods/hot_air_balloons/textures/hot_air_balloons_balloon.png b/mods/hot_air_balloons/textures/hot_air_balloons_balloon.png new file mode 100644 index 0000000..d5d315f Binary files /dev/null and b/mods/hot_air_balloons/textures/hot_air_balloons_balloon.png differ diff --git a/mods/hot_air_balloons/textures/hot_air_balloons_balloon_model.png b/mods/hot_air_balloons/textures/hot_air_balloons_balloon_model.png new file mode 100644 index 0000000..6a0a6ba Binary files /dev/null and b/mods/hot_air_balloons/textures/hot_air_balloons_balloon_model.png differ diff --git a/mods/hot_air_balloons/textures/hot_air_balloons_flame.png b/mods/hot_air_balloons/textures/hot_air_balloons_flame.png new file mode 100644 index 0000000..658fbe5 Binary files /dev/null and b/mods/hot_air_balloons/textures/hot_air_balloons_flame.png differ diff --git a/mods/hudbars/API.md b/mods/hudbars/API.md new file mode 100644 index 0000000..ca6144a --- /dev/null +++ b/mods/hudbars/API.md @@ -0,0 +1,210 @@ +API documentation for the HUD bars mod +====================================== + +## Introduction +This API allows you to add, change, hide and unhide custom HUD bars for this mod. + +## Overview +To give you a *very* brief overview over this API, here is the basic workflow on how to add your own custom HUD bar: + +* Create images for your HUD bar +* Call `hb.register_hudbar` to make the definition of the HUD bar known to this mod +* Call `hb.init_hudbar` for each player for which you want to use previously defined HUD bar +* Use `hb.change_hudbar` whenever you need to change the values of a HUD bar of a certain player +* If you need it: Use `hb.hide_hudbar` and `hb.unhide_hudbar` to hide or unhide HUD bars of a certain player + +## The basic rules +In order to use this API, you should be aware of a few basic rules in order to understand it: + +* A HUD bar is an approximate graphical representation of the ratio of a current value and a maximum value, i.e. current health of 15 and maximum health of 20. A full HUD bar represents 100%, an empty HUD bar represents 0%. +* The current value must always be equal to or smaller then the maximum +* Both current value and maximum must not be smaller than 0 +* Both current value and maximum must be real numbers. So no NaN, infinity, etc. +* The HUD bar will be hidden if the maximum equals 0. This is intentional. +* The health and breath HUD bars are hardcoded. + +These are soft rules, the HUD bars mod will not enforce all of these. +But this mod has been programmed under the assumption that these rules are followed, for integrity. + +## Adding a HUD bar +To make a new HUD bar known to this mod, you need … + +* … an image of size 2×16 for the bar +* … an icon of size 16×16 (optional) +* … to register it with `hb.register_hudbar` + +### Bar image +The image for the bar will be repeated horizontally to denote the “value” of the HUD bar. +It **must** be of size 2×16. +If neccessary, the image will be split vertically in half, and only the left half of the image +is displayed. So the final HUD bar will always be displayed on a per-pixel basis. + +The default bar images are single-colored, but you can use other styles as well, for instance, +a vertical gradient. + +### Icon +A 16×16 image shown left of the HUD bar. This is optional. + +### `hb.register_hudbar(identifier, text_color, label, textures, default_start_value, default_start_max, default_start_hidden, format_string, format_string_config)` +This function registers a new custom HUD bar definition to the HUD bars mod, so it can be later used to be displayed, changed, hidden +and unhidden on a per-player basis. +Note this does not yet display the HUD bar. + +The HUD bars will be displayed in a “first come, first serve” order. This API does not allow fow a custom order or a way to set it +manually in a reliable way. However, you can use the setting `hudbars_sorting` for this. See the advanced setting menu in Minetest +for more information. + + +#### Parameters +* `identifier`: A globally unique internal name for the HUD bar, will be used later to refer to it. Please only rely on alphanumeric characters for now. The identifiers “`health`” and “`breath`” are used internally for the built-in health and breath bar, respectively. Please do not use these names. +* `text_color`: A 3-octet number defining the color of the text. The octets denote, in this order red, green and blue and range from `0x00` (complete lack of this component) to `0xFF` (full intensity of this component). Example: `0xFFFFFF` for white. +* `label`: A string which is displayed on the HUD bar itself to describe the HUD bar. Try to keep this string short. +* `textures`: A table with the following fields: + * `bar`: The file name of the bar image (as string). This is only used for the `progress_bar` bar type (see `README.txt`, settings section). + * `icon`: The file name of the icon, as string. For the `progress_bar` type, it is shown as single image left of the bar, for the two statbar bar types, it is used as the statbar icon and will be repeated. This field can be `nil`, in which case no icon will be used, but this is not recommended, because the HUD bar will be invisible if the one of the statbar bar types is used. + * `bgicon`: The file name of the background icon, it is used as the background for the modern statbar mode only. This field can be `nil`, in which case no background icon will be displayed in this mode. +* `default_start_value`: If this HUD bar is added to a player, and no initial value is specified, this value will be used as initial current value +* `default_max_value`: If this HUD bar is added to a player, and no initial maximum value is specified, this value will be used as initial maximum value +* `default_start_hidden`: The HUD bar will be initially start hidden by default when added to a player. Use `hb.unhide_hudbar` to unhide it. +* `format_string`: Optional; You can specify an alternative format string to use for the final text on the HUD bar. The default format string is “`@1: @2/@3`” (The “@” numbers are placeholders that have a meaning in this order: @1 = Label, @2 = current value, @3 = maximum value). Do *not* use minetest.translator on this string, the string will be translated by `hudbars`, but you still must put this string into the translation catalogue file. +* `format_string_config`: Required if `format_string` is set. This allows to change which parameters to use in the format string. It's a table with these fields: + * `textdomain`: Text domain of the format string, used by `minetest.translate` + * `order`: Table that contains the order of the placeholders. It's also possible to remove placeholders. Default order: `{ "label", "value", "max_value" }` + * `format_value`: Format string to apply when displaying `value`. Syntax is same as in `string.format`. Default: `"%d"` + * `format_max_value`: Same as `format_value` but is applied to `max_value` + +#### Example +Example (mostly) from `hbarmor` mod: + +``` +hb.register_hudbar("armor", 0xFFFFFF, minetest.translator("hbarmor", "Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } ) +``` + +Displays an armor HUD bar with a label of the form „Armor: 53%“. (`N` is a dummy function that returns its argument, used to make the string visible for translator scripts.) + +#### Return value +Always `nil`. + + +## Displaying a HUD bar +After a HUD bar has been registered, they are not yet displayed yet for any player. HUD bars must be +explicitly initialized on a per-player basis. + +You probably want to do this in the `minetest.register_on_joinplayer`. + +### `hb.init_hudbar(player, identifier, start_value, start_max, start_hidden)` +This function initialzes and activates a previously registered HUD bar and assigns it to a +certain client/player. This has only to be done once per player and after that, you can change +the values using `hb.change_hudbar`. + +However, if `start_hidden` was set to `true` for the HUD bar (in `hb.register_hudbar`), the HUD bar +will initially be hidden, but the HUD elements are still sent to the client. Otherwise, +the HUD bar will be initially be shown to the player. + +#### Parameters +* `player`: `ObjectRef` of the player to which the new HUD bar should be displayed to. +* `identifier`: The identifier of the HUD bar type, as specified in `hb.register_hudbar`. +* `start_value`: The initial current value of the HUD bar. This is optional, `default_start_value` of the registration function will be used, if this is `nil`. +* `start_max`: The initial maximum value of the HUD bar. This is optional, `default_start_max` of the registration function will be used, if this is `nil` +* `start_hidden`: Whether the HUD bar is initially hidden. This is optional, `default_start_hidden` of the registration function will be used as default + +#### Return value +`true` on success, `false` otherwise. + + +## Modifying a HUD bar +After a HUD bar has been added, you can change the current and maximum value and other attributes on a per-player basis. +You use the function `hb.change_hudbar` for this. + +### `hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color)` +Changes the values and the appearance of an initialized HUD bar for a certain player. `new_value` +and `new_max_value` are the most important parameters as they specify the new current and maximum new values, you do not need +to worry too much about the other parameters. + +The following parameters are less important and provided for styling the HUD bar after registration (if +this is desired). The “styling” parameters parallel the parameters of `hb.register_hudbar`. It is +recommended to not change the style of a HUD bar too often as this can be distracting or confusing +for players. + +`new_value`, `new_max_value` `new_icon`, `new_bgicon`, `new_bar`, `new_label` and `new_text_color` can be +`nil`; if one of them is `nil`, that means the value is unchanged. If all those values are `nil`, this +function is a no-op. + +This function tries to minimize the amount of calls to `hud_change` of the Minetest Lua API +(and thus, network traffic), when you only change the value and/or maximum value. In this case, +`hud_change` is only called if it is actually needed, e.g. when the actual length of the bar +or the displayed string changed, so you do not have to worry about it. There is, however, no +such network optimization for the “styling” parameters, so keep this in mind. + +#### Parameters +* `player`: `ObjectRef` of the player to which the HUD bar belongs to +* `identifier`: The identifier of the HUD bar type to change, as specified in `hb.register_hudbar`. +* `new_value`: The new current value of the HUD bar +* `new_max_value`: The new maximum value of the HUD bar +* `new_icon`: File name of the new icon +* `new_bgicon`: File name of the new background icon for the modern-style statbar +* `new_bar`: File name of the new bar segment image +* `new_label`: A new text label of the HUD bar. Note the format string still applies +* `new_text_color`: A 3-octet number defining the new color of the text. + +#### Return value +`true` on success, `false` otherwise. + + +## Hiding and unhiding a HUD bar +You can also hide custom HUD bars, meaning they will not be displayed for a certain player. You can still +use `hb.change_hudbar` on a hidden HUD bar, the new values will be correctly displayed after the HUD bar +has been unhidden. Both functions will only call `hud_change` if there has been an actual change to avoid +unneccessary traffic. + +Note that the hidden state of a HUD bar will *not* be saved by this mod on server shutdown, so you may need +to write your own routines for this or by setting the correct value for `start_hidden` when calling +`hb.init_hudbar`. + +### `hb.hide_hudbar(player, identifier)` +Hides the specified HUD bar from the screen of the specified player. + +#### Parameters +* `player`: `ObjectRef` of the player to which the HUD bar belongs to +* `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`. + +#### Return value +`true` on success, `false` otherwise. + + +### `hb.unhide_hudbar(player, identifier)` +Makes a previously hidden HUD bar visible again to a player. + +#### Parameters +* `player`: `ObjectRef` of the player to which the HUD bar belongs to +* `identifier`: The identifier of the HUD bar type to unhide, as specified in `hb.register_hudbar`. + +#### Return value +`true` on success, `false` otherwise. + + +## Reading HUD bar information +It is also possible to read information about existing HUD bars. + +### `hb.get_hudbar_state(player, identifier)` +Returns the current state of the active player's HUD bar. + +#### Parameters +* `player`: `ObjectRef` of the player to which the HUD bar belongs to +* `identifier`: The identifier of the HUD bar type to hide, as specified in `hb.register_hudbar`. + +#### Return value +On success, returns a table which holds information on the current state of the HUD bar. Note +the table is a deep copy of the internal HUD bar state, it is *not* a reference; the information +hold by the table is only true for the moment you called this function. The fields of this table are: + +* `value`: Current value of HUD bar. +* `max`: Current maximum value of HUD bar. +* `hidden`: Boolean denoting whether the HUD bar is hidden. +* `barlength`: The length of the HUD bar in pixels. This field is meaningless if the HUD bar is currently hidden. +* `text`: The text shown on the HUD bar. This fiels is meaningless if the HUD bar is currently hidden. + +If the player does not exist, returns `nil` instead. + +### `hb.get_hudbar_identifiers()` +Returns a table of all currently registered HUD bar identifiers. diff --git a/mods/hudbars/README.md b/mods/hudbars/README.md new file mode 100644 index 0000000..136eab6 --- /dev/null +++ b/mods/hudbars/README.md @@ -0,0 +1,62 @@ +# HUD bars + +## Description +This mod changes the HUD of Minetest. It replaces the default health and breath +symbols by horizontal colored bars with text showing the number. + +Furthermore, it enables other mods to add their own custom bars to the HUD, +this mod will place them accordingly. + +**Important**: Keep in mind if running a server with this mod, that the custom +position should be displayed correctly on every screen size. + +## Current version +The current version is 2.3.3. +It works for Minetest 5.3.0. + +This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer +standard. + +## Settings +This mod can be configured quite a bit. You can change HUD bar appearance, offsets, ordering, and more. +Use the advanced settings menu in Minetest for detailed configuration. + +## API +The API is used to add your own custom HUD bars. +Documentation for the API of this mod can be found in `API.md`. + +## Legal +### License of source code +Author: Wuzzy (2015) + +Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen. + +Translations: + +* German: Wuzzy +* Portuguese: BrunoMine +* Turkish: admicos +* Dutch: kingoscargames +* Italian: Hamlet +* Malay: muhdnurhidayat +* Russian: Imk +* Spanish: wuniversales + +This program is free software. It comes without any warranty, to +the extent permitted by applicable law. You can redistribute it +and/or modify it under the terms of the MIT License. + +### Licenses of textures + +* `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen +* `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen +* `hudbars_icon_breath.png`—kaeza (MIT License), modified by BlockMen, modified again by Wuzzy +* `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (MIT License) +* `hudbars_bar_health.png`—Wuzzy (MIT License) +* `hudbars_bar_breath.png`—Wuzzy (MIT License) +* `hudbars_bar_background.png`—Wuzzy (MIT License) + +### License references + +* [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) +* [MIT License](https://opensource.org/licenses/MIT) diff --git a/mods/hudbars/changelog.txt b/mods/hudbars/changelog.txt new file mode 100644 index 0000000..e2e6b56 --- /dev/null +++ b/mods/hudbars/changelog.txt @@ -0,0 +1,92 @@ +Note: This software uses semantic versioning, +as of version 2.0.0 of the standard . + +0.1.0 +----- +- Initial release, forked from mod “Better HUD” [hud]. + +0.2.0 +----- +- Add API documentation + +0.3.0 +----- +- Rename main table from “hud” to “hb” (affects function names!) +- Arguments 3-4 of hb.change_hudbar can be nil for values which should not change +- Add proper function hb.init_hudbar, replaces odd call to hud.hudtables[identifier].add_all +- Update API documentation and fix mistakes +- Use “hudbars.conf” instead of “hud.conf” + +0.4.0 +----- +- New function: hb.get_hudbar_state to get information about the state of an active HUD bar, such as values, whether it is hidden, etc. +- hb.change_hudbar has been optimized to call hud_change fewer times, which is hopefully good for networking +- Rename hb.register_hudbar parameter “start_hide” to “start_hidden” +- start_hidden parameter now finally works +- Do not affect other HUD flags (crosshair, wielditem, etc.) when starting mod +- Show error message when trying to call hb.init_hudbar or hb.change_hudbar with bad values +- Update documentation +- Lots of refactoring +- Health and breath bar now use API + +1.0.0 +----- +- Add new parameter start_hidden to hb.init_hudbar, specified whether HUD bar is hidden on start +- Copy-editing of API.md and README.txt +- Internal: Fix add_all weirdness + +1.0.1 +----- +- Fix race condition causing crash at start of server + +1.0.2 +----- +- Fix other HUD elements disappearing for rejoining players +- Remove pointless delays for initializing the HUD for new or rejoining players + +1.0.3 +----- +- Adjust default HUD bars position for Minetest 0.4.12 + +1.1.0 +----- +- Add boolean minetest.conf setting support (hudbars_autohide_breathbar) to control whether the breath bar is automatically hidden when full (default: yes) + +1.2.0 +----- +- New setting: hudbars_sorting. You can now manually sort all the HUD bars. Useful if you don't like automatic order +- New setting: hudbars_bar_type. You now can change the appearance of the HUD bars. +- New HUD bar types, slightly experimental: Classic statbars and modern [hud]-style statbars +- New experimental/unfinished setting: hudbars_alignment_pattern: You can now make the HUD bars stack vertically instead of the current zig-zag pattern. Note you probably need to change source code to productively use this feature +- Various position-related HUD bar settings (see README.txt) +- Remove hudbars.conf support and hudbars.conf.example (was never officially supported anyways) + +1.2.1 +----- +- Fix crash when enable_damage is changed in mid-game + +1.3.0 +----- +- Make all settings avaialbe in Minetest's advanced settings menu +- Fix HUD bars overlap when both hudbars_tick and hudbars_vmargin were set +- Use Markdown syntax in readme file +- Fix some factual mistakes in readme file +- Add metadata: mod.conf, description.txt, screenshot.png + +1.4.0 +----- +- Allow to change HUD bar images and label after it has been registered +- Minor API.md correction + +1.4.1 +----- +- Fix bug in hb.change_hudbar being a no-op if new_value and new_max value are nil + +1.5.0 +----- +- Portuguese translation by BrunoMine + +1.5.1 +----- +- Fix critical bug: Mod does not work with both intllib and mod security enabled +- Update screenshot to use new 3:2 aspect ratio diff --git a/mods/hudbars/default_settings.lua b/mods/hudbars/default_settings.lua new file mode 100644 index 0000000..78dcbc7 --- /dev/null +++ b/mods/hudbars/default_settings.lua @@ -0,0 +1,48 @@ +-- (Hardcoded) default settings + +hb.settings.max_bar_length = 160 +hb.settings.statbar_length = 20 + +-- Statbar positions +hb.settings.pos_left = {} +hb.settings.pos_right = {} +hb.settings.start_offset_left = {} +hb.settings.start_offset_right= {} +hb.settings.pos_left.x = hb.load_setting("hudbars_pos_left_x", "number", 0.5) +hb.settings.pos_left.y = hb.load_setting("hudbars_pos_left_y", "number", 1) +hb.settings.pos_right.x = hb.load_setting("hudbars_pos_right_x", "number", 0.5) +hb.settings.pos_right.y = hb.load_setting("hudbars_pos_right_y", "number", 1) +hb.settings.bar_type = hb.load_setting("hudbars_bar_type", "string", "statbar_classic", {"progress_bar", "statbar_classic", "statbar_modern"}) +if hb.settings.bar_type == "progress_bar" then + hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_offset_left_x", "number", -175) + hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_offset_left_y", "number", -86) + hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_offset_right_x", "number", 15) + hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_offset_right_y", "number", -86) +else + hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_statbar_offset_left_x", "number", -265) + hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_statbar_offset_left_y", "number", -90) + hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 25) + hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_statbar_offset_right_y", "number", -90) +end +hb.settings.vmargin = hb.load_setting("hudbars_vmargin", "number", 24) +hb.settings.tick = hb.load_setting("hudbars_tick", "number", 0.1) + +-- Experimental setting: Changing this setting is not officially supported, do NOT rely on it! +hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_default_hudbars", "bool", true) + +-- Misc. settings +hb.settings.alignment_pattern = hb.load_setting("hudbars_alignment_pattern", "string", "zigzag", {"zigzag", "stack_up", "stack_down"}) +hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", true) + +local sorting = minetest.settings:get("hudbars_sorting") +if sorting ~= nil then + hb.settings.sorting = {} + hb.settings.sorting_reverse = {} + for k,v in string.gmatch(sorting, "(%w+)=(%w+)") do + hb.settings.sorting[k] = tonumber(v) + hb.settings.sorting_reverse[tonumber(v)] = k + end +else + hb.settings.sorting = { ["health"] = 0, ["satiation"] = 1, ["sprint"] = 2, ["armor"] = 3, ["breath"] = 4, ["mana"] = 5 } + hb.settings.sorting_reverse = { [0] = "health", [1] = "hungernghudbar", [2]="sprint", [3]="breath", [4]="mana", [5]="armor"} +end diff --git a/mods/hudbars/description.txt b/mods/hudbars/description.txt new file mode 100644 index 0000000..9e10e89 --- /dev/null +++ b/mods/hudbars/description.txt @@ -0,0 +1 @@ +Replaces the health and breath symbols in the HUD by “progress bars” and shows exact values. Other mods can add more progress bars for custom player stats. diff --git a/mods/hudbars/init.lua b/mods/hudbars/init.lua new file mode 100644 index 0000000..8a4e1fc --- /dev/null +++ b/mods/hudbars/init.lua @@ -0,0 +1,568 @@ +local S = minetest.get_translator("hudbars") +local N = function(s) return s end + +hb = {} + +hb.hudtables = {} + +-- number of registered HUD bars +hb.hudbars_count = 0 + +-- table which records which HUD bar slots have been “registered” so far; used for automatic positioning +hb.registered_slots = {} + +hb.settings = {} + +function hb.load_setting(sname, stype, defaultval, valid_values) + local sval + if stype == "string" then + sval = minetest.settings:get(sname) + elseif stype == "bool" then + sval = minetest.settings:get_bool(sname) + elseif stype == "number" then + sval = tonumber(minetest.settings:get(sname)) + end + if sval ~= nil then + if valid_values ~= nil then + local valid = false + for i=1,#valid_values do + if sval == valid_values[i] then + valid = true + end + end + if not valid then + minetest.log("error", "[hudbars] Invalid value for "..sname.."! Using default value ("..tostring(defaultval)..").") + return defaultval + else + return sval + end + else + return sval + end + else + return defaultval + end +end + +-- Load default settings +dofile(minetest.get_modpath("hudbars").."/default_settings.lua") + +local function player_exists(player) + return player ~= nil and player:is_player() +end + +local function make_label(format_string, format_string_config, label, start_value, max_value) + local params = {} + local order = format_string_config.order + for o=1, #order do + if order[o] == "label" then + table.insert(params, label) + elseif order[o] == "value" then + if format_string_config.format_value then + table.insert(params, string.format(format_string_config.format_value, start_value)) + else + table.insert(params, start_value) + end + elseif order[o] == "max_value" then + if format_string_config.format_max_value then + table.insert(params, string.format(format_string_config.format_max_value, max_value)) + else + table.insert(params, max_value) + end + end + end + local ret + if format_string_config.textdomain then + ret = minetest.translate(format_string_config.textdomain, format_string, unpack(params)) + else + ret = S(format_string, unpack(params)) + end + return ret +end + +-- Table which contains all players with active default HUD bars (only for internal use) +hb.players = {} + +function hb.value_to_barlength(value, max) + if max == 0 then + return 0 + else + if hb.settings.bar_type == "progress_bar" then + local x + if value < 0 then x=-0.5 else x = 0.5 end + local ret = math.modf((value/max) * hb.settings.max_bar_length + x) + return ret + else + local x + if value < 0 then x=-0.5 else x = 0.5 end + local ret = math.modf((value/max) * hb.settings.statbar_length + x) + return ret + end + end +end + +function hb.get_hudtable(identifier) + return hb.hudtables[identifier] +end + +function hb.get_hudbar_position_index(identifier) + if hb.settings.sorting[identifier] ~= nil then + return hb.settings.sorting[identifier] + else + local i = 0 + while true do + if hb.registered_slots[i] ~= true and hb.settings.sorting_reverse[i] == nil then + return i + end + i = i + 1 + end + end +end + +function hb.register_hudbar(identifier, text_color, label, textures, default_start_value, default_start_max, default_start_hidden, format_string, format_string_config) + minetest.log("action", "hb.register_hudbar: "..tostring(identifier)) + local hudtable = {} + local pos, offset + local index = math.floor(hb.get_hudbar_position_index(identifier)) + hb.registered_slots[index] = true + if hb.settings.alignment_pattern == "stack_up" then + pos = hb.settings.pos_left + offset = { + x = hb.settings.start_offset_left.x, + y = hb.settings.start_offset_left.y - hb.settings.vmargin * index + } + elseif hb.settings.alignment_pattern == "stack_down" then + pos = hb.settings.pos_left + offset = { + x = hb.settings.start_offset_left.x, + y = hb.settings.start_offset_left.y + hb.settings.vmargin * index + } + else + if index % 2 == 0 then + pos = hb.settings.pos_left + offset = { + x = hb.settings.start_offset_left.x, + y = hb.settings.start_offset_left.y - hb.settings.vmargin * (index/2) + } + else + pos = hb.settings.pos_right + offset = { + x = hb.settings.start_offset_right.x, + y = hb.settings.start_offset_right.y - hb.settings.vmargin * ((index-1)/2) + } + end + end + if format_string == nil then + format_string = N("@1: @2/@3") + end + if format_string_config == nil then + format_string_config = {} + end + if format_string_config.order == nil then + format_string_config.order = { "label", "value", "max_value" } + end + if format_string_config.format_value == nil then + format_string_config.format_value = "%d" + end + if format_string_config.format_max_value == nil then + format_string_config.format_max_value = "%d" + end + + hudtable.add_all = function(player, hudtable, start_value, start_max, start_hidden) + if start_value == nil then start_value = hudtable.default_start_value end + if start_max == nil then start_max = hudtable.default_start_max end + if start_hidden == nil then start_hidden = hudtable.default_start_hidden end + local ids = {} + local state = {} + local name = player:get_player_name() + local bgscale, iconscale, text, barnumber, bgiconnumber + if start_max == 0 or start_hidden then + bgscale = { x=0, y=0 } + else + bgscale = { x=1, y=1 } + end + if start_hidden then + iconscale = { x=0, y=0 } + barnumber = 0 + bgiconnumber = 0 + text = "" + else + iconscale = { x=1, y=1 } + barnumber = hb.value_to_barlength(start_value, start_max) + bgiconnumber = hb.settings.statbar_length + text = make_label(format_string, format_string_config, label, start_value, start_max) + end + if hb.settings.bar_type == "progress_bar" then + ids.bg = player:hud_add({ + hud_elem_type = "image", + position = pos, + scale = bgscale, + text = "hudbars_bar_background.png", + alignment = {x=1,y=1}, + offset = { x = offset.x - 1, y = offset.y - 1 }, + z_index = 0, + }) + if textures.icon ~= nil then + ids.icon = player:hud_add({ + hud_elem_type = "image", + position = pos, + scale = iconscale, + text = textures.icon, + alignment = {x=-1,y=1}, + offset = { x = offset.x - 3, y = offset.y }, + z_index = 1, + }) + end + end + local bar_image, bgicon, bar_size + if hb.settings.bar_type == "progress_bar" then + bar_image = textures.bar + -- NOTE: Intentionally set to nil. For some reason, on some systems, + -- the progress bar is displaced when the bar_size is set explicitly here. + -- On the other hand, setting this to nil is deprecated in MT 5.0.0 due to + -- a debug log warning, but nothing is explained in lua_api.txt. + -- This section is a potential bug magnet, please watch with care! + -- The size of the bar image is expected to be exactly 2×16 pixels. + bar_size = nil + elseif hb.settings.bar_type == "statbar_classic" or hb.settings.bar_type == "statbar_modern" then + bar_image = textures.icon + bgicon = textures.bgicon + bar_size = {x=24, y=24} + end + ids.bar = player:hud_add({ + hud_elem_type = "statbar", + position = pos, + text = bar_image, + text2 = bgicon, + number = barnumber, + item = bgiconnumber, + alignment = {x=-1,y=-1}, + offset = offset, + direction = 0, + size = bar_size, + z_index = 1, + }) + if hb.settings.bar_type == "progress_bar" then + ids.text = player:hud_add({ + hud_elem_type = "text", + position = pos, + text = text, + alignment = {x=1,y=1}, + number = text_color, + direction = 0, + offset = { x = offset.x + 2, y = offset.y - 1}, + z_index = 2, + }) + end + -- Do not forget to update hb.get_hudbar_state if you add new fields to the state table + state.hidden = start_hidden + state.value = start_value + state.max = start_max + state.text = text + state.barlength = hb.value_to_barlength(start_value, start_max) + + local main_error_text = + "[hudbars] Bad initial values of HUD bar identifier “"..tostring(identifier).."” for player "..name..". " + + if start_max < start_value then + minetest.log("error", main_error_text.."start_max ("..start_max..") is smaller than start_value ("..start_value..")!") + end + if start_max < 0 then + minetest.log("error", main_error_text.."start_max ("..start_max..") is smaller than 0!") + end + if start_value < 0 then + minetest.log("error", main_error_text.."start_value ("..start_value..") is smaller than 0!") + end + + hb.hudtables[identifier].hudids[name] = ids + hb.hudtables[identifier].hudstate[name] = state + end + + hudtable.identifier = identifier + hudtable.format_string = format_string + hudtable.format_string_config = format_string_config + hudtable.label = label + hudtable.hudids = {} + hudtable.hudstate = {} + hudtable.default_start_hidden = default_start_hidden + hudtable.default_start_value = default_start_value + hudtable.default_start_max = default_start_max + + hb.hudbars_count= hb.hudbars_count + 1 + + hb.hudtables[identifier] = hudtable +end + +function hb.init_hudbar(player, identifier, start_value, start_max, start_hidden) + if not player_exists(player) then return false end + local hudtable = hb.get_hudtable(identifier) + hb.hudtables[identifier].add_all(player, hudtable, start_value, start_max, start_hidden) + return true +end + +function hb.change_hudbar(player, identifier, new_value, new_max_value, new_icon, new_bgicon, new_bar, new_label, new_text_color) + if new_value == nil and new_max_value == nil and new_icon == nil and new_bgicon == nil and new_bar == nil and new_label == nil and new_text_color == nil then + return true + end + if not player_exists(player) then + return false + end + + local name = player:get_player_name() + local hudtable = hb.get_hudtable(identifier) + if not hudtable.hudstate[name] then + return false + end + local value_changed, max_changed = false, false + + if new_value ~= nil then + if new_value ~= hudtable.hudstate[name].value then + hudtable.hudstate[name].value = new_value + value_changed = true + end + else + new_value = hudtable.hudstate[name].value + end + if new_max_value ~= nil then + if new_max_value ~= hudtable.hudstate[name].max then + hudtable.hudstate[name].max = new_max_value + max_changed = true + end + else + new_max_value = hudtable.hudstate[name].max + end + + if hb.settings.bar_type == "progress_bar" then + if new_icon ~= nil and hudtable.hudids[name].icon ~= nil then + player:hud_change(hudtable.hudids[name].icon, "text", new_icon) + end + if new_bgicon ~= nil and hudtable.hudids[name].bgicon ~= nil then + player:hud_change(hudtable.hudids[name].bgicon, "text", new_bgicon) + end + if new_bar ~= nil then + player:hud_change(hudtable.hudids[name].bar , "text", new_bar) + end + if new_label ~= nil then + hudtable.label = new_label + local new_text = make_label(hudtable.format_string, hudtable.format_string_config, new_label, hudtable.hudstate[name].value, hudtable.hudstate[name].max) + player:hud_change(hudtable.hudids[name].text, "text", new_text) + end + if new_text_color ~= nil then + player:hud_change(hudtable.hudids[name].text, "number", new_text_color) + end + else + if new_icon ~= nil and hudtable.hudids[name].bar ~= nil then + player:hud_change(hudtable.hudids[name].bar, "text", new_icon) + end + if new_bgicon ~= nil and hudtable.hudids[name].bg ~= nil then + player:hud_change(hudtable.hudids[name].bg, "text", new_bgicon) + end + end + + local main_error_text = + "[hudbars] Bad call to hb.change_hudbar, identifier: “"..tostring(identifier).."”, player name: “"..name.."”. " + if new_max_value < new_value then + minetest.log("error", main_error_text.."new_max_value ("..new_max_value..") is smaller than new_value ("..new_value..")!") + end + if new_max_value < 0 then + minetest.log("error", main_error_text.."new_max_value ("..new_max_value..") is smaller than 0!") + end + if new_value < 0 then + minetest.log("error", main_error_text.."new_value ("..new_value..") is smaller than 0!") + end + + if hudtable.hudstate[name].hidden == false then + if max_changed and hb.settings.bar_type == "progress_bar" then + if hudtable.hudstate[name].max == 0 then + player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0}) + else + player:hud_change(hudtable.hudids[name].bg, "scale", {x=1,y=1}) + end + end + + if value_changed or max_changed then + local new_barlength = hb.value_to_barlength(new_value, new_max_value) + if new_barlength ~= hudtable.hudstate[name].barlength then + player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(new_value, new_max_value)) + hudtable.hudstate[name].barlength = new_barlength + end + + if hb.settings.bar_type == "progress_bar" then + local new_text = make_label(hudtable.format_string, hudtable.format_string_config, hudtable.label, new_value, new_max_value) + if new_text ~= hudtable.hudstate[name].text then + player:hud_change(hudtable.hudids[name].text, "text", new_text) + hudtable.hudstate[name].text = new_text + end + end + end + end + return true +end + +function hb.hide_hudbar(player, identifier) + if not player_exists(player) then return false end + local name = player:get_player_name() + local hudtable = hb.get_hudtable(identifier) + if hudtable == nil then return false end + if hudtable.hudstate[name].hidden == true then return true end + if hb.settings.bar_type == "progress_bar" then + if hudtable.hudids[name].icon ~= nil then + player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0}) + end + player:hud_change(hudtable.hudids[name].bg, "scale", {x=0,y=0}) + player:hud_change(hudtable.hudids[name].text, "text", "") + end + player:hud_change(hudtable.hudids[name].bar, "number", 0) + player:hud_change(hudtable.hudids[name].bar, "item", 0) + hudtable.hudstate[name].hidden = true + return true +end + +function hb.unhide_hudbar(player, identifier) + if not player_exists(player) then return false end + local name = player:get_player_name() + local hudtable = hb.get_hudtable(identifier) + if hudtable == nil then return false end + if hudtable.hudstate[name].hidden == false then return true end + local value = hudtable.hudstate[name].value + local max = hudtable.hudstate[name].max + if hb.settings.bar_type == "progress_bar" then + if hudtable.hudids[name].icon ~= nil then + player:hud_change(hudtable.hudids[name].icon, "scale", {x=1,y=1}) + end + if hudtable.hudstate[name].max ~= 0 then + player:hud_change(hudtable.hudids[name].bg, "scale", {x=1,y=1}) + end + player:hud_change(hudtable.hudids[name].text, "text", make_label(hudtable.format_string, hudtable.format_string_config, hudtable.label, value, max)) + elseif hb.settings.bar_type == "statbar_modern" then + player:hud_change(hudtable.hudids[name].bar, "scale", {x=1,y=1}) + end + player:hud_change(hudtable.hudids[name].bar, "number", hb.value_to_barlength(value, max)) + player:hud_change(hudtable.hudids[name].bar, "item", hb.value_to_barlength(max, max)) + hudtable.hudstate[name].hidden = false + return true +end + +function hb.get_hudbar_state(player, identifier) + if not player_exists(player) then return nil end + local ref = hb.get_hudtable(identifier).hudstate[player:get_player_name()] + -- Do not forget to update this chunk of code in case the state changes + local copy = { + hidden = ref.hidden, + value = ref.value, + max = ref.max, + text = ref.text, + barlength = ref.barlength, + } + return copy +end + +function hb.get_hudbar_identifiers() + local ids = {} + for id, _ in pairs(hb.hudtables) do + table.insert(ids, id) + end + return ids +end + +--register built-in HUD bars +if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then + hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 20, 20, false) + hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png", bgicon = "hudbars_bgicon_breath.png" }, 10, 10, true) +end + +local function hide_builtin(player) + local flags = player:hud_get_flags() + flags.healthbar = false + flags.breathbar = false + player:hud_set_flags(flags) +end + + +local function custom_hud(player) + if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then + local hide + if minetest.settings:get_bool("enable_damage") then + hide = false + else + hide = true + end + local hp = player:get_hp() + local hp_max = player:get_properties().hp_max + hb.init_hudbar(player, "health", math.min(hp, hp_max), hp_max, hide) + local breath = player:get_breath() + local breath_max = player:get_properties().breath_max + local hide_breath + if breath >= breath_max and hb.settings.autohide_breath == true then hide_breath = true else hide_breath = false end + hb.init_hudbar(player, "breath", math.min(breath, breath_max), breath_max, hide_breath or hide) + end +end + +local function update_health(player) + local hp_max = player:get_properties().hp_max + hb.change_hudbar(player, "health", player:get_hp(), hp_max) +end + +-- update built-in HUD bars +local function update_hud(player) + if not player_exists(player) then return end + if minetest.settings:get_bool("enable_damage") then + if hb.settings.forceload_default_hudbars then + hb.unhide_hudbar(player, "health") + end + --air + local breath_max = player:get_properties().breath_max + local breath = player:get_breath() + + if breath >= breath_max and hb.settings.autohide_breath == true then + hb.hide_hudbar(player, "breath") + else + hb.unhide_hudbar(player, "breath") + hb.change_hudbar(player, "breath", math.min(breath, breath_max), breath_max) + end + --health + update_health(player) + elseif hb.settings.forceload_default_hudbars then + hb.hide_hudbar(player, "health") + hb.hide_hudbar(player, "breath") + end +end + +minetest.register_on_player_hpchange(function(player) + if hb.players[player:get_player_name()] ~= nil then + update_health(player) + end +end) + +minetest.register_on_respawnplayer(function(player) + update_health(player) + hb.hide_hudbar(player, "breath") +end) + +minetest.register_on_joinplayer(function(player) + hide_builtin(player) + custom_hud(player) + hb.players[player:get_player_name()] = player +end) + +minetest.register_on_leaveplayer(function(player) + hb.players[player:get_player_name()] = nil +end) + +local main_timer = 0 +local timer = 0 +minetest.register_globalstep(function(dtime) + main_timer = main_timer + dtime + timer = timer + dtime + if main_timer > hb.settings.tick or timer > 4 then + if main_timer > hb.settings.tick then main_timer = 0 end + -- only proceed if damage is enabled + if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then + for _, player in pairs(hb.players) do + -- update all hud elements + update_hud(player) + end + end + end + if timer > 4 then timer = 0 end +end) diff --git a/mods/hudbars/locale/hudbars.de.tr b/mods/hudbars/locale/hudbars.de.tr new file mode 100644 index 0000000..3d1e697 --- /dev/null +++ b/mods/hudbars/locale/hudbars.de.tr @@ -0,0 +1,4 @@ +# textdomain: hudbars +Health=Leben +Breath=Atem +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.es.tr b/mods/hudbars/locale/hudbars.es.tr new file mode 100644 index 0000000..bbf0279 --- /dev/null +++ b/mods/hudbars/locale/hudbars.es.tr @@ -0,0 +1,4 @@ +# textdomain: hudbars +Health=Salud +Breath=Aliento +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.it.tr b/mods/hudbars/locale/hudbars.it.tr new file mode 100644 index 0000000..3ada5b6 --- /dev/null +++ b/mods/hudbars/locale/hudbars.it.tr @@ -0,0 +1,6 @@ +# textdomain: hudbars +Health=Salute +Breath=Ossigeno + +# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.ms.tr b/mods/hudbars/locale/hudbars.ms.tr new file mode 100644 index 0000000..eb811ab --- /dev/null +++ b/mods/hudbars/locale/hudbars.ms.tr @@ -0,0 +1,4 @@ +# textdomain: hudbars +Health=Kesihatan +Breath=Nafas +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.nl.tr b/mods/hudbars/locale/hudbars.nl.tr new file mode 100644 index 0000000..b9c4a41 --- /dev/null +++ b/mods/hudbars/locale/hudbars.nl.tr @@ -0,0 +1,6 @@ +# textdomain: hudbars +Health=Gezondheid +Breath=Adem + +# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.pt.tr b/mods/hudbars/locale/hudbars.pt.tr new file mode 100644 index 0000000..a818f09 --- /dev/null +++ b/mods/hudbars/locale/hudbars.pt.tr @@ -0,0 +1,6 @@ +# textdomain: hudbars +Health=Saude +Breath=Folego + +# Formato de string padrão para progresso bar-style de barras do HUD, por exemplo “Saude 5/20” +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.ru.tr b/mods/hudbars/locale/hudbars.ru.tr new file mode 100644 index 0000000..2d278e3 --- /dev/null +++ b/mods/hudbars/locale/hudbars.ru.tr @@ -0,0 +1,4 @@ +# textdomain: hudbars +Health=HP +Breath=дыхание +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/hudbars.tr.tr b/mods/hudbars/locale/hudbars.tr.tr new file mode 100644 index 0000000..6a2ce0b --- /dev/null +++ b/mods/hudbars/locale/hudbars.tr.tr @@ -0,0 +1,4 @@ +# textdomain: hudbars +Health=Can +Breath=Nefes +@1: @2/@3=@1: @2/@3 diff --git a/mods/hudbars/locale/template.txt b/mods/hudbars/locale/template.txt new file mode 100644 index 0000000..37b0559 --- /dev/null +++ b/mods/hudbars/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: hudbars +Health= +Breath= + +# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” +@1: @2/@3= diff --git a/mods/hudbars/mod.conf b/mods/hudbars/mod.conf new file mode 100644 index 0000000..5fa238a --- /dev/null +++ b/mods/hudbars/mod.conf @@ -0,0 +1,2 @@ +name = hudbars +description = Replaces the health and breath symbols in the HUD by “progress bars” and shows exact values. Other mods can add more progress bars for custom player stats. diff --git a/mods/hudbars/screenshot.png b/mods/hudbars/screenshot.png new file mode 100644 index 0000000..88ee323 Binary files /dev/null and b/mods/hudbars/screenshot.png differ diff --git a/mods/hudbars/settingtypes.txt b/mods/hudbars/settingtypes.txt new file mode 100644 index 0000000..3e4390e --- /dev/null +++ b/mods/hudbars/settingtypes.txt @@ -0,0 +1,119 @@ +[Appearance] +# Specifies how the value indicators (i.e. health, breah, etc.) look. There are 3 styles +# available. You can choose between the default progress-bar-like bars and the good +# old statbars like you know from vanilla Minetest. +# These values are possible: +# - progress_bar: A horizontal progress-bar-like bar with a label, showing numerical value +# (current, maximum), and an icon. These bars usually convey the most +# information. This is the default and recommended value. +# - statbar_classic: Classic statbar, like in vanilla Minetest. Made out of up to 20 +# half-symbols. Those bars represent the vague ratio between +# the current value and the maximum value. 1 half-symbol stands for +# approximately 5% of the maximum value. +# - statbar_modern: Like the classic statbar, but also supports background images, this +# kind of statbar may be considered to be more user-friendly than the +# classic statbar. This bar type closely resembles the mod +# “Better HUD” [hud] by BlockMen. +hudbars_bar_type (HUD bars style) enum progress_bar progress_bar,statbar_classic,statbar_modern + + +# If enabled (default), the breath indicators in the HUD will be automatically hidden shortly +# after the breath has been filled up. Otherwise, the breath will always be displayed. +hudbars_autohide_breath (Automatically hide breath indicators) bool true + +# This setting changes the way the HUD bars are ordered on the display. You can choose +# between a zig-zag pattern (default) or a vertically stacked pattern. +# The following values are allowed: +# - zigzag: Starting from the left bottom, the next is right from the first, +# the next is above the first, the next is right of the third, etc. +# - stack_up: The HUD bars are stacked vertically, going upwards. +# - stack_down: The HUD bars are stacked vertically, going downwards. +hudbars_alignment_pattern (HUD bars alignment pattern) enum zigzag zigzag,stack_up,stack_down + +# This setting allows you to specify the order of the HUD bars explicitly. If left empty +# (the default), the health and breath indicators come first, additional indicators +# may appear in any order. This setting is quite technical and normal users probably do not +# need to worry about it. +# +# Syntax: +# The setting has to be specified as a comma-seperated list of key=value pairs, where a key +# refers to the identifier of a HUD bar and the value refers to the slot number of where the +# HUD bar should be placed. The slot number must be an integer greater of equal to 0. Where +# the HUD bars will be displayed exactly depends on the alignment pattern being used. +# All HUD bars to which no order value has been applied will fill in all slots which have +# not been occupied by the HUD bars specified in this setting, the slots will be filled in +# from the lowest slot number. +# Note that the order of those remaining HUD bars is not fixed, it basically just boils +# down on which mod “came” first. Don't worry, the mod will still work perfectly fine, this +# setting is entirely optional. +# The identifier for the health bar is “health” and the identifier for the breath bar is +# “breath”. For other HUD bars, you have to learn it from the mod which is supplying them. +# +# Be careful not to use slot indices twice, or else different HUD bars will be drawn over +# each other! +# +# Example: “breath=0, health=1” +# This makes the breath bar first and the health bar second, which is the opposite order +# of the default one. +hudbars_sorting (HUD bars order) string + +[Positions and offsets] +# Horizontal (x) main position of the HUD bars over the entire screen. +# 0.0 is left-most, 1.0 is right-most. +# For the zig-zag alignment pattern, this is for the left HUD bars. +hudbars_pos_left_x (Left HUD bar screen x position) float 0.5 0.0 1.0 +# Vertical (y) main position of the HUD bars over the entire screen. +# 0.0 is top, 1.0 is bottom. +# For the zig-zag alignment pattern, this is for the left HUD bars. +hudbars_pos_left_y (Left HUD bar screen y position) float 1.0 0.0 1.0 +# Horizontal (x) main position of the right HUD bars over the entire screen. +# 0.0 is left-most, 1.0 is right-most. +# Only used for the zig-zag alignment pattern. +hudbars_pos_right_x (Right HUD bar screen x position) float 0.5 0.0 1.0 +# Vertical main position (y) of the right HUD bars over the entire screen. +# 0.0 is top, 1.0 is bottom. +# Only used for the zig-zag alignment pattern. +hudbars_pos_right_y (Right HUD bar screen y position) float 1.0 0.0 1.0 + +# Precise x offset in pixels from the basic screen x position of the HUD bars. +# For the zig-zag alignment pattern, this is for the left HUD bars. +# This setting is used for the progress bar HUD bar style. +hudbars_start_offset_left_x (Left HUD bar x offset) int -175 +# Precise y offset in pixels from the basic screen y position of the HUD bars. +# For the zig-zag alignment pattern, this is for the left HUD bars. +# This setting is used for the progress bar HUD bar style. +hudbars_start_offset_left_y (Left HUD bar y offset) int -86 +# Precise x offset in pixels from the basic screen x position of the right HUD bars. +# Only used for the zig-zag alignment pattern. +# This setting is used for the progress bar HUD bar style. +hudbars_start_offset_right_x (Right HUD bar x offset) int 15 +# Precise y offset in pixels from the basic screen y position of the right HUD bars. +# Only used for the zig-zag alignment pattern. +# This setting is used for the progress bar HUD bar style. +hudbars_start_offset_right_y (Right HUD bar y offset) int -86 + +# Precise x offset in pixels from the basic screen x position of the HUD statbars. +# For the zig-zag alignment pattern, this is for the left HUD statbars. +# This setting is used for the classic and modern statbar styles. +hudbars_start_statbar_offset_left_x (Left HUD statbar x offset) int -265 +# Precise y offset in pixels from the basic screen y position of the HUD statbars. +# For the zig-zag alignment pattern, this is for the left HUD statbars. +# This setting is used for the classic and modern statbar styles. +hudbars_start_statbar_offset_left_y (Left HUD statbar y offset) int -90 +# Precise x offset in pixels from the basic screen x position of the right HUD statbars. +# Only used for the zig-zag alignment pattern. +# This setting is used for the classic and modern statbar styles. +hudbars_start_statbar_offset_right_x (Right HUD statbar x offset) int 25 +# Precise y offset in pixels from the basic screen y position of the right HUD statbars. +# Only used for the zig-zag alignment pattern. +# This setting is used for the classic and modern statbar styles. +hudbars_start_statbar_offset_right_y (Right HUD statbar y offset) int -90 + +# The vertical distance between two HUD bars, in pixels. +hudbars_vmargin (Vertical distance between HUD bars) int 24 0 + +[Performance] +# The of seconds which need to pass before the server updates the default HUD bars +# (health and breath). Increase this number if you have a slow server or a slow network +# connection and experience performance problems. +hudbars_tick (Default HUD bars update interval) float 0.1 0.0 4.0 diff --git a/mods/hudbars/textures/hudbars_bar_background.png b/mods/hudbars/textures/hudbars_bar_background.png new file mode 100644 index 0000000..cbc6c3f Binary files /dev/null and b/mods/hudbars/textures/hudbars_bar_background.png differ diff --git a/mods/hudbars/textures/hudbars_bar_breath.png b/mods/hudbars/textures/hudbars_bar_breath.png new file mode 100644 index 0000000..7d19a57 Binary files /dev/null and b/mods/hudbars/textures/hudbars_bar_breath.png differ diff --git a/mods/hudbars/textures/hudbars_bar_health.png b/mods/hudbars/textures/hudbars_bar_health.png new file mode 100644 index 0000000..6530916 Binary files /dev/null and b/mods/hudbars/textures/hudbars_bar_health.png differ diff --git a/mods/hudbars/textures/hudbars_bgicon_breath.png b/mods/hudbars/textures/hudbars_bgicon_breath.png new file mode 100644 index 0000000..176629a Binary files /dev/null and b/mods/hudbars/textures/hudbars_bgicon_breath.png differ diff --git a/mods/hudbars/textures/hudbars_bgicon_health.png b/mods/hudbars/textures/hudbars_bgicon_health.png new file mode 100644 index 0000000..e2be276 Binary files /dev/null and b/mods/hudbars/textures/hudbars_bgicon_health.png differ diff --git a/mods/hudbars/textures/hudbars_icon_breath.png b/mods/hudbars/textures/hudbars_icon_breath.png new file mode 100644 index 0000000..d1a5bcc Binary files /dev/null and b/mods/hudbars/textures/hudbars_icon_breath.png differ diff --git a/mods/hudbars/textures/hudbars_icon_health.png b/mods/hudbars/textures/hudbars_icon_health.png new file mode 100644 index 0000000..941e973 Binary files /dev/null and b/mods/hudbars/textures/hudbars_icon_health.png differ diff --git a/mods/ingots/README.md b/mods/ingots/README.md new file mode 100644 index 0000000..2bda149 --- /dev/null +++ b/mods/ingots/README.md @@ -0,0 +1,16 @@ +Ingots +====== +A small mod that makes it possible to place ore ingots in the world. + +Options +======= +Toggle 'is_big' in conf.lua to make ingots apear bigger. +You can make an individual per ingot type choice in init.lua + +API +=== +You can ragister your own ingots. +Call "ingots.register_ingots(ingot_item, texture, is_big)" +ingot_item - The item which will be consumed to place an ingot. ex.: "default:steel_ingot" +texture - Name of texture used on ingot mesh. ex.: "ingot_steel.png" +is_big - Boolean which determines which ingot variant will be used. diff --git a/mods/ingots/api.lua b/mods/ingots/api.lua new file mode 100644 index 0000000..409c778 --- /dev/null +++ b/mods/ingots/api.lua @@ -0,0 +1,124 @@ +--[[ + Ingots - allows the placemant of ingots in the world + Copyright (C) 2018 Skamiz Kazzarch + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +]]-- + +ingots = {} + +-- takes an item name and a texture name and a boolean whether the ingots are big +function ingots.register_ingots(ingot_item, texture, is_big) + + --checks, whether the item name is a valid item (thanks 'puzzlecube') + if not minetest.registered_items[ingot_item] then + minetest.log("warning", ingot_item.." is not registered. Skipping ingot registration") + return + end + + local stack_size = 64 + local texture_prefix = "ingot_" + --gets item name witout mod part, to be used in the deffinition of the new nodes + local ingot_name = string.sub(ingot_item, string.find(ingot_item, ":", 1, true) +1, -1) + + + if is_big then + ingot_name = ingot_name .. "_big" + stack_size = 8 + texture_prefix = "ingot_big_" + end + + --this way there is no need for a separate on_punch function for a stack of 1 ingot + minetest.register_alias("ingots:".. ingot_name .."_0", "air") + + --gives the ingot_item the ability to be placed and increas already placed stacks of ingots + minetest.override_item(ingot_item, { + on_place = function (itemstack, placer, pointed_thing) + if pointed_thing["type"] == "node" then + local name = minetest.get_node(pointed_thing.under).name + if string.find(name, "ingots:".. ingot_name) then + local count = string.gsub(name, "%D*", "") + if stack_size > minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]._ingot_count then + minetest.set_node(pointed_thing.under, {name = "ingots:".. ingot_name .."_" .. count + 1, param2 = minetest.get_node(pointed_thing.under).param2}) + if not (creative and creative.is_enabled_for and creative.is_enabled_for(placer:get_player_name())) then + itemstack:take_item() + end + elseif minetest.get_node(pointed_thing.above).name == "air" then + minetest.set_node(pointed_thing.above, {name = "ingots:".. ingot_name .."_1"}) + if not (creative and creative.is_enabled_for and creative.is_enabled_for(placer:get_player_name())) then + itemstack:take_item() + end + end + + elseif minetest.get_node(pointed_thing.above).name == "air" then + minetest.set_node(pointed_thing.above, {name = "ingots:".. ingot_name .."_1"}) + if not (creative and creative.is_enabled_for and creative.is_enabled_for(placer:get_player_name())) then + itemstack:take_item() + end + end + + return itemstack + end + end + }) + + --registers 'stack_size' number of nodes, each has one more ingot in it than the last + for i = 1, stack_size do + local box = { + type = "fixed", + fixed = { + --rectangular box which encompases all placed ingots + ingots.get_box(is_big, i), + }, + } + minetest.register_node("ingots:".. ingot_name .. "_" .. i,{ + description = "ingots", + drawtype = "mesh", + tiles = {texture}, + mesh = texture_prefix .. i .. ".obj", + selection_box = box, + collision_box = box, + paramtype = 'light', + paramtype2 = "facedir", + groups = {cracky = 3, level = 2, not_in_creative_inventory = 1}, + drop = ingot_item .. " " .. i, + on_punch = function (pos, node, puncher, pointed_thing) + if puncher then + local wield = puncher:get_wielded_item() + --checks, so that a stack can be taken appart only by hand or relevant ingot_item + if wield:get_name() == ingot_item or + wield:get_count() == 0 then + minetest.set_node(pos, {name = "ingots:".. ingot_name .."_" .. i - 1, param2 = node.param2}) + if not (creative and creative.is_enabled_for and creative.is_enabled_for(puncher:get_player_name())) then + local stack = ItemStack(ingot_item) + puncher:get_inventory():add_item("main", stack) + end + end + end + end, + _ingot_name = ingot_name, + _ingot_count = i, + }) + end +end + +--returns an apropriate nodebox for a given number of ingots +function ingots.get_box(is_big, i) + if is_big then return {-0.5, -0.5, -0.5, 0.5, (((i + 1 - ((i +1 )%2)) / 8) - 0.5), 0.5} + else return {-0.5, -0.5, -0.5, 0.5, (((i - 1 - ((i-1)%8)) / 8) - 3) / 8, 0.5} + end +end + +return ingots \ No newline at end of file diff --git a/mods/ingots/changelog.txt b/mods/ingots/changelog.txt new file mode 100644 index 0000000..14eaf2c --- /dev/null +++ b/mods/ingots/changelog.txt @@ -0,0 +1,17 @@ +Version 1.3 +-suport for brass, lead, carbon steel, cast iron, chromium and zinc of technic +-suports for ranbow ore of rainbow ore + +Version 1.2 +-suport for stainless steel and mixed metal of technic +-added compatibility with 'creative' +-merged big ingots variant +-fixed a bug which allowed to overwrite blocks next to full stacks + +Version 1.1 +-support for tin, silver and mithril of 'moreores' +-separate big ingots variant + +Version 1.0 +-release +-support for tin. copper, bronze, steel and gold of 'default' diff --git a/mods/ingots/conf.lua b/mods/ingots/conf.lua new file mode 100644 index 0000000..94bf359 --- /dev/null +++ b/mods/ingots/conf.lua @@ -0,0 +1,6 @@ +local conf = {} + +-- set this to 'true' to make ingots 8 times larger +conf.is_big = false + +return conf \ No newline at end of file diff --git a/mods/ingots/depends.txt b/mods/ingots/depends.txt new file mode 100644 index 0000000..fdd4627 --- /dev/null +++ b/mods/ingots/depends.txt @@ -0,0 +1,4 @@ +default? +moreores? +technic? +rainbow_ore? \ No newline at end of file diff --git a/mods/ingots/init.lua b/mods/ingots/init.lua new file mode 100644 index 0000000..217ad3c --- /dev/null +++ b/mods/ingots/init.lua @@ -0,0 +1,55 @@ +--[[ + Ingots - allows the placemant of ingots in the world + Copyright (C) 2018 Skamiz Kazzarch + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +]]-- + +local conf = dofile(minetest.get_modpath("ingots").."/conf.lua") +dofile(minetest.get_modpath("ingots").."/api.lua") + +--Here you can make individual choices per ingot on which varian will be used. +--To disable the ability of an ingot to be placed just comment out it's registration line. + +if minetest.get_modpath("default") then + ingots.register_ingots("default:copper_ingot", "ingot_copper.png", conf.is_big) + ingots.register_ingots("default:tin_ingot", "ingot_tin.png", conf.is_big) + ingots.register_ingots("default:bronze_ingot", "ingot_bronze.png", conf.is_big) + ingots.register_ingots("default:steel_ingot", "ingot_steel.png", conf.is_big) + ingots.register_ingots("default:gold_ingot", "ingot_gold.png", conf.is_big) +end + +if minetest.get_modpath("moreores") then + ingots.register_ingots("moreores:silver_ingot", "ingot_silver.png", conf.is_big) + ingots.register_ingots("moreores:mithril_ingot", "ingot_mithril.png", conf.is_big) + if not minetest.registered_items["default:tin_ingot"] then + ingots.register_ingots("moreores:tin_ingot", "ingot_tin.png", conf.is_big) + end +end + +if minetest.get_modpath("technic") then + ingots.register_ingots("technic:stainless_steel_ingot", "ingot_stainless_steel.png", conf.is_big) + ingots.register_ingots("technic:carbon_steel_ingot", "ingot_carbon_steel.png", conf.is_big) + ingots.register_ingots("technic:mixed_metal_ingot", "ingot_mixed_metal.png", conf.is_big) + ingots.register_ingots("technic:brass_ingot", "ingot_brass.png", conf.is_big) + ingots.register_ingots("technic:lead_ingot", "ingot_lead.png", conf.is_big) + ingots.register_ingots("technic:zinc_ingot", "ingot_zinc.png", conf.is_big) + ingots.register_ingots("technic:chromium_ingot", "ingot_chromium.png", conf.is_big) + ingots.register_ingots("technic:cast_iron_ingot", "ingot_cast_iron.png", conf.is_big) +end + +if minetest.get_modpath("rainbow_ore") then + ingots.register_ingots("rainbow_ore:rainbow_ore_ingot", "ingot_rainbow_ore.png", conf.is_big) +end \ No newline at end of file diff --git a/mods/ingots/license.txt b/mods/ingots/license.txt new file mode 100644 index 0000000..385a247 --- /dev/null +++ b/mods/ingots/license.txt @@ -0,0 +1,5 @@ +All code provided in this package is is licensed under LGPL-2.1 +Full license: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html + +All textures and models provided in this package are licensed under CC-BY-SA-4.0 +Full license: https://creativecommons.org/licenses/by-sa/4.0/legalcode \ No newline at end of file diff --git a/mods/ingots/mod.conf b/mods/ingots/mod.conf new file mode 100644 index 0000000..813cac8 --- /dev/null +++ b/mods/ingots/mod.conf @@ -0,0 +1,3 @@ +name = ingots +description = makes ingots placable in the world +optional_depends = default, moreores, technic, rainbow_ore \ No newline at end of file diff --git a/mods/ingots/textures/ingot.png b/mods/ingots/textures/ingot.png new file mode 100644 index 0000000..cce28d7 Binary files /dev/null and b/mods/ingots/textures/ingot.png differ diff --git a/mods/ingots/textures/ingot_brass.png b/mods/ingots/textures/ingot_brass.png new file mode 100644 index 0000000..b843f98 Binary files /dev/null and b/mods/ingots/textures/ingot_brass.png differ diff --git a/mods/ingots/textures/ingot_bronze.png b/mods/ingots/textures/ingot_bronze.png new file mode 100644 index 0000000..8a2acc8 Binary files /dev/null and b/mods/ingots/textures/ingot_bronze.png differ diff --git a/mods/ingots/textures/ingot_carbon_steel.png b/mods/ingots/textures/ingot_carbon_steel.png new file mode 100644 index 0000000..f58fb2e Binary files /dev/null and b/mods/ingots/textures/ingot_carbon_steel.png differ diff --git a/mods/ingots/textures/ingot_cast_iron.png b/mods/ingots/textures/ingot_cast_iron.png new file mode 100644 index 0000000..0b54d00 Binary files /dev/null and b/mods/ingots/textures/ingot_cast_iron.png differ diff --git a/mods/ingots/textures/ingot_chromium.png b/mods/ingots/textures/ingot_chromium.png new file mode 100644 index 0000000..171b1f0 Binary files /dev/null and b/mods/ingots/textures/ingot_chromium.png differ diff --git a/mods/ingots/textures/ingot_copper.png b/mods/ingots/textures/ingot_copper.png new file mode 100644 index 0000000..d85815d Binary files /dev/null and b/mods/ingots/textures/ingot_copper.png differ diff --git a/mods/ingots/textures/ingot_gold.png b/mods/ingots/textures/ingot_gold.png new file mode 100644 index 0000000..1304f03 Binary files /dev/null and b/mods/ingots/textures/ingot_gold.png differ diff --git a/mods/ingots/textures/ingot_lead.png b/mods/ingots/textures/ingot_lead.png new file mode 100644 index 0000000..b7fe880 Binary files /dev/null and b/mods/ingots/textures/ingot_lead.png differ diff --git a/mods/ingots/textures/ingot_mithril.png b/mods/ingots/textures/ingot_mithril.png new file mode 100644 index 0000000..03b8bf2 Binary files /dev/null and b/mods/ingots/textures/ingot_mithril.png differ diff --git a/mods/ingots/textures/ingot_mixed_metal.png b/mods/ingots/textures/ingot_mixed_metal.png new file mode 100644 index 0000000..308c953 Binary files /dev/null and b/mods/ingots/textures/ingot_mixed_metal.png differ diff --git a/mods/ingots/textures/ingot_rainbow_ore.png b/mods/ingots/textures/ingot_rainbow_ore.png new file mode 100644 index 0000000..e742568 Binary files /dev/null and b/mods/ingots/textures/ingot_rainbow_ore.png differ diff --git a/mods/ingots/textures/ingot_silver.png b/mods/ingots/textures/ingot_silver.png new file mode 100644 index 0000000..b15d04e Binary files /dev/null and b/mods/ingots/textures/ingot_silver.png differ diff --git a/mods/ingots/textures/ingot_stainless_steel.png b/mods/ingots/textures/ingot_stainless_steel.png new file mode 100644 index 0000000..cee4e9c Binary files /dev/null and b/mods/ingots/textures/ingot_stainless_steel.png differ diff --git a/mods/ingots/textures/ingot_steel.png b/mods/ingots/textures/ingot_steel.png new file mode 100644 index 0000000..de79dc1 Binary files /dev/null and b/mods/ingots/textures/ingot_steel.png differ diff --git a/mods/ingots/textures/ingot_tin.png b/mods/ingots/textures/ingot_tin.png new file mode 100644 index 0000000..52bfa2f Binary files /dev/null and b/mods/ingots/textures/ingot_tin.png differ diff --git a/mods/ingots/textures/ingot_zinc.png b/mods/ingots/textures/ingot_zinc.png new file mode 100644 index 0000000..8a7b59e Binary files /dev/null and b/mods/ingots/textures/ingot_zinc.png differ diff --git a/mods/intllib/LICENSE.md b/mods/intllib/LICENSE.md new file mode 100755 index 0000000..9f2b419 --- /dev/null +++ b/mods/intllib/LICENSE.md @@ -0,0 +1,25 @@ + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/mods/intllib/README-es.md b/mods/intllib/README-es.md new file mode 100755 index 0000000..f1f428e --- /dev/null +++ b/mods/intllib/README-es.md @@ -0,0 +1,41 @@ + +# Bilioteca de internacionalización para Minetest + +Por Diego Martínez (kaeza). +Lanzada bajo Unlicense. Véase `LICENSE.md` para más detalles. + +Éste mod es un intento por proveer soporte para internacionalización +de los mods (algo que a Minetest le falta de momento). + +Si tienes alguna duda/comentario, por favor publica en el +[tema del foro][topic]. Por reporte de errores, use el +[bugtracker][bugtracker] en Github. + +## Cómo usar + +Si eres un jugador regular en busca de textos traducidos, simplemente +[instala][installing_mods] éste mod como cualquier otro. + +El mod trata de detectar tu idioma, pero ya que no hay una forma portable de +hacerlo, prueba varias alternativas: + +* `language` setting in `minetest.conf`. +* `LANGUAGE` environment variable. +* `LANG` environment variable. + +En cualquier caso, el resultado final debería ser el +[Código de idioma ISO 639-1][ISO639-1] del idioma deseado. + +### Desarrolladores + +Si desarrollas mods y estás buscando añadir soporte de internacionalización +a tu mod, ve el fichero `doc/developer.md`. + +### Traductores + +Si eres un traductor, ve el fichero `doc/translator.md`. + +[topic]: https://forum.minetest.net/viewtopic.php?id=4929 +[bugtracker]: https://github.com/minetest-mods/intllib/issues +[installing_mods]: https://wiki.minetest.net/Installing_mods/es +[ISO639-1]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes diff --git a/mods/intllib/README-it.md b/mods/intllib/README-it.md new file mode 100755 index 0000000..3b9ba37 --- /dev/null +++ b/mods/intllib/README-it.md @@ -0,0 +1,43 @@ + +# Libreria di internazionalizzazione per Minetest + +Di Diego Martínez (kaeza). +Rilasciata sotto licenza Unlicense. Si veda `LICENSE.md` per i dettagli. + +Questo modulo è un tentativo per fornire il supporto di internazionalizzazione +per i moduli (cosa che attualmente manca a Minetest). + +Se aveste qualunque commento o suggerimento, per piacere scriveteli nella +[discussione sul forum][topic]. Per i rapporti sui bug, usate il +[tracciatore di bug][bugtracker] su Github. + +## Come usarla + +Se siete un* giocatrice/tore che vuole i testi tradotti, +[installate][installing_mods] questo modulo come qualunque altro, +poi abilitatelo tramite l'interfaccia grafica. + +Il modulo tenta di rilevare la vostra lingua, ma dato che al momento non c'è +un metodo portabile per farlo, prova diverse alternative: + +* `language` impostazione in `minetest.conf`. +* `LANGUAGE` variabile d'ambiente. +* `LANG` variabile d'ambiente. +* Se nessuna funziona, usa `en`. + +In ogni caso, il risultato finale dovrebbe essere il +[codice di lingua ISO 639-1][ISO639-1] del linguaggio desiderato. + +### Sviluppatrici/tori di moduli + +Se siete un* sviluppatrice/tore di moduli desideros* di aggiungere il supporto +per l'internazionalizzazione al vostro modulo, leggete `doc/developer-it.md`. + +### Traduttrici/tori + +Se siete un* traduttrice/tore, leggete `doc/translator-it.md`. + +[topic]: https://forum.minetest.net/viewtopic.php?id=4929 +[bugtracker]: https://github.com/minetest-mods/intllib/issues +[installing_mods]: https://wiki.minetest.net/Installing_mods +[ISO639-1]: https://it.wikipedia.org/wiki/ISO_639-1 diff --git a/mods/intllib/README-ms.md b/mods/intllib/README-ms.md new file mode 100755 index 0000000..6b9104b --- /dev/null +++ b/mods/intllib/README-ms.md @@ -0,0 +1,41 @@ + +# Pustaka Pengantarabangsaan untuk Minetest + +Oleh Diego Martínez (kaeza). +Diterbitkan bawah Unlicense. Lihat `LICENSE.md` untuk maklumat lanjut. + +Mods ini ialah suatu usaha untuk menyediakan sokongan pengantarabangsaan +kepada mods (sesuatu yang Minetest tiada ketika ini). + +Jika anda mempunyai sebarang komen/cadangan, sila tulis ke dalam [topik forum][topik]. +Untuk melaporkan pepijat, sila gunakan [penjejak pepijat][pepijat] Github. + +## Bagaimanakah cara untuk menggunakannya? + +Jika anda pemain biasa yang mencari teks terjemahan, hanya [pasangkan][pasang_mods] +mods ini seperti mods lain, kemudian bolehkannya melalui GUI. + +Mods ini cuba untuk mengesan bahasa anda, tetapi oleh kerana tiada +cara mudah alih untuk melakukannya, ia cuba beberapa cara yang lain: + +* Tetapan `language` di dalam fail `minetest.conf`. +* Pembolehubah sekitaran `LANGUAGE`. +* Pembolehubah sekitaran `LANG`. +* Jika semua di atas gagal, ia gunakan `en`. + +Dalam apa jua keadaan, hasil akhirnya sepatutnya menjadi +[Kod Bahasa ISO 639-1][ISO639-1] untuk bahasa yang dikehendaki. + +### Pembangun mods + +Jika anda seorang pembangun mods yang ingin menambah sokongan +pengantarabangsaan kepada mods anda, sila lihat `doc/developer.md`. + +### Penterjemah + +Jika anda seorang penterjemah, sila lihat `doc/translator.md`. + +[topik]: https://forum.minetest.net/viewtopic.php?id=4929 +[pepijat]: https://github.com/minetest-mods/intllib/issues +[pasang_mods]: https://wiki.minetest.net/Installing_Mods/ms +[ISO639-1]: https://ms.wikipedia.org/wiki/Senarai_kod_ISO_639-1 diff --git a/mods/intllib/README-pt_BR.md b/mods/intllib/README-pt_BR.md new file mode 100755 index 0000000..bdb2f3e --- /dev/null +++ b/mods/intllib/README-pt_BR.md @@ -0,0 +1,50 @@ +# Lib de Internacionalização para Minetest + +Por Diego Martínez (kaeza). +Lançado sob Unlicense. Veja `LICENSE.md` para detalhes. + +Este mod é uma tentativa de fornecer suporte de internacionalização para mods +(algo que Minetest atualmente carece). + + +Se você tiver algum comentário/sugestão, favor postar no +[tópico do fórum][topico]. Para reportar bugs, use o +[rastreador de bugs][bugtracker] no GitHub. + + +## Como usar + +Se você é um jogador regular procurando por textos traduzidos, +basta instalar este mod como qualquer outro, e então habilite-lo na GUI. + +O mod tenta detectar o seu idioma, mas como não há atualmente nenhuma +maneira portátil de fazer isso, ele tenta várias alternativas: + +Para usar este mod, basta [instalá-lo][instalando_mods] +e habilita-lo na GUI. + +O modificador tenta detectar o idioma do usuário, mas já que não há atualmente +nenhuma maneira portátil para fazer isso, ele tenta várias alternativas, e usa +o primeiro encontrado: + + * `language` definido em `minetest.conf`. + * Variável de ambiente `LANGUAGE`. + * Variável de ambiente `LANG`. + * Se todos falharem, usa `en` (inglês). + +Em todo caso, o resultado final deve ser um +[Código de Idioma ISO 639-1][ISO639-1] do idioma desejado. + +### Desenvolvedores de mods + +Se você é um desenvolvedor de mod procurando adicionar suporte de +internacionalização ao seu mod, consulte `doc/developer.md`. + +### Tradutores + +Se você é um tradutor, consulte `doc/translator.md`. + +[topico]: https://forum.minetest.net/viewtopic.php?id=4929 +[bugtracker]: https://github.com/minetest-mods/intllib/issues +[instalando_mods]: http://wiki.minetest.net/Installing_Mods/pt-br +[ISO639-1]: https://pt.wikipedia.org/wiki/ISO_639 diff --git a/mods/intllib/README.md b/mods/intllib/README.md new file mode 100755 index 0000000..de7cfa3 --- /dev/null +++ b/mods/intllib/README.md @@ -0,0 +1,43 @@ + +# Internationalization Lib for Minetest + +By Diego Martínez (kaeza). +Released under Unlicense. See `LICENSE.md` for details. + +This mod is an attempt at providing internationalization support for mods +(something Minetest currently lacks). + +Should you have any comments/suggestions, please post them in the +[forum topic][topic]. For bug reports, use the [bug tracker][bugtracker] +on Github. + +## How to use + +If you are a regular player looking for translated texts, just +[install][installing_mods] this mod like any other one, then enable it +in the GUI. + +The mod tries to detect your language, but since there's currently no +portable way to do this, it tries several alternatives: + +* `language` setting in `minetest.conf`. +* `LANGUAGE` environment variable. +* `LANG` environment variable. +* If all else fails, uses `en`. + +In any case, the end result should be the [ISO 639-1 Language Code][ISO639-1] +of the desired language. + +### Mod developers + +If you are a mod developer looking to add internationalization support to +your mod, see `doc/developer.md`. + +### Translators + +If you are a translator, see `doc/translator.md`. + +[topic]: https://forum.minetest.net/viewtopic.php?id=4929 +[bugtracker]: https://github.com/minetest-mods/intllib/issues +[installing_mods]: https://wiki.minetest.net/Installing_mods +[ISO639-1]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes diff --git a/mods/intllib/description.txt b/mods/intllib/description.txt new file mode 100755 index 0000000..d2e1abb --- /dev/null +++ b/mods/intllib/description.txt @@ -0,0 +1,3 @@ +Internationalization library. +This mod provides a way to internationalize/localize mods to other languages in an easy way. +See the README file for details. diff --git a/mods/intllib/doc/developer-it.md b/mods/intllib/doc/developer-it.md new file mode 100755 index 0000000..4c660d6 --- /dev/null +++ b/mods/intllib/doc/developer-it.md @@ -0,0 +1,66 @@ + +# Intllib - documentazione per sviluppatrici/tori + +## Abilitare l'internazionalizzazione + +Per abilitare l'internazionalizzazione del vostro modulo, dovete copiare il file +`lib/intllib.lua` nella cartella principale del vostro modulo, poi inserite +questo codice standard nei file che necessitano la traduzione: + + -- Load support for intllib. + local MP = minetest.get_modpath(minetest.get_current_modname()) + local S, NS = dofile(MP.."/intllib.lua") + +Dovrete anche aggiungere la dipendenza facoltativa da intllib per il vostro +modulo, per farlo aggiungete `intllib?` su una riga vuota nel vostro +`depends.txt`. Si noti anche che se intllib non è installata, le funzioni di +acquisizione del testo sono fatte in modo da restituire la stringa di testo +originale. Questo è stato fatto in modo che non dobbiate spargere tonnellate +di `if` (o costrutti simili) per controllare se la libreria è installata. + +Dopo avere messo il codice, dovete marcare le stringhe di testo che necessitano +una traduzione. Per ciascuna stringa traducibile nei vostri codici sorgenti, +usate la funzione `S` (si veda sopra) per restituire la stringa tradotta. +Per esempio: + + minetest.register_node("miomod:mionodo", { + -- Stringa semplice: + description = S("Il mio fantastico nodo"), + -- Stringa con inserti: + description = S("Macchina @1", "Blu"), + -- ... + }) + +La funzione `NS` è l'equivalente di `ngettext`. Dovrebbe essere usata quando la +stringa da tradurre ha forma singolare e plurale. Per esempio: + + -- Il primo `count` è per consentire a `ngettext` di stabilire quale forma + -- usare. Il secondo `count` è per il sostituto effettivo. + + print(NS("Avete un oggetto.", "Avete @1 oggetti.", count, count)) + +## Generare e aggiornare cataloghi + +Questo è il procedimento di base per lavorare con [gettext][gettext] + +Ogni volta che avete nuove stringhe da tradurre, dovreste fare quanto segue: + + cd /percorso/del/modulo + /percorso/degli/strumenti/intllib/xgettext.sh file1.lua file2.lua ... + +Lo script creerà una cartella chiamata `locale` se non esiste già, e genererà +il file `template.pot` (un modello con tutte le stringhe traducibili). Se avete +già delle traduzioni, lo script provvederà al loro aggiornamento con le nuove +stringhe. + +Lo script fornisce alcune opzioni al vero `xgettext` che dovrebbero essere +sufficienti per la maggior parte dei casi. Se lo desiderate potete specificare +altre opzioni: + + xgettext.sh -o file.pot --keyword=blaaaah:4,5 a.lua b.lua ... + +NOTA: C'è anche un file batch di Windows `xgettext.bat` per gli utenti di +Windows, ma dovrete installare separatamente gli strumenti di gettext per la +riga di comando. Si veda la parte superiore del file per la configurazione. + +[gettext]: https://www.gnu.org/software/gettext/ diff --git a/mods/intllib/doc/developer.md b/mods/intllib/doc/developer.md new file mode 100755 index 0000000..551f188 --- /dev/null +++ b/mods/intllib/doc/developer.md @@ -0,0 +1,62 @@ + +# Intllib developer documentation + +## Enabling internationalization + +In order to enable internationalization for your mod, you will need to copy the +file `lib/intllib.lua` into the root directory of your mod, then include this +boilerplate code in files needing localization: + + -- Load support for intllib. + local MP = minetest.get_modpath(minetest.get_current_modname()) + local S, NS = dofile(MP.."/intllib.lua") + +You will also need to optionally depend on intllib, to do so add `intllib?` +to an empty line in your `depends.txt`. Also note that if intllib is not +installed, the getter functions are defined so they return the string +unchanged. This is done so you don't have to sprinkle tons of `if`s (or +similar constructs) to check if the lib is actually installed. + +Once you have the code in place, you need to mark strings that need +translation. For each translatable string in your sources, use the `S` +function (see above) to return the translated string. For example: + + minetest.register_node("mymod:mynode", { + -- Simple string: + description = S("My Fabulous Node"), + -- String with insertions: + description = S("@1 Car", "Blue"), + -- ... + }) + +The `NS` function is the equivalent of `ngettext`. It should be used when the +string to be translated has singular and plural forms. For example: + + -- The first `count` is for `ngettext` to determine which form to use. + -- The second `count` is the actual replacement. + print(NS("You have one item.", "You have @1 items.", count, count)) + +## Generating and updating catalogs + +This is the basic workflow for working with [gettext][gettext] + +Each time you have new strings to be translated, you should do the following: + + cd /path/to/mod + /path/to/intllib/tools/xgettext.sh file1.lua file2.lua ... + +The script will create a directory named `locale` if it doesn't exist yet, +and will generate the file `template.pot` (a template with all the translatable +strings). If you already have translations, the script will proceed to update +all of them with the new strings. + +The script passes some options to the real `xgettext` that should be enough +for most cases. You may specify other options if desired: + + xgettext.sh -o file.pot --keyword=blargh:4,5 a.lua b.lua ... + +NOTE: There's also a Windows batch file `xgettext.bat` for Windows users, +but you will need to install the gettext command line tools separately. See +the top of the file for configuration. + +[gettext]: https://www.gnu.org/software/gettext/ diff --git a/mods/intllib/doc/localefile-it.md b/mods/intllib/doc/localefile-it.md new file mode 100755 index 0000000..47d8718 --- /dev/null +++ b/mods/intllib/doc/localefile-it.md @@ -0,0 +1,43 @@ + +# Formato del file di traduzione + +*Nota: Questo documento spiega il vecchio formato in stile conf/ini. +La nuova interfaccia usa file [gettext][gettext] `.po`. +Si veda [Il formato dei file PO][PO-Files] per ulteriori informazioni.* + +Questo è un esempio per un file di traduzione in Italiano (`it.txt`): + + # Un commento. + # Un altro commento. + Questa riga viene ignorata dato che non ha il segno di uguale. + Hello, World! = Ciao, Mondo! + String with\nnewlines = Stringa con\na capo + String with an \= equals sign = Stringa con un segno di uguaglianza \= + +I file "locale" (o di traduzione) sono file di testo semplice formati da righe +nel formato `testo originale = testo tradotto`. Il file deve stare nella +sottocartella `locale` del modulo, e il suo nome deve essere lo stesso del +[codice di lingua ISO 639-1][ISO639-1] della lingua che volete fornire. + +I file di traduzione dovrebbero usare la codifica UTF-8. + +Le righe che iniziano con un cancelletto sono commenti e vengono ignorate dal +lettore. Si noti che i commenti si estendono solo fino al termine della riga; +non c'è nessun supporto per i commenti multiriga. Le righe senza un segno di +uguale sono anch'esse ignorate. + +I caratteri che sono considerati "speciali" possono essere "escaped" di modo +che siano presi letteralmente. Inoltre esistono molte sequenze di escape che +possono essere utilizzate: + + * Qualsiasi `#`, `=` può essere escaped di modo da essere preso letteralmente. + La sequenza `\#` è utile se il vostro testo sorgente inizia con `#`. + * Le sequenze di escape comuni `\n` e `\t`, significano rispettivamente + newline (a capo) e tabulazione orizzontale. + * La sequenza speciale di escape`\s` rappresenta il carattere di spazio. + È utile principalmente per aggiungere spazi prefissi o suffissi ai testi + originali o tradotti, perché altrimenti quegli spazi verrebbero rimossi. + +[gettext]: https://www.gnu.org/software/gettext +[PO-Files]: https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html +[ISO639-1]: https://it.wikipedia.org/wiki/ISO_639-1 diff --git a/mods/intllib/doc/localefile.md b/mods/intllib/doc/localefile.md new file mode 100755 index 0000000..777e759 --- /dev/null +++ b/mods/intllib/doc/localefile.md @@ -0,0 +1,42 @@ + +# Locale file format + +*Note: This document explains the old conf/ini-like file format. +The new interface uses [gettext][gettext] `.po` files. +See [The Format of PO Files][PO-Files] for more information.* + +Here's an example for a Spanish locale file (`es.txt`): + + # A comment. + # Another comment. + This line is ignored since it has no equals sign. + Hello, World! = Hola, Mundo! + String with\nnewlines = Cadena con\nsaltos de linea + String with an \= equals sign = Cadena con un signo de \= igualdad + +Locale (or translation) files are plain text files consisting of lines of the +form `source text = translated text`. The file must reside in the mod's `locale` +subdirectory, and must be named after the two-letter +[ISO 639-1 Language Code][ISO639-1] of the language you want to support. + +The translation files should use the UTF-8 encoding. + +Lines beginning with a pound sign are comments and are effectively ignored +by the reader. Note that comments only span until the end of the line; +there's no support for multiline comments. Lines without an equals sign are +also ignored. + +Characters that are considered "special" can be "escaped" so they are taken +literally. There are also several escape sequences that can be used: + + * Any of `#`, `=` can be escaped to take them literally. The `\#` + sequence is useful if your source text begins with `#`. + * The common escape sequences `\n` and `\t`, meaning newline and + horizontal tab respectively. + * The special `\s` escape sequence represents the space character. It + is mainly useful to add leading or trailing spaces to source or + translated texts, as these spaces would be removed otherwise. + +[gettext]: https://www.gnu.org/software/gettext +[PO-Files]: https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html +[ISO639-1]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes diff --git a/mods/intllib/doc/translator-it.md b/mods/intllib/doc/translator-it.md new file mode 100755 index 0000000..e078b9a --- /dev/null +++ b/mods/intllib/doc/translator-it.md @@ -0,0 +1,20 @@ + +# Intllib - documentazione per traduttrici/tori + +#### Nuova interfaccia + +Usate i vostri strumenti preferiti per modificare i file `.po`. + +#### Vecchia interfaccia + +Per tradurre nella lingua che desiderate un modulo che supporta intllib, +copiate il file `locale/template.txt` come `locale/LINGUA.txt` (dove `LINGUA` è +il [codice di lingua ISO 639-1][ISO639-1] del vostro linguaggio. + +Aprite il nuovo file nel vostro editor preferito, e traducete ciascuna riga +inserendo il testo tradotto dopo il segno di uguale. + +Si veda `localefile-it.md` per ulteriori informazioni sul formato del file. + +[gettext]: https://www.gnu.org/software/gettext/ +[ISO639-1]: https://it.wikipedia.org/wiki/ISO_639-1 diff --git a/mods/intllib/doc/translator.md b/mods/intllib/doc/translator.md new file mode 100755 index 0000000..3c278e8 --- /dev/null +++ b/mods/intllib/doc/translator.md @@ -0,0 +1,20 @@ + +# Intllib translator documentation + +#### New interface + +Use your favorite tools to edit the `.po` files. + +#### Old interface + +To translate an intllib-supporting mod to your desired language, copy the +`locale/template.txt` file to `locale/LANGUAGE.txt` (where `LANGUAGE` is the +[ISO 639-1 Language Code][ISO639-1] of your language. + +Open up the new file in your favorite editor, and translate each line putting +the translated text after the equals sign. + +See `localefile.md` for more information about the file format. + +[gettext]: https://www.gnu.org/software/gettext/ +[ISO639-1]: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes diff --git a/mods/intllib/gettext.lua b/mods/intllib/gettext.lua new file mode 100755 index 0000000..26a2d73 --- /dev/null +++ b/mods/intllib/gettext.lua @@ -0,0 +1,226 @@ + +local strsub, strrep = string.sub, string.rep +local strmatch, strgsub = string.match, string.gsub + +local function trim(str) + return strmatch(str, "^%s*(.-)%s*$") +end + +local escapes = { n="\n", r="\r", t="\t" } + +local function unescape(str) + return (strgsub(str, "(\\+)([nrt]?)", function(bs, c) + local bsl = #bs + local realbs = strrep("\\", bsl/2) + if bsl%2 == 1 then + c = escapes[c] or c + end + return realbs..c + end)) +end + +local function parse_po(str) + local state, msgid, msgid_plural, msgstrind + local texts = { } + local lineno = 0 + local function perror(msg) + return error(msg.." at line "..lineno) + end + for _, line in ipairs(str:split("\n")) do repeat + lineno = lineno + 1 + line = trim(line) + + if line == "" or strmatch(line, "^#") then + state, msgid, msgid_plural = nil, nil, nil + break -- continue + end + + local mid = strmatch(line, "^%s*msgid%s*\"(.*)\"%s*$") + if mid then + if state == "id" then + return perror("unexpected msgid") + end + state, msgid = "id", unescape(mid) + break -- continue + end + + mid = strmatch(line, "^%s*msgid_plural%s*\"(.*)\"%s*$") + if mid then + if state ~= "id" then + return perror("unexpected msgid_plural") + end + state, msgid_plural = "idp", unescape(mid) + break -- continue + end + + local ind, mstr = strmatch(line, + "^%s*msgstr([0-9%[%]]*)%s*\"(.*)\"%s*$") + if ind then + if not msgid then + return perror("missing msgid") + elseif ind == "" then + msgstrind = 0 + elseif strmatch(ind, "%[[0-9]+%]") then + msgstrind = tonumber(strsub(ind, 2, -2)) + else + return perror("malformed msgstr") + end + texts[msgid] = texts[msgid] or { } + if msgid_plural then + texts[msgid_plural] = texts[msgid] + end + texts[msgid][msgstrind] = unescape(mstr) + state = "str" + break -- continue + end + + mstr = strmatch(line, "^%s*\"(.*)\"%s*$") + if mstr then + if state == "id" then + msgid = msgid..unescape(mstr) + break -- continue + elseif state == "idp" then + msgid_plural = msgid_plural..unescape(mstr) + break -- continue + elseif state == "str" then + local text = texts[msgid][msgstrind] + texts[msgid][msgstrind] = text..unescape(mstr) + break -- continue + end + end + + return perror("malformed line") + + -- luacheck: ignore + until true end -- end for + + return texts +end + +local M = { } + +local function warn(msg) + minetest.log("warning", "[intllib] "..msg) +end + +-- hax! +-- This function converts a C expression to an equivalent Lua expression. +-- It handles enough stuff to parse the `Plural-Forms` header correctly. +-- Note that it assumes the C expression is valid to begin with. +local function compile_plural_forms(str) + local plural = strmatch(str, "plural=([^;]+);?$") + local function replace_ternary(s) + local c, t, f = strmatch(s, "^(.-)%?(.-):(.*)") + if c then + return ("__if(" + ..replace_ternary(c) + ..","..replace_ternary(t) + ..","..replace_ternary(f) + ..")") + end + return s + end + plural = replace_ternary(plural) + plural = strgsub(plural, "&&", " and ") + plural = strgsub(plural, "||", " or ") + plural = strgsub(plural, "!=", "~=") + plural = strgsub(plural, "!", " not ") + local f, err = loadstring([[ + local function __if(c, t, f) + if c and c~=0 then return t else return f end + end + local function __f(n) + return (]]..plural..[[) + end + return (__f(...)) + ]]) + if not f then return nil, err end + local env = { } + env._ENV, env._G = env, env + setfenv(f, env) + return function(n) + local v = f(n) + if type(v) == "boolean" then + -- Handle things like a plain `n != 1` + v = v and 1 or 0 + end + return v + end +end + +local function parse_headers(str) + local headers = { } + for _, line in ipairs(str:split("\n")) do + local k, v = strmatch(line, "^([^:]+):%s*(.*)") + if k then + headers[k] = v + end + end + return headers +end + +local function load_catalog(filename) + local f, data, err + + local function bail(msg) + warn(msg..(err and ": " or "")..(err or "")) + return nil + end + + f, err = io.open(filename, "rb") + if not f then + return --bail("failed to open catalog") + end + + data, err = f:read("*a") + + f:close() + + if not data then + return bail("failed to read catalog") + end + + data, err = parse_po(data) + if not data then + return bail("failed to parse catalog") + end + + err = nil + local hdrs = data[""] + if not (hdrs and hdrs[0]) then + return bail("catalog has no headers") + end + + hdrs = parse_headers(hdrs[0]) + + local pf = hdrs["Plural-Forms"] + if not pf then + -- XXX: Is this right? Gettext assumes this if header not present. + pf = "nplurals=2; plural=n != 1" + end + + data.plural_index, err = compile_plural_forms(pf) + if not data.plural_index then + return bail("failed to compile plural forms") + end + + --warn("loaded: "..filename) + + return data +end + +function M.load_catalogs(path) + local langs = intllib.get_detected_languages() + + local cats = { } + for _, lang in ipairs(langs) do + local cat = load_catalog(path.."/"..lang..".po") + if cat then + cats[#cats+1] = cat + end + end + + return cats +end + +return M diff --git a/mods/intllib/init.lua b/mods/intllib/init.lua new file mode 100755 index 0000000..0778a73 --- /dev/null +++ b/mods/intllib/init.lua @@ -0,0 +1,213 @@ + +-- Old multi-load method compatibility +if rawget(_G, "intllib") then return end + +intllib = { + getters = {}, + strings = {}, +} + + +local MP = minetest.get_modpath("intllib") + +dofile(MP.."/lib.lua") + + +local LANG = minetest.settings:get("language") +if not (LANG and (LANG ~= "")) then LANG = os.getenv("LANG") end +if not (LANG and (LANG ~= "")) then LANG = "en" end + + +local INS_CHAR = intllib.INSERTION_CHAR +local insertion_pattern = "("..INS_CHAR.."?)"..INS_CHAR.."(%(?)(%d+)(%)?)" + +local function do_replacements(str, ...) + local args = {...} + -- Outer parens discard extra return values + return (str:gsub(insertion_pattern, function(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return INS_CHAR..open..num..close + end + end)) +end + +local function make_getter(msgstrs) + return function(s, ...) + local str + if msgstrs then + str = msgstrs[s] + end + if not str or str == "" then + str = s + end + if select("#", ...) == 0 then + return str + end + return do_replacements(str, ...) + end +end + + +local function Getter(modname) + modname = modname or minetest.get_current_modname() + if not intllib.getters[modname] then + local msgstr = intllib.get_strings(modname) + intllib.getters[modname] = make_getter(msgstr) + end + return intllib.getters[modname] +end + + +function intllib.Getter(modname) + local info = debug and debug.getinfo and debug.getinfo(2) + local loc = info and info.short_src..":"..info.currentline + minetest.log("deprecated", "intllib.Getter is deprecated." + .." Please use intllib.make_gettext_pair instead." + ..(info and " (called from "..loc..")" or "")) + return Getter(modname) +end + + +local strfind, strsub = string.find, string.sub +local langs + +local function split(str, sep) + local pos, endp = 1, #str+1 + return function() + if (not pos) or pos > endp then return end + local s, e = strfind(str, sep, pos, true) + local part = strsub(str, pos, s and s-1) + pos = e and e + 1 + return part + end +end + +function intllib.get_detected_languages() + if langs then return langs end + + langs = { } + + local function addlang(l) + local sep + langs[#langs+1] = l + sep = strfind(l, ".", 1, true) + if sep then + l = strsub(l, 1, sep-1) + langs[#langs+1] = l + end + sep = strfind(l, "_", 1, true) + if sep then + langs[#langs+1] = strsub(l, 1, sep-1) + end + end + + local v + + v = minetest.settings:get("language") + if v and v~="" then + addlang(v) + end + + v = os.getenv("LANGUAGE") + if v then + for item in split(v, ":") do + langs[#langs+1] = item + end + end + + v = os.getenv("LANG") + if v then + addlang(v) + end + + langs[#langs+1] = "en" + + return langs +end + + +local gettext = dofile(minetest.get_modpath("intllib").."/gettext.lua") + + +local function catgettext(catalogs, msgid) + for _, cat in ipairs(catalogs) do + local msgstr = cat and cat[msgid] + if msgstr and msgstr~="" then + local msg = msgstr[0] + return msg~="" and msg or nil + end + end +end + +local function catngettext(catalogs, msgid, msgid_plural, n) + n = math.floor(n) + for _, cat in ipairs(catalogs) do + local msgstr = cat and cat[msgid] + if msgstr then + local index = cat.plural_index(n) + local msg = msgstr[index] + return msg~="" and msg or nil + end + end + return n==1 and msgid or msgid_plural +end + + +local gettext_getters = { } +function intllib.make_gettext_pair(modname) + modname = modname or minetest.get_current_modname() + if gettext_getters[modname] then + return unpack(gettext_getters[modname]) + end + local localedir = minetest.get_modpath(modname).."/locale" + local catalogs = gettext.load_catalogs(localedir) + local getter = Getter(modname) + local function gettext_func(msgid, ...) + local msgstr = (catgettext(catalogs, msgid) + or getter(msgid)) + return do_replacements(msgstr, ...) + end + local function ngettext_func(msgid, msgid_plural, n, ...) + local msgstr = (catngettext(catalogs, msgid, msgid_plural, n) + or getter(msgid)) + return do_replacements(msgstr, ...) + end + gettext_getters[modname] = { gettext_func, ngettext_func } + return gettext_func, ngettext_func +end + + +local function get_locales(code) + local ll, cc = code:match("^(..)_(..)") + if ll then + return { ll.."_"..cc, ll, ll~="en" and "en" or nil } + else + return { code, code~="en" and "en" or nil } + end +end + + +function intllib.get_strings(modname, langcode) + langcode = langcode or LANG + modname = modname or minetest.get_current_modname() + local msgstr = intllib.strings[modname] + if not msgstr then + local modpath = minetest.get_modpath(modname) + msgstr = { } + for _, l in ipairs(get_locales(langcode)) do + local t = intllib.load_strings(modpath.."/locale/"..l..".txt") or { } + for k, v in pairs(t) do + msgstr[k] = msgstr[k] or v + end + end + intllib.strings[modname] = msgstr + end + return msgstr +end + diff --git a/mods/intllib/intllib.lua b/mods/intllib/intllib.lua new file mode 100755 index 0000000..adb0f88 --- /dev/null +++ b/mods/intllib/intllib.lua @@ -0,0 +1,3 @@ +-- Support for the old multi-load method +dofile(minetest.get_modpath("intllib").."/init.lua") + diff --git a/mods/intllib/intltest/README.md b/mods/intllib/intltest/README.md new file mode 100755 index 0000000..9122d9e --- /dev/null +++ b/mods/intllib/intltest/README.md @@ -0,0 +1,10 @@ + +# Intllib example + +This is a simple mod showing how to use intllib. + +It defines a test `intltest:test` item whose description is translated +according to the user's language. + +Additionally, it demonstrates how to use plural forms by counting the +number of times the item has been used. diff --git a/mods/intllib/intltest/depends.txt b/mods/intllib/intltest/depends.txt new file mode 100755 index 0000000..77e8d97 --- /dev/null +++ b/mods/intllib/intltest/depends.txt @@ -0,0 +1 @@ +intllib? diff --git a/mods/intllib/intltest/init.lua b/mods/intllib/intltest/init.lua new file mode 100755 index 0000000..e855621 --- /dev/null +++ b/mods/intllib/intltest/init.lua @@ -0,0 +1,28 @@ + +-- Load support for intllib. +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +local use_count = 0 + +minetest.log("action", S("Hello, world!")) + +minetest.register_craftitem("intltest:test", { + -- Example use of replacements. + -- Translators: @1 is color, @2 is object. + description = S("Test: @1 @2", S("Blue"), S("Car")), + + inventory_image = "default_sand.png", + + on_use = function(stack, user, pt) + use_count = use_count + 1 + -- Example use of `ngettext` function. + -- First `use_count` is `n` for ngettext; + -- Second one is actual replacement. + -- Translators: @1 is use count. + local message = NS("Item has been used @1 time.", + "Item has been used @1 times.", + use_count, use_count) + minetest.chat_send_player(user:get_player_name(), message) + end, +}) diff --git a/mods/intllib/intltest/intllib.lua b/mods/intllib/intltest/intllib.lua new file mode 100755 index 0000000..c2eb8dc --- /dev/null +++ b/mods/intllib/intltest/intllib.lua @@ -0,0 +1,3 @@ + +-- This file should be replaced by `intllib/lib/intllib.lua`. +return dofile(minetest.get_modpath("intllib").."/lib/intllib.lua") diff --git a/mods/intllib/intltest/locale/es.po b/mods/intllib/intltest/locale/es.po new file mode 100755 index 0000000..cd51b8f --- /dev/null +++ b/mods/intllib/intltest/locale/es.po @@ -0,0 +1,43 @@ +# I18N Test Mod. +# Copyright (C) 2013-2017 Diego Martínez +# This file is distributed under the same license as the intllib mod. +# Diego Martínez , 2013-2017. +# +msgid "" +msgstr "" +"Project-Id-Version: I18N Test Mod 0.1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-25 20:40-0300\n" +"PO-Revision-Date: 2017-01-23 17:36-0300\n" +"Last-Translator: Diego Martnez \n" +"Language-Team: Spanish\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: init.lua +msgid "Hello, world!" +msgstr "¡Hola, mundo!" + +#. Translators: @1 is color, @2 is object. +#: init.lua +msgid "Blue" +msgstr "Azul" + +#: init.lua +msgid "Car" +msgstr "Carro" + +#. Translators: @1 is color, @2 is object. +#: init.lua +msgid "Test: @1 @2" +msgstr "Prueba: @2 @1" + +#. Translators: @1 is use count. +#: init.lua +msgid "Item has been used @1 time." +msgid_plural "Item has been used @1 times." +msgstr[0] "El objeto ha sido usado @1 vez." +msgstr[1] "El objeto ha sido usado @1 veces." diff --git a/mods/intllib/intltest/locale/template.pot b/mods/intllib/intltest/locale/template.pot new file mode 100755 index 0000000..2090d61 --- /dev/null +++ b/mods/intllib/intltest/locale/template.pot @@ -0,0 +1,44 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-25 20:40-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: init.lua +msgid "Hello, world!" +msgstr "" + +#. Translators: @1 is color, @2 is object. +#: init.lua +msgid "Blue" +msgstr "" + +#: init.lua +msgid "Car" +msgstr "" + +#. Translators: @1 is color, @2 is object. +#: init.lua +msgid "Test: @1 @2" +msgstr "" + +#. Translators: @1 is use count. +#: init.lua +msgid "Item has been used @1 time." +msgid_plural "Item has been used @1 times." +msgstr[0] "" +msgstr[1] "" diff --git a/mods/intllib/lib.lua b/mods/intllib/lib.lua new file mode 100755 index 0000000..60aebc0 --- /dev/null +++ b/mods/intllib/lib.lua @@ -0,0 +1,67 @@ + +intllib = intllib or {} + +local INS_CHAR = "@" +intllib.INSERTION_CHAR = INS_CHAR + +local escapes = { + ["\\"] = "\\", + ["n"] = "\n", + ["s"] = " ", + ["t"] = "\t", + ["r"] = "\r", + ["f"] = "\f", + [INS_CHAR] = INS_CHAR..INS_CHAR, +} + +local function unescape(str) + local parts = {} + local n = 1 + local function add(s) + parts[n] = s + n = n + 1 + end + + local start = 1 + while true do + local pos = str:find("\\", start, true) + if pos then + add(str:sub(start, pos - 1)) + else + add(str:sub(start)) + break + end + local c = str:sub(pos + 1, pos + 1) + add(escapes[c] or c) + start = pos + 2 + end + return table.concat(parts) +end + +local function find_eq(s) + for slashes, pos in s:gmatch("([\\]*)=()") do + if (slashes:len() % 2) == 0 then + return pos - 1 + end + end +end + +function intllib.load_strings(filename) + local file, err = io.open(filename, "r") + if not file then + return nil, err + end + local strings = {} + for line in file:lines() do + line = line:trim() + if line ~= "" and line:sub(1, 1) ~= "#" then + local pos = find_eq(line) + if pos then + local msgid = unescape(line:sub(1, pos - 1):trim()) + strings[msgid] = unescape(line:sub(pos + 1):trim()) + end + end + end + file:close() + return strings +end diff --git a/mods/intllib/lib/intllib.lua b/mods/intllib/lib/intllib.lua new file mode 100755 index 0000000..6669d72 --- /dev/null +++ b/mods/intllib/lib/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/intllib/mod.conf b/mods/intllib/mod.conf new file mode 100755 index 0000000..4338db7 --- /dev/null +++ b/mods/intllib/mod.conf @@ -0,0 +1,2 @@ + +name = intllib diff --git a/mods/intllib/tools/findtext.lua b/mods/intllib/tools/findtext.lua new file mode 100755 index 0000000..e5f6e88 --- /dev/null +++ b/mods/intllib/tools/findtext.lua @@ -0,0 +1,142 @@ +#! /usr/bin/env lua + +local me = arg[0]:gsub(".*[/\\](.*)$", "%1") + +local function err(fmt, ...) + io.stderr:write(("%s: %s\n"):format(me, fmt:format(...))) + os.exit(1) +end + +local output +local inputs = { } +local lang +local author + +local i = 1 + +local function usage() + print([[ +Usage: ]]..me..[[ [OPTIONS] FILE... + +Extract translatable strings from the given FILE(s). + +Available options: + -h,--help Show this help screen and exit. + -o,--output X Set output file (default: stdout). + -a,--author X Set author. + -l,--lang X Set language name. +]]) + os.exit(0) +end + +while i <= #arg do + local a = arg[i] + if (a == "-h") or (a == "--help") then + usage() + elseif (a == "-o") or (a == "--output") then + i = i + 1 + if i > #arg then + err("missing required argument to `%s'", a) + end + output = arg[i] + elseif (a == "-a") or (a == "--author") then + i = i + 1 + if i > #arg then + err("missing required argument to `%s'", a) + end + author = arg[i] + elseif (a == "-l") or (a == "--lang") then + i = i + 1 + if i > #arg then + err("missing required argument to `%s'", a) + end + lang = arg[i] + elseif a:sub(1, 1) ~= "-" then + table.insert(inputs, a) + else + err("unrecognized option `%s'", a) + end + i = i + 1 +end + +if #inputs == 0 then + err("no input files") +end + +local outfile = io.stdout + +local function printf(fmt, ...) + outfile:write(fmt:format(...)) +end + +if output then + local e + outfile, e = io.open(output, "w") + if not outfile then + err("error opening file for writing: %s", e) + end +end + +if author or lang then + outfile:write("\n") +end + +if lang then + printf("# Language: %s\n", lang) +end + +if author then + printf("# Author: %s\n", author) +end + +if author or lang then + outfile:write("\n") +end + +local escapes = { + ["\n"] = "\\n", + ["="] = "\\=", + ["\\"] = "\\\\", +} + +local function escape(s) + return s:gsub("[\\\n=]", escapes) +end + +local messages = { } + +for _, file in ipairs(inputs) do + local infile, e = io.open(file, "r") + if infile then + for line in infile:lines() do + for s in line:gmatch('S%("([^"]*)"') do + table.insert(messages, s) + end + end + infile:close() + else + io.stderr:write(("%s: WARNING: error opening file: %s\n"):format(me, e)) + end +end + +table.sort(messages) + +local last_msg + +for _, msg in ipairs(messages) do + if msg ~= last_msg then + printf("%s =\n", escape(msg)) + end + last_msg = msg +end + +if output then + outfile:close() +end + +--[[ +TESTS: +S("foo") S("bar") +S("bar") +S("foo") +]] diff --git a/mods/intllib/tools/updatetext.lua b/mods/intllib/tools/updatetext.lua new file mode 100755 index 0000000..5d5734b --- /dev/null +++ b/mods/intllib/tools/updatetext.lua @@ -0,0 +1,131 @@ +#! /usr/bin/env lua + +local basedir = "" +if arg[0]:find("[/\\]") then + basedir = arg[0]:gsub("(.*[/\\]).*$", "%1"):gsub("\\", "/") +end +if basedir == "" then basedir = "./" end + +-- Required by load_strings() +function string.trim(s) -- luacheck: ignore + return s:gsub("^%s*(.-)%s*$", "%1") +end + +dofile(basedir.."/../lib.lua") + +local me = arg[0]:gsub(".*[/\\](.*)$", "%1") + +local function err(fmt, ...) + io.stderr:write(("%s: %s\n"):format(me, fmt:format(...))) + os.exit(1) +end + +local output, outfile, template +local catalogs = { } + +local function usage() + print([[ +Usage: ]]..me..[[ [OPTIONS] TEMPLATE CATALOG... + +Update a catalog with new strings from a template. + +Available options: + -h,--help Show this help screen and exit. + -o,--output X Set output file (default: stdout). + +Messages in the template that are not on the catalog are added to the +catalog at the end. + +This tool also checks messages that are in the catalog but not in the +template, and reports such lines. It's up to the user to remove such +lines, if so desired. +]]) + os.exit(0) +end + +local i = 1 + +while i <= #arg do + local a = arg[i] + if (a == "-h") or (a == "--help") then + usage() + elseif (a == "-o") or (a == "--output") then + i = i + 1 + if i > #arg then + err("missing required argument to `%s'", a) + end + output = arg[i] + elseif a:sub(1, 1) ~= "-" then + if not template then + template = a + else + table.insert(catalogs, a) + end + else + err("unrecognized option `%s'", a) + end + i = i + 1 +end + +if not template then + err("no template specified") +elseif #catalogs == 0 then + err("no catalogs specified") +end + +local f, e = io.open(template, "r") +if not f then + err("error opening template: %s", e) +end + +local escapes = { ["\n"] = "\\n", ["="] = "\\=", ["\\"] = "\\\\", } +local function escape(s) + return s:gsub("[\\\n=]", escapes) +end + +if output then + outfile, e = io.open(output, "w") + if not outfile then + err("error opening file for writing: %s", e) + end +end + +local template_msgs = intllib.load_strings(template) + +for _, file in ipairs(catalogs) do + print("Processing: "..file) + local catalog_msgs = intllib.load_strings(file) + local dirty_lines = { } + if catalog_msgs then + -- Add new entries from template. + for k in pairs(template_msgs) do + if not catalog_msgs[k] then + print("NEW: "..k) + table.insert(dirty_lines, escape(k).." =") + end + end + -- Check for old messages. + for k, v in pairs(catalog_msgs) do + if not template_msgs[k] then + print("OLD: "..k) + table.insert(dirty_lines, "OLD: "..escape(k).." = "..escape(v)) + end + end + if #dirty_lines > 0 then + local outf + outf, e = io.open(file, "a+") + if outf then + outf:write("\n") + for _, line in ipairs(dirty_lines) do + outf:write(line) + outf:write("\n") + end + outf:close() + else + io.stderr:write(("%s: WARNING: cannot write: %s\n"):format(me, e)) + end + end + else + io.stderr:write(("%s: WARNING: could not load catalog\n"):format(me)) + end +end diff --git a/mods/intllib/tools/xgettext.bat b/mods/intllib/tools/xgettext.bat new file mode 100755 index 0000000..18403db --- /dev/null +++ b/mods/intllib/tools/xgettext.bat @@ -0,0 +1,33 @@ +@echo off +setlocal + +set me=%~n0 + +rem # Uncomment the following line if gettext is not in your PATH. +rem # Value must be absolute and end in a backslash. +rem set gtprefix=C:\path\to\gettext\bin\ + +if "%1" == "" ( + echo Usage: %me% FILE... 1>&2 + exit 1 +) + +set xgettext=%gtprefix%xgettext.exe +set msgmerge=%gtprefix%msgmerge.exe + +md locale > nul 2>&1 +echo Generating template... 1>&2 +echo %xgettext% --from-code=UTF-8 -kS -kNS:1,2 -k_ -o locale/template.pot %* +%xgettext% --from-code=UTF-8 -kS -kNS:1,2 -k_ -o locale/template.pot %* +if %ERRORLEVEL% neq 0 goto done + +cd locale + +for %%f in (*.po) do ( + echo Updating %%f... 1>&2 + %msgmerge% --update %%f template.pot +) + +echo DONE! 1>&2 + +:done diff --git a/mods/intllib/tools/xgettext.sh b/mods/intllib/tools/xgettext.sh new file mode 100755 index 0000000..1504f42 --- /dev/null +++ b/mods/intllib/tools/xgettext.sh @@ -0,0 +1,27 @@ +#! /bin/bash + +me=$(basename "${BASH_SOURCE[0]}"); + +if [[ $# -lt 1 ]]; then + echo "Usage: $me FILE..." >&2; + exit 1; +fi + +mkdir -p locale; +echo "Generating template..." >&2; +xgettext --from-code=UTF-8 \ + --keyword=S \ + --keyword=NS:1,2 \ + --keyword=N_ \ + --add-comments='Translators:' \ + --add-location=file \ + -o locale/template.pot \ + "$@" \ + || exit; + +find locale -name '*.po' -type f | while read -r file; do + echo "Updating $file..." >&2; + msgmerge --update "$file" locale/template.pot; +done + +echo "DONE!" >&2; diff --git a/mods/itemhandling/init.lua b/mods/itemhandling/init.lua new file mode 100644 index 0000000..4797edd --- /dev/null +++ b/mods/itemhandling/init.lua @@ -0,0 +1,543 @@ +collection = {} +collection.collection_height = 0.5 -- the height of the collection based off the player's origin y height +collection.magnet_radius = 2 -- the radius of the item magnet +collection.allow_lower = false -- false = items below origin y of player will not be collected --true = player will collect all objects in radius --false = minecraft style --true = pilzadam style +collection.collection_time = 2.5 --the time which the item will be collected + +local path = minetest.get_modpath("itemhandling") +dofile(path.."/magnet.lua") + + +local creative_mode = minetest.settings:get_bool("creative_mode") + +--handle node drops +--survival +if not creative_mode then + function minetest.handle_node_drops(pos, drops, digger) + if not(digger) or not(digger:is_player()) then + return + end + local meta = digger:get_wielded_item():get_meta() + local slippery = meta:get_int("slippery") + local careful = meta:get_int("careful") + local fortune = meta:get_int("fortune") + 1 + local autorepair = meta:get_int("autorepair") + local spiky = meta:get_int("spiky") + if careful > 0 then + drops = {minetest.get_node(pos).name} + end + for i = 1,fortune do + for _,item in ipairs(drops) do + local count, name + if type(item) == "string" then + count = 1 + name = item + else + count = item:get_count() + name = item:get_name() + end + for i=1,count do + local obj = minetest.add_item(pos, name) + if obj ~= nil then + local x=math.random(-2,2)*math.random() + local y=math.random(2,5) + local z=math.random(-2,2)*math.random() + obj:setvelocity({x=x, y=y, z=z}) + end + end + end + local experience_amount = minetest.get_item_group(minetest.get_node(pos).name,"experience") + if experience_amount > 0 then + minetest.throw_experience(pos, experience_amount) + end + end + --make the player drop their "slippery" item + if slippery > 0 and math.random(0,1000) < slippery then + minetest.item_drop(digger:get_wielded_item(), digger, digger:get_pos()) + digger:set_wielded_item("") + end + + --auto repair the item + if autorepair > 0 and math.random(0,1000) < autorepair then + local itemstack = digger:get_wielded_item() + itemstack:add_wear(autorepair*-100) + digger:set_wielded_item(itemstack) + end + + --hurt the player randomly + if spiky > 0 and math.random(0,1000) < spiky then + digger:set_hp(digger:get_hp()-spiky) + end + end +--creative +else + function minetest.handle_node_drops(pos, drops, digger) + end + minetest.register_on_dignode(function(pos, oldnode, digger) + if digger and digger:is_player() then + local inv = digger:get_inventory() + if inv and not inv:contains_item("main", oldnode) and inv:room_for_item("main", oldnode) then + inv:add_item("main", oldnode) + end + end + end) + minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack, pointed_thing) + return(itemstack:get_name()) + end) +end + +-- Minetest: builtin/item_entity.lua + +function minetest.spawn_item(pos, item) + -- Take item in any format + local stack = ItemStack(item) + local obj = minetest.add_entity(pos, "__builtin:item") + -- Don't use obj if it couldn't be added to the map. + if obj then + obj:get_luaentity():set_item(stack:to_string()) + end + return obj +end + +function minetest.throw_item(pos, item) + -- Take item in any format + local stack = ItemStack(item) + local obj = minetest.add_entity(pos, "__builtin:item") + -- Don't use obj if it couldn't be added to the map. + if obj then + obj:get_luaentity():set_item(stack:to_string()) + local x=math.random(-2,2)*math.random() + local y=math.random(2,5) + local z=math.random(-2,2)*math.random() + obj:set_velocity({x=x, y=y, z=z}) + end + return obj +end + + +function minetest.throw_experience(pos, amount) + for i = 1,amount do + local obj = minetest.add_entity(pos, "experience:orb") + -- Don't use obj if it couldn't be added to the map. + if obj then + local x=math.random(-2,2)*math.random() + local y=math.random(2,5) + local z=math.random(-2,2)*math.random() + obj:setvelocity({x=x, y=y, z=z}) + end + end + --return obj +end + +--override drops +function minetest.item_drop(itemstack, dropper, pos) + local dropper_is_player = dropper and dropper:is_player() + local p = table.copy(pos) + local sneak + if type(dropper) == "userdata" then + sneak = dropper:get_player_control().sneak + else + sneak = nil + end + local cnt + if dropper_is_player then + p.y = p.y + 1.2 + if not sneak then + cnt = itemstack:get_count() + else + cnt = 1 + end + else + cnt = itemstack:get_count() + end + local item = itemstack:take_item(cnt) + local obj = minetest.add_item(p, item) + if obj then + if dropper_is_player then + local dir = dropper:get_look_dir() + dir.x = dir.x * 2.9 + dir.y = dir.y * 2.9 + 2 + dir.z = dir.z * 2.9 + obj:set_velocity(dir) + obj:get_luaentity().dropped_by = dropper:get_player_name() + obj:get_luaentity().collection_timer = 0 + end + return itemstack + end + -- If we reach this, adding the object to the + -- environment failed +end + +-- If item_entity_ttl is not set, enity will have default life time +-- Setting it to -1 disables the feature + +local time_to_live = tonumber(minetest.settings:get("item_entity_ttl")) or 300 +local gravity = tonumber(minetest.settings:get("movement_gravity")) or 9.81 + + +minetest.register_entity(":__builtin:item", { + initial_properties = { + hp_max = 1, + physical = true, + collide_with_objects = false, + collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.3, 0.3}, + visual = "wielditem", + visual_size = {x = 0.4, y = 0.4}, + textures = {""}, + spritediv = {x = 1, y = 1}, + initial_sprite_basepos = {x = 0, y = 0}, + is_visible = false, + pointable = false, + }, + + itemstring = "", + moving_state = true, + slippery_state = false, + physical_state = true, + -- Item expiry + age = 0, + -- Pushing item out of solid nodes + force_out = nil, + force_out_start = nil, + --Collection Variables + collection_timer = 2, + collection_timer_goal = collection.collection_time, + collection_height = collection.collection_height, + collectable = false, + try_timer = 0, + collected = false, + delete_timer = 0, + radius = collection.magnet_radius, + time_to_live = time_to_live, + + set_item = function(self, item) + local stack = ItemStack(item or self.itemstring) + self.itemstring = stack:to_string() + if self.itemstring == "" then + -- item not yet known + return + end + + -- Backwards compatibility: old clients use the texture + -- to get the type of the item + local itemname = stack:is_known() and stack:get_name() or "unknown" + + local max_count = stack:get_stack_max() + local count = math.min(stack:get_count(), max_count) + + local size = 0.21 + local coll_height = size * 0.75 + local def = minetest.registered_nodes[itemname] + local glow = def and def.light_source + + self.object:set_properties({ + is_visible = true, + visual = "wielditem", + textures = {itemname}, + visual_size = {x = size, y = size}, + collisionbox = {-size, -0.21, -size, + size, coll_height, size}, + selectionbox = {-size, -size, -size, size, size, size}, + automatic_rotate = math.pi * 0.5 * 0.2 / size, + wield_item = self.itemstring, + glow = glow, + }) + + end, + + get_staticdata = function(self) + return minetest.serialize({ + itemstring = self.itemstring, + age = self.age, + dropped_by = self.dropped_by, + collection_timer = self.collection_timer, + collectable = self.collectable, + try_timer = self.try_timer, + collected = self.collected, + delete_timer = self.delete_timer, + collector = self.collector, + }) + end, + + on_activate = function(self, staticdata, dtime_s) + if string.sub(staticdata, 1, string.len("return")) == "return" then + local data = minetest.deserialize(staticdata) + if data and type(data) == "table" then + self.itemstring = data.itemstring + self.age = (data.age or 0) + dtime_s + self.dropped_by = data.dropped_by + + self.collection_timer = data.collection_timer + self.collectable = data.collectable + self.try_timer = data.try_timer + self.collected = data.collected + self.delete_timer = data.delete_timer + self.collector = data.collector + --print("restored timer: "..self.collection_timer) + end + else + self.itemstring = staticdata + + local x=math.random(-2,2)*math.random() + local y=math.random(2,5) + local z=math.random(-2,2)*math.random() + self.object:setvelocity(vector.new(x,y,z)) + -- print(self.collection_timer) + end + self.object:set_armor_groups({immortal = 1}) + self.object:set_velocity({x = 0, y = 2, z = 0}) + self.object:set_acceleration({x = 0, y = -gravity, z = 0}) + self:set_item() + end, + + enable_physics = function(self) + if not self.physical_state then + self.physical_state = true + self.object:set_properties({physical = true}) + self.object:set_velocity({x=0, y=0, z=0}) + self.object:set_acceleration({x=0, y=-gravity, z=0}) + end + end, + + disable_physics = function(self) + if self.physical_state then + self.physical_state = false + self.object:set_properties({physical = false}) + self.object:set_velocity({x=0, y=0, z=0}) + self.object:set_acceleration({x=0, y=0, z=0}) + end + end, + on_step = function(self, dtime) + --if item set to be collected then only execute go to player + if self.collected == true then + if not self.collector then + self.collected = false + return + end + local collector = minetest.get_player_by_name(self.collector) + if collector then + self.object:setacceleration(vector.new(0,0,0)) + self.disable_physics(self) + --get the variables + local pos = self.object:getpos() + local pos2 = collector:getpos() + local player_velocity = collector:get_player_velocity() + pos2.y = pos2.y + self.collection_height + + local direction = vector.normalize(vector.subtract(pos2,pos)) + local distance = vector.distance(pos2,pos) + + + --remove if too far away + if distance > self.radius then + distance = 0 + end + + local multiplier = (self.radius*5) - distance + local velocity = vector.multiply(direction,multiplier) + + local velocity = vector.add(player_velocity,velocity) + + self.object:setvelocity(velocity) + + if distance < 0.2 then + self.object:remove() + end + + + --self.delete_timer = self.delete_timer + dtime + --this is where the item gets removed from world + --if self.delete_timer > 1 then + -- self.object:remove() + --end + return + else + print(self.collector.." does not exist") + self.object:remove() + end + end + + --allow entity to be collected after timer + if self.collectable == false and self.collection_timer >= self.collection_timer_goal then + self.collectable = true + elseif self.collectable == false then + self.collection_timer = self.collection_timer + dtime + end + + self.age = self.age + dtime + if self.time_to_live > 0 and self.age > self.time_to_live then + self.itemstring = "" + self.object:remove() + return + end + + local pos = self.object:get_pos() + local node = minetest.get_node_or_nil({ + x = pos.x, + y = pos.y + self.object:get_properties().collisionbox[2] - 0.05, + z = pos.z + }) + + + -- Remove nodes in 'ignore' + if node and node.name == "ignore" then + self.itemstring = "" + self.object:remove() + return + end + + --burn inside fire nodes + local node_inside = minetest.get_node_or_nil(pos) + if node_inside and (node_inside.name == "fire:fire" or node_inside.name == "nether:lava" or node_inside.name == "nether:lavaflow" or node_inside.name == "main:lava" or node_inside.name == "main:lavaflow") then + minetest.add_particlespawner({ + amount = 6, + time = 0.001, + minpos = pos, + maxpos = pos, + minvel = vector.new(-1,0.5,-1), + maxvel = vector.new(1,1,1), + minacc = {x=0, y=1, z=0}, + maxacc = {x=0, y=2, z=0}, + minexptime = 1.1, + maxexptime = 1.5, + minsize = 1, + maxsize = 2, + collisiondetection = false, + vertical = false, + texture = "smoke.png", + }) + minetest.sound_play("fire_extinguish", {pos=pos,gain=0.3,pitch=math.random(80,100)/100}) + self.itemstring = "" + self.object:remove() + return + end + + + local is_stuck = false + local snode = minetest.get_node_or_nil(pos) + if snode then + local sdef = minetest.registered_nodes[snode.name] or {} + is_stuck = (sdef.walkable == nil or sdef.walkable == true) + and (sdef.collision_box == nil or sdef.collision_box.type == "regular") + and (sdef.node_box == nil or sdef.node_box.type == "regular") + end + + -- Push item out when stuck inside solid node + if is_stuck then + local shootdir + local order = { + {x=1, y=0, z=0}, {x=-1, y=0, z= 0}, + {x=0, y=0, z=1}, {x= 0, y=0, z=-1}, + } + + -- Check which one of the 4 sides is free + for o = 1, #order do + local cnode = minetest.get_node(vector.add(pos, order[o])).name + local cdef = minetest.registered_nodes[cnode] or {} + if cnode ~= "ignore" and cdef.walkable == false then + shootdir = order[o] + break + end + end + -- If none of the 4 sides is free, check upwards + if not shootdir then + shootdir = {x=0, y=1, z=0} + local cnode = minetest.get_node(vector.add(pos, shootdir)).name + if cnode == "ignore" then + shootdir = nil -- Do not push into ignore + end + end + + if shootdir then + -- Set new item moving speed accordingly + local newv = vector.multiply(shootdir, 3) + self:disable_physics() + self.object:set_velocity(newv) + + self.force_out = newv + self.force_out_start = vector.round(pos) + return + end + elseif self.force_out then + -- This code runs after the entity got a push from the above code. + -- It makes sure the entity is entirely outside the solid node + local c = self.object:get_properties().collisionbox + local s = self.force_out_start + local f = self.force_out + local ok = (f.x > 0 and pos.x + c[1] > s.x + 0.5) or + (f.y > 0 and pos.y + c[2] > s.y + 0.5) or + (f.z > 0 and pos.z + c[3] > s.z + 0.5) or + (f.x < 0 and pos.x + c[4] < s.x - 0.5) or + (f.z < 0 and pos.z + c[6] < s.z - 0.5) + if ok then + -- Item was successfully forced out + self.force_out = nil + self:enable_physics() + end + end + + if not self.physical_state then + return -- Don't do anything + end + + -- Slide on slippery nodes + local vel = self.object:get_velocity() + local def = node and minetest.registered_nodes[node.name] + local is_moving = (def and not def.walkable) or + vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0 + local is_slippery = false + + if def and def.walkable then + local slippery = minetest.get_item_group(node.name, "slippery") + is_slippery = slippery ~= 0 + if is_slippery and (math.abs(vel.x) > 0.2 or math.abs(vel.z) > 0.2) then + -- Horizontal deceleration + local slip_factor = 4.0 / (slippery + 4) + self.object:set_acceleration({ + x = -vel.x * slip_factor, + y = 0, + z = -vel.z * slip_factor + }) + elseif vel.y == 0 then + is_moving = false + --[[ + local collisionbox = self.object:get_properties().collisionbox + local move_y = collisionbox[2] + if self.move_up == nil then + self.move_up = true + end + local addition = 0 + if self.move_up == true then + move_y = move_y + (dtime/10) + addition = (dtime/8) + if move_y > -0.21 then + self.move_up = false + end + elseif self.move_up == false then + move_y = move_y - (dtime/10) + if move_y < -0.5 then + self.move_up = true + end + end + collisionbox[2] = move_y + self.object:set_properties({collisionbox=collisionbox,physical = true}) + ]]-- + end + end + + if self.moving_state == is_moving and self.slippery_state == is_slippery then + -- Do not update anything until the moving state changes + return + end + + self.moving_state = is_moving + self.slippery_state = is_slippery + + if is_moving then + self.object:set_acceleration({x = 0, y = -gravity, z = 0}) + else + self.object:set_acceleration({x = 0, y = 0, z = 0}) + self.object:set_velocity({x = 0, y = 0, z = 0}) + end + end, +}) diff --git a/mods/itemhandling/magnet.lua b/mods/itemhandling/magnet.lua new file mode 100644 index 0000000..cfaa6b7 --- /dev/null +++ b/mods/itemhandling/magnet.lua @@ -0,0 +1,48 @@ +--The item collection magnet +--Item collection +minetest.register_globalstep(function(dtime) + --collection + for _,player in ipairs(minetest.get_connected_players()) do + --don't magnetize to dead players + if player:get_hp() > 0 then + local meta = player:get_meta() + local experience_collection_buffer = meta:get_float("experience_collection_buffer") + if experience_collection_buffer > 0 then + experience_collection_buffer = experience_collection_buffer - dtime + if experience_collection_buffer < 0 then + experience_collection_buffer = 0 + end + end + + meta:set_float("experience_collection_buffer", experience_collection_buffer) + + local pos = player:get_pos() + local inv = player:get_inventory() + --radial detection + for _,object in ipairs(minetest.get_objects_inside_radius({x=pos.x,y=pos.y+0.5,z=pos.z}, 2)) do + if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" then + local pos2 = object:getpos() + local diff = vector.subtract(pos2,pos).y + if diff >= 0 and inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then + if object:get_luaentity().collectable == true and object:get_luaentity().collected == false then + minetest.sound_play("pickup", { + to_player = player:get_player_name(), + gain = 0.4, + pitch = math.random(60,100)/100 + }) + inv:add_item("main", ItemStack(object:get_luaentity().itemstring)) + object:get_luaentity().collector = player:get_player_name() + object:get_luaentity().collected = true + -- print("Set flag at item: "..dump(object:getpos())) + --object:moveto({x=pos.x,y=pos.y+eye_height,z=pos.z,continuous=true}) + + end + end + elseif not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "experience:orb" then + object:get_luaentity().collector = player:get_player_name() + object:get_luaentity().collected = true + end + end + end + end +end) diff --git a/mods/itemhandling/mod.conf b/mods/itemhandling/mod.conf new file mode 100644 index 0000000..8a87a17 --- /dev/null +++ b/mods/itemhandling/mod.conf @@ -0,0 +1 @@ +name=itemhandling diff --git a/mods/itemhandling/sounds/pickup.ogg b/mods/itemhandling/sounds/pickup.ogg new file mode 100644 index 0000000..6ca412d Binary files /dev/null and b/mods/itemhandling/sounds/pickup.ogg differ diff --git a/mods/jonez/.luacheckrc b/mods/jonez/.luacheckrc new file mode 100644 index 0000000..f91380d --- /dev/null +++ b/mods/jonez/.luacheckrc @@ -0,0 +1,20 @@ +unused_args = false +allow_defined_top = true + +globals = { + "minetest", + "stairs", + "xpanes" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/jonez/LICENSE.MD b/mods/jonez/LICENSE.MD new file mode 100644 index 0000000..39b31fc --- /dev/null +++ b/mods/jonez/LICENSE.MD @@ -0,0 +1,16 @@ +#LICENSES + +## Source Code + +- GPLv3 + +## Textures + +- Textures made by runs +- CC BY-SA 4.0 + +## Sounds + +- File: jonez_carve.ogg +- Author: runs +- License: CC BY-SA 4.0 diff --git a/mods/jonez/chisel.lua b/mods/jonez/chisel.lua new file mode 100644 index 0000000..d8d8f0e --- /dev/null +++ b/mods/jonez/chisel.lua @@ -0,0 +1,162 @@ +chisel = {} +local S = minetest.get_translator(minetest.get_current_modname()) + +chisel.chiselable = {} +chisel.group_style_index = {} +chisel.group_style_nodes = {} +chisel.player_copied_style = {} + +chisel.register_chiselable = function(node_name, group_name, style) + chisel.chiselable[ node_name ] = {} + chisel.chiselable[ node_name ].group_name = group_name + chisel.chiselable[ node_name ].style = style + + if not chisel.group_style_nodes[ group_name ] then + chisel.group_style_nodes[ group_name ] = {} + end + + chisel.group_style_nodes[ group_name ][ style ] = node_name +end + +chisel.register_chiselable_stair_and_slab = function(node_subname, group_subname, style) + chisel.register_chiselable("stairs:stair_" .. node_subname, "stairs:stair_" .. group_subname, style) + chisel.register_chiselable("stairs:stair_inner_" .. node_subname, "stairs:stair_inner_" .. group_subname, style) + chisel.register_chiselable("stairs:stair_outer_" .. node_subname, "stairs:stair_outer_" .. group_subname, style) + chisel.register_chiselable("stairs:slab_" .. node_subname, "stairs:slab_" .. group_subname, style) +end + +local function chisel_interact(player, pointed_thing, is_right_click) + if pointed_thing.type ~= "node" then return end + + local pos = pointed_thing.under + local is_sneak = player and player:get_player_control().sneak or false + local player_name = player and player:get_player_name() + + -- A true player is required + if not player_name then return end + + -- Check for node protection + if minetest.is_protected(pos, player_name) then + minetest.chat_send_player(player_name, "You're not authorized to alter nodes in this area") + minetest.record_protection_violation(pos, player_name) + return + end + + -- Retrieve group info and styles + local node = minetest.get_node(pos) + local node_name = node.name + + if not chisel.chiselable[ node_name ] then + minetest.chat_send_player(player_name, "Not chiselable") + return + end + + local group_name = chisel.chiselable[ node_name ].group_name + local style = chisel.chiselable[ node_name ].style + local group = chisel.group_style_nodes[ group_name ] + local new_style , new_node_name + + -- Now branch on the four user-input cases + if is_right_click then + if is_sneak then + -- Copy style + chisel.player_copied_style[ player_name ] = style + minetest.chat_send_player(player_name, "Chisel style " .. style .. " copied") + return + else + -- Paste style + new_style = chisel.player_copied_style[ player_name ] + if not new_style then + minetest.chat_send_player(player_name, "No chisel style copied yet, use sneak + right-click to copy a style") + return + end + + -- Already the correct style, exit now! + if new_style == style then return end + + new_node_name = group[ new_style ] + if not new_node_name then + minetest.chat_send_player(player_name, "Chisel style " .. new_style .. + " is not supported by this chisel group " .. group_name) + return + end + end + else + if is_sneak then + -- Backward cycle mode + for k,v in pairs(group) do + if v == node_name then break end + new_style = k + new_node_name = v + end + + if new_node_name == nil then + -- Not found? Go for the last element + for k,v in pairs(group) do + new_style = k + new_node_name = v + end + end + else + -- Forward cycle mode + new_style , new_node_name = next(group,style) + if new_node_name == nil then + new_style , new_node_name = next(group) + end + end + end + + -- Check if rotation could be preserved + local nodedef = minetest.registered_nodes[node_name] + local new_nodedef = minetest.registered_nodes[new_node_name] + local rotation , new_rotation + + if nodedef and new_nodedef then + if ( nodedef.paramtype2 == "facedir" or nodedef.paramtype2 == "colorfacedir" ) + and( new_nodedef.paramtype2 == "facedir" or new_nodedef.paramtype2 == "colorfacedir" ) then + rotation = node.param2 % 32 --rotation are on the last 5 digits + end + end + + -- Set the new node + minetest.set_node(pos, {name= new_node_name}) + local new_node = minetest.get_node(pos) + + -- Copy rotation if needed! + if rotation ~= nil then + new_rotation = new_node.param2 % 32 + + if new_rotation ~= rotation then + new_node.param2 = new_node.param2 - new_rotation + rotation + minetest.swap_node(pos, new_node) + end + end + + minetest.sound_play("jonez_carve", {pos = pos, gain = 0.7, max_hear_distance = 5}) +end + +--The chisel to carve the marble +minetest.register_craftitem("jonez:chisel", { + description = S("Chisel for Marble"), + inventory_image = "jonez_chisel.png", + wield_image = "jonez_chisel.png^[transformR180", + on_use = function(itemstack, player, pointed_thing) + chisel_interact(player, pointed_thing, false) + return itemstack + end, + on_place = function(itemstack, player, pointed_thing) + chisel_interact(player, pointed_thing, true) + return itemstack + end, +}) + +minetest.register_craft({ + type = "shaped", + output = "jonez:chisel", + recipe = { + {"", "", "default:diamond"}, + {"", "default:steel_ingot", ""}, + {"default:stick", "", ""}, + } +}) + diff --git a/mods/jonez/init.lua b/mods/jonez/init.lua new file mode 100644 index 0000000..4188400 --- /dev/null +++ b/mods/jonez/init.lua @@ -0,0 +1,515 @@ +--Variables +local mod_path = minetest.get_modpath(minetest.get_current_modname()) +dofile(mod_path .. "/chisel.lua") +local S = minetest.get_translator(minetest.get_current_modname()) + +local function firstToUpper(str) + return (str:gsub("^%l", string.upper)) +end + +chisel.register_chiselable("jonez:marble", "jonez:marble", "raw" ) +minetest.register_node("jonez:marble", { + description = S("Ancient Marble"), + tiles = {"jonez_marble.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +chisel.register_chiselable("jonez:marble_polished", "jonez:marble", "polished" ) +minetest.register_node("jonez:marble_polished", { + description = S("Ancient Polished Marble"), + tiles = {"jonez_marble_polished.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +chisel.register_chiselable_stair_and_slab("marble", "marble", "raw" ) +stairs.register_stair_and_slab( + "marble", + "jonez:marble", + {cracky = 2, stone = 1}, + {"jonez_marble.png"}, + S("Ancient Marble Stair"), + S("Ancient Marble Slab"), + default.node_sound_stone_defaults() +) + +chisel.register_chiselable_stair_and_slab("marble_brick", "marble_brick", "raw" ) +stairs.register_stair_and_slab( + "marble_brick", + "jonez:marble_brick", + {cracky = 2, stone = 1}, + {"jonez_marble_brick.png"}, + S("Ancient Marble Brick Stair"), + S("Ancient Marble Brick Slab"), + default.node_sound_stone_defaults() +) + +chisel.register_chiselable("jonez:marble_brick", "jonez:marble_brick", "raw" ) +minetest.register_node("jonez:marble_brick", { + description = S("Ancient Marble Brick"), + tiles = {"jonez_marble_brick.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +chisel.register_chiselable("jonez:marble_brick_polished", "jonez:marble_brick", "polished" ) +minetest.register_node("jonez:marble_brick_polished", { + description = S("Ancient Marble Polished Brick"), + tiles = {"jonez_marble_brick_polished.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +chisel.register_chiselable_stair_and_slab("marble_polished", "marble", "polished" ) +stairs.register_stair_and_slab( + "marble_polished", + "jonez:marble_polished", + {cracky = 2, stone = 1}, + {"jonez_marble_polished.png"}, + S("Ancient Polished Marble Stair"), + S("Ancient Polished Marble Slab"), + default.node_sound_stone_defaults() +) + +chisel.register_chiselable_stair_and_slab("marble_brick_polished", "marble_brick", "polished" ) +stairs.register_stair_and_slab( + "marble_brick_polished", + "jonez:marble_brick_polished", + {cracky = 2, stone = 1}, + {"jonez_marble_brick_polished.png"}, + S("Ancient Polished Marble Brick Stair"), + S("Ancient Polished Marble Brick Slab"), + default.node_sound_stone_defaults() +) + +minetest.register_craft({ + output = 'jonez:marble_brick', + recipe = { + {'jonez:marble', 'jonez:marble'}, + {'jonez:marble', 'jonez:marble'}, + } +}) + +minetest.register_craft({ + output = 'jonez:marble_brick_polished', + recipe = { + {'jonez:marble_polished', 'jonez:marble_polished'}, + {'jonez:marble_polished', 'jonez:marble_polished'}, + } +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "jonez:marble", + wherein = "default:stone", + clust_scarcity = 7*7*7, + clust_num_ores = 5, + clust_size = 3, + height_min = -512, + height_max = -65, + flags = "absheight", +}) + +local styles = { + "roman", + "greek", + "germanic", + "tuscan", + "romanic", + "nabataean", + "artdeco", + "minoan", + "attic", + "versailles", + "medieval", + "gothic", + "pompeiian", + "corinthian", + "carthaginian", + "industrial", + "romanesque", + "cimmerian" +} + +-- The Crafting of the Greek Set + +minetest.register_craft({ + output = 'jonez:greek_shaft 3', + type = "shaped", + recipe = { + {'', 'jonez:marble_polished', ''}, + {'', 'jonez:marble_polished', ''}, + {'', 'jonez:marble_polished', ''}, + }, +}) + +minetest.register_craft({ + output = 'jonez:greek_architrave 3', + type = "shaped", + recipe = { + {'', '', ''}, + {'', '', ''}, + {'stairs:slab_marble_polished', 'stairs:slab_marble_polished', 'stairs:slab_marble_polished'}, + }, +}) + +minetest.register_craft({ + output = 'jonez:greek_base 2', + type = "shaped", + recipe = { + {'', '', ''}, + {'', 'jonez:marble_polished', ''}, + {'', 'stairs:slab_marble_polished', ''}, + }, +}) + +minetest.register_craft({ + output = 'jonez:greek_capital 2', + type = "shaped", + recipe = { + {'', '', ''}, + {'', 'stairs:slab_marble_polished', ''}, + {'', 'jonez:marble_polished', ''}, + }, +}) + +for i = 1, #styles do + + chisel.register_chiselable("jonez:"..styles[i].."_architrave", "jonez:architrave", styles[i] ) + minetest.register_node("jonez:"..styles[i].."_architrave", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Architrave"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_architrave.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + + chisel.register_chiselable("jonez:"..styles[i].."_capital", "jonez:capital", styles[i] ) + minetest.register_node("jonez:"..styles[i].."_capital", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Capital"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_capital.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + + chisel.register_chiselable("jonez:"..styles[i].."_shaft", "jonez:shaft", styles[i] ) + minetest.register_node("jonez:"..styles[i].."_shaft", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Shaft"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_shaft.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + + chisel.register_chiselable("jonez:"..styles[i].."_base", "jonez:base", styles[i] ) + minetest.register_node("jonez:"..styles[i].."_base", { + description = S("Ancient").." "..S(firstToUpper(styles[i])).." "..S("Base"), + tiles = {"jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_top_bottom.png", "jonez_"..styles[i].."_base.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) +end + +local vines = { + {name= "jonez:swedish_ivy", description= "Swedish Ivy", texture= "jonez_sweedish_ivy.png"}, + {name= "jonez:ruin_creeper", description= "Ruin Creeper", texture= "jonez_ruin_creeper.png"}, + {name= "jonez:ruin_vine", description= "Ruin Vine", texture= "jonez_ruin_vine.png"}, + {name= "jonez:climbing_rose", description= "Climbing Rose", texture= "jonez_climbing_rose.png"}, +} + +for i = 1, #vines do + minetest.register_node(vines[i].name, { + description = S(vines[i].description), + drawtype = "nodebox", + walkable = true, + paramtype = "light", + paramtype2 = "facedir", + tiles = {vines[i].texture}, + use_texture_alpha = true, + inventory_image = vines[i].texture, + wield_image = vines[i].texture, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 0.49, 0.5, 0.5, 0.5} + }, + groups = { + snappy = 2, flammable = 3, oddly_breakable_by_hand = 3, choppy = 2, carpet = 1, leafdecay = 3, leaves = 1 + }, + sounds = default.node_sound_leaves_defaults(), + }) +end + +local panels = { + {name= "jonez_panel_1", description= "Mosaic Glass Panel", textures={front= "jonez_panel_1.png", edge="jonez_panes_edge.png"}, + recipe = { + {"dye:blue", "dye:black", "dye:pink"}, + {"dye:red", "xpanes:pane_flat", "dye:green"}, + {"dye:yellow", "dye:black", "dye:orange"}, + } + }, + {name= "jonez_panel_2", description= "Blossom Glass Panel", textures={front="jonez_panel_2.png", edge="jonez_panes_edge.png"}, + recipe = { + {"dye:blue", "dye:red", "dye:green"}, + {"dye:yellow", "xpanes:pane_flat", "dye:yellow"}, + {"dye:green", "dye:red", "dye:orange"}, + } + }, + {name= "wrought_lattice_bottom", description= "Ancient Wrought Lattice (Bottom)", + textures={front="jonez_wrought_lattice_bottom.png", edge="jonez_panes_edge.png"}, + use_texture_alpha = true, + recipe = { + {'', '', ''}, + {'default:steel_ingot', 'default:tin_ingot', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:tin_ingot', 'default:steel_ingot'}, + } + }, + {name= "palace_window_top", description= "Palace Window (Top)", + textures={front="jonez_palace_window_top.png", edge="default_wood.png"}, + use_texture_alpha = true, + recipe = { + {'', 'xpanes:pane_flat', ''}, + {'', 'xpanes:pane_flat', ''}, + {'', '', ''}, + } + }, + {name= "palace_window_bottom", description= "Palace Window (Bottom)", + textures={front="jonez_palace_window_bottom.png", edge="default_wood.png"}, + use_texture_alpha = true, + recipe = { + {'', '', ''}, + {'', 'xpanes:pane_flat', ''}, + {'', 'xpanes:pane_flat', ''}, + } + }, +} + +for j=1, #panels do + xpanes.register_pane(panels[j].name, { + description = S(panels[j].description), + textures = {panels[j].textures.front, nil, panels[j].textures.edge}, + use_texture_alpha = panels[j].use_texture_alpha, + inventory_image = panels[j].textures.front, + wield_image = panels[j].textures.front, + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3}, + recipe = panels[j].recipe + }) +end + +local pavements= { + {name= "jonez:blossom_pavement", description= "Ancient Blossom Pavement", texture= "jonez_blossom_pavement.png", + recipe = { + {'', 'stairs:slab_marble', ''}, + {'stairs:slab_marble', 'stairs:slab_marble', 'stairs:slab_marble'}, + {'', 'stairs:slab_marble', ''}, + } + }, + {name= "jonez:tiled_pavement", description= "Ancient Tiled Pavement", texture= "jonez_tiled_pavement.png", + recipe = { + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', ''}, + {'', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', ''}, + } + }, + {name= "jonez:mosaic_pavement", description= "Ancient Mosaic Pavement", texture= "jonez_mosaic_pavement.png", + recipe = { + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + } + }, + {name= "jonez:diamond_pavement", description= "Ancient Diamond Pavement", texture= "jonez_diamond_pavement.png", + recipe = { + {'', 'stairs:slab_marble', ''}, + {'stairs:slab_marble', '', 'stairs:slab_marble'}, + {'', 'stairs:slab_marble', ''}, + } + }, + {name= "jonez:pebbled_pavement", description= "Ancient Pebbled Pavement", texture= "jonez_pebbled_pavement.png", + recipe = { + {'', 'stairs:slab_marble_brick_polished', ''}, + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished'}, + {'', 'stairs:slab_marble_brick_polished', ''}, + } + }, + {name= "jonez:pebbled_medieval_pavement", description= "Ancient Pebbled Medieval Pavement", texture= "jonez_pebbled_medieval_pavement.png", + recipe = { + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished', ''}, + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished'}, + {'', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished'}, + } + }, + {name= "jonez:pebbled_gothic_pavement", description= "Ancient Pebbled Gothic Pavement", texture= "jonez_pebbled_gothic_pavement.png", + recipe = { + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished', ''}, + {'', 'stairs:slab_marble_brick_polished', ''}, + {'', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished'}, + } + }, + {name= "jonez:pebbled_wall", description= "Ancient Pebbled Wall", texture= "jonez_pebbled_wall.png", + recipe = { + {'', 'stairs:slab_marble_brick_polished', ''}, + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick_polished'}, + {'', 'stairs:slab_marble_brick_polished', ''}, + } + }, + {name= "jonez:gothic_wall", description= "Ancient Gothic Wall", texture= "jonez_gothic_top_bottom.png", + recipe = { + {'', 'stairs:slab_marble_brick', ''}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'', 'stairs:slab_marble_brick', ''}, + } + }, + {name= "jonez:pompeiian_wall", description= "Ancient Pompeiian Wall", texture= "jonez_pompeiian_wall.png", + recipe = { + {'', 'stairs:slab_marble_brick_polished', ''}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + {'', 'stairs:slab_marble_brick_polished', ''}, + } + }, + {name= "jonez:pompeiian_pavement", description= "Ancient Pompeiian Pavement", texture= "jonez_pompeiian_pavement.png", + recipe = { + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + } + }, + {name= "jonez:pompeiian_path", description= "Ancient Pompeiian Path", texture= "jonez_pompeiian_path.png", amount = 4, + recipe = { + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished'}, + } + }, + {name= "jonez:carthaginian_pavement", description= "Carthaginian Pavement", texture= "jonez_carthaginian_pavement.png", amount = 4, + recipe = { + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + } + }, + {name= "jonez:carthaginian_wall", description= "Carthaginian Wall", texture= "jonez_carthaginian_wall.png", amount = 4, + recipe = { + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished'}, + {'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick'}, + {'stairs:slab_marble_brick_polished', 'stairs:slab_marble_brick', 'stairs:slab_marble_brick_polished'}, + } + }, +} + +for i = 1, #pavements do + minetest.register_node(pavements[i].name, { + description = S(pavements[i].description), + tiles = {pavements[i].texture}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), + }) + local amount + if pavements[i].amount then + amount = " ".. tostring(pavements[i].amount) + else + amount = "1" + end + minetest.register_craft({ + output = pavements[i].name .. amount, + type = 'shaped', + recipe = pavements[i].recipe, + }) +end + +minetest.register_node("jonez:wrought_lattice_top", { + description = S("Ancient Wrought Lattice (Top)"), + is_ground_content = true, + groups = {cracky=3}, + walkable = true, + sounds = default.node_sound_stone_defaults(), + paramtype = "light", + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.0, 0.5, 0.1875, 0.0}, + } + }, + tiles = { + nil, + nil, + nil, + nil, + "jonez_wrought_lattice_top.png", + "jonez_wrought_lattice_top.png" + }, + use_texture_alpha = true, +}) + +minetest.register_craft({ + output = 'jonez:wrought_lattice_top', + recipe = { + {'default:steel_ingot', 'default:tin_ingot', 'default:steel_ingot'}, + {'default:steel_ingot', 'default:tin_ingot', 'default:steel_ingot'}, + {'', '', ''}, + } +}) + +minetest.register_node("jonez:versailles_pavement", { + description = S("Versailles Pavement"), + tiles = {"jonez_versailles_pavement.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = 'jonez:versailles_pavement', + type = "shaped", + recipe = { + {'', '', ''}, + {'', 'stairs:slab_marble_brick', ''}, + {'stairs:slab_marble_brick', '', 'stairs:slab_marble_brick'}, + }, +}) + +minetest.register_node("jonez:versailles_tile", { + description = S("Versailles Tile"), + tiles = {"jonez_versailles_tile.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = 'jonez:versailles_tile 9', + type = "shapeless", + recipe = { + 'jonez:diamond_pavement', 'stairs:slab_marble_brick', 'jonez:diamond_pavement', + 'stairs:slab_marble_brick', 'jonez:diamond_pavement', 'stairs:slab_marble_brick', + 'jonez:diamond_pavement', 'stairs:slab_marble_brick', 'jonez:diamond_pavement', + }, +}) + +minetest.register_node("jonez:pompeiian_altar", { + description = S("Ancient Pompeiian Altar"), + tiles = {"jonez_pompeiian_top_bottom.png", "jonez_pompeiian_top_bottom.png", "jonez_pompeiian_altar.png"}, + is_ground_content = false, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = 'jonez:pompeiian_altar', + type = "shaped", + recipe = { + {'', '', ''}, + {'', 'stairs:slab_marble_brick_polished', ''}, + {'', 'jonez:marble_polished', ''}, + }, +}) diff --git a/mods/jonez/locale/jonez.es.tr b/mods/jonez/locale/jonez.es.tr new file mode 100644 index 0000000..08663f1 --- /dev/null +++ b/mods/jonez/locale/jonez.es.tr @@ -0,0 +1,62 @@ +# textdomain: jonez +Ancient Marble=Mármol antiguo +Chisel for Marble=Cincel para mármol +Ancient=Antiguo +Architrave=Arquitrabe +Capital=Capitel +Shaft=Fuste +Base=Base +Artdeco=Artdeco +Roman=Romano +Greek=Griego +Germanic=Germánico +Tuscan=Toscano +Romanic=Románico +Nabataean=Nabateo +Minoan=Minoico +Attic=Ático +Versailles=Versalles +Medieval=Medieval +Gothic=Gótico +Pompeiian=Pompeyano +Corinthian=Corintio +Carthaginian=Cartaginés +Industrial=Industrial +Romanesque=Romanisco +Cimmerian=Cimerio +Ancient Marble Stair=Escalera de mármol antiguo +Ancient Marble Slab=Losa de mármol antiguo +Ancient Marble Brick Stair=Escalera de ladrillo de mármol antiguo +Ancient Marble Brick Slab=Losa de ladrillo de mármol antiguo +Swedish Ivy=Planta del dinero +Ruin Creeper=Enredadera de ruina +Ruin Vine=Vid de ruina +Climbing Rose=Rosal trepador +Mosaic Glass Panel=Panel de mosaico +Blossom Glass Panel=Panel mosaico florido +Ancient Wrought Lattice (Bottom)=Enrejado forjado antiguo (inferior) +Ancient Wrought Lattice (Top)=Enrejado forjado antiguo (superior) +Ancient Blossom Pavement=Pavimento antiguo floreado +Ancient Tiled Pavement=Pavimento de baldosas antiguas +Ancient Mosaic Pavement=Pavimento de mosaico antiguo +Ancient Diamond Pavement=Pavimento de rombos antiguo +Ancient Pebbled Pavement=Pavimento de guijarros antiguo +Ancient Pebbled Medieval Pavement=Pavimento de guijarros medieval antiguo +Ancient Pebbled Gothic Pavement=Pavimento de guijarros gótico antiguo +Ancient Pebbled Wall=Muro de guijarros antiguo +Ancient Gothic Wall=Muro gótico antiguo +Ancient Polished Marble=Marmol pulido antiguo +Ancient Polished Marble Stair=Escalera de mármol pulido antiguo +Ancient Polished Marble Slab=Losa de mármol pulido antiguo +Ancient Polished Marble Brick Stair=Escalera de ladrillo de mármol pulido antiguo +Ancient Polished Marble Brick Slab=Losa de ladrillo de mármol pulido antiguo +Palace Window (Top)=Ventana palaciega (superior) +Palace Window (Bottom)=Ventana palaciega (inferior) +Versailles Pavement=Pavimento versallesco +Versailles Tile=Mosaico versallesco +Ancient Pompeiian Wall=Muro antiguo pompeyano +Ancient Pompeiian Pavement=Pavimento antiguo pompeyano +Ancient Pompeiian Path=Camino antiguo pompeyano +Ancient Pompeiian Altar=Altar antiguo pompeyano +Carthaginian Pavement=Pavimiento cartaginés +Carthaginian Wall=Pavimiento cartaginés diff --git a/mods/jonez/mod.conf b/mods/jonez/mod.conf new file mode 100644 index 0000000..f30964b --- /dev/null +++ b/mods/jonez/mod.conf @@ -0,0 +1,2 @@ +name = jonez +depends = stairs, xpanes diff --git a/mods/jonez/sounds/jonez_carve.ogg b/mods/jonez/sounds/jonez_carve.ogg new file mode 100644 index 0000000..33595e6 Binary files /dev/null and b/mods/jonez/sounds/jonez_carve.ogg differ diff --git a/mods/jonez/textures/jonez_artdeco_architrave.png b/mods/jonez/textures/jonez_artdeco_architrave.png new file mode 100644 index 0000000..67f0aac Binary files /dev/null and b/mods/jonez/textures/jonez_artdeco_architrave.png differ diff --git a/mods/jonez/textures/jonez_artdeco_base.png b/mods/jonez/textures/jonez_artdeco_base.png new file mode 100644 index 0000000..ec40284 Binary files /dev/null and b/mods/jonez/textures/jonez_artdeco_base.png differ diff --git a/mods/jonez/textures/jonez_artdeco_capital.png b/mods/jonez/textures/jonez_artdeco_capital.png new file mode 100644 index 0000000..0250c12 Binary files /dev/null and b/mods/jonez/textures/jonez_artdeco_capital.png differ diff --git a/mods/jonez/textures/jonez_artdeco_shaft.png b/mods/jonez/textures/jonez_artdeco_shaft.png new file mode 100644 index 0000000..33fdcca Binary files /dev/null and b/mods/jonez/textures/jonez_artdeco_shaft.png differ diff --git a/mods/jonez/textures/jonez_artdeco_top_bottom.png b/mods/jonez/textures/jonez_artdeco_top_bottom.png new file mode 100644 index 0000000..30f9ebc Binary files /dev/null and b/mods/jonez/textures/jonez_artdeco_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_attic_architrave.png b/mods/jonez/textures/jonez_attic_architrave.png new file mode 100644 index 0000000..3c6e601 Binary files /dev/null and b/mods/jonez/textures/jonez_attic_architrave.png differ diff --git a/mods/jonez/textures/jonez_attic_base.png b/mods/jonez/textures/jonez_attic_base.png new file mode 100644 index 0000000..7bba83a Binary files /dev/null and b/mods/jonez/textures/jonez_attic_base.png differ diff --git a/mods/jonez/textures/jonez_attic_capital.png b/mods/jonez/textures/jonez_attic_capital.png new file mode 100644 index 0000000..ca24a30 Binary files /dev/null and b/mods/jonez/textures/jonez_attic_capital.png differ diff --git a/mods/jonez/textures/jonez_attic_shaft.png b/mods/jonez/textures/jonez_attic_shaft.png new file mode 100644 index 0000000..affafcc Binary files /dev/null and b/mods/jonez/textures/jonez_attic_shaft.png differ diff --git a/mods/jonez/textures/jonez_attic_top_bottom.png b/mods/jonez/textures/jonez_attic_top_bottom.png new file mode 100644 index 0000000..c8bbfc5 Binary files /dev/null and b/mods/jonez/textures/jonez_attic_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_blossom_pavement.png b/mods/jonez/textures/jonez_blossom_pavement.png new file mode 100644 index 0000000..e05e8e7 Binary files /dev/null and b/mods/jonez/textures/jonez_blossom_pavement.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_architrave.png b/mods/jonez/textures/jonez_carthaginian_architrave.png new file mode 100644 index 0000000..e01dbaa Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_architrave.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_base.png b/mods/jonez/textures/jonez_carthaginian_base.png new file mode 100644 index 0000000..9a1ad5b Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_base.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_capital.png b/mods/jonez/textures/jonez_carthaginian_capital.png new file mode 100644 index 0000000..9110a34 Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_capital.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_pavement.png b/mods/jonez/textures/jonez_carthaginian_pavement.png new file mode 100644 index 0000000..fb1a6c0 Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_pavement.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_shaft.png b/mods/jonez/textures/jonez_carthaginian_shaft.png new file mode 100644 index 0000000..279d66a Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_shaft.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_top_bottom.png b/mods/jonez/textures/jonez_carthaginian_top_bottom.png new file mode 100644 index 0000000..121d6c5 Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_carthaginian_wall.png b/mods/jonez/textures/jonez_carthaginian_wall.png new file mode 100644 index 0000000..ed75543 Binary files /dev/null and b/mods/jonez/textures/jonez_carthaginian_wall.png differ diff --git a/mods/jonez/textures/jonez_chisel.png b/mods/jonez/textures/jonez_chisel.png new file mode 100644 index 0000000..2bd50c0 Binary files /dev/null and b/mods/jonez/textures/jonez_chisel.png differ diff --git a/mods/jonez/textures/jonez_cimmerian_architrave.png b/mods/jonez/textures/jonez_cimmerian_architrave.png new file mode 100644 index 0000000..3e4eb41 Binary files /dev/null and b/mods/jonez/textures/jonez_cimmerian_architrave.png differ diff --git a/mods/jonez/textures/jonez_cimmerian_base.png b/mods/jonez/textures/jonez_cimmerian_base.png new file mode 100644 index 0000000..5a54885 Binary files /dev/null and b/mods/jonez/textures/jonez_cimmerian_base.png differ diff --git a/mods/jonez/textures/jonez_cimmerian_capital.png b/mods/jonez/textures/jonez_cimmerian_capital.png new file mode 100644 index 0000000..18cdcc0 Binary files /dev/null and b/mods/jonez/textures/jonez_cimmerian_capital.png differ diff --git a/mods/jonez/textures/jonez_cimmerian_shaft.png b/mods/jonez/textures/jonez_cimmerian_shaft.png new file mode 100644 index 0000000..9deda7f Binary files /dev/null and b/mods/jonez/textures/jonez_cimmerian_shaft.png differ diff --git a/mods/jonez/textures/jonez_cimmerian_top_bottom.png b/mods/jonez/textures/jonez_cimmerian_top_bottom.png new file mode 100644 index 0000000..3078ae0 Binary files /dev/null and b/mods/jonez/textures/jonez_cimmerian_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_climbing_rose.png b/mods/jonez/textures/jonez_climbing_rose.png new file mode 100644 index 0000000..548f064 Binary files /dev/null and b/mods/jonez/textures/jonez_climbing_rose.png differ diff --git a/mods/jonez/textures/jonez_corinthian_architrave.png b/mods/jonez/textures/jonez_corinthian_architrave.png new file mode 100644 index 0000000..c5b4bf2 Binary files /dev/null and b/mods/jonez/textures/jonez_corinthian_architrave.png differ diff --git a/mods/jonez/textures/jonez_corinthian_base.png b/mods/jonez/textures/jonez_corinthian_base.png new file mode 100644 index 0000000..019268e Binary files /dev/null and b/mods/jonez/textures/jonez_corinthian_base.png differ diff --git a/mods/jonez/textures/jonez_corinthian_capital.png b/mods/jonez/textures/jonez_corinthian_capital.png new file mode 100644 index 0000000..2db53a5 Binary files /dev/null and b/mods/jonez/textures/jonez_corinthian_capital.png differ diff --git a/mods/jonez/textures/jonez_corinthian_shaft.png b/mods/jonez/textures/jonez_corinthian_shaft.png new file mode 100644 index 0000000..be0a7bf Binary files /dev/null and b/mods/jonez/textures/jonez_corinthian_shaft.png differ diff --git a/mods/jonez/textures/jonez_corinthian_top_bottom.png b/mods/jonez/textures/jonez_corinthian_top_bottom.png new file mode 100644 index 0000000..0c31d9e Binary files /dev/null and b/mods/jonez/textures/jonez_corinthian_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_diamond_pavement.png b/mods/jonez/textures/jonez_diamond_pavement.png new file mode 100644 index 0000000..a25cd7a Binary files /dev/null and b/mods/jonez/textures/jonez_diamond_pavement.png differ diff --git a/mods/jonez/textures/jonez_germanic_architrave.png b/mods/jonez/textures/jonez_germanic_architrave.png new file mode 100644 index 0000000..19f51de Binary files /dev/null and b/mods/jonez/textures/jonez_germanic_architrave.png differ diff --git a/mods/jonez/textures/jonez_germanic_base.png b/mods/jonez/textures/jonez_germanic_base.png new file mode 100644 index 0000000..6c0c7a8 Binary files /dev/null and b/mods/jonez/textures/jonez_germanic_base.png differ diff --git a/mods/jonez/textures/jonez_germanic_capital.png b/mods/jonez/textures/jonez_germanic_capital.png new file mode 100644 index 0000000..185013e Binary files /dev/null and b/mods/jonez/textures/jonez_germanic_capital.png differ diff --git a/mods/jonez/textures/jonez_germanic_shaft.png b/mods/jonez/textures/jonez_germanic_shaft.png new file mode 100644 index 0000000..7f29fdb Binary files /dev/null and b/mods/jonez/textures/jonez_germanic_shaft.png differ diff --git a/mods/jonez/textures/jonez_germanic_top_bottom.png b/mods/jonez/textures/jonez_germanic_top_bottom.png new file mode 100644 index 0000000..5f6c785 Binary files /dev/null and b/mods/jonez/textures/jonez_germanic_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_gothic_architrave.png b/mods/jonez/textures/jonez_gothic_architrave.png new file mode 100644 index 0000000..61f9bd7 Binary files /dev/null and b/mods/jonez/textures/jonez_gothic_architrave.png differ diff --git a/mods/jonez/textures/jonez_gothic_base.png b/mods/jonez/textures/jonez_gothic_base.png new file mode 100644 index 0000000..4dc68db Binary files /dev/null and b/mods/jonez/textures/jonez_gothic_base.png differ diff --git a/mods/jonez/textures/jonez_gothic_capital.png b/mods/jonez/textures/jonez_gothic_capital.png new file mode 100644 index 0000000..78d2428 Binary files /dev/null and b/mods/jonez/textures/jonez_gothic_capital.png differ diff --git a/mods/jonez/textures/jonez_gothic_shaft.png b/mods/jonez/textures/jonez_gothic_shaft.png new file mode 100644 index 0000000..5ccd140 Binary files /dev/null and b/mods/jonez/textures/jonez_gothic_shaft.png differ diff --git a/mods/jonez/textures/jonez_gothic_top_bottom.png b/mods/jonez/textures/jonez_gothic_top_bottom.png new file mode 100644 index 0000000..43bb5c5 Binary files /dev/null and b/mods/jonez/textures/jonez_gothic_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_greek_architrave.png b/mods/jonez/textures/jonez_greek_architrave.png new file mode 100644 index 0000000..e4a3c6f Binary files /dev/null and b/mods/jonez/textures/jonez_greek_architrave.png differ diff --git a/mods/jonez/textures/jonez_greek_base.png b/mods/jonez/textures/jonez_greek_base.png new file mode 100644 index 0000000..d407038 Binary files /dev/null and b/mods/jonez/textures/jonez_greek_base.png differ diff --git a/mods/jonez/textures/jonez_greek_capital.png b/mods/jonez/textures/jonez_greek_capital.png new file mode 100644 index 0000000..19214b1 Binary files /dev/null and b/mods/jonez/textures/jonez_greek_capital.png differ diff --git a/mods/jonez/textures/jonez_greek_shaft.png b/mods/jonez/textures/jonez_greek_shaft.png new file mode 100644 index 0000000..3cd7ecb Binary files /dev/null and b/mods/jonez/textures/jonez_greek_shaft.png differ diff --git a/mods/jonez/textures/jonez_greek_top_bottom.png b/mods/jonez/textures/jonez_greek_top_bottom.png new file mode 100644 index 0000000..f1e73a2 Binary files /dev/null and b/mods/jonez/textures/jonez_greek_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_industrial_architrave.png b/mods/jonez/textures/jonez_industrial_architrave.png new file mode 100644 index 0000000..16440ef Binary files /dev/null and b/mods/jonez/textures/jonez_industrial_architrave.png differ diff --git a/mods/jonez/textures/jonez_industrial_base.png b/mods/jonez/textures/jonez_industrial_base.png new file mode 100644 index 0000000..4124a7e Binary files /dev/null and b/mods/jonez/textures/jonez_industrial_base.png differ diff --git a/mods/jonez/textures/jonez_industrial_capital.png b/mods/jonez/textures/jonez_industrial_capital.png new file mode 100644 index 0000000..6b9d74f Binary files /dev/null and b/mods/jonez/textures/jonez_industrial_capital.png differ diff --git a/mods/jonez/textures/jonez_industrial_shaft.png b/mods/jonez/textures/jonez_industrial_shaft.png new file mode 100644 index 0000000..d71ff49 Binary files /dev/null and b/mods/jonez/textures/jonez_industrial_shaft.png differ diff --git a/mods/jonez/textures/jonez_industrial_top_bottom.png b/mods/jonez/textures/jonez_industrial_top_bottom.png new file mode 100644 index 0000000..c2ab807 Binary files /dev/null and b/mods/jonez/textures/jonez_industrial_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_marble.png b/mods/jonez/textures/jonez_marble.png new file mode 100644 index 0000000..2164805 Binary files /dev/null and b/mods/jonez/textures/jonez_marble.png differ diff --git a/mods/jonez/textures/jonez_marble_brick.png b/mods/jonez/textures/jonez_marble_brick.png new file mode 100644 index 0000000..88bb388 Binary files /dev/null and b/mods/jonez/textures/jonez_marble_brick.png differ diff --git a/mods/jonez/textures/jonez_marble_brick_polished.png b/mods/jonez/textures/jonez_marble_brick_polished.png new file mode 100644 index 0000000..293a15c Binary files /dev/null and b/mods/jonez/textures/jonez_marble_brick_polished.png differ diff --git a/mods/jonez/textures/jonez_marble_polished.png b/mods/jonez/textures/jonez_marble_polished.png new file mode 100644 index 0000000..c18f1c4 Binary files /dev/null and b/mods/jonez/textures/jonez_marble_polished.png differ diff --git a/mods/jonez/textures/jonez_medieval_architrave.png b/mods/jonez/textures/jonez_medieval_architrave.png new file mode 100644 index 0000000..8f60a85 Binary files /dev/null and b/mods/jonez/textures/jonez_medieval_architrave.png differ diff --git a/mods/jonez/textures/jonez_medieval_base.png b/mods/jonez/textures/jonez_medieval_base.png new file mode 100644 index 0000000..1e80d33 Binary files /dev/null and b/mods/jonez/textures/jonez_medieval_base.png differ diff --git a/mods/jonez/textures/jonez_medieval_capital.png b/mods/jonez/textures/jonez_medieval_capital.png new file mode 100644 index 0000000..391b9ee Binary files /dev/null and b/mods/jonez/textures/jonez_medieval_capital.png differ diff --git a/mods/jonez/textures/jonez_medieval_shaft.png b/mods/jonez/textures/jonez_medieval_shaft.png new file mode 100644 index 0000000..adb73a8 Binary files /dev/null and b/mods/jonez/textures/jonez_medieval_shaft.png differ diff --git a/mods/jonez/textures/jonez_medieval_top_bottom.png b/mods/jonez/textures/jonez_medieval_top_bottom.png new file mode 100644 index 0000000..7af35f5 Binary files /dev/null and b/mods/jonez/textures/jonez_medieval_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_minoan_architrave.png b/mods/jonez/textures/jonez_minoan_architrave.png new file mode 100644 index 0000000..c417f8d Binary files /dev/null and b/mods/jonez/textures/jonez_minoan_architrave.png differ diff --git a/mods/jonez/textures/jonez_minoan_base.png b/mods/jonez/textures/jonez_minoan_base.png new file mode 100644 index 0000000..725bb0f Binary files /dev/null and b/mods/jonez/textures/jonez_minoan_base.png differ diff --git a/mods/jonez/textures/jonez_minoan_capital.png b/mods/jonez/textures/jonez_minoan_capital.png new file mode 100644 index 0000000..ce6c300 Binary files /dev/null and b/mods/jonez/textures/jonez_minoan_capital.png differ diff --git a/mods/jonez/textures/jonez_minoan_shaft.png b/mods/jonez/textures/jonez_minoan_shaft.png new file mode 100644 index 0000000..2d6678d Binary files /dev/null and b/mods/jonez/textures/jonez_minoan_shaft.png differ diff --git a/mods/jonez/textures/jonez_minoan_top_bottom.png b/mods/jonez/textures/jonez_minoan_top_bottom.png new file mode 100644 index 0000000..c0448bd Binary files /dev/null and b/mods/jonez/textures/jonez_minoan_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_mosaic_pavement.png b/mods/jonez/textures/jonez_mosaic_pavement.png new file mode 100644 index 0000000..9630905 Binary files /dev/null and b/mods/jonez/textures/jonez_mosaic_pavement.png differ diff --git a/mods/jonez/textures/jonez_nabataean_architrave.png b/mods/jonez/textures/jonez_nabataean_architrave.png new file mode 100644 index 0000000..ee6e819 Binary files /dev/null and b/mods/jonez/textures/jonez_nabataean_architrave.png differ diff --git a/mods/jonez/textures/jonez_nabataean_base.png b/mods/jonez/textures/jonez_nabataean_base.png new file mode 100644 index 0000000..387d3df Binary files /dev/null and b/mods/jonez/textures/jonez_nabataean_base.png differ diff --git a/mods/jonez/textures/jonez_nabataean_capital.png b/mods/jonez/textures/jonez_nabataean_capital.png new file mode 100644 index 0000000..791f0bf Binary files /dev/null and b/mods/jonez/textures/jonez_nabataean_capital.png differ diff --git a/mods/jonez/textures/jonez_nabataean_shaft.png b/mods/jonez/textures/jonez_nabataean_shaft.png new file mode 100644 index 0000000..df503c3 Binary files /dev/null and b/mods/jonez/textures/jonez_nabataean_shaft.png differ diff --git a/mods/jonez/textures/jonez_nabataean_top_bottom.png b/mods/jonez/textures/jonez_nabataean_top_bottom.png new file mode 100644 index 0000000..ae18a8e Binary files /dev/null and b/mods/jonez/textures/jonez_nabataean_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_palace_window_bottom.png b/mods/jonez/textures/jonez_palace_window_bottom.png new file mode 100644 index 0000000..c33e541 Binary files /dev/null and b/mods/jonez/textures/jonez_palace_window_bottom.png differ diff --git a/mods/jonez/textures/jonez_palace_window_top.png b/mods/jonez/textures/jonez_palace_window_top.png new file mode 100644 index 0000000..24b2829 Binary files /dev/null and b/mods/jonez/textures/jonez_palace_window_top.png differ diff --git a/mods/jonez/textures/jonez_panel_1.png b/mods/jonez/textures/jonez_panel_1.png new file mode 100644 index 0000000..fe98f0c Binary files /dev/null and b/mods/jonez/textures/jonez_panel_1.png differ diff --git a/mods/jonez/textures/jonez_panel_2.png b/mods/jonez/textures/jonez_panel_2.png new file mode 100644 index 0000000..2626b80 Binary files /dev/null and b/mods/jonez/textures/jonez_panel_2.png differ diff --git a/mods/jonez/textures/jonez_panes_edge.png b/mods/jonez/textures/jonez_panes_edge.png new file mode 100644 index 0000000..6c567bb Binary files /dev/null and b/mods/jonez/textures/jonez_panes_edge.png differ diff --git a/mods/jonez/textures/jonez_pebbled_gothic_pavement.png b/mods/jonez/textures/jonez_pebbled_gothic_pavement.png new file mode 100644 index 0000000..f9e2985 Binary files /dev/null and b/mods/jonez/textures/jonez_pebbled_gothic_pavement.png differ diff --git a/mods/jonez/textures/jonez_pebbled_low_wall_right_left.png b/mods/jonez/textures/jonez_pebbled_low_wall_right_left.png new file mode 100644 index 0000000..9e80491 Binary files /dev/null and b/mods/jonez/textures/jonez_pebbled_low_wall_right_left.png differ diff --git a/mods/jonez/textures/jonez_pebbled_low_wall_top_bottom.png b/mods/jonez/textures/jonez_pebbled_low_wall_top_bottom.png new file mode 100644 index 0000000..899b421 Binary files /dev/null and b/mods/jonez/textures/jonez_pebbled_low_wall_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_pebbled_medieval_pavement.png b/mods/jonez/textures/jonez_pebbled_medieval_pavement.png new file mode 100644 index 0000000..f5d6d72 Binary files /dev/null and b/mods/jonez/textures/jonez_pebbled_medieval_pavement.png differ diff --git a/mods/jonez/textures/jonez_pebbled_pavement.png b/mods/jonez/textures/jonez_pebbled_pavement.png new file mode 100644 index 0000000..31225c9 Binary files /dev/null and b/mods/jonez/textures/jonez_pebbled_pavement.png differ diff --git a/mods/jonez/textures/jonez_pebbled_wall.png b/mods/jonez/textures/jonez_pebbled_wall.png new file mode 100644 index 0000000..fa5ece1 Binary files /dev/null and b/mods/jonez/textures/jonez_pebbled_wall.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_altar.png b/mods/jonez/textures/jonez_pompeiian_altar.png new file mode 100644 index 0000000..6234387 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_altar.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_architrave.png b/mods/jonez/textures/jonez_pompeiian_architrave.png new file mode 100644 index 0000000..4731b34 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_architrave.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_base.png b/mods/jonez/textures/jonez_pompeiian_base.png new file mode 100644 index 0000000..0588ce3 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_base.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_capital.png b/mods/jonez/textures/jonez_pompeiian_capital.png new file mode 100644 index 0000000..e954fbc Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_capital.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_path.png b/mods/jonez/textures/jonez_pompeiian_path.png new file mode 100644 index 0000000..ebec373 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_path.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_pavement.png b/mods/jonez/textures/jonez_pompeiian_pavement.png new file mode 100644 index 0000000..bcd1f30 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_pavement.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_shaft.png b/mods/jonez/textures/jonez_pompeiian_shaft.png new file mode 100644 index 0000000..e716924 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_shaft.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_top_bottom.png b/mods/jonez/textures/jonez_pompeiian_top_bottom.png new file mode 100644 index 0000000..e706f55 Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_pompeiian_wall.png b/mods/jonez/textures/jonez_pompeiian_wall.png new file mode 100644 index 0000000..7a5142a Binary files /dev/null and b/mods/jonez/textures/jonez_pompeiian_wall.png differ diff --git a/mods/jonez/textures/jonez_roman_architrave.png b/mods/jonez/textures/jonez_roman_architrave.png new file mode 100644 index 0000000..eaaff3a Binary files /dev/null and b/mods/jonez/textures/jonez_roman_architrave.png differ diff --git a/mods/jonez/textures/jonez_roman_base.png b/mods/jonez/textures/jonez_roman_base.png new file mode 100644 index 0000000..786e29d Binary files /dev/null and b/mods/jonez/textures/jonez_roman_base.png differ diff --git a/mods/jonez/textures/jonez_roman_capital.png b/mods/jonez/textures/jonez_roman_capital.png new file mode 100644 index 0000000..c715df0 Binary files /dev/null and b/mods/jonez/textures/jonez_roman_capital.png differ diff --git a/mods/jonez/textures/jonez_roman_shaft.png b/mods/jonez/textures/jonez_roman_shaft.png new file mode 100644 index 0000000..42a5311 Binary files /dev/null and b/mods/jonez/textures/jonez_roman_shaft.png differ diff --git a/mods/jonez/textures/jonez_roman_top_bottom.png b/mods/jonez/textures/jonez_roman_top_bottom.png new file mode 100644 index 0000000..ec3d62f Binary files /dev/null and b/mods/jonez/textures/jonez_roman_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_romanesque_architrave.png b/mods/jonez/textures/jonez_romanesque_architrave.png new file mode 100644 index 0000000..64df464 Binary files /dev/null and b/mods/jonez/textures/jonez_romanesque_architrave.png differ diff --git a/mods/jonez/textures/jonez_romanesque_base.png b/mods/jonez/textures/jonez_romanesque_base.png new file mode 100644 index 0000000..c2cb86e Binary files /dev/null and b/mods/jonez/textures/jonez_romanesque_base.png differ diff --git a/mods/jonez/textures/jonez_romanesque_capital.png b/mods/jonez/textures/jonez_romanesque_capital.png new file mode 100644 index 0000000..ccebf1e Binary files /dev/null and b/mods/jonez/textures/jonez_romanesque_capital.png differ diff --git a/mods/jonez/textures/jonez_romanesque_shaft.png b/mods/jonez/textures/jonez_romanesque_shaft.png new file mode 100644 index 0000000..024e069 Binary files /dev/null and b/mods/jonez/textures/jonez_romanesque_shaft.png differ diff --git a/mods/jonez/textures/jonez_romanesque_top_bottom.png b/mods/jonez/textures/jonez_romanesque_top_bottom.png new file mode 100644 index 0000000..f48a7d3 Binary files /dev/null and b/mods/jonez/textures/jonez_romanesque_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_romanic_architrave.png b/mods/jonez/textures/jonez_romanic_architrave.png new file mode 100644 index 0000000..651d90c Binary files /dev/null and b/mods/jonez/textures/jonez_romanic_architrave.png differ diff --git a/mods/jonez/textures/jonez_romanic_base.png b/mods/jonez/textures/jonez_romanic_base.png new file mode 100644 index 0000000..c779f84 Binary files /dev/null and b/mods/jonez/textures/jonez_romanic_base.png differ diff --git a/mods/jonez/textures/jonez_romanic_capital.png b/mods/jonez/textures/jonez_romanic_capital.png new file mode 100644 index 0000000..8d49e58 Binary files /dev/null and b/mods/jonez/textures/jonez_romanic_capital.png differ diff --git a/mods/jonez/textures/jonez_romanic_shaft.png b/mods/jonez/textures/jonez_romanic_shaft.png new file mode 100644 index 0000000..a444492 Binary files /dev/null and b/mods/jonez/textures/jonez_romanic_shaft.png differ diff --git a/mods/jonez/textures/jonez_romanic_top_bottom.png b/mods/jonez/textures/jonez_romanic_top_bottom.png new file mode 100644 index 0000000..2bc37fa Binary files /dev/null and b/mods/jonez/textures/jonez_romanic_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_ruin_creeper.png b/mods/jonez/textures/jonez_ruin_creeper.png new file mode 100644 index 0000000..adf141c Binary files /dev/null and b/mods/jonez/textures/jonez_ruin_creeper.png differ diff --git a/mods/jonez/textures/jonez_ruin_vine.png b/mods/jonez/textures/jonez_ruin_vine.png new file mode 100644 index 0000000..23c9e56 Binary files /dev/null and b/mods/jonez/textures/jonez_ruin_vine.png differ diff --git a/mods/jonez/textures/jonez_sweedish_ivy.png b/mods/jonez/textures/jonez_sweedish_ivy.png new file mode 100644 index 0000000..e115aee Binary files /dev/null and b/mods/jonez/textures/jonez_sweedish_ivy.png differ diff --git a/mods/jonez/textures/jonez_tiled_pavement.png b/mods/jonez/textures/jonez_tiled_pavement.png new file mode 100644 index 0000000..896d61c Binary files /dev/null and b/mods/jonez/textures/jonez_tiled_pavement.png differ diff --git a/mods/jonez/textures/jonez_tuscan_architrave.png b/mods/jonez/textures/jonez_tuscan_architrave.png new file mode 100644 index 0000000..bdb7f97 Binary files /dev/null and b/mods/jonez/textures/jonez_tuscan_architrave.png differ diff --git a/mods/jonez/textures/jonez_tuscan_base.png b/mods/jonez/textures/jonez_tuscan_base.png new file mode 100644 index 0000000..5403a79 Binary files /dev/null and b/mods/jonez/textures/jonez_tuscan_base.png differ diff --git a/mods/jonez/textures/jonez_tuscan_capital.png b/mods/jonez/textures/jonez_tuscan_capital.png new file mode 100644 index 0000000..8c81f80 Binary files /dev/null and b/mods/jonez/textures/jonez_tuscan_capital.png differ diff --git a/mods/jonez/textures/jonez_tuscan_shaft.png b/mods/jonez/textures/jonez_tuscan_shaft.png new file mode 100644 index 0000000..9245227 Binary files /dev/null and b/mods/jonez/textures/jonez_tuscan_shaft.png differ diff --git a/mods/jonez/textures/jonez_tuscan_top_bottom.png b/mods/jonez/textures/jonez_tuscan_top_bottom.png new file mode 100644 index 0000000..c5e2285 Binary files /dev/null and b/mods/jonez/textures/jonez_tuscan_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_versailles_architrave.png b/mods/jonez/textures/jonez_versailles_architrave.png new file mode 100644 index 0000000..b32199a Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_architrave.png differ diff --git a/mods/jonez/textures/jonez_versailles_base.png b/mods/jonez/textures/jonez_versailles_base.png new file mode 100644 index 0000000..5eef2e9 Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_base.png differ diff --git a/mods/jonez/textures/jonez_versailles_capital.png b/mods/jonez/textures/jonez_versailles_capital.png new file mode 100644 index 0000000..5776fc2 Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_capital.png differ diff --git a/mods/jonez/textures/jonez_versailles_pavement.png b/mods/jonez/textures/jonez_versailles_pavement.png new file mode 100644 index 0000000..a77a9ff Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_pavement.png differ diff --git a/mods/jonez/textures/jonez_versailles_shaft.png b/mods/jonez/textures/jonez_versailles_shaft.png new file mode 100644 index 0000000..0cd9332 Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_shaft.png differ diff --git a/mods/jonez/textures/jonez_versailles_tile.png b/mods/jonez/textures/jonez_versailles_tile.png new file mode 100644 index 0000000..cd9dd80 Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_tile.png differ diff --git a/mods/jonez/textures/jonez_versailles_top_bottom.png b/mods/jonez/textures/jonez_versailles_top_bottom.png new file mode 100644 index 0000000..ac2f400 Binary files /dev/null and b/mods/jonez/textures/jonez_versailles_top_bottom.png differ diff --git a/mods/jonez/textures/jonez_wrought_lattice_bottom.png b/mods/jonez/textures/jonez_wrought_lattice_bottom.png new file mode 100644 index 0000000..bbde9ce Binary files /dev/null and b/mods/jonez/textures/jonez_wrought_lattice_bottom.png differ diff --git a/mods/jonez/textures/jonez_wrought_lattice_top.png b/mods/jonez/textures/jonez_wrought_lattice_top.png new file mode 100644 index 0000000..73a16d1 Binary files /dev/null and b/mods/jonez/textures/jonez_wrought_lattice_top.png differ diff --git a/mods/juanchi/elez/.luacheckrc b/mods/juanchi/elez/.luacheckrc new file mode 100644 index 0000000..50e8a9f --- /dev/null +++ b/mods/juanchi/elez/.luacheckrc @@ -0,0 +1,19 @@ +unused_args = false +allow_defined_top = true +max_line_length = false + +globals = { + "minetest", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/juanchi/elez/README.md b/mods/juanchi/elez/README.md new file mode 100644 index 0000000..29862ea --- /dev/null +++ b/mods/juanchi/elez/README.md @@ -0,0 +1,68 @@ +# ElectrumZ + +ElectrumZ is a mod for Minetest of monetary economics. + +The official currency is the "Electrum", which is an alloy of gold, silver and copper in different proportions. The electrum symbol is: ê. + +1 crafting = 99 electrums. + +## Commands + +### For administrators + +- /add_money +Amount: Can be positive or negative + +- /get_money +It retrieves info about the player's account. + +### For players + +- /money +Gets the info about your account + +- /save_money +Saves to your account all electrums in your inventory. + +- /give_money +Gives money to another player. + +## Easy management + +### Piggy bank + +Create this cute piggy bank to store your electrums without command. +Right-click on it to save them. +Note that ALL electrums in your inventory will be saved, not just the ones you wield. +Note that the electrums will be deposited in your bank account, not physically inside the piggy bank. No matter if the piggy is stolen or broken, your money will be safe. + +### ElectrumPay Card + +View your account status and make quick transfers to other players. + +Just use it. It has a technology that identifies you by your fingerprint. It doesn't matter if it gets stolen. Your bank account will be safe. + +### Automatic Teller Machine + +The same as the ElectrumPay card, but in addition it allows cash withdrawals of electrums. + +## API + +- elez.get_money(player) +- elez.add_money(player, amount) +- elez.save_money(player) +- elez.transfer_money(src_name, dst_name, amount) + +## License + +- Source code: GPLv3. +- Textures: CC BY-SA 4.0 + +## Dependencies + +- default, moreores, basic_materials, dye + +## Download + +https://github.com/runsy/elez/archive/refs/heads/main.zip + diff --git a/mods/juanchi/elez/init.lua b/mods/juanchi/elez/init.lua new file mode 100644 index 0000000..a14618e --- /dev/null +++ b/mods/juanchi/elez/init.lua @@ -0,0 +1,376 @@ +elez = {} +local coin_name = "elez:electrum" +local ingots_to_coins = 99 +local withdraw_max = 99 +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) + +--Electrum +minetest.register_craftitem(coin_name, { + description = S("Electrum"), + inventory_image = "elez_electrum.png", + wield_image = "elez_electrum.png", + stack_max = 99, +}) + +minetest.register_craft({ + type = "shaped", + output = coin_name.." "..tostring(ingots_to_coins), + recipe = { + {"", "moreores:silver_ingot", ""}, + {"moreores:silver_ingot", "default:gold_ingot", "moreores:silver_ingot"}, + {"", "default:copper_ingot", ""}, + } +}) + +--Credit Card +minetest.register_craftitem("elez:credit_card", { + description = S("ElectrumPay Card"), + inventory_image = "elez_credit_card.png", + wield_image = "elez_credit_card.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + elez.electrumpay(user, "", nil, false) + return nil + end, +}) + +minetest.register_craft({ + type = "shaped", + output = "elez:credit_card", + recipe = { + {"", "", ""}, + {"", "", ""}, + {"basic_materials:ic", "basic_materials:plastic_sheet", "elez:electrum"}, + } +}) + +--Piggy Bank +minetest.register_node("elez:piggy_bank", { + description = S("Piggy Bank"), + drawtype = "nodebox", + tiles = { + "elez_piggy_bank_top.png", + "elez_piggy_bank_bottom.png", + "elez_piggy_bank_right.png", + "elez_piggy_bank_left.png", + "elez_piggy_bank_back.png", + "elez_piggy_bank_front.png" + }, + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.375, -0.25, 0.25, -0.0625, 0.25}, + {-0.1875, -0.5, -0.1875, -0.125, -0.375, -0.125}, + {0.125, -0.5, -0.1875, 0.1875, -0.375, -0.125}, + {0.125, -0.5, 0.125, 0.1875, -0.375, 0.1875}, + {-0.1875, -0.5, 0.125, -0.125, -0.375, 0.1875}, + {-0.125, -0.3125, -0.3125, 0.125, -0.1875, -0.25}, + } + }, + groups = {crumbly = 2}, + sounds = default.node_sound_glass_defaults(), + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + elez.save_money(player) + end, +}) + +minetest.register_craft({ + type = "shaped", + output = "elez:piggy_bank", + recipe = { + {"", coin_name, ""}, + {"", "dye:pink", ""}, + {"", "default:clay", ""}, + } +}) + +--Automatic Teller Machine +minetest.register_node("elez:teller_machine", { + description = S("Automatic Teller Machine"), + drawtype = "mesh", + mesh = "elez_teller_machine.b3d", + tiles = {"elez_teller_machine.png"}, + paramtype2 = "facedir", + param2 = 5, + physical = true, + groups = {cracky = 3}, + sounds = default.node_sound_metal_defaults(), + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + elez.electrumpay(player, "", nil, true) + end, +}) + +minetest.register_craft({ + type = "shaped", + output = "elez:teller_machine", + recipe = { + {"", "elez:credit_card", ""}, + {"", "basic_materials:ic", ""}, + {"", "default:steelblock", ""}, + } +}) + +--Helper Functions +local function is_numeric(x) + if tonumber(x) ~= nil then + return true + end + return false +end + +--Basic Money functions + +local function check_amount(amount) + if not amount then + return false, S("Error: You have to specify an amount of money.") + end + if not is_numeric(amount) then + return false, S("Error: The amount has to be numeric.") + end + if amount == 0 then + return false, S("Error: Type an amount greater than 0.") + end + return true +end + +function elez.add_money(player, amount) + if amount < -32768 then + amount = -32768 + elseif amount > 32767 then + amount = 32767 + end + player:get_meta():set_int("elez:money", (player:get_meta():get_int("elez:money") + amount)) +end + +function elez.get_money(player) + return player:get_meta():get_int("elez:money") +end + +function elez.save_money(player) + local inv = player:get_inventory() + local inv_list = inv:get_list("main") + local player_name = player:get_player_name() + if not inv:contains_item("main", coin_name) then + minetest.chat_send_player(player_name, S("You have no electrums in your inventory.")) + return false + end + local amount = 0 + for i = 1, #inv_list do + local item_stack = inv_list[i] + if item_stack:get_name() == coin_name then + amount = amount + item_stack:get_count() + inv:set_stack("main", i, ItemStack(nil)) + end + end + elez.add_money(player, amount) + minetest.chat_send_player(player_name, tostring(amount).." "..S("electrums saved")) + return true +end + +function elez.transfer_money(src_name,dst_name,amount) + local ok, msg = check_amount(amount) + if not ok then + return ok, msg + end + amount = math.abs(amount) + if amount > 32767 then + amount = 32767 + end + local src = minetest.get_player_by_name(src_name) + local dst = minetest.get_player_by_name(dst_name) + if not dst then + return false, S("Error: The player does not exist or not online.") + end + if src_name == dst_name then + return false, S("Error: You cannot send money to yourself.") + end + if (elez.get_money(src) < amount) then + return false, S("Error: You has not").." "..tostring(amount).." "..S("of money to give.") + end + elez.add_money(dst, amount) + elez.add_money(src, -amount) + minetest.chat_send_player(src_name, S("You've given").." "..tostring(amount).." " + ..S("of money to").." "..dst_name) + minetest.chat_send_player(dst_name, S("You've received").." "..tostring(amount).." " + ..S("of money from").." "..src_name) + return true, S("Transfer successfully completed.") +end + +function elez.withdraw_money(player, amount) + local ok, msg = check_amount(amount) + if not ok then + return ok, msg + end + amount = math.abs(amount) + if amount > withdraw_max then + amount = withdraw_max + end + if amount > elez.get_money(player) then + return false, S("Error: You has not").." "..tostring(amount).." "..S("of money to withdraw.") + end + local inv = player:get_inventory() + local money_stack = ItemStack(coin_name.." "..tostring(amount)) + if not inv:room_for_item("main", money_stack) then + return false, S("No space in your inventory for the money.") + else + inv:add_item("main", money_stack) + elez.add_money(player, -amount) + return true, S("Money successfully withdrawn.") + end +end + +--ElectrumPay + +local _contexts = {} + +local function get_context(name) + local context = _contexts[name] or {} + _contexts[name] = context + return context +end + +minetest.register_on_leaveplayer(function(player) + _contexts[player:get_player_name()] = nil +end) + +local function compose_formspec(user, title, msg, default_fields, withdraw) + local formspec = [[ + formspec_version[4] + size[6,5] + label[2.25,0.25;]]..title..[[] + label[0.25,0.75;]]..S("Account Balance")..": ".. + tostring(elez.get_money(user)).." ê"..[[] + field[0.25,1.25;2,1;fld_name;]]..S("Name")..[[:;]]..default_fields["name"]..[[] + field_close_on_enter[fld_name;false] + field[2.25,1.25;1,1;fld_amount;]]..S("Amount")..[[:;]]..default_fields["amount"]..[[] + field_close_on_enter[fld_amount;false] + button_exit[1.75,2.25;1,1;btn_transfer;]]..S("Transfer")..[[] + label[0.25,3.5;]]..msg..[[] + button_exit[2.5,3.75;1,1;btn_close;]]..S("Close")..[[] + ]] + if withdraw then + formspec = formspec.. + "field[3.75,1.25;1,1;fld_withdraw;"..S("Amount")..":;"..default_fields["withdraw"].."]".. + "field_close_on_enter[fld_withdraw;false]".. + "button_exit[3.75,2.25;2,1;btn_withdraw;"..S("Withdraw").." "..tostring(withdraw_max) + .." "..S("max").."]" + end + return formspec +end + +local function get_default_fields(fields, success) + if success then + return {name="", amount="", withdraw=""} + else + return {name=fields.fld_name, amount=fields.fld_amount, withdraw=fields.fld_withdraw} + end +end + +function elez.electrumpay(user, msg, default_fields, withdraw) + local user_name = user:get_player_name() + local context = get_context(user_name) + local title + if withdraw then + context.withdraw = true + title = S("Automatic Teller Machine") + else + context.withdraw = false + title = S("ElectrumPay Card") + end + if not default_fields then + default_fields = {name = "", amount = "", withdraw = ""} + end + minetest.show_formspec(user_name, "elez:electrumpay", compose_formspec(user, title, msg, default_fields, withdraw)) +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "elez:electrumpay" then + return + end + local player_name = player:get_player_name() + local context = get_context(player_name) + if fields.btn_transfer then + local transfer, msg = elez.transfer_money(player_name, fields.fld_name, fields.fld_amount) + elez.electrumpay(player, msg, get_default_fields(fields, transfer), context.withdraw) + elseif fields.btn_withdraw then + local withdraw, msg = elez.withdraw_money(player, fields.fld_withdraw) + elez.electrumpay(player, msg, get_default_fields(fields, withdraw), context.withdraw) + end +end) + +--COMMANDS + +minetest.register_chatcommand("add_money", { + privs = { + server = true, + }, + description = S("Add an amount of money (+ or -)"), + func = function(name, param) + if param == "" then + return true, S("Error: You have to specify a player and an amount of money.") + end + local player_name, amount = string.match(param, "([%a%d_-]+) ([%a%d_-]+)") + local ok, msg = check_amount(amount) + if not ok then + return true, msg + end + local player = minetest.get_player_by_name(player_name) + if not player then + return true, S("Error: The player does not exist or not online.") + end + elez.add_money(player, tonumber(amount)) + minetest.chat_send_player(name, S("You've added").." "..tostring(amount).." " + ..S("of money to").." "..player_name) + end, +}) + +minetest.register_chatcommand("money", { + description = S("Get the info about your money"), + func = function(name, param) + local you = minetest.get_player_by_name(name) + minetest.chat_send_player(name, S("You has").." " + ..tostring(elez.get_money(you)).." "..S("of money.")) + end, +}) + +minetest.register_chatcommand("get_money", { + privs = { + server = true, + }, + description = S("Get the info about a player's money"), + func = function(name, param) + if param == "" then + return true, S("Error: You have to specify a player.") + end + local player_name = string.match(param, "([%a%d_-]+)") + local player = minetest.get_player_by_name(player_name) + if not player then + return true, S("Error: The player does not exist or not online.") + end + minetest.chat_send_player(name, player_name.." "..S("has").." " + ..tostring(elez.get_money(player)).." "..S("of money.")) + end, +}) + +minetest.register_chatcommand("save_money", { + description = S("Save your electrums from your inventory"), + func = function(name, param) + local player = minetest.get_player_by_name(name) + if not player then + return true, S("Error: The player does not exist or not online.") + end + elez.save_money(player) + end, +}) + +minetest.register_chatcommand("give_money", { + description = S("Give of your money to a player"), + func = function(name, param) + if param == "" then + return true, S("Error: You have to specify a player and an amount of money.") + end + local player_name, amount = string.match(param, "([%a%d_-]+) ([%a%d_-]+)") + elez.transfer_money(name, player_name, amount) + end, +}) diff --git a/mods/juanchi/elez/locale/elez.es.tr b/mods/juanchi/elez/locale/elez.es.tr new file mode 100644 index 0000000..2902656 --- /dev/null +++ b/mods/juanchi/elez/locale/elez.es.tr @@ -0,0 +1,40 @@ +# textdomain: elez +Electrum=Electro +ElectrumPay Card=Tarjeta de pago Electrum +Piggy Bank=Hucha de cerdito +Automatic Teller Machine=Cajero automático +Account Balance=Saldo de la cuenta +Name=Nombre +Amount=Cantidad +Transfer=Transferir +Withdraw=Retirar +Close=Cerrar +Add an amount of money (+ or -)=Añade una cantidad de dinero (+ o -) +Error: You have to specify a player and an amount of money.=Error: Tienes que especificar un jugador y una cantidad de dinero +Error: You have to specify an amount of money.=Error: Tienes que especificar una cantidad de dinero. +Error: The amount has to be a number.=Error: La cantidad tiene que ser numérica. +Error: The player does not exist or not online.=El jugador no existe o no está en línea +Transfer successfully completed.=Tranferencia realizada con éxito. +You've added=Has añadido +of money to=de dinero a +Get the info about a player's money=Obtén info sobre el dinero de un jugador +Error: You have to specify a player.=Error: Debes especificar un jugador +has=tiene +of money.=de dinero. +Save your electrums from your inventory=Guarda los electros de tu inventario +electrums saved=electrums guardados +You have no electrums in your inventory.=No tienes ningún electro en tu inventario. +Give of your money to a player=Da de tu dinero a otro jugador +Error: You cannot send money to yourself.=Error: No puedes darte dinero a ti mismo. +Error: You has not=Error: No tienes +of money to give.=de dinero para dar. +of money to withdraw.=de dinero para retirar. +You've given=Has dado +You've received=Has recibido +of money from=de dinero de +Get the info about your money=Obtén info de tu dinero +You has=Tienes +No space in your inventory for the money.=No hay espacio en tu inventario para el dinero. +Money successfully withdrawn.=Dinero retirado con éxito. +max=máx. +Error: Type an amount greater than 0.=Error: Pon una cantidad mayor de 0 diff --git a/mods/juanchi/elez/mod.conf b/mods/juanchi/elez/mod.conf new file mode 100644 index 0000000..76e9c7f --- /dev/null +++ b/mods/juanchi/elez/mod.conf @@ -0,0 +1,2 @@ +name = elez +depends = default, moreores, basic_materials, dye diff --git a/mods/juanchi/elez/models/elez_teller_machine.b3d b/mods/juanchi/elez/models/elez_teller_machine.b3d new file mode 100644 index 0000000..b55600a Binary files /dev/null and b/mods/juanchi/elez/models/elez_teller_machine.b3d differ diff --git a/mods/juanchi/elez/models/elez_teller_machine.blend b/mods/juanchi/elez/models/elez_teller_machine.blend new file mode 100644 index 0000000..259d09a Binary files /dev/null and b/mods/juanchi/elez/models/elez_teller_machine.blend differ diff --git a/mods/juanchi/elez/textures/elez_credit_card.png b/mods/juanchi/elez/textures/elez_credit_card.png new file mode 100644 index 0000000..19ff2a7 Binary files /dev/null and b/mods/juanchi/elez/textures/elez_credit_card.png differ diff --git a/mods/juanchi/elez/textures/elez_electrum.png b/mods/juanchi/elez/textures/elez_electrum.png new file mode 100644 index 0000000..bc171e9 Binary files /dev/null and b/mods/juanchi/elez/textures/elez_electrum.png differ diff --git a/mods/juanchi/elez/textures/elez_piggy_bank_back.png b/mods/juanchi/elez/textures/elez_piggy_bank_back.png new file mode 100644 index 0000000..aa5ed8f Binary files /dev/null and b/mods/juanchi/elez/textures/elez_piggy_bank_back.png differ diff --git a/mods/juanchi/elez/textures/elez_piggy_bank_bottom.png b/mods/juanchi/elez/textures/elez_piggy_bank_bottom.png new file mode 100644 index 0000000..76fc823 Binary files /dev/null and b/mods/juanchi/elez/textures/elez_piggy_bank_bottom.png differ diff --git a/mods/juanchi/elez/textures/elez_piggy_bank_front.png b/mods/juanchi/elez/textures/elez_piggy_bank_front.png new file mode 100644 index 0000000..7e4aacd Binary files /dev/null and b/mods/juanchi/elez/textures/elez_piggy_bank_front.png differ diff --git a/mods/juanchi/elez/textures/elez_piggy_bank_left.png b/mods/juanchi/elez/textures/elez_piggy_bank_left.png new file mode 100644 index 0000000..f54b96c Binary files /dev/null and b/mods/juanchi/elez/textures/elez_piggy_bank_left.png differ diff --git a/mods/juanchi/elez/textures/elez_piggy_bank_right.png b/mods/juanchi/elez/textures/elez_piggy_bank_right.png new file mode 100644 index 0000000..6d2d658 Binary files /dev/null and b/mods/juanchi/elez/textures/elez_piggy_bank_right.png differ diff --git a/mods/juanchi/elez/textures/elez_piggy_bank_top.png b/mods/juanchi/elez/textures/elez_piggy_bank_top.png new file mode 100644 index 0000000..38d3f00 Binary files /dev/null and b/mods/juanchi/elez/textures/elez_piggy_bank_top.png differ diff --git a/mods/juanchi/elez/textures/elez_teller_machine.png b/mods/juanchi/elez/textures/elez_teller_machine.png new file mode 100644 index 0000000..0acc668 Binary files /dev/null and b/mods/juanchi/elez/textures/elez_teller_machine.png differ diff --git a/mods/juanchi/invz/init.lua b/mods/juanchi/invz/init.lua new file mode 100644 index 0000000..d541f62 --- /dev/null +++ b/mods/juanchi/invz/init.lua @@ -0,0 +1,30 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) + +local formspec = [[ + image_button[0,0;1,1;invz_day.png;btn_day;]]..S("Day")..[[;;] + image_button[1,0;1,1;invz_night.png;btn_night;]]..S("Night")..[[;;] +]] + +sfinv.register_page("server", { + title = S("Server"), + get = function(self, player, context) + return sfinv.make_formspec(player, context, formspec, false) + end, + is_in_nav = function(self, player, context) + local player_name = player:get_player_name() + if minetest.check_player_privs(player_name, {server=true}) then + return true + else + return false + end + end, + on_player_receive_fields = function(self, player, context, fields) + if fields.btn_day then + minetest.set_timeofday(0.5) + end + if fields.btn_night then + minetest.set_timeofday(0) + end + end, +}) diff --git a/mods/juanchi/invz/locale/invz.es.tr b/mods/juanchi/invz/locale/invz.es.tr new file mode 100644 index 0000000..f55e6f2 --- /dev/null +++ b/mods/juanchi/invz/locale/invz.es.tr @@ -0,0 +1,4 @@ +# textdomain: invz +Server=Servidor +Day=Día +Night=Noche diff --git a/mods/juanchi/invz/mod.conf b/mods/juanchi/invz/mod.conf new file mode 100644 index 0000000..b24e123 --- /dev/null +++ b/mods/juanchi/invz/mod.conf @@ -0,0 +1,2 @@ +name = invz +depends = sfinv diff --git a/mods/juanchi/invz/textures/invz_day.png b/mods/juanchi/invz/textures/invz_day.png new file mode 100644 index 0000000..1c71636 Binary files /dev/null and b/mods/juanchi/invz/textures/invz_day.png differ diff --git a/mods/juanchi/invz/textures/invz_night.png b/mods/juanchi/invz/textures/invz_night.png new file mode 100644 index 0000000..2adcd7a Binary files /dev/null and b/mods/juanchi/invz/textures/invz_night.png differ diff --git a/mods/juanchi/modpack.txt b/mods/juanchi/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/juanchi/modz/init.lua b/mods/juanchi/modz/init.lua new file mode 100644 index 0000000..213dabf --- /dev/null +++ b/mods/juanchi/modz/init.lua @@ -0,0 +1,43 @@ +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) + +minetest.register_privilege("moderator", { + description = S("Can moderate the server"), + give_to_singleplayer = true +}) + +local function create_form() + local player_cells = "" + local player_faces = "" + local i = 0 + for _, player in ipairs(minetest.get_connected_players()) do + local player_name = player:get_player_name() + local player_face + if player_api.get_gender(player) then + player_face = player_api.compose_face(player, 2.0) + player_face = minetest.formspec_escape(player_face) + else + player_face = "player_male_face.png" + end + --minetest.chat_send_all(player_face) + if not(player_cells == "") then + player_cells = player_cells.."," + player_faces = player_faces.."," + end + player_faces = player_faces..tostring(i).."="..player_face + player_cells = player_cells..tostring(i)..","..player_name + i = i + 1 + end + return [[ + label[0.25,0.25;]]..S("Connected Players")..":"..[[] + tablecolumns[image,align=inline,]]..player_faces..[[;text] + table[0.25,0.75;4,4;tab_players;]]..player_cells..[[;0] + ]] +end + +sfinv.register_page("players", { + title = S("Players"), + get = function(self, player, context) + return sfinv.make_formspec(player, context, create_form(), false) + end, +}) diff --git a/mods/juanchi/modz/locale/invz.es.tr b/mods/juanchi/modz/locale/invz.es.tr new file mode 100644 index 0000000..b99b2ba --- /dev/null +++ b/mods/juanchi/modz/locale/invz.es.tr @@ -0,0 +1,5 @@ +# textdomain: modz +Server=Servidor +Players=Jugadores +Can moderate the server=Capaz de moderar el servidor +Connected Players=Jugadores conectados diff --git a/mods/juanchi/modz/mod.conf b/mods/juanchi/modz/mod.conf new file mode 100644 index 0000000..32834a7 --- /dev/null +++ b/mods/juanchi/modz/mod.conf @@ -0,0 +1 @@ +name = modz diff --git a/mods/killme/init.lua b/mods/killme/init.lua new file mode 100644 index 0000000..9b67475 --- /dev/null +++ b/mods/killme/init.lua @@ -0,0 +1,24 @@ +minetest.register_chatcommand("killme", { + description = "Kill yourself to respawn", + func = function(name) + local player = minetest.get_player_by_name(name) + if player then + if minetest.settings:get_bool("enable_damage") then + player:set_hp(0) + return true + else + for _, callback in pairs(core.registered_on_respawnplayers) do + if callback(player) then + return true + end + end + + -- There doesn't seem to be a way to get a default spawn pos from the lua API + return false, "No static_spawnpoint defined" + end + else + -- Show error message if used when not logged in, eg: from IRC mod + return false, "You need to be online to be killed!" + end + end +}) diff --git a/mods/lantern/README.md b/mods/lantern/README.md new file mode 100644 index 0000000..0fb2de4 --- /dev/null +++ b/mods/lantern/README.md @@ -0,0 +1,7 @@ +# [Mod] Lantern [lantern] # +This is a mod for Minetest 0.4.11 and later created by RHRhino (RHR). +License of code: WTFPL +License of textures: WTFPL + +This mod adds different light nodes like candles, lanterns, lamps and lampposts. More informations at: +https://forum.minetest.net/viewtopic.php?id=8718 \ No newline at end of file diff --git a/mods/lantern/crafting.lua b/mods/lantern/crafting.lua new file mode 100644 index 0000000..6250224 --- /dev/null +++ b/mods/lantern/crafting.lua @@ -0,0 +1,74 @@ +-- +-- register crafting recipes: +-- + +if minetest.registered_items["homedecor:paraffin"] +and minetest.registered_items["farming:cotton"] then + minetest.register_craft({ + output = "lantern:candle 12", + recipe = { + {"homedecor:paraffin", "farming:cotton", "homedecor:paraffin"}, + {"homedecor:paraffin", "farming:cotton", "homedecor:paraffin"}, + {"homedecor:paraffin", "farming:cotton", "homedecor:paraffin"}, + } + }) +else + minetest.register_craft({ + output = "lantern:candle 12", + recipe = { + {"default:coal_lump","default:coal_lump"}, + {"group:stick","group:stick"}, + } + }) +end + +minetest.register_craft({ + output = "lantern:lantern 4", + recipe = { + {"","group:stick",""}, + {"group:stick","lantern:candle","group:stick"}, + {"","group:stick",""}, + } +}) + +minetest.register_craft({ + output = "lantern:lantern 4", + recipe = { + {"group:stick","","group:stick"}, + {"","lantern:candle",""}, + {"group:stick","","group:stick"}, + } +}) + +minetest.register_craft({ + type = "shapeless", + output = "lantern:fence_black", + recipe = {"default:coal_lump", "default:fence_wood"}, +}) + +minetest.register_craft({ + output = "lantern:lamp 4", + recipe = { + {"","default:steel_ingot",""}, + {"default:steel_ingot","lantern:candle","default:steel_ingot"}, + {"","default:steel_ingot",""}, + } +}) + +minetest.register_craft({ + output = "lantern:lamp 4", + recipe = { + {"default:steel_ingot","","default:steel_ingot"}, + {"","lantern:candle",""}, + {"default:steel_ingot","","default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "lantern:lamp_post", + recipe = { + {"lantern:fence_black", "lantern:fence_black"}, + {"lantern:fence_black", "lantern:lamp"}, + {"lantern:fence_black", ""}, + } +}) diff --git a/mods/lantern/depends.txt b/mods/lantern/depends.txt new file mode 100644 index 0000000..03b8f33 --- /dev/null +++ b/mods/lantern/depends.txt @@ -0,0 +1,3 @@ +default +farming? +pipeworks? diff --git a/mods/lantern/init.lua b/mods/lantern/init.lua new file mode 100644 index 0000000..3ec1e78 --- /dev/null +++ b/mods/lantern/init.lua @@ -0,0 +1,5 @@ +-- Lantern-Mod by RHR for Minetest 0.4.11 and later -- +--=========================================== +dofile(minetest.get_modpath("lantern").."/nodes.lua") +dofile(minetest.get_modpath("lantern").."/crafting.lua") +dofile(minetest.get_modpath("lantern").."/torch.lua") \ No newline at end of file diff --git a/mods/lantern/locale/lantern.es.tr b/mods/lantern/locale/lantern.es.tr new file mode 100644 index 0000000..cb6de82 --- /dev/null +++ b/mods/lantern/locale/lantern.es.tr @@ -0,0 +1,10 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# textdomain: lantern +Lantern=Farolillo +Black Fence=Cerca negra +Candle=Vela +Lamp=Lámpara +Fence Lamppost=Poste de luz para cercas +Lamp post=Poste de luz \ No newline at end of file diff --git a/mods/lantern/nodes.lua b/mods/lantern/nodes.lua new file mode 100644 index 0000000..30f1e58 --- /dev/null +++ b/mods/lantern/nodes.lua @@ -0,0 +1,205 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +-- +-- register nodes: +-- + +minetest.register_node("lantern:lantern", { + description = S("Lantern"), + drawtype = "nodebox", + tiles = {"lantern_tb.png","lantern_tb.png","lantern.png"}, + inventory_image = minetest.inventorycube("lantern_inv.png"), + wield_image = minetest.inventorycube("lantern_inv.png"), + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + light_source = LIGHT_MAX - 1, + walkable = false, + groups = {cracky = 2, dig_immediate = 3}, + sounds = default.node_sound_glass_defaults(), + node_box = { + type = "wallmounted", + wall_top = {-1/6, 1/6, -1/6, 1/6, 0.5, 1/6}, + wall_bottom = {-1/6, -0.5, -1/6, 1/6, -1/6, 1/6}, + wall_side = {-1/6, -1/6, -1/6, -0.5, 1/6, 1/6}, + }, +}) + +minetest.register_node("lantern:fence_black", { + description = S("Black Fence"), + drawtype = "fencelike", + tiles = {"default_obsidian.png"}, + paramtype = "light", + is_ground_content = true, + walkable = true, + groups = {choppy = 2, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, +}) + +minetest.register_node("lantern:candle", { + description = S("Candle"), + drawtype = "plantlike", + inventory_image = "candle_inv.png", + tiles = { + {name="candle.png", animation={type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 0.8}}, + }, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + light_source = LIGHT_MAX - 1, + groups = {dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_defaults(), + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.15, 0.2, 0.15 }, + }, +}) + +minetest.register_node("lantern:lamp", { + description = S("Lamp"), + tiles = {"default_obsidian.png", "default_obsidian.png", "lantern_lamp.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = true, + light_source = LIGHT_MAX - 1, + groups = {cracky = 2, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), +}) + + +-- this node is only used for lampost and can't be crafted/used by the player +minetest.register_node("lantern:fence_lampost", { + description = S("Fence Lamppost"), + drawtype = "fencelike", + tiles = {"default_obsidian.png"}, + paramtype = "light", + drop = "", + pointable = false, + groups = {choppy = 2, not_in_creative_inventory = 1}, + sounds = default.node_sound_defaults(), +}) + +-- tests if a player could place there +local function node_allowed(pos, pname) + if minetest.is_protected(pos, pname) then + return false + end + local def = minetest.registered_nodes[minetest.get_node(pos).name] + if not def + or not def.buildable_to then + return false + end + return true +end + +-- how x and z change for different param2s +local lamp_adps = {[0]={0,-1}, {-1,0}, {0,1}, {1,0}} + +-- places the lamp and its fence lampost +local function place_lamp(pos, param2, pname) + local ax,az = unpack(lamp_adps[param2]) + minetest.remove_node(pos) + pos.y = pos.y-1 + for _ = 0,3 do + pos.y = pos.y+1 + if node_allowed(pos, pname) then + minetest.set_node(pos, {name = "lantern:fence_lampost"}) + end + end + + if az == 0 then + pos.x = pos.x+ax + else + pos.z = pos.z+az + end + if node_allowed(pos, pname) then + minetest.set_node(pos, {name = "lantern:fence_lampost"}) + end + + pos.y = pos.y-1 + if node_allowed(pos, pname) then + minetest.set_node(pos, {name = "lantern:lamp_post", param2 = param2}) + end +end + +-- removes the lampost +local function remove_lamp(pos, param2) + local ax,az = unpack(lamp_adps[param2]) + if az == 0 then + pos.x = pos.x-ax + else + pos.z = pos.z-az + end + pos.y = pos.y-2 + + pos.y = pos.y-1 + for _ = 0,3 do + pos.y = pos.y+1 + if minetest.get_node(pos).name == "lantern:fence_lampost" then + minetest.remove_node(pos) + end + end + + if az == 0 then + pos.x = pos.x+ax + else + pos.z = pos.z+az + end + if minetest.get_node(pos).name == "lantern:fence_lampost" then + minetest.remove_node(pos) + end +end + +minetest.register_node("lantern:lamp_post", { + description = S("Lamp post"), + tiles = {"default_obsidian.png", "default_obsidian.png", "lantern_lamp.png"}, + inventory_image = "lamppost_inv.png", + wield_image = "lamppost_inv.png", + paramtype = "light", + paramtype2 = "facedir", + legacy_facedir_simple = true, + sunlight_propagates = true, + light_source = LIGHT_MAX - 1, + groups = {cracky = 2, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.2, -2.5, 0.8, 0.2, -1.3, 1.2} + }, + on_destruct = function(pos) + remove_lamp(pos, minetest.get_node(pos).param2) + end, + after_place_node = function(pos, player) + place_lamp(pos, minetest.get_node(pos).param2, player:get_player_name()) + end, +}) + + +-- +-- legacy +-- + +for i = 1,4 do + minetest.register_alias("lantern:lantern_lampost"..i, "lantern:lamp_post") + minetest.register_node("lantern:lamp"..i, {groups = {old_lamp = 1, not_in_creative_inventory = 1}}) +end + +-- gets param2 from the old typ +local typ2param = {1,0,3,2} + +minetest.register_abm({ + nodenames = {"group:old_lamp"}, + interval = 10, + chance = 1, + action = function(pos, node) + local typ = tonumber(string.sub(node.name, -1)) + if not typ then + error("[lantern] legacy: error with replacing old lamp") + end + minetest.set_node(pos, {name = "lantern:lamp_post", param2 = typ2param[typ]}) + end, +}) diff --git a/mods/lantern/textures/candle.png b/mods/lantern/textures/candle.png new file mode 100644 index 0000000..0afea1f Binary files /dev/null and b/mods/lantern/textures/candle.png differ diff --git a/mods/lantern/textures/candle_inv.png b/mods/lantern/textures/candle_inv.png new file mode 100644 index 0000000..814cdc5 Binary files /dev/null and b/mods/lantern/textures/candle_inv.png differ diff --git a/mods/lantern/textures/default_torch_new_bottom.png b/mods/lantern/textures/default_torch_new_bottom.png new file mode 100644 index 0000000..f7ec6af Binary files /dev/null and b/mods/lantern/textures/default_torch_new_bottom.png differ diff --git a/mods/lantern/textures/default_torch_new_inv.png b/mods/lantern/textures/default_torch_new_inv.png new file mode 100644 index 0000000..61e8c10 Binary files /dev/null and b/mods/lantern/textures/default_torch_new_inv.png differ diff --git a/mods/lantern/textures/default_torch_new_side.png b/mods/lantern/textures/default_torch_new_side.png new file mode 100644 index 0000000..71b32df Binary files /dev/null and b/mods/lantern/textures/default_torch_new_side.png differ diff --git a/mods/lantern/textures/default_torch_new_top.png b/mods/lantern/textures/default_torch_new_top.png new file mode 100644 index 0000000..2a6f5ec Binary files /dev/null and b/mods/lantern/textures/default_torch_new_top.png differ diff --git a/mods/lantern/textures/lamppost_inv.png b/mods/lantern/textures/lamppost_inv.png new file mode 100644 index 0000000..0916019 Binary files /dev/null and b/mods/lantern/textures/lamppost_inv.png differ diff --git a/mods/lantern/textures/lantern.png b/mods/lantern/textures/lantern.png new file mode 100644 index 0000000..1e61d77 Binary files /dev/null and b/mods/lantern/textures/lantern.png differ diff --git a/mods/lantern/textures/lantern_inv.png b/mods/lantern/textures/lantern_inv.png new file mode 100644 index 0000000..3eb21f9 Binary files /dev/null and b/mods/lantern/textures/lantern_inv.png differ diff --git a/mods/lantern/textures/lantern_lamp.png b/mods/lantern/textures/lantern_lamp.png new file mode 100644 index 0000000..c9eed92 Binary files /dev/null and b/mods/lantern/textures/lantern_lamp.png differ diff --git a/mods/lantern/textures/lantern_tb.png b/mods/lantern/textures/lantern_tb.png new file mode 100644 index 0000000..318bb07 Binary files /dev/null and b/mods/lantern/textures/lantern_tb.png differ diff --git a/mods/lantern/torch.lua b/mods/lantern/torch.lua new file mode 100644 index 0000000..09c2ef1 --- /dev/null +++ b/mods/lantern/torch.lua @@ -0,0 +1,17 @@ +minetest.override_item("default:torch", { + tiles = { + {name = "default_torch_new_top.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0}}, + {name = "default_torch_new_bottom.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0}}, + {name = "default_torch_new_side.png", animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.0}}, + }, + inventory_image = "default_torch_new_inv.png", + wield_image = "default_torch_new_inv.png", + wield_scale = {x = 1, y = 1, z = 1.25}, + drawtype = "nodebox", + node_box = { + type = "wallmounted", + wall_top = {-0.0625, -0.0625, -0.0625, 0.0625, 0.5 , 0.0625}, + wall_bottom = {-0.0625, -0.5 , -0.0625, 0.0625, 0.0625, 0.0625}, + wall_side = {-0.5 , -0.5 , -0.0625, -0.375, 0.0625, 0.0625}, + }, +}) diff --git a/mods/lapis/README.md b/mods/lapis/README.md new file mode 100755 index 0000000..07642d8 --- /dev/null +++ b/mods/lapis/README.md @@ -0,0 +1,140 @@ +=========================== + +#Minetest mod "Lapis" + +modified by Napiophelios + +Forum Topic : + +https://forum.minetest.net/viewtopic.php?f=9&t=12368 + +![Preview](https://forum.minetest.net/download/file.php?mode=view&id=2780&sid=2afc22e146d22d7b15e6889ac4eeedff) + +=========================== + +Lapis Lazuli mod requires + +Minetest engine 0.4.13 development build +(commit 1d69116 or later) +for the new sheet ore parameters. + +and the development version of Minetest Game 0.4.14 +(commit fa9a345 or later) +for the new metal sound effects. + +=========================== + +This mod adds several decorative nodes + +based on Lapus Lazuli and Pyrite ore. + +Players can mine Lapis and Pyrite ores; + +craft stairs, slabs, columns, floor tiles, and bricks +from the ores' drops. + +================================= + +the original Minetest mod: + +Lapis Lazuli mod v1.0 + +Written 2015 by LNJ + +License of source code: +WTFPL + +------------------------------------ + +code refinements by Xanthin + +------------------------------------ + +--Nodeboxes for Columns designed + +--by Artemis from Middle-Ages mod + +--Licensed: WTFPL + +--basecode is from Minetest Stairs mod + +-Licensed under GPLv3 or later, + +see http://www.gnu.org/licenses/gpl-3.0.html + +=================================== + +Textures by Napiophelios +License: WTFPL + +lapis_block.png + +lapis_brick.png + +lapis_brick_side.png + +lapis_brick_top.png + +lapis_cobble.png + +lapis_lazurite_block.png + +lapis_lazurite_brick.png + +lapis_lazurite_brick_side.png + +lapis_lazurite_brick_top.png + +lapis_rosace_front.png + +lapis_rosace_side.png + +lapis_stone.png + +lapis_tile.png + + +------------------------------------ + +Pyrite textures based on/derived from + +Gambit's (PixelBox) Pyrite textures + +License: WTFPL + +lapis_mineral_pyrite.png + +lapis_pyrite_block.png + +lapis_pyrite_ingot.png + +lapis_pyrite_nugget.png + +lapis_pyrite_sacred.png + +=================================== + +WTFPL: +This program is free software. It comes without any warranty, to +the extent permitted by applicable law. You can redistribute it +and/or modify it under the terms of the Do What The Fuck You Want +To Public License, Version 2, as published by Sam Hocevar. See +http://sam.zoy.org/wtfpl/COPYING for more details. + +=================================== + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + +=================================== diff --git a/mods/lapis/columns.lua b/mods/lapis/columns.lua new file mode 100755 index 0000000..6c4093b --- /dev/null +++ b/mods/lapis/columns.lua @@ -0,0 +1,147 @@ +--Column Nodes designed by Arthemis ( from the Middle-Ages Mod) +--Licensed: WTFPL +-- +--base code is from default minetest stairs mod +--Licensed under GPLv3 or later, see http://www.gnu.org/licenses/gpl-3.0.html + +lapis = {} + +function lapis.register_column(modname, item, groups, images, description) + local recipeitem = modname..":"..item + local itemname = modname..":column_"..item + minetest.register_node(itemname, { + description = description.." column", + drawtype = "nodebox", + tiles = images, + --inventory_image = "lapis_column.png^lapis_"..item..".png^lapis_column.png^[makealpha:255,126,126", + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = groups, + node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125}, -- NodeBox1 + {-0.25, -0.5, -0.375, 0.25, 0.5, 0.375}, -- NodeBox2 + {-0.375, -0.5, -0.25, 0.375, 0.5, 0.25}, -- NodeBox3 + {-0.1875, -0.5, -0.4375, 0.1875, 0.5, 0.4375}, -- NodeBox4 + {-0.4375, -0.5, -0.1875, 0.4375, 0.5, 0.1875}, -- NodeBox5 + }, + }, +}) + + minetest.register_craft({ + output = itemname .. ' 6', + recipe = { + { "", recipeitem, ""}, + { "", recipeitem, ""}, + { "", recipeitem, ""}, + }, + }) + + itemname=modname..":base_" .. item + + minetest.register_node(itemname, { + description = description.." base", + drawtype = "nodebox", + tiles = images, + --inventory_image = "lapis_base.png^lapis_"..item..".png^lapis_base.png^[makealpha:255,126,126", + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = groups, +node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, -0.3125, 0.3125, 0.5, 0.3125}, -- NodeBox2 + {-0.25, -0.5, -0.375, 0.25, 0.5, 0.375}, -- NodeBox3 + {-0.3125, -0.5, -0.25, 0.25, 0.5, 0.3125}, -- NodeBox4 + {-0.25, -0.5, -0.375, 0.1875, 0.5, 0.375}, -- NodeBox5 + {-0.4375, -0.5, -0.1875, 0.4375, 0.5, 0.1875}, -- NodeBox6 + {-0.375, -0.5, -0.25, 0.375, 0.5, 0.25}, -- NodeBox7 + {-0.1875, -0.5, -0.4375, 0.1875, 0.5, 0.4375}, -- NodeBox8 + {-0.5, -0.5, -0.5, 0.5, -0.3125, 0.5}, -- NodeBox9 + {-0.4375, -0.5, -0.4375, 0.4375, -0.1875, 0.4375}, -- NodeBox10 + {-0.375, -0.5, -0.375, 0.375, -0.0625, 0.375}, -- NodeBox11 + } +}, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + local p0 = pointed_thing.under + local p1 = pointed_thing.above + local param2 = 0 + + local placer_pos = placer:getpos() + if placer_pos then + local dir = { + x = p1.x - placer_pos.x, + y = p1.y - placer_pos.y, + z = p1.z - placer_pos.z + } + param2 = minetest.dir_to_facedir(dir) + end + + if p0.y-1 == p1.y then + param2 = param2 + 20 + if param2 == 21 then + param2 = 23 + elseif param2 == 23 then + param2 = 21 + end + end + + return minetest.item_place(itemstack, placer, pointed_thing, param2) + end, + }) + + -- for replace ABM + minetest.register_node(":lapis:base_" ..item.."upside_down", { + replace_name = "lapis:base_" ..item, + groups = {slabs_replace=1}, + }) + + minetest.register_craft({ + output = itemname .. ' 2', + recipe = { + {recipeitem}, + {recipeitem}, + }, + }) +end + +---------- +-- Items +---------- + +lapis.register_column("lapis", "lapis_block", + {cracky=3}, + {"lapis_block.png"}, + "Lapis" +) + +lapis.register_column("lapis", "lapis_brick", + {cracky=3}, + {"lapis_brick.png"}, + "Lapis Brick" +) + +lapis.register_column("lapis", "lapis_cobble", + {cracky=3}, + {"lapis_cobble.png"}, + "Lapis Cobble" + ) + +lapis.register_column("lapis", "lazurite_block", + {cracky= 3}, + {"lapis_lazurite_block.png"}, + "Lazurite" +) + +lapis.register_column("lapis", "lazurite_brick", + {cracky=3}, + {"lapis_lazurite_brick.png"}, + "Lazurite Brick" +) \ No newline at end of file diff --git a/mods/lapis/init.lua b/mods/lapis/init.lua new file mode 100755 index 0000000..5b89a30 --- /dev/null +++ b/mods/lapis/init.lua @@ -0,0 +1,414 @@ +screwdriver = screwdriver or {} + +--dofile(minetest.get_modpath("lapis").."/columns.lua") + +local S = minetest.get_translator(minetest.get_current_modname()) + +---------- +--Nodes +---------- + +minetest.register_node("lapis:lapis_block", { + description = S("Lapis with Calcite"), + tiles = {"lapis_block.png"}, + paramtype = "light", + is_ground_content = true, + groups = {cracky = 3}, + drop = { + max_items = 1, + items = { + {items = {'lapis:lapis_stone'}, rarity = 10}, + {items = {'lapis:lapis_cobble'}}, + }, + }, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("lapis:lapis_brick", { + description = S("Lapis Brick"), + tiles = { + "lapis_brick_top.png", + "lapis_brick_top.png^[transformFXR90", + "lapis_brick_side.png", + "lapis_brick_side.png^[transformFX", + "lapis_brick.png^[transformFX", + "lapis_brick.png" + }, + paramtype = "light", + paramtype2 = "facedir", + place_param2 = 0, + on_rotate = screwdriver.rotate_simple, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node("lapis:lapis_cobble", { + description = S("Cobbled Lapis"), + tiles = { + "lapis_cobble.png", + "lapis_cobble.png^[transformFY", + "lapis_cobble.png^[transformFX", + "lapis_cobble.png", + "lapis_cobble.png^[transformFX", + "lapis_cobble.png" + }, + paramtype = "light", + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node( "lapis:lazurite_block", { + description = S("Lazurite"), + tiles = {"lapis_lazurite_block.png"}, + paramtype = "light", + is_ground_content = true, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node( "lapis:lazurite_brick", { + description = S("Lazurite Brick"), + tiles = { + "lapis_lazurite_brick_top.png", + "lapis_lazurite_brick_top.png^[transformFXR90", + "lapis_lazurite_brick_side.png", + "lapis_lazurite_brick_side.png^[transformFX", + "lapis_lazurite_brick.png^[transformFX", + "lapis_lazurite_brick.png" + }, + paramtype = "light", + paramtype2 = "facedir", + place_param2 = 0, + on_rotate = screwdriver.rotate_simple, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults() +}) + +minetest.register_node( "lapis:lapis_tile", { + description = S("Lapis Floor Tile"), + tiles = {"lapis_tile.png" }, + is_ground_content = false, + paramtype = 'light', + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults() + }) + +minetest.register_node( "lapis:pyrite_ore", { + description = S("Pyrite Ore"), + tiles = {"default_stone.png^lapis_mineral_pyrite.png" }, + paramtype = "light", + is_ground_content = true, + drop= 'lapis:pyrite_lump 2', + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults() , +}) + +minetest.register_node( "lapis:pyrite_block", { + description = S("Pyrite Block"), + tiles = { + "lapis_pyrite_sacred.png", + "lapis_pyrite_sacred.png", + "lapis_pyrite_block.png" + }, + paramtype = "light", + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_metal_defaults({ + footstep = {name = "default_hard_footstep", gain = 0.5}, + place = {name = "default_place_node_hard", gain = 1.0}, + }), +}) +--Unused Rosace Stone from Darkage mod +minetest.register_node("lapis:rosace", { + description = S("Rose Stone"), + tiles = {"lapis_rosace_front.png", + "lapis_rosace_front.png", + "lapis_rosace_side.png^[transformFX", + "lapis_rosace_side.png^[transformFYR90", + "lapis_rosace_side.png^[transformFY", + "lapis_rosace_side.png"}, + paramtype2 = "facedir", + place_param2 = 0, + is_ground_content = false, + groups = {cracky = 3, stone = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +------------------- +--Stairs & Slabs +------------------- +-- Add support for Stairs Plus (in More Blocks), by Worldblender + if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("lapis", "lapis_block", "lapis:lapis_block", { + description = S("Lapis with Calcite"), + tiles = {"lapis_block.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("lapis", "lapis_brick", "lapis:lapis_brick", { + description = S("Lapis Brick"), + tiles = {"lapis_brick_top.png", + "lapis_brick_top.png^[transformFXR90", + "lapis_brick_side.png", + "lapis_brick_side.png^[transformFX", + "lapis_brick.png^[transformFX", + "lapis_brick.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("lapis", "lapis_cobble", "lapis:lapis_cobble", { + description = S("Cobbled Lapis"), + tiles = {"lapis_cobble.png", + "lapis_cobble.png^[transformFY", + "lapis_cobble.png^[transformFX", + "lapis_cobble.png", + "lapis_cobble.png^[transformFX", + "lapis_cobble.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("lapis", "lapis_lazurite_block", "lapis:lazurite_block", { + description = S("Lazurite"), + tiles = {"lapis_lazurite_block.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("lapis", "lapis_lazurite_brick", "lapis:lazurite_brick", { + description = S("Lazurite Brick"), + tiles = {"lapis_lazurite_brick_top.png", + "lapis_lazurite_brick_top.png^[transformFXR90", + "lapis_lazurite_brick_side.png", + "lapis_lazurite_brick_side.png^[transformFX", + "lapis_lazurite_brick.png^[transformFX", + "lapis_lazurite_brick.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("lapis", "lapis_tile", "lapis:lapis_tile", { + description = S("Lapis Floor Tile"), + tiles = {"lapis_tile.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), + }) + + stairsplus:register_all("lapis", "pyrite_block", "lapis:pyrite_block", { + description = S("Pyrite Block"), + tiles = {"lapis_pyrite_block.png"}, + groups = {cracky = 2}, + sounds = default.node_sound_metal_defaults({ + footstep = {name = "default_hard_footstep", gain = 0.5}, + place = {name = "default_place_node_hard", gain = 1.0}}), + }) + +-- Fall back to default stairs if moreblocks is not installed or enabled + elseif minetest.get_modpath("stairs") then + + stairs.register_stair_and_slab("lapis_block", "lapis:lapis_block", + {cracky = 3}, + {"lapis_block.png"}, + S("Lapis Stair"), + S("Lapis Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("lapis_brick", "lapis:lapis_brick", + {cracky = 3}, + {"lapis_brick.png"}, + S("Lapis Brick Stair"), + S("Lapis Brick Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("lapis_cobble", "lapis:lapis_cobble", + {cracky = 3}, + {"lapis_cobble.png"}, + S("Lapis Cobble Stair"), + S("Lapis Cobble Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("lazurite", "lapis:lazurite_block", + {cracky = 3}, + {"lapis_lazurite_block.png"}, + S("Lazurite Stair"), + S("Lazurite Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("lazurite_brick", "lapis:lazurite_brick", + {cracky = 3}, + {"lapis_lazurite_brick.png"}, + S("Lazurite Brick Stair"), + S("Lazurite Brick Slab"), + default.node_sound_stone_defaults()) + end + +--------------- +-- Crafts Items +--------------- + +minetest.register_craftitem("lapis:lapis_stone", { + description = S("Lapis Gemstone"), + inventory_image = "lapis_stone.png", +}) + +minetest.register_craftitem("lapis:pyrite_ingot", { + description = S("Pyrite Ingot"), + inventory_image = "lapis_pyrite_ingot.png", +}) + +minetest.register_craftitem("lapis:pyrite_lump", { + description = S("Fool's Gold"), + inventory_image = "lapis_pyrite_nugget.png", +}) + +---------- +-- Crafts +---------- + +minetest.register_craft({ + output = 'lapis:lazurite_block', + recipe = { + {'lapis:lapis_stone', 'lapis:lapis_stone', 'lapis:lapis_stone'}, + {'lapis:lapis_stone', 'lapis:pyrite_lump', 'lapis:lapis_stone'}, + {'lapis:lapis_stone', 'lapis:lapis_stone', 'lapis:lapis_stone'}, + } +}) + +minetest.register_craft({ + output = 'lapis:lapis_stone 9', + recipe = { + {'lapis:lapis_block'}, + } +}) + +minetest.register_craft({ + output = 'lapis:lapis_brick 4', + recipe = { + { 'lapis:lapis_block', 'lapis:lapis_block'}, + { 'lapis:lapis_block', 'lapis:lapis_block'}, + } +}) + +minetest.register_craft({ + output = 'lapis:lazurite_brick 4', + recipe = { + { '', 'lapis:lapis_brick', ''}, + { 'lapis:lapis_brick', 'lapis:pyrite_lump', 'lapis:lapis_brick'}, + { '', 'lapis:lapis_brick', ''}, + } +}) + +minetest.register_craft({ + output = 'lapis:lapis_tile 2', + recipe = { + { 'lapis:lazurite_brick'}, + } +}) + +minetest.register_craft({ + output = 'lapis:pyrite_block', + recipe = { + {'lapis:pyrite_ingot', 'lapis:pyrite_ingot', 'lapis:pyrite_ingot'}, + {'lapis:pyrite_ingot', 'lapis:pyrite_ingot', 'lapis:pyrite_ingot'}, + {'lapis:pyrite_ingot', 'lapis:pyrite_ingot', 'lapis:pyrite_ingot'}, + } +}) + +minetest.register_craft({ + output = 'lapis:pyrite_ingot 6', + recipe = { + {'lapis:pyrite_block'}, + } +}) + +minetest.register_craft({ + output = "lapis:rosace_stone 4", + recipe = { + { "lapis:pyrite_ingot", "lapis:lapis_stone", "lapis:pyrite_ingot" }, + { "lapis:lapis_stone", "lapis:pyrite_ingot", "lapis:lapis_stone" }, + { "lapis:pyrite_ingot", "lapis:lapis_stone", "lapis:pyrite_ingot" }, + } +}) + +minetest.register_craft({ + output = 'dye:blue 2', + recipe = { + {'lapis:lapis_stone'}, + } +}) + +------------ +-- Cooking +------------ + +minetest.register_craft({ + type = 'cooking', + output = 'lapis:lapis_block', + recipe = 'lapis:lapis_cobble', +}) + +minetest.register_craft({ + type = "cooking", + output = "lapis:pyrite_ingot", + recipe = "lapis:pyrite_lump", +}) + +-------------------- +-- Ore Generation +-------------------- + +--lapis +--Sheet ore registration +minetest.register_ore({ + ore_type = "sheet", + ore = "lapis:lapis_block", + wherein = "default:stone", + column_height_min = 1, + column_height_max = 3, + column_midpoint_factor = 0.5, + y_min = -500, + y_max = -20, + noise_threshhold = 1.25, + noise_params = {offset=0, scale=2, spread={x=20, y=20, z=10}, seed= 10 , octaves=2, persist=0.8} + }) + +-- pyrite + minetest.register_ore({ + ore_type = "scatter", + ore = "lapis:pyrite_ore", + wherein = "default:stone", + clust_scarcity = 24 * 24 * 24, + clust_num_ores = 4, + clust_size = 3, + y_min = -50, + y_max = -10, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "lapis:pyrite_ore", + wherein = "default:stone", + clust_scarcity = 18 * 18 * 18, + clust_num_ores = 4, + clust_size = 3, + y_min = -150, + y_max = -51, + }) + +---------- +--Aliases +---------- + +minetest.register_alias("lapis:lapis_paver", "lapis:lapis_cobble") +minetest.register_alias("lapis:lazurite", "lapis:lapis_block") +minetest.register_alias("lapis:pyrite_sacred","lapis:pyrite_block") +minetest.register_alias("lapis:pyrite_coin","lapis:pyrite_ingot") +minetest.register_alias("lapis:sacred_ore", "lapis:lazurite_block") diff --git a/mods/lapis/locale/lapis.es.tr b/mods/lapis/locale/lapis.es.tr new file mode 100644 index 0000000..b190842 --- /dev/null +++ b/mods/lapis/locale/lapis.es.tr @@ -0,0 +1,23 @@ +# textdomain: lapis +Cobbled Lapis=Bloque de lapislázuli +Lazurite=Lazurita +Lapis Brick=Ladrillo de lapislázuli +Lapis with Calcite=Lapislázuli con calcita +Lazurite Brick=Ladrillo de lazurita +Lapis Floor Tile=Mosaico de lapislázuli +Pyrite Ore=Mineral de pirita +Pyrite Block=Bloque de pirita +Rose Stone=Piedra rosa +Lapis Stair=Escaleras de lapislázuli +Lapis Slab=Losa de lapislázuli +Lapis Cobble Stair=Escaleras de bloques de lapislázuli +Lapis Cobble Slab=Losa de bloques de lapislázuli +Lapis Brick Stair=Escaleras de ladrillo de lapislázuli +Lapis Brick Slab=Losa de ladrillo de lapislázuli +Lazurite Stair=Escalera de lazurita +Lazurite Slab=Losa de lazurita +Lazurite Brick Stair=Escaleras de ladrillo de lazurita +Lazurite Brick Slab=Losa de ladrillo de lazurita +Lapis Gemstone=Lapislázuli +Pyrite Ingot=Lingote de pirita +Fool's Gold=Pepita de pirita diff --git a/mods/lapis/mod.conf b/mods/lapis/mod.conf new file mode 100755 index 0000000..476fcbe --- /dev/null +++ b/mods/lapis/mod.conf @@ -0,0 +1,4 @@ +name = lapis +description = Lapislazuli Stuff +depends = default +optional_depends = moreblocks, stairs diff --git a/mods/lapis/textures/License b/mods/lapis/textures/License new file mode 100755 index 0000000..ddd9d12 --- /dev/null +++ b/mods/lapis/textures/License @@ -0,0 +1,27 @@ +Pyrite textures based on/derived from +Gambit's (PixelBox) Pyrite textures +License: WTFPL + +lapis_mineral_pyrite.png +lapis_pyrite_block.png +lapis_pyrite_ingot.png +lapis_pyrite_nugget.png +lapis_pyrite_sacred.png + + +Textures by Napiophelios +License: WTFPL + +lapis_block.png +lapis_brick.png +lapis_brick_side.png +lapis_brick_top.png +lapis_cobble.png +lapis_lazurite_block.png +lapis_lazurite_brick.png +lapis_lazurite_brick_side.png +lapis_lazurite_brick_top.png +lapis_rosace_front.png +lapis_rosace_side.png +lapis_stone.png +lapis_tile.png diff --git a/mods/lapis/textures/lapis_block.png b/mods/lapis/textures/lapis_block.png new file mode 100755 index 0000000..e6a63ec Binary files /dev/null and b/mods/lapis/textures/lapis_block.png differ diff --git a/mods/lapis/textures/lapis_brick.png b/mods/lapis/textures/lapis_brick.png new file mode 100755 index 0000000..d6360a4 Binary files /dev/null and b/mods/lapis/textures/lapis_brick.png differ diff --git a/mods/lapis/textures/lapis_brick_side.png b/mods/lapis/textures/lapis_brick_side.png new file mode 100755 index 0000000..d6360a4 Binary files /dev/null and b/mods/lapis/textures/lapis_brick_side.png differ diff --git a/mods/lapis/textures/lapis_brick_top.png b/mods/lapis/textures/lapis_brick_top.png new file mode 100755 index 0000000..d6360a4 Binary files /dev/null and b/mods/lapis/textures/lapis_brick_top.png differ diff --git a/mods/lapis/textures/lapis_cobble.png b/mods/lapis/textures/lapis_cobble.png new file mode 100644 index 0000000..07c7aa2 Binary files /dev/null and b/mods/lapis/textures/lapis_cobble.png differ diff --git a/mods/lapis/textures/lapis_lazurite_block.png b/mods/lapis/textures/lapis_lazurite_block.png new file mode 100755 index 0000000..fb99815 Binary files /dev/null and b/mods/lapis/textures/lapis_lazurite_block.png differ diff --git a/mods/lapis/textures/lapis_lazurite_brick.png b/mods/lapis/textures/lapis_lazurite_brick.png new file mode 100755 index 0000000..f728529 Binary files /dev/null and b/mods/lapis/textures/lapis_lazurite_brick.png differ diff --git a/mods/lapis/textures/lapis_lazurite_brick_side.png b/mods/lapis/textures/lapis_lazurite_brick_side.png new file mode 100755 index 0000000..72db73e Binary files /dev/null and b/mods/lapis/textures/lapis_lazurite_brick_side.png differ diff --git a/mods/lapis/textures/lapis_lazurite_brick_top.png b/mods/lapis/textures/lapis_lazurite_brick_top.png new file mode 100755 index 0000000..578bd0b Binary files /dev/null and b/mods/lapis/textures/lapis_lazurite_brick_top.png differ diff --git a/mods/lapis/textures/lapis_mineral_pyrite.png b/mods/lapis/textures/lapis_mineral_pyrite.png new file mode 100755 index 0000000..f49a5c6 Binary files /dev/null and b/mods/lapis/textures/lapis_mineral_pyrite.png differ diff --git a/mods/lapis/textures/lapis_pyrite_block.png b/mods/lapis/textures/lapis_pyrite_block.png new file mode 100755 index 0000000..20e006c Binary files /dev/null and b/mods/lapis/textures/lapis_pyrite_block.png differ diff --git a/mods/lapis/textures/lapis_pyrite_ingot.png b/mods/lapis/textures/lapis_pyrite_ingot.png new file mode 100755 index 0000000..fa1d335 Binary files /dev/null and b/mods/lapis/textures/lapis_pyrite_ingot.png differ diff --git a/mods/lapis/textures/lapis_pyrite_nugget.png b/mods/lapis/textures/lapis_pyrite_nugget.png new file mode 100755 index 0000000..9cfd4eb Binary files /dev/null and b/mods/lapis/textures/lapis_pyrite_nugget.png differ diff --git a/mods/lapis/textures/lapis_pyrite_sacred.png b/mods/lapis/textures/lapis_pyrite_sacred.png new file mode 100755 index 0000000..e1f2528 Binary files /dev/null and b/mods/lapis/textures/lapis_pyrite_sacred.png differ diff --git a/mods/lapis/textures/lapis_rosace_front.png b/mods/lapis/textures/lapis_rosace_front.png new file mode 100755 index 0000000..3c76523 Binary files /dev/null and b/mods/lapis/textures/lapis_rosace_front.png differ diff --git a/mods/lapis/textures/lapis_rosace_side.png b/mods/lapis/textures/lapis_rosace_side.png new file mode 100755 index 0000000..0abb4f6 Binary files /dev/null and b/mods/lapis/textures/lapis_rosace_side.png differ diff --git a/mods/lapis/textures/lapis_stone.png b/mods/lapis/textures/lapis_stone.png new file mode 100755 index 0000000..498c62f Binary files /dev/null and b/mods/lapis/textures/lapis_stone.png differ diff --git a/mods/lapis/textures/lapis_tile.png b/mods/lapis/textures/lapis_tile.png new file mode 100755 index 0000000..ee5b731 Binary files /dev/null and b/mods/lapis/textures/lapis_tile.png differ diff --git a/mods/lavastuff/.github/workflows/check-release.yml b/mods/lavastuff/.github/workflows/check-release.yml new file mode 100644 index 0000000..38fee12 --- /dev/null +++ b/mods/lavastuff/.github/workflows/check-release.yml @@ -0,0 +1,11 @@ +on: [push, pull_request] +name: Check & Release +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/lavastuff/master/.luacheckrc diff --git a/mods/lavastuff/.luacheckrc b/mods/lavastuff/.luacheckrc new file mode 100644 index 0000000..2200dd4 --- /dev/null +++ b/mods/lavastuff/.luacheckrc @@ -0,0 +1,28 @@ +unused_args = false +max_line_length = 999 + +globals = { + "minetest", "lavastuff", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", "stairs", + + -- MC2 + "mcl_sounds", + + -- Other mods + "armor", "stairsplus", "toolranks", +} + +exclude_files = { + ".luacheckrc", +} diff --git a/mods/lavastuff/LICENSE.txt b/mods/lavastuff/LICENSE.txt new file mode 100644 index 0000000..48f72cf --- /dev/null +++ b/mods/lavastuff/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2019 LoneWolfHT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/lavastuff/README.md b/mods/lavastuff/README.md new file mode 100644 index 0000000..93d5e03 --- /dev/null +++ b/mods/lavastuff/README.md @@ -0,0 +1,3 @@ +# lavastuff +Adds lava armor and a lava sword, pickaxe, shovel, and axe to the game. Also includes a lava block, slab and stair. +Special thanks to ChimneySwift for helping me get the pickaxe and lava orbs to work diff --git a/mods/lavastuff/compat/mcl2.lua b/mods/lavastuff/compat/mcl2.lua new file mode 100644 index 0000000..8062927 --- /dev/null +++ b/mods/lavastuff/compat/mcl2.lua @@ -0,0 +1,184 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +for _, item in pairs({"lavastuff:sword", "lavastuff:pick", "lavastuff:axe", "lavastuff:shovel"}) do + local itype = item:sub(item:find(":")+1) + local mcldef = table.copy(minetest.registered_items[("mcl_tools:%s_diamond"):format(itype)]) + local groups = table.copy(minetest.registered_items[item].groups) + + mcldef.tool_capabilities.damage_groups.fleshy = mcldef.tool_capabilities.damage_groups.fleshy + 1 + mcldef.tool_capabilities.full_punch_interval = mcldef.tool_capabilities.full_punch_interval - 0.1 + groups.dig_speed_class = mcldef.groups.dig_speed_class + + minetest.override_item(item, { + tool_capabilities = mcldef.tool_capabilities, + groups = groups, + wield_scale = vector.new(1.8, 1.8, 1), + _repair_material = "lavastuff:ingot", + }) +end + +minetest.override_item("lavastuff:block", { + stack_max = 64, + groups = {pickaxey=3, building_block=1}, + sounds = mcl_sounds.node_sound_stone_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 4, +}) + +for _, item in pairs({"lavastuff:ingot", "lavastuff:orb"}) do + minetest.override_item(item, { + stack_max = 64, + }) +end + +minetest.register_tool("lavastuff:helmet",{ + description = S("Lava Helmet"), + inventory_image = "lavastuff_inv_helmet.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_head=1, mcl_armor_points=3, mcl_armor_uses=600, mcl_armor_toughness=3}, + _repair_material = "lavastuff:ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + +minetest.register_tool("lavastuff:chestplate", { + description = S("Lava Chestplate"), + inventory_image = "lavastuff_inv_chestplate.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_torso=1, mcl_armor_points=8, mcl_armor_uses=600, mcl_armor_toughness=3}, + _repair_material = "lavastuff:ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + +minetest.register_tool("lavastuff:leggings", { + description = S("Lava Leggings"), + inventory_image = "lavastuff_inv_leggings.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_legs=1, mcl_armor_points=6, mcl_armor_uses=600, mcl_armor_toughness=3}, + _repair_material = "lavastuff:ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + +minetest.register_tool("lavastuff:boots", { + description = S("Lava Boots"), + inventory_image = "lavastuff_inv_boots.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_feet=1, mcl_armor_points=3, mcl_armor_uses=600, mcl_armor_toughness=3}, + _repair_material = "lavastuff:ingot", + sounds = { + _mcl_armor_equip = "mcl_armor_equip_diamond", + _mcl_armor_unequip = "mcl_armor_unequip_diamond", + }, + on_place = armor.on_armor_use, + on_secondary_use = armor.on_armor_use, +}) + +-- +-- Ingot craft +-- + +minetest.register_craft({ + type = "shapeless", + output = "lavastuff:ingot 2", + recipe = {"mcl_mobitems:blaze_rod", "lavastuff:orb"} +}) + +-- +-- Orb craft +-- + +minetest.register_craft({ + output = "lavastuff:orb", + recipe = { + {"mcl_mobitems:blaze_powder", "mcl_mobitems:magma_cream", "mcl_mobitems:blaze_powder"}, + {"mcl_mobitems:magma_cream", "mcl_buckets:bucket_lava", "mcl_mobitems:magma_cream"}, + {"", "mcl_mobitems:magma_cream", ""} + }, + replacements = {{"mcl_buckets:bucket_lava", "mcl_buckets:bucket_empty"}} +}) + +-- +-- Tool crafts +-- + +minetest.register_craft({ + output = "lavastuff:sword", + recipe = { + {"lavastuff:ingot"}, + {"lavastuff:ingot"}, + {"mcl_core:iron_ingot"}, + } +}) + +minetest.register_craft({ + output = "lavastuff:pick", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"", "mcl_core:iron_ingot", ""}, + {"", "mcl_core:iron_ingot", ""}, + } +}) + +minetest.register_craft({ + output = "lavastuff:shovel", + recipe = { + {"lavastuff:ingot"}, + {"mcl_core:iron_ingot"}, + {"mcl_core:iron_ingot"}, + } +}) + +minetest.register_craft({ + output = "lavastuff:axe", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", ""}, + {"lavastuff:ingot", "mcl_core:iron_ingot", ""}, + {"", "mcl_core:iron_ingot", ""}, + } +}) + +-- +-- Block crafts +-- + +minetest.register_craft({ + type = "shapeless", + output = "lavastuff:ingot 9", + recipe = {"lavastuff:block"} +}) + +minetest.register_craft({ + output = "lavastuff:block", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + } +}) + +-- +-- Lava in a Bottle craft +-- + +minetest.register_craft({ + output = "lavastuff:lava_in_a_bottle", + recipe = { + {"", "mcl_buckets:bucket_lava"}, + {"", "mcl_potions:glass_bottle"}, + }, + replacements = {{"mcl_buckets:bucket_lava", "mcl_buckets:bucket_empty"}} +}) diff --git a/mods/lavastuff/compat/mtg.lua b/mods/lavastuff/compat/mtg.lua new file mode 100644 index 0000000..8570950 --- /dev/null +++ b/mods/lavastuff/compat/mtg.lua @@ -0,0 +1,154 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Armor +-- + +if minetest.get_modpath("3d_armor") then + armor:register_armor("lavastuff:helmet_lava", { + description = S("Lava Helmet"), + inventory_image = "lavastuff_inv_helmet.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_head=1, armor_heal=12, armor_use=100, armor_fire=10}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + wear = 0, + }) + + armor:register_armor("lavastuff:chestplate_lava", { + description = S("Lava Chestplate"), + inventory_image = "lavastuff_inv_chestplate.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_torso=1, armor_heal=12, armor_use=100, armor_fire=10}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + wear = 0, + }) + + armor:register_armor("lavastuff:leggings_lava", { + description = S("Lava Leggings"), + inventory_image = "lavastuff_inv_leggings.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_legs=1, armor_heal=12, armor_use=100, armor_fire=10}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + wear = 0, + }) + + armor:register_armor("lavastuff:boots_lava", { + description = S("Lava Boots"), + inventory_image = "lavastuff_inv_boots.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_feet=1, armor_heal=12, armor_use=100, armor_fire=10, physics_jump=0.5, physics_speed = 1}, + armor_groups = {fleshy=15}, + damage_groups = {cracky=2, snappy=1, level=3}, + wear = 0, + }) + + armor:register_armor("lavastuff:shield_lava", { + description = S("Lava Shield"), + inventory_image = "lavastuff_inven_shield.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {armor_shield=1, armor_heal=12, armor_use=100, armor_fire=10}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, level=3}, + wear = 0, + }) +end + +-- +-- Ingot craft +-- + +minetest.register_craft({ + type = "shapeless", + output = "lavastuff:ingot 2", + recipe = {"default:mese_crystal", "lavastuff:orb"} +}) + +-- +-- Orb craft +-- + +if not minetest.get_modpath("mobs_monster") then + minetest.register_craft({ + output = "lavastuff:orb", + recipe = { + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + {"default:mese_crystal", "bucket:bucket_lava", "default:mese_crystal"}, + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"} + }, + replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}} + }) +end + +-- +-- Tool crafts +-- + +minetest.register_craft({ + output = "lavastuff:sword", + recipe = { + {"lavastuff:ingot"}, + {"lavastuff:ingot"}, + {"default:obsidian_shard"}, + } +}) + +minetest.register_craft({ + output = "lavastuff:pick", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"", "default:obsidian_shard", ""}, + {"", "default:obsidian_shard", ""}, + } +}) + +minetest.register_craft({ + output = "lavastuff:shovel", + recipe = { + {"lavastuff:ingot"}, + {"default:obsidian_shard"}, + {"default:obsidian_shard"}, + } +}) + +minetest.register_craft({ + output = "lavastuff:axe", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", ""}, + {"lavastuff:ingot", "default:obsidian_shard", ""}, + {"", "default:obsidian_shard", ""}, + } +}) + +-- +-- Block crafts +-- + +minetest.register_craft({ + type = "shapeless", + output = "lavastuff:ingot 9", + recipe = {"lavastuff:block"} +}) + +minetest.register_craft({ + output = "lavastuff:block", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + } +}) + +-- +-- Lava in a Bottle craft +-- + +minetest.register_craft({ + output = "lavastuff:lava_in_a_bottle", + recipe = { + {"", "bucket:bucket_lava"}, + {"", "vessels:glass_bottle"}, + }, + replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}} +}) diff --git a/mods/lavastuff/depends.txt b/mods/lavastuff/depends.txt new file mode 100644 index 0000000..e422c15 --- /dev/null +++ b/mods/lavastuff/depends.txt @@ -0,0 +1,18 @@ +default? +bucket? +fire? +stairs? +mobs_monster? +3d_armor? +toolranks? +moreblocks? +vessels? +nc_fire? +mcl_armor? +mcl_fire? +mcl_buckets? +mcl_nether? +mcl_potions? +mcl_core? +mcl_mobitems? +mcl_tools? diff --git a/mods/lavastuff/init.lua b/mods/lavastuff/init.lua new file mode 100644 index 0000000..2948955 --- /dev/null +++ b/mods/lavastuff/init.lua @@ -0,0 +1,430 @@ +lavastuff = {} + +local S + +if minetest.get_translator ~= nil then + S = minetest.get_translator(minetest.get_current_modname()) +else + S = function(str) + return(str) + end +end + +lavastuff.enable_tool_fire = minetest.settings:get_bool("lavastuff_enable_tool_fire") +-- Places fire where the player rightclicks with a lava tool + +lavastuff.cook_limit = minetest.settings:get("lavastuff_cook_limit") +-- Tools will not smelt dug items if their cooking time is too long + +if lavastuff.cook_limit ~= false then + lavastuff.cook_limit = 15 +end + +if lavastuff.enable_tool_fire ~= false then + lavastuff.enable_tool_fire = true +end + +lavastuff.blacklisted_items = { -- Items lava tools will not smelt + "default:mese_crystal", + "default:mese", +} + +local fire_node + +if minetest.get_modpath("fire") then + fire_node = "fire:basic_flame" +elseif minetest.get_modpath("mcl_fire") then + fire_node = "mcl_fire:fire" +elseif minetest.get_modpath("nc_fire") then + fire_node = "nc_fire:fire" +end + +if minetest.registered_items[fire_node] and lavastuff.enable_tool_fire == true then + function lavastuff.tool_fire_func(itemstack, user, pointed) + local name = user:get_player_name() + + if pointed.type == "node" then + local node = minetest.get_node(pointed.under) + local node_under = node.name + local def = minetest.registered_nodes[node_under] + + if def.on_rightclick then + return def.on_rightclick(pointed.under, node, user, itemstack, pointed) + end + + if minetest.is_protected(pointed.under, name) then return end + + if def.on_ignite then + def.on_ignite(pointed.under, user) + elseif minetest.get_item_group(node_under, "flammable") >= 1 + and minetest.get_node(pointed.above).name == "air" then + minetest.set_node(pointed.above, {name = fire_node}) + end + end + end +end + +function lavastuff.burn_drops(tool) + local old_handle_node_drops = minetest.handle_node_drops + + function minetest.handle_node_drops(pos, drops, digger) + if not digger or digger:get_wielded_item():get_name() ~= (tool) then + return old_handle_node_drops(pos, drops, digger) + end + + -- reset new smelted drops + local hot_drops = {} + + -- loop through current node drops + for _, drop in pairs(drops) do -- get cooked output of current drops + local stack = ItemStack(drop) + local output = minetest.get_craft_result({ + method = "cooking", + width = 1, + items = {drop} + }) + + for _, name in pairs(lavastuff.blacklisted_items) do + if name == drop then + return old_handle_node_drops(pos, drops, digger) + end + end + + -- if we have cooked result then add to new list + if output and output.item and not output.item:is_empty() and output.time <= lavastuff.cook_limit then + table.insert(hot_drops, + ItemStack({ + name = output.item:get_name(), + count = output.item:to_table().count, + }) + ) + else -- if not then return normal drops + table.insert(hot_drops, stack) + end + end + + return old_handle_node_drops(pos, hot_drops, digger) + end +end + +lavastuff.burn_drops("lavastuff:sword") +lavastuff.burn_drops("lavastuff:axe") +lavastuff.burn_drops("lavastuff:shovel") + +-- +-- Crafitem +-- + +minetest.register_craftitem("lavastuff:ingot", { + description = S("Lava Ingot"), + inventory_image = "lavastuff_ingot.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {craftitem = 1}, +}) + +-- +-- Orb compat and registration +-- + +if not minetest.get_modpath("mobs_monster") then + minetest.register_craftitem("lavastuff:orb", { + description = S("Lava Orb"), + inventory_image = "zmobs_lava_orb.png", + light_source = 7, -- Texture will have a glow when dropped + groups = {craftitem = 1}, + }) + + minetest.register_alias("mobs:lava_orb", "lavastuff:orb") +else + minetest.register_alias("lavastuff:orb", "mobs:lava_orb") +end + +-- +-- Armor Crafts +-- + +if minetest.get_modpath("3d_armor") or minetest.get_modpath("mcl_armor") then + minetest.register_craft({ + output = "lavastuff:helmet_lava", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "", "lavastuff:ingot"}, + {"", "", ""}, + } + }) + + minetest.register_craft({ + output = "lavastuff:chestplate_lava", + recipe = { + {"lavastuff:ingot", "", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + } + }) + + minetest.register_craft({ + output = "lavastuff:leggings_lava", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "", "lavastuff:ingot"}, + {"lavastuff:ingot", "", "lavastuff:ingot"}, + } + }) + + minetest.register_craft({ + output = "lavastuff:boots_lava", + recipe = { + {"lavastuff:ingot", "", "lavastuff:ingot"}, + {"lavastuff:ingot", "", "lavastuff:ingot"}, + } + }) + + if not minetest.get_modpath("mcl_armor") then + minetest.register_craft({ + output = "lavastuff:shield_lava", + recipe = { + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"lavastuff:ingot", "lavastuff:ingot", "lavastuff:ingot"}, + {"", "lavastuff:ingot", ""}, + } + }) + end +end + +-- +-- Tools +-- + +minetest.register_tool("lavastuff:sword", { + description = S("Lava Sword"), + inventory_image = "lavastuff_sword.png", + groups = {weapon = 1, sword = 1}, + light_source = 7, -- Texture will have a glow when dropped + tool_capabilities = { + full_punch_interval = 0.6, + max_drop_level = 1, + groupcaps = { + snappy = { + times = {1.7, 0.7, 0.25}, + uses = 50, + maxlevel = 3 + }, + }, + damage_groups = {fleshy = 10, burns = 1}, + }, + on_place = lavastuff.tool_fire_func, + sound = {breaks = "default_tool_breaks"}, +}) + +if not minetest.get_modpath("mobs_monster") then + minetest.register_alias("mobs:pick_lava", "lavastuff:pick") + + minetest.register_tool("lavastuff:pick", { + description = S("Lava Pickaxe"), + inventory_image = "lavastuff_pick.png", + groups = {tool = 1, pickaxe = 1}, + light_source = 7, -- Texture will have a glow when dropped + tool_capabilities = { + burns = true, -- fire_plus support + full_punch_interval = 0.7, + max_drop_level = 3, + groupcaps={ + cracky = { + times = {[1] = 1.8, [2] = 0.8, [3] = 0.40}, + uses = 40, + maxlevel = 3 + }, + }, + damage_groups = {fleshy = 6, burns = 1}, + }, + on_place = lavastuff.tool_fire_func, + }) + +-- Lava Pick (restores autosmelt functionality) + + lavastuff.burn_drops("lavastuff:pick") +else + minetest.register_alias("lavastuff:pick", "mobs:pick_lava") + + minetest.register_tool(":mobs:pick_lava", { + description = S("Lava Pickaxe"), + inventory_image = "lavastuff_pick.png", + groups = {tool = 1, pickaxe = 1}, + light_source = 7, -- Texture will have a glow when dropped + tool_capabilities = { + burns = true, -- fire_plus support + full_punch_interval = 0.7, + max_drop_level = 3, + groupcaps={ + cracky = { + times = {[1] = 1.8, [2] = 0.8, [3] = 0.40}, + uses = 40, + maxlevel = 3 + }, + }, + damage_groups = {fleshy = 6, burns = 1}, + }, + on_place = lavastuff.tool_fire_func, + }) +end + +minetest.register_tool("lavastuff:shovel", { + description = S("Lava Shovel"), + inventory_image = "lavastuff_shovel.png", + wield_image = "lavastuff_shovel.png^[transformR90", + groups = {tool = 1, shovel = 1}, + light_source = 7, -- Texture will have a glow when dropped + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + on_place = lavastuff.tool_fire_func, + sound = {breaks = "default_tool_breaks"}, +}) + +minetest.register_tool("lavastuff:axe", { + description = S("Lava Axe"), + inventory_image = "lavastuff_axe.png", + groups = {tool = 1, axe = 1}, + light_source = 7, -- Texture will have a glow when dropped + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level = 1, + groupcaps = { + choppy = { + times = {[1] = 2.00, [2] = 0.80, [3] = 0.40}, + uses = 40, + maxlevel = 3 + }, + }, + damage_groups = {fleshy = 7, burns = 1}, + }, + on_place = lavastuff.tool_fire_func, + sound = {breaks = "default_tool_breaks"}, +}) + +-- +-- Tool Craft +-- + +if minetest.get_modpath("mobs_monster") then + minetest.clear_craft({ + recipe = { + {"mobs:lava_orb", "mobs:lava_orb", "mobs:lava_orb"}, + {"", "default:obsidian_shard", ""}, + {"", "default:obsidian_shard", ""}, + } + }) +end + +-- +-- Nodes +-- + +minetest.register_node("lavastuff:block", { + description = S("Lava Block"), + tiles = {"lavastuff_block.png"}, + is_ground_content = false, + sounds = default and default.node_sound_stone_defaults(), + groups = {cracky = 2, level = 2}, + light_source = 4, +}) + +if not minetest.get_modpath("moreblocks") and minetest.get_modpath("stairs") then + stairs.register_stair_and_slab( + "lava", + "lavastuff:block", + {cracky = 2, level = 2}, + {"lavastuff_block.png"}, + S("Lava Stair"), + S("Lava Slab"), + default.node_sound_stone_defaults(), + true, + S("Inner Lava Stair"), + S("Outer Lava Stair") + ) +end + +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("lavastuff", "lava", "lavastuff:ingot", { + description = "Lava", + tiles = {"lavastuff_block.png"}, + groups = {cracky = 2, level = 2}, + light_source = 4, + sounds = default and default.node_sound_stone_defaults(), + }) +end + +-- +--Toolranks support +-- + +if minetest.get_modpath("toolranks") then + minetest.override_item("lavastuff:sword", { + description = toolranks.create_description(S("Lava Sword"), 0, 1), + original_description = S("Lava Sword"), + after_use = toolranks.new_afteruse + }) + + minetest.override_item("lavastuff:pick", { + description = toolranks.create_description(S("Lava Pickaxe"), 0, 1), + original_description = S("Lava Pickaxe"), + after_use = toolranks.new_afteruse + }) + + minetest.override_item("lavastuff:axe", { + description = toolranks.create_description(S("Lava Axe"), 0, 1), + original_description = S("Lava Axe"), + after_use = toolranks.new_afteruse + }) + + minetest.override_item("lavastuff:shovel", { + description = toolranks.create_description(S("Lava Shovel"), 0, 1), + original_description = S("Lava Shovel"), + after_use = toolranks.new_afteruse + }) +end + +-- +-- Lava in a Bottle +-- + +minetest.register_node("lavastuff:lava_in_a_bottle", { + description = S("Lava in a Bottle"), + drawtype = "plantlike", + tiles = {{ + name = "lavastuff_lava_in_a_bottle.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0 + } + }}, + inventory_image = "lavastuff_lava_in_a_bottle.png^[verticalframe:2:0", + wield_image = "lavastuff_lava_in_a_bottle.png^[verticalframe:2:0", + paramtype = "light", + light_source = 9, + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default and default.node_sound_glass_defaults(), +}) + +-- +-- Register crafts based on current game +-- + +if minetest.get_modpath("default") and minetest.get_modpath("bucket") and minetest.get_modpath("vessels") then + dofile(minetest.get_modpath("lavastuff") .. "/compat/mtg.lua") +elseif minetest.get_modpath("mcl_core") then + dofile(minetest.get_modpath("lavastuff") .. "/compat/mcl2.lua") +end diff --git a/mods/lavastuff/license.txt b/mods/lavastuff/license.txt new file mode 100644 index 0000000..48f72cf --- /dev/null +++ b/mods/lavastuff/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-2019 LoneWolfHT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/lavastuff/locale/lavastuff.de.tr b/mods/lavastuff/locale/lavastuff.de.tr new file mode 100644 index 0000000..c40ca36 --- /dev/null +++ b/mods/lavastuff/locale/lavastuff.de.tr @@ -0,0 +1,18 @@ +# textdomain: lavastuff +Lava Ingot=Lava Barren +Lava Orb=Lava Kugel +Lava Sword=Lava Schwert +Lava Pickaxe=Lava Spitzacke +Lava Shovel=Lava Schaufel +Lava Axe=Lava Axt +Lava Helmet=Lava Helm +Lava Chestplate=Lava Brustpanzer +Lava Leggings=Lava Hose +Lava Boots=Lava Stiefel +Lava Shield=Lava Schild +Lava Block=Lava Block +Lava Stair=Lava Treppe +Lava Slab=Lava Platte +Outer Lava Stair=Äußere Lava Treppe +Inner Lava Stair=Innere Lava Treppe +Lava in a Bottle=Lava in Flasche diff --git a/mods/lavastuff/locale/lavastuff.es.tr b/mods/lavastuff/locale/lavastuff.es.tr new file mode 100644 index 0000000..115cd0b --- /dev/null +++ b/mods/lavastuff/locale/lavastuff.es.tr @@ -0,0 +1,16 @@ +# textdomain: lavastuff +Lava Ingot=Lingote de lava +Lava Orb=Orbe de lava +Lava Sword=Espada de lava +Lava Pickaxe=Pico de lava +Lava Shovel=Pala de lava +Lava Axe=Hacha de lava +Lava Helmet=Casco de lava +Lava Chestplate=Peto de lava +Lava Leggings=Polainas de lava +Lava Boots=Botas de lava +Lava Shield=Escudo de lava +Lava Block=Bloque de lava +Lava Stair=Escalera de lava +Lava Slab=Losa de lava +Lava in a Bottle=Lava embotellada diff --git a/mods/lavastuff/locale/lavastuff.fr.tr b/mods/lavastuff/locale/lavastuff.fr.tr new file mode 100644 index 0000000..9a31559 --- /dev/null +++ b/mods/lavastuff/locale/lavastuff.fr.tr @@ -0,0 +1,18 @@ +# textdomain: lavastuff +Lava Ingot=Lingot de lave +Lava Orb=Orbe de lave +Lava Sword=Épée de lave +Lava Pickaxe=Pioche de lave +Lava Shovel=Pelle de lave +Lava Axe=Hache de lave +Lava Helmet=Casque de lave +Lava Chestplate=Cuirasse de lave +Lava Leggings=Jambières de lave +Lava Boots=Bottes de lave +Lava Shield=Bouclier de lave +Lava Block=Bloc de lave +Lava Stair=Escalier de lave +Lava Slab=Dalle de lave +Outer Lava Stair=Escalier extérieur de lave +Inner Lava Stair=Escalier intérieur de lave +Lava in a Bottle=Lave dans un verre diff --git a/mods/lavastuff/locale/lavastuff.it.tr b/mods/lavastuff/locale/lavastuff.it.tr new file mode 100644 index 0000000..492c0aa --- /dev/null +++ b/mods/lavastuff/locale/lavastuff.it.tr @@ -0,0 +1,18 @@ +# textdomain: lavastuff +Lava Ingot=Lingotto di Lava +Lava Orb=Globo di Lava +Lava Sword=Spada di Lava +Lava Pickaxe=Piccone di Lava +Lava Shovel=Pala di Lava +Lava Axe=Ascia di Lava +Lava Helmet=Casco di Lava +Lava Chestplate=Pettorale Lava +Lava Leggings=Pantaloni di Lava +Lava Boots=Stivali di Lava +Lava Shield=Schermo di Protezione di Lava +Lava Block=Blocco di Lava +Lava Stair=Scala di Lava +Lava Slab=Lastra di Lava +Outer Lava Stair=Scala di Lava esterna +Inner Lava Stair=Scala di Lava interna +Lava in a Bottle=Lava in Bottiglia diff --git a/mods/lavastuff/mod.conf b/mods/lavastuff/mod.conf new file mode 100644 index 0000000..e0e1d81 --- /dev/null +++ b/mods/lavastuff/mod.conf @@ -0,0 +1,4 @@ +name = lavastuff +description = Adds lava tools, armor, and blocks +title = Lava Stuff +optional_depends = fire, stairs, mobs_monster, 3d_armor, toolranks, moreblocks, vessels, default, bucket, mcl_armor, mcl_fire, mcl_buckets, mcl_nether, mcl_potions, mcl_core, mcl_mobitems, mcl_tools, nc_fire diff --git a/mods/lavastuff/readme.md b/mods/lavastuff/readme.md new file mode 100644 index 0000000..466ac87 --- /dev/null +++ b/mods/lavastuff/readme.md @@ -0,0 +1,32 @@ +# Lavastuff + +[![](https://github.com/minetest-mods/lavastuff/workflows/Check%20&%20Release/badge.svg)](https://github.com/minetest-mods/lavastuff/actions) + +Adds lava armor, tools, and blocks + +## **API** + +* **lavastuff.burn_drops("tool:itemstring")** - Cooks all of the nodes that **tool:itemstring** digs +* **lavastuff.enable_tool_fire** - Enable/Disable the lava tool fire feature +* **lavastuff.blacklisted_items** - Prevent lava tools from smelting certain nodes. See code for how to add an item to the list +* **lavastuff.cook_limit** - Prevent lava tools from smelting dug nodes if cooktime is too high +* **lavastuff.tool_fire_func** - The function used by lavastuff tools to place fire + +## **Game support** +* **Minetest Game** - 100% support +* **MineClone2** - (Some features are lost) + +## **Language support** + +* **Spanish** - (Thanks to **runs** & **xenonca**) +* **French** - (Thanks to **Brian Gaucher** and **louisroyer**) +* **German** - (Thanks to **xenonca**) +* **Italian** - (Thanks to **xenonca**) + +## **Special Features** + +* **Tool Fire** - Lights flammable nodes on fire when rightclicked. If node has set on_ignite then that function will be run instead of the fire being placed +* **Autosmelt** - All nodes dug with a lava tool will be automatically smelted before being added to your inventory +* **Buurn** - If the fire_plus mod is enabled players will catch on fire when hit with a lava tool + +Most features can be disabled. If I don't have a setting to disable something you want to disable: Just ask! diff --git a/mods/lavastuff/screenshot.png b/mods/lavastuff/screenshot.png new file mode 100644 index 0000000..7b505f0 Binary files /dev/null and b/mods/lavastuff/screenshot.png differ diff --git a/mods/lavastuff/settingtypes.txt b/mods/lavastuff/settingtypes.txt new file mode 100644 index 0000000..544e1e0 --- /dev/null +++ b/mods/lavastuff/settingtypes.txt @@ -0,0 +1,5 @@ +#Cooktime limit +lavastuff_cook_limit (Tools will not smelt items if their cooking time is too long) int 15 + +#Enable lightup +lavastuff_enable_tool_fire (Tools light up the area around a player upon rightclicking) bool true \ No newline at end of file diff --git a/mods/lavastuff/textures/lavastuff_axe.png b/mods/lavastuff/textures/lavastuff_axe.png new file mode 100644 index 0000000..64ea57a Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_axe.png differ diff --git a/mods/lavastuff/textures/lavastuff_block.png b/mods/lavastuff/textures/lavastuff_block.png new file mode 100644 index 0000000..9af9189 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_block.png differ diff --git a/mods/lavastuff/textures/lavastuff_boots_lava.png b/mods/lavastuff/textures/lavastuff_boots_lava.png new file mode 100644 index 0000000..415c615 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_boots_lava.png differ diff --git a/mods/lavastuff/textures/lavastuff_boots_lava_preview.png b/mods/lavastuff/textures/lavastuff_boots_lava_preview.png new file mode 100644 index 0000000..ba04580 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_boots_lava_preview.png differ diff --git a/mods/lavastuff/textures/lavastuff_chestplate_lava.png b/mods/lavastuff/textures/lavastuff_chestplate_lava.png new file mode 100644 index 0000000..4d6bb0b Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_chestplate_lava.png differ diff --git a/mods/lavastuff/textures/lavastuff_chestplate_lava_preview.png b/mods/lavastuff/textures/lavastuff_chestplate_lava_preview.png new file mode 100644 index 0000000..07e1182 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_chestplate_lava_preview.png differ diff --git a/mods/lavastuff/textures/lavastuff_helmet_lava.png b/mods/lavastuff/textures/lavastuff_helmet_lava.png new file mode 100644 index 0000000..6c15182 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_helmet_lava.png differ diff --git a/mods/lavastuff/textures/lavastuff_helmet_lava_preview.png b/mods/lavastuff/textures/lavastuff_helmet_lava_preview.png new file mode 100644 index 0000000..be4362c Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_helmet_lava_preview.png differ diff --git a/mods/lavastuff/textures/lavastuff_ingot.png b/mods/lavastuff/textures/lavastuff_ingot.png new file mode 100644 index 0000000..c5905e1 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_ingot.png differ diff --git a/mods/lavastuff/textures/lavastuff_inv_boots.png b/mods/lavastuff/textures/lavastuff_inv_boots.png new file mode 100644 index 0000000..c946ea0 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_inv_boots.png differ diff --git a/mods/lavastuff/textures/lavastuff_inv_chestplate.png b/mods/lavastuff/textures/lavastuff_inv_chestplate.png new file mode 100644 index 0000000..dcae2d0 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_inv_chestplate.png differ diff --git a/mods/lavastuff/textures/lavastuff_inv_helmet.png b/mods/lavastuff/textures/lavastuff_inv_helmet.png new file mode 100644 index 0000000..8bab041 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_inv_helmet.png differ diff --git a/mods/lavastuff/textures/lavastuff_inv_leggings.png b/mods/lavastuff/textures/lavastuff_inv_leggings.png new file mode 100644 index 0000000..d995578 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_inv_leggings.png differ diff --git a/mods/lavastuff/textures/lavastuff_inven_shield.png b/mods/lavastuff/textures/lavastuff_inven_shield.png new file mode 100644 index 0000000..ad94701 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_inven_shield.png differ diff --git a/mods/lavastuff/textures/lavastuff_lava_in_a_bottle.png b/mods/lavastuff/textures/lavastuff_lava_in_a_bottle.png new file mode 100644 index 0000000..1e2067d Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_lava_in_a_bottle.png differ diff --git a/mods/lavastuff/textures/lavastuff_leggings.png b/mods/lavastuff/textures/lavastuff_leggings.png new file mode 100644 index 0000000..c2cc41f Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_leggings.png differ diff --git a/mods/lavastuff/textures/lavastuff_leggings_preview.png b/mods/lavastuff/textures/lavastuff_leggings_preview.png new file mode 100644 index 0000000..082db4d Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_leggings_preview.png differ diff --git a/mods/lavastuff/textures/lavastuff_pick.png b/mods/lavastuff/textures/lavastuff_pick.png new file mode 100644 index 0000000..ea844ba Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_pick.png differ diff --git a/mods/lavastuff/textures/lavastuff_shield_lava.png b/mods/lavastuff/textures/lavastuff_shield_lava.png new file mode 100644 index 0000000..78c2847 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_shield_lava.png differ diff --git a/mods/lavastuff/textures/lavastuff_shield_lava_preview.png b/mods/lavastuff/textures/lavastuff_shield_lava_preview.png new file mode 100644 index 0000000..971bfd1 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_shield_lava_preview.png differ diff --git a/mods/lavastuff/textures/lavastuff_shovel.png b/mods/lavastuff/textures/lavastuff_shovel.png new file mode 100644 index 0000000..daf8679 Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_shovel.png differ diff --git a/mods/lavastuff/textures/lavastuff_sword.png b/mods/lavastuff/textures/lavastuff_sword.png new file mode 100644 index 0000000..fe15c2c Binary files /dev/null and b/mods/lavastuff/textures/lavastuff_sword.png differ diff --git a/mods/lavastuff/textures/license.txt b/mods/lavastuff/textures/license.txt new file mode 100644 index 0000000..678c82e --- /dev/null +++ b/mods/lavastuff/textures/license.txt @@ -0,0 +1,97 @@ +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. + +Section 1 – Definitions. + +Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. +Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. +BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. +Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. +Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. +Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. +License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. +Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. +Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. +Licensor means the individual(s) or entity(ies) granting rights under this Public License. +NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. +Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. +Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. +You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. +Section 2 – Scope. + +License grant. +Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: +reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and +produce, reproduce, and Share Adapted Material for NonCommercial purposes only. +Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. +Term. The term of this Public License is specified in Section 6(a). +Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. +Downstream recipients. +Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. +Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. +No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. +No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). +Other rights. + +Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. +Patent and trademark rights are not licensed under this Public License. +To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following conditions. + +Attribution. + +If You Share the Licensed Material (including in modified form), You must: + +retain the following if it is supplied by the Licensor with the Licensed Material: +identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); +a copyright notice; +a notice that refers to this Public License; +a notice that refers to the disclaimer of warranties; +a URI or hyperlink to the Licensed Material to the extent reasonably practicable; +indicate if You modified the Licensed Material and retain an indication of any previous modifications; and +indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. +You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. +If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. +ShareAlike. +In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. + +The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. +You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. +You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: + +for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; +if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and +You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. +To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. +The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. +Section 6 – Term and Termination. + +This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. +Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: + +automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or +upon express reinstatement by the Licensor. +For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. +For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. +Sections 1, 5, 6, 7, and 8 survive termination of this Public License. +Section 7 – Other Terms and Conditions. + +The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. +Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. +Section 8 – Interpretation. + +For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. +To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. +No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. +Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. diff --git a/mods/lavastuff/textures/zmobs_lava_orb.png b/mods/lavastuff/textures/zmobs_lava_orb.png new file mode 100644 index 0000000..bffd74c Binary files /dev/null and b/mods/lavastuff/textures/zmobs_lava_orb.png differ diff --git a/mods/lucky_block/README.md b/mods/lucky_block/README.md new file mode 100644 index 0000000..ef8143f --- /dev/null +++ b/mods/lucky_block/README.md @@ -0,0 +1,28 @@ +Lucky Block mod [lucky_block] + +This mod adds a new and exciting block to the game which when broken can give +the player something good, surprising, bad, hurtful or just simply a troll. + +Lucky Blocks can be crafted with 1 chest surrounded by gold ingots. + +The api.txt document shows how to add your own blocks to the list by using +one of the 9 commands included and the blocks.lua file gives you many examples +by using some of the popular mods available. + +https://forum.minetest.net/viewtopic.php?f=9&t=13284 + +Changelog: + +- 0.1 - Initial release +- 0.2 - New api commands added thanks to blert2112 +- 0.3 - New blocks added, also error checking, new options and schematic rehaul +- 0.4 - Added ability to add custom functions within lucky blocks +- 0.5 - Explosions now have radius and fire setting, also added new blocks +- 0.6 - Use TNT mod for explosions and if not active do entity damage only +- 0.7 - Added new floor feature and moreblocks support +- 0.8 - Added wishing well with random block drops +- 0.9 - Tweak item drops, add replacements to schematics, tidy wishing well code +- 1.0 - Added ability for custom lucky blocks to use their own block list +- 1.1 - Spawning mobs can now select randomly from a table or single string + +Lucky Blocks: 253 (depending on mods enabled) diff --git a/mods/lucky_block/api.txt b/mods/lucky_block/api.txt new file mode 100644 index 0000000..6edd8df --- /dev/null +++ b/mods/lucky_block/api.txt @@ -0,0 +1,353 @@ + +Lucky Block API +=============== + +This guide will show you how to add schematic files and lucky blocks from +within your own mods. Please make sure that lucky_block appears in the +depends.txt file of your mod so everything work properly. + + +Function Usage +============== + + +Purge Block List +---------------- + +lucky_block:purge_block_list() + +This command is used to clear all of the blocks in the lucky block list so that +you can add your own. + + +Add Lucky Blocks to list +------------------------ + +lucky_block:add_blocks({ block definitions here }) + +This command is used to add new blocks to the lucky block list. + +e.g. + +lucky_block:add_blocks({ + {"nod", "default:dirt", 0}, + {"dro", {"default:dirt"}, 5}, +}) + + +Purge Chest Items +----------------- + +lucky_block:purge_chest_items() + +This command is used to purge all items in the default chest list so that you +can add your own. + + +Add Items to Default Chest +-------------------------- + +lucky_block:add_chest_items({ add new default chest items here }) + +This command lets you add new items to the default chest when it appears +inside a lucky block. + +e.g. + +lucky_block:add_chest_items({ + {name = "default:apple", max = 3}, + {name = "default:steel_ingot", max = 2}, + {name = "default:pick_steel", max = 1} +}) + + +Add Schematics to List +---------------------- + +lucky_block:add_schematics({ add new schematic definitions here }) + +This command lets you add schematic files and arrays to the list so they can +be added to the lucky block list. + +e.g. check for Ethereal mod then get the path and add two of the tree's to the +schematic list and finally to the lucky block list: + +if minetest.get_modpath("ethereal") then + local path = minetest.get_modpath("ethereal") .. "/schematics/" + + lucky_block:add_schematics({ + -- name on list, schematic, offset placement + {"appletree", ethereal.appletree, {x = 1, y = 0, z = 1}}, + {"bananatree", ethereal.bananatree, {x = 3, y = 0, z = 3}}, + } + + lucky_block:add_blocks({ + {"sch", "appletree", 0, false}, + {"sch", "bananatree", 0, false}, + }) +end + + +Open Lucky Block +---------------- + +lucky_block:open(pos, digger, blocks_list) + +This is the function called when the default lucky block has been dug, it will +use the default blocks list or use a custom one when supplied so that modders +can add their own lucky block sets. + +e.g. + +local my_blocks = { + {"nod", "default:wood"}, + {"dro", {"default:tree", "default:jungletree"}, 5}, + {"exp"}, +} + +minetest.register_node('mymod:my_lucky_block', { + description = "My Lucky Block", + tiles = {"mymod_lucky_block.png"}, + paramtype = "light", + groups = {oddly_breakable_by_hand = 3}, + drop = {}, + sounds = default.node_sound_wood_defaults(), + + on_dig = function(pos, node, digger) + minetest.remove_node(pos) -- remove lucky block + lucky_block:open(pos, digger, my_blocks) -- use custom blocks list + end, +}) + + +Lucky Block Commands +==================== + +Using the lucky_block:add_blocks() command gives you access to many features +from within this mod, these are listed below using this general format: + +lucky_block:add_blocks({ + {"command", command options}, + ..etc +}) + + +Place Node +---------- + +This command will place a node in place of the lucky block or at the players +standing position. + +{"nod", "node name", position, chest items} + +e.g. + +Place a dirt block where lucky block was + + {"nod", "default:dirt", 0} + +Place a chest containing random items from default chest items list + + {"nod", "default:chest", 0} + +Place chest as above only add up to 5x roses as well + + {"nod", "default:chest", 0, { {name = "flowers:rose, max = 4} }} + +Place fire at player position + + {"nod", "fire:basic_flame", 1} + + +Drop Item(s) +------------ + +This command will throw a single or multiple items out of a lucky block, +random colours can be used also. + +{"dro", {"item names"}, how many to drop, use random colours} + +e.g. + +Drop 5x torches as itemstack + {"dro", {"default:torch"}, 5} + +Drop 10x randomly coloured wool (colour name added to end of item string) + {"dro", {"wool:"}, 10, true} + +Drop 1x random tool from list + {"dro", {"default:pick_mese", "default:shovel_steel", "default:axe_diamond"}, 1} + + +Place Schematic +--------------- + +This command lets you place a pre-added schematic file or definition in place +of the lucky block or at the player position. + +{"sch", "schematic name", position, force placement, replacements} + +e.g. + +Place lucky platform at player position and force placement + {"sch", "platform", 1, true} + +Place apple tree where lucky block use to be + {"sch", "appletree", 0, false} + +Place apple tree where lucky block use to be and change wood into stone + {"sch", "appletree", 0, false, {{"default:wood", "default:stone"}} } + + +Spawn Entity or Mob +------------------- + +This command allows you to place a monster, animal or other entity. + +{"spw", {"entity name"}, how many to spawn, tamed, owned, range, nametag} + +e.g. + +Spawn 2x Dirt or Stone Monsters over a radius of 10 blocks + {"spw", {"mobs:dirt_monster", "mobs:stone_monster"}, 2, nil, nil, 10} + +Spawn 5x randomly coloured sheep (random colour only works with Mobs Redo sheep) + {"spw", "mobs:sheep", 5} + +Spawn a single NPC who is tamed and owned by player and called "Bob" + {"spw", "mobs:npc", 1, true, true, 1, "Bob"} + + +Falling Blocks +-------------- + +This command allows for a tower of blocks or blocks falling within a set area. + +{"fal", {"node list"}, position, spread, range} + +e.g. + +Drop 2x sand and 1x gold block spread over a range of 5 blocks + + {"fal", {"default:sand", "default:sand", "default:goldblock"}, 0, true, 5} + +Drop 3x obsidian onto player as a tower + {"fal", {"default:obsidian", "default:obsidian", "default:obsidian"}, 1} + + +Troll Block +----------- + +This command is similar to the place node command only it allows for a sound to +be played on placement, then after two seconds the block will disappear or +can explode causing damage to nearby players. + +{"tro", "node name", "sound", explode} + +e.g. + +Add diamond block then after 2 seconds remove with explosion + + {"tro", "default:diamondblock", nil, true} + +Add gold block with wood sound, then after 2 seconds remove with pop + + {"tro", "default:goldblock", "default_wood_footstep", nil} + + +Random Teleport +--------------- + +This command will teleport the player opening the lucky block a random number +of blocks away using a preset range. + +{"tel", horizontal range, vertical range} + +e.g. + +Teleport player to random position 10 blocks left/right and 5 blocks up/under + + {"tel", 10, 5} + + +Explosion +--------- + +Now we start adding the bad lucky blocks that cause damage to the player by +adding explosions. + +{"exp", radius} + +e.g. + +Cause explosion with damage radius of 4. + +{"exp", 4} + + +Lightning Strike +---------------- + +This is one of my favourite commands, lightning strikes the player and hurts +everyone else nearby, can also place fire at strike position. + +{"lig", "fire node"} + +e.g. + +Strike player and place temporary fire + + {"lig", "fire:basic_flame"} + +Strike player and place permanent flame + + {"lig", "fire:permanent_flame"} + + +Floor Placement +--------------- + +This feature places random blocks from the list provided to make a floor under +the lucky block with a pause after each block. + +{"flo", width, {node_list}, offset}, + +e.g. + +Place a three wide obsidian and gold block floor with offset of 1 to centre on +lucky block + + {"flo", 3, {"default:goldblock", "default:obsidian"}, 1} + +Have a woolen floor at 5 width with offset of 2 to keep it centred + + {"flo", 5, {"wool:red", "wool:blue", "wool:white", "wool:orange"}, 2} + + +Custom Function +--------------- + +This allows mod makers to use there own functions when opening lucky blocks and +passes the block position and player opening it. + +{"cus", myfunction} + +e.g. + +Punch player and deal 5 damage points (function first then line to add l.block) + +local function punchy(pos, player) + player:punch(player, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = 5} + }, nil) +end + + {"cus", punchy} + + +Final Words +=========== + +I hope this guide helps you add lucky blocks from within your own mods and for +more examples please check out the blocks.lua and schems.lua files. diff --git a/mods/lucky_block/blocks.lua b/mods/lucky_block/blocks.lua new file mode 100644 index 0000000..d7e6a56 --- /dev/null +++ b/mods/lucky_block/blocks.lua @@ -0,0 +1,669 @@ + +-- Load support for intllib. +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP .. "/intllib.lua") + + +-- Default tree schematics +local dpath = minetest.get_modpath("default") .. "/schematics/" + +lucky_block:add_schematics({ + {"appletree", dpath .. "apple_tree_from_sapling.mts", {x = 2, y = 1, z = 2}}, + {"jungletree", dpath .. "jungle_tree_from_sapling.mts", {x = 2, y = 1, z = 2}}, + {"defpinetree", dpath .. "pine_tree_from_sapling.mts", {x = 2, y = 1, z = 2}}, + {"acaciatree", dpath .. "acacia_tree_from_sapling.mts", {x = 4, y = 1, z = 4}}, + {"aspentree", dpath .. "aspen_tree_from_sapling.mts", {x = 2, y = 1, z = 2}}, + {"corals", dpath .. "corals.mts", {x = 2, y = 1, z = 2}}, + {"largecactus", dpath .. "large_cactus.mts", {x = 2, y = 0, z = 0}}, + {"defaultbush", dpath .. "bush.mts", {x = 1, y = 1, z = 1}}, + {"acaciabush", dpath .. "acacia_bush.mts", {x = 1, y = 1, z = 1}}, +}) + +-- Default blocks +lucky_block:add_blocks({ + {"lig"}, + {"fal", {"default:wood", "default:gravel", "default:sand", + "default:desert_sand", "default:stone", "default:dirt", + "default:goldblock"}, 0}, + {"sch", "watertrap", 1, true}, + {"tel"}, + {"dro", {"default:apple"}, 10}, + {"sch", "appletree", 0, false}, + {"dro", {"default:snow"}, 10}, + {"nod", "default:chest", 0, { + {name = "bucket:bucket_water", max = 1}, + {name = "default:wood", max = 3}, + {name = "default:pick_diamond", max = 1}, + {name = "default:coal_lump", max = 3} } }, + {"sch", "sandtrap", 1, true}, + {"sch", "defpinetree", 0, false}, + {"sch", "lavatrap", 1, true}, + {"dro", {"default:mese_crystal_fragment"}, 15}, + {"dro", {"default:mese_crystal"}, 10}, + {"dro", {"default:mese"}, 1}, + {"exp", 2}, + {"sch", "acaciabush", 0, false}, + {"nod", "default:diamondblock", 0}, + {"nod", "default:steelblock", 0}, + {"nod", "default:dirt", 0}, + {"nod", "default:chest", 0, { + {name = "default:dirt", max = 15}, + {name = "default:dirt_with_dry_grass", max = 15}, + {name = "default:dirt_with_rainforest_litter", max = 15}, + {name = "default:dirt_with_grass", max = 15}, + {name = "default:dirt_with_snow", max = 15}, + }}, + {"dro", {"dye:"}, 10, true}, + {"dro", {"default:sword_steel"}}, + {"sch", "jungletree", 0, false}, + {"sch", "sandtrap", 1, true, {{"default:sand", "default:silver_sand"}} }, + {"dro", {"default:pick_steel"}}, + {"dro", {"default:shovel_steel"}}, + {"exp"}, + {"dro", {"default:coal_lump"}, 3}, + {"sch", "defaultbush", 0, false}, + {"tro", "default:mese", "tnt_blast", true}, + {"sch", "acaciatree", 0, false}, + {"dro", {"default:axe_steel"}}, + {"dro", {"default:sword_bronze"}}, + {"exp", 3}, + {"nod", "default:chest", 0, { + {name = "default:acacia_sapling", max = 10}, + {name = "default:aspen_sapling", max = 10}, + {name = "default:pine_sapling", max = 10}, + {name = "default:sapling", max = 10}, + {name = "default:junglesapling", max = 10}, + {name = "default:acacia_bush_sapling", max = 5}, + {name = "default:bush_sapling", max = 5}, + }}, + {"sch", "platform", 1, true}, + {"nod", "default:wood", 0}, + {"dro", {"default:pick_bronze"}}, + {"sch", "aspentree", 0, false}, + {"dro", {"default:shovel_bronze"}}, + {"nod", "default:gravel", 0}, + {"sch", "sandtrap", 1, true, {{"default:sand", "default:gravel"}} }, + {"sch", "largecactus", 0, false}, + {"dro", {"default:axe_bronze"}}, + {"dro", {"default:bookshelf", "default:book", "default:paper"}, 5}, + {"dro", {"default:fence_wood"}, 10}, + {"dro", {"default:fence_acacia_wood"}, 10}, + {"dro", {"default:fence_aspen_wood"}, 10}, + {"dro", {"default:fence_junglewood"}, 10}, + {"dro", {"default:fence_pine_wood"}, 10}, + {"sch", "obsidiantrap", 1, true}, + {"sch", "sandtrap", 1, true, {{"default:sand", "default:desert_sand"}} }, + {"nod", "default:chest", 0, { + {name = "default:acacia_wood", max = 10}, + {name = "default:aspen_wood", max = 10}, + {name = "default:pine_wood", max = 10}, + {name = "default:wood", max = 10}, + {name = "default:junglewood", max = 10}, + }}, + {"nod", "default:chest", 0, { + {name = "default:acacia_tree", max = 10}, + {name = "default:aspen_tree", max = 10}, + {name = "default:pine_tree", max = 10}, + {name = "default:tree", max = 10}, + {name = "default:jungletree", max = 10}, + }}, + {"dro", {"default:coral_brown"}, 5}, + {"dro", {"default:coral_orange"}, 5}, + {"dro", {"default:coral_skeleton"}, 5}, + {"sch", "corals", 0, true}, + {"dro", {"default:mese_post_light"}, 5}, + {"dro", {"default:fence_wood"}, 5}, + {"nod", "default:mese_post_light"}, + {"dro", {"default:silver_sand"}, 20}, + {"dro", {"default:sand"}, 20}, + {"dro", {"default:desert_sand"}, 20}, + {"dro", {"default:gravel"}, 15}, + {"nod", "default:chest", 0, { + {name = "default:silver_sand", max = 20}, + {name = "default:silver_sandstone", max = 20}, + {name = "default:desert_sand", max = 20}, + {name = "default:silver_sandstone", max = 20}, + {name = "default:sand", max = 20}, + {name = "default:sandstone", max = 20}, + {name = "default:gravel", max = 20}, + }}, +}) + +local green = minetest.get_color_escape_sequence("#1eff00") + +-- custom function (punches player with 5 damage) +local function punchy(pos, player) + + player:punch(player, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = 5} + }, nil) + + minetest.sound_play("player_damage", {pos = pos, gain = 1.0}) + + minetest.chat_send_player(player:get_player_name(), + green .. S("Stop hitting yourself!")) +end + +-- custom function (pint sized player) +local function pint(pos, player) + + player:set_properties({visual_size = {x = 0.5, y = 0.5}}) + + minetest.chat_send_player(player:get_player_name(), + green .. S("Pint Sized Player!")) + + minetest.sound_play("default_place_node", {pos = pos, gain = 1.0}) + + minetest.after (180, function(player, pos) -- 3 minutes + + if player and player:is_player() then + + player:set_properties({visual_size = {x = 1.0, y = 1.0}}) + + minetest.sound_play("default_place_node", {pos = pos, gain = 1.0}) + end + end, player) +end + +-- custom function (drop player inventory and replace with dry shrubs) +local function bushy(pos, player) + + local player_inv = player:get_inventory() + + pos = player:get_pos() or pos + + for i = 1, player_inv:get_size("main") do + + local obj = minetest.add_item(pos, player_inv:get_stack("main", i)) + + if obj then + + obj:setvelocity({ + x = math.random(-10, 10) / 9, + y = 5, + z = math.random(-10, 10) / 9, + }) + end + + player_inv:set_stack("main", i, "default:dry_shrub") + end + + minetest.chat_send_player(player:get_player_name(), + green .. S("Dry shrub takeover!")) +end + +lucky_block:add_blocks({ + {"cus", pint}, + {"cus", bushy}, + {"cus", punchy}, +}) + +-- wool mod +if minetest.get_modpath("wool") then + lucky_block:add_blocks({ + {"dro", {"wool:"}, 10, true}, + }) +end + +-- extra doors mod +if minetest.get_modpath("extra_doors") then + lucky_block:add_blocks({ + {"dro", {"default:steel_rod"}, 10}, + {"dro", {"extra_doors:door_woodpanel1"}, 1}, + {"dro", {"extra_doors:door_woodglass1"}, 1}, + {"dro", {"extra_doors:door_woodglass2"}, 1}, + {"dro", {"extra_doors:door_door_japanese"}, 1}, + {"dro", {"extra_doors:door_door_french"}, 1}, + {"dro", {"extra_doors:door_door_cottage1"}, 1}, + {"dro", {"extra_doors:door_door_cottage2"}, 1}, + {"dro", {"extra_doors:door_door_barn1"}, 1}, + {"lig"}, + {"dro", {"extra_doors:door_door_barn2"}, 1}, + {"dro", {"extra_doors:door_door_castle1"}, 1}, + {"dro", {"extra_doors:door_door_castle2"}, 1}, + {"dro", {"extra_doors:door_door_mansion1"}, 1}, + {"dro", {"extra_doors:door_door_mansion2"}, 1}, + {"dro", {"extra_doors:door_door_dungeon1"}, 1}, + {"dro", {"extra_doors:door_door_dungeon2"}, 1}, + {"dro", {"extra_doors:door_door_steelpanel1"}, 1}, + {"dro", {"extra_doors:door_door_steelglass1"}, 1}, + {"dro", {"extra_doors:door_door_steelglass2"}, 1}, + }) +end + +-- Flowers mod +if minetest.get_modpath("flowers") then + lucky_block:add_blocks({ + {"nod", "flowers:rose", 0}, + {"dro", {"flowers:mushroom_red"}, 5}, + {"dro", {"flowers:mushroom_brown"}, 5}, + {"dro", {"flowers:rose", "flowers:tulip", "flowers:dandelion_yellow", + "flowers:geranium", "flowers:viola", "flowers:dandelion_white"}, 12}, + {"nod", "default:chest", 0, { + {name = "flowers:geranium", max = 15}, + {name = "flowers:viola", max = 15}, + {name = "flowers:dandelion_white", max = 15}, + {name = "flowers:dandelion_yellow", max = 15}, + {name = "flowers:tulip", max = 15}, + {name = "flowers:rose", max = 15}, + {name = "flowers:mushroom_brown", max = 10}, + {name = "flowers:mushroom_red", max = 10}, + {name = "flowers:waterlily", max = 10}, + }}, + }) +end + +-- Doors mod +if minetest.get_modpath("doors") then + lucky_block:add_blocks({ + {"dro", {"doors:door_wood"}}, + {"dro", {"doors:door_steel"}}, + {"dro", {"doors:door_glass"}}, + {"dro", {"doors:door_obsidian_glass"}}, + {"dro", {"doors:trapdoor"}}, + {"dro", {"doors:trapdoor_steel"}}, + {"dro", {"doors:gate_acacia_wood_closed"}}, + {"dro", {"doors:gate_aspen_wood_closed"}}, + {"dro", {"doors:gate_wood_closed"}}, + {"dro", {"doors:gate_pine_wood_closed"}}, + {"dro", {"doors:gate_junglewood_closed"}}, + }) +end + +-- Screwdriver mod +if minetest.get_modpath("screwdriver") then + +if screwdriver and screwdriver.handler then +minetest.register_tool(":screwdriver:screwdriver_magenta", { + description = S("Super Mega Magenta Ultra Screwdriver 2500\n(left-click to rotate face, right-click to rotates axis)"), + inventory_image = "screwdriver.png^[colorize:#ff009970", + groups = {not_in_creative_inventory = 1}, + + on_use = function(itemstack, user, pointed_thing) + screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 2500) + return itemstack + end, + + on_place = function(itemstack, user, pointed_thing) + screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, 2500) + return itemstack + end, +}) +end + + lucky_block:add_blocks({ + {"dro", {"screwdriver:screwdriver"}}, + {"dro", {"screwdriver:screwdriver_magenta"}}, + }) +end + +-- Vessels mod +if minetest.get_modpath("vessels") then + lucky_block:add_blocks({ + {"dro", {"vessels:shelf", "vessels:drinking_glass", "vessels:glass_bottle", + "vessels:steel_bottle", "vessels:glass_fragments"}, 5}, + {"nod", "vessels:drinking_glass", 0}, + {"nod", "vessels:glass_bottle", 0}, + {"nod", "vessels:steel_bottle", 0}, + }) +end + +-- Farming mod (default) +if minetest.get_modpath("farming") then + lucky_block:add_blocks({ + {"dro", {"farming:bread"}, 5}, + {"sch", "instafarm", 0, true}, + {"nod", "default:water_source", 1}, + }) +end + +-- Home Decor mod +if minetest.get_modpath("homedecor") then + lucky_block:add_blocks({ + {"nod", "homedecor:toilet", 0}, + {"nod", "homedecor:table", 0}, + {"nod", "homedecor:chair", 0}, + {"nod", "homedecor:table_lamp_off", 0}, + {"dro", {"homedecor:plastic_sheeting", "homedecor:plastic_base"}, 15}, + {"dro", {"homedecor:roof_tile_terracotta"}, 20}, + {"dro", {"homedecor:shutter_oak"}, 5}, + {"dro", {"homedecor:shutter_black"}, 5}, + {"dro", {"homedecor:shutter_dark_grey"}, 5}, + {"dro", {"homedecor:shutter_grey"}, 5}, + {"dro", {"homedecor:shutter_white"}, 5}, + {"dro", {"homedecor:shutter_mahogany"}, 5}, + {"dro", {"homedecor:shutter_yellow"}, 5}, + {"dro", {"homedecor:shutter_forest_green"}, 5}, + {"dro", {"homedecor:shutter_light_blue"}, 5}, + {"dro", {"homedecor:shutter_violet"}, 5}, + {"dro", {"homedecor:table_legs_wrought_iron", "homedecor:utility_table_legs"}, 5}, + {"dro", {"homedecor:pole_wrought_iron"}, 10}, + {"dro", {"homedecor:fence_picket_white"}, 20}, + }) +end + +-- Boats mod +if minetest.get_modpath("boats") then + lucky_block:add_blocks({ + {"dro", {"boats:boat"}}, + }) +end + +-- Beds mod +if minetest.get_modpath("beds") then + lucky_block:add_blocks({ + {"dro", {"beds:bed"}}, + {"dro", {"beds:fancy_bed"}}, + }) +end + +-- Walls mod +if minetest.get_modpath("walls") then + lucky_block:add_blocks({ + {"dro", {"walls:cobble"}, 10}, + {"dro", {"walls:mossycobble"}, 10}, + {"dro", {"walls:desertcobble"}, 10}, + }) +end + +-- Carts mod +if minetest.get_modpath("carts") +or minetest.get_modpath("boost_cart") then + lucky_block:add_blocks({ + {"dro", {"carts:cart"}}, + {"dro", {"default:rail"}, 10}, + {"dro", {"carts:powerrail"}, 5}, + }) +end + +-- 3D Armor mod +if minetest.get_modpath("3d_armor") then +lucky_block:add_blocks({ + {"dro", {"3d_armor:boots_wood"}}, + {"dro", {"3d_armor:leggings_wood"}}, + {"dro", {"3d_armor:chestplate_wood"}}, + {"dro", {"3d_armor:helmet_wood"}}, + {"tel"}, + {"dro", {"3d_armor:boots_steel"}}, + {"dro", {"3d_armor:leggings_steel"}}, + {"dro", {"3d_armor:chestplate_steel"}}, + {"dro", {"3d_armor:helmet_steel"}}, + {"dro", {"3d_armor:boots_gold"}}, + {"dro", {"3d_armor:leggings_gold"}}, + {"dro", {"3d_armor:chestplate_gold"}}, + {"exp"}, + {"dro", {"3d_armor:helmet_gold"}}, + {"dro", {"3d_armor:boots_cactus"}}, + {"dro", {"3d_armor:leggings_cactus"}}, + {"dro", {"3d_armor:chestplate_cactus"}}, + {"dro", {"3d_armor:helmet_cactus"}}, + {"dro", {"3d_armor:boots_bronze"}}, + {"dro", {"3d_armor:leggings_bronze"}}, + {"dro", {"3d_armor:chestplate_bronze"}}, + {"dro", {"3d_armor:helmet_bronze"}}, + {"lig"}, +}) +end + +-- 3D Armor's Shields mod +if minetest.get_modpath("shields") then +lucky_block:add_blocks({ + {"dro", {"shields:shield_wood"}}, + {"dro", {"shields:shield_steel"}}, + {"dro", {"shields:shield_gold"}}, + {"dro", {"shields:shield_cactus"}}, + {"dro", {"shields:shield_bronze"}}, + {"exp", 2}, +}) +end + +-- Fire mod +if minetest.get_modpath("fire") then +lucky_block:add_blocks({ + {"dro", {"fire:flint_and_steel"}}, + {"dro", {"default:flint"}, 5}, + {"nod", "fire:basic_flame", 1}, + {"nod", "fire:permanent_flame", 1}, + {"sch", "firetrap", 1, true}, +}) +end + +-- Caverealms +if minetest.get_modpath("caverealms") then +lucky_block:add_blocks({ + {"sch", "sandtrap", 1, true, {{"default:sand", "caverealms:coal_dust"}} }, + {"sch", "obsidiantrap", 1, true, {{"default:obsidian", "caverealms:glow_obsidian_brick_2"}} }, + {"flo", 5, {"caverealms:stone_with_moss"}, 2}, + {"flo", 5, {"caverealms:stone_with_lichen"}, 2}, + {"flo", 5, {"caverealms:stone_with_algae"}, 2}, +}) +end + +-- TNT mod +if minetest.get_modpath("tnt") then +local p = "tnt:tnt_burning" +lucky_block:add_blocks({ + {"dro", {"tnt:gunpowder"}, 5}, + {"fal", {p, p, p, p, p}, 1, true, 4}, + {"nod", "tnt:tnt_burning", 0}, +}) +end + +-- More Ore's mod +if minetest.get_modpath("moreores") then +lucky_block:add_blocks({ + {"nod", "moreores:tin_block", 0}, + {"nod", "moreores:silver_block", 0}, + {"fal", {"default:sand", "default:sand", "default:sand", "default:sand", + "default:sand", "default:sand", "moreores:mithril_block"}, 0}, + {"dro", {"moreores:pick_silver"}}, + {"dro", {"moreores:pick_mithril"}}, + {"tro", "moreores:silver_block"}, + {"dro", {"moreores:shovel_silver"}}, + {"dro", {"moreores:shovel_mithril"}}, + {"dro", {"moreores:axe_silver"}}, + {"dro", {"moreores:axe_mithril"}}, + {"tro", "moreores:mithril_block"}, + {"dro", {"moreores:hoe_silver"}}, + {"dro", {"moreores:hoe_mithril"}}, + {"lig"}, + {"nod", "default:chest", 0, { + {name = "moreores:silver_lump", max = 10}, + {name = "moreores:mithril_lump", max = 10}, + {name = "default:copper_lump", max = 10}, + {name = "default:gold_lump", max = 10}, + {name = "default:iron_lump", max = 10}, + {name = "default:tin_lump", max = 10}, + {name = "default:coal_lump", max = 10}, + {name = "default:clay_lump", max = 10}, + }}, +}) + +if minetest.get_modpath("3d_armor") then +lucky_block:add_blocks({ + {"dro", {"3d_armor:helmet_mithril"}}, + {"dro", {"3d_armor:chestplate_mithril"}}, + {"dro", {"3d_armor:leggings_mithril"}}, + {"dro", {"3d_armor:boots_mithril"}}, +}) +end + +if minetest.get_modpath("shields") then +lucky_block:add_blocks({ + {"dro", {"shields:shield_mithril"}}, +}) +end + +end -- END moreores + +-- Moreblocks mod +if minetest.get_modpath("moreblocks") then +local p = "moreblocks:" +local lav = {name = "default:lava_source"} +local air = {name = "air"} +local trs = {name = p.."trap_stone"} +local trg = {name = p.."trap_glow_glass"} +local trapstone_trap = { + size = {x = 3, y = 6, z = 3}, + data = { + lav, lav, lav, air, air, air, air, air, air, + air, air, air, air, air, air, trs, trs, trs, + lav, lav, lav, air, air, air, air, air, air, + air, air, air, air, trg, air, trs, air, trs, + lav, lav, lav, air, air, air, air, air, air, + air, air, air, air, air, air, trs, trs, trs, + }, +} + +lucky_block:add_schematics({ + {"trapstonetrap", trapstone_trap, {x = 1, y = 6, z = 1}}, +}) + +lucky_block:add_blocks({ + {"dro", {p.."wood_tile"}, 10}, + {"dro", {p.."wood_tile_center"}, 10}, + {"dro", {p.."wood_tile_full"}, 10}, + {"dro", {p.."wood_tile_offset"}, 10}, + {"dro", {p.."circle_stone_bricks"}, 20}, + {"dro", {p.."grey_bricks"}, 20}, + {"dro", {p.."stone_tile"}, 10}, + {"dro", {p.."split_stone_tile"}, 10}, + {"dro", {p.."split_stone_tile_alt"}, 10}, + {"flo", 5, {"moreblocks:stone_tile", "moreblocks:split_stone_tile"}, 2}, + {"dro", {p.."tar", p.."cobble_compressed"}, 10}, + {"dro", {p.."cactus_brick"}, 10}, + {"dro", {p.."cactus_checker"}, 10}, + {"nod", {p.."empty_bookshelf"}, 0}, + {"dro", {p.."coal_stone"}, 10}, + {"dro", {p.."coal_checker"}, 10}, + {"dro", {p.."coal_stone_bricks"}, 10}, + {"dro", {p.."coal_glass"}, 10}, + {"exp", 3}, + {"dro", {p.."iron_stone"}, 10}, + {"dro", {p.."iron_checker"}, 10}, + {"dro", {p.."iron_stone_bricks"}, 10}, + {"dro", {p.."iron_glass"}, 10}, + {"dro", {p.."trap_obsidian"}, 10}, + {"dro", {p.."trap_sandstone"}, 10}, + {"dro", {p.."trap_desert_stone"}, 10}, + {"dro", {p.."trap_stone"}, 10}, + {"dro", {p.."trap_glass"}, 10}, + {"dro", {p.."trap_glow_glass"}, 10}, + {"dro", {p.."trap_obsidian_glass"}, 10}, + {"lig"}, + {"sch", "trapstonetrap", 0, true}, + {"dro", {p.."all_faces_tree"}, 10}, + {"dro", {p.."all_faces_jungle_tree"}, 10}, + {"dro", {p.."all_faces_pine_tree"}, 10}, + {"dro", {p.."all_faces_acacia_tree"}, 10}, + {"dro", {p.."all_faces_aspen_tree"}, 10}, + {"flo", 3, {p.."all_faces_acacia_tree"}, 1}, + {"dro", {p.."plankstone"}, 10}, + {"fal", {p.."all_faces_tree", p.."all_faces_tree", p.."all_faces_tree", p.."all_faces_tree", p.."all_faces_tree"}, 0}, + {"dro", {p.."glow_glass"}, 10}, + {"dro", {p.."super_glow_glass"}, 10}, + {"dro", {p.."clean_glass"}, 10}, + {"nod", "default:chest", 0, { + {name = p.."rope", max = 10}, + {name = p.."sweeper", max = 1}, + {name = p.."circular_saw", max = 1}, + {name = p.."grey_bricks", max = 10}, + {name = p.."tar", max = 3}}}, + {"flo", 3, {"moreblocks:copperpatina"}, 1}, +}) +end + +-- Bags mod +if minetest.get_modpath("bags") then +minetest.register_craftitem(":bags:spar", { + description = "Spar Bag", + inventory_image = "bags_spar.png", + groups = {bagslots = 2, flammable = 2}, +}) +lucky_block:add_blocks({ + {"dro", {"bags:spar"}}, + {"dro", {"bags:small"}}, + {"dro", {"bags:medium"}}, + {"dro", {"bags:large"}}, + {"dro", {"bags:trolley"}}, +}) +end + +-- Additional Wishing Well Styles +lucky_block:add_blocks({ + {"sch", "wishingwell", 0, true}, + {"sch", "wishingwell", 0, true, { + {"default:stonebrick", "default:silver_sandstone_brick"}, + {"stairs:slab_stonebrick", "stairs:slab_silver_sandstone_brick"}, + {"default:fence_wood", "default:fence_aspen_wood"}, + {"default:steelblock", "default:tinblock"}, + } }, + {"sch", "wishingwell", 0, true, { + {"default:stonebrick", "default:sandstonebrick"}, + {"stairs:slab_stonebrick", "stairs:slab_sandstonebrick"}, + {"default:fence_wood", "default:fence_junglewood"}, + {"default:steelblock", "default:goldblock"}, + } }, + {"sch", "wishingwell", 0, true, { + {"default:stonebrick", "default:desert_stonebrick"}, + {"stairs:slab_stonebrick", "stairs:slab_desert_stonebrick"}, + {"default:fence_wood", "default:fence_acacia_wood"}, + {"default:steelblock", "default:copperblock"}, + } }, + {"sch", "wishingwell", 0, true, { + {"default:stonebrick", "default:desert_sandstone_brick"}, + {"stairs:slab_stonebrick", "stairs:slab_desert_sandstone_brick"}, + {"default:fence_wood", "default:fence_pine_wood"}, + {"default:steelblock", "default:bronzeblock"}, + } }, +}) + +-- Special items +minetest.register_node("lucky_block:void_mirror", { + description = S("Void Mirror (Place to see through solid walls during daytime)"), + drawtype = "normal", + tiles = {"default_obsidian_glass.png^[brighten"}, + use_texture_alpha = true, + groups = {snappy = 3, not_in_creative_inventory = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +lucky_block:add_blocks({ + {"dro", {"lucky_block:void_mirror"}}, +}) + +-- Troll +local green = minetest.get_color_escape_sequence("#1eff00") + +local function fake_diamonds(pos, player) + + for n = 1, 25 do + + minetest.add_particle({ + time = 15, + pos = { + x = pos.x + math.random(-20, 20) / 10, + y = pos.y, + z = pos.z + math.random(-20, 20) / 10, + }, + velocity = {x = 0, y = 2, z = 0}, + acceleration = {x = 0, y = -10, z = 0}, + expirationtime = 4, + maxsize = 4, + texture = "default_diamond.png", + glow = 2, + size = 5, + collisiondetection = true, + vertical = true, + }) + + end + + minetest.chat_send_player(player:get_player_name(), + green .. S("Wow! So many faux diamonds!")) +end + +lucky_block:add_blocks({ + {"cus", fake_diamonds}, +}) diff --git a/mods/lucky_block/depends.txt b/mods/lucky_block/depends.txt new file mode 100644 index 0000000..a853965 --- /dev/null +++ b/mods/lucky_block/depends.txt @@ -0,0 +1,4 @@ +default +tnt? +screwdriver? +intllib? diff --git a/mods/lucky_block/description.txt b/mods/lucky_block/description.txt new file mode 100644 index 0000000..60ce4ae --- /dev/null +++ b/mods/lucky_block/description.txt @@ -0,0 +1 @@ +Adds lucky blocks into the game which may give good, bad, hurtful items when open :) \ No newline at end of file diff --git a/mods/lucky_block/init.lua b/mods/lucky_block/init.lua new file mode 100644 index 0000000..75a0d79 --- /dev/null +++ b/mods/lucky_block/init.lua @@ -0,0 +1,740 @@ + +lucky_block = {} +lucky_schems = {} + + +-- Load support for intllib. +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP .. "/intllib.lua") + + +-- default blocks +local lucky_list = { + {"nod", "lucky_block:super_lucky_block", 0}, +} + + +-- ability to add new blocks to list +function lucky_block:add_blocks(list) + + for s = 1, #list do + table.insert(lucky_list, list[s]) + end +end + + +-- call to purge the block list +function lucky_block:purge_block_list() + lucky_list = { + {"nod", "lucky_block:super_lucky_block", 0} + } +end + + +-- add schematics to global list +function lucky_block:add_schematics(list) + + for s = 1, #list do + table.insert(lucky_schems, list[s]) + end +end + + +-- import schematics and default blocks +dofile(minetest.get_modpath("lucky_block") .. "/schems.lua") +dofile(minetest.get_modpath("lucky_block") .. "/blocks.lua") + + +-- for random colour selection +local all_colours = { + "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta", + "orange", "violet", "brown", "pink", "dark_grey", "dark_green", "white" +} + +-- default items in chests +local chest_stuff = { + {name = "default:apple", max = 3}, + {name = "default:steel_ingot", max = 2}, + {name = "default:gold_ingot", max = 2}, + {name = "default:diamond", max = 1}, + {name = "default:pick_steel", max = 1} +} + + +-- call to purge the chest items list +function lucky_block:purge_chest_items() + chest_stuff = {} +end + + +-- ability to add to chest items list +function lucky_block:add_chest_items(list) + + for s = 1, #list do + table.insert(chest_stuff, list[s]) + end +end + + +-- particle effects +local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow) + + radius = radius or 2 + gravity = gravity or -10 + + minetest.add_particlespawner({ + amount = amount, + time = 0.25, + minpos = pos, + maxpos = pos, + minvel = {x = -radius, y = -radius, z = -radius}, + maxvel = {x = radius, y = radius, z = radius}, + minacc = {x = 0, y = gravity, z = 0}, + maxacc = {x = 0, y = gravity, z = 0}, + minexptime = 0.1, + maxexptime = 1, + minsize = min_size or 0.5, + maxsize = max_size or 1.0, + texture = texture, + glow = glow or 0, + }) +end + + +-- temp entity for mob damage +minetest.register_entity("lucky_block:temp", { + physical = true, + collisionbox = {0, 0, 0, 0, 0, 0}, + visual_size = {x = 0, y = 0}, + visual = "sprite", + textures = {"tnt_smoke.png"}, + + on_step = function(self, dtime) + + self.timer = (self.timer or 0) + dtime + + if self.timer > 0.5 then + self.object:remove() + end + end +}) + + +-- modified from TNT mod to deal entity damage only +local function entity_physics(pos, radius) + + radius = radius * 2 + + local objs = minetest.get_objects_inside_radius(pos, radius) + local obj_pos, dist + + -- add temp entity to cause damage + local tmp_ent = minetest.add_entity(pos, "lucky_block:temp") + + for n = 1, #objs do + + obj_pos = objs[n]:get_pos() + + dist = vector.distance(pos, obj_pos) + + if dist < 1 then dist = 1 end + + local damage = math.floor((4 / dist) * radius) + local ent = objs[n]:get_luaentity() + + if objs[n]:is_player() then + objs[n]:set_hp(objs[n]:get_hp() - damage) + + else --if ent.health then + + objs[n]:punch(tmp_ent, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = damage}, + }, pos) + end + end +end + + +-- fill chest with random items from list +local function fill_chest(pos, items) + + local stacks = items or {} + local inv = minetest.get_meta(pos):get_inventory() + + inv:set_size("main", 8 * 4) + + for i = 0, 2, 1 do + + local stuff = chest_stuff[math.random(1, #chest_stuff)] + + table.insert(stacks, {name = stuff.name, max = stuff.max}) + end + + for s = 1, #stacks do + + if not inv:contains_item("main", stacks[s]) then + + inv:set_stack("main", math.random(1, 32), { + name = stacks[s].name, + count = math.random(1, stacks[s].max) + }) + end + end +end + + +-- explosion with protection check +local function explode(pos, radius, sound) + + sound = sound or "tnt_explode" + + if minetest.get_modpath("tnt") and tnt and tnt.boom + and not minetest.is_protected(pos, "") then + + tnt.boom(pos, { + radius = radius, + damage_radius = radius, + sound = sound, + }) + else + minetest.sound_play(sound, {pos = pos, gain = 1.0, + max_hear_distance = 32}) + + entity_physics(pos, radius) + + effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0) + end +end + + +local lb_schematic = function(pos, digger, def) + + if #lucky_schems == 0 then + print ("[lucky block] No schematics") + return + end + + local schem = def[2] + local switch = def[3] or 0 + local force = def[4] + local reps = def[5] or {} + + if switch == 1 then + pos = vector.round(digger:get_pos()) + end + + for i = 1, #lucky_schems do + + if schem == lucky_schems[i][1] then + + local p1 = vector.subtract(pos, lucky_schems[i][3]) + + minetest.place_schematic(p1, lucky_schems[i][2], "", reps, force) + + break + end + end + + if switch == 1 then + digger:set_pos(pos, false) + end +end + + +local lb_node = function(pos, digger, def) + + local nod = def[2] + local switch = def[3] + local items = def[4] + + if switch == 1 then + pos = digger:get_pos() + end + + if not minetest.registered_nodes[nod] then + nod = "default:goldblock" + end + + effect(pos, 25, "tnt_smoke.png", 8, 8, 2, 1, 0) + + minetest.set_node(pos, {name = nod}) + + if nod == "default:chest" then + fill_chest(pos, items) + end +end + + +local lb_spawn = function(pos, digger, def) + + local pos2 = {} + local num = def[3] or 1 + local tame = def[4] + local own = def[5] + local range = def[6] or 5 + local name = def[7] + + for i = 1, num do + + pos2.x = pos.x + math.random(-range, range) + pos2.y = pos.y + 1 + pos2.z = pos.z + math.random(-range, range) + + local nod = minetest.get_node(pos2) + local nodef = minetest.registered_nodes[nod.name] + + if nodef and nodef.walkable == false then + + local entity + + -- select between random or single entity + if type(def[2]) == "table" then + entity = def[2][math.random(1, #def[2])] + else + entity = def[2] + end + + -- coloured sheep + if entity == "mobs:sheep" then + local colour = "_" .. all_colours[math.random(#all_colours)] + entity = "mobs:sheep" .. colour + end + + -- has entity been registered? + if minetest.registered_entities[entity] then + + local ent = minetest.add_entity(pos2, entity):get_luaentity() + + if tame then + ent.tamed = true + end + + if own then + ent.owner = digger:get_player_name() + end + + if name then + ent.nametag = name + ent.object:set_properties({ + nametag = name, + nametag_color = "#FFFF00" + }) + end + else + print ("[lucky_block] " .. entity .. " could not be spawned") + end + end + end +end + + +local lb_explode = function(pos, def) + + local rad = def[2] or 2 + local snd = def[3] or "tnt_explode" + + explode(pos, rad, snd) +end + + +local lb_teleport = function(pos, digger, def) + + local xz_range = def[2] or 10 + local y_range = def[3] or 5 + + pos.x = pos.x + math.random(-xz_range, xz_range) + pos.x = pos.y + math.random(-y_range, y_range) + pos.x = pos.z + math.random(-xz_range, xz_range) + + effect(pos, 25, "tnt_smoke.png", 8, 8, 1, -10, 0) + + digger:set_pos(pos, false) + + effect(pos, 25, "tnt_smoke.png", 8, 8, 1, -10, 0) + + minetest.chat_send_player(digger:get_player_name(), + minetest.get_color_escape_sequence("#1eff00") .. S("Random Teleport!")) +end + + +local lb_drop = function(pos, digger, def) + + local num = def[3] or 1 + local colours = def[4] + local items = #def[2] + + -- drop multiple different items or colours + if items > 1 or colours then + + for i = 1, num do + + local item = def[2][math.random(1, items)] + + if colours then + item = item .. all_colours[math.random(#all_colours)] + end + + if not minetest.registered_items[item] then + item = "default:coal_lump" + end + + local obj = minetest.add_item(pos, item) + + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 5, + z = math.random(-10, 10) / 9, + }) + end + end + + else -- drop single item in a stack + + local item = def[2][1] + + if not minetest.registered_items[item] then + item = ItemStack("default:coal_lump " .. tonumber(num)) + else + item = ItemStack(item .. " " .. tonumber(num)) + end + + local obj = minetest.add_item(pos, item) + + if obj then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 5, + z = math.random(-10, 10) / 9, + }) + end + end +end + + +local lb_lightning = function(pos, digger, def) + + local nod = def[2] + + if not minetest.registered_nodes[nod] then + nod = "fire:basic_flame" + end + + pos = digger:get_pos() + + if nod then + minetest.set_node(pos, {name = nod}) + end + + minetest.add_particle({ + pos = pos, + velocity = {x = 0, y = 0, z = 0}, + acceleration = {x = 0, y = 0, z = 0}, + expirationtime = 1.0, + collisiondetection = false, + texture = "lucky_lightning.png", + size = math.random(100, 150), + glow = 15, + }) + + entity_physics(pos, 2) + + minetest.sound_play("lightning", { + pos = pos, + gain = 1.0, + max_hear_distance = 25 + }) +end + + +local lb_falling = function(pos, digger, def) + + local nods = def[2] + local switch = def[3] + local spread = def[4] + local range = def[5] or 5 + + if switch == 1 then + pos = digger:get_pos() + end + + if spread then + pos.y = pos.y + 10 + else + pos.y = pos.y + #nods + end + + minetest.remove_node(pos) + + local pos2 = {x = pos.x, y = pos.y, z = pos.z} + + for s = 1, #nods do + + minetest.after(0.5 * s, function() + + if spread then + pos2.x = pos.x + math.random(-range, range) + pos2.z = pos.z + math.random(-range, range) + end + + local n = minetest.registered_nodes[nods[s]] + + if n then + + local obj = minetest.add_entity(pos2, "__builtin:falling_node") + + obj:get_luaentity():set_node(n) + end + end) + end +end + + +local lb_troll = function(pos, def) + + local nod = def[2] + local snd = def[3] + local exp = def[4] + + minetest.set_node(pos, {name = nod}) + + if snd then + + minetest.sound_play(snd, { + pos = pos, + gain = 1.0, + max_hear_distance = 10 + }) + end + + if not minetest.registered_nodes[nod] then + nod = "default:goldblock" + end + + minetest.after(2.0, function() + + if exp then + + minetest.set_node(pos, {name = "air"}) + + explode(pos, 2) + else + + minetest.set_node(pos, {name = "air"}) + + minetest.sound_play("default_hard_footstep", { + pos = pos, + gain = 1.0, + max_hear_distance = 10 + }) + end + end) +end + + +local lb_floor = function(pos, def) + + local size = def[2] or 1 + local nods = def[3] or {"default:dirt"} + local offs = def[4] or 0 + local num = 1 + + for x = 0, size - 1 do + for z = 0, size - 1 do + + minetest.after(0.5 * num, function() + + minetest.set_node({ + x = (pos.x + x) - offs, + y = pos.y - 1, + z = (pos.z + z) - offs + }, {name = nods[math.random(#nods)]}) + + minetest.sound_play("default_place_node", { + pos = pos, + gain = 1.0, + max_hear_distance = 10 + }) + end) + + num = num + 1 + end + end +end + + +-- this is what happens when you dig a lucky block +function lucky_block:open(pos, digger, blocks_list) + + -- check for custom blocks list or use default + blocks_list = blocks_list or lucky_list + + -- make sure it's really random + math.randomseed(minetest.get_timeofday() + pos.x + pos.z) -- os.time() + + local luck = math.random(1, #blocks_list) ; -- luck = 1 + local action = blocks_list[luck][1] + +-- print ("luck ["..luck.." of "..#blocks_list.."]", action) + + -- place schematic + if action == "sch" then + + lb_schematic(pos, digger, blocks_list[luck]) + + -- place node (if chest then fill chest) + elseif action == "nod" then + + lb_node(pos, digger, blocks_list[luck]) + + -- place entity + elseif action == "spw" then + + lb_spawn(pos, digger, blocks_list[luck]) + + -- explosion + elseif action == "exp" then + + lb_explode(pos, blocks_list[luck]) + + -- teleport + elseif action == "tel" then + + lb_teleport(pos, digger, blocks_list[luck]) + + -- drop items + elseif action == "dro" then + + lb_drop(pos, digger, blocks_list[luck]) + + -- lightning strike + elseif action == "lig" then + + lb_lightning(pos, digger, blocks_list[luck]) + + -- falling nodes + elseif action == "fal" then + + lb_falling(pos, digger, blocks_list[luck]) + + -- troll block, disappears or explodes after 2 seconds + elseif action == "tro" then + + lb_troll(pos, blocks_list[luck]) + + -- floor paint + elseif action == "flo" then + + lb_floor(pos, blocks_list[luck]) + + -- custom function + elseif action == "cus" then + + local func = blocks_list[luck][2] + + if func then func(pos, digger) end + end +end + + +-- lucky block itself +minetest.register_node('lucky_block:lucky_block', { + description = S("Lucky Block"), + tiles = {{ + name = "lucky_block_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1 + }, + }}, + inventory_image = minetest.inventorycube("lucky_block.png"), + sunlight_propagates = false, + is_ground_content = false, + paramtype = "light", + light_source = 3, + groups = {oddly_breakable_by_hand = 3, unbreakable = 1}, + drop = {}, + sounds = default.node_sound_wood_defaults(), + + on_dig = function(pos, node, digger) + minetest.set_node(pos, {name = "air"}) + lucky_block:open(pos, digger) + end, + + on_blast = function() end, +}) + +minetest.register_craft({ + output = "lucky_block:lucky_block", + recipe = { + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + {"default:gold_ingot", "default:chest", "default:gold_ingot"}, + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"} + } +}) + + +-- super lucky block +minetest.register_node('lucky_block:super_lucky_block', { + description = S("Super Lucky Block (use pick)"), + tiles = {{ + name = "lucky_block_super_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1 + }, + }}, + inventory_image = minetest.inventorycube("lucky_block_super.png"), + sunlight_propagates = false, + is_ground_content = false, + paramtype = "light", + groups = {cracky = 1, level = 2, unbreakable = 1}, + drop = {}, + sounds = default.node_sound_stone_defaults(), + + on_construct = function(pos) + + local meta = minetest.get_meta(pos) + + meta:set_string("infotext", "Super Lucky Block") + end, + + on_dig = function(pos) + + if math.random(1, 10) < 8 then + + minetest.set_node(pos, {name = "air"}) + + effect(pos, 25, "tnt_smoke.png", 8, 8, 1, -10, 0) + + minetest.sound_play("fart1", { + pos = pos, + gain = 1.0, + max_hear_distance = 10 + }) + + if math.random(1, 5) == 1 then + pos.y = pos.y + 0.5 + minetest.add_item(pos, "default:goldblock " .. math.random(1, 5)) + end + + else + minetest.set_node(pos, {name = "lucky_block:lucky_block"}) + end + end, + + on_blast = function() end, +}) + + +minetest.after(0, function() + print (S("[MOD] Lucky Blocks loaded (@1 in total)", #lucky_list)) +end) + diff --git a/mods/lucky_block/intllib.lua b/mods/lucky_block/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/mods/lucky_block/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/lucky_block/license.txt b/mods/lucky_block/license.txt new file mode 100644 index 0000000..fec6f6a --- /dev/null +++ b/mods/lucky_block/license.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 TenPlus1 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/mods/lucky_block/locale/es.po b/mods/lucky_block/locale/es.po new file mode 100644 index 0000000..021498f --- /dev/null +++ b/mods/lucky_block/locale/es.po @@ -0,0 +1,54 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-14 08:34+0200\n" +"PO-Revision-Date: 2018-10-29 18:01+0100\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 1.8.11\n" + +#: init.lua +msgid "Stop hitting yourself!" +msgstr "¡Deja de pegarte!" + +#: init.lua +msgid "Dry shrub takeover!" +msgstr "¡Adquisición de arbustos secos!" + +#: init.lua +msgid "Random teleport!" +msgstr "¡Teletransporte aleatorio!" + +#: init.lua +msgid "Lucky Block" +msgstr "Bloque de la suerte" + +#: init.lua +msgid "Super Lucky Block (use pick)" +msgstr "Súper bloque de la suerte (usar pico)" + +#: init.lua +msgid "[MOD] Lucky Blocks loaded (@1 in total)" +msgstr "[MOD] Lucky Blocks cargado (@1 en total)" + +#: blocks.lua +msgid "" +"Super Mega Magenta Ultra Screwdriver 2500\n" +"(left-click to rotate face, right-click to rotates axis)" +msgstr "" +"Destornillador Súper Mega Magenta Ultra 2500\n" +"(clic izquierdo para girar la cara, clic derecho para girar el eje)" + +#: blocks.lua +msgid "Void Mirror (Place to see through solid walls during daytime" +msgstr "Espejo de vacío (colócalo para ver a través de paredes sólidas durante el día)" diff --git a/mods/lucky_block/locale/ru.po b/mods/lucky_block/locale/ru.po new file mode 100644 index 0000000..2405290 --- /dev/null +++ b/mods/lucky_block/locale/ru.po @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-14 08:34+0200\n" +"PO-Revision-Date: 2017-08-28 11:14+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua +msgid "Stop hitting yourself!" +msgstr "Прекратите удары себя" + +#: init.lua +msgid "Dry shrub takeover!" +msgstr "Поглощение сухих кустов" + +#: init.lua +msgid "Random teleport!" +msgstr "Случайный телепорт!" + +#: init.lua +msgid "Lucky Block" +msgstr "Удачливый блок" + +#: init.lua +msgid "Super Lucky Block (use pick)" +msgstr "Супер удачливый блок (используйте кирку)" + +#: init.lua +msgid "[MOD] Lucky Blocks loaded (@1 in total)" +msgstr "[MOD] Удачливый блок нагруженный (Всего @1)" + +#: blocks.lua +msgid "Super Mega Magenta Ultra Screwdriver 2500\n(left-click to rotate face, right-click to rotates axis)" +msgstr "Пурпурная супер мега ультра отвёртка 2500\n(левая кнопка для вращения лицевой части, правая кнопка для вращения осей)" + +#: blocks.lua +msgid "Void Mirror (Place to see through solid walls during daytime" +msgstr "Пустое зеркало (Установите, чтобы видеть сквозь сплошные стены в дневное время)" diff --git a/mods/lucky_block/locale/template.pot b/mods/lucky_block/locale/template.pot new file mode 100644 index 0000000..546877c --- /dev/null +++ b/mods/lucky_block/locale/template.pot @@ -0,0 +1,50 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-14 08:34+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: init.lua +msgid "Stop hitting yourself!" +msgstr "" + +#: init.lua +msgid "Dry shrub takeover!" +msgstr "" + +#: init.lua +msgid "Random teleport!" +msgstr "" + +#: init.lua +msgid "Lucky Block" +msgstr "" + +#: init.lua +msgid "Super Lucky Block (use pick)" +msgstr "" + +#: init.lua +msgid "[MOD] Lucky Blocks loaded (@1 in total)" +msgstr "" + +#: blocks.lua +msgid "Super Mega Magenta Ultra Screwdriver 2500\n(left-click to rotate face, right-click to rotates axis)" +msgstr "" + +#: blocks.lua +msgid "Void Mirror (Place to see through solid walls during daytime" +msgstr "" diff --git a/mods/lucky_block/mod.conf b/mods/lucky_block/mod.conf new file mode 100644 index 0000000..9eeb306 --- /dev/null +++ b/mods/lucky_block/mod.conf @@ -0,0 +1 @@ +name = lucky_block \ No newline at end of file diff --git a/mods/lucky_block/schematics/lb_wishing_well.mts b/mods/lucky_block/schematics/lb_wishing_well.mts new file mode 100644 index 0000000..e646bbe Binary files /dev/null and b/mods/lucky_block/schematics/lb_wishing_well.mts differ diff --git a/mods/lucky_block/schems.lua b/mods/lucky_block/schems.lua new file mode 100644 index 0000000..d55628b --- /dev/null +++ b/mods/lucky_block/schems.lua @@ -0,0 +1,272 @@ + +-- Generate schematics + +local air = {name = "air"} +local san = {name = "default:sand"} +local sst = {name = "default:sandstone"} +local ssb = {name = "default:sandstonebrick"} +local luc = {name = "lucky_block:lucky_block"} +local lav = {name = "default:lava_source"} +local dir = {name = "default:dirt"} +local sow = {name = "farming:soil_wet"} +local wat = {name = "default:water_source"} +local whe = {name = "farming:wheat_8"} +local cot = {name = "farming:cotton_8"} +local obg = {name = "default:obsidian_glass"} +local fir = {name = "fire:basic_flame"} +local obs = {name = "default:obsidian"} + +local platform = { + size = {x = 5, y = 3, z = 5}, + data = { + sst, sst, sst, sst, sst, + ssb, ssb, ssb, ssb, ssb, + ssb, ssb, ssb, ssb, ssb, + + sst, sst, sst, sst, sst, + ssb, luc, air, luc, ssb, + ssb, air, air, air, ssb, + + sst, sst, sst, sst, sst, + ssb, air, air, air, ssb, + ssb, air, air, air, ssb, + + sst, sst, sst, sst, sst, + ssb, luc, air, luc, ssb, + ssb, air, air, air, ssb, + + sst, sst, sst, sst, sst, + ssb, ssb, ssb, ssb, ssb, + ssb, ssb, ssb, ssb, ssb, + }, +} + +local insta_farm = { + size = {x = 5, y = 3, z = 3}, + data = { + dir, dir, dir, dir, dir, + sow, sow, sow, sow, sow, + cot, cot, cot, cot, cot, + + sow, dir, dir, dir, sow, + sow, wat, wat, wat, sow, + cot, air, air, air, whe, + + dir, dir, dir, dir, san, + sow, sow, sow, sow, sow, + whe, whe, whe, whe, whe, + }, +} + +local lava_trap = { + size = {x = 3, y = 6, z = 3}, + data = { + lav, lav, lav, + air, air, air, + air, air, air, + air, air, air, + air, air, air, + air, air, air, + + lav, lav, lav, + air, air, air, + air, air, air, + air, air, air, + air, air, air, + air, air, air, + + lav, lav, lav, + air, air, air, + air, air, air, + air, air, air, + air, air, air, + air, air, air, + }, +} + +local sand_trap = { + size = {x = 3, y = 3, z = 3}, + data = { + san, san, san, + san, san, san, + san, san, san, + + san, san, san, + san, san, san, + san, san, san, + + san, san, san, + san, san, san, + san, san, san, + }, +} + +local water_trap = { + size = {x = 3, y = 3, z = 3}, + data = { + obg, obg, obg, + obg, obg, obg, + obg, obg, obg, + + obg, obg, obg, + obg, wat, obg, + obg, obg, obg, + + obg, obg, obg, + obg, obg, obg, + obg, obg, obg, + }, +} + +local fire_trap = { + size = {x = 3, y = 3, z = 3}, + data = { + fir, fir, fir, + fir, fir, fir, + fir, fir, fir, + + fir, fir, fir, + fir, fir, fir, + fir, fir, fir, + + fir, fir, fir, + fir, fir, fir, + fir, fir, fir, + }, +} + +local obsidian_trap = { + size = {x = 3, y = 3, z = 3}, + data = { + obs, obs, obs, + obs, obs, obs, + obs, obs, obs, + + obs, air, obs, + obs, air, obs, + obs, lav, obs, + + obs, obs, obs, + obs, obs, obs, + obs, obs, obs, + }, +} + +-- add schematics to list + +lucky_block:add_schematics({ + {"watertrap", water_trap, {x = 1, y = 0, z = 1}}, + {"sandtrap", sand_trap, {x = 1, y = 0, z = 1}}, + {"lavatrap", lava_trap, {x = 1, y = 5, z = 1}}, + {"platform", platform, {x = 2, y = 1, z = 2}}, + {"instafarm", insta_farm, {x = 2, y = 2, z = 1}}, + {"firetrap", fire_trap, {x = 1, y = 0, z = 1}}, + {"obsidiantrap", obsidian_trap, {x = 1, y = 0, z = 1}}, +}) + +-- wishing well + +minetest.register_node("lucky_block:well_block", { + description = "Well Block", + tiles = {"default_glass.png"}, + light_source = 5, + groups = {not_in_creative_inventory = 1, unbreakable = 1}, + on_blast = function() end, + drop = {}, +}) + +local path = minetest.get_modpath("lucky_block") .. "/schematics/" + +lucky_block:add_schematics({ + {"wishingwell", path .. "lb_wishing_well.mts", {x = 1, y = 1, z = 1}}, +}) + +-- Global list containing well blocks that can be dropped +lucky_block.wellblocks = { + {"default:ice", 7}, + {"default:bronzeblock", 5}, + {"default:coalblock", 5}, + {"default:sand", 7}, + {"default:goldblock", 5}, + {"default:cactus", 7}, + {"default:cobble", 7}, + {"default:brick", 8}, + {"default:desert_sand", 7}, + {"default:obsidian", 7}, + {"default:diamondblock", 4}, + {"default:dirt", 7}, + {"default:clay", 7}, + {"default:copperblock", 5}, + {"default:mese", 5}, + {"default:silver_sand", 7}, + {"default:snowblock", 7}, + {"default:mossycobble", 7}, + {"default:lava_source", 5}, +} + +local add_wblock = function(name, number) + local total = #lucky_block.wellblocks + lucky_block.wellblocks[total + 1] = {name, number} +end + +-- Add additional well blocks +if minetest.get_modpath("tnt") then + add_wblock("tnt:tnt_burning", 8) + add_wblock("tnt:tnt_burning", 4) + add_wblock("tnt:tnt_burning", 8) +end + +if minetest.get_modpath("ethereal") then + add_wblock("ethereal:crystal_block", 5) +end + +if minetest.get_modpath("bones") then + add_wblock("bones:bones", 5) +end + +minetest.register_abm({ + + label = "Lucky Block Wishing Well Block", + nodenames = {"lucky_block:well_block"}, + interval = 2.0, + chance = 1, + catch_up = false, + + action = function(pos, node, active_object_count, active_object_count_wider) + + for _,object in pairs(minetest.get_objects_inside_radius(pos, 1.2)) do + + if object and object:is_player() then + + minetest.swap_node(pos, {name = "default:glass"}) + + minetest.sound_play("default_tool_breaks", { + pos = pos, + gain = 1.0, + max_hear_distance = 10 + }) + + local b_no = math.random(#lucky_block.wellblocks) + local item = lucky_block.wellblocks[b_no][1] + + for n = 1, lucky_block.wellblocks[b_no][2] do + + local nod = minetest.registered_nodes[item] + + if nod then + + local obj = minetest.add_entity({ + x = pos.x + math.random(-7, 7), + y = pos.y + 7, + z = pos.z + math.random(-7, 7) + }, "__builtin:falling_node") + + obj:get_luaentity():set_node(nod) + end + end + + break + end + end + end, +}) diff --git a/mods/lucky_block/screenshot.png b/mods/lucky_block/screenshot.png new file mode 100644 index 0000000..e714c53 Binary files /dev/null and b/mods/lucky_block/screenshot.png differ diff --git a/mods/lucky_block/sounds/fart1.ogg b/mods/lucky_block/sounds/fart1.ogg new file mode 100644 index 0000000..457d8a0 Binary files /dev/null and b/mods/lucky_block/sounds/fart1.ogg differ diff --git a/mods/lucky_block/sounds/lightning.ogg b/mods/lucky_block/sounds/lightning.ogg new file mode 100644 index 0000000..0f4040f Binary files /dev/null and b/mods/lucky_block/sounds/lightning.ogg differ diff --git a/mods/lucky_block/textures/bags_spar.png b/mods/lucky_block/textures/bags_spar.png new file mode 100644 index 0000000..7558abb Binary files /dev/null and b/mods/lucky_block/textures/bags_spar.png differ diff --git a/mods/lucky_block/textures/lucky_block.png b/mods/lucky_block/textures/lucky_block.png new file mode 100644 index 0000000..387cd52 Binary files /dev/null and b/mods/lucky_block/textures/lucky_block.png differ diff --git a/mods/lucky_block/textures/lucky_block_animated.png b/mods/lucky_block/textures/lucky_block_animated.png new file mode 100644 index 0000000..387cd52 Binary files /dev/null and b/mods/lucky_block/textures/lucky_block_animated.png differ diff --git a/mods/lucky_block/textures/lucky_block_super.png b/mods/lucky_block/textures/lucky_block_super.png new file mode 100644 index 0000000..a2bd201 Binary files /dev/null and b/mods/lucky_block/textures/lucky_block_super.png differ diff --git a/mods/lucky_block/textures/lucky_block_super_animated.png b/mods/lucky_block/textures/lucky_block_super_animated.png new file mode 100644 index 0000000..a2bd201 Binary files /dev/null and b/mods/lucky_block/textures/lucky_block_super_animated.png differ diff --git a/mods/lucky_block/textures/lucky_lightning.png b/mods/lucky_block/textures/lucky_lightning.png new file mode 100644 index 0000000..0f9d3d2 Binary files /dev/null and b/mods/lucky_block/textures/lucky_lightning.png differ diff --git a/mods/lucky_block/textures/tnt_smoke.png b/mods/lucky_block/textures/tnt_smoke.png new file mode 100644 index 0000000..488b50f Binary files /dev/null and b/mods/lucky_block/textures/tnt_smoke.png differ diff --git a/mods/mana/API.md b/mods/mana/API.md new file mode 100644 index 0000000..8f2673d --- /dev/null +++ b/mods/mana/API.md @@ -0,0 +1,125 @@ +API documentation for Mana mod +============================== + +## Introduction +The API of the Mana mod allows you to set and receive +the current and maxiumum mana reserves of a player, +and to subtract and add mana. + +## The basic rules +For integrity reasons, this mod will ensure that the following assumptions +are true at all times for all players: + +* Current and maximum mana can never be smaller than 0 +* The current value must not be greater than the maximum value +* Only integer numbers are permitted for mana values + +It should be not possible to break these rules using this API alone. +If you somehow manage to break one ofthe rules, please report a bug. + +If a real number is used as input for a value, it will be rounded +(“round up half” rule). + +## Functions +Of not specified otherwise, all functions return `nil`. +`playername` always refers to the name of a player, as string. +`value` always refers to a number and for most functions it must always be equal to or greater than 0. + + +### `mana.set(playername, value)` +Sets the mana reserve of the specified player to `value`. +If `value` is smaller than 0, the mana will be set to 0. +If `value` is greater than the maximum, the mana will be set to the maximum. + + +### `mana.setmax(playername, value)` +Sets the maximum of the player to `value`. + +If the new maximum would become smaller than the current value, +the current value will automatically be set to +the new maximum. + +### `mana.setregen(playername, value)` +Sets the mana regeneration per mana tick of the player to `value`. +Floating-point numbers are also permitted, in which the generation +of 1 mana takes longer than 1 mana tick. I.e. `0.5`. means +that 1 mana is generated every 2 mana ticks. A negative value means the +player loses mana. + + +The length of one “mana tick” is specified as the server-wide setting +`mana_default_regen` in seconds. + + +### `mana.get(playername)` +Returns the current mana of the specified player as number. + + +### `mana.getmax(playername)` +Returns the current maximum mana of the specified player as number. + + +### `mana.getregen(playername)` +Returns the current mana regneration per mana tick of the specified +player as number. +The length of one “mana tick” is specified as the server-wide setting +`mana_default_regen` in seconds. + + +### `mana.add(playername, value)` +Adds the specified non-negative amount of mana to the player, but only +if the sum would not be greater than the maximum, + +#### Return value +* `true` on success, all mana has been added +* `false` on failure, no mana has been added + + +### `mana.subtract(playername, value)` +Subtracts the specified non-negative amount of mana from the player, +but only if the player has sufficient mana reservers. + +#### Return value +* `true` on success, all mana has been subtracted +* `false` on failure, no mana has been subtraceed + + +### `mana.add_up_to(playername, value)` +Adds the specified non-negative amount of mana to the player, but it will +be capped at the maximum. + +#### Return value +* `true, excess` on success, where `excess` is the amount of Mana which could not be added because it would have exceeded the maximum. `excess` equals `0` if all mana has been added +* `false` on failure (mana could not be added) + + +### `mana.subtract_up_to(playername, value)` +Subtracts the specified non-negative amount of mana from the player, +but if the difference is smaller than 0, the mana will be set to 0. + +#### Return value +* `true, missing` on success, where `missing` is the amount of Mana which could not be subtracted because it would have exceeded 0. `missing` equals `0` if all mana has been subtracted +* `false` on failure (mana could not be subtracted) + + +## Appendix +### General recommendations +If you want your mod to be portable, it is recommended that you balance your mod in such a way that it assumes +that every player starts with the following default mana values: + +* Max. mana: 200 +* Mana regeneration: 1 mana every 0.2 seconds + +Also assume that the max. mana never changes. +This should (hopefully) ensure that multiple independent mana-using mods are more or less balanced when using +the default settings. + +Also, to make life easier for subgame makers, define custom minetest.conf settings for your mod in order to +overwrite the mana costs (and other relevant values) used by your mod. That way, subgame makers only have to edit +minetest.conf, and not your mod. + +You do not have to bother about default values if you want to directly integrate your mod in a subgame and do +not plan to release the mod independently. + +The best way to reliable balance the mana values used by several mods is to create a standalone subgame. It is +highly recommended that you tweak the mana values of the mods to fit the subgame's needs. diff --git a/mods/mana/README.md b/mods/mana/README.md new file mode 100644 index 0000000..a9e99e1 --- /dev/null +++ b/mods/mana/README.md @@ -0,0 +1,47 @@ +# Mana [mana] + +* Version: 1.3.1 +* Note: This mod uses semantic versioning, as defined by version 2.0.0 of the SemVer standard. See: + +## Description +This mod adds basic support for mana to Minetest. + +Each player will have an additional attribute: Mana. To be precise: + +* Current mana reserves: How much mana the player currently has +* Maximum possible mana: How much mana the player can have at maximum +* Mana regeneration amont: How much mana will be generated each “mana tick” (default 0.2 seconds) + +By default, each player spawns with 0/200 mana, and regenerates 1 mana per fifth of a second. All +these values can be configured with the server settings (`minetest.conf`) and it is highly advised to do +so if you plan to integrate this mod into a game. + +The mana regeneration rate (the “mana tick”) is a global setting and is *not* configured on a +per-player basis. + +The mod provides a simple API to set, get, add and subtract the mana (and maximum) mana of any player, and +for setting the regeneration amount. Note that this mod itself does *not* change the gameplay in a meaningful +way. You should install other mods which use the Mana mod as a dependency. + +The API documentation is in the file `API.md`. + +If the mod “HUD bars” [`hudbars`] is installed, a blue bar will be added to the HUD showing the player's mana reserves. + +Otherwise, the mana is just shown as text. + +## Configuration + +This mod can be configured with minetest.conf! The following settings are accepted: + +* `mana_default_max`: Initial max. mana given to new players. Default: `200`. This value must be non-negative. +* `mana_default_regen`: Initial regenerated mana per “mana tick”. Default: `1`. This value can be a floating value. I.e. if the value is `0.5`, 1 mana is generated every two mana ticks (note that the player's mana amount is still a whole number). This value can be negative, in which case the player will lose mana. +* `mana_regen_timer`: The length of a “mana tick” in seconds. Each player will get his/her mana increased by the current + regen value per mana tick. Default: `0.2`. This value must be positive, also try to avoid very small values + as those could probably stress your machine a lot. + +License information +=================== +* `textures/mana_icon.png`: [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) by [Buch](http://opengameart.org/users/Buch). +* `textures/mana_bgicon.png`: CC BY 3.0, originally by Buch, modified by Wuzzy. +* `textures/mana_bar.png`: [MIT License](https://opensource.org/licenses/MIT) by Wuzzy. +* Everything else: MIT License. diff --git a/mods/mana/description.txt b/mods/mana/description.txt new file mode 100644 index 0000000..e9efb08 --- /dev/null +++ b/mods/mana/description.txt @@ -0,0 +1 @@ +Adds a mana attribute to players, can be used as energy source for magical items, etc. diff --git a/mods/mana/init.lua b/mods/mana/init.lua new file mode 100644 index 0000000..85e0c62 --- /dev/null +++ b/mods/mana/init.lua @@ -0,0 +1,323 @@ +--[[ +Mana +This mod adds mana to players, a special attribute + +License: MIT License +]] + +--[===[ + Initialization +]===] + +local S = minetest.get_translator("mana") + +mana = {} +mana.playerlist = {} + +mana.settings = {} +mana.settings.default_max = 200 +mana.settings.default_regen = 1 +mana.settings.regen_timer = 0.2 + +do + local default_max = tonumber(minetest.settings:get("mana_default_max")) + if default_max ~= nil then + mana.settings.default_max = default_max + end + + local default_regen = tonumber(minetest.settings:get("mana_default_regen")) + if default_regen ~= nil then + mana.settings.default_regen = default_regen + end + + local regen_timer = tonumber(minetest.settings:get("mana_regen_timer")) + if regen_timer ~= nil then + mana.settings.regen_timer = regen_timer + end +end + + +--[===[ + API functions +]===] + +function mana.set(playername, value) + if value < 0 then + minetest.log("info", "[mana] Warning: mana.set was called with negative value!") + value = 0 + end + value = mana.round(value) + if value > mana.playerlist[playername].maxmana then + value = mana.playerlist[playername].maxmana + end + if mana.playerlist[playername].mana ~= value then + mana.playerlist[playername].mana = value + mana.hud_update(playername) + end +end + +function mana.setmax(playername, value) + if value < 0 then + value = 0 + minetest.log("info", "[mana] Warning: mana.setmax was called with negative value!") + end + value = mana.round(value) + if mana.playerlist[playername].maxmana ~= value then + mana.playerlist[playername].maxmana = value + if(mana.playerlist[playername].mana > value) then + mana.playerlist[playername].mana = value + end + mana.hud_update(playername) + end +end + +function mana.setregen(playername, value) + mana.playerlist[playername].regen = value +end + +function mana.get(playername) + return mana.playerlist[playername].mana +end + +function mana.getmax(playername) + return mana.playerlist[playername].maxmana +end + +function mana.getregen(playername) + return mana.playerlist[playername].regen +end + +function mana.add_up_to(playername, value) + local t = mana.playerlist[playername] + value = mana.round(value) + if(t ~= nil and value >= 0) then + local excess + if((t.mana + value) > t.maxmana) then + excess = (t.mana + value) - t.maxmana + t.mana = t.maxmana + else + excess = 0 + t.mana = t.mana + value + end + mana.hud_update(playername) + return true, excess + else + return false + end +end + +function mana.add(playername, value) + local t = mana.playerlist[playername] + value = mana.round(value) + if(t ~= nil and ((t.mana + value) <= t.maxmana) and value >= 0) then + t.mana = t.mana + value + mana.hud_update(playername) + return true + else + return false + end +end + +function mana.subtract(playername, value) + local t = mana.playerlist[playername] + value = mana.round(value) + if(t ~= nil and t.mana >= value and value >= 0) then + t.mana = t.mana -value + mana.hud_update(playername) + return true + else + return false + end +end + +function mana.subtract_up_to(playername, value) + local t = mana.playerlist[playername] + value = mana.round(value) + if(t ~= nil and value >= 0) then + local missing + if((t.mana - value) < 0) then + missing = math.abs(t.mana - value) + t.mana = 0 + else + missing = 0 + t.mana = t.mana - value + end + mana.hud_update(playername) + return true, missing + else + return false + end +end + + + + + +--[===[ + File handling, loading data, saving data, setting up stuff for players. +]===] + + +-- Load the playerlist from a previous session, if available. +do + local filepath = minetest.get_worldpath().."/mana.mt" + local file = io.open(filepath, "r") + if file then + minetest.log("action", "[mana] mana.mt opened.") + local string = file:read() + io.close(file) + if(string ~= nil) then + local savetable = minetest.deserialize(string) + mana.playerlist = savetable.playerlist + minetest.debug("[mana] mana.mt successfully read.") + end + end +end + +function mana.save_to_file() + local savetable = {} + savetable.playerlist = mana.playerlist + + local savestring = minetest.serialize(savetable) + + local filepath = minetest.get_worldpath().."/mana.mt" + local file = io.open(filepath, "w") + if file then + file:write(savestring) + io.close(file) + minetest.log("action", "[mana] Wrote mana data into "..filepath..".") + else + minetest.log("error", "[mana] Failed to write mana data into "..filepath..".") + end +end + + +minetest.register_on_respawnplayer(function(player) + local playername = player:get_player_name() + mana.set(playername, 0) + mana.hud_update(playername) +end) + + +minetest.register_on_leaveplayer(function(player) + local playername = player:get_player_name() + if not minetest.get_modpath("hudbars") ~= nil then + mana.hud_remove(playername) + end + mana.save_to_file() +end) + +minetest.register_on_shutdown(function() + minetest.log("action", "[mana] Server shuts down. Rescuing data into mana.mt") + mana.save_to_file() +end) + +minetest.register_on_joinplayer(function(player) + local playername = player:get_player_name() + + if mana.playerlist[playername] == nil then + mana.playerlist[playername] = {} + mana.playerlist[playername].mana = 0 + mana.playerlist[playername].maxmana = mana.settings.default_max + mana.playerlist[playername].regen = mana.settings.default_regen + mana.playerlist[playername].remainder = 0 + end + + if minetest.get_modpath("hudbars") ~= nil then + hb.init_hudbar(player, "mana", mana.get(playername), mana.getmax(playername)) + else + mana.hud_add(playername) + end +end) + + +--[===[ + Mana regeneration +]===] + +mana.regen_timer = 0 + +minetest.register_globalstep(function(dtime) + mana.regen_timer = mana.regen_timer + dtime + if mana.regen_timer >= mana.settings.regen_timer then + local factor = math.floor(mana.regen_timer / mana.settings.regen_timer) + local players = minetest.get_connected_players() + for i=1, #players do + local name = players[i]:get_player_name() + if mana.playerlist[name] ~= nil then + if players[i]:get_hp() > 0 then + local plus = mana.playerlist[name].regen * factor + -- Compability check for version <= 1.0.2 which did not have the remainder field + if mana.playerlist[name].remainder ~= nil then + plus = plus + mana.playerlist[name].remainder + end + local plus_now = math.floor(plus) + local floor = plus - plus_now + if plus_now > 0 then + mana.add_up_to(name, plus_now) + else + mana.subtract_up_to(name, math.abs(plus_now)) + end + mana.playerlist[name].remainder = floor + end + end + end + mana.regen_timer = mana.regen_timer % mana.settings.regen_timer + end +end) + +--[===[ + HUD functions +]===] + +if minetest.get_modpath("hudbars") ~= nil then + hb.register_hudbar("mana", 0xFFFFFF, S("Mana"), { bar = "mana_bar.png", icon = "mana_icon.png", bgicon = "mana_bgicon.png" }, 0, mana.settings.default_max, false) + + function mana.hud_update(playername) + local player = minetest.get_player_by_name(playername) + if player ~= nil then + hb.change_hudbar(player, "mana", mana.get(playername), mana.getmax(playername)) + end + end + + function mana.hud_remove(playername) + end + +else + function mana.manastring(playername) + return S("Mana: @1/@2", mana.get(playername), mana.getmax(playername)) + end + + function mana.hud_add(playername) + local player = minetest.get_player_by_name(playername) + local id = player:hud_add({ + hud_elem_type = "text", + position = { x = 0.5, y=1 }, + text = mana.manastring(playername), + scale = { x = 0, y = 0 }, + alignment = { x = 1, y = 0}, + direction = 1, + number = 0xFFFFFF, + offset = { x = -262, y = -103} + }) + mana.playerlist[playername].hudid = id + return id + end + + function mana.hud_update(playername) + local player = minetest.get_player_by_name(playername) + player:hud_change(mana.playerlist[playername].hudid, "text", mana.manastring(playername)) + end + + function mana.hud_remove(playername) + local player = minetest.get_player_by_name(playername) + player:hud_remove(mana.playerlist[playername].hudid) + end +end + +--[===[ + Helper functions +]===] +mana.round = function(x) + return math.ceil(math.floor(x+0.5)) +end diff --git a/mods/mana/locale/de.txt b/mods/mana/locale/de.txt new file mode 100644 index 0000000..6d249e8 --- /dev/null +++ b/mods/mana/locale/de.txt @@ -0,0 +1,2 @@ +Mana = Mana +Mana: @1/@2 = Mana: @1/@2 diff --git a/mods/mana/locale/es.txt b/mods/mana/locale/es.txt new file mode 100644 index 0000000..372f309 --- /dev/null +++ b/mods/mana/locale/es.txt @@ -0,0 +1,2 @@ +Maná = +Maná: @1/@2 = diff --git a/mods/mana/locale/template.txt b/mods/mana/locale/template.txt new file mode 100644 index 0000000..b9c36d1 --- /dev/null +++ b/mods/mana/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain:mana +Mana= +Mana: @1/@2= diff --git a/mods/mana/mod.conf b/mods/mana/mod.conf new file mode 100644 index 0000000..5a9465d --- /dev/null +++ b/mods/mana/mod.conf @@ -0,0 +1,3 @@ +name = mana +description = Adds a mana attribute to players, can be used as energy source for magical items, etc. +optional_depends = hudbars diff --git a/mods/mana/screenshot.png b/mods/mana/screenshot.png new file mode 100644 index 0000000..7ad5d00 Binary files /dev/null and b/mods/mana/screenshot.png differ diff --git a/mods/mana/textures/mana_bar.png b/mods/mana/textures/mana_bar.png new file mode 100644 index 0000000..bb4faa3 Binary files /dev/null and b/mods/mana/textures/mana_bar.png differ diff --git a/mods/mana/textures/mana_bgicon.png b/mods/mana/textures/mana_bgicon.png new file mode 100644 index 0000000..ea35a9c Binary files /dev/null and b/mods/mana/textures/mana_bgicon.png differ diff --git a/mods/mana/textures/mana_icon.png b/mods/mana/textures/mana_icon.png new file mode 100644 index 0000000..d25ddff Binary files /dev/null and b/mods/mana/textures/mana_icon.png differ diff --git a/mods/minetest_game/.gitignore b/mods/minetest_game/.gitignore new file mode 100644 index 0000000..535a760 --- /dev/null +++ b/mods/minetest_game/.gitignore @@ -0,0 +1,25 @@ +## 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/* + +#misc +sync.sh \ No newline at end of file diff --git a/mods/minetest_game/.luacheckrc b/mods/minetest_game/.luacheckrc new file mode 100644 index 0000000..5236bc5 --- /dev/null +++ b/mods/minetest_game/.luacheckrc @@ -0,0 +1,28 @@ +unused_args = false +allow_defined_top = true + +read_globals = { + "DIR_DELIM", + "minetest", + "dump", + "vector", + "VoxelManip", "VoxelArea", + "PseudoRandom", "PcgRandom", + "ItemStack", + "Settings", + "unpack", + "armor", + -- Silence errors about custom table methods. + table = { fields = { "copy", "indexof" } }, + -- Silence warnings about accessing undefined fields of global 'math' + math = { fields = { "sign" } } +} + +-- Overwrites minetest.handle_node_drops +files["mods/creative/init.lua"].globals = { "minetest" } + +-- Overwrites minetest.calculate_knockback +files["mods/player_api/api.lua"].globals = { "minetest" } + +-- Don't report on legacy definitions of globals. +files["mods/default/legacy.lua"].global = false diff --git a/mods/minetest_game/beds/README.txt b/mods/minetest_game/beds/README.txt new file mode 100644 index 0000000..7b35e14 --- /dev/null +++ b/mods/minetest_game/beds/README.txt @@ -0,0 +1,30 @@ +Minetest Game mod: beds +======================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by BlockMen (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +BlockMen (CC BY-SA 3.0) + All textures unless otherwise noted + +TumeniNodes (CC BY-SA 3.0) + beds_bed_under.png + +This mod adds a bed to Minetest which allows players to skip the night. +To sleep, right click on the bed. If playing in singleplayer mode the night gets skipped +immediately. If playing multiplayer you get shown how many other players are in bed too, +if all players are sleeping the night gets skipped. The night skip can be forced if more +than half of the players are lying in bed and use this option. + +Another feature is a controlled respawning. If you have slept in bed (not just lying in +it) your respawn point is set to the beds location and you will respawn there after +death. +You can disable the respawn at beds by setting "enable_bed_respawn = false" in +minetest.conf. +You can disable the night skip feature by setting "enable_bed_night_skip = false" in +minetest.conf or by using the /set command in-game. diff --git a/mods/minetest_game/beds/api.lua b/mods/minetest_game/beds/api.lua new file mode 100644 index 0000000..4a9c667 --- /dev/null +++ b/mods/minetest_game/beds/api.lua @@ -0,0 +1,184 @@ + +local reverse = true + +local function destruct_bed(pos, n) + local node = minetest.get_node(pos) + local other + + if n == 2 then + local dir = minetest.facedir_to_dir(node.param2) + other = vector.subtract(pos, dir) + elseif n == 1 then + local dir = minetest.facedir_to_dir(node.param2) + other = vector.add(pos, dir) + end + + if reverse then + reverse = not reverse + minetest.remove_node(other) + minetest.check_for_falling(other) + beds.remove_spawns_at(pos) + beds.remove_spawns_at(other) + else + reverse = not reverse + end +end + +function beds.register_bed(name, def) + minetest.register_node(name .. "_bottom", { + description = def.description, + inventory_image = def.inventory_image, + wield_image = def.wield_image, + drawtype = "nodebox", + tiles = def.tiles.bottom, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + stack_max = 1, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1}, + sounds = def.sounds or default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = def.nodebox.bottom, + }, + selection_box = { + type = "fixed", + fixed = def.selectionbox, + }, + + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + local pos + if udef and udef.buildable_to then + pos = under + else + pos = pointed_thing.above + end + + local player_name = placer and placer:get_player_name() or "" + + if minetest.is_protected(pos, player_name) and + not minetest.check_player_privs(player_name, "protection_bypass") then + minetest.record_protection_violation(pos, player_name) + return itemstack + end + + local node_def = minetest.registered_nodes[minetest.get_node(pos).name] + if not node_def or not node_def.buildable_to then + return itemstack + end + + local dir = placer and placer:get_look_dir() and + minetest.dir_to_facedir(placer:get_look_dir()) or 0 + local botpos = vector.add(pos, minetest.facedir_to_dir(dir)) + + if minetest.is_protected(botpos, player_name) and + not minetest.check_player_privs(player_name, "protection_bypass") then + minetest.record_protection_violation(botpos, player_name) + return itemstack + end + + local botdef = minetest.registered_nodes[minetest.get_node(botpos).name] + if not botdef or not botdef.buildable_to then + return itemstack + end + + minetest.set_node(pos, {name = name .. "_bottom", param2 = dir}) + minetest.set_node(botpos, {name = name .. "_top", param2 = dir}) + + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + return itemstack + end, + + on_destruct = function(pos) + destruct_bed(pos, 1) + end, + + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + beds.on_rightclick(pos, clicker) + return itemstack + end, + + on_rotate = function(pos, node, user, _, new_param2) + local dir = minetest.facedir_to_dir(node.param2) + local p = vector.add(pos, dir) + local node2 = minetest.get_node_or_nil(p) + if not node2 or not minetest.get_item_group(node2.name, "bed") == 2 or + not node.param2 == node2.param2 then + return false + end + if minetest.is_protected(p, user:get_player_name()) then + minetest.record_protection_violation(p, user:get_player_name()) + return false + end + if new_param2 % 32 > 3 then + return false + end + local newp = vector.add(pos, minetest.facedir_to_dir(new_param2)) + local node3 = minetest.get_node_or_nil(newp) + local node_def = node3 and minetest.registered_nodes[node3.name] + if not node_def or not node_def.buildable_to then + return false + end + if minetest.is_protected(newp, user:get_player_name()) then + minetest.record_protection_violation(newp, user:get_player_name()) + return false + end + node.param2 = new_param2 + -- do not remove_node here - it will trigger destroy_bed() + minetest.set_node(p, {name = "air"}) + minetest.set_node(pos, node) + minetest.set_node(newp, {name = name .. "_top", param2 = new_param2}) + return true + end, + can_dig = function(pos, player) + return beds.can_dig(pos) + end, + }) + + minetest.register_node(name .. "_top", { + drawtype = "nodebox", + tiles = def.tiles.top, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + pointable = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2, + not_in_creative_inventory = 1}, + sounds = def.sounds or default.node_sound_wood_defaults(), + drop = name .. "_bottom", + node_box = { + type = "fixed", + fixed = def.nodebox.top, + }, + on_destruct = function(pos) + destruct_bed(pos, 2) + end, + can_dig = function(pos, player) + local node = minetest.get_node(pos) + local dir = minetest.facedir_to_dir(node.param2) + local p = vector.add(pos, dir) + return beds.can_dig(p) + end, + }) + + minetest.register_alias(name, name .. "_bottom") + + minetest.register_craft({ + output = name, + recipe = def.recipe + }) +end diff --git a/mods/minetest_game/beds/beds.lua b/mods/minetest_game/beds/beds.lua new file mode 100644 index 0000000..dc044a3 --- /dev/null +++ b/mods/minetest_game/beds/beds.lua @@ -0,0 +1,109 @@ +-- beds/beds.lua + +-- support for MT game translation. +local S = beds.get_translator + +-- Fancy shaped bed + +beds.register_bed("beds:fancy_bed", { + description = S("Fancy Bed"), + inventory_image = "beds_bed_fancy.png", + wield_image = "beds_bed_fancy.png", + tiles = { + bottom = { + "beds_bed_top1.png", + "beds_bed_under.png", + "beds_bed_side1.png", + "beds_bed_side1.png^[transformFX", + "beds_bed_foot.png", + "beds_bed_foot.png", + }, + top = { + "beds_bed_top2.png", + "beds_bed_under.png", + "beds_bed_side2.png", + "beds_bed_side2.png^[transformFX", + "beds_bed_head.png", + "beds_bed_head.png", + } + }, + nodebox = { + bottom = { + {-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375}, + {0.375, -0.5, -0.5, 0.5, -0.065, -0.4375}, + {-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, + {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, + {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, + {-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, + }, + top = { + {-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5}, + {0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5}, + {-0.5, 0, 0.4375, 0.5, 0.125, 0.5}, + {-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5}, + {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, + {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, + {-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375}, + } + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + recipe = { + {"", "", "group:stick"}, + {"wool:white", "wool:white", "wool:white"}, + {"group:wood", "group:wood", "group:wood"}, + }, +}) + +-- Simple shaped bed + +beds.register_bed("beds:bed", { + description = S("Simple Bed"), + inventory_image = "beds_bed.png", + wield_image = "beds_bed.png", + tiles = { + bottom = { + "beds_bed_top_bottom.png^[transformR90", + "beds_bed_under.png", + "beds_bed_side_bottom_r.png", + "beds_bed_side_bottom_r.png^[transformfx", + "beds_transparent.png", + "beds_bed_side_bottom.png" + }, + top = { + "beds_bed_top_top.png^[transformR90", + "beds_bed_under.png", + "beds_bed_side_top_r.png", + "beds_bed_side_top_r.png^[transformfx", + "beds_bed_side_top.png", + "beds_transparent.png", + } + }, + nodebox = { + bottom = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5}, + top = {-0.5, -0.5, -0.5, 0.5, 0.0625, 0.5}, + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.0625, 1.5}, + recipe = { + {"wool:white", "wool:white", "wool:white"}, + {"group:wood", "group:wood", "group:wood"} + }, +}) + +-- Aliases for PilzAdam's beds mod + +minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom") +minetest.register_alias("beds:bed_top_red", "beds:bed_top") + +-- Fuel + +minetest.register_craft({ + type = "fuel", + recipe = "beds:fancy_bed_bottom", + burntime = 13, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "beds:bed_bottom", + burntime = 12, +}) diff --git a/mods/minetest_game/beds/functions.lua b/mods/minetest_game/beds/functions.lua new file mode 100644 index 0000000..ddac52b --- /dev/null +++ b/mods/minetest_game/beds/functions.lua @@ -0,0 +1,302 @@ +local pi = math.pi +local is_sp = minetest.is_singleplayer() +local enable_respawn = minetest.settings:get_bool("enable_bed_respawn") +if enable_respawn == nil then + enable_respawn = true +end + +-- support for MT game translation. +local S = beds.get_translator + +-- Helper functions + +local function get_look_yaw(pos) + local rotation = minetest.get_node(pos).param2 + if rotation > 3 then + rotation = rotation % 4 -- Mask colorfacedir values + end + if rotation == 1 then + return pi / 2, rotation + elseif rotation == 3 then + return -pi / 2, rotation + elseif rotation == 0 then + return pi, rotation + else + return 0, rotation + end +end + +local function is_night_skip_enabled() + local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip") + if enable_night_skip == nil then + enable_night_skip = true + end + return enable_night_skip +end + +local function check_in_beds(players) + local in_bed = beds.player + if not players then + players = minetest.get_connected_players() + end + + for n, player in ipairs(players) do + local name = player:get_player_name() + if not in_bed[name] then + return false + end + end + + return #players > 0 +end + +local function lay_down(player, pos, bed_pos, state, skip) + local name = player:get_player_name() + local hud_flags = player:hud_get_flags() + + if not player or not name then + return + end + + -- stand up + if state ~= nil and not state then + if not beds.player[name] then + -- player not in bed, do nothing + return false + end + beds.bed_position[name] = nil + -- skip here to prevent sending player specific changes (used for leaving players) + if skip then + return + end + player:set_pos(beds.pos[name]) + + -- physics, eye_offset, etc + local physics_override = beds.player[name].physics_override + beds.player[name] = nil + player:set_physics_override({ + speed = physics_override.speed, + jump = physics_override.jump, + gravity = physics_override.gravity + }) + player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}) + player:set_look_horizontal(math.random(1, 180) / 100) + player_api.player_attached[name] = false + hud_flags.wielditem = true + player_api.set_animation(player, "stand" , 30) + + -- lay down + else + + -- Check if bed is occupied + for _, other_pos in pairs(beds.bed_position) do + if vector.distance(bed_pos, other_pos) < 0.1 then + minetest.chat_send_player(name, S("This bed is already occupied!")) + return false + end + end + + -- Check if player is moving + if vector.length(player:get_velocity()) > 0.001 then + minetest.chat_send_player(name, S("You have to stop moving before going to bed!")) + return false + end + + -- Check if player is attached to an object + if player:get_attach() then + return false + end + + if beds.player[name] then + -- player already in bed, do nothing + return false + end + + beds.pos[name] = pos + beds.bed_position[name] = bed_pos + beds.player[name] = {physics_override = player:get_physics_override()} + + -- physics, eye_offset, etc + player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0}) + local yaw, param2 = get_look_yaw(bed_pos) + player:set_look_horizontal(yaw) + local dir = minetest.facedir_to_dir(param2) + -- p.y is just above the nodebox height of the 'Simple Bed' (the highest bed), + -- to avoid sinking down through the bed. + local p = { + x = bed_pos.x + dir.x / 2, + y = bed_pos.y + 0.07, + z = bed_pos.z + dir.z / 2 + } + player:set_physics_override({speed = 0, jump = 0, gravity = 0}) + player:set_pos(p) + player_api.player_attached[name] = true + hud_flags.wielditem = false + player_api.set_animation(player, "lay" , 0) + end + + player:hud_set_flags(hud_flags) +end + +local function get_player_in_bed_count() + local c = 0 + for _, _ in pairs(beds.player) do + c = c + 1 + end + return c +end + +local function update_formspecs(finished) + local ges = #minetest.get_connected_players() + local player_in_bed = get_player_in_bed_count() + local is_majority = (ges / 2) < player_in_bed + + local form_n + local esc = minetest.formspec_escape + if finished then + form_n = beds.formspec .. "label[2.7,9;" .. esc(S("Good morning.")) .. "]" + else + form_n = beds.formspec .. "label[2.2,9;" .. + esc(S("@1 of @2 players are in bed", player_in_bed, ges)) .. "]" + if is_majority and is_night_skip_enabled() then + form_n = form_n .. "button_exit[2,6;4,0.75;force;" .. + esc(S("Force night skip")) .. "]" + end + end + + for name,_ in pairs(beds.player) do + minetest.show_formspec(name, "beds_form", form_n) + end +end + + +-- Public functions + +function beds.kick_players() + for name, _ in pairs(beds.player) do + local player = minetest.get_player_by_name(name) + lay_down(player, nil, nil, false) + end +end + +function beds.skip_night() + minetest.set_timeofday(0.23) +end + +function beds.on_rightclick(pos, player) + local name = player:get_player_name() + local ppos = player:get_pos() + local tod = minetest.get_timeofday() + + if tod > 0.2 and tod < 0.805 then + if beds.player[name] then + lay_down(player, nil, nil, false) + end + minetest.chat_send_player(name, S("You can only sleep at night.")) + return + end + + -- move to bed + if not beds.player[name] then + lay_down(player, ppos, pos) + beds.set_spawns() -- save respawn positions when entering bed + else + lay_down(player, nil, nil, false) + end + + if not is_sp then + update_formspecs(false) + end + + -- skip the night and let all players stand up + if check_in_beds() then + minetest.after(2, function() + if not is_sp then + update_formspecs(is_night_skip_enabled()) + end + if is_night_skip_enabled() then + beds.skip_night() + beds.kick_players() + end + end) + end +end + +function beds.can_dig(bed_pos) + -- Check all players in bed which one is at the expected position + for _, player_bed_pos in pairs(beds.bed_position) do + if vector.equals(bed_pos, player_bed_pos) then + return false + end + end + return true +end + +-- Callbacks +-- Only register respawn callback if respawn enabled +if enable_respawn then + -- respawn player at bed if enabled and valid position is found + minetest.register_on_respawnplayer(function(player) + local name = player:get_player_name() + local pos = beds.spawn[name] + if pos then + player:set_pos(pos) + return true + end + end) +end + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + lay_down(player, nil, nil, false, true) + beds.player[name] = nil + if check_in_beds() then + minetest.after(2, function() + update_formspecs(is_night_skip_enabled()) + if is_night_skip_enabled() then + beds.skip_night() + beds.kick_players() + end + end) + end +end) + +minetest.register_on_dieplayer(function(player) + local name = player:get_player_name() + local in_bed = beds.player + local pos = player:get_pos() + local yaw = get_look_yaw(pos) + + if in_bed[name] then + lay_down(player, nil, pos, false) + player:set_look_horizontal(yaw) + player:set_pos(pos) + end +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "beds_form" then + return + end + + -- Because "Force night skip" button is a button_exit, it will set fields.quit + -- and lay_down call will change value of player_in_bed, so it must be taken + -- earlier. + local last_player_in_bed = get_player_in_bed_count() + + if fields.quit or fields.leave then + lay_down(player, nil, nil, false) + update_formspecs(false) + end + + if fields.force then + local is_majority = (#minetest.get_connected_players() / 2) < last_player_in_bed + if is_majority and is_night_skip_enabled() then + update_formspecs(true) + beds.skip_night() + beds.kick_players() + else + update_formspecs(false) + end + end +end) diff --git a/mods/minetest_game/beds/init.lua b/mods/minetest_game/beds/init.lua new file mode 100644 index 0000000..a1a46ce --- /dev/null +++ b/mods/minetest_game/beds/init.lua @@ -0,0 +1,26 @@ +-- beds/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("beds") +local esc = minetest.formspec_escape + +beds = {} +beds.player = {} +beds.bed_position = {} +beds.pos = {} +beds.spawn = {} +beds.get_translator = S + +beds.formspec = "size[8,11;true]" .. + "no_prepend[]" .. + "bgcolor[#080808BB;true]" .. + "button_exit[2,10;4,0.75;leave;" .. esc(S("Leave Bed")) .. "]" + +local modpath = minetest.get_modpath("beds") + +-- Load files + +dofile(modpath .. "/functions.lua") +dofile(modpath .. "/api.lua") +dofile(modpath .. "/beds.lua") +dofile(modpath .. "/spawns.lua") diff --git a/mods/minetest_game/beds/license.txt b/mods/minetest_game/beds/license.txt new file mode 100644 index 0000000..f3c517f --- /dev/null +++ b/mods/minetest_game/beds/license.txt @@ -0,0 +1,61 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2014-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2018 TumeniNodes + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/beds/locale/beds.de.tr b/mods/minetest_game/beds/locale/beds.de.tr new file mode 100644 index 0000000..3f2c959 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.de.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Schickes Bett +Simple Bed=Schlichtes Bett +This bed is already occupied!=Dieses Bett ist bereits belegt! +You have to stop moving before going to bed!=Sie müssen stehen bleiben, bevor Sie zu Bett gehen können! +Good morning.=Guten Morgen. +@1 of @2 players are in bed=@1 von @2 Spielern sind im Bett +Force night skip=Überspringen der Nacht erzwingen +You can only sleep at night.=Sie können nur nachts schlafen. +Leave Bed=Bett verlassen diff --git a/mods/minetest_game/beds/locale/beds.eo.tr b/mods/minetest_game/beds/locale/beds.eo.tr new file mode 100644 index 0000000..43c9ac3 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.eo.tr @@ -0,0 +1,8 @@ +# textdomain: beds +Leave Bed=Ellitiĝu +Good morning.=Bonan matenon. +@1 of @2 players are in bed=@1 el @2 ludantoj estas en lito. +Force night skip=Devigu nokta salton +You can only sleep at night.=Vi povas nur dormi en la nokto. +Fancy Bed=Luksa Lito +Simple Bed=Simpla Lito diff --git a/mods/minetest_game/beds/locale/beds.es.tr b/mods/minetest_game/beds/locale/beds.es.tr new file mode 100644 index 0000000..07142b9 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.es.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Cama de lujo +Simple Bed=Cama sencilla +This bed is already occupied!=¡Esta cama ya está ocupada! +You have to stop moving before going to bed!=¡Hay que dejar de moverse antes de acostarse! +Good morning.=Buenos días. +@1 of @2 players are in bed=@1 de @2 jugadores están durmiendo +Force night skip=Forzar hacer de dia +You can only sleep at night.=Sólo puedes dormir por la noche. +Leave Bed=Levantarse diff --git a/mods/minetest_game/beds/locale/beds.fr.tr b/mods/minetest_game/beds/locale/beds.fr.tr new file mode 100644 index 0000000..e1f8e56 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.fr.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Lit chic +Simple Bed=Lit simple +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=Bonjour. +@1 of @2 players are in bed=@1 joueur(s) sur @2 sont au lit +Force night skip=Forcer le passage de la nuit +You can only sleep at night.=Vous ne pouvez dormir que la nuit. +Leave Bed=Se lever du lit diff --git a/mods/minetest_game/beds/locale/beds.id.tr b/mods/minetest_game/beds/locale/beds.id.tr new file mode 100644 index 0000000..7bcbb5d --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.id.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Ranjang Mewah +Simple Bed=Ranjang Sederhana +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=Selamat pagi. +@1 of @2 players are in bed=@1 dari @2 pemain sedang tidur +Force night skip=Paksa lewati malam +You can only sleep at night.=Anda hanya dapat tidur pada waktu malam. +Leave Bed=Tinggalkan Ranjang diff --git a/mods/minetest_game/beds/locale/beds.it.tr b/mods/minetest_game/beds/locale/beds.it.tr new file mode 100644 index 0000000..8f4e14e --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.it.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Letto decorato +Simple Bed=Letto semplice +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.= +@1 of @2 players are in bed= +Force night skip= +You can only sleep at night.= +Leave Bed=Alzati dal letto diff --git a/mods/minetest_game/beds/locale/beds.jbo.tr b/mods/minetest_game/beds/locale/beds.jbo.tr new file mode 100644 index 0000000..a72f686 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.jbo.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=lo selja'i ckana +Simple Bed=lo sampu ckana +This bed is already occupied!=.i lo ti ckana cu canlu +You have to stop moving before going to bed!=lo nu do cando cu sarcu lo nu do sipna +Good morning.=.i .uise'inai cerni +@1 of @2 players are in bed=.i @1 cmima be lu'i @2 le pilno cu vreta lo ckana +Force night skip=bapli le nu co'u nicte +You can only sleep at night.=.i steci le ka nicte kei fa le ka do kakne le ka sipna ca pa ckaji be ce'u +Leave Bed=cliva lo ckana diff --git a/mods/minetest_game/beds/locale/beds.ms.tr b/mods/minetest_game/beds/locale/beds.ms.tr new file mode 100644 index 0000000..4d4310a --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.ms.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Katil Beragam +Simple Bed=Katil Biasa +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=Selamat pagi. +@1 of @2 players are in bed=@1 daripada @2 pemain sedang tidur +Force night skip=Paksa langkau malam +You can only sleep at night.=Anda hanya boleh tidur pada waktu malam. +Leave Bed=Bangun diff --git a/mods/minetest_game/beds/locale/beds.pt_BR.tr b/mods/minetest_game/beds/locale/beds.pt_BR.tr new file mode 100644 index 0000000..47fb1b9 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.pt_BR.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Cama Bonita +Simple Bed=Cama Simples +This bed is already occupied!=Esta cama já está ocupada! +You have to stop moving before going to bed!=Você precisa parar de se mover antes de ir para cama! +Good morning.=Bom dia. +@1 of @2 players are in bed=@1 de @2 jogadores estão na cama +Force night skip=Forçar o amanhecer +You can only sleep at night.=Você só pode dormir à noite +Leave Bed=Sair da Cama diff --git a/mods/minetest_game/beds/locale/beds.ru.tr b/mods/minetest_game/beds/locale/beds.ru.tr new file mode 100644 index 0000000..ac5bd2e --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.ru.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Детализированная Кровать +Simple Bed=Обычная Кровать +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=Доброе утро. +@1 of @2 players are in bed=@1 из @2 игроков в кровати +Force night skip=Пропустить ночь +You can only sleep at night.=Вы можете спать только ночью. +Leave Bed=Встать с кровати diff --git a/mods/minetest_game/beds/locale/beds.se.tr b/mods/minetest_game/beds/locale/beds.se.tr new file mode 100644 index 0000000..b4d52ba --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.se.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Fin säng +Simple Bed=Enkel Säng +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.= God morgon. +@1 of @2 players are in bed=@1 av @2 spelar försöker sover. +Force night skip=Tvinga över natten +You can only sleep at night.=Du kan bara sova på natten. +Leave Bed=Lämna Säng diff --git a/mods/minetest_game/beds/locale/beds.sk.tr b/mods/minetest_game/beds/locale/beds.sk.tr new file mode 100644 index 0000000..37f39dd --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.sk.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=Pekná posteľ +Simple Bed=Jednoduchá posteľ +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=Dobré ráno. +@1 of @2 players are in bed=@1 z @2 hráčov sú v posteli +Force night skip=Nútene preskočiť noc +You can only sleep at night.=Môžeš spať len v noci. +Leave Bed=Opusti posteľ diff --git a/mods/minetest_game/beds/locale/beds.zh_CN.tr b/mods/minetest_game/beds/locale/beds.zh_CN.tr new file mode 100644 index 0000000..6a06e09 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.zh_CN.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=花式床 +Simple Bed=简易床 +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=早安! +@1 of @2 players are in bed=@2位玩家中的@1位在床上 +Force night skip=强制跳过夜晚 +You can only sleep at night.=你只能在晚上睡觉。 +Leave Bed=离开床 diff --git a/mods/minetest_game/beds/locale/beds.zh_TW.tr b/mods/minetest_game/beds/locale/beds.zh_TW.tr new file mode 100644 index 0000000..b19b481 --- /dev/null +++ b/mods/minetest_game/beds/locale/beds.zh_TW.tr @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed=花式床 +Simple Bed=簡易床 +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.=早安! +@1 of @2 players are in bed=@2位玩家中的@1位在床上 +Force night skip=強制跳過夜晚 +You can only sleep at night.=你只能在晚上睡覺。 +Leave Bed=離開床 diff --git a/mods/minetest_game/beds/locale/template.txt b/mods/minetest_game/beds/locale/template.txt new file mode 100644 index 0000000..a965787 --- /dev/null +++ b/mods/minetest_game/beds/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: beds +Fancy Bed= +Simple Bed= +This bed is already occupied!= +You have to stop moving before going to bed!= +Good morning.= +@1 of @2 players are in bed= +Force night skip= +You can only sleep at night.= +Leave Bed= diff --git a/mods/minetest_game/beds/mod.conf b/mods/minetest_game/beds/mod.conf new file mode 100644 index 0000000..450ec13 --- /dev/null +++ b/mods/minetest_game/beds/mod.conf @@ -0,0 +1,3 @@ +name = beds +description = Minetest Game mod: beds +depends = default, wool diff --git a/mods/minetest_game/beds/spawns.lua b/mods/minetest_game/beds/spawns.lua new file mode 100644 index 0000000..1a2ce81 --- /dev/null +++ b/mods/minetest_game/beds/spawns.lua @@ -0,0 +1,72 @@ +local world_path = minetest.get_worldpath() +local org_file = world_path .. "/beds_spawns" +local file = world_path .. "/beds_spawns" +local bkwd = false + +-- check for PA's beds mod spawns +local cf = io.open(world_path .. "/beds_player_spawns", "r") +if cf ~= nil then + io.close(cf) + file = world_path .. "/beds_player_spawns" + bkwd = true +end + +function beds.read_spawns() + local spawns = beds.spawn + local input = io.open(file, "r") + if input and not bkwd then + repeat + local x = input:read("*n") + if x == nil then + break + end + local y = input:read("*n") + local z = input:read("*n") + local name = input:read("*l") + spawns[name:sub(2)] = {x = x, y = y, z = z} + until input:read(0) == nil + io.close(input) + elseif input and bkwd then + beds.spawn = minetest.deserialize(input:read("*all")) + input:close() + beds.save_spawns() + os.rename(file, file .. ".backup") + file = org_file + end +end + +beds.read_spawns() + +function beds.save_spawns() + if not beds.spawn then + return + end + local data = {} + local output = io.open(org_file, "w") + for k, v in pairs(beds.spawn) do + table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, k)) + end + output:write(table.concat(data)) + io.close(output) +end + +function beds.set_spawns() + for name,_ in pairs(beds.player) do + local player = minetest.get_player_by_name(name) + local p = player:get_pos() + -- but don't change spawn location if borrowing a bed + if not minetest.is_protected(p, name) then + beds.spawn[name] = p + end + end + beds.save_spawns() +end + +function beds.remove_spawns_at(pos) + for name, p in pairs(beds.spawn) do + if vector.equals(vector.round(p), pos) then + beds.spawn[name] = nil + end + end + beds.save_spawns() +end diff --git a/mods/minetest_game/beds/textures/beds_bed.png b/mods/minetest_game/beds/textures/beds_bed.png new file mode 100755 index 0000000..9c8b7c0 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_fancy.png b/mods/minetest_game/beds/textures/beds_bed_fancy.png new file mode 100755 index 0000000..bb39ce9 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_fancy.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_foot.png b/mods/minetest_game/beds/textures/beds_bed_foot.png new file mode 100755 index 0000000..2f141d5 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_foot.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_head.png b/mods/minetest_game/beds/textures/beds_bed_head.png new file mode 100755 index 0000000..5ee9ff3 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_head.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_side1.png b/mods/minetest_game/beds/textures/beds_bed_side1.png new file mode 100755 index 0000000..7e7c062 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_side1.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_side2.png b/mods/minetest_game/beds/textures/beds_bed_side2.png new file mode 100755 index 0000000..cc9d583 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_side2.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_side_bottom.png b/mods/minetest_game/beds/textures/beds_bed_side_bottom.png new file mode 100755 index 0000000..d26e1de Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_side_bottom.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_side_bottom_r.png b/mods/minetest_game/beds/textures/beds_bed_side_bottom_r.png new file mode 100755 index 0000000..18e86ba Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_side_bottom_r.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_side_top.png b/mods/minetest_game/beds/textures/beds_bed_side_top.png new file mode 100755 index 0000000..2fdad5c Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_side_top.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_side_top_r.png b/mods/minetest_game/beds/textures/beds_bed_side_top_r.png new file mode 100755 index 0000000..bb7a91b Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_side_top_r.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_top1.png b/mods/minetest_game/beds/textures/beds_bed_top1.png new file mode 100755 index 0000000..75c878f Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_top1.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_top2.png b/mods/minetest_game/beds/textures/beds_bed_top2.png new file mode 100755 index 0000000..ab8ac03 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_top2.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_top_bottom.png b/mods/minetest_game/beds/textures/beds_bed_top_bottom.png new file mode 100755 index 0000000..93c3f52 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_top_bottom.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_top_top.png b/mods/minetest_game/beds/textures/beds_bed_top_top.png new file mode 100755 index 0000000..96231f7 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_top_top.png differ diff --git a/mods/minetest_game/beds/textures/beds_bed_under.png b/mods/minetest_game/beds/textures/beds_bed_under.png new file mode 100644 index 0000000..1a67367 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_bed_under.png differ diff --git a/mods/minetest_game/beds/textures/beds_transparent.png b/mods/minetest_game/beds/textures/beds_transparent.png new file mode 100644 index 0000000..bd36820 Binary files /dev/null and b/mods/minetest_game/beds/textures/beds_transparent.png differ diff --git a/mods/minetest_game/binoculars/README.txt b/mods/minetest_game/binoculars/README.txt new file mode 100644 index 0000000..0c65f6e --- /dev/null +++ b/mods/minetest_game/binoculars/README.txt @@ -0,0 +1,37 @@ +Minetest Game mod: binoculars +============================= +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) + +Authors of media (textures) +--------------------------- +paramat (CC BY-SA 3.0): + binoculars_binoculars.png + +Crafting +-------- +binoculars:binoculars + +default:obsidian_glass O +default:bronze_ingot B + +O_O +BBB +O_O + +Usage +----- +In survival mode, use of zoom requires the binoculars item in your inventory, +they will allow a 10 degree field of view. +It can take up to 5 seconds for adding to or removal from inventory to have an +effect, however to instantly allow the use of this zoom 'use' (leftclick) the +item. + +Zoom with a field of view of 15 degrees is automatically allowed in creative +mode and for any player with the 'creative' privilege. + +The 'binoculars.update_player_property()' function is global so can be +redefined by a mod for alternative behaviour. diff --git a/mods/minetest_game/binoculars/init.lua b/mods/minetest_game/binoculars/init.lua new file mode 100644 index 0000000..914a861 --- /dev/null +++ b/mods/minetest_game/binoculars/init.lua @@ -0,0 +1,73 @@ +-- binoculars/init.lua + +-- Mod global namespace + +binoculars = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("binoculars") + + +-- Update player property +-- Global to allow overriding + +function binoculars.update_player_property(player) + local new_zoom_fov = 0 + + if player:get_inventory():contains_item( + "main", "binoculars:binoculars") then + new_zoom_fov = 10 + elseif minetest.is_creative_enabled(player:get_player_name()) then + new_zoom_fov = 15 + end + + -- Only set property if necessary to avoid player mesh reload + if player:get_properties().zoom_fov ~= new_zoom_fov then + player:set_properties({zoom_fov = new_zoom_fov}) + end +end + + +-- Set player property 'on joinplayer' + +minetest.register_on_joinplayer(function(player) + binoculars.update_player_property(player) +end) + + +-- Cyclic update of player property + +local function cyclic_update() + for _, player in ipairs(minetest.get_connected_players()) do + binoculars.update_player_property(player) + end + minetest.after(4.7, cyclic_update) +end + +minetest.after(4.7, cyclic_update) + + +-- Binoculars item + +minetest.register_craftitem("binoculars:binoculars", { + description = S("Binoculars") .. "\n" .. S("Use with 'Zoom' key"), + inventory_image = "binoculars_binoculars.png", + stack_max = 1, + groups = {tool = 1}, + + on_use = function(itemstack, user, pointed_thing) + binoculars.update_player_property(user) + end, +}) + + +-- Crafting + +minetest.register_craft({ + output = "binoculars:binoculars", + recipe = { + {"default:obsidian_glass", "", "default:obsidian_glass"}, + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + {"default:obsidian_glass", "", "default:obsidian_glass"}, + } +}) diff --git a/mods/minetest_game/binoculars/license.txt b/mods/minetest_game/binoculars/license.txt new file mode 100644 index 0000000..f3aefda --- /dev/null +++ b/mods/minetest_game/binoculars/license.txt @@ -0,0 +1,59 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017 paramat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2017 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/binoculars/locale/binoculars.de.tr b/mods/minetest_game/binoculars/locale/binoculars.de.tr new file mode 100644 index 0000000..7bd9b9d --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.de.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Fernglas +Use with 'Zoom' key=Mit „Zoom“-Taste benutzen diff --git a/mods/minetest_game/binoculars/locale/binoculars.eo.tr b/mods/minetest_game/binoculars/locale/binoculars.eo.tr new file mode 100644 index 0000000..53ad427 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.eo.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binokolo +Use with 'Zoom' key=Uzu per 'Zomo' klavo diff --git a/mods/minetest_game/binoculars/locale/binoculars.es.tr b/mods/minetest_game/binoculars/locale/binoculars.es.tr new file mode 100644 index 0000000..7b7e77d --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.es.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Prismáticos +Use with 'Zoom' key=Usar con la tecla 'Zoom' diff --git a/mods/minetest_game/binoculars/locale/binoculars.fr.tr b/mods/minetest_game/binoculars/locale/binoculars.fr.tr new file mode 100644 index 0000000..3f8b0bc --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.fr.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Jumelles +Use with 'Zoom' key=Utiliser avec le bouton « Zoom » diff --git a/mods/minetest_game/binoculars/locale/binoculars.id.tr b/mods/minetest_game/binoculars/locale/binoculars.id.tr new file mode 100644 index 0000000..9a34044 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.id.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Teropong +Use with 'Zoom' key=Pakai dengan tombol 'Zoom' diff --git a/mods/minetest_game/binoculars/locale/binoculars.it.tr b/mods/minetest_game/binoculars/locale/binoculars.it.tr new file mode 100644 index 0000000..97c7b86 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.it.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binocolo +Use with 'Zoom' key=Usalo col tasto 'Ingrandimento' diff --git a/mods/minetest_game/binoculars/locale/binoculars.jbo.tr b/mods/minetest_game/binoculars/locale/binoculars.jbo.tr new file mode 100644 index 0000000..e146569 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.jbo.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=lo reldarvistci +Use with 'Zoom' key=.i tu'a le jvinu banro batke cu tadji lo nu pilno diff --git a/mods/minetest_game/binoculars/locale/binoculars.ms.tr b/mods/minetest_game/binoculars/locale/binoculars.ms.tr new file mode 100644 index 0000000..d38e64f --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.ms.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binokular +Use with 'Zoom' key=Guna dengan kekunci 'Zum' diff --git a/mods/minetest_game/binoculars/locale/binoculars.pt_BR.tr b/mods/minetest_game/binoculars/locale/binoculars.pt_BR.tr new file mode 100644 index 0000000..4aabfef --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.pt_BR.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Binóculos +Use with 'Zoom' key=Use com a tecla de 'Zoom' diff --git a/mods/minetest_game/binoculars/locale/binoculars.ru.tr b/mods/minetest_game/binoculars/locale/binoculars.ru.tr new file mode 100644 index 0000000..6b3aa9e --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.ru.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Бинокль +Use with 'Zoom' key=Используется с привилегией 'Zoom' diff --git a/mods/minetest_game/binoculars/locale/binoculars.se.tr b/mods/minetest_game/binoculars/locale/binoculars.se.tr new file mode 100644 index 0000000..9032672 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.se.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Kikare +Use with 'Zoom' key=Används med 'Zoom' knappen diff --git a/mods/minetest_game/binoculars/locale/binoculars.sk.tr b/mods/minetest_game/binoculars/locale/binoculars.sk.tr new file mode 100644 index 0000000..5008311 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.sk.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=Ďalekohľad +Use with 'Zoom' key=Použi s klávesou "Priblíž" diff --git a/mods/minetest_game/binoculars/locale/binoculars.zh_CN.tr b/mods/minetest_game/binoculars/locale/binoculars.zh_CN.tr new file mode 100644 index 0000000..ec46cf8 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.zh_CN.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=望远镜 +Use with 'Zoom' key=与“缩放”键一起使用 diff --git a/mods/minetest_game/binoculars/locale/binoculars.zh_TW.tr b/mods/minetest_game/binoculars/locale/binoculars.zh_TW.tr new file mode 100644 index 0000000..bbe3b39 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/binoculars.zh_TW.tr @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars=望遠鏡 +Use with 'Zoom' key=與“縮放”鍵一起使用 diff --git a/mods/minetest_game/binoculars/locale/template.txt b/mods/minetest_game/binoculars/locale/template.txt new file mode 100644 index 0000000..a526462 --- /dev/null +++ b/mods/minetest_game/binoculars/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: binoculars +Binoculars= +Use with 'Zoom' key= diff --git a/mods/minetest_game/binoculars/mod.conf b/mods/minetest_game/binoculars/mod.conf new file mode 100644 index 0000000..4a64ce5 --- /dev/null +++ b/mods/minetest_game/binoculars/mod.conf @@ -0,0 +1,3 @@ +name = binoculars +description = Minetest Game mod: binoculars +depends = default diff --git a/mods/minetest_game/binoculars/textures/binoculars_binoculars.png b/mods/minetest_game/binoculars/textures/binoculars_binoculars.png new file mode 100644 index 0000000..5803d48 Binary files /dev/null and b/mods/minetest_game/binoculars/textures/binoculars_binoculars.png differ diff --git a/mods/minetest_game/boats/README.txt b/mods/minetest_game/boats/README.txt new file mode 100644 index 0000000..a2ccb48 --- /dev/null +++ b/mods/minetest_game/boats/README.txt @@ -0,0 +1,31 @@ +Minetest Game mod: boats +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures and model) +------------------------------------- +Textures: Zeg9 (CC BY-SA 3.0) +Model: thetoon and Zeg9 (CC BY-SA 3.0), + modified by PavelS(SokolovPavel) (CC BY-SA 3.0), + modified by sofar (CC BY-SA 3.0) + +Controls +-------- +Right mouse button = Enter or exit boat when pointing at boat. +Forward = Speed up. + Slow down when moving backwards. +Forward + backward = Enable cruise mode: Boat will accelerate to maximum forward + speed and remain at that speed without needing to hold the + forward key. +Backward = Slow down. + Speed up when moving backwards. + Disable cruise mode. +Left = Turn to the left. + Turn to the right when moving backwards. +Right = Turn to the right. + Turn to the left when moving backwards. diff --git a/mods/minetest_game/boats/init.lua b/mods/minetest_game/boats/init.lua new file mode 100644 index 0000000..52360be --- /dev/null +++ b/mods/minetest_game/boats/init.lua @@ -0,0 +1,290 @@ +-- boats/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("boats") + +-- +-- Helper functions +-- + +local function is_water(pos) + local nn = minetest.get_node(pos).name + return minetest.get_item_group(nn, "water") ~= 0 +end + + +local function get_velocity(v, yaw, y) + local x = -math.sin(yaw) * v + local z = math.cos(yaw) * v + return {x = x, y = y, z = z} +end + + +local function get_v(v) + return math.sqrt(v.x ^ 2 + v.z ^ 2) +end + +-- +-- Boat entity +-- + +local boat = { + initial_properties = { + physical = true, + -- Warning: Do not change the position of the collisionbox top surface, + -- lowering it causes the boat to fall through the world if underwater + collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5}, + visual = "mesh", + mesh = "boats_boat.obj", + textures = {"default_wood.png"}, + }, + + driver = nil, + v = 0, + last_v = 0, + removed = false, + auto = false +} + + +function boat.on_rightclick(self, clicker) + if not clicker or not clicker:is_player() then + return + end + local name = clicker:get_player_name() + if self.driver and name == self.driver then + -- Cleanup happens in boat.on_detach_child + clicker:set_detach() + + player_api.set_animation(clicker, "stand", 30) + local pos = clicker:get_pos() + pos = {x = pos.x, y = pos.y + 0.2, z = pos.z} + minetest.after(0.1, function() + clicker:set_pos(pos) + end) + elseif not self.driver then + clicker:set_attach(self.object, "", + {x = 0.5, y = 1, z = -3}, {x = 0, y = 0, z = 0}) + + self.driver = name + player_api.player_attached[name] = true + + minetest.after(0.2, function() + player_api.set_animation(clicker, "sit", 30) + end) + clicker:set_look_horizontal(self.object:get_yaw()) + end +end + + +-- If driver leaves server while driving boat +function boat.on_detach_child(self, child) + if child and child:get_player_name() == self.driver then + player_api.player_attached[child:get_player_name()] = false + + self.driver = nil + self.auto = false + end +end + + +function boat.on_activate(self, staticdata, dtime_s) + self.object:set_armor_groups({immortal = 1}) + if staticdata then + self.v = tonumber(staticdata) + end + self.last_v = self.v +end + + +function boat.get_staticdata(self) + return tostring(self.v) +end + + +function boat.on_punch(self, puncher) + if not puncher or not puncher:is_player() or self.removed then + return + end + + local name = puncher:get_player_name() + if self.driver and name == self.driver then + self.driver = nil + puncher:set_detach() + player_api.player_attached[name] = false + end + if not self.driver then + self.removed = true + local inv = puncher:get_inventory() + if not minetest.is_creative_enabled(name) + or not inv:contains_item("main", "boats:boat") then + local leftover = inv:add_item("main", "boats:boat") + -- if no room in inventory add a replacement boat to the world + if not leftover:is_empty() then + minetest.add_item(self.object:get_pos(), leftover) + end + end + -- delay remove to ensure player is detached + minetest.after(0.1, function() + self.object:remove() + end) + end +end + + +function boat.on_step(self, dtime) + self.v = get_v(self.object:get_velocity()) * math.sign(self.v) + if self.driver then + local driver_objref = minetest.get_player_by_name(self.driver) + if driver_objref then + local ctrl = driver_objref:get_player_control() + if ctrl.up and ctrl.down then + if not self.auto then + self.auto = true + minetest.chat_send_player(self.driver, S("Boat cruise mode on")) + end + elseif ctrl.down then + self.v = self.v - dtime * 2.0 + if self.auto then + self.auto = false + minetest.chat_send_player(self.driver, S("Boat cruise mode off")) + end + elseif ctrl.up or self.auto then + self.v = self.v + dtime * 2.0 + end + if ctrl.left then + if self.v < -0.001 then + self.object:set_yaw(self.object:get_yaw() - dtime * 0.9) + else + self.object:set_yaw(self.object:get_yaw() + dtime * 0.9) + end + elseif ctrl.right then + if self.v < -0.001 then + self.object:set_yaw(self.object:get_yaw() + dtime * 0.9) + else + self.object:set_yaw(self.object:get_yaw() - dtime * 0.9) + end + end + end + end + local velo = self.object:get_velocity() + if not self.driver and + self.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then + self.object:set_pos(self.object:get_pos()) + return + end + -- We need to preserve velocity sign to properly apply drag force + -- while moving backward + local drag = dtime * math.sign(self.v) * (0.01 + 0.0796 * self.v * self.v) + -- If drag is larger than velocity, then stop horizontal movement + if math.abs(self.v) <= math.abs(drag) then + self.v = 0 + else + self.v = self.v - drag + end + + local p = self.object:get_pos() + p.y = p.y - 0.5 + local new_velo + local new_acce = {x = 0, y = 0, z = 0} + if not is_water(p) then + local nodedef = minetest.registered_nodes[minetest.get_node(p).name] + if (not nodedef) or nodedef.walkable then + self.v = 0 + new_acce = {x = 0, y = 1, z = 0} + else + new_acce = {x = 0, y = -9.8, z = 0} + end + new_velo = get_velocity(self.v, self.object:get_yaw(), + self.object:get_velocity().y) + self.object:set_pos(self.object:get_pos()) + else + p.y = p.y + 1 + if is_water(p) then + local y = self.object:get_velocity().y + if y >= 5 then + y = 5 + elseif y < 0 then + new_acce = {x = 0, y = 20, z = 0} + else + new_acce = {x = 0, y = 5, z = 0} + end + new_velo = get_velocity(self.v, self.object:get_yaw(), y) + self.object:set_pos(self.object:get_pos()) + else + new_acce = {x = 0, y = 0, z = 0} + if math.abs(self.object:get_velocity().y) < 1 then + local pos = self.object:get_pos() + pos.y = math.floor(pos.y) + 0.5 + self.object:set_pos(pos) + new_velo = get_velocity(self.v, self.object:get_yaw(), 0) + else + new_velo = get_velocity(self.v, self.object:get_yaw(), + self.object:get_velocity().y) + self.object:set_pos(self.object:get_pos()) + end + end + end + self.object:set_velocity(new_velo) + self.object:set_acceleration(new_acce) +end + + +minetest.register_entity("boats:boat", boat) + + +minetest.register_craftitem("boats:boat", { + description = S("Boat"), + inventory_image = "boats_inventory.png", + wield_image = "boats_wield.png", + wield_scale = {x = 2, y = 2, z = 1}, + liquids_pointable = true, + groups = {flammable = 2}, + + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + if pointed_thing.type ~= "node" then + return itemstack + end + if not is_water(pointed_thing.under) then + return itemstack + end + pointed_thing.under.y = pointed_thing.under.y + 0.5 + boat = minetest.add_entity(pointed_thing.under, "boats:boat") + if boat then + if placer then + boat:set_yaw(placer:get_look_horizontal()) + end + local player_name = placer and placer:get_player_name() or "" + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + end + return itemstack + end, +}) + + +minetest.register_craft({ + output = "boats:boat", + recipe = { + {"", "", "" }, + {"group:wood", "", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + }, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "boats:boat", + burntime = 20, +}) diff --git a/mods/minetest_game/boats/license.txt b/mods/minetest_game/boats/license.txt new file mode 100644 index 0000000..d4afe75 --- /dev/null +++ b/mods/minetest_game/boats/license.txt @@ -0,0 +1,63 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures and model) +-------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Zeg9 +Copyright (C) 2012-2016 thetoon +Copyright (C) 2012-2016 PavelS(SokolovPavel) +Copyright (C) 2016 sofar (sofar@foo-projects.org) + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/boats/locale/boats.de.tr b/mods/minetest_game/boats/locale/boats.de.tr new file mode 100644 index 0000000..d8eb8d7 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.de.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Schneller Bootsmodus an +Boat cruise mode off=Schneller Bootsmodus aus +Boat=Boot diff --git a/mods/minetest_game/boats/locale/boats.eo.tr b/mods/minetest_game/boats/locale/boats.eo.tr new file mode 100644 index 0000000..7d02e2f --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.eo.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=La kroza maniero de la boato estas ŝaltita. +Boat cruise mode off=La kroza maniero de la boato estas malŝaltita. +Boat=Boato diff --git a/mods/minetest_game/boats/locale/boats.es.tr b/mods/minetest_game/boats/locale/boats.es.tr new file mode 100644 index 0000000..b9adb72 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.es.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Modo crucero en bote activado +Boat cruise mode off=Modo crucero en bote desactivado +Boat=Bote diff --git a/mods/minetest_game/boats/locale/boats.fr.tr b/mods/minetest_game/boats/locale/boats.fr.tr new file mode 100644 index 0000000..f469a0b --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.fr.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Bateau mode rapide activé +Boat cruise mode off=Bateau mode rapide désactivé +Boat=Bateau diff --git a/mods/minetest_game/boats/locale/boats.id.tr b/mods/minetest_game/boats/locale/boats.id.tr new file mode 100644 index 0000000..cf37f47 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.id.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Mode perahu jelajah nyala +Boat cruise mode off=Mode perahu jelajah mati +Boat=Perahu diff --git a/mods/minetest_game/boats/locale/boats.it.tr b/mods/minetest_game/boats/locale/boats.it.tr new file mode 100644 index 0000000..4a87835 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.it.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Modalità movimento automatico barca attivata +Boat cruise mode off=Modalità movimento automatico barca disattivata +Boat=Barca diff --git a/mods/minetest_game/boats/locale/boats.jbo.tr b/mods/minetest_game/boats/locale/boats.jbo.tr new file mode 100644 index 0000000..c7d534f --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.jbo.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=.i lo bloti cu zmiku le ka klama +Boat cruise mode off=.i lo bloti cu macnu le ka klama +Boat=lo bloti diff --git a/mods/minetest_game/boats/locale/boats.ms.tr b/mods/minetest_game/boats/locale/boats.ms.tr new file mode 100644 index 0000000..d11a68b --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.ms.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Mod bot layar makan angin dibolehkan +Boat cruise mode off=Mod bot layar makan angin dilumpuhkan +Boat=Bot diff --git a/mods/minetest_game/boats/locale/boats.pt_BR.tr b/mods/minetest_game/boats/locale/boats.pt_BR.tr new file mode 100644 index 0000000..1992fdf --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.pt_BR.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Modo de cruseiro do barco ligado +Boat cruise mode off=Modo de cruseiro do barco desligado +Boat=Barco diff --git a/mods/minetest_game/boats/locale/boats.ru.tr b/mods/minetest_game/boats/locale/boats.ru.tr new file mode 100644 index 0000000..4327098 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.ru.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Режим путешествия на лодке включен +Boat cruise mode off=Режим путешествия на лодке выключен +Boat=Лодка diff --git a/mods/minetest_game/boats/locale/boats.se.tr b/mods/minetest_game/boats/locale/boats.se.tr new file mode 100644 index 0000000..248b088 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.se.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Båtkryssningsläge på +Boat cruise mode off=Båtkryssningsläge av +Boat=Båt diff --git a/mods/minetest_game/boats/locale/boats.sk.tr b/mods/minetest_game/boats/locale/boats.sk.tr new file mode 100644 index 0000000..b6ed722 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.sk.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=Cestovný režim loďky zapnutý +Boat cruise mode off=Cestovný režim loďky vypnutý +Boat=Loďka diff --git a/mods/minetest_game/boats/locale/boats.zh_CN.tr b/mods/minetest_game/boats/locale/boats.zh_CN.tr new file mode 100644 index 0000000..254f2df --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=巡航模式开启 +Boat cruise mode off=巡航模式关闭 +Boat=船 diff --git a/mods/minetest_game/boats/locale/boats.zh_TW.tr b/mods/minetest_game/boats/locale/boats.zh_TW.tr new file mode 100644 index 0000000..97b3471 --- /dev/null +++ b/mods/minetest_game/boats/locale/boats.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on=巡航模式開啟 +Boat cruise mode off=巡航模式關閉 +Boat=船 diff --git a/mods/minetest_game/boats/locale/template.txt b/mods/minetest_game/boats/locale/template.txt new file mode 100644 index 0000000..17aedc8 --- /dev/null +++ b/mods/minetest_game/boats/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: boats +Boat cruise mode on= +Boat cruise mode off= +Boat= diff --git a/mods/minetest_game/boats/mod.conf b/mods/minetest_game/boats/mod.conf new file mode 100644 index 0000000..a727f8f --- /dev/null +++ b/mods/minetest_game/boats/mod.conf @@ -0,0 +1,3 @@ +name = boats +description = Minetest Game mod: boats +depends = default, player_api diff --git a/mods/minetest_game/boats/textures/boats_inventory.png b/mods/minetest_game/boats/textures/boats_inventory.png new file mode 100755 index 0000000..ab372a5 Binary files /dev/null and b/mods/minetest_game/boats/textures/boats_inventory.png differ diff --git a/mods/minetest_game/boats/textures/boats_wield.png b/mods/minetest_game/boats/textures/boats_wield.png new file mode 100755 index 0000000..ab372a5 Binary files /dev/null and b/mods/minetest_game/boats/textures/boats_wield.png differ diff --git a/mods/minetest_game/bones/README.txt b/mods/minetest_game/bones/README.txt new file mode 100644 index 0000000..91bcd10 --- /dev/null +++ b/mods/minetest_game/bones/README.txt @@ -0,0 +1,12 @@ +Minetest Game mod: bones +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +All textures: paramat (CC BY-SA 3.0) diff --git a/mods/minetest_game/bones/init.lua b/mods/minetest_game/bones/init.lua new file mode 100644 index 0000000..54d3f14 --- /dev/null +++ b/mods/minetest_game/bones/init.lua @@ -0,0 +1,291 @@ +-- bones/init.lua + +-- Minetest 0.4 mod: bones +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("bones") + +bones = {} + +local function is_owner(pos, name) + local owner = minetest.get_meta(pos):get_string("owner") + if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then + return true + end + return false +end + +local bones_formspec = + "size[8,9]" .. + "list[current_name;main;0,0.3;8,4;]" .. + "list[current_player;main;0,4.85;8,1;]" .. + "list[current_player;main;0,6.08;8,3;8]" .. + "listring[current_name;main]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,4.85) + +local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200 +local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4 + +minetest.register_node("bones:bones", { + description = S("Bones"), + tiles = { + "bones_top.png^[transform2", + "bones_bottom.png", + "bones_side.png", + "bones_side.png", + "bones_rear.png", + "bones_front.png" + }, + paramtype2 = "facedir", + groups = {dig_immediate = 2}, + sounds = default.node_sound_gravel_defaults(), + + can_dig = function(pos, player) + local inv = minetest.get_meta(pos):get_inventory() + local name = "" + if player then + name = player:get_player_name() + end + return is_owner(pos, name) and inv:is_empty("main") + end, + + allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + if is_owner(pos, player:get_player_name()) then + return count + end + return 0 + end, + + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + return 0 + end, + + allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if is_owner(pos, player:get_player_name()) then + return stack:get_count() + end + return 0 + end, + + on_metadata_inventory_take = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + if meta:get_inventory():is_empty("main") then + local inv = player:get_inventory() + if inv:room_for_item("main", {name = "bones:bones"}) then + inv:add_item("main", {name = "bones:bones"}) + else + minetest.add_item(pos, "bones:bones") + end + minetest.remove_node(pos) + end + end, + + on_punch = function(pos, node, player) + if not is_owner(pos, player:get_player_name()) then + return + end + + if minetest.get_meta(pos):get_string("infotext") == "" then + return + end + + local inv = minetest.get_meta(pos):get_inventory() + local player_inv = player:get_inventory() + local has_space = true + + for i = 1, inv:get_size("main") do + local stk = inv:get_stack("main", i) + if player_inv:room_for_item("main", stk) then + inv:set_stack("main", i, nil) + player_inv:add_item("main", stk) + else + has_space = false + break + end + end + + -- remove bones if player emptied them + if has_space then + if player_inv:room_for_item("main", {name = "bones:bones"}) then + player_inv:add_item("main", {name = "bones:bones"}) + else + minetest.add_item(pos,"bones:bones") + end + minetest.remove_node(pos) + end + end, + + on_timer = function(pos, elapsed) + local meta = minetest.get_meta(pos) + local time = meta:get_int("time") + elapsed + if time >= share_bones_time then + meta:set_string("infotext", S("@1's old bones", meta:get_string("owner"))) + meta:set_string("owner", "") + else + meta:set_int("time", time) + return true + end + end, + on_blast = function(pos) + end, +}) + +local function may_replace(pos, player) + local node_name = minetest.get_node(pos).name + local node_definition = minetest.registered_nodes[node_name] + + -- if the node is unknown, we return false + if not node_definition then + return false + end + + -- allow replacing air + if node_name == "air" then + return true + end + + -- don't replace nodes inside protections + if minetest.is_protected(pos, player:get_player_name()) then + return false + end + + -- allow replacing liquids + if node_definition.liquidtype ~= "none" then + return true + end + + -- don't replace filled chests and other nodes that don't allow it + local can_dig_func = node_definition.can_dig + if can_dig_func and not can_dig_func(pos, player) then + return false + end + + -- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones? + -- flowers being squished by bones are more realistical than a squished stone, too + return node_definition.buildable_to +end + +local drop = function(pos, itemstack) + local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count())) + if obj then + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 5, + z = math.random(-10, 10) / 9, + }) + end +end + +local player_inventory_lists = { "main", "craft" } +bones.player_inventory_lists = player_inventory_lists + +local function is_all_empty(player_inv) + for _, list_name in ipairs(player_inventory_lists) do + if not player_inv:is_empty(list_name) then + return false + end + end + return true +end + +minetest.register_on_dieplayer(function(player) + local bones_mode = minetest.settings:get("bones_mode") or "bones" + if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then + bones_mode = "bones" + end + + local bones_position_message = minetest.settings:get_bool("bones_position_message") == true + local player_name = player:get_player_name() + local pos = vector.round(player:get_pos()) + local pos_string = minetest.pos_to_string(pos) + + -- return if keep inventory set or in creative mode + if bones_mode == "keep" or minetest.is_creative_enabled(player_name) then + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". No bones placed") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string)) + end + return + end + + local player_inv = player:get_inventory() + if is_all_empty(player_inv) then + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". No bones placed") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2.", player_name, pos_string)) + end + return + end + + -- check if it's possible to place bones, if not find space near player + if bones_mode == "bones" and not may_replace(pos, player) then + local air = minetest.find_node_near(pos, 1, {"air"}) + if air and not minetest.is_protected(air, player_name) then + pos = air + else + bones_mode = "drop" + end + end + + if bones_mode == "drop" then + for _, list_name in ipairs(player_inventory_lists) do + for i = 1, player_inv:get_size(list_name) do + drop(pos, player_inv:get_stack(list_name, i)) + end + player_inv:set_list(list_name, {}) + end + drop(pos, ItemStack("bones:bones")) + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". Inventory dropped") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2, and dropped their inventory.", player_name, pos_string)) + end + return + end + + local param2 = minetest.dir_to_facedir(player:get_look_dir()) + minetest.set_node(pos, {name = "bones:bones", param2 = param2}) + + minetest.log("action", player_name .. " dies at " .. pos_string .. + ". Bones placed") + if bones_position_message then + minetest.chat_send_player(player_name, S("@1 died at @2, and bones were placed.", player_name, pos_string)) + end + + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("main", 8 * 4) + + for _, list_name in ipairs(player_inventory_lists) do + for i = 1, player_inv:get_size(list_name) do + local stack = player_inv:get_stack(list_name, i) + if inv:room_for_item("main", stack) then + inv:add_item("main", stack) + else -- no space left + drop(pos, stack) + end + end + player_inv:set_list(list_name, {}) + end + + meta:set_string("formspec", bones_formspec) + meta:set_string("owner", player_name) + + if share_bones_time ~= 0 then + meta:set_string("infotext", S("@1's fresh bones", player_name)) + + if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then + meta:set_int("time", 0) + else + meta:set_int("time", (share_bones_time - share_bones_time_early)) + end + + minetest.get_node_timer(pos):start(10) + else + meta:set_string("infotext", S("@1's bones", player_name)) + end +end) diff --git a/mods/minetest_game/bones/license.txt b/mods/minetest_game/bones/license.txt new file mode 100644 index 0000000..fe52584 --- /dev/null +++ b/mods/minetest_game/bones/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2016 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + diff --git a/mods/minetest_game/bones/locale/bones.de.tr b/mods/minetest_game/bones/locale/bones.de.tr new file mode 100644 index 0000000..83f5c28 --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.de.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Knochen +@1's old bones=Alte Knochen von @1 +@1 died at @2.=@1 starb bei @2. +@1 died at @2, and dropped their inventory.=@1 starb bei @2 und ließ das Inventar fallen. +@1 died at @2, and bones were placed.=@1 starb bei @2 und Knochen wurden platziert. +@1's fresh bones=Frische Knochen von @1 +@1's bones=Knochen von @1 diff --git a/mods/minetest_game/bones/locale/bones.eo.tr b/mods/minetest_game/bones/locale/bones.eo.tr new file mode 100644 index 0000000..7e89de1 --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.eo.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Ostoj +@1's old bones=La malnova ostoj de @1 +@1 died at @2.=@1 mortis ĉe @2 +@1 died at @2, and dropped their inventory.=@1 mortis ĉe @2, kaj ri delasis riaj objektoj. +@1 died at @2, and bones were placed.=@1 mortis ĉe @2, kaj ostoj metis. +@1's fresh bones=La nova ostoj de @1 +@1's bones=La ostoj de @1 diff --git a/mods/minetest_game/bones/locale/bones.es.tr b/mods/minetest_game/bones/locale/bones.es.tr new file mode 100644 index 0000000..9c45513 --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.es.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Huesos +@1's old bones=Huesos antiguos de @1 +@1 died at @2.=@1 murió en @2. +@1 died at @2, and dropped their inventory.=@1 murió en @2, y su inventario se desprendió. +@1 died at @2, and bones were placed.=@1 murió en @2, y sus huesos fueron depositados. +@1's fresh bones=Huesos recientes de @1 +@1's bones=Huesos de @1 diff --git a/mods/minetest_game/bones/locale/bones.fr.tr b/mods/minetest_game/bones/locale/bones.fr.tr new file mode 100644 index 0000000..cfe01ee --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.fr.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Os +@1's old bones=Vieux os de @1 +@1 died at @2.=@1 est mort à @2. +@1 died at @2, and dropped their inventory.=@1 est mort à @2 et a laissé tomber son inventaire. +@1 died at @2, and bones were placed.=@1 est mort à @2 et ses os ont été placés. +@1's fresh bones=Os frais de @1 +@1's bones=Os de @1 diff --git a/mods/minetest_game/bones/locale/bones.id.tr b/mods/minetest_game/bones/locale/bones.id.tr new file mode 100644 index 0000000..3c81acc --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.id.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Tulang +@1's old bones=Tulang lama @1 +@1 died at @2.=@1 mati di @2. +@1 died at @2, and dropped their inventory.=@1 mati di @2 dan meninggalkan barangnya. +@1 died at @2, and bones were placed.=@1 mati di @2 dan tulangnya diletakkan. +@1's fresh bones=Tulang segar @1 +@1's bones=Tulang @1 diff --git a/mods/minetest_game/bones/locale/bones.it.tr b/mods/minetest_game/bones/locale/bones.it.tr new file mode 100644 index 0000000..ea3094e --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.it.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Ossa +@1's old bones=Ossa vecchie di @1 +@1 died at @2.=@1 è morto alla posizione @2. +@1 died at @2, and dropped their inventory.=@1 è morto alla posizione @2, e ha lasciato a terra il contenuto del suo inventario. +@1 died at @2, and bones were placed.=@1 è morto alla posizione @2, e vi sono state posizionate delle ossa. +@1's fresh bones=Ossa fresche di @1 +@1's bones=Ossa di @1 diff --git a/mods/minetest_game/bones/locale/bones.jbo.tr b/mods/minetest_game/bones/locale/bones.jbo.tr new file mode 100644 index 0000000..cbb476e --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.jbo.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=lo bongu gunma +@1's old bones=.i ti tolci'o ke bongu gunma po'a la'o zo'i.@1.zo'i +@1 died at @2.=.i la'o zo'i.@1.zo'i pu morsi di'o lo me zoi pos.@2.pos. +@1 died at @2, and dropped their inventory.=.i la'o zo'i.@1.zo'i goi ly. pu morsi di'o lo me zoi pos.@2.pos. .ije ly. te farlu lo me le dacti liste po ly. +@1 died at @2, and bones were placed.=.i la'o zo'i.@1.zo'i goi ly. pu morsi di'o lo me zoi pos.@2.pos. .ije lo bongu gunma pu se punji +@1's fresh bones=.i ti cnino ke bongu gunma po'a la'o zo'i.@1.zo'i +@1's bones=.i ti bongu gunma po'a la'o zo'i.@1.zo'i diff --git a/mods/minetest_game/bones/locale/bones.ms.tr b/mods/minetest_game/bones/locale/bones.ms.tr new file mode 100644 index 0000000..e4b8712 --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.ms.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Tulang +@1's old bones=Tulang lama @1 +@1 died at @2.=@1 mati di @2. +@1 died at @2, and dropped their inventory.=@1 mati di @2, dan menjatuhkan inventorinya. +@1 died at @2, and bones were placed.=@1 mati di @2, dan tulang diletakkan. +@1's fresh bones=Tulang segar @1 +@1's bones=Tulang @1 diff --git a/mods/minetest_game/bones/locale/bones.pt_BR.tr b/mods/minetest_game/bones/locale/bones.pt_BR.tr new file mode 100644 index 0000000..31339af --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.pt_BR.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Ossos +@1's old bones=Ossos antigos de @1 +@1 died at @2.=@1 morreu em @2. +@1 died at @2, and dropped their inventory.=@1 morreu em @2, e seu inventário foi derrubado. +@1 died at @2, and bones were placed.=@1 morreu em @2, e os ossos foram colocados. +@1's fresh bones=Ossos recentes de @1 +@1's bones=Ossos de @1 diff --git a/mods/minetest_game/bones/locale/bones.ru.tr b/mods/minetest_game/bones/locale/bones.ru.tr new file mode 100644 index 0000000..98691c5 --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.ru.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Кости +@1's old bones=Старые кости @1 +@1 died at @2.=@1 умер в @2. +@1 died at @2, and dropped their inventory.=@1 умер в @2 и потерял содержимое своего инвентаря. +@1 died at @2, and bones were placed.=@1 умер в @2, помещены кости. +@1's fresh bones=новые кости @1 +@1's bones=кости @1 diff --git a/mods/minetest_game/bones/locale/bones.se.tr b/mods/minetest_game/bones/locale/bones.se.tr new file mode 100644 index 0000000..1323c59 --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.se.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Ben +@1's old bones=@1s Gamla ben +@1 died at @2.=@1 dog på @a. +@1 died at @2, and dropped their inventory.=@1 dog på @a, och tappade deras saker. +@1 died at @2, and bones were placed.=@1 dog på @2, och deras ben var placerade. +@1's fresh bones=@1s färska ben +@1's bones=@1s ben diff --git a/mods/minetest_game/bones/locale/bones.sk.tr b/mods/minetest_game/bones/locale/bones.sk.tr new file mode 100644 index 0000000..a32c17d --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.sk.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=Kosti +@1's old bones=Staré kosti hráča @1 +@1 died at @2.=@1 zomrel na pozícií @2. +@1 died at @2, and dropped their inventory.=@1 zomrel na pozícií @2 a vysypal svoj inventár. +@1 died at @2, and bones were placed.=@1 zomrel na pozícií @2 a ostali po ňom kosti. +@1's fresh bones=Čerstvé kosti hráča @1 +@1's bones=Kosti hráča @1 diff --git a/mods/minetest_game/bones/locale/bones.zh_CN.tr b/mods/minetest_game/bones/locale/bones.zh_CN.tr new file mode 100644 index 0000000..dadf55e --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=骨骸 +@1's old bones=@1的旧骨骸 +@1 died at @2.=@1在@2死亡。 +@1 died at @2, and dropped their inventory.=@1在@2死亡,丢掉了物品栏。 +@1 died at @2, and bones were placed.=@1在@2死亡,骨骸被放置。 +@1's fresh bones=@1的新鲜骨骸 +@1's bones=@1的骨骸 diff --git a/mods/minetest_game/bones/locale/bones.zh_TW.tr b/mods/minetest_game/bones/locale/bones.zh_TW.tr new file mode 100644 index 0000000..1a94d2f --- /dev/null +++ b/mods/minetest_game/bones/locale/bones.zh_TW.tr @@ -0,0 +1,8 @@ +# textdomain: bones +Bones=骨骸 +@1's old bones=@1的舊骨骸 +@1 died at @2.=@1在@2死亡。 +@1 died at @2, and dropped their inventory.=@1在@2死亡,丟掉了物品欄。 +@1 died at @2, and bones were placed.=@1在@2死亡,骨骸被放置。 +@1's fresh bones=@1的新鮮骨骸 +@1's bones=@1的骨骸 diff --git a/mods/minetest_game/bones/locale/template.txt b/mods/minetest_game/bones/locale/template.txt new file mode 100644 index 0000000..4ac8d45 --- /dev/null +++ b/mods/minetest_game/bones/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: bones +Bones= +@1's old bones= +@1 died at @2.= +@1 died at @2, and dropped their inventory.= +@1 died at @2, and bones were placed.= +@1's fresh bones= +@1's bones= diff --git a/mods/minetest_game/bones/mod.conf b/mods/minetest_game/bones/mod.conf new file mode 100644 index 0000000..371997b --- /dev/null +++ b/mods/minetest_game/bones/mod.conf @@ -0,0 +1,3 @@ +name = bones +description = Minetest Game mod: bones +depends = default diff --git a/mods/minetest_game/bones/textures/bones_back.png b/mods/minetest_game/bones/textures/bones_back.png new file mode 100755 index 0000000..617d4d7 Binary files /dev/null and b/mods/minetest_game/bones/textures/bones_back.png differ diff --git a/mods/minetest_game/bones/textures/bones_bottom.png b/mods/minetest_game/bones/textures/bones_bottom.png new file mode 100644 index 0000000..d3d5d32 Binary files /dev/null and b/mods/minetest_game/bones/textures/bones_bottom.png differ diff --git a/mods/minetest_game/bones/textures/bones_front.png b/mods/minetest_game/bones/textures/bones_front.png new file mode 100755 index 0000000..95e7e33 Binary files /dev/null and b/mods/minetest_game/bones/textures/bones_front.png differ diff --git a/mods/minetest_game/bones/textures/bones_rear.png b/mods/minetest_game/bones/textures/bones_rear.png new file mode 100644 index 0000000..05ee2a1 Binary files /dev/null and b/mods/minetest_game/bones/textures/bones_rear.png differ diff --git a/mods/minetest_game/bones/textures/bones_side.png b/mods/minetest_game/bones/textures/bones_side.png new file mode 100755 index 0000000..8258d76 Binary files /dev/null and b/mods/minetest_game/bones/textures/bones_side.png differ diff --git a/mods/minetest_game/bones/textures/bones_top.png b/mods/minetest_game/bones/textures/bones_top.png new file mode 100755 index 0000000..32407c7 Binary files /dev/null and b/mods/minetest_game/bones/textures/bones_top.png differ diff --git a/mods/minetest_game/bucket/README.txt b/mods/minetest_game/bucket/README.txt new file mode 100644 index 0000000..58997b2 --- /dev/null +++ b/mods/minetest_game/bucket/README.txt @@ -0,0 +1,13 @@ +Minetest Game mod: bucket +========================= +See license.txt for license information. + +Authors of source code +---------------------- +Kahrl (LGPLv2.1+) +celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures) +--------------------------- +ElementW (CC BY-SA 3.0) diff --git a/mods/minetest_game/bucket/init.lua b/mods/minetest_game/bucket/init.lua new file mode 100644 index 0000000..ebdf2e7 --- /dev/null +++ b/mods/minetest_game/bucket/init.lua @@ -0,0 +1,240 @@ +-- Minetest 0.4 mod: bucket +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("bucket") + + +minetest.register_alias("bucket", "bucket:bucket_empty") +minetest.register_alias("bucket_water", "bucket:bucket_water") +minetest.register_alias("bucket_lava", "bucket:bucket_lava") + +minetest.register_craft({ + output = "bucket:bucket_empty 1", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"", "default:steel_ingot", ""}, + } +}) + +bucket = {} +bucket.liquids = {} + +local function check_protection(pos, name, text) + if minetest.is_protected(pos, name) then + minetest.log("action", (name ~= "" and name or "A mod") + .. " tried to " .. text + .. " at protected position " + .. minetest.pos_to_string(pos) + .. " with a bucket") + minetest.record_protection_violation(pos, name) + return true + end + return false +end + +-- Register a new liquid +-- source = name of the source node +-- flowing = name of the flowing node +-- itemname = name of the new bucket item (or nil if liquid is not takeable) +-- inventory_image = texture of the new bucket item (ignored if itemname == nil) +-- name = text description of the bucket item +-- groups = (optional) groups of the bucket item, for example {water_bucket = 1} +-- force_renew = (optional) bool. Force the liquid source to renew if it has a +-- source neighbour, even if defined as 'liquid_renewable = false'. +-- Needed to avoid creating holes in sloping rivers. +-- This function can be called from any mod (that depends on bucket). +function bucket.register_liquid(source, flowing, itemname, inventory_image, name, + groups, force_renew) + bucket.liquids[source] = { + source = source, + flowing = flowing, + itemname = itemname, + force_renew = force_renew, + } + bucket.liquids[flowing] = bucket.liquids[source] + + if itemname ~= nil then + minetest.register_craftitem(itemname, { + description = name, + inventory_image = inventory_image, + stack_max = 1, + liquids_pointable = true, + groups = groups, + + on_place = function(itemstack, user, pointed_thing) + -- Must be pointing to node + if pointed_thing.type ~= "node" then + return + end + + local node = minetest.get_node_or_nil(pointed_thing.under) + local ndef = node and minetest.registered_nodes[node.name] + + -- Call on_rightclick if the pointed node defines it + if ndef and ndef.on_rightclick and + not (user and user:is_player() and + user:get_player_control().sneak) then + return ndef.on_rightclick( + pointed_thing.under, + node, user, + itemstack) + end + + local lpos + + -- Check if pointing to a buildable node + if ndef and ndef.buildable_to then + -- buildable; replace the node + lpos = pointed_thing.under + else + -- not buildable to; place the liquid above + -- check if the node above can be replaced + + lpos = pointed_thing.above + node = minetest.get_node_or_nil(lpos) + local above_ndef = node and minetest.registered_nodes[node.name] + + if not above_ndef or not above_ndef.buildable_to then + -- do not remove the bucket with the liquid + return itemstack + end + end + + if check_protection(lpos, user + and user:get_player_name() + or "", "place "..source) then + return + end + + minetest.set_node(lpos, {name = source}) + return ItemStack("bucket:bucket_empty") + end + }) + end +end + +minetest.register_craftitem("bucket:bucket_empty", { + description = S("Empty Bucket"), + inventory_image = "bucket.png", + groups = {tool = 1}, + liquids_pointable = true, + on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type == "object" then + pointed_thing.ref:punch(user, 1.0, { full_punch_interval=1.0 }, nil) + return user:get_wielded_item() + elseif pointed_thing.type ~= "node" then + -- do nothing if it's neither object nor node + return + end + -- Check if pointing to a liquid source + local node = minetest.get_node(pointed_thing.under) + local liquiddef = bucket.liquids[node.name] + local item_count = user:get_wielded_item():get_count() + + if liquiddef ~= nil + and liquiddef.itemname ~= nil + and node.name == liquiddef.source then + if check_protection(pointed_thing.under, + user:get_player_name(), + "take ".. node.name) then + return + end + + -- default set to return filled bucket + local giving_back = liquiddef.itemname + + -- check if holding more than 1 empty bucket + if item_count > 1 then + + -- if space in inventory add filled bucked, otherwise drop as item + local inv = user:get_inventory() + if inv:room_for_item("main", {name=liquiddef.itemname}) then + inv:add_item("main", liquiddef.itemname) + else + local pos = user:get_pos() + pos.y = math.floor(pos.y + 0.5) + minetest.add_item(pos, liquiddef.itemname) + end + + -- set to return empty buckets minus 1 + giving_back = "bucket:bucket_empty "..tostring(item_count-1) + + end + + -- force_renew requires a source neighbour + local source_neighbor = false + if liquiddef.force_renew then + source_neighbor = + minetest.find_node_near(pointed_thing.under, 1, liquiddef.source) + end + if not (source_neighbor and liquiddef.force_renew) then + minetest.add_node(pointed_thing.under, {name = "air"}) + end + + return ItemStack(giving_back) + else + -- non-liquid nodes will have their on_punch triggered + local node_def = minetest.registered_nodes[node.name] + if node_def then + node_def.on_punch(pointed_thing.under, node, user, pointed_thing) + end + return user:get_wielded_item() + end + end, +}) + +bucket.register_liquid( + "default:water_source", + "default:water_flowing", + "bucket:bucket_water", + "bucket_water.png", + S("Water Bucket"), + {tool = 1, water_bucket = 1} +) + +-- River water source is 'liquid_renewable = false' to avoid horizontal spread +-- of water sources in sloping rivers that can cause water to overflow +-- riverbanks and cause floods. +-- River water source is instead made renewable by the 'force renew' option +-- used here. + +bucket.register_liquid( + "default:river_water_source", + "default:river_water_flowing", + "bucket:bucket_river_water", + "bucket_river_water.png", + S("River Water Bucket"), + {tool = 1, water_bucket = 1}, + true +) + +bucket.register_liquid( + "default:lava_source", + "default:lava_flowing", + "bucket:bucket_lava", + "bucket_lava.png", + S("Lava Bucket"), + {tool = 1} +) + +minetest.register_craft({ + type = "fuel", + recipe = "bucket:bucket_lava", + burntime = 60, + replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}}, +}) + +-- Register buckets as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + {name = "bucket:bucket_empty", chance = 0.55}, + -- water in deserts/ice or above ground, lava otherwise + {name = "bucket:bucket_water", chance = 0.45, + types = {"sandstone", "desert", "ice"}}, + {name = "bucket:bucket_water", chance = 0.45, y = {0, 32768}, + types = {"normal"}}, + {name = "bucket:bucket_lava", chance = 0.45, y = {-32768, -1}, + types = {"normal"}}, + }) +end diff --git a/mods/minetest_game/bucket/license.txt b/mods/minetest_game/bucket/license.txt new file mode 100644 index 0000000..a5156ae --- /dev/null +++ b/mods/minetest_game/bucket/license.txt @@ -0,0 +1,51 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2016 Kahrl +Copyright (C) 2011-2016 celeron55, Perttu Ahola +Copyright (C) 2011-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2015-2016 ElementW + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/bucket/locale/bucket.de.tr b/mods/minetest_game/bucket/locale/bucket.de.tr new file mode 100644 index 0000000..570dff1 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.de.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Leerer Eimer +Water Bucket=Wassereimer +River Water Bucket=Flusswassereimer +Lava Bucket=Lavaeimer diff --git a/mods/minetest_game/bucket/locale/bucket.eo.tr b/mods/minetest_game/bucket/locale/bucket.eo.tr new file mode 100644 index 0000000..b6266a1 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.eo.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Malplena Sitelo +Water Bucket=Sitelo da Akvo +River Water Bucket=Sitelo da Rivera Akvo +Lava Bucket=Sitelo da Lafo diff --git a/mods/minetest_game/bucket/locale/bucket.es.tr b/mods/minetest_game/bucket/locale/bucket.es.tr new file mode 100644 index 0000000..91a0623 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.es.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Cubo vacío +Water Bucket=Cubo con agua +River Water Bucket=Cubo con agua de río +Lava Bucket=Cubo con lava diff --git a/mods/minetest_game/bucket/locale/bucket.fr.tr b/mods/minetest_game/bucket/locale/bucket.fr.tr new file mode 100644 index 0000000..5065150 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.fr.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Seau vide +Water Bucket=Seau d'eau +River Water Bucket=Seau d'eau de rivière +Lava Bucket=Seau de lave diff --git a/mods/minetest_game/bucket/locale/bucket.id.tr b/mods/minetest_game/bucket/locale/bucket.id.tr new file mode 100644 index 0000000..5662563 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.id.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Ember Kosong +Water Bucket=Ember Air +River Water Bucket=Ember Air Sungai +Lava Bucket=Ember Lava diff --git a/mods/minetest_game/bucket/locale/bucket.it.tr b/mods/minetest_game/bucket/locale/bucket.it.tr new file mode 100644 index 0000000..beca28c --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.it.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Secchio vuoto +Water Bucket=Secchio d'acqua +River Water Bucket=Secchio d'acqua di fiume +Lava Bucket=Secchio di lava diff --git a/mods/minetest_game/bucket/locale/bucket.jbo.tr b/mods/minetest_game/bucket/locale/bucket.jbo.tr new file mode 100644 index 0000000..e40d2b9 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.jbo.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=lo baktu be no da +Water Bucket=lo baktu be lo djacu +River Water Bucket=lo baktu be lo rirxe djacu +Lava Bucket=lo baktu be lo likro'i diff --git a/mods/minetest_game/bucket/locale/bucket.ms.tr b/mods/minetest_game/bucket/locale/bucket.ms.tr new file mode 100644 index 0000000..02ba38a --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.ms.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Baldi Kosong +Water Bucket=Baldi Air +River Water Bucket=Baldi Air Sungai +Lava Bucket=Baldi Lava diff --git a/mods/minetest_game/bucket/locale/bucket.pt_BR.tr b/mods/minetest_game/bucket/locale/bucket.pt_BR.tr new file mode 100644 index 0000000..429acac --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.pt_BR.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Balde Vazio +Water Bucket=Balde de Água +River Water Bucket=Balde de Água do Rio +Lava Bucket=Balde de Lava diff --git a/mods/minetest_game/bucket/locale/bucket.ru.tr b/mods/minetest_game/bucket/locale/bucket.ru.tr new file mode 100644 index 0000000..8ede280 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.ru.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Пустое Ведро +Water Bucket=Ведро с Водой +River Water Bucket=Ведро с Речной Водой +Lava Bucket=Ведро с Лавой diff --git a/mods/minetest_game/bucket/locale/bucket.se.tr b/mods/minetest_game/bucket/locale/bucket.se.tr new file mode 100644 index 0000000..105b5d3 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.se.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Tom hink +Water Bucket=Vatten hink +River Water Bucket=Flodvatten hink +Lava Bucket=Lava hink diff --git a/mods/minetest_game/bucket/locale/bucket.sk.tr b/mods/minetest_game/bucket/locale/bucket.sk.tr new file mode 100644 index 0000000..0327b20 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.sk.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=Prázdne vedro +Water Bucket=Vedro s vodou +River Water Bucket=Vedro s vodou z rieky +Lava Bucket=Vedro s lávou diff --git a/mods/minetest_game/bucket/locale/bucket.zh_CN.tr b/mods/minetest_game/bucket/locale/bucket.zh_CN.tr new file mode 100644 index 0000000..fda5bfc --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.zh_CN.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=空桶 +Water Bucket=水桶 +River Water Bucket=河水桶 +Lava Bucket=岩浆桶 diff --git a/mods/minetest_game/bucket/locale/bucket.zh_TW.tr b/mods/minetest_game/bucket/locale/bucket.zh_TW.tr new file mode 100644 index 0000000..965d657 --- /dev/null +++ b/mods/minetest_game/bucket/locale/bucket.zh_TW.tr @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket=空桶 +Water Bucket=水桶 +River Water Bucket=河水桶 +Lava Bucket=岩漿桶 diff --git a/mods/minetest_game/bucket/locale/template.txt b/mods/minetest_game/bucket/locale/template.txt new file mode 100644 index 0000000..a37c103 --- /dev/null +++ b/mods/minetest_game/bucket/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: bucket +Empty Bucket= +Water Bucket= +River Water Bucket= +Lava Bucket= diff --git a/mods/minetest_game/bucket/mod.conf b/mods/minetest_game/bucket/mod.conf new file mode 100644 index 0000000..fef4687 --- /dev/null +++ b/mods/minetest_game/bucket/mod.conf @@ -0,0 +1,4 @@ +name = bucket +description = Minetest Game mod: bucket +depends = default +optional_depends = dungeon_loot diff --git a/mods/minetest_game/bucket/textures/bucket.png b/mods/minetest_game/bucket/textures/bucket.png new file mode 100755 index 0000000..dc128f6 Binary files /dev/null and b/mods/minetest_game/bucket/textures/bucket.png differ diff --git a/mods/minetest_game/bucket/textures/bucket_lava.png b/mods/minetest_game/bucket/textures/bucket_lava.png new file mode 100644 index 0000000..6269af3 Binary files /dev/null and b/mods/minetest_game/bucket/textures/bucket_lava.png differ diff --git a/mods/minetest_game/bucket/textures/bucket_river_water.png b/mods/minetest_game/bucket/textures/bucket_river_water.png new file mode 100755 index 0000000..bf17521 Binary files /dev/null and b/mods/minetest_game/bucket/textures/bucket_river_water.png differ diff --git a/mods/minetest_game/bucket/textures/bucket_water (copy).png b/mods/minetest_game/bucket/textures/bucket_water (copy).png new file mode 100755 index 0000000..6f0d05f Binary files /dev/null and b/mods/minetest_game/bucket/textures/bucket_water (copy).png differ diff --git a/mods/minetest_game/bucket/textures/bucket_water.png b/mods/minetest_game/bucket/textures/bucket_water.png new file mode 100755 index 0000000..6f0d05f Binary files /dev/null and b/mods/minetest_game/bucket/textures/bucket_water.png differ diff --git a/mods/minetest_game/butterflies/README.txt b/mods/minetest_game/butterflies/README.txt new file mode 100644 index 0000000..a7f52a0 --- /dev/null +++ b/mods/minetest_game/butterflies/README.txt @@ -0,0 +1,14 @@ +Minetest Game mod: Butterflies +============================== +Adds butterflies to the world on mapgen, which can be caught in a net if the +fireflies mod is also enabled. + +Authors of source code +---------------------- +Shara RedCat (MIT) + +Authors of media (textures) +--------------------------- +Shara RedCat (CC BY-SA 3.0): + butterflies_butterfly_*.png + butterflies_butterfly_*_animated.png \ No newline at end of file diff --git a/mods/minetest_game/butterflies/init.lua b/mods/minetest_game/butterflies/init.lua new file mode 100644 index 0000000..49240ee --- /dev/null +++ b/mods/minetest_game/butterflies/init.lua @@ -0,0 +1,137 @@ +-- butterflies/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("butterflies") + +-- register butterflies +local butter_list = { + {"white", S("White Butterfly")}, + {"red", S("Red Butterfly")}, + {"violet", S("Violet Butterfly")} +} + +for i in ipairs (butter_list) do + local name = butter_list[i][1] + local desc = butter_list[i][2] + + minetest.register_node("butterflies:butterfly_"..name, { + description = desc, + drawtype = "plantlike", + tiles = {{ + name = "butterflies_butterfly_"..name.."_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3 + }, + }}, + inventory_image = "butterflies_butterfly_"..name..".png", + wield_image = "butterflies_butterfly_"..name..".png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "butterflies:butterfly_"..name}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) < 11 then + minetest.set_node(pos, {name = "butterflies:hidden_butterfly_"..name}) + end + minetest.get_node_timer(pos):start(30) + end + }) + + minetest.register_node("butterflies:hidden_butterfly_"..name, { + drawtype = "airlike", + inventory_image = "butterflies_butterfly_"..name..".png^default_invisible_node_overlay.png", + wield_image = "butterflies_butterfly_"..name..".png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "butterflies:hidden_butterfly_"..name}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) >= 11 then + minetest.set_node(pos, {name = "butterflies:butterfly_"..name}) + end + minetest.get_node_timer(pos):start(30) + end + }) +end + +-- register decoration +minetest.register_decoration({ + name = "butterflies:butterfly", + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + place_offset_y = 2, + sidelen = 80, + fill_ratio = 0.005, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = { + "butterflies:butterfly_white", + "butterflies:butterfly_red", + "butterflies:butterfly_violet" + }, + spawn_by = "group:flower", + num_spawn_by = 1 +}) + +-- get decoration ID +local butterflies = minetest.get_decoration_id("butterflies:butterfly") +minetest.set_gen_notify({decoration = true}, {butterflies}) + +-- start nodetimers +minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = {} + + for _, pos in ipairs(gennotify["decoration#"..butterflies] or {}) do + local deco_pos = {x = pos.x, y = pos.y + 3, z = pos.z} + table.insert(poslist, deco_pos) + end + + if #poslist ~= 0 then + for i = 1, #poslist do + local pos = poslist[i] + minetest.get_node_timer(pos):start(1) + end + end +end) diff --git a/mods/minetest_game/butterflies/license.txt b/mods/minetest_game/butterflies/license.txt new file mode 100644 index 0000000..eebdad6 --- /dev/null +++ b/mods/minetest_game/butterflies/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (c) 2018 Shara RedCat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2018 Shara RedCat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ \ No newline at end of file diff --git a/mods/minetest_game/butterflies/locale/butterflies.de.tr b/mods/minetest_game/butterflies/locale/butterflies.de.tr new file mode 100644 index 0000000..2f1b982 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.de.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Weißer Schmetterling +Red Butterfly=Roter Schmetterling +Violet Butterfly=Violetter Schmetterling diff --git a/mods/minetest_game/butterflies/locale/butterflies.eo.tr b/mods/minetest_game/butterflies/locale/butterflies.eo.tr new file mode 100644 index 0000000..3dec04e --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.eo.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Blanka Papilio +Red Butterfly=Ruĝa Papilio +Violet Butterfly=Viola Papilio diff --git a/mods/minetest_game/butterflies/locale/butterflies.es.tr b/mods/minetest_game/butterflies/locale/butterflies.es.tr new file mode 100644 index 0000000..59a28eb --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.es.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Mariposa blanca +Red Butterfly=Mariposa roja +Violet Butterfly=Mariposa violeta diff --git a/mods/minetest_game/butterflies/locale/butterflies.fr.tr b/mods/minetest_game/butterflies/locale/butterflies.fr.tr new file mode 100644 index 0000000..8f5c094 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.fr.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Papillon blanc +Red Butterfly=Papillon rouge +Violet Butterfly=Papillon violet diff --git a/mods/minetest_game/butterflies/locale/butterflies.id.tr b/mods/minetest_game/butterflies/locale/butterflies.id.tr new file mode 100644 index 0000000..d4429a6 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.id.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Kupu-Kupu Putih +Red Butterfly=Kupu-Kupu Merah +Violet Butterfly=Kupu-Kupu Ungu diff --git a/mods/minetest_game/butterflies/locale/butterflies.it.tr b/mods/minetest_game/butterflies/locale/butterflies.it.tr new file mode 100644 index 0000000..ec65da6 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.it.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Farfalla bianca +Red Butterfly=Farfalla rossa +Violet Butterfly=Farfalla viola diff --git a/mods/minetest_game/butterflies/locale/butterflies.jbo.tr b/mods/minetest_game/butterflies/locale/butterflies.jbo.tr new file mode 100644 index 0000000..f003e00 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.jbo.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=lo blabi toldi +Red Butterfly=lo xunre toldi +Violet Butterfly=lo zirpu toldi diff --git a/mods/minetest_game/butterflies/locale/butterflies.ms.tr b/mods/minetest_game/butterflies/locale/butterflies.ms.tr new file mode 100644 index 0000000..b8bde85 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.ms.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Rama-Rama Putih +Red Butterfly=Rama-Rama Merah +Violet Butterfly=Rama-Rama Ungu diff --git a/mods/minetest_game/butterflies/locale/butterflies.pt_BR.tr b/mods/minetest_game/butterflies/locale/butterflies.pt_BR.tr new file mode 100644 index 0000000..d89503a --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.pt_BR.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly= +Red Butterfly= +Violet Butterfly= diff --git a/mods/minetest_game/butterflies/locale/butterflies.ru.tr b/mods/minetest_game/butterflies/locale/butterflies.ru.tr new file mode 100644 index 0000000..7a79ed8 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.ru.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Белая Бабочка +Red Butterfly=Красная Бабочка +Violet Butterfly=Фиолетовая Бабочка diff --git a/mods/minetest_game/butterflies/locale/butterflies.se.tr b/mods/minetest_game/butterflies/locale/butterflies.se.tr new file mode 100644 index 0000000..77bfb34 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.se.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Vit fjäril +Red Butterfly=Röd fjäril +Violet Butterfly=Violett fjäril diff --git a/mods/minetest_game/butterflies/locale/butterflies.sk.tr b/mods/minetest_game/butterflies/locale/butterflies.sk.tr new file mode 100644 index 0000000..c3086e7 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.sk.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=Biely motýlik +Red Butterfly=Červený motýlik +Violet Butterfly=Fialový motýlik diff --git a/mods/minetest_game/butterflies/locale/butterflies.zh_CN.tr b/mods/minetest_game/butterflies/locale/butterflies.zh_CN.tr new file mode 100644 index 0000000..24e0bd1 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=白蝴蝶 +Red Butterfly=红蝴蝶 +Violet Butterfly=紫蝴蝶 diff --git a/mods/minetest_game/butterflies/locale/butterflies.zh_TW.tr b/mods/minetest_game/butterflies/locale/butterflies.zh_TW.tr new file mode 100644 index 0000000..8d927c1 --- /dev/null +++ b/mods/minetest_game/butterflies/locale/butterflies.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly=白蝴蝶 +Red Butterfly=紅蝴蝶 +Violet Butterfly=紫蝴蝶 diff --git a/mods/minetest_game/butterflies/locale/template.txt b/mods/minetest_game/butterflies/locale/template.txt new file mode 100644 index 0000000..d89503a --- /dev/null +++ b/mods/minetest_game/butterflies/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: butterflies +White Butterfly= +Red Butterfly= +Violet Butterfly= diff --git a/mods/minetest_game/butterflies/mod.conf b/mods/minetest_game/butterflies/mod.conf new file mode 100644 index 0000000..1c66497 --- /dev/null +++ b/mods/minetest_game/butterflies/mod.conf @@ -0,0 +1,3 @@ +name = butterflies +description = Minetest Game mod: Butterflies +depends = default, flowers diff --git a/mods/minetest_game/butterflies/textures/butterflies_butterfly_red.png b/mods/minetest_game/butterflies/textures/butterflies_butterfly_red.png new file mode 100644 index 0000000..8edfc36 Binary files /dev/null and b/mods/minetest_game/butterflies/textures/butterflies_butterfly_red.png differ diff --git a/mods/minetest_game/butterflies/textures/butterflies_butterfly_red_animated.png b/mods/minetest_game/butterflies/textures/butterflies_butterfly_red_animated.png new file mode 100644 index 0000000..4a2097b Binary files /dev/null and b/mods/minetest_game/butterflies/textures/butterflies_butterfly_red_animated.png differ diff --git a/mods/minetest_game/butterflies/textures/butterflies_butterfly_violet.png b/mods/minetest_game/butterflies/textures/butterflies_butterfly_violet.png new file mode 100644 index 0000000..8b8c29d Binary files /dev/null and b/mods/minetest_game/butterflies/textures/butterflies_butterfly_violet.png differ diff --git a/mods/minetest_game/butterflies/textures/butterflies_butterfly_violet_animated.png b/mods/minetest_game/butterflies/textures/butterflies_butterfly_violet_animated.png new file mode 100644 index 0000000..3f9d72e Binary files /dev/null and b/mods/minetest_game/butterflies/textures/butterflies_butterfly_violet_animated.png differ diff --git a/mods/minetest_game/butterflies/textures/butterflies_butterfly_white.png b/mods/minetest_game/butterflies/textures/butterflies_butterfly_white.png new file mode 100644 index 0000000..db4eaec Binary files /dev/null and b/mods/minetest_game/butterflies/textures/butterflies_butterfly_white.png differ diff --git a/mods/minetest_game/butterflies/textures/butterflies_butterfly_white_animated.png b/mods/minetest_game/butterflies/textures/butterflies_butterfly_white_animated.png new file mode 100644 index 0000000..e7cada3 Binary files /dev/null and b/mods/minetest_game/butterflies/textures/butterflies_butterfly_white_animated.png differ diff --git a/mods/minetest_game/carts/README.txt b/mods/minetest_game/carts/README.txt new file mode 100644 index 0000000..c0be2d7 --- /dev/null +++ b/mods/minetest_game/carts/README.txt @@ -0,0 +1,23 @@ +Carts (formerly boost_cart) +========================== + +Carts, based almost entirely on the mod boost_cart [1], which +itself is based on (and fully compatible with) the carts mod [2]. + +The model was originally designed by stujones11 [3] (CC-0). + +Cart textures are based on original work from PixelBOX by Gambit (permissive +license). + + +[1] https://github.com/SmallJoker/boost_cart/ +[2] https://github.com/PilzAdam/carts/ +[3] https://github.com/stujones11/railcart/ + + +Features +---------- +- A fast cart for your railway or roller coaster (up to 7 m/s!) +- Boost and brake rails +- Rail junction switching with the 'right-left' walking keys +- Handbrake with the 'back' key diff --git a/mods/minetest_game/carts/cart_entity.lua b/mods/minetest_game/carts/cart_entity.lua new file mode 100644 index 0000000..8008bcf --- /dev/null +++ b/mods/minetest_game/carts/cart_entity.lua @@ -0,0 +1,428 @@ +-- carts/cart_entity.lua + +-- support for MT game translation. +local S = carts.get_translator + +local cart_entity = { + initial_properties = { + physical = false, -- otherwise going uphill breaks + collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + visual = "mesh", + mesh = "carts_cart.b3d", + visual_size = {x=1, y=1}, + textures = {"carts_cart.png"}, + }, + + driver = nil, + punched = false, -- used to re-send velocity and position + velocity = {x=0, y=0, z=0}, -- only used on punch + old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch + old_pos = nil, + old_switch = 0, + railtype = nil, + attached_items = {} +} + +function cart_entity:on_rightclick(clicker) + if not clicker or not clicker:is_player() then + return + end + local player_name = clicker:get_player_name() + if self.driver and player_name == self.driver then + carts:manage_attachment(clicker, nil) + elseif not self.driver then + carts:manage_attachment(clicker, self.object) + self.driver = player_name + end +end + +function cart_entity:on_activate(staticdata, dtime_s) + self.object:set_armor_groups({immortal=1}) + if string.sub(staticdata, 1, string.len("return")) ~= "return" then + return + end + local data = minetest.deserialize(staticdata) + if type(data) ~= "table" then + return + end + self.railtype = data.railtype + if data.old_dir then + self.old_dir = data.old_dir + end +end + +function cart_entity:get_staticdata() + return minetest.serialize({ + railtype = self.railtype, + old_dir = self.old_dir + }) +end + +-- 0.5.x and later: When the driver leaves +function cart_entity:on_detach_child(child) + if child and child:get_player_name() == self.driver then + -- Clean up eye height + carts:manage_attachment(child, nil) + self.driver = nil + end +end + +function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) + local pos = self.object:get_pos() + local vel = self.object:get_velocity() + if not self.railtype or vector.equals(vel, {x=0, y=0, z=0}) then + local node = minetest.get_node(pos).name + self.railtype = minetest.get_item_group(node, "connect_to_raillike") + end + -- Punched by non-player + if not puncher or not puncher:is_player() then + local cart_dir = carts:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + self.velocity = vector.multiply(cart_dir, 2) + self.punched = true + return + end + -- Player digs cart by sneak-punch + if puncher:get_player_control().sneak then + if self.sound_handle then + minetest.sound_stop(self.sound_handle) + end + -- Detach driver and items + if self.driver then + if self.old_pos then + self.object:set_pos(self.old_pos) + end + local player = minetest.get_player_by_name(self.driver) + carts:manage_attachment(player, nil) + end + for _, obj_ in ipairs(self.attached_items) do + if obj_ then + obj_:set_detach() + end + end + -- Pick up cart + local inv = puncher:get_inventory() + if not minetest.is_creative_enabled(puncher:get_player_name()) + or not inv:contains_item("main", "carts:cart") then + local leftover = inv:add_item("main", "carts:cart") + -- If no room in inventory add a replacement cart to the world + if not leftover:is_empty() then + minetest.add_item(self.object:get_pos(), leftover) + end + end + self.object:remove() + return + end + -- Player punches cart to alter velocity + if puncher:get_player_name() == self.driver then + if math.abs(vel.x + vel.z) > carts.punch_speed_max then + return + end + end + + local punch_dir = carts:velocity_to_dir(puncher:get_look_dir()) + punch_dir.y = 0 + local cart_dir = carts:get_rail_direction(pos, punch_dir, nil, nil, self.railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + + local punch_interval = 1 + -- Faulty tool registrations may cause the interval to be set to 0 ! + if tool_capabilities and (tool_capabilities.full_punch_interval or 0) > 0 then + punch_interval = tool_capabilities.full_punch_interval + end + time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval) + local f = 2 * (time_from_last_punch / punch_interval) + + self.velocity = vector.multiply(cart_dir, f) + self.old_dir = cart_dir + self.punched = true +end + +local function rail_on_step_event(handler, obj, dtime) + if handler then + handler(obj, dtime) + end +end + +-- sound refresh interval = 1.0sec +local function rail_sound(self, dtime) + if not self.sound_ttl then + self.sound_ttl = 1.0 + return + elseif self.sound_ttl > 0 then + self.sound_ttl = self.sound_ttl - dtime + return + end + self.sound_ttl = 1.0 + if self.sound_handle then + local handle = self.sound_handle + self.sound_handle = nil + minetest.after(0.2, minetest.sound_stop, handle) + end + local vel = self.object:get_velocity() + local speed = vector.length(vel) + if speed > 0 then + self.sound_handle = minetest.sound_play( + "carts_cart_moving", { + object = self.object, + gain = (speed / carts.speed_max) / 2, + loop = true, + }) + end +end + +local function get_railparams(pos) + local node = minetest.get_node(pos) + return carts.railparams[node.name] or {} +end + +local v3_len = vector.length +local function rail_on_step(self, dtime) + local vel = self.object:get_velocity() + if self.punched then + vel = vector.add(vel, self.velocity) + self.object:set_velocity(vel) + self.old_dir.y = 0 + elseif vector.equals(vel, {x=0, y=0, z=0}) then + return + end + + local pos = self.object:get_pos() + local cart_dir = carts:velocity_to_dir(vel) + local same_dir = vector.equals(cart_dir, self.old_dir) + local update = {} + + if self.old_pos and not self.punched and same_dir then + local flo_pos = vector.round(pos) + local flo_old = vector.round(self.old_pos) + if vector.equals(flo_pos, flo_old) then + -- Do not check one node multiple times + return + end + end + + local ctrl, player + + -- Get player controls + if self.driver then + player = minetest.get_player_by_name(self.driver) + if player then + ctrl = player:get_player_control() + end + end + + local stop_wiggle = false + if self.old_pos and same_dir then + -- Detection for "skipping" nodes (perhaps use average dtime?) + -- It's sophisticated enough to take the acceleration in account + local acc = self.object:get_acceleration() + local distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc)) + + local new_pos, new_dir = carts:pathfinder( + pos, self.old_pos, self.old_dir, distance, ctrl, + self.old_switch, self.railtype + ) + + if new_pos then + -- No rail found: set to the expected position + pos = new_pos + update.pos = true + cart_dir = new_dir + end + elseif self.old_pos and self.old_dir.y ~= 1 and not self.punched then + -- Stop wiggle + stop_wiggle = true + end + + local railparams + + -- dir: New moving direction of the cart + -- switch_keys: Currently pressed L/R key, used to ignore the key on the next rail node + local dir, switch_keys = carts:get_rail_direction( + pos, cart_dir, ctrl, self.old_switch, self.railtype + ) + local dir_changed = not vector.equals(dir, self.old_dir) + + local new_acc = {x=0, y=0, z=0} + if stop_wiggle or vector.equals(dir, {x=0, y=0, z=0}) then + vel = {x = 0, y = 0, z = 0} + local pos_r = vector.round(pos) + if not carts:is_rail(pos_r, self.railtype) + and self.old_pos then + pos = self.old_pos + elseif not stop_wiggle then + pos = pos_r + else + pos.y = math.floor(pos.y + 0.5) + end + update.pos = true + update.vel = true + else + -- Direction change detected + if dir_changed then + vel = vector.multiply(dir, math.abs(vel.x + vel.z)) + update.vel = true + if dir.y ~= self.old_dir.y then + pos = vector.round(pos) + update.pos = true + end + end + -- Center on the rail + if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then + pos.x = math.floor(pos.x + 0.5) + update.pos = true + end + if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then + pos.z = math.floor(pos.z + 0.5) + update.pos = true + end + + -- Slow down or speed up.. + local acc = dir.y * -4.0 + + -- Get rail for corrected position + railparams = get_railparams(pos) + + -- no need to check for railparams == nil since we always make it exist. + local speed_mod = railparams.acceleration + if speed_mod and speed_mod ~= 0 then + -- Try to make it similar to the original carts mod + acc = acc + speed_mod + else + -- Handbrake or coast + if ctrl and ctrl.down then + acc = acc - 3 + else + acc = acc - 0.4 + end + end + + new_acc = vector.multiply(dir, acc) + end + + -- Limits + local max_vel = carts.speed_max + for _, v in pairs({"x","y","z"}) do + if math.abs(vel[v]) > max_vel then + vel[v] = carts:get_sign(vel[v]) * max_vel + new_acc[v] = 0 + update.vel = true + end + end + + self.object:set_acceleration(new_acc) + self.old_pos = vector.round(pos) + if not vector.equals(dir, {x=0, y=0, z=0}) and not stop_wiggle then + self.old_dir = vector.new(dir) + end + self.old_switch = switch_keys + + if self.punched then + -- Collect dropped items + for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do + local ent = obj_:get_luaentity() + -- Careful here: physical_state and disable_physics are item-internal APIs + if ent and ent.name == "__builtin:item" and ent.physical_state then + ent:disable_physics() + obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0}) + self.attached_items[#self.attached_items + 1] = obj_ + end + end + self.punched = false + update.vel = true + end + + railparams = railparams or get_railparams(pos) + + if not (update.vel or update.pos) then + rail_on_step_event(railparams.on_step, self, dtime) + return + end + + local yaw = 0 + if self.old_dir.x < 0 then + yaw = 0.5 + elseif self.old_dir.x > 0 then + yaw = 1.5 + elseif self.old_dir.z < 0 then + yaw = 1 + end + self.object:set_yaw(yaw * math.pi) + + local anim = {x=0, y=0} + if dir.y == -1 then + anim = {x=1, y=1} + elseif dir.y == 1 then + anim = {x=2, y=2} + end + self.object:set_animation(anim, 1, 0) + + if update.vel then + self.object:set_velocity(vel) + end + if update.pos then + if dir_changed then + self.object:set_pos(pos) + else + self.object:move_to(pos) + end + end + + -- call event handler + rail_on_step_event(railparams.on_step, self, dtime) +end + +function cart_entity:on_step(dtime) + rail_on_step(self, dtime) + rail_sound(self, dtime) +end + +minetest.register_entity("carts:cart", cart_entity) + +minetest.register_craftitem("carts:cart", { + description = S("Cart") .. "\n" .. S("(Sneak+Click to pick up)"), + inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_front.png", "carts_cart_side.png"), + wield_image = "carts_cart_front.png", + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + if not pointed_thing.type == "node" then + return + end + if carts:is_rail(pointed_thing.under) then + minetest.add_entity(pointed_thing.under, "carts:cart") + elseif carts:is_rail(pointed_thing.above) then + minetest.add_entity(pointed_thing.above, "carts:cart") + else + return + end + + minetest.sound_play({name = "default_place_node_metal", gain = 0.5}, + {pos = pointed_thing.above}, true) + + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + return itemstack + end, +}) + +minetest.register_craft({ + output = "carts:cart", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + }, +}) diff --git a/mods/minetest_game/carts/functions.lua b/mods/minetest_game/carts/functions.lua new file mode 100644 index 0000000..36b7e12 --- /dev/null +++ b/mods/minetest_game/carts/functions.lua @@ -0,0 +1,252 @@ +function carts:get_sign(z) + if z == 0 then + return 0 + else + return z / math.abs(z) + end +end + +function carts:manage_attachment(player, obj) + if not player then + return + end + local status = obj ~= nil + local player_name = player:get_player_name() + if obj and player:get_attach() == obj then + return + end + player_api.player_attached[player_name] = status + + if status then + player:set_attach(obj, "", {x=0, y=-4.5, z=0}, {x=0, y=0, z=0}) + player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0}) + + -- player_api does not update the animation + -- when the player is attached, reset to default animation + player_api.set_animation(player, "stand") + else + player:set_detach() + player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0}) + end +end + +function carts:velocity_to_dir(v) + if math.abs(v.x) > math.abs(v.z) then + return {x=carts:get_sign(v.x), y=carts:get_sign(v.y), z=0} + else + return {x=0, y=carts:get_sign(v.y), z=carts:get_sign(v.z)} + end +end + +function carts:is_rail(pos, railtype) + local node = minetest.get_node(pos).name + if node == "ignore" then + local vm = minetest.get_voxel_manip() + local emin, emax = vm:read_from_map(pos, pos) + local area = VoxelArea:new{ + MinEdge = emin, + MaxEdge = emax, + } + local data = vm:get_data() + local vi = area:indexp(pos) + node = minetest.get_name_from_content_id(data[vi]) + end + if minetest.get_item_group(node, "rail") == 0 then + return false + end + if not railtype then + return true + end + return minetest.get_item_group(node, "connect_to_raillike") == railtype +end + +function carts:check_front_up_down(pos, dir_, check_up, railtype) + local dir = vector.new(dir_) + local cur + + -- Front + dir.y = 0 + cur = vector.add(pos, dir) + if carts:is_rail(cur, railtype) then + return dir + end + -- Up + if check_up then + dir.y = 1 + cur = vector.add(pos, dir) + if carts:is_rail(cur, railtype) then + return dir + end + end + -- Down + dir.y = -1 + cur = vector.add(pos, dir) + if carts:is_rail(cur, railtype) then + return dir + end + return nil +end + +function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype) + local pos = vector.round(pos_) + local cur + local left_check, right_check = true, true + + -- Check left and right + local left = {x=0, y=0, z=0} + local right = {x=0, y=0, z=0} + if dir.z ~= 0 and dir.x == 0 then + left.x = -dir.z + right.x = dir.z + elseif dir.x ~= 0 and dir.z == 0 then + left.z = dir.x + right.z = -dir.x + end + + local straight_priority = ctrl and dir.y ~= 0 + + -- Normal, to disallow rail switching up- & downhill + if straight_priority then + cur = self:check_front_up_down(pos, dir, true, railtype) + if cur then + return cur + end + end + + if ctrl then + if old_switch == 1 then + left_check = false + elseif old_switch == 2 then + right_check = false + end + if ctrl.left and left_check then + cur = self:check_front_up_down(pos, left, false, railtype) + if cur then + return cur, 1 + end + left_check = false + end + if ctrl.right and right_check then + cur = self:check_front_up_down(pos, right, false, railtype) + if cur then + return cur, 2 + end + right_check = true + end + end + + -- Normal + if not straight_priority then + cur = self:check_front_up_down(pos, dir, true, railtype) + if cur then + return cur + end + end + + -- Left, if not already checked + if left_check then + cur = carts:check_front_up_down(pos, left, false, railtype) + if cur then + return cur + end + end + + -- Right, if not already checked + if right_check then + cur = carts:check_front_up_down(pos, right, false, railtype) + if cur then + return cur + end + end + + -- Backwards + if not old_switch then + cur = carts:check_front_up_down(pos, { + x = -dir.x, + y = dir.y, + z = -dir.z + }, true, railtype) + if cur then + return cur + end + end + + return {x=0, y=0, z=0} +end + +function carts:pathfinder(pos_, old_pos, old_dir, distance, ctrl, + pf_switch, railtype) + + local pos = vector.round(pos_) + if vector.equals(old_pos, pos) then + return + end + + local pf_pos = vector.round(old_pos) + local pf_dir = vector.new(old_dir) + distance = math.min(carts.path_distance_max, + math.floor(distance + 1)) + + for i = 1, distance do + pf_dir, pf_switch = self:get_rail_direction( + pf_pos, pf_dir, ctrl, pf_switch or 0, railtype) + + if vector.equals(pf_dir, {x=0, y=0, z=0}) then + -- No way forwards + return pf_pos, pf_dir + end + + pf_pos = vector.add(pf_pos, pf_dir) + + if vector.equals(pf_pos, pos) then + -- Success! Cart moved on correctly + return + end + end + -- Not found. Put cart to predicted position + return pf_pos, pf_dir +end + +function carts:register_rail(name, def_overwrite, railparams) + local def = { + drawtype = "raillike", + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + sounds = default.node_sound_metal_defaults() + } + for k, v in pairs(def_overwrite) do + def[k] = v + end + if not def.inventory_image then + def.wield_image = def.tiles[1] + def.inventory_image = def.tiles[1] + end + + if railparams then + carts.railparams[name] = table.copy(railparams) + end + + minetest.register_node(name, def) +end + +function carts:get_rail_groups(additional_groups) + -- Get the default rail groups and add more when a table is given + local groups = { + dig_immediate = 2, + attached_node = 1, + rail = 1, + connect_to_raillike = minetest.raillike_group("rail") + } + if type(additional_groups) == "table" then + for k, v in pairs(additional_groups) do + groups[k] = v + end + end + return groups +end diff --git a/mods/minetest_game/carts/init.lua b/mods/minetest_game/carts/init.lua new file mode 100644 index 0000000..69d59d9 --- /dev/null +++ b/mods/minetest_game/carts/init.lua @@ -0,0 +1,28 @@ +-- carts/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("carts") + +carts = {} +carts.modpath = minetest.get_modpath("carts") +carts.railparams = {} +carts.get_translator = S + +-- Maximal speed of the cart in m/s (min = -1) +carts.speed_max = 7 +-- Set to -1 to disable punching the cart from inside (min = -1) +carts.punch_speed_max = 5 +-- Maximal distance for the path correction (for dtime peaks) +carts.path_distance_max = 3 + + +dofile(carts.modpath.."/functions.lua") +dofile(carts.modpath.."/rails.lua") +dofile(carts.modpath.."/cart_entity.lua") + +-- Register rails as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + name = "carts:rail", chance = 0.35, count = {1, 6} + }) +end diff --git a/mods/minetest_game/carts/license.txt b/mods/minetest_game/carts/license.txt new file mode 100644 index 0000000..6c5beb4 --- /dev/null +++ b/mods/minetest_game/carts/license.txt @@ -0,0 +1,54 @@ + +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 SmallJoker +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media +----------------- + +CC-0, see: https://creativecommons.org/share-your-work/public-domain/cc0/, except +if other license is mentioned. + + +Authors +--------- +Originally from PixelBOX (Gambit): + carts_cart_side.png + carts_cart_top.png + carts_cart_front.png* + carts_cart.png* + +sofar + stujones11: + carts_cart.b3d and carts_cart.blend + +hexafraction, modified by sofar + carts_rail_*.png + +http://www.freesound.org/people/YleArkisto/sounds/253159/ - YleArkisto - CC-BY-3.0 + carts_cart_moving.*.ogg diff --git a/mods/minetest_game/carts/locale/carts.de.tr b/mods/minetest_game/carts/locale/carts.de.tr new file mode 100644 index 0000000..89a33ac --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.de.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Lore +(Sneak+Click to pick up)=(Schleichen u. Klicken zum Aufheben) +Rail=Schiene +Powered Rail=Antriebsschiene +Brake Rail=Bremsschiene diff --git a/mods/minetest_game/carts/locale/carts.eo.tr b/mods/minetest_game/carts/locale/carts.eo.tr new file mode 100644 index 0000000..4498e9b --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.eo.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Rail=Relo +Powered Rail=Elektra Relo +Brake Rail=Bremsa Relo +Cart=Ĉaro +(Sneak+Click to pick up)=(Ŝteliru+Alklaku por reprini) diff --git a/mods/minetest_game/carts/locale/carts.es.tr b/mods/minetest_game/carts/locale/carts.es.tr new file mode 100644 index 0000000..c0857a1 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.es.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vagoneta +(Sneak+Click to pick up)=(Agacharse+Clic para recoger) +Rail=Raíl +Powered Rail=Raíl energizado +Brake Rail=Raíl de frenado diff --git a/mods/minetest_game/carts/locale/carts.fr.tr b/mods/minetest_game/carts/locale/carts.fr.tr new file mode 100644 index 0000000..b092f14 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.fr.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Chariot +(Sneak+Click to pick up)=(Se baisser + clic pour ramasser) +Rail=Rail +Powered Rail=Rail de traction +Brake Rail=Rail de freinage diff --git a/mods/minetest_game/carts/locale/carts.id.tr b/mods/minetest_game/carts/locale/carts.id.tr new file mode 100644 index 0000000..ce0db92 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.id.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Kereta +(Sneak+Click to pick up)=(Menyelinap + Klik untuk ambil) +Rail=Rel +Powered Rail=Rel Bertenaga +Brake Rail=Rel Rem diff --git a/mods/minetest_game/carts/locale/carts.it.tr b/mods/minetest_game/carts/locale/carts.it.tr new file mode 100644 index 0000000..c28e403 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.it.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vagone +(Sneak+Click to pick up)=(Strisciare+Click per raccoglierlo) +Rail=Binario +Powered Rail=Binario alimentato +Brake Rail=Binario freno diff --git a/mods/minetest_game/carts/locale/carts.jbo.tr b/mods/minetest_game/carts/locale/carts.jbo.tr new file mode 100644 index 0000000..b48c542 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.jbo.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=lo carce +(Sneak+Click to pick up)=to lo nu dzibi'o je cu samxa'e te cabra cu tadji lo nu lebna toi +Rail=lo teryre'e +Powered Rail=lo se dikca teryre'e +Brake Rail=lo terjabre teryre'e diff --git a/mods/minetest_game/carts/locale/carts.ms.tr b/mods/minetest_game/carts/locale/carts.ms.tr new file mode 100644 index 0000000..e8944e9 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.ms.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Pedati +(Sneak+Click to pick up)=(Selinap+Klik untuk ambil balik) +Rail=Landasan +Powered Rail=Landasan Berkuasa +Brake Rail=Landasan Brek diff --git a/mods/minetest_game/carts/locale/carts.pt_BR.tr b/mods/minetest_game/carts/locale/carts.pt_BR.tr new file mode 100644 index 0000000..b92f91e --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.pt_BR.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Carrinho +(Sneak+Click to pick up)=(Esgueirar + Clique para pegar) +Rail=Trilho +Powered Rail=Trilho Energizado +Brake Rail=Trilho de Freio diff --git a/mods/minetest_game/carts/locale/carts.ru.tr b/mods/minetest_game/carts/locale/carts.ru.tr new file mode 100644 index 0000000..9fc60ce --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.ru.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Вагонетка +(Sneak+Click to pick up)=(Пригнитесь и кликните по вагонетке, чтобы забрать) +Rail=Рельсы +Powered Rail=Запитанные рельсы +Brake Rail=Тормозящие рельсы diff --git a/mods/minetest_game/carts/locale/carts.se.tr b/mods/minetest_game/carts/locale/carts.se.tr new file mode 100644 index 0000000..b59871f --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.se.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vagn +(Sneak+Click to pick up)=(Shift+Klicka för att plocka upp) +Rail=Räls +Powered Rail=Aktiverad räls +Brake Rail=Broms räls diff --git a/mods/minetest_game/carts/locale/carts.sk.tr b/mods/minetest_game/carts/locale/carts.sk.tr new file mode 100644 index 0000000..6303a49 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.sk.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=Vozík +(Sneak+Click to pick up)=(Zakrádanie sa + Klik pre zdvihnutie) +Rail=Koľajnica +Powered Rail=Koľajnica s pohonom +Brake Rail=Brzdná koľajnica diff --git a/mods/minetest_game/carts/locale/carts.zh_CN.tr b/mods/minetest_game/carts/locale/carts.zh_CN.tr new file mode 100644 index 0000000..953cdef --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.zh_CN.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=矿车 +(Sneak+Click to pick up)=(潜行+单击以捡起) +Rail=铁轨 +Powered Rail=动力铁轨 +Brake Rail=制动铁轨 diff --git a/mods/minetest_game/carts/locale/carts.zh_TW.tr b/mods/minetest_game/carts/locale/carts.zh_TW.tr new file mode 100644 index 0000000..f6300d4 --- /dev/null +++ b/mods/minetest_game/carts/locale/carts.zh_TW.tr @@ -0,0 +1,6 @@ +# textdomain: carts +Cart=礦車 +(Sneak+Click to pick up)=(潛行+單擊以撿起) +Rail=鐵軌 +Powered Rail=動力鐵軌 +Brake Rail=制動鐵軌 diff --git a/mods/minetest_game/carts/locale/template.txt b/mods/minetest_game/carts/locale/template.txt new file mode 100644 index 0000000..a67d95f --- /dev/null +++ b/mods/minetest_game/carts/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: carts +Cart= +(Sneak+Click to pick up)= +Rail= +Powered Rail= +Brake Rail= diff --git a/mods/minetest_game/carts/mod.conf b/mods/minetest_game/carts/mod.conf new file mode 100644 index 0000000..0eab35c --- /dev/null +++ b/mods/minetest_game/carts/mod.conf @@ -0,0 +1,4 @@ +name = carts +description = Carts (formerly boost_cart) +depends = default, player_api +optional_depends = dungeon_loot diff --git a/mods/minetest_game/carts/models/carts_cart.b3d b/mods/minetest_game/carts/models/carts_cart.b3d new file mode 100644 index 0000000..b8b7c3a Binary files /dev/null and b/mods/minetest_game/carts/models/carts_cart.b3d differ diff --git a/mods/minetest_game/carts/models/carts_cart.blend b/mods/minetest_game/carts/models/carts_cart.blend new file mode 100644 index 0000000..3446fb1 Binary files /dev/null and b/mods/minetest_game/carts/models/carts_cart.blend differ diff --git a/mods/minetest_game/carts/rails.lua b/mods/minetest_game/carts/rails.lua new file mode 100644 index 0000000..8bd2ba1 --- /dev/null +++ b/mods/minetest_game/carts/rails.lua @@ -0,0 +1,64 @@ +-- carts/rails.lua + +-- support for MT game translation. +local S = carts.get_translator + +carts:register_rail("carts:rail", { + description = S("Rail"), + tiles = { + "carts_rail_straight.png", "carts_rail_curved.png", + "carts_rail_t_junction.png", "carts_rail_crossing.png" + }, + inventory_image = "carts_rail_straight.png", + wield_image = "carts_rail_straight.png", + groups = carts:get_rail_groups(), +}, {}) + +minetest.register_craft({ + output = "carts:rail 18", + recipe = { + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + } +}) + +minetest.register_alias("default:rail", "carts:rail") + + +carts:register_rail("carts:powerrail", { + description = S("Powered Rail"), + tiles = { + "carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png", + "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png" + }, + groups = carts:get_rail_groups(), +}, {acceleration = 5}) + +minetest.register_craft({ + output = "carts:powerrail 18", + recipe = { + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + } +}) + + +carts:register_rail("carts:brakerail", { + description = S("Brake Rail"), + tiles = { + "carts_rail_straight_brk.png", "carts_rail_curved_brk.png", + "carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png" + }, + groups = carts:get_rail_groups(), +}, {acceleration = -3}) + +minetest.register_craft({ + output = "carts:brakerail 18", + recipe = { + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + {"default:steel_ingot", "default:coal_lump", "default:steel_ingot"}, + {"default:steel_ingot", "group:wood", "default:steel_ingot"}, + } +}) diff --git a/mods/minetest_game/carts/sounds/carts_cart_moving.1.ogg b/mods/minetest_game/carts/sounds/carts_cart_moving.1.ogg new file mode 100644 index 0000000..869e765 Binary files /dev/null and b/mods/minetest_game/carts/sounds/carts_cart_moving.1.ogg differ diff --git a/mods/minetest_game/carts/sounds/carts_cart_moving.2.ogg b/mods/minetest_game/carts/sounds/carts_cart_moving.2.ogg new file mode 100644 index 0000000..b4cc508 Binary files /dev/null and b/mods/minetest_game/carts/sounds/carts_cart_moving.2.ogg differ diff --git a/mods/minetest_game/carts/sounds/carts_cart_moving.3.ogg b/mods/minetest_game/carts/sounds/carts_cart_moving.3.ogg new file mode 100644 index 0000000..e19a782 Binary files /dev/null and b/mods/minetest_game/carts/sounds/carts_cart_moving.3.ogg differ diff --git a/mods/minetest_game/carts/textures/carts_cart.png b/mods/minetest_game/carts/textures/carts_cart.png new file mode 100755 index 0000000..dc3b7e6 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_cart.png differ diff --git a/mods/minetest_game/carts/textures/carts_cart_front.png b/mods/minetest_game/carts/textures/carts_cart_front.png new file mode 100755 index 0000000..31dbd38 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_cart_front.png differ diff --git a/mods/minetest_game/carts/textures/carts_cart_side.png b/mods/minetest_game/carts/textures/carts_cart_side.png new file mode 100755 index 0000000..28b3f57 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_cart_side.png differ diff --git a/mods/minetest_game/carts/textures/carts_cart_top.png b/mods/minetest_game/carts/textures/carts_cart_top.png new file mode 100755 index 0000000..b512244 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_cart_top.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_crossing.png b/mods/minetest_game/carts/textures/carts_rail_crossing.png new file mode 100755 index 0000000..a718692 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_crossing.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_crossing_brk.png b/mods/minetest_game/carts/textures/carts_rail_crossing_brk.png new file mode 100755 index 0000000..1546df4 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_crossing_brk.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_crossing_pwr.png b/mods/minetest_game/carts/textures/carts_rail_crossing_pwr.png new file mode 100755 index 0000000..752cbf8 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_crossing_pwr.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_curved.png b/mods/minetest_game/carts/textures/carts_rail_curved.png new file mode 100755 index 0000000..a915221 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_curved.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_curved_brk.png b/mods/minetest_game/carts/textures/carts_rail_curved_brk.png new file mode 100755 index 0000000..af0db49 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_curved_brk.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_curved_pwr.png b/mods/minetest_game/carts/textures/carts_rail_curved_pwr.png new file mode 100755 index 0000000..579b65b Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_curved_pwr.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_straight.png b/mods/minetest_game/carts/textures/carts_rail_straight.png new file mode 100755 index 0000000..9cb1cdd Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_straight.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_straight_brk.png b/mods/minetest_game/carts/textures/carts_rail_straight_brk.png new file mode 100755 index 0000000..aedbe30 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_straight_brk.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_straight_pwr.png b/mods/minetest_game/carts/textures/carts_rail_straight_pwr.png new file mode 100755 index 0000000..9e47ea4 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_straight_pwr.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_t_junction.png b/mods/minetest_game/carts/textures/carts_rail_t_junction.png new file mode 100755 index 0000000..0aa5549 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_t_junction.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_t_junction_brk.png b/mods/minetest_game/carts/textures/carts_rail_t_junction_brk.png new file mode 100755 index 0000000..11d493a Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_t_junction_brk.png differ diff --git a/mods/minetest_game/carts/textures/carts_rail_t_junction_pwr.png b/mods/minetest_game/carts/textures/carts_rail_t_junction_pwr.png new file mode 100755 index 0000000..8e58d64 Binary files /dev/null and b/mods/minetest_game/carts/textures/carts_rail_t_junction_pwr.png differ diff --git a/mods/minetest_game/creative/README.txt b/mods/minetest_game/creative/README.txt new file mode 100644 index 0000000..32e8d22 --- /dev/null +++ b/mods/minetest_game/creative/README.txt @@ -0,0 +1,17 @@ +Minetest Game mod: creative +=========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (MIT) +Jean-Patrick G. (kilbith) (MIT) + +Author of media (textures) +-------------------------- +paramat (CC BY-SA 3.0): +* creative_prev_icon.png +* creative_next_icon.png +* creative_search_icon.png +* creative_clear_icon.png +* creative_trash_icon.png derived from a texture by kilbith (CC BY-SA 3.0) diff --git a/mods/minetest_game/creative/init.lua b/mods/minetest_game/creative/init.lua new file mode 100644 index 0000000..f313485 --- /dev/null +++ b/mods/minetest_game/creative/init.lua @@ -0,0 +1,101 @@ +-- creative/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("creative") + +creative = {} +creative.get_translator = S + +local function update_sfinv(name) + minetest.after(0, function() + local player = minetest.get_player_by_name(name) + if player then + if sfinv.get_page(player):sub(1, 9) == "creative:" then + sfinv.set_page(player, sfinv.get_homepage_name(player)) + else + sfinv.set_player_inventory_formspec(player) + end + end + end) +end + +minetest.register_privilege("creative", { + description = S("Allow player to use creative inventory"), + give_to_singleplayer = false, + give_to_admin = false, + on_grant = update_sfinv, + on_revoke = update_sfinv, +}) + +-- Override the engine's creative mode function +local old_is_creative_enabled = minetest.is_creative_enabled + +function minetest.is_creative_enabled(name) + if name == "" then + return old_is_creative_enabled(name) + end + return minetest.check_player_privs(name, {creative = true}) or + old_is_creative_enabled(name) +end + +-- For backwards compatibility: +function creative.is_enabled_for(name) + return minetest.is_creative_enabled(name) +end + +dofile(minetest.get_modpath("creative") .. "/inventory.lua") + +if minetest.is_creative_enabled("") then + -- Dig time is modified according to difference (leveldiff) between tool + -- 'maxlevel' and node 'level'. Digtime is divided by the larger of + -- leveldiff and 1. + -- To speed up digging in creative, hand 'maxlevel' and 'digtime' have been + -- increased such that nodes of differing levels have an insignificant + -- effect on digtime. + local digtime = 42 + local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256} + + -- Override the hand tool + minetest.override_item("", { + range = 10, + tool_capabilities = { + full_punch_interval = 0.5, + max_drop_level = 3, + groupcaps = { + crumbly = caps, + cracky = caps, + snappy = caps, + choppy = caps, + oddly_breakable_by_hand = caps, + -- dig_immediate group doesn't use value 1. Value 3 is instant dig + dig_immediate = + {times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256}, + }, + damage_groups = {fleshy = 10}, + } + }) +end + +-- Unlimited node placement +minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) + if placer and placer:is_player() then + return minetest.is_creative_enabled(placer:get_player_name()) + end +end) + +-- Don't pick up if the item is already in the inventory +local old_handle_node_drops = minetest.handle_node_drops +function minetest.handle_node_drops(pos, drops, digger) + if not digger or not digger:is_player() or + not minetest.is_creative_enabled(digger:get_player_name()) then + return old_handle_node_drops(pos, drops, digger) + end + local inv = digger:get_inventory() + if inv then + for _, item in ipairs(drops) do + if not inv:contains_item("main", item, true) then + inv:add_item("main", item) + end + end + end +end diff --git a/mods/minetest_game/creative/inventory.lua b/mods/minetest_game/creative/inventory.lua new file mode 100644 index 0000000..46da80a --- /dev/null +++ b/mods/minetest_game/creative/inventory.lua @@ -0,0 +1,256 @@ +-- creative/inventory.lua + +-- support for MT game translation. +local S = creative.get_translator + +local player_inventory = {} +local inventory_cache = {} + +local function init_creative_cache(items) + inventory_cache[items] = {} + local i_cache = inventory_cache[items] + + for name, def in pairs(items) do + if def.groups.not_in_creative_inventory ~= 1 and + def.description and def.description ~= "" then + i_cache[name] = def + end + end + table.sort(i_cache) + return i_cache +end + +function creative.init_creative_inventory(player) + local player_name = player:get_player_name() + player_inventory[player_name] = { + size = 0, + filter = "", + start_i = 0, + old_filter = nil, -- use only for caching in update_creative_inventory + old_content = nil + } + + minetest.create_detached_inventory("creative_" .. player_name, { + allow_move = function(inv, from_list, from_index, to_list, to_index, count, player2) + local name = player2 and player2:get_player_name() or "" + if not minetest.is_creative_enabled(name) or + to_list == "main" then + return 0 + end + return count + end, + allow_put = function(inv, listname, index, stack, player2) + return 0 + end, + allow_take = function(inv, listname, index, stack, player2) + local name = player2 and player2:get_player_name() or "" + if not minetest.is_creative_enabled(name) then + return 0 + end + return -1 + end, + on_move = function(inv, from_list, from_index, to_list, to_index, count, player2) + end, + on_take = function(inv, listname, index, stack, player2) + if stack and stack:get_count() > 0 then + minetest.log("action", player_name .. " takes " .. stack:get_name().. " from creative inventory") + end + end, + }, player_name) + + return player_inventory[player_name] +end + +local NO_MATCH = 999 +local function match(s, filter) + if filter == "" then + return 0 + end + if s:lower():find(filter, 1, true) then + return #s - #filter + end + return NO_MATCH +end + +local function description(def, lang_code) + local s = def.description + if lang_code then + s = minetest.get_translated_string(lang_code, s) + end + return s:gsub("\n.*", "") -- First line only +end + +function creative.update_creative_inventory(player_name, tab_content) + local inv = player_inventory[player_name] or + creative.init_creative_inventory(minetest.get_player_by_name(player_name)) + local player_inv = minetest.get_inventory({type = "detached", name = "creative_" .. player_name}) + + if inv.filter == inv.old_filter and tab_content == inv.old_content then + return + end + inv.old_filter = inv.filter + inv.old_content = tab_content + + local items = inventory_cache[tab_content] or init_creative_cache(tab_content) + + local lang + local player_info = minetest.get_player_information(player_name) + if player_info and player_info.lang_code ~= "" then + lang = player_info.lang_code + end + + local creative_list = {} + local order = {} + for name, def in pairs(items) do + local m = match(description(def), inv.filter) + if m > 0 then + m = math.min(m, match(description(def, lang), inv.filter)) + end + if m > 0 then + m = math.min(m, match(name, inv.filter)) + end + + if m < NO_MATCH then + creative_list[#creative_list+1] = name + -- Sort by match value first so closer matches appear earlier + order[name] = string.format("%02d", m) .. name + end + end + + table.sort(creative_list, function(a, b) return order[a] < order[b] end) + + player_inv:set_size("main", #creative_list) + player_inv:set_list("main", creative_list) + inv.size = #creative_list +end + +-- Create the trash field +local trash = minetest.create_detached_inventory("creative_trash", { + -- Allow the stack to be placed and remove it in on_put() + -- This allows the creative inventory to restore the stack + allow_put = function(inv, listname, index, stack, player) + return stack:get_count() + end, + on_put = function(inv, listname) + inv:set_list(listname, {}) + end, +}) +trash:set_size("main", 1) + +creative.formspec_add = "" + +function creative.register_tab(name, title, items) + sfinv.register_page("creative:" .. name, { + title = title, + is_in_nav = function(self, player, context) + return minetest.is_creative_enabled(player:get_player_name()) + end, + get = function(self, player, context) + local player_name = player:get_player_name() + creative.update_creative_inventory(player_name, items) + local inv = player_inventory[player_name] + local pagenum = math.floor(inv.start_i / (4*8) + 1) + local pagemax = math.ceil(inv.size / (4*8)) + local esc = minetest.formspec_escape + return sfinv.make_formspec(player, context, + "label[5.8,4.15;" .. minetest.colorize("#FFFF00", tostring(pagenum)) .. " / " .. tostring(pagemax) .. "]" .. + [[ + image[4.08,4.2;0.8,0.8;creative_trash_icon.png] + listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] + list[detached:creative_trash;main;4.02,4.1;1,1;] + listring[] + image_button[5,4.05;0.8,0.8;creative_prev_icon.png;creative_prev;] + image_button[7.2,4.05;0.8,0.8;creative_next_icon.png;creative_next;] + image_button[2.63,4.05;0.8,0.8;creative_search_icon.png;creative_search;] + image_button[3.25,4.05;0.8,0.8;creative_clear_icon.png;creative_clear;] + ]] .. + "tooltip[creative_search;" .. esc(S("Search")) .. "]" .. + "tooltip[creative_clear;" .. esc(S("Reset")) .. "]" .. + "tooltip[creative_prev;" .. esc(S("Previous page")) .. "]" .. + "tooltip[creative_next;" .. esc(S("Next page")) .. "]" .. + "listring[current_player;main]" .. + "field_close_on_enter[creative_filter;false]" .. + "field[0.3,4.2;2.8,1.2;creative_filter;;" .. esc(inv.filter) .. "]" .. + "listring[detached:creative_" .. player_name .. ";main]" .. + "list[detached:creative_" .. player_name .. ";main;0,0;8,4;" .. tostring(inv.start_i) .. "]" .. + creative.formspec_add, true) + end, + on_enter = function(self, player, context) + local player_name = player:get_player_name() + local inv = player_inventory[player_name] + if inv then + inv.start_i = 0 + end + end, + on_player_receive_fields = function(self, player, context, fields) + local player_name = player:get_player_name() + local inv = player_inventory[player_name] + assert(inv) + + if fields.creative_clear then + inv.start_i = 0 + inv.filter = "" + sfinv.set_player_inventory_formspec(player, context) + elseif fields.creative_search or + fields.key_enter_field == "creative_filter" then + inv.start_i = 0 + inv.filter = fields.creative_filter:lower() + sfinv.set_player_inventory_formspec(player, context) + elseif not fields.quit then + local start_i = inv.start_i or 0 + + if fields.creative_prev then + start_i = start_i - 4*8 + if start_i < 0 then + start_i = inv.size - (inv.size % (4*8)) + if inv.size == start_i then + start_i = math.max(0, inv.size - (4*8)) + end + end + elseif fields.creative_next then + start_i = start_i + 4*8 + if start_i >= inv.size then + start_i = 0 + end + end + + inv.start_i = start_i + sfinv.set_player_inventory_formspec(player, context) + end + end + }) +end + +-- Sort registered items +local registered_nodes = {} +local registered_tools = {} +local registered_craftitems = {} + +minetest.register_on_mods_loaded(function() + for name, def in pairs(minetest.registered_items) do + local group = def.groups or {} + + local nogroup = not (group.node or group.tool or group.craftitem) + if group.node or (nogroup and minetest.registered_nodes[name]) then + registered_nodes[name] = def + elseif group.tool or (nogroup and minetest.registered_tools[name]) then + registered_tools[name] = def + elseif group.craftitem or (nogroup and minetest.registered_craftitems[name]) then + registered_craftitems[name] = def + end + end +end) + +creative.register_tab("all", S("All"), minetest.registered_items) +creative.register_tab("nodes", S("Nodes"), registered_nodes) +creative.register_tab("tools", S("Tools"), registered_tools) +creative.register_tab("craftitems", S("Items"), registered_craftitems) + +local old_homepage_name = sfinv.get_homepage_name +function sfinv.get_homepage_name(player) + if minetest.is_creative_enabled(player:get_player_name()) then + return "creative:all" + else + return old_homepage_name(player) + end +end diff --git a/mods/minetest_game/creative/license.txt b/mods/minetest_game/creative/license.txt new file mode 100644 index 0000000..50ff9c7 --- /dev/null +++ b/mods/minetest_game/creative/license.txt @@ -0,0 +1,61 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2015-2016 Jean-Patrick G. (kilbith) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2016 Jean-Patrick G. (kilbith) +Copyright (C) 2018 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/creative/locale/creative.de.tr b/mods/minetest_game/creative/locale/creative.de.tr new file mode 100644 index 0000000..02b0277 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.de.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Spieler erlauben, das Kreativinventar zu benutzen +Search=Suchen +Reset=Zurücksetzen +Previous page=Vorherige Seite +Next page=Nächste Seite +All=Alles +Nodes=Blöcke +Tools=Werkzeuge +Items=Gegenstände diff --git a/mods/minetest_game/creative/locale/creative.eo.tr b/mods/minetest_game/creative/locale/creative.eo.tr new file mode 100644 index 0000000..4d56c4a --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.eo.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Search=Serĉu +Reset=Rekomencigu +Previous page=Pasinta paĝo +Next page=Sekvinta paĝo +All=Ĉio +Nodes=Nodoj +Tools=Iloj +Items=Objektoj +Allow player to use creative inventory=Permesu la ludanto uzi la krea stoko diff --git a/mods/minetest_game/creative/locale/creative.es.tr b/mods/minetest_game/creative/locale/creative.es.tr new file mode 100644 index 0000000..f4e39a7 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.es.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permitir al jugador usar el inventario creativo +Search=Buscar +Reset=Resetear +Previous page=Pág. siguiente +Next page=Pág. anterior +All=Todos +Nodes=Nodos +Tools=Herramientas +Items=Objetos diff --git a/mods/minetest_game/creative/locale/creative.fr.tr b/mods/minetest_game/creative/locale/creative.fr.tr new file mode 100644 index 0000000..695c0a1 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.fr.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permettre aux joueurs d'utiliser l'inventaire du mode créatif +Search=Rechercher +Reset=Réinitialiser +Previous page=Page précédente +Next page=Page suivante +All=Tout +Nodes=Nœuds +Tools=Outils +Items=Article diff --git a/mods/minetest_game/creative/locale/creative.id.tr b/mods/minetest_game/creative/locale/creative.id.tr new file mode 100644 index 0000000..613ab13 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.id.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Bolehkan pemain memakai inventaris kreatif +Search=Cari +Reset=Atur ulang +Previous page=Halaman sebelumnya +Next page=Halaman selanjutnya +All=Semua +Nodes=Nodus +Tools=Perkakas +Items=Barang diff --git a/mods/minetest_game/creative/locale/creative.it.tr b/mods/minetest_game/creative/locale/creative.it.tr new file mode 100644 index 0000000..32f540d --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.it.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permette al giocatore di usare l'inventario creativo +Search=Cerca +Reset=Azzera +Previous page=Pagina precedente +Next page=Pagina successiva +All=Tutto +Nodes=Nodi +Tools=Strumenti +Items=Oggetti diff --git a/mods/minetest_game/creative/locale/creative.jbo.tr b/mods/minetest_game/creative/locale/creative.jbo.tr new file mode 100644 index 0000000..6d0b736 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.jbo.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=zifre le ka pilno le finti ke dacti liste +Search=sisku +Reset=kraga'igau +Previous page=lidne +Next page=selyli'e +All=ro dacti +Nodes=bliku +Tools=tutci +Items=dacti diff --git a/mods/minetest_game/creative/locale/creative.ms.tr b/mods/minetest_game/creative/locale/creative.ms.tr new file mode 100644 index 0000000..a2aef80 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.ms.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Benarkan pemain menggunakan inventori kreatif +Search=Cari +Reset=Set semula +Previous page=Halaman sebelumnya +Next page=Halaman seterusnya +All=Semua +Nodes=Nod +Tools=Alatan +Items=Item diff --git a/mods/minetest_game/creative/locale/creative.pt_BR.tr b/mods/minetest_game/creative/locale/creative.pt_BR.tr new file mode 100644 index 0000000..c8a04bd --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.pt_BR.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Permitir o jogador usar o inventário criativo +Search=Pesquisar +Reset=Redefinir +Previous page=Página anterior +Next page=Próxima página +All=Todos +Nodes=Blocos +Tools=Ferramentas +Items=Itens diff --git a/mods/minetest_game/creative/locale/creative.ru.tr b/mods/minetest_game/creative/locale/creative.ru.tr new file mode 100644 index 0000000..f649dbc --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.ru.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Разрешить игроку использовать творческий инвентарь +Search=Поиск +Reset=Сброс +Previous page=Предыдущая страница +Next page=Следующая страница +All=Всё +Nodes=Ноды +Tools=Инструменты +Items=Предметы diff --git a/mods/minetest_game/creative/locale/creative.se.tr b/mods/minetest_game/creative/locale/creative.se.tr new file mode 100644 index 0000000..3b5da58 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.se.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Tilllåt spelare att används kreativa saker +Search=Sök +Reset=Återställ +Previous page=Förra sidan +Next page=Nästa sidan +All=Alla +Nodes=Noder +Tools=Verktyg +Items=Saker diff --git a/mods/minetest_game/creative/locale/creative.sk.tr b/mods/minetest_game/creative/locale/creative.sk.tr new file mode 100644 index 0000000..935c780 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.sk.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=Povolí hráčovi použivať kreatívny inventár +Search=Hľadaj +Reset=Vrátiť späť +Previous page=Predchádzajúca stránka +Next page=Nasledujúca stránka +All=Všetko +Nodes=Kocky +Tools=Nástroje +Items=Veci diff --git a/mods/minetest_game/creative/locale/creative.zh_CN.tr b/mods/minetest_game/creative/locale/creative.zh_CN.tr new file mode 100644 index 0000000..1ca424e --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.zh_CN.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=允许玩家使用创造模式物品栏 +Search=搜索 +Reset=重置 +Previous page=上一页 +Next page=下一页 +All=所有 +Nodes=节点 +Tools=工具 +Items=物品 diff --git a/mods/minetest_game/creative/locale/creative.zh_TW.tr b/mods/minetest_game/creative/locale/creative.zh_TW.tr new file mode 100644 index 0000000..c5746d4 --- /dev/null +++ b/mods/minetest_game/creative/locale/creative.zh_TW.tr @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory=允許玩家使用創造模式物品欄 +Search=搜索 +Reset=重置 +Previous page=上一頁 +Next page=下一頁 +All=所有 +Nodes=節點 +Tools=工具 +Items=物品 diff --git a/mods/minetest_game/creative/locale/template.txt b/mods/minetest_game/creative/locale/template.txt new file mode 100644 index 0000000..3e79730 --- /dev/null +++ b/mods/minetest_game/creative/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: creative +Allow player to use creative inventory= +Search= +Reset= +Previous page= +Next page= +All= +Nodes= +Tools= +Items= diff --git a/mods/minetest_game/creative/mod.conf b/mods/minetest_game/creative/mod.conf new file mode 100644 index 0000000..0b3f745 --- /dev/null +++ b/mods/minetest_game/creative/mod.conf @@ -0,0 +1,3 @@ +name = creative +description = Minetest Game mod: creative +depends = default, sfinv diff --git a/mods/minetest_game/creative/textures/creative_clear_icon.png b/mods/minetest_game/creative/textures/creative_clear_icon.png new file mode 100644 index 0000000..ab421d9 Binary files /dev/null and b/mods/minetest_game/creative/textures/creative_clear_icon.png differ diff --git a/mods/minetest_game/creative/textures/creative_next_icon.png b/mods/minetest_game/creative/textures/creative_next_icon.png new file mode 100644 index 0000000..4a3637d Binary files /dev/null and b/mods/minetest_game/creative/textures/creative_next_icon.png differ diff --git a/mods/minetest_game/creative/textures/creative_prev_icon.png b/mods/minetest_game/creative/textures/creative_prev_icon.png new file mode 100644 index 0000000..d5e3c27 Binary files /dev/null and b/mods/minetest_game/creative/textures/creative_prev_icon.png differ diff --git a/mods/minetest_game/creative/textures/creative_search_icon.png b/mods/minetest_game/creative/textures/creative_search_icon.png new file mode 100644 index 0000000..421b833 Binary files /dev/null and b/mods/minetest_game/creative/textures/creative_search_icon.png differ diff --git a/mods/minetest_game/creative/textures/creative_trash_icon.png b/mods/minetest_game/creative/textures/creative_trash_icon.png new file mode 100644 index 0000000..a0f6d23 Binary files /dev/null and b/mods/minetest_game/creative/textures/creative_trash_icon.png differ diff --git a/mods/minetest_game/default/README.txt b/mods/minetest_game/default/README.txt new file mode 100644 index 0000000..8b41dc4 --- /dev/null +++ b/mods/minetest_game/default/README.txt @@ -0,0 +1,414 @@ +Minetest Game mod: default +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +The torch code was derived by sofar from the 'torches' mod by +BlockMen (LGPLv2.1+) + +Authors of media (textures, sounds, models and schematics) +---------------------------------------------------------- +Everything not listed in here: +celeron55, Perttu Ahola (CC BY-SA 3.0) + + +Textures +-------- +Cisoun's texture pack (CC BY-SA 3.0): + default_jungletree.png + default_lava.png + default_leaves.png + default_sapling.png + default_bush_sapling.png + default_stone.png + default_tree.png + default_tree_top.png + default_water.png + +RealBadAngel's animated water (CC BY-SA 3.0): + default_water_source_animated.png + default_water_flowing_animated.png + +VanessaE (CC BY-SA 3.0): + default_torch_animated.png + default_torch_on_ceiling_animated.png + default_torch_on_floor_animated.png + default_torch_on_floor.png + default_desert_sand.png + default_desert_stone.png + default_sand.png + default_mese_crystal.png + default_mese_crystal_fragment.png + +Calinou (CC BY-SA 3.0): + default_brick.png + default_papyrus.png + default_mineral_copper.png + +PilzAdam (CC BY-SA 3.0): + default_jungleleaves.png + default_junglesapling.png + default_obsidian_glass.png + default_obsidian_shard.png + default_mineral_gold.png + +jojoa1997 (CC BY-SA 3.0): + default_obsidian.png + +InfinityProject (CC BY-SA 3.0): + default_mineral_diamond.png + +Splizard (CC BY-SA 3.0): + default_pine_sapling.png + default_pine_needles.png + +Zeg9 (CC BY-SA 3.0): + default_coal_block.png + +paramat (CC BY-SA 3.0): + wieldhand.png -- Copied from character.png by Jordach (CC BY-SA 3.0) + default_pinetree.png + default_pinetree_top.png + default_pinewood.png + default_acacia_leaves.png + default_acacia_leaves_simple.png + default_acacia_sapling.png + default_acacia_bush_sapling.png + default_pine_bush_sapling.png + default_acacia_tree.png + default_acacia_tree_top.png + default_acacia_wood.png + default_acacia_bush_stem.png + default_bush_stem.png + default_pine_bush_stem.png + default_junglewood.png + default_jungletree_top.png + default_sandstone_brick.png + default_obsidian_brick.png + default_stone_brick.png + default_desert_stone_brick.png + default_sandstone_block.png + default_obsidian_block.png + default_stone_block.png + default_desert_stone_block.png + default_river_water.png + default_river_water_source_animated.png + default_river_water_flowing_animated.png + default_dry_grass.png + default_dry_grass_side.png + default_dry_grass_*.png + default_grass_side.png -- Derived from a texture by TumeniNodes (CC-BY-SA 3.0) + default_mese_block.png + default_silver_sand.png + default_mese_post_light_side.png + default_mese_post_light_side_dark.png + default_mese_post_light_top.png + default_silver_sandstone.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0) + default_silver_sandstone_brick.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0) + default_silver_sandstone_block.png -- Derived from a texture by GreenXenith (CC-BY-SA 3.0) + default_bookshelf_slot.png -- Derived from a texture by Gambit (CC-BY-SA 3.0) + default_marram_grass_*.png -- Derived from textures by TumeniNodes (CC-BY-SA 3.0) + default_emergent_jungle_sapling.png + default_permafrost.png -- Derived from a texture by Neuromancer (CC BY-SA 3.0) + default_stones.png -- Derived from a texture by sofar (CC0 1.0) + default_stones_side.png -- Derived from a texture by sofar (CC0 1.0) + default_moss.png + default_moss_side.png + default_fence_rail_acacia_wood + default_fence_rail_aspen_wood -- Derived from a texture by sofar (CC BY-SA 3.0) + default_fence_rail_junglewood + default_fence_rail_pine_wood + default_fence_rail_wood -- Derived from a texture by BlockMen (CC BY-SA 3.0) + gui_hotbar.png + gui_hotbar_selected.png + +TumeniNodes (CC BY-SA 3.0): + default_desert_cobble.png -- Derived from a texture by brunob.santos (CC BY-SA 3.0) + default_coniferous_litter.png + default_coniferous_litter_side.png + default_grass.png + default_dry_dirt.png + +BlockMen (CC BY-SA 3.0): + default_aspen_leaves.png -- Derived from Sofar's texture + default_wood.png + default_clay_brick.png + default_iron_ingot.png + default_gold_ingot.png + default_tool_steelsword.png + default_diamond.png + default_tool_*.png + default_lava_source_animated.png + default_lava_flowing_animated.png + default_stick.png + default_chest_front.png + default_chest_lock.png + default_chest_side.png + default_chest_top.png + default_mineral_mese.png + default_meselamp.png + gui_formbg.png + gui_furnace_arrow_bg.png + gui_furnace_arrow_fg.png + gui_hb_bg.png + +sofar (CC BY-SA 3.0): + default_aspen_sapling + default_aspen_tree + default_aspen_tree_top, derived from default_pine_tree_top (by paramat) + default_aspen_wood, derived from default_pine_wood (by paramat) + default_chest_inside + +sofar (CC0 1.0): + default_gravel.png -- Derived from Gambit's PixelBOX texture pack light gravel + +Neuromancer (CC BY-SA 3.0): + default_cobble.png, based on texture by Brane praefect + default_mossycobble.png, based on texture by Brane praefect + default_furnace_*.png + +Gambit (CC BY-SA 3.0): + default_bronze_ingot.png + default_copper_ingot.png + default_copper_lump.png + default_iron_lump.png + default_gold_lump.png + default_clay_lump.png + default_coal_lump.png + default_grass_*.png + default_paper.png + default_diamond_block.png + default_ladder_steel.png + default_sign_wall_wood.png + default_flint.png + default_snow.png + default_snow_side.png + default_snowball.png + default_key.png + default_key_skeleton.png + default_book.png + +asl97 (CC BY-SA 3.0): + default_ice.png + +Pithydon (CC BY-SA 3.0) + default_coral_brown.png + default_coral_orange.png + default_coral_skeleton.png + +Ferk (CC0 1.0): + default_item_smoke.png + +npx (CC BY-SA 3.0): + default_rainforest_litter.png + default_rainforest_litter_side.png + +kaeza (CC-BY-SA 3.0): + default_desert_sandstone.png + default_desert_sandstone_brick.png + default_desert_sandstone_block.png + +kilbith (CC BY-SA 3.0): + default_steel_block.png + default_copper_block.png + default_bronze_block.png + default_gold_block.png + default_tin_block.png + default_mineral_tin.png + default_tin_ingot.png + default_tin_lump.png + +tobyplowy (CC BY-SA 3.0): + default_kelp.png + +CloudyProton (CC BY-SA 3.0): + default_book_written.png, based on default_book.png by Gambit + +Mossmanikin (CC BY-SA 3.0): + default_fern_*.png + +random-geek (CC BY-SA 3.0): + default_blueberries.png + default_blueberry_overlay.png + default_blueberry_bush_leaves.png, derived from default_bush_leaves (by paramat) + default_blueberry_bush_sapling.png + default_dirt.png -- Derived from a texture by Neuromancer (CC BY-SA 3.0) + +Krock (CC0 1.0): + default_glass.png + default_glass_detail.png + +Topywo (CC BY-SA 3.0) + default_coral_cyan.png + default_coral_green.png + default_coral_pink.png + +Extex101 (CC BY-SA 3.0) + default_large_cactus_seedling.png + default_dry_shrub.png -- Derived from the original texture by celeron55 + +An0n3m0us (CC BY-SA 3.0): + heart.png -- Derived from a texture by KevDoy (CC BY-SA 3.0) + bubble.png -- Derived from a texture by BlockMen (CC BY-SA 3.0) + + +Sounds +------ +Glass breaking sounds (CC BY 3.0): + 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ + 2: http://www.freesound.org/people/Tomlija/sounds/97669/ + 3: http://www.freesound.org/people/lsprice/sounds/88808/ + +Mito551 (sounds) (CC BY-SA 3.0): + default_dig_crumbly.*.ogg + default_dig_dig_immediate.ogg + default_dig_oddly_breakable_by_hand.ogg + default_dug_node.*.ogg + default_grass_footstep.1.ogg + default_grass_footstep.2.ogg + default_grass_footstep.3.ogg + default_gravel_footstep.*.ogg + default_place_node.*.ogg + default_place_node_hard.*.ogg + default_glass_footstep.ogg + default_wood_footstep.1.ogg + default_wood_footstep.2.ogg + default_dirt_footstep.1.ogg + default_dirt_footstep.2.ogg + default_glass_footstep.ogg + +Metal sounds: + default_dig_metal.ogg - yadronoff - CC-BY-3.0 + - https://www.freesound.org/people/yadronoff/sounds/320397/ + default_dug_metal.*.ogg - Iwan Gabovitch - qubodup - CC0 + - http://opengameart.org/users/qubodup + default_metal_footstep.*.ogg - (CC0 1.0) - CC0 1.0 + - https://freesound.org/people/mypantsfelldown/sounds/398937/ + default_place_node_metal.*.ogg - Ogrebane - CC0 + - http://opengameart.org/content/wood-and-metal-sound-effects-volume-2 + +Tool breaking sounds added by sofar: CC-BY-3.0 + default_tool_breaks.* - http://www.freesound.org/people/HerbertBoland/sounds/33206/ + +AGFX (CC BY 3.0): +https://www.freesound.org/people/AGFX/packs/1253/ + default_water_footstep.1.ogg + default_water_footstep.2.ogg + default_water_footstep.3.ogg +(default_water_footstep.4.ogg is silent) + +blukotek (CC0 1.0): +https://www.freesound.org/people/blukotek/sounds/251660/ + default_dig_snappy.ogg + +Chests sounds added by sofar, derived of several files mixed together: + default_chest_open.ogg + default_chest_close.ogg + - http://www.freesound.org/people/Sevin7/sounds/269722/ CC0 + - http://www.freesound.org/people/Percy%20Duke/sounds/23448/ CC-BY-3.0 + - http://www.freesound.org/people/kingsamas/sounds/135576/ CC-BY-3.0 + - http://www.freesound.org/people/bulbastre/sounds/126887/ CC-BY-3.0 + - http://www.freesound.org/people/Yoyodaman234/sounds/183541/ CC0 + +Ryding (CC0 1.0): +http://freesound.org/people/Ryding/sounds/94337/ + default_snow_footstep.*.ogg + +Ferk (CC0 1.0): + default_item_smoke.ogg, based on a sound by http://opengameart.org/users/bart + +sonictechtonic (CC BY 3.0): +https://www.freesound.org/people/sonictechtonic/sounds/241872/ + player_damage.ogg + +Sheyvan (CC0 1.0): +https://freesound.org/people/Sheyvan/sounds/476113/ + default_dig_choppy.*.ogg + +lolamadeus (CC0 1.0): +https://freesound.org/people/lolamadeus/sounds/179341/ + default_gravel_dig.*.ogg + default_gravel_dug.*.ogg + +Benboncan (CC BY 3.0): +https://freesound.org/people/Benboncan/sounds/71823/ + default_dig_cracky.*.ogg + +Erdie (CC BY 3.0): +https://freesound.org/people/Erdie/sounds/41579/ + default_hard_footstep.*.ogg + +worthahep88 (CC0 1.0): +https://freesound.org/people/worthahep88/sounds/319224/ + default_sand_footstep.*.ogg + +dheming (CC BY 3.0): +https://freesound.org/people/dheming/sounds/268023/ + default_ice_dig.*.ogg + +InspectorJ (CC BY 3.0): +https://freesound.org/people/InspectorJ/sounds/416967/ + default_ice_footstep.*.ogg + +Angel_Perez_Grandi (CC BY 3.0): +https://freesound.org/people/Angel_Perez_Grandi/sounds/49190/ + default_ice_dug.ogg + +iankath (CC0 1.0) +https://freesound.org/people/iankath/sounds/173991/ + default_furnace_active.ogg + + +Models +------ +sofar (CC BY-SA 3.0): + chest_open.obj + torch_ceiling.obj + torch_floor.obj + torch_wall.obj + + +Schematics +---------- +paramat (CC BY-SA 3.0): + acacia_bush.mts + acacia_tree.mts + acacia_tree_from_sapling.mts + apple_tree.mts + apple_tree_from_sapling.mts + aspen_tree.mts + aspen_tree_from_sapling.mts + bush.mts + emergent_jungle_tree.mts + emergent_jungle_tree_from_sapling.mts + jungle_tree.mts + jungle_tree_from_sapling.mts + large_cactus.mts + papyrus.mts + pine_tree.mts + pine_tree_from_sapling.mts + snowy_pine_tree_from_sapling.mts + small_pine_tree.mts + small_pine_tree_from_sapling.mts + snowy_small_pine_tree_from_sapling.mts + +Shara RedCat (CC BY-SA 3.0): + acacia_log.mts + apple_log.mts + aspen_log.mts + jungle_log.mts + pine_log.mts + +TumeniNodes (CC BY-SA 3.0): + pine_bush.mts + +random-geek (CC BY-SA 3.0): + blueberry_bush.mts + +smallmak (CC BY-SA 4.0): + https://steamcommunity.com/sharedfiles/filedetails/?id=1741320866 + diff --git a/mods/minetest_game/default/aliases.lua b/mods/minetest_game/default/aliases.lua new file mode 100644 index 0000000..6db3fc8 --- /dev/null +++ b/mods/minetest_game/default/aliases.lua @@ -0,0 +1,77 @@ +-- mods/default/aliases.lua + +-- Aliases to support loading worlds using nodes following the old naming convention +-- These can also be helpful when using chat commands, for example /giveme +minetest.register_alias("stone", "default:stone") +minetest.register_alias("stone_with_coal", "default:stone_with_coal") +minetest.register_alias("stone_with_iron", "default:stone_with_iron") +minetest.register_alias("dirt_with_grass", "default:dirt_with_grass") +minetest.register_alias("dirt_with_grass_footsteps", "default:dirt_with_grass_footsteps") +minetest.register_alias("dirt", "default:dirt") +minetest.register_alias("sand", "default:sand") +minetest.register_alias("gravel", "default:gravel") +minetest.register_alias("sandstone", "default:sandstone") +minetest.register_alias("clay", "default:clay") +minetest.register_alias("brick", "default:brick") +minetest.register_alias("tree", "default:tree") +minetest.register_alias("jungletree", "default:jungletree") +minetest.register_alias("junglegrass", "default:junglegrass") +minetest.register_alias("leaves", "default:leaves") +minetest.register_alias("cactus", "default:cactus") +minetest.register_alias("papyrus", "default:papyrus") +minetest.register_alias("bookshelf", "default:bookshelf") +minetest.register_alias("glass", "default:glass") +minetest.register_alias("wooden_fence", "default:fence_wood") +minetest.register_alias("rail", "carts:rail") +minetest.register_alias("ladder", "default:ladder_wood") +minetest.register_alias("wood", "default:wood") +minetest.register_alias("mese", "default:mese") +minetest.register_alias("cloud", "default:cloud") +minetest.register_alias("water_flowing", "default:water_flowing") +minetest.register_alias("water_source", "default:water_source") +minetest.register_alias("lava_flowing", "default:lava_flowing") +minetest.register_alias("lava_source", "default:lava_source") +minetest.register_alias("torch", "default:torch") +minetest.register_alias("sign_wall", "default:sign_wall_wood") +minetest.register_alias("furnace", "default:furnace") +minetest.register_alias("chest", "default:chest") +minetest.register_alias("locked_chest", "default:chest_locked") +minetest.register_alias("cobble", "default:cobble") +minetest.register_alias("mossycobble", "default:mossycobble") +minetest.register_alias("steelblock", "default:steelblock") +minetest.register_alias("sapling", "default:sapling") +minetest.register_alias("apple", "default:apple") + +minetest.register_alias("WPick", "default:pick_wood") +minetest.register_alias("STPick", "default:pick_stone") +minetest.register_alias("SteelPick", "default:pick_steel") +minetest.register_alias("MesePick", "default:pick_mese") +minetest.register_alias("WShovel", "default:shovel_wood") +minetest.register_alias("STShovel", "default:shovel_stone") +minetest.register_alias("SteelShovel", "default:shovel_steel") +minetest.register_alias("WAxe", "default:axe_wood") +minetest.register_alias("STAxe", "default:axe_stone") +minetest.register_alias("SteelAxe", "default:axe_steel") +minetest.register_alias("WSword", "default:sword_wood") +minetest.register_alias("STSword", "default:sword_stone") +minetest.register_alias("SteelSword", "default:sword_steel") + +minetest.register_alias("Stick", "default:stick") +minetest.register_alias("paper", "default:paper") +minetest.register_alias("book", "default:book") +minetest.register_alias("lump_of_coal", "default:coal_lump") +minetest.register_alias("lump_of_iron", "default:iron_lump") +minetest.register_alias("lump_of_clay", "default:clay_lump") +minetest.register_alias("steel_ingot", "default:steel_ingot") +minetest.register_alias("clay_brick", "default:clay_brick") +minetest.register_alias("snow", "default:snow") + +-- 'mese_block' was used for a while for the block form of mese +minetest.register_alias("default:mese_block", "default:mese") + +-- Aliases for corrected pine node names +minetest.register_alias("default:pinetree", "default:pine_tree") +minetest.register_alias("default:pinewood", "default:pine_wood") + +minetest.register_alias("default:ladder", "default:ladder_wood") +minetest.register_alias("default:sign_wall", "default:sign_wall_wood") diff --git a/mods/minetest_game/default/chests.lua b/mods/minetest_game/default/chests.lua new file mode 100644 index 0000000..f4462ae --- /dev/null +++ b/mods/minetest_game/default/chests.lua @@ -0,0 +1,360 @@ +default.chest = {} + +-- support for MT game translation. +local S = default.get_translator + +function default.chest.get_chest_formspec(pos) + local spos = pos.x .. "," .. pos.y .. "," .. pos.z + local formspec = + "size[8,9]" .. + "list[nodemeta:" .. spos .. ";main;0,0.3;8,4;]" .. + "list[current_player;main;0,4.85;8,1;]" .. + "list[current_player;main;0,6.08;8,3;8]" .. + "listring[nodemeta:" .. spos .. ";main]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,4.85) + return formspec +end + +function default.chest.chest_lid_obstructed(pos) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + local def = minetest.registered_nodes[minetest.get_node(above).name] + -- allow ladders, signs, wallmounted things and torches to not obstruct + if def and + (def.drawtype == "airlike" or + def.drawtype == "signlike" or + def.drawtype == "torchlike" or + (def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then + return false + end + return true +end + +function default.chest.chest_lid_close(pn) + local chest_open_info = default.chest.open_chests[pn] + local pos = chest_open_info.pos + local sound = chest_open_info.sound + local swap = chest_open_info.swap + + default.chest.open_chests[pn] = nil + for k, v in pairs(default.chest.open_chests) do + if v.pos.x == pos.x and v.pos.y == pos.y and v.pos.z == pos.z then + return true + end + end + + local node = minetest.get_node(pos) + minetest.after(0.2, minetest.swap_node, pos, { name = swap, + param2 = node.param2 }) + minetest.sound_play(sound, {gain = 0.3, pos = pos, + max_hear_distance = 10}, true) +end + +default.chest.open_chests = {} + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "default:chest" then + return + end + if not player or not fields.quit then + return + end + local pn = player:get_player_name() + + if not default.chest.open_chests[pn] then + return + end + + default.chest.chest_lid_close(pn) + return true +end) + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if default.chest.open_chests[pn] then + default.chest.chest_lid_close(pn) + end +end) + +function default.chest.register_chest(prefixed_name, d) + local name = prefixed_name:sub(1,1) == ':' and prefixed_name:sub(2,-1) or prefixed_name + local def = table.copy(d) + def.drawtype = "mesh" + def.visual = "mesh" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.legacy_facedir_simple = true + def.is_ground_content = false + + if def.protected then + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Locked Chest")) + meta:set_string("owner", "") + local inv = meta:get_inventory() + inv:set_size("main", 8*4) + end + def.after_place_node = function(pos, placer) + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name() or "") + meta:set_string("infotext", S("Locked Chest (owned by @1)", meta:get_string("owner"))) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") and + default.can_interact_with_node(player, pos) + end + def.allow_metadata_inventory_move = function(pos, from_list, from_index, + to_list, to_index, count, player) + if not default.can_interact_with_node(player, pos) then + return 0 + end + return count + end + def.allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if not default.can_interact_with_node(player, pos) then + return 0 + end + return stack:get_count() + end + def.allow_metadata_inventory_take = function(pos, listname, index, stack, player) + if not default.can_interact_with_node(player, pos) then + return 0 + end + return stack:get_count() + end + def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + if not default.can_interact_with_node(clicker, pos) then + return itemstack + end + + minetest.sound_play(def.sound_open, {gain = 0.3, + pos = pos, max_hear_distance = 10}, true) + if not default.chest.chest_lid_obstructed(pos) then + minetest.swap_node(pos, + { name = name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "default:chest", default.chest.get_chest_formspec(pos)) + default.chest.open_chests[clicker:get_player_name()] = { pos = pos, + sound = def.sound_close, swap = name } + end + def.on_blast = function() end + def.on_key_use = function(pos, player) + local secret = minetest.get_meta(pos):get_string("key_lock_secret") + local itemstack = player:get_wielded_item() + local key_meta = itemstack:get_meta() + + if itemstack:get_metadata() == "" then + return + end + + if key_meta:get_string("secret") == "" then + key_meta:set_string("secret", minetest.parse_json(itemstack:get_metadata()).secret) + itemstack:set_metadata("") + end + + if secret ~= key_meta:get_string("secret") then + return + end + + minetest.show_formspec( + player:get_player_name(), + "default:chest_locked", + default.chest.get_chest_formspec(pos) + ) + end + def.on_skeleton_key_use = function(pos, player, newsecret) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + local pn = player:get_player_name() + + -- verify placer is owner of lockable chest + if owner ~= pn then + minetest.record_protection_violation(pos, pn) + minetest.chat_send_player(pn, S("You do not own this chest.")) + return nil + end + + local secret = meta:get_string("key_lock_secret") + if secret == "" then + secret = newsecret + meta:set_string("key_lock_secret", secret) + end + + return secret, S("a locked chest"), owner + end + else + def.on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("Chest")) + local inv = meta:get_inventory() + inv:set_size("main", 8*4) + end + def.can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end + def.on_rightclick = function(pos, node, clicker) + minetest.sound_play(def.sound_open, {gain = 0.3, pos = pos, + max_hear_distance = 10}, true) + if not default.chest.chest_lid_obstructed(pos) then + minetest.swap_node(pos, { + name = name .. "_open", + param2 = node.param2 }) + end + minetest.after(0.2, minetest.show_formspec, + clicker:get_player_name(), + "default:chest", default.chest.get_chest_formspec(pos)) + default.chest.open_chests[clicker:get_player_name()] = { pos = pos, + sound = def.sound_close, swap = name } + end + def.on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "main", drops) + drops[#drops+1] = name + minetest.remove_node(pos) + return drops + end + end + + def.on_metadata_inventory_move = function(pos, from_list, from_index, + to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in chest at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves " .. stack:get_name() .. + " to chest at " .. minetest.pos_to_string(pos)) + end + def.on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes " .. stack:get_name() .. + " from chest at " .. minetest.pos_to_string(pos)) + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_opened.mesh = "chest_open.obj" + for i = 1, #def_opened.tiles do + if type(def_opened.tiles[i]) == "string" then + def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true} + elseif def_opened.tiles[i].backface_culling == nil then + def_opened.tiles[i].backface_culling = true + end + end + def_opened.drop = name + def_opened.groups.not_in_creative_inventory = 1 + def_opened.selection_box = { + type = "fixed", + fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 }, + } + def_opened.can_dig = function() + return false + end + def_opened.on_blast = function() end + + def_closed.mesh = nil + def_closed.drawtype = nil + def_closed.tiles[6] = def.tiles[5] -- swap textures around for "normal" + def_closed.tiles[5] = def.tiles[3] -- drawtype to make them match the mesh + def_closed.tiles[3] = def.tiles[3].."^[transformFX" + + minetest.register_node(prefixed_name, def_closed) + minetest.register_node(prefixed_name .. "_open", def_opened) + + -- convert old chests to this new variant + if name == "default:chest" or name == "default:chest_locked" then + minetest.register_lbm({ + label = "update chests to opening chests", + name = "default:upgrade_" .. name:sub(9,-1) .. "_v2", + nodenames = {name}, + action = function(pos, node) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", nil) + local inv = meta:get_inventory() + local list = inv:get_list("default:chest") + if list then + inv:set_size("main", 8*4) + inv:set_list("main", list) + inv:set_list("default:chest", nil) + end + end + }) + end +end + +default.chest.register_chest("default:chest", { + description = S("Chest"), + tiles = { + "default_chest_top.png", + "default_chest_top.png", + "default_chest_side.png", + "default_chest_side.png", + "default_chest_front.png", + "default_chest_inside.png" + }, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, +}) + +default.chest.register_chest("default:chest_locked", { + description = S("Locked Chest"), + tiles = { + "default_chest_top.png", + "default_chest_top.png", + "default_chest_side.png", + "default_chest_side.png", + "default_chest_lock.png", + "default_chest_inside.png" + }, + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, + protected = true, +}) + +minetest.register_craft({ + output = "default:chest", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_craft({ + output = "default:chest_locked", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "default:steel_ingot", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_craft( { + type = "shapeless", + output = "default:chest_locked", + recipe = {"default:chest", "default:steel_ingot"}, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:chest", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:chest_locked", + burntime = 30, +}) diff --git a/mods/minetest_game/default/crafting.lua b/mods/minetest_game/default/crafting.lua new file mode 100644 index 0000000..1cdb930 --- /dev/null +++ b/mods/minetest_game/default/crafting.lua @@ -0,0 +1,745 @@ +-- mods/default/crafting.lua + +minetest.register_craft({ + output = "default:wood 4", + recipe = { + {"default:tree"}, + } +}) + +minetest.register_craft({ + output = "default:junglewood 4", + recipe = { + {"default:jungletree"}, + } +}) + +minetest.register_craft({ + output = "default:pine_wood 4", + recipe = { + {"default:pine_tree"}, + } +}) + +minetest.register_craft({ + output = "default:acacia_wood 4", + recipe = { + {"default:acacia_tree"}, + } +}) + +minetest.register_craft({ + output = "default:aspen_wood 4", + recipe = { + {"default:aspen_tree"}, + } +}) + +minetest.register_craft({ + output = "default:wood", + recipe = { + {"default:bush_stem"}, + } +}) + +minetest.register_craft({ + output = "default:acacia_wood", + recipe = { + {"default:acacia_bush_stem"}, + } +}) + +minetest.register_craft({ + output = "default:pine_wood", + recipe = { + {"default:pine_bush_stem"}, + } +}) + +minetest.register_craft({ + output = "default:sign_wall_steel 3", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"", "group:stick", ""}, + } +}) + +minetest.register_craft({ + output = "default:sign_wall_wood 3", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + {"", "group:stick", ""}, + } +}) + +minetest.register_craft({ + output = "default:coalblock", + recipe = { + {"default:coal_lump", "default:coal_lump", "default:coal_lump"}, + {"default:coal_lump", "default:coal_lump", "default:coal_lump"}, + {"default:coal_lump", "default:coal_lump", "default:coal_lump"}, + } +}) + +minetest.register_craft({ + output = "default:steelblock", + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:copperblock", + recipe = { + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:tinblock", + recipe = { + {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"}, + {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"}, + {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:bronzeblock", + recipe = { + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:bronze_ingot 9", + recipe = { + {"default:bronzeblock"}, + } +}) + +minetest.register_craft({ + output = "default:goldblock", + recipe = { + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:diamondblock", + recipe = { + {"default:diamond", "default:diamond", "default:diamond"}, + {"default:diamond", "default:diamond", "default:diamond"}, + {"default:diamond", "default:diamond", "default:diamond"}, + } +}) + +minetest.register_craft({ + output = "default:sandstone", + recipe = { + {"default:sand", "default:sand"}, + {"default:sand", "default:sand"}, + } +}) + +minetest.register_craft({ + output = "default:sand 4", + recipe = { + {"default:sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:sandstonebrick 4", + recipe = { + {"default:sandstone", "default:sandstone"}, + {"default:sandstone", "default:sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:sandstone_block 9", + recipe = { + {"default:sandstone", "default:sandstone", "default:sandstone"}, + {"default:sandstone", "default:sandstone", "default:sandstone"}, + {"default:sandstone", "default:sandstone", "default:sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sandstone", + recipe = { + {"default:desert_sand", "default:desert_sand"}, + {"default:desert_sand", "default:desert_sand"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sand 4", + recipe = { + {"default:desert_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sandstone_brick 4", + recipe = { + {"default:desert_sandstone", "default:desert_sandstone"}, + {"default:desert_sandstone", "default:desert_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_sandstone_block 9", + recipe = { + {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"}, + {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"}, + {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sandstone", + recipe = { + {"default:silver_sand", "default:silver_sand"}, + {"default:silver_sand", "default:silver_sand"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sand 4", + recipe = { + {"default:silver_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sandstone_brick 4", + recipe = { + {"default:silver_sandstone", "default:silver_sandstone"}, + {"default:silver_sandstone", "default:silver_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:silver_sandstone_block 9", + recipe = { + {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"}, + {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"}, + {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"}, + } +}) + +minetest.register_craft({ + output = "default:clay", + recipe = { + {"default:clay_lump", "default:clay_lump"}, + {"default:clay_lump", "default:clay_lump"}, + } +}) + +minetest.register_craft({ + output = "default:brick", + recipe = { + {"default:clay_brick", "default:clay_brick"}, + {"default:clay_brick", "default:clay_brick"}, + } +}) + +minetest.register_craft({ + output = "default:bookshelf", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"default:book", "default:book", "default:book"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_craft({ + output = "default:ladder_wood 5", + recipe = { + {"group:stick", "", "group:stick"}, + {"group:stick", "group:stick", "group:stick"}, + {"group:stick", "", "group:stick"}, + } +}) + +minetest.register_craft({ + output = "default:ladder_steel 15", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:mese", + recipe = { + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"}, + } +}) + +minetest.register_craft({ + output = "default:meselamp", + recipe = { + {"default:glass"}, + {"default:mese_crystal"}, + } +}) + +minetest.register_craft({ + output = "default:obsidian", + recipe = { + {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"}, + {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"}, + {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"}, + } +}) + +minetest.register_craft({ + output = "default:obsidianbrick 4", + recipe = { + {"default:obsidian", "default:obsidian"}, + {"default:obsidian", "default:obsidian"} + } +}) + +minetest.register_craft({ + output = "default:obsidian_block 9", + recipe = { + {"default:obsidian", "default:obsidian", "default:obsidian"}, + {"default:obsidian", "default:obsidian", "default:obsidian"}, + {"default:obsidian", "default:obsidian", "default:obsidian"}, + } +}) + +minetest.register_craft({ + output = "default:stonebrick 4", + recipe = { + {"default:stone", "default:stone"}, + {"default:stone", "default:stone"}, + } +}) + +minetest.register_craft({ + output = "default:stone_block 9", + recipe = { + {"default:stone", "default:stone", "default:stone"}, + {"default:stone", "default:stone", "default:stone"}, + {"default:stone", "default:stone", "default:stone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_stonebrick 4", + recipe = { + {"default:desert_stone", "default:desert_stone"}, + {"default:desert_stone", "default:desert_stone"}, + } +}) + +minetest.register_craft({ + output = "default:desert_stone_block 9", + recipe = { + {"default:desert_stone", "default:desert_stone", "default:desert_stone"}, + {"default:desert_stone", "default:desert_stone", "default:desert_stone"}, + {"default:desert_stone", "default:desert_stone", "default:desert_stone"}, + } +}) + +minetest.register_craft({ + output = "default:snowblock", + recipe = { + {"default:snow", "default:snow", "default:snow"}, + {"default:snow", "default:snow", "default:snow"}, + {"default:snow", "default:snow", "default:snow"}, + } +}) + +minetest.register_craft({ + output = "default:snow 9", + recipe = { + {"default:snowblock"}, + } +}) + +minetest.register_craft({ + output = "default:emergent_jungle_sapling", + recipe = { + {"default:junglesapling", "default:junglesapling", "default:junglesapling"}, + {"default:junglesapling", "default:junglesapling", "default:junglesapling"}, + {"default:junglesapling", "default:junglesapling", "default:junglesapling"}, + } +}) + +minetest.register_craft({ + output = "default:large_cactus_seedling", + recipe = { + {"", "default:cactus", ""}, + {"default:cactus", "default:cactus", "default:cactus"}, + {"", "default:cactus", ""}, + } +}) + +minetest.register_craft({ + output = "default:rose_bush", + recipe = { + {"", "", ""}, + {"flowers:rose", "", "flowers:rose"}, + {"flowers:rose", "", "flowers:rose"}, + } +}) + +-- +-- Crafting (tool repair) +-- + +minetest.register_craft({ + type = "toolrepair", + additional_wear = -0.02, +}) + + +-- +-- Cooking recipes +-- + +minetest.register_craft({ + type = "cooking", + output = "default:glass", + recipe = "group:sand", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:obsidian_glass", + recipe = "default:obsidian_shard", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:stone", + recipe = "default:cobble", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:stone", + recipe = "default:mossycobble", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:desert_stone", + recipe = "default:desert_cobble", +}) + + +-- +-- Fuels +-- + +-- Support use of group:tree, includes default:tree which has the same burn time +minetest.register_craft({ + type = "fuel", + recipe = "group:tree", + burntime = 30, +}) + +-- Burn time for all woods are in order of wood density, +-- which is also the order of wood colour darkness: +-- aspen, pine, apple, acacia, jungle + +minetest.register_craft({ + type = "fuel", + recipe = "default:aspen_tree", + burntime = 22, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_tree", + burntime = 26, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_tree", + burntime = 34, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:jungletree", + burntime = 38, +}) + + +-- Support use of group:wood, includes default:wood which has the same burn time +minetest.register_craft({ + type = "fuel", + recipe = "group:wood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:aspen_wood", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_wood", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:junglewood", + burntime = 9, +}) + + +-- Support use of group:sapling, includes default:sapling which has the same burn time +minetest.register_craft({ + type = "fuel", + recipe = "group:sapling", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:bush_sapling", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_bush_sapling", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_bush_sapling", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:aspen_sapling", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_sapling", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_sapling", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:junglesapling", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:emergent_jungle_sapling", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_aspen_wood", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_pine_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_wood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_acacia_wood", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_junglewood", + burntime = 9, +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_aspen_wood", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_pine_wood", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_wood", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_acacia_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fence_rail_junglewood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:bush_stem", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:acacia_bush_stem", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pine_bush_stem", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:junglegrass", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "group:leaves", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:cactus", + burntime = 15, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:large_cactus_seedling", + burntime = 5, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:papyrus", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:bookshelf", + burntime = 30, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:ladder_wood", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:lava_source", + burntime = 60, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:sign_wall_wood", + burntime = 10, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:coalblock", + burntime = 370, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:grass_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:dry_grass_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:fern_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:marram_grass_1", + burntime = 2, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:dry_shrub", + burntime = 2, +}) diff --git a/mods/minetest_game/default/craftitems.lua b/mods/minetest_game/default/craftitems.lua new file mode 100644 index 0000000..955231c --- /dev/null +++ b/mods/minetest_game/default/craftitems.lua @@ -0,0 +1,546 @@ +-- mods/default/craftitems.lua + +-- support for MT game translation. +local S = default.get_translator + +local lpp = 14 -- Lines per book's page +local function book_on_use(itemstack, user) + local player_name = user:get_player_name() + local meta = itemstack:get_meta() + local title, text, owner = "", "", player_name + local page, page_max, lines, string = 1, 1, {}, "" + + -- Backwards compatibility + local old_data = minetest.deserialize(itemstack:get_metadata()) + if old_data then + meta:from_table({ fields = old_data }) + end + + local data = meta:to_table().fields + + if data.owner then + title = data.title + text = data.text + owner = data.owner + + for str in (text .. "\n"):gmatch("([^\n]*)[\n]") do + lines[#lines+1] = str + end + + if data.page then + page = data.page + page_max = data.page_max + + for i = ((lpp * page) - lpp) + 1, lpp * page do + if not lines[i] then break end + string = string .. lines[i] .. "\n" + end + end + end + + local formspec + local esc = minetest.formspec_escape + if owner == player_name then + formspec = "size[8,8]" .. + "field[0.5,1;7.5,0;title;" .. esc(S("Title:")) .. ";" .. + esc(title) .. "]" .. + "textarea[0.5,1.5;7.5,7;text;" .. esc(S("Contents:")) .. ";" .. + esc(text) .. "]" .. + "button_exit[2.5,7.5;3,1;save;" .. esc(S("Save")) .. "]" + else + formspec = "size[8,8]" .. + "label[0.5,0.5;" .. esc(S("by @1", owner)) .. "]" .. + "tablecolumns[color;text]" .. + "tableoptions[background=#00000000;highlight=#00000000;border=false]" .. + "table[0.4,0;7,0.5;title;#FFFF00," .. esc(title) .. "]" .. + "textarea[0.5,1.5;7.5,7;;" .. + minetest.formspec_escape(string ~= "" and string or text) .. ";]" .. + "button[2.4,7.6;0.8,0.8;book_prev;<]" .. + "label[3.2,7.7;" .. esc(S("Page @1 of @2", page, page_max)) .. "]" .. + "button[4.9,7.6;0.8,0.8;book_next;>]" + end + + minetest.show_formspec(player_name, "default:book", formspec) + return itemstack +end + +local max_text_size = 10000 +local max_title_size = 80 +local short_title_size = 35 +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "default:book" then return end + local inv = player:get_inventory() + local stack = player:get_wielded_item() + + if fields.save and fields.title and fields.text + and fields.title ~= "" and fields.text ~= "" then + local new_stack, data + if stack:get_name() ~= "default:book_written" then + local count = stack:get_count() + if count == 1 then + stack:set_name("default:book_written") + else + stack:set_count(count - 1) + new_stack = ItemStack("default:book_written") + end + else + data = stack:get_meta():to_table().fields + end + + if data and data.owner and data.owner ~= player:get_player_name() then + return + end + + if not data then data = {} end + data.title = fields.title:sub(1, max_title_size) + data.owner = player:get_player_name() + local short_title = data.title + -- Don't bother triming the title if the trailing dots would make it longer + if #short_title > short_title_size + 3 then + short_title = short_title:sub(1, short_title_size) .. "..." + end + data.description = S("\"@1\" by @2", short_title, data.owner) + data.text = fields.text:sub(1, max_text_size) + data.text = data.text:gsub("\r\n", "\n"):gsub("\r", "\n") + data.page = 1 + data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp) + + if new_stack then + new_stack:get_meta():from_table({ fields = data }) + if inv:room_for_item("main", new_stack) then + inv:add_item("main", new_stack) + else + minetest.add_item(player:get_pos(), new_stack) + end + else + stack:get_meta():from_table({ fields = data }) + end + + elseif fields.book_next or fields.book_prev then + local data = stack:get_meta():to_table().fields + if not data or not data.page then + return + end + + data.page = tonumber(data.page) + data.page_max = tonumber(data.page_max) + + if fields.book_next then + data.page = data.page + 1 + if data.page > data.page_max then + data.page = 1 + end + else + data.page = data.page - 1 + if data.page == 0 then + data.page = data.page_max + end + end + + stack:get_meta():from_table({fields = data}) + stack = book_on_use(stack, player) + end + + -- Update stack + player:set_wielded_item(stack) +end) + +minetest.register_craftitem("default:skeleton_key", { + description = S("Skeleton Key"), + inventory_image = "default_key_skeleton.png", + on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + local pos = pointed_thing.under + local node = minetest.get_node(pos) + + if not node then + return itemstack + end + + local node_reg = minetest.registered_nodes[node.name] + local on_skeleton_key_use = node_reg and node_reg.on_skeleton_key_use + if not on_skeleton_key_use then + return itemstack + end + + -- make a new key secret in case the node callback needs it + local random = math.random + local newsecret = string.format( + "%04x%04x%04x%04x", + random(2^16) - 1, random(2^16) - 1, + random(2^16) - 1, random(2^16) - 1) + + local secret, _, _ = on_skeleton_key_use(pos, user, newsecret) + + if secret then + local inv = minetest.get_inventory({type="player", name=user:get_player_name()}) + + -- update original itemstack + itemstack:take_item() + + -- finish and return the new key + local new_stack = ItemStack("default:key") + local meta = new_stack:get_meta() + meta:set_string("secret", secret) + meta:set_string("description", S("Key to @1's @2", user:get_player_name(), + minetest.registered_nodes[node.name].description)) + + if itemstack:get_count() == 0 then + itemstack = new_stack + else + if inv:add_item("main", new_stack):get_count() > 0 then + minetest.add_item(user:get_pos(), new_stack) + end -- else: added to inventory successfully + end + + return itemstack + end + end +}) + +-- +-- Craftitem registry +-- + +minetest.register_craftitem("default:blueberries", { + description = S("Blueberries"), + inventory_image = "default_blueberries.png", + groups = {food_blueberries = 1, food_berry = 1}, + on_use = minetest.item_eat(2), +}) + +minetest.register_craftitem("default:book", { + description = S("Book"), + inventory_image = "default_book.png", + groups = {book = 1, flammable = 3}, + on_use = book_on_use, +}) + +minetest.register_craftitem("default:book_written", { + description = S("Book with Text"), + inventory_image = "default_book_written.png", + groups = {book = 1, not_in_creative_inventory = 1, flammable = 3}, + stack_max = 1, + on_use = book_on_use, +}) + +minetest.register_craftitem("default:bronze_ingot", { + description = S("Bronze Ingot"), + inventory_image = "default_bronze_ingot.png" +}) + +minetest.register_craftitem("default:clay_brick", { + description = S("Clay Brick"), + inventory_image = "default_clay_brick.png", +}) + +minetest.register_craftitem("default:clay_lump", { + description = S("Clay Lump"), + inventory_image = "default_clay_lump.png", +}) + +minetest.register_craftitem("default:coal_lump", { + description = S("Coal Lump"), + inventory_image = "default_coal_lump.png", + groups = {coal = 1, flammable = 1} +}) + +minetest.register_craftitem("default:copper_ingot", { + description = S("Copper Ingot"), + inventory_image = "default_copper_ingot.png" +}) + +minetest.register_craftitem("default:copper_lump", { + description = S("Copper Lump"), + inventory_image = "default_copper_lump.png" +}) + +minetest.register_craftitem("default:diamond", { + description = S("Diamond"), + inventory_image = "default_diamond.png", +}) + +minetest.register_craftitem("default:flint", { + description = S("Flint"), + inventory_image = "default_flint.png" +}) + +minetest.register_craftitem("default:gold_ingot", { + description = S("Gold Ingot"), + inventory_image = "default_gold_ingot.png" +}) + +minetest.register_craftitem("default:gold_lump", { + description = S("Gold Lump"), + inventory_image = "default_gold_lump.png" +}) + +minetest.register_craftitem("default:iron_lump", { + description = S("Iron Lump"), + inventory_image = "default_iron_lump.png" +}) + +minetest.register_craftitem("default:mese_crystal", { + description = S("Mese Crystal"), + inventory_image = "default_mese_crystal.png", +}) + +minetest.register_craftitem("default:mese_crystal_fragment", { + description = S("Mese Crystal Fragment"), + inventory_image = "default_mese_crystal_fragment.png", +}) + +minetest.register_craftitem("default:obsidian_shard", { + description = S("Obsidian Shard"), + inventory_image = "default_obsidian_shard.png", +}) + +minetest.register_craftitem("default:paper", { + description = S("Paper"), + inventory_image = "default_paper.png", + groups = {flammable = 3}, +}) + +minetest.register_craftitem("default:steel_ingot", { + description = S("Steel Ingot"), + inventory_image = "default_steel_ingot.png" +}) + +minetest.register_craftitem("default:stick", { + description = S("Stick"), + inventory_image = "default_stick.png", + groups = {stick = 1, flammable = 2}, +}) + +minetest.register_craftitem("default:tin_ingot", { + description = S("Tin Ingot"), + inventory_image = "default_tin_ingot.png" +}) + +minetest.register_craftitem("default:tin_lump", { + description = S("Tin Lump"), + inventory_image = "default_tin_lump.png" +}) + +-- +-- Crafting recipes +-- + +minetest.register_craft({ + output = "default:book", + recipe = { + {"default:paper"}, + {"default:paper"}, + {"default:paper"}, + } +}) + +default.register_craft_metadata_copy("default:book", "default:book_written") + +minetest.register_craft({ + output = "default:bronze_ingot 9", + recipe = { + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"}, + {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:clay_brick 4", + recipe = { + {"default:brick"}, + } +}) + +minetest.register_craft({ + output = "default:clay_lump 4", + recipe = { + {"default:clay"}, + } +}) + +minetest.register_craft({ + output = "default:coal_lump 9", + recipe = { + {"default:coalblock"}, + } +}) + +minetest.register_craft({ + output = "default:copper_ingot 9", + recipe = { + {"default:copperblock"}, + } +}) + +minetest.register_craft({ + output = "default:diamond 9", + recipe = { + {"default:diamondblock"}, + } +}) + +minetest.register_craft({ + output = "default:gold_ingot 9", + recipe = { + {"default:goldblock"}, + } +}) + +minetest.register_craft({ + output = "default:mese_crystal", + recipe = { + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"}, + } +}) + +minetest.register_craft({ + output = "default:mese_crystal 9", + recipe = { + {"default:mese"}, + } +}) + +minetest.register_craft({ + output = "default:mese_crystal_fragment 9", + recipe = { + {"default:mese_crystal"}, + } +}) + +minetest.register_craft({ + output = "default:obsidian_shard 9", + recipe = { + {"default:obsidian"} + } +}) + +minetest.register_craft({ + output = "default:paper", + recipe = { + {"default:papyrus", "default:papyrus", "default:papyrus"}, + } +}) + +minetest.register_craft({ + output = "farming:string", + recipe = { + {"default:reed", "default:reed"}, + } +}) + +minetest.register_craft({ + output = "default:skeleton_key", + recipe = { + {"default:gold_ingot"}, + } +}) + +minetest.register_craft({ + output = "default:steel_ingot 9", + recipe = { + {"default:steelblock"}, + } +}) + +minetest.register_craft({ + output = "default:stick 4", + recipe = { + {"group:wood"}, + } +}) + +minetest.register_craft({ + output = "default:tin_ingot 9", + recipe = { + {"default:tinblock"}, + } +}) + +-- +-- Cooking recipes +-- + +minetest.register_craft({ + type = "cooking", + output = "default:clay_brick", + recipe = "default:clay_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:copper_ingot", + recipe = "default:copper_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:gold_ingot", + recipe = "default:gold_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:gold_ingot", + recipe = "default:key", + cooktime = 5, +}) + +minetest.register_craft({ + type = "cooking", + output = "default:gold_ingot", + recipe = "default:skeleton_key", + cooktime = 5, +}) + +minetest.register_craft({ + type = "cooking", + output = "default:steel_ingot", + recipe = "default:iron_lump", +}) + +minetest.register_craft({ + type = "cooking", + output = "default:tin_ingot", + recipe = "default:tin_lump", +}) + +-- +-- Fuels +-- + +minetest.register_craft({ + type = "fuel", + recipe = "default:book", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:book_written", + burntime = 3, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:coal_lump", + burntime = 40, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:paper", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "group:stick", + burntime = 1, +}) diff --git a/mods/minetest_game/default/functions.lua b/mods/minetest_game/default/functions.lua new file mode 100644 index 0000000..1e46c45 --- /dev/null +++ b/mods/minetest_game/default/functions.lua @@ -0,0 +1,755 @@ +-- +-- Sounds +-- + +function default.node_sound_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "", gain = 1.0} + table.dug = table.dug or + {name = "default_dug_node", gain = 0.25} + table.place = table.place or + {name = "default_place_node_hard", gain = 1.0} + return table +end + +function default.node_sound_stone_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_hard_footstep", gain = 0.3} + table.dug = table.dug or + {name = "default_hard_footstep", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_dirt_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_dirt_footstep", gain = 0.4} + table.dug = table.dug or + {name = "default_dirt_footstep", gain = 1.0} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_sand_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_sand_footstep", gain = 0.05} + table.dug = table.dug or + {name = "default_sand_footstep", gain = 0.15} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_gravel_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_gravel_footstep", gain = 0.1} + table.dig = table.dig or + {name = "default_gravel_dig", gain = 0.35} + table.dug = table.dug or + {name = "default_gravel_dug", gain = 1.0} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_wood_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_wood_footstep", gain = 0.3} + table.dug = table.dug or + {name = "default_wood_footstep", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_leaves_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_grass_footstep", gain = 0.45} + table.dug = table.dug or + {name = "default_grass_footstep", gain = 0.7} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_glass_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_glass_footstep", gain = 0.3} + table.dig = table.dig or + {name = "default_glass_footstep", gain = 0.5} + table.dug = table.dug or + {name = "default_break_glass", gain = 1.0} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_ice_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_ice_footstep", gain = 0.3} + table.dig = table.dig or + {name = "default_ice_dig", gain = 0.5} + table.dug = table.dug or + {name = "default_ice_dug", gain = 0.5} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_metal_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_metal_footstep", gain = 0.4} + table.dig = table.dig or + {name = "default_dig_metal", gain = 0.5} + table.dug = table.dug or + {name = "default_dug_metal", gain = 0.5} + table.place = table.place or + {name = "default_place_node_metal", gain = 0.5} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_water_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_water_footstep", gain = 0.2} + default.node_sound_defaults(table) + return table +end + +function default.node_sound_snow_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name = "default_snow_footstep", gain = 0.2} + table.dig = table.dig or + {name = "default_snow_footstep", gain = 0.3} + table.dug = table.dug or + {name = "default_snow_footstep", gain = 0.3} + table.place = table.place or + {name = "default_place_node", gain = 1.0} + default.node_sound_defaults(table) + return table +end + + +-- +-- Lavacooling +-- + +default.cool_lava = function(pos, node) + if node.name == "default:lava_source" then + minetest.set_node(pos, {name = "default:obsidian"}) + else -- Lava flowing + minetest.set_node(pos, {name = "default:stone"}) + end + minetest.sound_play("default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.25}, true) +end + +if minetest.settings:get_bool("enable_lavacooling") ~= false then + minetest.register_abm({ + label = "Lava cooling", + nodenames = {"default:lava_source", "default:lava_flowing"}, + neighbors = {"group:cools_lava", "group:water"}, + interval = 2, + chance = 2, + catch_up = false, + action = function(...) + default.cool_lava(...) + end, + }) +end + + +-- +-- Optimized helper to put all items in an inventory into a drops list +-- + +function default.get_inventory_drops(pos, inventory, drops) + local inv = minetest.get_meta(pos):get_inventory() + local n = #drops + for i = 1, inv:get_size(inventory) do + local stack = inv:get_stack(inventory, i) + if stack:get_count() > 0 then + drops[n+1] = stack:to_table() + n = n + 1 + end + end +end + + +-- +-- Papyrus and cactus growing +-- + +-- Wrapping the functions in ABM action is necessary to make overriding them possible + +function default.grow_cactus(pos, node) + if node.param2 >= 4 then + return + end + pos.y = pos.y - 1 + if minetest.get_item_group(minetest.get_node(pos).name, "sand") == 0 then + return + end + pos.y = pos.y + 1 + local height = 0 + while node.name == "default:cactus" and height < 4 do + height = height + 1 + pos.y = pos.y + 1 + node = minetest.get_node(pos) + end + if height == 4 or node.name ~= "air" then + return + end + if minetest.get_node_light(pos) < 13 then + return + end + minetest.set_node(pos, {name = "default:cactus"}) + return true +end + +function default.grow_papyrus(pos, node) + pos.y = pos.y - 1 + local name = minetest.get_node(pos).name + if name ~= "default:dirt" and + name ~= "default:dirt_with_grass" and + name ~= "default:dirt_with_dry_grass" and + name ~= "default:dirt_with_rainforest_litter" and + name ~= "default:dry_dirt" and + name ~= "default:dry_dirt_with_dry_grass" then + return + end + if not minetest.find_node_near(pos, 3, {"group:water"}) then + return + end + pos.y = pos.y + 1 + local height = 0 + while node.name == "default:papyrus" and height < 4 do + height = height + 1 + pos.y = pos.y + 1 + node = minetest.get_node(pos) + end + if height == 4 or node.name ~= "air" then + return + end + if minetest.get_node_light(pos) < 13 then + return + end + minetest.set_node(pos, {name = "default:papyrus"}) + return true +end + +minetest.register_abm({ + label = "Grow cactus", + nodenames = {"default:cactus"}, + neighbors = {"group:sand"}, + interval = 12, + chance = 83, + action = function(...) + default.grow_cactus(...) + end +}) + +minetest.register_abm({ + label = "Grow papyrus", + nodenames = {"default:papyrus"}, + -- Grows on the dirt and surface dirt nodes of the biomes papyrus appears in, + -- including the old savanna nodes. + -- 'default:dirt_with_grass' is here only because it was allowed before. + neighbors = { + "default:dirt", + "default:dirt_with_grass", + "default:dirt_with_dry_grass", + "default:dirt_with_rainforest_litter", + "default:dry_dirt", + "default:dry_dirt_with_dry_grass", + }, + interval = 14, + chance = 71, + action = function(...) + default.grow_papyrus(...) + end +}) + + +-- +-- Dig upwards +-- + +function default.dig_up(pos, node, digger) + if digger == nil then return end + local np = {x = pos.x, y = pos.y + 1, z = pos.z} + local nn = minetest.get_node(np) + if nn.name == node.name then + minetest.node_dig(np, nn, digger) + end +end + + +-- +-- Fence registration helper +-- +local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0 + +function default.register_fence(name, def) + minetest.register_craft({ + output = name .. " 4", + recipe = { + { def.material, 'group:stick', def.material }, + { def.material, 'group:stick', def.material }, + } + }) + + local fence_texture = "default_fence_overlay.png^" .. def.texture .. + "^default_fence_overlay.png^[makealpha:255,126,126" + -- Allow almost everything to be overridden + local default_fields = { + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}, + -- connect_top = + -- connect_bottom = + connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/8 }, + {-1/16, -5/16, -1/2, 1/16, -3/16, -1/8 }}, + connect_left = {{-1/2, 3/16, -1/16, -1/8, 5/16, 1/16}, + {-1/2, -5/16, -1/16, -1/8, -3/16, 1/16}}, + connect_back = {{-1/16, 3/16, 1/8, 1/16, 5/16, 1/2 }, + {-1/16, -5/16, 1/8, 1/16, -3/16, 1/2 }}, + connect_right = {{ 1/8, 3/16, -1/16, 1/2, 5/16, 1/16}, + { 1/8, -5/16, -1/16, 1/2, -3/16, 1/16}} + }, + collision_box = { + type = "connected", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8}, + -- connect_top = + -- connect_bottom = + connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8}, + connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8}, + connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2}, + connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8} + }, + connects_to = {"group:fence", "group:wood", "group:tree", "group:wall"}, + inventory_image = fence_texture, + wield_image = fence_texture, + tiles = {def.texture}, + sunlight_propagates = true, + is_ground_content = false, + groups = {}, + } + for k, v in pairs(default_fields) do + if def[k] == nil then + def[k] = v + end + end + + -- Always add to the fence group, even if no group provided + def.groups.fence = 1 + + def.texture = nil + def.material = nil + + minetest.register_node(name, def) +end + + +-- +-- Fence rail registration helper +-- + +function default.register_fence_rail(name, def) + minetest.register_craft({ + output = name .. " 16", + recipe = { + { def.material, def.material }, + { "", ""}, + { def.material, def.material }, + } + }) + + local fence_rail_texture = "default_fence_rail_overlay.png^" .. def.texture .. + "^default_fence_rail_overlay.png^[makealpha:255,126,126" + -- Allow almost everything to be overridden + local default_fields = { + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {{-1/16, 3/16, -1/16, 1/16, 5/16, 1/16}, + {-1/16, -3/16, -1/16, 1/16, -5/16, 1/16}}, + -- connect_top = + -- connect_bottom = + connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/16}, + {-1/16, -5/16, -1/2, 1/16, -3/16, -1/16}}, + connect_left = {{-1/2, 3/16, -1/16, -1/16, 5/16, 1/16}, + {-1/2, -5/16, -1/16, -1/16, -3/16, 1/16}}, + connect_back = {{-1/16, 3/16, 1/16, 1/16, 5/16, 1/2 }, + {-1/16, -5/16, 1/16, 1/16, -3/16, 1/2 }}, + connect_right = {{ 1/16, 3/16, -1/16, 1/2, 5/16, 1/16}, + { 1/16, -5/16, -1/16, 1/2, -3/16, 1/16}} + }, + collision_box = { + type = "connected", + fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8}, + -- connect_top = + -- connect_bottom = + connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8}, + connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8}, + connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2}, + connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8} + }, + connects_to = {"group:fence", "group:wall"}, + inventory_image = fence_rail_texture, + wield_image = fence_rail_texture, + tiles = {def.texture}, + sunlight_propagates = true, + is_ground_content = false, + groups = {}, + } + for k, v in pairs(default_fields) do + if def[k] == nil then + def[k] = v + end + end + + -- Always add to the fence group, even if no group provided + def.groups.fence = 1 + + def.texture = nil + def.material = nil + + minetest.register_node(name, def) +end + +-- +-- Mese post registration helper +-- + +function default.register_mesepost(name, def) + minetest.register_craft({ + output = name .. " 4", + recipe = { + {'', 'default:glass', ''}, + {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'}, + {'', def.material, ''}, + } + }) + + local post_texture = def.texture .. "^default_mese_post_light_side.png^[makealpha:0,0,0" + local post_texture_dark = def.texture .. "^default_mese_post_light_side_dark.png^[makealpha:0,0,0" + -- Allow almost everything to be overridden + local default_fields = { + wield_image = post_texture, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16}, + }, + }, + paramtype = "light", + tiles = {def.texture, def.texture, post_texture_dark, post_texture_dark, post_texture, post_texture}, + use_texture_alpha = "opaque", + light_source = default.LIGHT_MAX, + sunlight_propagates = true, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + } + for k, v in pairs(default_fields) do + if def[k] == nil then + def[k] = v + end + end + + def.texture = nil + def.material = nil + + minetest.register_node(name, def) +end + +-- +-- Leafdecay +-- + +-- Prevent decay of placed leaves + +default.after_place_leaves = function(pos, placer, itemstack, pointed_thing) + if placer and placer:is_player() then + local node = minetest.get_node(pos) + node.param2 = 1 + minetest.set_node(pos, node) + end +end + +-- Leafdecay +local function leafdecay_after_destruct(pos, oldnode, def) + for _, v in pairs(minetest.find_nodes_in_area(vector.subtract(pos, def.radius), + vector.add(pos, def.radius), def.leaves)) do + local node = minetest.get_node(v) + local timer = minetest.get_node_timer(v) + if node.param2 ~= 1 and not timer:is_started() then + timer:start(math.random(20, 120) / 10) + end + end +end + +local movement_gravity = tonumber( + minetest.settings:get("movement_gravity")) or 9.81 + +local function leafdecay_on_timer(pos, def) + if minetest.find_node_near(pos, def.radius, def.trunks) then + return false + end + + local node = minetest.get_node(pos) + local drops = minetest.get_node_drops(node.name) + for _, item in ipairs(drops) do + local is_leaf + for _, v in pairs(def.leaves) do + if v == item then + is_leaf = true + end + end + if minetest.get_item_group(item, "leafdecay_drop") ~= 0 or + not is_leaf then + minetest.add_item({ + x = pos.x - 0.5 + math.random(), + y = pos.y - 0.5 + math.random(), + z = pos.z - 0.5 + math.random(), + }, item) + end + end + + minetest.remove_node(pos) + minetest.check_for_falling(pos) + + -- spawn a few particles for the removed node + minetest.add_particlespawner({ + amount = 8, + time = 0.001, + minpos = vector.subtract(pos, {x=0.5, y=0.5, z=0.5}), + maxpos = vector.add(pos, {x=0.5, y=0.5, z=0.5}), + minvel = vector.new(-0.5, -1, -0.5), + maxvel = vector.new(0.5, 0, 0.5), + minacc = vector.new(0, -movement_gravity, 0), + maxacc = vector.new(0, -movement_gravity, 0), + minsize = 0, + maxsize = 0, + node = node, + }) +end + +function default.register_leafdecay(def) + assert(def.leaves) + assert(def.trunks) + assert(def.radius) + for _, v in pairs(def.trunks) do + minetest.override_item(v, { + after_destruct = function(pos, oldnode) + leafdecay_after_destruct(pos, oldnode, def) + end, + }) + end + for _, v in pairs(def.leaves) do + minetest.override_item(v, { + on_timer = function(pos) + leafdecay_on_timer(pos, def) + end, + }) + end +end + + +-- +-- Convert default:dirt to something that fits the environment +-- + +minetest.register_abm({ + label = "Grass spread", + nodenames = {"default:dirt"}, + neighbors = { + "air", + "group:grass", + "group:dry_grass", + "default:snow", + }, + interval = 6, + chance = 50, + catch_up = false, + action = function(pos, node) + -- Check for darkness: night, shadow or under a light-blocking node + -- Returns if ignore above + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + if (minetest.get_node_light(above) or 0) < 13 then + return + end + + -- Look for spreading dirt-type neighbours + local p2 = minetest.find_node_near(pos, 1, "group:spreading_dirt_type") + if p2 then + local n3 = minetest.get_node(p2) + minetest.set_node(pos, {name = n3.name}) + return + end + + -- Else, any seeding nodes on top? + local name = minetest.get_node(above).name + -- Snow check is cheapest, so comes first + if name == "default:snow" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + elseif minetest.get_item_group(name, "grass") ~= 0 then + minetest.set_node(pos, {name = "default:dirt_with_grass"}) + elseif minetest.get_item_group(name, "dry_grass") ~= 0 then + minetest.set_node(pos, {name = "default:dirt_with_dry_grass"}) + end + end +}) + + +-- +-- Grass and dry grass removed in darkness +-- + +minetest.register_abm({ + label = "Grass covered", + nodenames = {"group:spreading_dirt_type", "default:dry_dirt_with_dry_grass"}, + interval = 8, + chance = 50, + catch_up = false, + action = function(pos, node) + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + local name = minetest.get_node(above).name + local nodedef = minetest.registered_nodes[name] + if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or + nodedef.paramtype == "light") and + nodedef.liquidtype == "none") then + if node.name == "default:dry_dirt_with_dry_grass" then + minetest.set_node(pos, {name = "default:dry_dirt"}) + else + minetest.set_node(pos, {name = "default:dirt"}) + end + end + end +}) + + +-- +-- Moss growth on cobble near water +-- + +local moss_correspondences = { + ["default:cobble"] = "default:mossycobble", + ["stairs:slab_cobble"] = "stairs:slab_mossycobble", + ["stairs:stair_cobble"] = "stairs:stair_mossycobble", + ["stairs:stair_inner_cobble"] = "stairs:stair_inner_mossycobble", + ["stairs:stair_outer_cobble"] = "stairs:stair_outer_mossycobble", + ["walls:cobble"] = "walls:mossycobble", +} +minetest.register_abm({ + label = "Moss growth", + nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble", + "stairs:stair_inner_cobble", "stairs:stair_outer_cobble", + "walls:cobble"}, + neighbors = {"group:water"}, + interval = 16, + chance = 200, + catch_up = false, + action = function(pos, node) + node.name = moss_correspondences[node.name] + if node.name then + minetest.set_node(pos, node) + end + end +}) + +-- +-- Register a craft to copy the metadata of items +-- + +function default.register_craft_metadata_copy(ingredient, result) + minetest.register_craft({ + type = "shapeless", + output = result, + recipe = {ingredient, result} + }) + + minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv) + if itemstack:get_name() ~= result then + return + end + + local original + local index + for i = 1, #old_craft_grid do + if old_craft_grid[i]:get_name() == result then + original = old_craft_grid[i] + index = i + end + end + if not original then + return + end + local copymeta = original:get_meta():to_table() + itemstack:get_meta():from_table(copymeta) + -- put the book with metadata back in the craft grid + craft_inv:set_stack("craft", index, original) + end) +end + + +-- +-- NOTICE: This method is not an official part of the API yet. +-- This method may change in future. +-- + +function default.can_interact_with_node(player, pos) + if player and player:is_player() then + if minetest.check_player_privs(player, "protection_bypass") then + return true + end + else + return false + end + + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + + if not owner or owner == "" or owner == player:get_player_name() then + return true + end + + -- Is player wielding the right key? + local item = player:get_wielded_item() + if minetest.get_item_group(item:get_name(), "key") == 1 then + local key_meta = item:get_meta() + + if key_meta:get_string("secret") == "" then + local key_oldmeta = item:get_metadata() + if key_oldmeta == "" or not minetest.parse_json(key_oldmeta) then + return false + end + + key_meta:set_string("secret", minetest.parse_json(key_oldmeta).secret) + item:set_metadata("") + end + + return meta:get_string("key_lock_secret") == key_meta:get_string("secret") + end + + return false +end diff --git a/mods/minetest_game/default/furnace.lua b/mods/minetest_game/default/furnace.lua new file mode 100644 index 0000000..d5703cd --- /dev/null +++ b/mods/minetest_game/default/furnace.lua @@ -0,0 +1,380 @@ +-- default/furnace.lua + +-- support for MT game translation. +local S = default.get_translator + +-- +-- Formspecs +-- + +function default.get_furnace_active_formspec(fuel_percent, item_percent) + return "size[8,8.5]".. + "list[context;src;2.75,0.5;1,1;]".. + "list[context;fuel;2.75,2.5;1,1;]".. + "image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:".. + (fuel_percent)..":default_furnace_fire_fg.png]".. + "image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:".. + (item_percent)..":gui_furnace_arrow_fg.png^[transformR270]".. + "list[context;dst;4.75,0.96;2,2;]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "listring[context;dst]".. + "listring[current_player;main]".. + "listring[context;src]".. + "listring[current_player;main]".. + "listring[context;fuel]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0, 4.25) +end + +function default.get_furnace_inactive_formspec() + return "size[8,8.5]".. + "list[context;src;2.75,0.5;1,1;]".. + "list[context;fuel;2.75,2.5;1,1;]".. + "image[2.75,1.5;1,1;default_furnace_fire_bg.png]".. + "image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "list[context;dst;4.75,0.96;2,2;]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "listring[context;dst]".. + "listring[current_player;main]".. + "listring[context;src]".. + "listring[current_player;main]".. + "listring[context;fuel]".. + "listring[current_player;main]".. + default.get_hotbar_bg(0, 4.25) +end + +-- +-- Node callback functions that are the same for active and inactive furnace +-- + +local function can_dig(pos, player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("fuel") and inv:is_empty("dst") and inv:is_empty("src") +end + +local function allow_metadata_inventory_put(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if listname == "fuel" then + if minetest.get_craft_result({method="fuel", width=1, items={stack}}).time ~= 0 then + if inv:is_empty("src") then + meta:set_string("infotext", S("Furnace is empty")) + end + return stack:get_count() + else + return 0 + end + elseif listname == "src" then + return stack:get_count() + elseif listname == "dst" then + return 0 + end +end + +local function allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local stack = inv:get_stack(from_list, from_index) + return allow_metadata_inventory_put(pos, to_list, to_index, stack, player) +end + +local function allow_metadata_inventory_take(pos, listname, index, stack, player) + if minetest.is_protected(pos, player:get_player_name()) then + return 0 + end + return stack:get_count() +end + +local function swap_node(pos, name) + local node = minetest.get_node(pos) + if node.name == name then + return + end + node.name = name + minetest.swap_node(pos, node) +end + +local function furnace_node_timer(pos, elapsed) + -- + -- Initialize metadata + -- + local meta = minetest.get_meta(pos) + local fuel_time = meta:get_float("fuel_time") or 0 + local src_time = meta:get_float("src_time") or 0 + local fuel_totaltime = meta:get_float("fuel_totaltime") or 0 + + local inv = meta:get_inventory() + local srclist, fuellist + local dst_full = false + + local timer_elapsed = meta:get_int("timer_elapsed") or 0 + meta:set_int("timer_elapsed", timer_elapsed + 1) + + local cookable, cooked + local fuel + + local update = true + while elapsed > 0 and update do + update = false + + srclist = inv:get_list("src") + fuellist = inv:get_list("fuel") + + -- + -- Cooking + -- + + -- Check if we have cookable content + local aftercooked + cooked, aftercooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) + cookable = cooked.time ~= 0 + + local el = math.min(elapsed, fuel_totaltime - fuel_time) + if cookable then -- fuel lasts long enough, adjust el to cooking duration + el = math.min(el, cooked.time - src_time) + end + + -- Check if we have enough fuel to burn + if fuel_time < fuel_totaltime then + -- The furnace is currently active and has enough fuel + fuel_time = fuel_time + el + -- If there is a cookable item then check if it is ready yet + if cookable then + src_time = src_time + el + if src_time >= cooked.time then + -- Place result in dst list if possible + if inv:room_for_item("dst", cooked.item) then + inv:add_item("dst", cooked.item) + inv:set_stack("src", 1, aftercooked.items[1]) + src_time = src_time - cooked.time + update = true + else + dst_full = true + end + -- Play cooling sound + minetest.sound_play("default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.1}, true) + else + -- Item could not be cooked: probably missing fuel + update = true + end + end + else + -- Furnace ran out of fuel + if cookable then + -- We need to get new fuel + local afterfuel + fuel, afterfuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) + + if fuel.time == 0 then + -- No valid fuel in fuel list + fuel_totaltime = 0 + src_time = 0 + else + -- Take fuel from fuel list + inv:set_stack("fuel", 1, afterfuel.items[1]) + -- Put replacements in dst list or drop them on the furnace. + local replacements = fuel.replacements + if replacements[1] then + local leftover = inv:add_item("dst", replacements[1]) + if not leftover:is_empty() then + local above = vector.new(pos.x, pos.y + 1, pos.z) + local drop_pos = minetest.find_node_near(above, 1, {"air"}) or above + minetest.item_drop(replacements[1], nil, drop_pos) + end + end + update = true + fuel_totaltime = fuel.time + (fuel_totaltime - fuel_time) + end + else + -- We don't need to get new fuel since there is no cookable item + fuel_totaltime = 0 + src_time = 0 + end + fuel_time = 0 + end + + elapsed = elapsed - el + end + + if fuel and fuel_totaltime > fuel.time then + fuel_totaltime = fuel.time + end + if srclist and srclist[1]:is_empty() then + src_time = 0 + end + + -- + -- Update formspec, infotext and node + -- + local formspec + local item_state + local item_percent = 0 + if cookable then + item_percent = math.floor(src_time / cooked.time * 100) + if dst_full then + item_state = S("100% (output full)") + else + item_state = S("@1%", item_percent) + end + else + if srclist and not srclist[1]:is_empty() then + item_state = S("Not cookable") + else + item_state = S("Empty") + end + end + + local fuel_state = S("Empty") + local active = false + local result = false + + if fuel_totaltime ~= 0 then + active = true + local fuel_percent = 100 - math.floor(fuel_time / fuel_totaltime * 100) + fuel_state = S("@1%", fuel_percent) + formspec = default.get_furnace_active_formspec(fuel_percent, item_percent) + swap_node(pos, "default:furnace_active") + -- make sure timer restarts automatically + result = true + + -- Play sound every 5 seconds while the furnace is active + if timer_elapsed == 0 or (timer_elapsed+1) % 5 == 0 then + minetest.sound_play("default_furnace_active", + {pos = pos, max_hear_distance = 16, gain = 0.5}, true) + end + else + if fuellist and not fuellist[1]:is_empty() then + fuel_state = S("@1%", 0) + end + formspec = default.get_furnace_inactive_formspec() + swap_node(pos, "default:furnace") + -- stop timer on the inactive furnace + minetest.get_node_timer(pos):stop() + meta:set_int("timer_elapsed", 0) + end + + + local infotext + if active then + infotext = S("Furnace active") + else + infotext = S("Furnace inactive") + end + infotext = infotext .. "\n" .. S("(Item: @1; Fuel: @2)", item_state, fuel_state) + + -- + -- Set meta values + -- + meta:set_float("fuel_totaltime", fuel_totaltime) + meta:set_float("fuel_time", fuel_time) + meta:set_float("src_time", src_time) + meta:set_string("formspec", formspec) + meta:set_string("infotext", infotext) + + return result +end + +-- +-- Node definitions +-- + +minetest.register_node("default:furnace", { + description = S("Furnace"), + tiles = { + "default_furnace_top.png", "default_furnace_bottom.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", "default_furnace_front.png" + }, + paramtype2 = "facedir", + groups = {cracky=2}, + legacy_facedir_simple = true, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + + can_dig = can_dig, + + on_timer = furnace_node_timer, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size('src', 1) + inv:set_size('fuel', 1) + inv:set_size('dst', 4) + furnace_node_timer(pos, 0) + end, + + on_metadata_inventory_move = function(pos) + minetest.get_node_timer(pos):start(1.0) + end, + on_metadata_inventory_put = function(pos) + -- start timer function, it will sort out whether furnace can burn or not. + minetest.get_node_timer(pos):start(1.0) + end, + on_metadata_inventory_take = function(pos) + -- check whether the furnace is empty or not. + minetest.get_node_timer(pos):start(1.0) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "src", drops) + default.get_inventory_drops(pos, "fuel", drops) + default.get_inventory_drops(pos, "dst", drops) + drops[#drops+1] = "default:furnace" + minetest.remove_node(pos) + return drops + end, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, +}) + +minetest.register_node("default:furnace_active", { + description = S("Furnace"), + tiles = { + "default_furnace_top.png", "default_furnace_bottom.png", + "default_furnace_side.png", "default_furnace_side.png", + "default_furnace_side.png", + { + image = "default_furnace_front_active.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + } + }, + paramtype2 = "facedir", + light_source = 8, + drop = "default:furnace", + groups = {cracky=2, not_in_creative_inventory=1}, + legacy_facedir_simple = true, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + on_timer = furnace_node_timer, + + can_dig = can_dig, + + allow_metadata_inventory_put = allow_metadata_inventory_put, + allow_metadata_inventory_move = allow_metadata_inventory_move, + allow_metadata_inventory_take = allow_metadata_inventory_take, +}) + +minetest.register_craft({ + output = "default:furnace", + recipe = { + {"group:stone", "group:stone", "group:stone"}, + {"group:stone", "", "group:stone"}, + {"group:stone", "group:stone", "group:stone"}, + } +}) diff --git a/mods/minetest_game/default/init.lua b/mods/minetest_game/default/init.lua new file mode 100644 index 0000000..7d27f98 --- /dev/null +++ b/mods/minetest_game/default/init.lua @@ -0,0 +1,82 @@ +-- Minetest 0.4 mod: default +-- See README.txt for licensing and other information. + +-- The API documentation in here was moved into game_api.txt + +-- Load support for MT game translation. +local S = minetest.get_translator("default") + +-- Definitions made by this mod that other mods can use too +default = {} + +default.LIGHT_MAX = 14 +default.get_translator = S + +-- Check for engine features required by MTG +-- This provides clear error behaviour when MTG is newer than the installed engine +-- and avoids obscure, hard to debug runtime errors. +-- This section should be updated before release and older checks can be dropped +-- when newer ones are introduced. +if not minetest.is_creative_enabled or not minetest.has_feature({ + direct_velocity_on_players = true, + use_texture_alpha_string_modes = true, + }) then + error("\nThis version of Minetest Game is incompatible with your engine version ".. + "(which is too old). You should download a version of Minetest Game that ".. + "matches the installed engine version.\n") +end + +-- GUI related stuff +minetest.register_on_joinplayer(function(player) + -- Set formspec prepend + local formspec = [[ + bgcolor[#080808BB;true] + listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]] + local name = player:get_player_name() + local info = minetest.get_player_information(name) + if info.formspec_version > 1 then + formspec = formspec .. "background9[5,5;1,1;gui_formbg.png;true;10]" + else + formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]" + end + player:set_formspec_prepend(formspec) + + -- Set hotbar textures + player:hud_set_hotbar_image("gui_hotbar.png") + player:hud_set_hotbar_selected_image("gui_hotbar_selected.png") +end) + +function default.get_hotbar_bg(x,y) + local out = "" + for i=0,7,1 do + out = out .."image["..x+i..","..y..";1,1;gui_hb_bg.png]" + end + return out +end + +default.gui_survival_form = "size[8,8.5]".. + "list[current_player;main;0,4.25;8,1;]".. + "list[current_player;main;0,5.5;8,3;8]".. + "list[current_player;craft;1.75,0.5;3,3;]".. + "list[current_player;craftpreview;5.75,1.5;1,1;]".. + "image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]".. + "listring[current_player;main]".. + "listring[current_player;craft]".. + default.get_hotbar_bg(0,4.25) + +-- Load files +local default_path = minetest.get_modpath("default") + +dofile(default_path.."/functions.lua") +dofile(default_path.."/trees.lua") +dofile(default_path.."/nodes.lua") +dofile(default_path.."/chests.lua") +dofile(default_path.."/furnace.lua") +dofile(default_path.."/torch.lua") +dofile(default_path.."/tools.lua") +dofile(default_path.."/item_entity.lua") +dofile(default_path.."/craftitems.lua") +dofile(default_path.."/crafting.lua") +dofile(default_path.."/mapgen.lua") +dofile(default_path.."/aliases.lua") +dofile(default_path.."/legacy.lua") diff --git a/mods/minetest_game/default/item_entity.lua b/mods/minetest_game/default/item_entity.lua new file mode 100644 index 0000000..25fb832 --- /dev/null +++ b/mods/minetest_game/default/item_entity.lua @@ -0,0 +1,78 @@ +-- mods/default/item_entity.lua + +local builtin_item = minetest.registered_entities["__builtin:item"] + +local item = { + set_item = function(self, itemstring) + builtin_item.set_item(self, itemstring) + + local stack = ItemStack(itemstring) + local itemdef = minetest.registered_items[stack:get_name()] + if itemdef and itemdef.groups.flammable ~= 0 then + self.flammable = itemdef.groups.flammable + end + end, + + burn_up = function(self) + -- disappear in a smoke puff + local p = self.object:get_pos() + self.object:remove() + minetest.sound_play("default_item_smoke", { + pos = p, + max_hear_distance = 8, + }, true) + minetest.add_particlespawner({ + amount = 3, + time = 0.1, + minpos = {x = p.x - 0.1, y = p.y + 0.1, z = p.z - 0.1 }, + maxpos = {x = p.x + 0.1, y = p.y + 0.2, z = p.z + 0.1 }, + minvel = {x = 0, y = 2.5, z = 0}, + maxvel = {x = 0, y = 2.5, z = 0}, + minacc = {x = -0.15, y = -0.02, z = -0.15}, + maxacc = {x = 0.15, y = -0.01, z = 0.15}, + minexptime = 4, + maxexptime = 6, + minsize = 5, + maxsize = 5, + collisiondetection = true, + texture = "default_item_smoke.png" + }) + end, + + on_step = function(self, dtime, ...) + builtin_item.on_step(self, dtime, ...) + + if self.flammable then + -- flammable, check for igniters every 10 s + self.ignite_timer = (self.ignite_timer or 0) + dtime + if self.ignite_timer > 10 then + self.ignite_timer = 0 + + local pos = self.object:get_pos() + if pos == nil then + return -- object already deleted + end + local node = minetest.get_node_or_nil(pos) + if not node then + return + end + + -- Immediately burn up flammable items in lava + if minetest.get_item_group(node.name, "lava") > 0 then + self:burn_up() + else + -- otherwise there'll be a chance based on its igniter value + local burn_chance = self.flammable + * minetest.get_item_group(node.name, "igniter") + if burn_chance > 0 and math.random(0, burn_chance) ~= 0 then + self:burn_up() + end + end + end + end + end, +} + +-- set defined item as new __builtin:item, with the old one as fallback table +setmetatable(item, { __index = builtin_item }) +minetest.register_entity(":__builtin:item", item) diff --git a/mods/minetest_game/default/legacy.lua b/mods/minetest_game/default/legacy.lua new file mode 100644 index 0000000..a2d812d --- /dev/null +++ b/mods/minetest_game/default/legacy.lua @@ -0,0 +1,49 @@ +-- mods/default/legacy.lua + +-- Horrible stuff to support old code registering falling nodes +-- Don't use this and never do what this does, it's completely wrong! +-- (More specifically, the client and the C++ code doesn't get the group) +function default.register_falling_node(nodename, texture) + minetest.log("error", debug.traceback()) + minetest.log('error', "WARNING: default.register_falling_node is deprecated") + if minetest.registered_nodes[nodename] then + minetest.registered_nodes[nodename].groups.falling_node = 1 + end +end + +function default.spawn_falling_node(p, nodename) + spawn_falling_node(p, nodename) +end + +-- Liquids +WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha +WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity +LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity +LIGHT_MAX = default.LIGHT_MAX + +-- Formspecs +default.gui_suvival_form = default.gui_survival_form +default.gui_bg = "" +default.gui_bg_img = "" +default.gui_slots = "" + +-- Players +if minetest.get_modpath("player_api") then + default.registered_player_models = player_api.registered_models + default.player_register_model = player_api.register_model + default.player_attached = player_api.player_attached + default.player_get_animation = player_api.get_animation + default.player_set_model = player_api.set_model + default.player_set_textures = player_api.set_textures + default.player_set_animation = player_api.set_animation +end + +-- Chests +default.register_chest = default.chest.register_chest + +-- Check for a volume intersecting protection +function default.intersects_protection(minp, maxp, player_name, interval) + minetest.log("warning", "default.intersects_protection() is " .. + "deprecated, use minetest.is_area_protected() instead.") + return minetest.is_area_protected(minp, maxp, player_name, interval) +end diff --git a/mods/minetest_game/default/license.txt b/mods/minetest_game/default/license.txt new file mode 100644 index 0000000..3c95c1b --- /dev/null +++ b/mods/minetest_game/default/license.txt @@ -0,0 +1,157 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2018 celeron55, Perttu Ahola +Copyright (C) 2011-2018 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2010-2018: + + celeron55, Perttu Ahola + Cisoun + G4JC + VanessaE + RealBadAngel + Calinou + MirceaKitsune + Jordach + PilzAdam + jojoa1997 + InfinityProject + Splizard + Zeg9 + paramat + BlockMen + sofar + Neuromancer + Gambit + asl97 + KevDoy + Mito551 + GreenXenith + kaeza + kilbith + tobyplowy + CloudyProton + TumeniNodes + Mossmanikin + random-geek + Extex101 + An0n3m0us + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) + +Copyright (C) 2009 cmusounddesign +Copyright (C) 2010 Tomlija +Copyright (C) 2010 lsprice +Copyright (C) 2014 sonictechtonic +Copyright (C) 2015 yadronoff +Copyright (C) 2007 HerbertBoland +Copyright (C) 2006 AGFX + +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. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication + +Iwan Gabovitch +Ottomaani138 +Ogrebane +blukotek +Sevin7 +Yoyodaman234 +Ryding + +No Copyright + +The person who associated a work with this deed has dedicated the work to the +public domain by waiving all of his or her rights to the work worldwide under +copyright law, including all related and neighboring rights, to the extent +allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. See Other Information below. + +Other Information: + +In no way are the patent or trademark rights of any person affected by CC0, nor +are the rights that other persons may have in the work or in how the work is +used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this +deed makes no warranties about the work, and disclaims liability for all uses +of the work, to the fullest extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author +or the affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mods/minetest_game/default/locale/default.de.tr b/mods/minetest_game/default/locale/default.de.tr new file mode 100644 index 0000000..a1e49dc --- /dev/null +++ b/mods/minetest_game/default/locale/default.de.tr @@ -0,0 +1,220 @@ +# textdomain: default +Locked Chest=Abgeschlossene Truhe +Locked Chest (owned by @1)=Abgeschlossene Truhe (Eigentum von @1) +You do not own this chest.=Ihnen gehört diese Truhe nicht. +a locked chest=eine abgeschlossene Truhe +Chest=Truhe +Title:=Titel: +Contents:=Inhalt: +Save=Speichern +by @1=von @1 +Page @1 of @2=Seite @1 von @2 +"@1" by @2=„@1“ von @2 +Skeleton Key=Skelettschlüssel +Key to @1's @2=Schlüssel für @2 von @1 +Blueberries=Blaubeeren +Book=Buch +Book with Text=Buch mit Text +Bronze Ingot=Bronzebarren +Clay Brick=Tonziegel +Clay Lump=Tonklumpen +Coal Lump=Kohleklumpen +Copper Ingot=Kupferbarren +Copper Lump=Kupferklumpen +Diamond=Diamant +Flint=Feuerstein +Gold Ingot=Goldbarren +Gold Lump=Goldklumpen +Iron Lump=Eisenklumpen +Mese Crystal=Mesekristall +Mese Crystal Fragment=Mesekristallfragment +Obsidian Shard=Obsidianscherbe +Paper=Papier +Steel Ingot=Stahlbarren +Stick=Stock +Tin Ingot=Zinnbarren +Tin Lump=Zinnklumpen +Furnace is empty=Ofen ist leer +100% (output full)=100% (Ausgabe voll) +@1%=@1% +Not cookable=Nicht kochbar +Empty=Leer +Furnace active=Ofen aktiv +Furnace inactive=Ofen inaktiv +(Item: @1; Fuel: @2)=(Gegenstand: @1; Brennstoff: @2) +Furnace=Ofen +Stone=Stein +Cobblestone=Kopfsteinpflaster +Stone Brick=Steinziegel +Stone Block=Steinblock +Mossy Cobblestone=Moosiges Kopfsteinpflaster +Desert Stone=Wüstenstein +Desert Cobblestone=Wüstenkopfsteinpflaster +Desert Stone Brick=Wüstensteinziegel +Desert Stone Block=Wüstensteinblock +Sandstone=Sandstein +Sandstone Brick=Sandsteinziegel +Sandstone Block=Sandsteinblock +Desert Sandstone=Wüstensandstein +Desert Sandstone Brick=Wüstensandsteinziegel +Desert Sandstone Block=Wüstensandsteinblock +Silver Sandstone=Silbersandstein +Silver Sandstone Brick=Silbersandsteinziegel +Silver Sandstone Block=Silbersandsteinblock +Obsidian=Obsidian +Obsidian Brick=Obsidianziegel +Obsidian Block=Obsidianblock +Dirt=Erde +Dirt with Grass=Erde mit Gras +Dirt with Grass and Footsteps=Erde mit Gras und Fußstapfen +Dirt with Savanna Grass=Erde mit Savannengras +Dirt with Snow=Erde mit Schnee +Dirt with Rainforest Litter=Erde mit Regenwaldboden +Dirt with Coniferous Litter=Erde mit Nadelwaldboden +Savanna Dirt=Savannenerde +Savanna Dirt with Savanna Grass=Savannenerde mit Savannengras +Permafrost=Permafrost +Permafrost with Stones=Permafrost mit Steinen +Permafrost with Moss=Permafrost mit Moos +Sand=Sand +Desert Sand=Wüstensand +Silver Sand=Silbersand +Gravel=Kies +Clay=Ton +Snow=Schnee +Snow Block=Schneeblock +Ice=Eis +Cave Ice=Höhleneis +Apple Tree=Apfelbaum +Apple Wood Planks=Apfelbaumplanken +Apple Tree Sapling=Apfelbaumsetzling +Apple Tree Leaves=Apfelbaumblätter +Apple=Apfel +Apple Marker=Apfelmarkierung +Jungle Tree=Dschungelbaum +Jungle Wood Planks=Dschungelholzplanken +Jungle Tree Leaves=Dschungelbaumblätter +Jungle Tree Sapling=Dschungelbaumsetzling +Emergent Jungle Tree Sapling=Hervorstehender Dschungelbaumsetzling +Pine Tree=Kiefernbaum +Pine Wood Planks=Kiefernholzplanken +Pine Needles=Kiefernnadeln +Pine Tree Sapling=Kiefernbaumsetzling +Acacia Tree=Akazienbaum +Acacia Wood Planks=Akazienholzplanken +Acacia Tree Leaves=Akazienbaumblätter +Acacia Tree Sapling=Akazienbaumsetzling +Aspen Tree=Espenbaum +Aspen Wood Planks=Espenholzplanken +Aspen Tree Leaves=Espenbaumblätter +Aspen Tree Sapling=Esepenbaumsetzling +Coal Ore=Kohleerz +Coal Block=Kohleblock +Iron Ore=Eisenerz +Steel Block=Stahlblock +Copper Ore=Kupfererz +Copper Block=Kupferblock +Tin Ore=Zinnerz +Tin Block=Zinnblock +Bronze Block=Bronzeblock +Mese Ore=Meseerz +Mese Block=Meseblock +Gold Ore=Golderz +Gold Block=Goldblock +Diamond Ore=Diamanterz +Diamond Block=Diamantblock +Cactus=Kaktus +Large Cactus Seedling=Großer Kaktussämling +Papyrus=Papyrus +Dry Shrub=Trockener Busch +Jungle Grass=Dschungelgras +Grass=Gras +Savanna Grass=Savannengras +Fern=Farn +Marram Grass=Dünengras +Bush Stem=Buschstamm +Bush Leaves=Buschblätter +Bush Sapling=Buschsetzling +Blueberry Bush Leaves with Berries=Blaubeerbuschblätter mit Beeren +Blueberry Bush Leaves=Blaubeerbuschblätter +Blueberry Bush Sapling=Blaubeerbuschsetzling +Acacia Bush Stem=Akazienbuschstamm +Acacia Bush Leaves=Akazienbuschblätter +Acacia Bush Sapling=Akazienbuschsetzling +Pine Bush Stem=Kiefernbuschstamm +Pine Bush Needles=Kiefernbuschnadeln +Pine Bush Sapling=Kiefernbuschsetzling +Kelp=Seetang +Green Coral=Grüne Koralle +Pink Coral=Rosa Koralle +Cyan Coral=Türkise Koralle +Brown Coral=Braune Koralle +Orange Coral=Orange Koralle +Coral Skeleton=Korallenskelett +Water Source=Wasserquelle +Flowing Water=Fließendes Wasser +River Water Source=Flusswasserquelle +Flowing River Water=Fließendes Flusswasser +Lava Source=Lavaquelle +Flowing Lava=Fließende Lava +Empty Bookshelf=Leeres Bücherregal +Bookshelf (@1 written, @2 empty books)=Bücherregal (@1 beschriebene, @2 leere Bücher) +Bookshelf=Bücherregal +Text too long=Text zu lang +"@1"=„@1“ +Wooden Sign=Holzschild +Steel Sign=Stahlschild +Wooden Ladder=Holzleiter +Steel Ladder=Stahlleiter +Apple Wood Fence=Apfelholzzaun +Acacia Wood Fence=Akazienholzzaun +Jungle Wood Fence=Dschungelholzzaun +Pine Wood Fence=Kiefernholzzaun +Aspen Wood Fence=Espenholzzaun +Apple Wood Fence Rail=Apfelholzzaungeländer +Acacia Wood Fence Rail=Akazienholzzaungeländer +Jungle Wood Fence Rail=Dschungelholzzaungeländer +Pine Wood Fence Rail=Kiefernholzzaungeländer +Aspen Wood Fence Rail=Espenholzzaungeländer +Glass=Glas +Obsidian Glass=Obsidianglas +Brick Block=Ziegelblock +Mese Lamp=Meselampe +Apple Wood Mese Post Light=Apfelholzmesestandlampe +Acacia Wood Mese Post Light=Akazienholzmesestandlampe +Jungle Wood Mese Post Light=Dschungelholzmesestandlampe +Pine Wood Mese Post Light=Kiefernholzmesestandlampe +Aspen Wood Mese Post Light=Espenholzmesestandlampe +Cloud=Wolke +Wooden Pickaxe=Holzspitzhacke +Stone Pickaxe=Steinspitzhacke +Bronze Pickaxe=Bronzespitzhacke +Steel Pickaxe=Stahlspitzhacke +Mese Pickaxe=Mesespitzhacke +Diamond Pickaxe=Diamantspitzhacke +Wooden Shovel=Holzschaufel +Stone Shovel=Steinschaufel +Bronze Shovel=Bronzeschaufel +Steel Shovel=Stahlschaufel +Mese Shovel=Meseschaufel +Diamond Shovel=Diamantschaufel +Wooden Axe=Holzaxt +Stone Axe=Steinaxt +Bronze Axe=Bronzeaxt +Steel Axe=Stahlaxt +Mese Axe=Meseaxt +Diamond Axe=Diamantaxt +Wooden Sword=Holzschwert +Stone Sword=Steinschwert +Bronze Sword=Bronzeschwert +Steel Sword=Stahlschwert +Mese Sword=Meseschwert +Diamond Sword=Diamantschwert +Key=Schlüssel +Torch=Fackel +@1 will intersect protection on growth.=@1 wird bei Wachstum mit geschützter Zone überlappen. + + +##### not used anymore ##### + +Mese Post Light=Mesestandlampe diff --git a/mods/minetest_game/default/locale/default.eo.tr b/mods/minetest_game/default/locale/default.eo.tr new file mode 100644 index 0000000..824a6b7 --- /dev/null +++ b/mods/minetest_game/default/locale/default.eo.tr @@ -0,0 +1,211 @@ +# textdomain: default +Stone=Ŝtono +Cobblestone=Pavimŝtono +Stone Brick=Ŝtona Briko +Stone Block=Ŝtona Ŝtipo +Mossy Cobblestone=Muska Pavimŝtono +Desert Stone=Dezerta Ŝtono +Desert Cobblestone=Dezerta Pavimŝtono +Desert Stone Brick=Dezerta Ŝtona Briko +Desert Stone Block=Dezerta Ŝtona Ŝtipo +Sandstone=Sablaŝtono +Sandstone Brick=Sablaŝtono Briko +Sandstone Block=Sablaŝtono Ŝtipo +Desert Sandstone=Dezerta Sablaŝtono +Desert Sandstone Brick=Dezerta Sablaŝtono Briko +Desert Sandstone Block=Dezerta Sablaŝtono Ŝtipo +Silver Sandstone=Arĝenta Sablaŝtono +Silver Sandstone Brick=Arĝenta Sablaŝtono Briko +Silver Sandstone Block=Arĝenta Sablaŝtono Ŝtipo +Obsidian=Obsidiano +Obsidian Brick=Obsidiana Briko +Obsidian Block=Obsidiana Ŝtipo +Dirt=Tero +Dirt with Grass=Tero kun Herbo +Dirt with Grass and Footsteps=Tero kun Herbo kaj Piedpaŝoj +Dirt with Savanna Grass=Tero kun Savana Herbo +Dirt with Snow=Tero kun Neĝo +Dirt with Rainforest Litter=Tero kun Pluvarbara Folioj +Dirt with Coniferous Litter=Tero kun Konifera Folioj +Savanna Dirt=Savana Tero +Savanna Dirt with Savanna Grass=Savana Tero kun Savana Herbo +Permafrost=Ĉiamfrosto +Permafrost with Stones=Ĉiamfrosto kun Ŝtonoj +Permafrost with Moss=Ĉiamfrosto kun Musko +Sand=Sablo +Desert Sand=Dezerta Sablo +Silver Sand=Arĝenta Sablo +Gravel=Gruzo +Clay=Argilo +Snow=Neĝo +Snow Block=Neĝa Ŝtipo +Ice=Glacio +Cave Ice=Kaverna Glacio +Apple Tree=Poma Arbo +Apple Wood Planks=Poma Ligna Tabuloj +Apple Tree Sapling=Poma Arba Arbido +Apple Tree Leaves=Poma Arba Folioj +Apple=Pomo +Apple Marker=Poma Marko +Jungle Tree=Ĝangala Arbo +Jungle Wood Planks=Ĝangala Ligna Tabuloj +Jungle Tree Leaves=Ĝangala Arba Folioj +Jungle Tree Sapling=Ĝangala Arba Arbido +Emergent Jungle Tree Sapling=Nova Ĝangala Arba Arbido +Pine Tree=Pina Arbo +Pine Wood Planks=Pina Ligna Tabuloj +Pine Needles=Pinpingloj +Pine Tree Sapling=Pina Arba Arbido +Acacia Tree=Akacia Arbo +Acacia Wood Planks=Akacia Ligna Tabuloj +Acacia Tree Leaves=Akacia Arba Folioj +Acacia Tree Sapling=Akacia Arba Arbido +Aspen Tree=Tremola Arba +Aspen Wood Planks=Tremola Ligna Tabuloj +Aspen Tree Leaves=Tremola Arbo Folioj +Aspen Tree Sapling=Tremola Arba Arbido +Coal Ore=Karba Minaĵo +Coal Block=Karba Ŝtipo +Iron Ore=Fera Minaĵo +Steel Block=Ŝtala Ŝtipo +Copper Ore=Kupra Minaĵo +Copper Block=Kupra Ŝtipo +Tin Ore=Stana Minaĵo +Tin Block=Stana Ŝtipo +Bronze Block=Bronza Ŝtipo +Mese Ore=Mesea Minaĵo +Mese Block=Mesea Ŝtipo +Gold Ore=Ora Minaĵo +Gold Block=Ora Ŝtipo +Diamond Ore=Diamanta Minaĵo +Diamond Block=Diamanta Ŝtipo +Cactus=Kakto +Large Cactus Seedling=Granda Kakta Kreskaĵo +Papyrus=Papiruso +Dry Shrub=Seka Arbetaĵo +Jungle Grass=Ĝangala Herbo +Grass=Herbo +Savanna Grass=Savana Herbo +Fern=Filiko +Marram Grass=Amofilo +Bush Stem=Arbateĵa Tubo +Bush Leaves=Arbateĵa Folioj +Bush Sapling=Arbateĵa Arbido +Blueberry Bush Leaves with Berries=Mirtela Arbateĵa Folioj kaj Beroj +Blueberry Bush Leaves=Mirtela Arbateĵa Folioj +Blueberry Bush Sapling=Mirtela Arbateĵa Arbido +Acacia Bush Stem=Akacia Arbateĵa Tubo +Acacia Bush Leaves=Akacia Arbateĵa Folioj +Acacia Bush Sapling=Akacia Arbateĵa Arbido +Pine Bush Stem=Pina Arbateĵa Tubo +Pine Bush Needles=Pina Arbateĵa Pingloj +Pine Bush Sapling=Pina Arbateĵa Arbido +Kelp=Fuko +Green Coral=Verda Koralo +Pink Coral=Rozkolora Koralo +Cyan Coral=Bluverda Koralo +Brown Coral=Bruna Koralo +Orange Coral=Oranĝa Koralo +Coral Skeleton=Korala Framo +Water Source=Akva Fonto +Flowing Water=Flua Akvo +River Water Source=Rivera Akva Fonto +Flowing River Water=Flua Rivera Akvo +Lava Source=Lafa Fonto +Flowing Lava=Flua Lafa +Empty Bookshelf=Malplena Librobreto +Bookshelf (@1 written, @2 empty books)=Librobreto (@1 skriba, @2 malplena libroj) +Bookshelf=Librobreto +Text too long=Teksto estas ekscesa longo +Wooden Sign=Ligna Signo +Steel Sign=Ŝtala Signo +Wooden Ladder=Ligna Ŝtupetaro +Steel Ladder=Ŝtala Ŝtupetaro +Apple Wood Fence=Poma Ligna Barilo +Acacia Wood Fence=Akacia Ligna Barilo +Jungle Wood Fence=Ĝangala Ligna Barilo +Pine Wood Fence=Pina Ligna Barilo +Aspen Wood Fence=Tremola Ligna Barilo +Apple Wood Fence Rail=Poma Ligna Barila Relo +Acacia Wood Fence Rail=Akacia Ligna Barila Relo +Jungle Wood Fence Rail=Ĝangala Ligna Barila Relo +Pine Wood Fence Rail=Pina Ligna Barila Relo +Aspen Wood Fence Rail=Tremola Ligna Barila Relo +Glass=Vitro +Obsidian Glass=Obsidiana Vitro +Brick Block=Brika Ŝtipo +Mese Lamp=Mesea Lampo +Mese Post Light=Mesea Fosta Lampo +Cloud=Nubo +@1 will intersect protection on growth.=@1 sekcos protekto ĉe vegeto. +Torch=Torĉo +Wooden Pickaxe=Ligna Pioĉo +Stone Pickaxe=Ŝtona Pioĉo +Bronze Pickaxe=Bronza Pioĉo +Steel Pickaxe=Ŝtala Pioĉo +Mese Pickaxe=Mesea Pioĉo +Diamond Pickaxe=Diamanta Pioĉo +Wooden Shovel=Ligna Fosilo +Stone Shovel=Ŝtona Fosilo +Bronze Shovel=Bronza Fosilo +Steel Shovel=Ŝtala Fosilo +Mese Shovel=Mesea Fosilo +Diamond Shovel=Diamanta Fosilo +Wooden Axe=Ligna Hakilo +Stone Axe=Ŝtona Hakilo +Bronze Axe=Bronza Hakilo +Steel Axe=Ŝtala Hakilo +Mese Axe=Mesea Hakilo +Diamond Axe=Diamanta Hakilo +Wooden Sword=Ligna Glavo +Stone Sword=Ŝtona Glavo +Bronze Sword=Bronza Glavo +Steel Sword=Ŝtala Glavo +Mese Sword=Mesea Glavo +Diamond Sword=Diamanta Glavo +Key=Ŝlosilo +Furnace is empty=Forno estas malplena +100% (output full)=100% (eligo estas plena) +@1%=@1% +Not cookable=Ne povas kuiri +Empty=Malplena +Furnace active=Forno laboras +Furnace inactive=Forno ne laboras +(Item: @1; Fuel: @2)=(Objekto: @1; Brulaĵo: @2) +Furnace=Forno +Title:=Titolo +Contents:=Entenaĵo +Save=Konservu +by @1=per @1 +Page @1 of @2=Paĝo @1 el @2 +"@1"="@1" +"@1" by @2="@1" per @2 +Skeleton Key=Skeleta Ŝlosilo +Key to @1's @2=Ŝlosilo por la @2 de @1 +Blueberries=Mirteloj +Book=Libro +Book with Text=Libro kun Teksto +Bronze Ingot=Bronza Ingoto +Clay Brick=Argila Briko +Clay Lump=Argila Bulo +Coal Lump=Karba Bulo +Copper Ingot=Kupra Ingoto +Copper Lump=Kupra Bulo +Diamond=Diamanto +Flint=Siliko +Gold Ingot=Ora Ingoto +Gold Lump=Ora Bulo +Iron Lump=Fera Bulo +Mese Crystal=Mesea Kristalo +Mese Crystal Fragment=Mesea Kristala Ero +Obsidian Shard=Obsidiana Peceto +Paper=Papero +Steel Ingot=Ŝtala Ingoto +Stick=Bastono +Tin Ingot=Stana Ingoto +Tin Lump=Stana Bulo +Locked Chest=Ŝlosita Kesto +Locked Chest (owned by @1)=Ŝlosita Kesto (de @1) +You do not own this chest.=Vi ne posedas ĉi tiu keston. +a locked chest=ŝlosita kesto +Chest=Kesto diff --git a/mods/minetest_game/default/locale/default.es.tr b/mods/minetest_game/default/locale/default.es.tr new file mode 100644 index 0000000..35f30b3 --- /dev/null +++ b/mods/minetest_game/default/locale/default.es.tr @@ -0,0 +1,225 @@ +# textdomain: default + +Locked Chest=Cofre cerrado +Locked Chest (owned by @1)=Cofre cerrado (propiedad de @1) +You do not own this chest.=Este cofre no te pertenece. +a locked chest=un cofre cerrado +Chest=Cofre +Title:=Título: +Contents:=Contenidos: +Save=Guardar +by @1=por @1 +Page @1 of @2=Página @1 de @2 +"@1" by @2="@1" por @2 +Skeleton Key=Llave esqueleto +Key to @1's @2=Llave para @2 de @1 +Blueberries=Arándanos +Book=Libro +Book with Text=Libro escrito +Bronze Ingot=Lingote de bronce +Clay Brick=Ladrillo de arcilla +Clay Lump=Bola de arcilla +Coal Lump=Carbón +Copper Ingot=Lingote de cobre +Copper Lump=Pepita de cobre +Diamond=Diamante +Flint=Pedernal +Gold Ingot=Lingote de oro +Gold Lump=Pepita de oro +Iron Lump=Pepita de hierro +Mese Crystal=Cristal de mese +Mese Crystal Fragment=Fragmento de cristal de mese +Obsidian Shard=Esquirla de obsidiana +Paper=Papel +Steel Ingot=Lingote de acero +Stick=Palo +Tin Ingot=Lingote de estaño +Tin Lump=Pepita de estaño +Furnace is empty=El horno está vacío +100% (output full)=100% (salida completa) +@1%=@1% +Not cookable=No se puede cocinar +Empty=Vacío +Furnace active=Horno activado +Furnace inactive=Horno desactivado +(Item: @1; Fuel: @2)=(Objeto: @1; Combustible: @2) +Furnace=Horno +Stone=Piedra +Cobblestone=Adoquín +Stone Brick=Ladrillo de piedra +Stone Block=Bloque de piedra +Mossy Cobblestone=Adoquín musgoso +Desert Stone=Piedra desértica +Desert Cobblestone=Adoquín desértico +Desert Stone Brick=Ladrillo de piedra desértica +Desert Stone Block=Bloque de piedra desértica +Sandstone=Piedra arenisca +Sandstone Brick=Ladrillo de arenisca +Sandstone Block=Bloque de arenisca +Desert Sandstone=Piedra arenisca desértica +Desert Sandstone Brick=Ladrillo de arenisca desértica +Desert Sandstone Block=Bloque de arenisca deśertica +Silver Sandstone=Piedra arenisca plateada +Silver Sandstone Brick=Ladrillo de arenisca plateada +Silver Sandstone Block=Bloque de arenisca plateada +Obsidian=Obsidiana +Obsidian Brick=Ladrillo de obsidiana +Obsidian Block=Bloque de obsidiana +Dirt=Tierra +Dirt with Grass=Tierra con pasto +Dirt with Grass and Footsteps=Tierra con pasto y pisadas +Dirt with Savanna Grass=Tierra con pasto de sabana +Dirt with Snow=Tierra con nieve +Dirt with Rainforest Litter=Tierra con hojarasca de selva tropical +Dirt with Coniferous Litter=Tierra con hojarasca de coníferas +Savanna Dirt=Tierra de sabana +Savanna Dirt with Savanna Grass=Tierra de sabana con pasto de sabana +Permafrost=Permafrost +Permafrost with Stones=Permafrost pedregoso +Permafrost with Moss=Permafrost musgoso +Sand=Arena +Desert Sand=Arena desértica +Silver Sand=Arena plateada +Gravel=Grava +Clay=Arcilla +Snow=Nieve +Snow Block=Bloque de nieve +Ice=Hielo +Cave Ice=Hielo de cueva +Apple Tree=Madera de manzano +Apple Wood Planks=Tablas de manzano +Apple Tree Sapling=Retoño de manzano +Apple Tree Leaves=Hojas de manzano +Apple=Manzana +Apple Marker=Marcador de manzano +Jungle Tree=Madera de árbol tropical +Jungle Wood Planks=Tablas de madera tropical +Jungle Tree Leaves=Hojas de árbol tropical +Jungle Tree Sapling=Retoño de árbol tropical +Emergent Jungle Tree Sapling=Retoño de árbol tropical +Pine Tree=Madera de pino +Pine Wood Planks=Tablas de pino +Pine Needles=Agujas de pino +Pine Tree Sapling=Retoño de pino +Acacia Tree=Madera de acacia +Acacia Wood Planks=Tablas de acacia +Acacia Tree Leaves=Hojas de acacia +Acacia Tree Sapling=Retoño de acacia +Aspen Tree=Madera de álamo +Aspen Wood Planks=Tablas de álamo +Aspen Tree Leaves=Hojas de álamo +Aspen Tree Sapling=Retoño de álamo +Coal Ore=Mineral de carbón +Coal Block=Bloque de carbón +Iron Ore=Mineral de hierro +Steel Block=Bloque de acero +Copper Ore=Mineral de cobre +Copper Block=Bloque de cobre +Tin Ore=Mineral de estaño +Tin Block=Bloque de estaño +Bronze Block=Bloque de bronce +Mese Ore=Mineral de mese +Mese Block=Bloque de mese +Gold Ore=Mineral de oro +Gold Block=Bloque de oro +Diamond Ore=Mineral de diamante +Diamond Block=Bloque de diamante +Cactus=Cáctus +Large Cactus Seedling=Vástago grande de cactus +Papyrus=Papiro +Dry Shrub=Arbusto seco +Jungle Grass=Pasto de jungla +Grass=Pasto +Savanna Grass=Pasto de sabana +Fern=Helecho +Marram Grass=Carrizo +Bush Stem=Tallo de arbusto +Bush Leaves=Hojas de arbusto +Bush Sapling=Retoño de arbusto +Blueberry Bush Leaves with Berries=Hojas de arbusto de arándano con bayas +Blueberry Bush Leaves=Hojas de arbusto de arándano +Blueberry Bush Sapling=Retoño de arbusto de arándano +Acacia Bush Stem=Tallo de arbusto de acacia +Acacia Bush Leaves=Hojas de arbusto de acacia +Acacia Bush Sapling=Retoño de arbusto de acacia +Pine Bush Stem=Tallo de arbusto de pino +Pine Bush Needles=Agujas de arbusto de pino +Pine Bush Sapling=Retoño de arbusto de pino +Kelp=Alga marina +Green Coral=Coral verde +Pink Coral=Coral rosa +Cyan Coral=Coral cián +Brown Coral=Coral café +Orange Coral=Coral naranja +Coral Skeleton=Esqueleto de coral +Water Source=Fuente de agua +Flowing Water=Fluído de agua +River Water Source=Fuente de agua de río +Flowing River Water=Fluído de agua de río +Lava Source=Fuente de lava +Flowing Lava=Fluído de lava +Empty Bookshelf=Librería vacía +Bookshelf (@1 written, @2 empty books)=Librería(@1 escritos, @2 libros en blanco) +Bookshelf=Librería +Text too long=Texto demasiado largo +"@1"="@1" +Wooden Sign=Cartel de madera +Steel Sign=Cartel de acero +Wooden Ladder=Escalera de madera +Steel Ladder=Escalera de acero +Apple Wood Fence=Cerca de manzano +Acacia Wood Fence=Cerca de acacia +Jungle Wood Fence=Cerca de madera tropical +Pine Wood Fence=Cerca de pino +Aspen Wood Fence=Cerca de álamo +Apple Wood Fence Rail=Listones de manzano para cerca +Acacia Wood Fence Rail=Listones de acacia para cerca +Jungle Wood Fence Rail=Listones de madera tropical para cerca +Pine Wood Fence Rail=Listones de pino para cerca +Aspen Wood Fence Rail=Listones de álamo para cerca +Glass=Vidrio +Obsidian Glass=Vidrio de obsidiana +Brick Block=Bloque de ladrillo +Mese Lamp=Lámpara de mese +Apple Wood Mese Post Light=Poste de luz de madera de manzano +Acacia Wood Mese Post Light=Poste de luz de madera de acacia +Jungle Wood Mese Post Light=Poste de luz de madera tropical +Pine Wood Mese Post Light=Poste de luz de madera de pino +Aspen Wood Mese Post Light=Poste de luz de madera de álamo +Cloud=Nube +Wooden Pickaxe=Pico de madera +Stone Pickaxe=Pico de piedra +Bronze Pickaxe=Pico de bronce +Steel Pickaxe=Pico de acero +Mese Pickaxe=Pico de mese +Diamond Pickaxe=Pico de diamante +Wooden Shovel=Pala de madera +Stone Shovel=Pala de piedra +Bronze Shovel=Pala de bronce +Steel Shovel=Pala de acero +Mese Shovel=Pala de mese +Diamond Shovel=Pala de diamante +Wooden Axe=Hacha de madera +Stone Axe=Hacha de piedra +Bronze Axe=Hacha de bronce +Steel Axe=Hacha de acero +Mese Axe=Hacha de mese +Diamond Axe=Hacha de diamante +Wooden Sword=Espada de madera +Stone Sword=Espada de piedra +Bronze Sword=Espada de bronce +Steel Sword=Espada de acero +Mese Sword=Espada de mese +Diamond Sword=Espada de diamante +Key=Llave +Torch=Antorcha +@1 will intersect protection on growth.=@1 intersectará con protección cuando crezca. + + +##### not used anymore ##### + +Dirt with Dry Grass=Tierra con pasto seco +Dry Dirt=Tierra Seca +Dry Dirt with Dry Grass=Tierra seca con pasto seco +Dry Grass=Pasto seco +Mese Post Light=Poste de luz de mese diff --git a/mods/minetest_game/default/locale/default.fr.tr b/mods/minetest_game/default/locale/default.fr.tr new file mode 100644 index 0000000..d74cb83 --- /dev/null +++ b/mods/minetest_game/default/locale/default.fr.tr @@ -0,0 +1,224 @@ +# textdomain: default +Locked Chest=Coffre verrouillé +Locked Chest (owned by @1)=Coffre verrouillé (possédé par @1) +You do not own this chest.=Ce coffre ne vous appartient pas. +a locked chest=un coffre verrouillé +Chest=Coffre +Title:=Titre : +Contents:=Contenu : +Save=Sauvegarder +by @1=de @1 +Page @1 of @2=Page @1 sur @2 +"@1" by @2=« @1 » de @2 +Skeleton Key=Squelette +Key to @1's @2=Clé pour @2 de @1 +Blueberries=Myrtille +Book=Livre +Book with Text=Livre avec du texte +Bronze Ingot=Lingot de bronze +Clay Brick=Brique d'argile +Clay Lump=Morceau d'argile +Coal Lump=Morceau de charbon +Copper Ingot=Lingot de cuivre +Copper Lump=Morceau de cuivre +Diamond=Diamant +Flint=Silex +Gold Ingot=Lingot d'or +Gold Lump=Morceau d'or +Iron Lump=Morceau de fer +Mese Crystal=Cristal de Mese +Mese Crystal Fragment=Fragment de cristal de Mese +Obsidian Shard=Tesson d'obsidienne +Paper=Papier +Steel Ingot=Lingot d'acier +Stick=Baton +Tin Ingot=Lingot d'étain +Tin Lump=Morceau d'étain +Furnace is empty=Le four est vide +100% (output full)=100% (Sortie pleine) +@1%=@1% +Not cookable=Ne se cuit pas +Empty=Vide +Furnace active=Four actif +Furnace inactive=Four inactif +(Item: @1; Fuel: @2)=(Article: @1; Carburant: @2) +Furnace=Four +Stone=Pierre +Cobblestone=Pavé +Stone Brick=Brique de pierre +Stone Block=Bloc de pierre +Mossy Cobblestone=Pavé moussu +Desert Stone=Pierre du désert +Desert Cobblestone=Pavé de pierre du désert +Desert Stone Brick=Brique de pierre du désert +Desert Stone Block=Bloc de pierre du désert +Sandstone=Grès +Sandstone Brick=Brique de grès +Sandstone Block=Bloc de grès +Desert Sandstone=Grès du désert +Desert Sandstone Brick=Brique de grès du désert +Desert Sandstone Block=Bloc de grès du désert +Silver Sandstone=Grès argenté +Silver Sandstone Brick=Brique de grès argenté +Silver Sandstone Block=Bloc de grès argenté +Obsidian=Obsidienne +Obsidian Brick=Brique d'obsidienne +Obsidian Block=Block d'obsidienne +Dirt=Terre +Dirt with Grass=Terre avec de l'herbe +Dirt with Grass and Footsteps=Terre avec de l'herbe et des traces de pas +Dirt with Savanna Grass= +Dirt with Snow=Terre avec de la neige +Dirt with Rainforest Litter=Terre avec sol de forêt humide +Dirt with Coniferous Litter=Terre avec sol de forêt de conifère +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost=Pergélisol +Permafrost with Stones=Pergélisol avec de la pierre +Permafrost with Moss=Pergélisol avec de la mousse +Sand=Sable +Desert Sand=Sable du désert +Silver Sand=Sable argenté +Gravel=Gravier +Clay=Argile +Snow=Neige +Snow Block=Bloc de neige +Ice=Glace +Cave Ice=Glace de grotte +Apple Tree=Pommier +Apple Wood Planks=Planche de pommier +Apple Tree Sapling=Pousse de pommier +Apple Tree Leaves=Feuilles de pommier +Apple=Pomme +Apple Marker=Marqueur de pomme +Jungle Tree=Arbre de la jungle +Jungle Wood Planks=Planche d'arbre de la jungle +Jungle Tree Leaves=Feuilles d'arbre de la jungle +Jungle Tree Sapling=Pousse d'arbre de la jungle +Emergent Jungle Tree Sapling=Pousse d'arbre de la jungle émergent +Pine Tree=Pin +Pine Wood Planks=Planche de pin +Pine Needles=Aiguilles de pin +Pine Tree Sapling=Pousse de pin +Acacia Tree=Acacia +Acacia Wood Planks=Planche d'acacia +Acacia Tree Leaves=Feuilles d'acacia +Acacia Tree Sapling=Pousse d'acacia +Aspen Tree=Tremble +Aspen Wood Planks=Planche de tremble +Aspen Tree Leaves=Feuilles de tremble +Aspen Tree Sapling=Pousse de tremble +Coal Ore=Minerai de charbon +Coal Block=Bloc de charbon +Iron Ore=Bloc de fer +Steel Block=Bloc d'acier +Copper Ore=Minerai de cuivre +Copper Block=Bloc de cuivre +Tin Ore=Minerai d'étain +Tin Block=Bloc d'étain +Bronze Block=Bloc de bronze +Mese Ore=Minerai de Mese +Mese Block=Bloc de Mese +Gold Ore=Minerai d'or +Gold Block=Bloc d'or +Diamond Ore=Minerai de diamant +Diamond Block=Bloc de diamant +Cactus=Cactus +Large Cactus Seedling=Grand plan de cactus +Papyrus=Papyrus +Dry Shrub=Arbuste sec +Jungle Grass=Herbe de la jungle +Grass=Herbe +Savanna Grass= +Fern=Fougère +Marram Grass=Ammophile +Bush Stem=Tige de buisson +Bush Leaves=Feuilles de buisson +Bush Sapling=Pousse de buisson +Blueberry Bush Leaves with Berries=Buisson de myrtille avec des myrtilles +Blueberry Bush Leaves=Feuilles de buisson à myrtilles +Blueberry Bush Sapling=Pousse de buisson à myrtilles +Acacia Bush Stem=Tige de buisson d'acacia +Acacia Bush Leaves=Feuilles de buisson d'acacia +Acacia Bush Sapling=Pousses de buisson d'acacia +Pine Bush Stem=Tige de buisson de pin +Pine Bush Needles=Aiguilles de buisson de pin +Pine Bush Sapling=Pousse de buisson de pin +Kelp=Varech +Green Coral=Corail vert +Pink Coral=Corail rose +Cyan Coral=Corail cyan +Brown Coral=Corail marron +Orange Coral=Corail orange +Coral Skeleton=Squelette de corail +Water Source=Source d'eau +Flowing Water=Ecoulement d'eau +River Water Source=Source d'eau de rivière +Flowing River Water=Ecoulement d'eau de rivière +Lava Source=Source de lave +Flowing Lava=Ecoulement de lave +Empty Bookshelf=Bibliothèque vide +Bookshelf (@1 written, @2 empty books)=Bibliothèque (@1 écrits, @2 livres vides) +Bookshelf=Bibliothèque +Text too long=Texte trop longue +"@1"=« @1 » +Wooden Sign=Panneau en bois +Steel Sign=Panneau en acier +Wooden Ladder=Echelle en bois +Steel Ladder=Echelle en acier +Apple Wood Fence=Barrière de bois de pommier +Acacia Wood Fence=Barrière de bois d'acacia +Jungle Wood Fence=Barrière de bois de la jungle +Pine Wood Fence=Barrière de bois de pin +Aspen Wood Fence=Barrière de bois de tremble +Apple Wood Fence Rail=Clôture de bois de pommier +Acacia Wood Fence Rail=Clôture de bois d'acacia +Jungle Wood Fence Rail=Clôture de bois de la jungle +Pine Wood Fence Rail=Clôture de bois de pin +Aspen Wood Fence Rail=Clôture de bois de tremble +Glass=Verre +Obsidian Glass=Verre d'obsidienne +Brick Block=Bloc de brique +Mese Lamp=Lampe de Mese +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Nuage +Wooden Pickaxe=Pioche en bois +Stone Pickaxe=Pioche en pierre +Bronze Pickaxe=Pioche en bronze +Steel Pickaxe=Pioche en acier +Mese Pickaxe=Pioche de Mese +Diamond Pickaxe=Pioche en diamant +Wooden Shovel=Pelle en bois +Stone Shovel=Pelle en pierre +Bronze Shovel=Pelle en bronze +Steel Shovel=Pelle en acier +Mese Shovel=Pelle en Mese +Diamond Shovel=Pelle en diamant +Wooden Axe=Hache en bois +Stone Axe=Hache en pierre +Bronze Axe=Hache en bronze +Steel Axe=Hache en acier +Mese Axe=Hache en Mese +Diamond Axe=Hache en diamant +Wooden Sword=Epée en bois +Stone Sword=Epée en pierre +Bronze Sword=Epée en bronze +Steel Sword=Epée en acier +Mese Sword=Epée en Mese +Diamond Sword=Epée en diamant +Key=Clé +Torch=Torche +@1 will intersect protection on growth.=@1 chevauchera la zone protégée avec la croissance. + + +##### not used anymore ##### + +Dirt with Dry Grass=Terre avec de l'herbe sèche +Dry Dirt=Terre sèche +Dry Dirt with Dry Grass=Terre sèche avec de l'herbe sèche +Dry Grass=Herbe sèche +Mese Post Light=Réverbère de Mese diff --git a/mods/minetest_game/default/locale/default.id.tr b/mods/minetest_game/default/locale/default.id.tr new file mode 100644 index 0000000..658f074 --- /dev/null +++ b/mods/minetest_game/default/locale/default.id.tr @@ -0,0 +1,220 @@ +# textdomain: default +Locked Chest=Peti Terkunci +Locked Chest (owned by @1)=Peti Terkunci (milik @1) +You do not own this chest.=Anda bukan pemilik peti ini. +a locked chest=peti terkunci +Chest=Peti +Title:=Judul: +Contents:=Isi: +Save=Simpan +by @1=oleh @1 +Page @1 of @2=Halaman @1 dari @2 +"@1" by @2="@1" oleh @2 +Skeleton Key=Kunci Induk +Key to @1's @2=Kunci @2 milik @1 +Blueberries=Blueberry +Book=Buku +Book with Text=Buku Tertulis +Bronze Ingot=Perunggu Batangan +Clay Brick=Bata +Clay Lump=Bongkahan Tanah Liat +Coal Lump=Bongkahan Batu Bara +Copper Ingot=Tembaga Batangan +Copper Lump=Bongkahan Tembaga +Diamond=Berlian +Flint=Batu Api +Gold Ingot=Emas Batangan +Gold Lump=Bongkahan Emas +Iron Lump=Bongkahan Besi +Mese Crystal=Kristal Mese +Mese Crystal Fragment=Pecahan Kristal Mese +Obsidian Shard=Pecahan Obsidian +Paper=Kertas +Steel Ingot=Baja Batangan +Stick=Tongkat +Tin Ingot=Timah Batangan +Tin Lump=Bongkahan Timah +Furnace is empty=Tungku kosong +100% (output full)=100% (keluaran penuh) +@1%=@1% +Not cookable=Tidak dapat dimasak +Empty=Kosong +Furnace active=Tungku nyala +Furnace inactive=Tungku mati +(Item: @1; Fuel: @2)=(Barang: @1; Bahan Bakar: @2) +Furnace=Tungku +Stone=Batu +Cobblestone=Bongkahan Batu +Stone Brick=Tembok Batu +Stone Block=Balok Batu +Mossy Cobblestone=Bongkahan Batu Berlumut +Desert Stone=Batu Gurun +Desert Cobblestone=Bongkahan Batu Gurun +Desert Stone Brick=Tembok Batu Gurun +Desert Stone Block=Balok Batu Gurun +Sandstone=Batu Pasir +Sandstone Brick=Tembok Batu Pasir +Sandstone Block=Balok Batu Pasir +Desert Sandstone=Batu Pasir Gurun +Desert Sandstone Brick=Tembok Batu Pasir Gurun +Desert Sandstone Block=Balok Batu Pasir Gurun +Silver Sandstone=Batu Pasir Perak +Silver Sandstone Brick=Tembok Batu Pasir Perak +Silver Sandstone Block=Balok Batu Pasir Perak +Obsidian=Obsidian +Obsidian Brick=Tembok Obsidian +Obsidian Block=Balok Obsidian +Dirt=Tanah +Dirt with Grass=Tanah Berumput +Dirt with Grass and Footsteps=Tanah Berumput dengan Jejak Kaki +Dirt with Savanna Grass=Tanah Berumput Sabana +Dirt with Snow=Tanah Bersalju +Dirt with Rainforest Litter=Tanah Berserasah Hutan Hujan +Dirt with Coniferous Litter=Tanah Berserasah Hutan Konifer +Savanna Dirt=Tanah Sabana +Savanna Dirt with Savanna Grass=Tanah Sabana Berumput Sabana +Permafrost=Ibun Abadi +Permafrost with Stones=Ibun Abadi Berbatu +Permafrost with Moss=Ibun Abadi Berlumut +Sand=Pasir +Desert Sand=Pasir Gurun +Silver Sand=Pasir Perak +Gravel=Kerikil +Clay=Tanah Liat +Snow=Salju +Snow Block=Balok Salju +Ice=Es +Cave Ice=Gua Es +Apple Tree=Pohon Apel +Apple Wood Planks=Papan Kayu Pohon Apel +Apple Tree Sapling=Anak Pohon Apel +Apple Tree Leaves=Daun Pohon Apel +Apple=Apel +Apple Marker=Penanda Apel +Jungle Tree=Pohon Hutan Rimba +Jungle Wood Planks=Papan Kayu Pohon Rimba +Jungle Tree Leaves=Daun Pohon Rimba +Jungle Tree Sapling=Anak Pohon Rimba +Emergent Jungle Tree Sapling=Anak Pohon Rimba Bertumbuh +Pine Tree=Pohon Pinus +Pine Wood Planks=Papan Kayu Pinus +Pine Needles=Daun Pinus +Pine Tree Sapling=Anak Pohon Pinus +Acacia Tree=Pohon Akasia +Acacia Wood Planks=Papan Kayu Akasia +Acacia Tree Leaves=Daun Akasia +Acacia Tree Sapling=Anak Pohon Akasia +Aspen Tree=Pohon Aspen +Aspen Wood Planks=Papan Kayu Aspen +Aspen Tree Leaves=Daun Aspen +Aspen Tree Sapling=Anak Pohon Aspen +Coal Ore=Bijih Batu Bara +Coal Block=Balok Batu Bara +Iron Ore=Bijih Besi +Steel Block=Balok Baja +Copper Ore=Bijih Tembaga +Copper Block=Balok Tembaga +Tin Ore=Bijih Timah +Tin Block=Balok Timah +Bronze Block=Balok Perunggu +Mese Ore=Bijih Mese +Mese Block=Balok Mese +Gold Ore=Bijih Emas +Gold Block=Balok Emas +Diamond Ore=Bijih Berlian +Diamond Block=Balok Berlian +Cactus=Kaktus +Large Cactus Seedling=Bibit Kaktus Besar +Papyrus=Papirus +Dry Shrub=Semak Kering +Jungle Grass=Rumput Rimba +Grass=Rumput +Savanna Grass=Rumput Sabana +Fern=Pakis +Marram Grass=Rumput Maram +Bush Stem=Batang Semak +Bush Leaves=Daun Semak +Bush Sapling=Anak Semak +Blueberry Bush Leaves with Berries=Daun Semak Blueberry Berbuah +Blueberry Bush Leaves=Daun Semak Blueberry +Blueberry Bush Sapling=Anak Semak Blueberry +Acacia Bush Stem=Batang Semak Akasia +Acacia Bush Leaves=Daun Semak Akasia +Acacia Bush Sapling=Bibit Semak Akasia +Pine Bush Stem=Batang Semak Pinus +Pine Bush Needles=Daun Semak Pinus +Pine Bush Sapling=Bibit Semak Pinus +Kelp=Kelp +Green Coral=Koral Hijau +Pink Coral=Koral Jambon +Cyan Coral=Koral Sian +Brown Coral=Koral Cokelat +Orange Coral=Koral Oranye +Coral Skeleton=Kerangka Koral +Water Source=Mata Air +Flowing Water=Aliran Air +River Water Source=Mata Air Sungai +Flowing River Water=Aliran Air Sungai +Lava Source=Sumber Lava +Flowing Lava=Aliran Lava +Empty Bookshelf=Rak Buku Kosong +Bookshelf (@1 written, @2 empty books)=Rak Buku (@1 buku tertulis, @2 buku kosong) +Bookshelf=Rak Buku +Text too long=Teks terlalu panjang +"@1"="@1" +Wooden Sign=Penanda Kayu +Steel Sign=Penanda Baja +Wooden Ladder=Tangga Kayu +Steel Ladder=Tangga Baja +Apple Wood Fence=Pagar Kayu Apel +Acacia Wood Fence=Pagar Akasia +Jungle Wood Fence=Pagar Kayu Rimba +Pine Wood Fence=Pagar Pinus +Aspen Wood Fence=Pagar Aspen +Apple Wood Fence Rail=Rel Pagar Kayu Apel +Acacia Wood Fence Rail=Rel Pagar Akasia +Jungle Wood Fence Rail=Rel Pagar Kayu Rimba +Pine Wood Fence Rail=Rel Pagar Pinus +Aspen Wood Fence Rail=Rel Pagar Aspen +Glass=Kaca +Obsidian Glass=Kaca Obsidian +Brick Block=Balok Bata +Mese Lamp=Lampu Mese +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Awan +Wooden Pickaxe=Gancu Kayu +Stone Pickaxe=Gancu Batu +Bronze Pickaxe=Gancu Perunggu +Steel Pickaxe=Gancu Baja +Mese Pickaxe=Gancu Mese +Diamond Pickaxe=Gancu Berlian +Wooden Shovel=Sekop Kayu +Stone Shovel=Sekop Batu +Bronze Shovel=Sekop Perunggu +Steel Shovel=Sekop Baja +Mese Shovel=Sekop Mese +Diamond Shovel=Sekop Berlian +Wooden Axe=Kapak Kayu +Stone Axe=Kapak Batu +Bronze Axe=Kapak Perunggu +Steel Axe=Kapak Baja +Mese Axe=Kapak Mese +Diamond Axe=Kapak Berlian +Wooden Sword=Pedang Kayu +Stone Sword=Pedang Batu +Bronze Sword=Pedang Perunggu +Steel Sword=Pedang Baja +Mese Sword=Pedang Mese +Diamond Sword=Pedang Berlian +Key=Kunci +Torch=Obor +@1 will intersect protection on growth.=@1 akan memotong perlindungan ketika tumbuh. + + +##### not used anymore ##### + +Mese Post Light=Lampu Taman Mese diff --git a/mods/minetest_game/default/locale/default.it.tr b/mods/minetest_game/default/locale/default.it.tr new file mode 100644 index 0000000..92029d6 --- /dev/null +++ b/mods/minetest_game/default/locale/default.it.tr @@ -0,0 +1,224 @@ +# textdomain: default +Locked Chest=Baule chiuso a chiave +Locked Chest (owned by @1)=Baule chiuso a chiave (di proprietà di @1) +You do not own this chest.=Questo baule non ti appartiene. +a locked chest=un baule chiuso a chiave +Chest=Baule +Title:= +Contents:= +Save= +by @1= +Page @1 of @2= +"@1" by @2="@1" di @2 +Skeleton Key=Chiave dello Scheletro +Key to @1's @2=Chiave per @2 di @1 +Blueberries=Mirtilli +Book=Libro +Book with Text=Libro con testo +Bronze Ingot=Lingotto di bronzo +Clay Brick=Mattone d'argilla +Clay Lump=Grumo d'argilla +Coal Lump=Grumo di carbone +Copper Ingot=Lingotto di rame +Copper Lump=Grumo di rame +Diamond=Diamante +Flint=Selce +Gold Ingot=Lingotto d'oro +Gold Lump=Grumo d'oro +Iron Lump=Grumo di ferro +Mese Crystal=Cristallo di mese +Mese Crystal Fragment=Frammento di cristallo di mese +Obsidian Shard=Scheggia d'ossidiana +Paper=Carta +Steel Ingot=Lingotto d'acciaio +Stick=Bastone +Tin Ingot=Lingotto di stagno +Tin Lump=Grumo di stagno +Furnace is empty=La fornace è vuota +100% (output full)=100% (uscita piena) +@1%=@1% +Not cookable=Non cucinabile +Empty=Vuota +Furnace active=Fornace attiva +Furnace inactive=Fornace inattiva +(Item: @1; Fuel: @2)=(Oggetto: @1; Combustibile: @2) +Furnace=Fornace +Stone=Pietra +Cobblestone=Ciottoli +Stone Brick=Mattone di pietra +Stone Block=Blocco di pietra +Mossy Cobblestone=Ciottoli muschiosi +Desert Stone=Pietra del deserto +Desert Cobblestone=Ciottoli del deserto +Desert Stone Brick=Mattone di pietra del deserto +Desert Stone Block=Blocco di pietra del deserto +Sandstone=Arenaria +Sandstone Brick=Mattone d'arenaria +Sandstone Block=Blocco d'arenaria +Desert Sandstone=Arenaria del deserto +Desert Sandstone Brick=Mattone d'arenaria del deserto +Desert Sandstone Block=Blocco d'arenaria del deserto +Silver Sandstone=Arenaria argentata +Silver Sandstone Brick=Mattone d'arenaria argentata +Silver Sandstone Block=Blocco d'arenaria argentata +Obsidian=Ossidiana +Obsidian Brick=Mattone d'ossidiana +Obsidian Block=Blocco d'ossidiana +Dirt=Terra +Dirt with Grass=Terra con erba +Dirt with Grass and Footsteps=Terra con erba e impronte +Dirt with Savanna Grass= +Dirt with Snow=Terra con neve +Dirt with Rainforest Litter=Terra con detriti della foresta pluviale +Dirt with Coniferous Litter=Terra con detriti di conifera +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost=Permafrost +Permafrost with Stones=Permafrost con pietra +Permafrost with Moss=Permafrost con muschio +Sand=Sabbia +Desert Sand=Sabbia del deserto +Silver Sand=Sabbia argentata +Gravel=Ghiaia +Clay=Argilla +Snow=Neve +Snow Block=Blocco di neve +Ice=Ghiaccio +Cave Ice=Ghiaccio di caverna +Apple Tree=Melo +Apple Wood Planks=Assi di melo +Apple Tree Sapling=Alberello di melo +Apple Tree Leaves=Foglie di melo +Apple=Mela +Apple Marker=Marcatore mela +Jungle Tree=Albero della giungla +Jungle Wood Planks=Assi di legno della giungla +Jungle Tree Leaves=Foglie di albero della giungla +Jungle Tree Sapling=Alberello della giungla +Emergent Jungle Tree Sapling=Alberello della giungla emergente +Pine Tree=Pino +Pine Wood Planks=Assi di legno di pino +Pine Needles=Aghi di pino +Pine Tree Sapling=Alberello di pino +Acacia Tree=Acacia +Acacia Wood Planks=Assi di legno d'acacia +Acacia Tree Leaves=Foglie d'acacia +Acacia Tree Sapling=Alberello d'acacia +Aspen Tree=Pioppo +Aspen Wood Planks=Assi di legno di pioppo +Aspen Tree Leaves=Foglie di pioppo +Aspen Tree Sapling=Alberello di pioppo +Coal Ore=Minerale di carbone +Coal Block=Blocco di carbone +Iron Ore=Minerale di ferro +Steel Block=Blocco d'acciaio +Copper Ore=Minerale di rame +Copper Block=Blocco di rame +Tin Ore=Minerale di stagno +Tin Block=Blocco di stagno +Bronze Block=Blocco di bronzo +Mese Ore=Minerale di mese +Mese Block=Blocco di mese +Gold Ore=Minerale d'oro +Gold Block=Blocco d'oro +Diamond Ore=Minerale di diamante +Diamond Block=Blocco di diamante +Cactus=Cactus +Large Cactus Seedling=Piantina di cactus grande +Papyrus=Papiro +Dry Shrub=Arbusto secco +Jungle Grass=Erba della giungla +Grass=Erba +Savanna Grass= +Fern=Felce +Marram Grass=Ammofila arenaria +Bush Stem=Fusto di cespuglio +Bush Leaves=Foglie di cespuglio +Bush Sapling=Alberello di cespuglio +Blueberry Bush Leaves with Berries=Foglie di cespuglio di mirtilli con bacche +Blueberry Bush Leaves=Foglie di cespuglio di mirtilli +Blueberry Bush Sapling=Alberello di cespuglio di mirtilli +Acacia Bush Stem=Fusto di cespuglio d'acacia +Acacia Bush Leaves=Foglie di cespuglio d'acacia +Acacia Bush Sapling=Alberello di cespuglio d'acacia +Pine Bush Stem=Fusto di cespuglio di pino +Pine Bush Needles=Aghi di cespuglio di pino +Pine Bush Sapling=Alberello di cespuglio di pino +Kelp=Alga +Green Coral=Corallo verde +Pink Coral=Corallo rosa +Cyan Coral=Corallo ciano +Brown Coral=Corallo marrone +Orange Coral=Corallo arancione +Coral Skeleton=Scheletro di corallo +Water Source=Fonte d'acqua +Flowing Water=Acqua corrente +River Water Source=Fonte d'acqua di fiume +Flowing River Water=Acqua corrente di fiume +Lava Source=Fonte di lava +Flowing Lava=Lava corrente +Empty Bookshelf=Libreria vuota +Bookshelf (@1 written, @2 empty books)=Libreria (@1 scritti, @2 vuoti) +Bookshelf=Libreria +Text too long=Testo troppo lungo +"@1"= +Wooden Sign=Cartello di legno +Steel Sign=Cartello d'acciaio +Wooden Ladder=Scala a pioli di legno +Steel Ladder=Scala a pioli d'acciaio +Apple Wood Fence=Recinzione di legno di melo +Acacia Wood Fence=Recinzione di legno d'acacia +Jungle Wood Fence=Recinzione di legno della giungla +Pine Wood Fence=Recinzione di legno di pino +Aspen Wood Fence=Recinzione di legno di pioppo +Apple Wood Fence Rail=Ringhiera della recinzione di legno di melo +Acacia Wood Fence Rail=Ringhiera della recinzione di legno d'acacia +Jungle Wood Fence Rail=Ringhiera della recinzione di legno della giungla +Pine Wood Fence Rail=Ringhiera della recinzione di legno di pino +Aspen Wood Fence Rail=Ringhiera della recinzione di legno di pioppo +Glass=Vetro +Obsidian Glass=Vetro d'ossidiana +Brick Block=Blocco di mattone +Mese Lamp=Lampada di mese +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Nuvola +Wooden Pickaxe=Piccone di legno +Stone Pickaxe=Piccone di pietra +Bronze Pickaxe=Piccone di bronzo +Steel Pickaxe=Piccone d'acciaio +Mese Pickaxe=Piccone di mese +Diamond Pickaxe=Piccone di diamante +Wooden Shovel=Pala di legno +Stone Shovel=Pala di pietra +Bronze Shovel=Pala di bronzo +Steel Shovel=Pala d'acciaio +Mese Shovel=Pala di mese +Diamond Shovel=Pala di diamante +Wooden Axe=Ascia di legno +Stone Axe=Ascia di pietra +Bronze Axe=Ascia di bronzo +Steel Axe=Ascia d'acciaio +Mese Axe=Ascia di mese +Diamond Axe=Ascia di diamante +Wooden Sword=Spada di legno +Stone Sword=Spada di pietra +Bronze Sword=Spada di bronzo +Steel Sword=Spada d'acciaio +Mese Sword=Spada di mese +Diamond Sword=Spada di diamante +Key=Chiave +Torch=Torcia +@1 will intersect protection on growth.=@1 crescendo attraverserà la protezione. + + +##### not used anymore ##### + +Dirt with Dry Grass=Terra con erba secca +Dry Dirt=Terra asciutta +Dry Dirt with Dry Grass=Terra asciutta con erba secca +Dry Grass=Erba secca +Mese Post Light=Lampioncino di mese diff --git a/mods/minetest_game/default/locale/default.jbo.tr b/mods/minetest_game/default/locale/default.jbo.tr new file mode 100644 index 0000000..6f3e749 --- /dev/null +++ b/mods/minetest_game/default/locale/default.jbo.tr @@ -0,0 +1,215 @@ +# textdomain: default +Locked Chest=lo selstela gairvau +Locked Chest (owned by @1)=.i ti selstela gairvau po la'o zo'i.@1.zo'i +You do not own this chest.=.i do na ponse lo ti gairvau +a locked chest=lo selstela gairvau +Chest=lo gairvau +Title:=cmene +Contents:=se cukta +Save=rejgau +by @1=la'o zo'i.@1.zo'i te cukta +Page @1 of @2=meirmoi fe li @1 li @2 le'i papri +"@1" by @2=lo cukta be la'o gy.@1.gy. bei la'o zo'i.@2.zo'i +Skeleton Key=lo greku ckiku +Key to @1's @2=lo ckiku be @2 po la'o zo'i.@1.zo'i +Blueberries=lo blajba +Book=lo cukta +Book with Text=lo cukta joi selci'a +Bronze Ingot=lo ransu manfybli +Clay Brick=lo kitybli +Clay Lump=lo kliti bakfu +Coal Lump=lo kolme bakfu +Copper Ingot=lo tunka manfybli +Copper Lump=lo tunka bakfu +Diamond=lo tabjme +Flint=lo fagyro'i +Gold Ingot=lo solji manfybli +Gold Lump=lo solji bakfu +Iron Lump=lo tirse bakfu +Mese Crystal=lo za'e krilrmese +Mese Crystal Fragment=lo za'e krilrmese spisa +Obsidian Shard=lo je'erma'ablaci spisa +Paper=lo pelji +Steel Ingot=lo gasta manfybli +Stick=lo grana +Tin Ingot=lo tinci manfybli +Tin Lump=lo tinci bakfu +Furnace is empty=.i lo toknu cu kunti +100% (output full)=100 ce'i to lo se zbasu cu culno toi +@1%=@1 ce'i +Not cookable=na kakne le ka se jukpa +Empty=ti kunti +Furnace active=.i lo toknu cu tolcando +Furnace inactive=.i lo toknu cu cando +(Item: @1; Fuel: @2)=to jukpa @1 @2 +Furnace=lo toknu +Stone=lo rokci +Cobblestone=lo lolro'iboi +Stone Brick=lo morna rokci +Stone Block=lo rokci bliku +Mossy Cobblestone=lo clika lolro'iboi +Desert Stone=lo cantu'a rokci +Desert Cobblestone=lo cantu'a lolro'iboi +Desert Stone Brick=lo morna ke cantu'a rokci +Desert Stone Block=lo cantu'a rokci bliku +Sandstone=lo canro'i +Sandstone Brick=lo morna canro'i +Sandstone Block=lo canro'i bliku +Desert Sandstone=lo cantu'a canro'i +Desert Sandstone Brick=lo morna ke cantu'a canro'i +Desert Sandstone Block=lo cantu'a canro'i bliku +Silver Sandstone=lo rijyska sanro'i +Silver Sandstone Brick=lo morna ke rijyska canro'i +Silver Sandstone Block=lo rijyska canro'i bliku +Obsidian=lo je'erma'ablaci +Obsidian Brick=lo morna je'erma'ablaci +Obsidian Block=lo je'erma'ablaci bliku +Dirt=lo dertu +Dirt with Grass=lo dertu joi srasu +Dirt with Grass and Footsteps=lo dertu joi srasu jebo stapa bo prina +Dirt with Savanna Grass=lo dertu joi sudytu'a bo srasu +Dirt with Snow=lo dertu joi snime +Dirt with Rainforest Litter=lo dertu joi glatimdemricfoi bo festi +Dirt with Coniferous Litter=lo dertu joi ckunu bo festi +Savanna Dirt=lo sudytu'a dertu +Savanna Dirt with Savanna Grass=lo sudysu'a bo dertu joi sudytu'a bo srasu +Permafrost=le bislunsa dertu +Permafrost with Stones=le bislunsa bo dertu joi rokci +Permafrost with Moss=le bislunsa bo dertu joi clika +Sand=lo canre +Desert Sand=lo cantu'a canre +Silver Sand=lo rijyska canre +Gravel=lo cmaro'i +Clay=lo kliti +Snow=lo snime +Snow Block=lo snime bliku +Ice=lo bisli +Cave Ice=lo kevzda bisli +Apple Tree=lo plisytricu ricystani +Apple Wood Planks=lo plise mudri tanbo +Apple Tree Sapling=lo plisytricu ciftricu +Apple Tree Leaves=lo plisytricu pezli +Apple=lo plise +Apple Marker=lo plise barna +Jungle Tree=lo glatimdemricfoi ricystani +Jungle Wood Planks=lo glatimdemricfoi mudri tanbo +Jungle Tree Leaves=lo glatimdemricfoi pezli +Jungle Tree Sapling=lo glatimdemricfoi ciftricu +Emergent Jungle Tree Sapling=lo barda ke glatimdemricfoi ciftricu +Pine Tree=lo ckunu ricystani +Pine Wood Planks=lo ckunu mudri tanbo +Pine Needles=lo ckunu jezpezli +Pine Tree Sapling=lo ckunu ciftricu +Acacia Tree=lo atkaci,ia ricystani +Acacia Wood Planks=lo atkaci,ia mudri tanbo +Acacia Tree Leaves=lo atkaci,ia pezli +Acacia Tree Sapling=lo atkaci,ia ciftricu +Aspen Tree=lo ricrpopulu ricystani +Aspen Wood Planks=lo mudrpopulu tanbo +Aspen Tree Leaves=lo ricrpopulu pezli +Aspen Tree Sapling=lo ricrpopulu ciftricu +Coal Ore=lo kolme kunra +Coal Block=lo kolme bliku +Iron Ore=lo tirse kunra +Steel Block=lo gasta bliku +Copper Ore=lo tunka kunra +Copper Block=lo tunka bliku +Tin Ore=lo tinci kunra +Tin Block=lo tinci bliku +Bronze Block=lo ransu bliku +Mese Ore=lo za'e kunrmese +Mese Block=lo za'e blikrmese +Gold Ore=lo solji kunra +Gold Block=lo solji bliku +Diamond Ore=lo tabjme kunra +Diamond Block=lo tabjme bliku +Cactus=lo jesyspa +Large Cactus Seedling=lo barda ke jesyspa tsiju +Papyrus=lo misryplespa +Dry Shrub=lo sudga dzitricu +Jungle Grass=lo glatimdemricfoi srasu +Grass=lo srasu +Savanna Grass=lo sudytu'a srasu +Fern=lo filcina +Marram Grass=lo xaskoi srasu +Bush Stem=lo dzitricu stani +Bush Leaves=lo dzitricu pezli +Bush Sapling=lo dzitricu ciftricu +Blueberry Bush Leaves with Berries=lo ke blajba dzitricu pezli ke'e joi jbari +Blueberry Bush Leaves=lo blajba dzitricu pezli +Blueberry Bush Sapling=lo blajba dzitrcu ciftricu +Acacia Bush Stem=lo atkaci,ia dzitricu stani +Acacia Bush Leaves=lo atkaci,ia dzitricu pezli +Acacia Bush Sapling=lo atkaci,ia dzitricu ciftricu +Pine Bush Stem=lo ckunu dzitricu stani +Pine Bush Needles=lo ckunu dzitricu jezpezli +Pine Bush Sapling=lo ckunu dzitricu ciftricu +Kelp=lo vraike +Green Coral=lo crino pevypanje +Pink Coral=lo xunblabi pevypanje +Cyan Coral=lo cicna pevypanje +Brown Coral=lo bunre pevypanje +Orange Coral=lo narju pevypanje +Coral Skeleton=lo pevypanje greku +Water Source=lo djacu velflecu +Flowing Water=lo flecu djacu +River Water Source=lo rirxe djacu velflecu +Flowing River Water=lo flecu ke rirxe djacu +Lava Source=lo likro'i velflecu +Flowing Lava=lo flecu likro'i +Empty Bookshelf=.i ti kunti ckukajna +Bookshelf (@1 written, @2 empty books)=.i ti ckukajna to @1 cukta joi selci'a .ije @2 kunti cukta toi +Bookshelf=lo ckukajna +Text too long=.i lo lerpoi cu dukse lo ka clani +"@1"=zoi sy.@1.sy. +Wooden Sign=lo mudri sinxa +Steel Sign=lo gasta sinxa +Wooden Ladder=lo mudri rajyserti +Steel Ladder=lo gasta rajyserti +Apple Wood Fence=lo plise mudri garbi'u +Acacia Wood Fence=lo atkaci,ia mudri garbi'u +Jungle Wood Fence=lo glatimdemricfoi mudri garbi'u +Pine Wood Fence=lo ckunu mudri garbi'u +Aspen Wood Fence=lo mudrpopulu garbi'u +Apple Wood Fence Rail=lo plise mudri garbi'u garna +Acacia Wood Fence Rail=lo atkaci,ia mudri garbi'u garna +Jungle Wood Fence Rail=lo glatimdemricfoi mudri garbi'u garna +Pine Wood Fence Rail=lo ckunu mudri garbi'u garna +Aspen Wood Fence Rail=lo mudrpopulu garbi'u garna +Glass=lo blaci +Obsidian Glass=lo je'erma'ablaci blaci +Brick Block=lo kitybli bliku +Mese Lamp=lo za'e kunrmese tergu'i +Apple Wood Mese Post Light=lo plise mudri za'e kunrmese ke kamju tergu'i +Acacia Wood Mese Post Light=lo atkaci,ia mudri za'e kunrmese ke kamju tergu'i +Jungle Wood Mese Post Light=lo glatimdemricfoi mudri za'e kunrmese ke kamju tergu'i +Pine Wood Mese Post Light=lo ckunu mudri za'e kunrmese ke kamju tergu'i +Aspen Wood Mese Post Light=lo mudrpopulu za'e kunrmese ke kamju tergu'i +Cloud=lo dilnu +Wooden Pickaxe=lo mudri velkakpymru +Stone Pickaxe=lo rokci velkakpymru +Bronze Pickaxe=lo ransu velkakpymru +Steel Pickaxe=lo gasta velkakpymru +Mese Pickaxe=lo za'e kunrmese velkakpymru +Diamond Pickaxe=lo tabjme velkakpymru +Wooden Shovel=lo mudri canpa +Stone Shovel=lo rokci canpa +Bronze Shovel=lo ransu canpa +Steel Shovel=lo gasta canpa +Mese Shovel=lo za'e kunrmese canpa +Diamond Shovel=lo tabjme canpa +Wooden Axe=lo mudri ka'amru +Stone Axe=lo rokci ka'amru +Bronze Axe=lo ransu ka'amru +Steel Axe=lo gasta ka'amru +Mese Axe=lo za'e kunrmese ka'amru +Diamond Axe=lo tabjme ka'amru +Wooden Sword=lo mudri cladakyxa'i +Stone Sword=lo rokci cladakyxa'i +Bronze Sword=lo ransu cladakyxa'i +Steel Sword=lo gasta cladakyxa'i +Mese Sword=lo za'e kunrmese cladakyxa'i +Diamond Sword=lo tabjme cladakyxa'i +Key=lo ckiku +Torch=lo fagytergu'i +@1 will intersect protection on growth.=.i @1 cu ba kruca lo bandu ca lo nu banro diff --git a/mods/minetest_game/default/locale/default.ms.tr b/mods/minetest_game/default/locale/default.ms.tr new file mode 100644 index 0000000..8c1ed42 --- /dev/null +++ b/mods/minetest_game/default/locale/default.ms.tr @@ -0,0 +1,224 @@ +# textdomain: default +Locked Chest=Peti Berkunci +Locked Chest (owned by @1)=Peti Berkunci (milik @1) +You do not own this chest.=Ini bukan peti milik anda. +a locked chest=peti berkunci +Chest=Peti +Title:=Tajuk: +Contents:=Kandungan: +Save=Simpan +by @1=oleh @1 +Page @1 of @2=Ms. @1 / @2 +"@1" by @2="@1" oleh @2 +Skeleton Key=Kunci Induk +Key to @1's @2=Kunci @2 milik @1 +Blueberries=Beri Biru +Book=Buku +Book with Text=Buku Bertulisan +Bronze Ingot=Jongkong Gangsa +Clay Brick=Bata Tanah Liat +Clay Lump=Longgokan Tanah Liat +Coal Lump=Longgokan Batu Arang +Copper Ingot=Jongkong Tembaga +Copper Lump=Longgokan Tembaga +Diamond=Berlian +Flint=Batu Api +Gold Ingot=Jongkong Emas +Gold Lump=Longgokan Emas +Iron Lump=Longgokan Besi +Mese Crystal=Kristal Mese +Mese Crystal Fragment=Serpihan Mese +Obsidian Shard=Serpihan Obsidia +Paper=Kertas +Steel Ingot=Jongkong Keluli +Stick=Serpihan Kayu +Tin Ingot=Jongkong Timah +Tin Lump=Longgokan Timah +Furnace is empty=Relau masih kosong +100% (output full)=100% (keluaran penuh) +@1%=@1% +Not cookable=Tidak boleh dimasak +Empty=Kosong +Furnace active=Relau aktif +Furnace inactive=Relau tidak aktif +(Item: @1; Fuel: @2)=(Item: @1; Bahan api: @2) +Furnace=Relau +Stone=Batu +Cobblestone=Batu Buntar +Stone Brick=Bata Batu +Stone Block=Bongkah Batu +Mossy Cobblestone=Batu Buntar Berlumut +Desert Stone=Batu Gurun +Desert Cobblestone=Batu Buntar Gurun +Desert Stone Brick=Bata Batu Gurun +Desert Stone Block=Bongkah Batu Gurun +Sandstone=Batu Pasir +Sandstone Brick=Bata Batu Pasir +Sandstone Block=Bongkah Batu Pasir +Desert Sandstone=Batu Pasir Gurun +Desert Sandstone Brick=Bata Batu Pasir Gurun +Desert Sandstone Block=Bongkah Batu Pasir Gurun +Silver Sandstone=Batu Pasir Perak +Silver Sandstone Brick=Bata Batu Pasir Perak +Silver Sandstone Block=Bongkah Batu Pasir Perak +Obsidian=Obsidia +Obsidian Brick=Bata Obsidia +Obsidian Block=Bongkah Obsidia +Dirt=Tanah +Dirt with Grass=Tanah Berumput +Dirt with Grass and Footsteps=Tanah Berumput dan Tapak Kaki +Dirt with Savanna Grass= +Dirt with Snow=Tanah Bersalji +Dirt with Rainforest Litter=Tanah Bersarap Hutan Hujan +Dirt with Coniferous Litter=Tanah Bersarap Hutan Konifer +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost=Ibun Abadi +Permafrost with Stones=Ibun Abadi Berbatu +Permafrost with Moss=Ibun Abadi Berlumut +Sand=Pasir +Desert Sand=Pasir Gurun +Silver Sand=Pasir Perak +Gravel=Kelikir +Clay=Tanah Liat +Snow=Salji +Snow Block=Bongkah Salji +Ice=Ais +Cave Ice=Ais Gua +Apple Tree=Kayu Pokok Epal +Apple Wood Planks=Papan Kayu Epal +Apple Tree Sapling=Anak Pokok Epal +Apple Tree Leaves=Daun Pokok Epal +Apple=Epal +Apple Marker=Penanda Epal +Jungle Tree=Kayu Pokok Hutan +Jungle Wood Planks=Papan Kayu Hutan +Jungle Tree Leaves=Daun Pokok Hutan +Jungle Tree Sapling=Anak Pokok Hutan +Emergent Jungle Tree Sapling=Anak Pokok Hutan Kembang +Pine Tree=Kayu Pokok Pain +Pine Wood Planks=Papan Kayu Pain +Pine Needles=Daun Pokok Pain +Pine Tree Sapling=Anak Pokok Pain +Acacia Tree=Kayu Pokok Akasia +Acacia Wood Planks=Papan Kayu Akasia +Acacia Tree Leaves=Daun Pokok Akasia +Acacia Tree Sapling=Anak Pokok Akasia +Aspen Tree=Kayu Pokok Aspen +Aspen Wood Planks=Papan Kayu Aspen +Aspen Tree Leaves=Daun Pokok Aspen +Aspen Tree Sapling=Anak Pokok Aspen +Coal Ore=Bijih Batu Arang +Coal Block=Bongkah Batu Arang +Iron Ore=Bijih Besi +Steel Block=Bongkah Keluli +Copper Ore=Bijih Tembaga +Copper Block=Bongkah Tembaga +Tin Ore=Bijih Timah +Tin Block=Bongkah Timah +Bronze Block=Bongkah Gangsa +Mese Ore=Bijih Mese +Mese Block=Bongkah Mese +Gold Ore=Bijih Emas +Gold Block=Bongkah Emas +Diamond Ore=Bijih Intan +Diamond Block=Bongkah Intan +Cactus=Kaktus +Large Cactus Seedling=Benih Kaktus Besar +Papyrus=Papirus +Dry Shrub=Pokok Renek Kering +Jungle Grass=Rumput Hutan +Grass=Rumput +Savanna Grass= +Fern=Paku Pakis +Marram Grass=Rumput Maram +Bush Stem=Batang Belukar +Bush Leaves=Daun Belukar +Bush Sapling=Anak Belukar +Blueberry Bush Leaves with Berries=Daun Belukar Beri Biru Berberi +Blueberry Bush Leaves=Daun Belukar Beri Biru +Blueberry Bush Sapling=Anak Belukar Beri Biru +Acacia Bush Stem=Batang Belukar Akasia +Acacia Bush Leaves=Daun Belukar Akasia +Acacia Bush Sapling=Anak Belukar Akasia +Pine Bush Stem=Batang Belukar Pain +Pine Bush Needles=Daun Belukar Pain +Pine Bush Sapling=Anak Belukar Pain +Kelp=Kelpa +Green Coral=Batu Karang Hijau +Pink Coral=Batu Karang Merah Jambu +Cyan Coral=Batu Karang Biru Kehijauan +Brown Coral=Batu Karang Perang +Orange Coral=Batu Karang Jingga +Coral Skeleton= Rangka Karang +Water Source=Sumber Air +Flowing Water=Air Mengalir +River Water Source=Sumber Air Sungai +Flowing River Water=Air Sungai Mengalir +Lava Source=Sumber Lava +Flowing Lava=Lava Mengalir +Empty Bookshelf=Rak Buku Kosong +Bookshelf (@1 written, @2 empty books)=Rak Buku (@1 buku bertulis, @2 buku kosong) +Bookshelf=Rak Buku +Text too long=Tulisan terlalu panjang +"@1"="@1" +Wooden Sign=Papan Tanda Kayu +Steel Sign=Papan Tanda Keluli +Wooden Ladder=Tangga Panjat Kayu +Steel Ladder=Tangga Panjat Keluli +Apple Wood Fence=Pagar Kayu Epal +Acacia Wood Fence=Pagar Kayu Akasia +Jungle Wood Fence=Pagar Kayu Hutan +Pine Wood Fence=Pagar Kayu Pain +Aspen Wood Fence=Pagar Kayu Aspen +Apple Wood Fence Rail=Pagar Rel Kayu Epal +Acacia Wood Fence Rail=Pagar Rel Kayu Akasia +Jungle Wood Fence Rail=Pagar Rel Kayu Hutan +Pine Wood Fence Rail=Pagar Rel Kayu Pain +Aspen Wood Fence Rail=Pagar Rel Kayu Aspen +Glass=Kaca +Obsidian Glass=Kaca Obsidia +Brick Block=Bongkah Bata +Mese Lamp=Lampu Mese +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Awan +Wooden Pickaxe=Beliung Kayu +Stone Pickaxe=Beliung Batu +Bronze Pickaxe=Beliung Gangsa +Steel Pickaxe=Beliung Keluli +Mese Pickaxe=Beliung Mese +Diamond Pickaxe=Beliung Intan +Wooden Shovel=Penyodok Kayu +Stone Shovel=Penyodok Batu +Bronze Shovel=Penyodok Gangsa +Steel Shovel=Penyodok Keluli +Mese Shovel=Penyodok Mese +Diamond Shovel=Penyodok Intan +Wooden Axe=Kapak Kayu +Stone Axe=Kapak Batu +Bronze Axe=Kapak Gangsa +Steel Axe=Kapak Keluli +Mese Axe=Kapak Mese +Diamond Axe=Kapak Intan +Wooden Sword=Pedang Kayu +Stone Sword=Pedang Batu +Bronze Sword=Pedang Gangsa +Steel Sword=Pedang Keluli +Mese Sword=Pedang Mese +Diamond Sword=Pedang Intan +Key=Kunci +Torch=Obor +@1 will intersect protection on growth.=@1 akan masuk kawasan perlindungan lain apabila ia tumbuh. + + +##### not used anymore ##### + +Dirt with Dry Grass=Tanah Berumput Kering +Dry Dirt=Tanah Kering +Dry Dirt with Dry Grass=Tanah Kering Berumput Kering +Dry Grass=Rumput Kering +Mese Post Light=Lampu Tiang Mese diff --git a/mods/minetest_game/default/locale/default.pt_BR.tr b/mods/minetest_game/default/locale/default.pt_BR.tr new file mode 100644 index 0000000..34ae20a --- /dev/null +++ b/mods/minetest_game/default/locale/default.pt_BR.tr @@ -0,0 +1,215 @@ +# textdomain: default +Locked Chest=Baú Trancado +Locked Chest (owned by @1)=Baú Trancado (pertence a @1) +You do not own this chest.=Você não é dono deste baú. +a locked chest=um baú trancado +Chest=Baú +Title:=Título: +Contents:=Conteúdo: +Save=Salvar +by @1=por @1 +Page @1 of @2=Página @1 de @2 +"@1" by @2="@1" por @2 +Skeleton Key=Chave de Mestra +Key to @1's @2=Chave para @2 de @1 +Blueberries=Mirtilo +Book=Livro +Book with Text=Livro com Texto +Bronze Ingot=Lingote de Bronze +Clay Brick=Tijolo de Argila +Clay Lump=Pedaço de Argila +Coal Lump=Pedaço de Carvão +Copper Ingot=Lingote de Cobre +Copper Lump=Pedaço de Cobre +Diamond=Diamante +Flint=Sílex (Flint) +Gold Ingot=Lingote de Ouro +Gold Lump=Pedaço de Ouro +Iron Lump=Pedaço de Ferro +Mese Crystal=Cristal de Mese +Mese Crystal Fragment=Fragmento de Cristal de Mese +Obsidian Shard=Caco de Obsidian +Paper=Papel +Steel Ingot=Lingote de Aço +Stick=Graveto +Tin Ingot=Lingote de Estanho +Tin Lump=Pedaço de Estanho +Furnace is empty=A fornalha está vazia +100% (output full)=100% (saída cheia) +@1%=@1% +Not cookable=Não pode cozinhar +Empty=Vazio +Furnace active=Fornalha ativa +Furnace inactive=Fornalha inativa +(Item: @1; Fuel: @2)=(Item: @1; Combustível: @2) +Furnace=Fornalha +Stone=Pedra +Cobblestone=Pedregulho +Stone Brick=Tijolo de Pedra +Stone Block=Bloco de Pedra +Mossy Cobblestone=Pedregulho Musgoso +Desert Stone=Pedra do Deserto +Desert Cobblestone=Pedregulho do Deserto +Desert Stone Brick=Tijolo de Pedra do Deserto +Desert Stone Block=Bloco de Pedra do Deserto +Sandstone=Arenito +Sandstone Brick=Tijolo de Arenito +Sandstone Block=Bloco de Arenito +Desert Sandstone=Bloco de Arenito do Deserto +Desert Sandstone Brick=Tijolo de Arenito do Deserto +Desert Sandstone Block=Bloco de Arenito do Deserto +Silver Sandstone=Arenito Prateado +Silver Sandstone Brick=Tijolo de Arenito Prateado +Silver Sandstone Block=Bloco de Arenito Prateado +Obsidian=Obsidiana +Obsidian Brick=Tijolo de Obsidiana +Obsidian Block=Bloco de Obsidiana +Dirt=Terra +Dirt with Grass=Terra com Grama +Dirt with Grass and Footsteps=Terra com Grama e Pegadas +Dirt with Savanna Grass=Terra com Grama da Savana +Dirt with Snow=Terra com Neve +Dirt with Rainforest Litter=Terra com Serrapilheira Tropical +Dirt with Coniferous Litter=Terra com Serrapilheira +Savanna Dirt=Terra da Savana +Savanna Dirt with Savanna Grass=Terra da Savana com Grama da Savana +Permafrost=Terra Congelada +Permafrost with Stones=Terra Congelada com Pedras +Permafrost with Moss=Terra Congelada com Musgo +Sand=Areia +Desert Sand=Areia do Deserto +Silver Sand=Areia Prateada +Gravel=Cascalho +Clay=Argila +Snow=Neve +Snow Block=Bloco de Neve +Ice=Gelo +Cave Ice=Caverna de Gelo +Apple Tree=Macieira +Apple Wood Planks=Tábuas de Macieira +Apple Tree Sapling=Muda de Macieira +Apple Tree Leaves=Folhas de Macieira +Apple=Maçã +Apple Marker=Marcador de Maçã +Jungle Tree=Árvore da Selva +Jungle Wood Planks=Tábuas de Árvore da Selva +Jungle Tree Leaves=Folhas de Árvore da Selva +Jungle Tree Sapling=Muda de Árvore da Selva +Emergent Jungle Tree Sapling=Muda Crescida de Árvore da Selva +Pine Tree=Pinheiro +Pine Wood Planks=Tábuas de Pinheiro +Pine Needles=Agulhas de Pinheiro +Pine Tree Sapling=Muda de Pinheiro +Acacia Tree=Acácia +Acacia Wood Planks=Tábuas de Acácia +Acacia Tree Leaves=Folhas de Acácia +Acacia Tree Sapling=Mudas de Acácia +Aspen Tree=Álamo +Aspen Wood Planks=Tábuas de Álamo +Aspen Tree Leaves=Folhas de Álamo +Aspen Tree Sapling=Muda de Álamo +Coal Ore=Minério de Carvão +Coal Block=Bloco de Carvão +Iron Ore=Minério de Ferro +Steel Block=Bloco de Aço +Copper Ore=Minério de Cobre +Copper Block=Bloco de Cobre +Tin Ore=Minério de Estanho +Tin Block=Bloco de Estanho +Bronze Block=Bloco de Bronze +Mese Ore=Minério de Mese +Mese Block=Bloco de Mese +Gold Ore=Minério de Ouro +Gold Block=Bloco de Ouro +Diamond Ore=Minério de Diamante +Diamond Block=Bloco de Diamante +Cactus=Cacto +Large Cactus Seedling=Grande Muda de Cacto +Papyrus=Papiro +Dry Shrub=Arbusto Seco +Jungle Grass=Grama da Selva +Grass=Grama +Savanna Grass=Grama da Savana +Fern=Samambaia +Marram Grass=Grama de Feno +Bush Stem=Caule de Arbusto +Bush Leaves=Folhas de Arbusto +Bush Sapling=Muda de Arbusto +Blueberry Bush Leaves with Berries=Folhas de Arbusto de Mirtilo com Bagas +Blueberry Bush Leaves=Folhas de Arbusto de Mirtilo +Blueberry Bush Sapling=Muda de Arbusto de Mirtilo +Acacia Bush Stem=Caule de Arbusto de Acácia +Acacia Bush Leaves=Folhas de Arbusto de Acácia +Acacia Bush Sapling=Muda de Arbusto de Acácia +Pine Bush Stem=Caule de Arbusto de Pinheiro +Pine Bush Needles=Agulha de Arbusto de Pinheiro +Pine Bush Sapling=Muda de Arbusto de Pinheiro +Kelp=Alga +Green Coral=Coral Verde +Pink Coral=Coral Rosa +Cyan Coral=Coral Ciano +Brown Coral=Coral Marrom +Orange Coral=Coral Laranja +Coral Skeleton=Esqueleto de Coral +Water Source=Fonte de Água +Flowing Water=Água Corrente +River Water Source=Fonte de Água do Rio +Flowing River Water=Água Corrente do Rio +Lava Source=Fonte de Lava +Flowing Lava=Lava Corrente +Empty Bookshelf=Estante de Livros Vazia +Bookshelf (@1 written, @2 empty books)=Estante de Livros (@1 livros escritos, @2 livros em branco) +Bookshelf=Estante de Livros +Text too long=Texto muito longo +"@1"="@1" +Wooden Sign=Placa de Madeira +Steel Sign=Placa de Aço +Wooden Ladder=Escada de Madeira +Steel Ladder=Escada de Aço +Apple Wood Fence=Cerca de Macieira +Acacia Wood Fence=Cerca de Acácia +Jungle Wood Fence=Cerca de Madeira da Selva +Pine Wood Fence=Cerca de Pinheiro +Aspen Wood Fence=Cerca de Álamo +Apple Wood Fence Rail=Trilho de Cerca de Macieira +Acacia Wood Fence Rail=Trilho de Cerca de Acácia +Jungle Wood Fence Rail=Trilho de Cerca de Madeira da Selva +Pine Wood Fence Rail=Trilho de Cerca de Pinheiro +Aspen Wood Fence Rail=Trilho de Cerca de Álamo +Glass=Vidro +Obsidian Glass=Vidro de Obsidiana +Brick Block=Bloco de Tijolos +Mese Lamp=Lâmpada de Mese +Apple Wood Mese Post Light=Poste de Lâmpada de Mese de Macieira +Acacia Wood Mese Post Light=Poste de Lâmpada de Mese de Acácia +Jungle Wood Mese Post Light=Poste de Lâmpada de Mese de Madeira da Selva +Pine Wood Mese Post Light=Poste de Lâmpada de Mese de Pinheiro +Aspen Wood Mese Post Light=Poste de Lâmpada de Mese de Aspen +Cloud=Nuvem +Wooden Pickaxe=Picareta de Madeira +Stone Pickaxe=Picareta de Pedra +Bronze Pickaxe=Picareta de Bronze +Steel Pickaxe=Picareta de Aço +Mese Pickaxe=Picareta de Mese +Diamond Pickaxe=Picareta de Diamante +Wooden Shovel=Pá de Madeira +Stone Shovel=Pá de Pedra +Bronze Shovel=Pá de Bronze +Steel Shovel=Pá de Aço +Mese Shovel=Pá de Mese +Diamond Shovel=Pá de Diamante +Wooden Axe=Machado de Madeira +Stone Axe=Machado de Pedra +Bronze Axe=Machado de Bronze +Steel Axe=Machado de Aço +Mese Axe=Machado de Mese +Diamond Axe=Machado de Diamante +Wooden Sword=Espada de Madeira +Stone Sword=Espada de Pedra +Bronze Sword=Espada de Bronze +Steel Sword=Espada de Aço +Mese Sword=Espada de Mese +Diamond Sword=Espada de Diamante +Key=Chave +Torch=Tocha +@1 will intersect protection on growth.=@1 cruzará a proteção no crescimento. diff --git a/mods/minetest_game/default/locale/default.ru.tr b/mods/minetest_game/default/locale/default.ru.tr new file mode 100644 index 0000000..4415f67 --- /dev/null +++ b/mods/minetest_game/default/locale/default.ru.tr @@ -0,0 +1,224 @@ +# textdomain: default +Locked Chest=Заблокированный Сундук +Locked Chest (owned by @1)=Заблокированный Сундук (владелец: @1) +You do not own this chest.=Вы не владелец этого сундука. +a locked chest=заблокированный сундук +Chest=Сундук +Title:=Заголовок: +Contents:=Содержимое: +Save=Сохранить +by @1=@1 +Page @1 of @2=Страница @1 из @2 +"@1" by @2="@1" @2 +Skeleton Key=Ключ Скелета +Key to @1's @2=Ключ к @2 от @1 +Blueberries=Черника +Book=Книга +Book with Text=Книга с Текстом +Bronze Ingot=Бронзовый Слиток +Clay Brick=Глиняный Кирпич +Clay Lump=Ком Глины +Coal Lump=Кусок Угля +Copper Ingot=Медный Слиток +Copper Lump=Кусок Меди +Diamond=Алмаз +Flint=Кремень +Gold Ingot=Золотой Слиток +Gold Lump=Кусок Золота +Iron Lump=Кусок Железа +Mese Crystal=Кристалл Месе +Mese Crystal Fragment=Осколок Кристалла Месе +Obsidian Shard=Обсидиановый Осколок +Paper=Бумага +Steel Ingot=Железный Слиток +Stick=Палка +Tin Ingot=Оловянный Слиток +Tin Lump=Кусок Олова +Furnace is empty=Печь пуста +100% (output full)=100% (полное приготовление) +@1%=@1% +Not cookable=Не может быть приготовлено +Empty=Пустое +Furnace active=Печь зажжена +Furnace inactive=Печь не зажжена +(Item: @1; Fuel: @2)=(Предмет: @1; Топливо: @2) +Furnace=Печь +Stone=Камень +Cobblestone=Булыжник +Stone Brick=Каменный Кирпич +Stone Block=Каменный Блок +Mossy Cobblestone=Мшистый Булыжник +Desert Stone=Пустынный Камень +Desert Cobblestone=Пустынный Булыжник +Desert Stone Brick=Пустынный Каменный Кирпич +Desert Stone Block=Пустынный Каменный Блок +Sandstone=Песчаник +Sandstone Brick=Песчаниковый Кирпич +Sandstone Block=Песчаниковый Блок +Desert Sandstone=Пустынный Песчаник +Desert Sandstone Brick=Пустынный Песчаниковый Кирпич +Desert Sandstone Block=Пустынный Песчаниковый Блок +Silver Sandstone=Серебряный Песчаник +Silver Sandstone Brick=Серебряный Песчаниковый Кирпич +Silver Sandstone Block=Серебряный Песчаниковый Блок +Obsidian=Обсидиан +Obsidian Brick=Обсидиановый Кирпич +Obsidian Block=Обсидиановый Блок +Dirt=Земля +Dirt with Grass=Земля с Травой +Dirt with Grass and Footsteps=Земля с Травой и Следами +Dirt with Savanna Grass= +Dirt with Snow=Земля Со Снегом +Dirt with Rainforest Litter=Земля с Тропической Подстилкой +Dirt with Coniferous Litter=Земля с Сосновой Подстилкой +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost=Замороженная Почва +Permafrost with Stones=Замороженная Почва с Камнями +Permafrost with Moss=Замороженная Почва с Мхом +Sand=Песок +Desert Sand=Пустынный Песок +Silver Sand=Серебряный Песок +Gravel=Гравий +Clay=Глиняный Блок +Snow=Снег +Snow Block=Снежный Блок +Ice=Лёд +Cave Ice=Пещерный Лёд +Apple Tree=Ствол Яблони +Apple Wood Planks=Яблоневые Доски +Apple Tree Sapling=Саженец Яблони +Apple Tree Leaves=Яблоневая Листва +Apple=Яблоко +Apple Marker=Яблочная Метка +Jungle Tree=Ствол Тропического Дерева +Jungle Wood Planks=Доски из Тропического Дерева +Jungle Tree Leaves=Листва Тропического Дерева +Jungle Tree Sapling=Саженец Тропического Дерева +Emergent Jungle Tree Sapling=Выросший Саженец Тропического Дерева +Pine Tree=Сосновый Ствол +Pine Wood Planks=Сосновые Доски +Pine Needles=Сосновая Хвоя +Pine Tree Sapling=Саженец Сосны +Acacia Tree=Ствол Акации +Acacia Wood Planks=Доски Акации +Acacia Tree Leaves=Листва Акации +Acacia Tree Sapling=Саженец Акации +Aspen Tree=Ствол Осины +Aspen Wood Planks=Осиновые Доски +Aspen Tree Leaves=Осиновая Листва +Aspen Tree Sapling=Саженец Осины +Coal Ore=Уголь +Coal Block=Угольный Блок +Iron Ore=Железная Руда +Steel Block=Стальной Блок +Copper Ore=Медная Руда +Copper Block=Медный Блок +Tin Ore=Оловянная Руда +Tin Block=Оловянный Блок +Bronze Block=Бронзовый Блок +Mese Ore=Месевая Руда +Mese Block=Месевый Блок +Gold Ore=Золотая Руда +Gold Block=Золотой Блок +Diamond Ore=Алмаз +Diamond Block=Алмазный Блок +Cactus=Кактус +Large Cactus Seedling=Саженец Кактуса +Papyrus=Папирус +Dry Shrub=Сухой Куст +Jungle Grass=Тропическая Трава +Grass=Трава +Savanna Grass= +Fern=Папоротник +Marram Grass=Песколюб +Bush Stem=Стебли Куста +Bush Leaves=Листья Куста +Bush Sapling=Саженец Куста +Blueberry Bush Leaves with Berries=Куст Черники с Ягодами +Blueberry Bush Leaves=Куст Черники +Blueberry Bush Sapling=Саженец Куста Черники +Acacia Bush Stem=Стебли Куста Акации +Acacia Bush Leaves=Листья Куста Акации +Acacia Bush Sapling=Саженец Куста Акации +Pine Bush Stem=Стебли Хвойного Куста +Pine Bush Needles=Хвоя Куста +Pine Bush Sapling=Саженец Хвойного Куста +Kelp=Ламинария +Green Coral=Зеленый Коралл +Pink Coral=Розовый Коралл +Cyan Coral=Голубой Коралл +Brown Coral=Коричневый Коралл +Orange Coral=Оранжевый Коралл +Coral Skeleton=Коралловый Остов +Water Source=Водный Источник +Flowing Water=Текущая Вода +River Water Source=Речной Водный Источник +Flowing River Water=Текущая Речная Вода +Lava Source=Лавовый Источник +Flowing Lava=Текущая Лава +Empty Bookshelf=Пустая Книжная Полка +Bookshelf (@1 written, @2 empty books)=Книжная Полка (@1 написано, @2 чистые книги) +Bookshelf=Книжная Полка +Text too long=Текст слишком длинный +"@1"="@1" +Wooden Sign=Деревянная Табличка +Steel Sign=Стальная Табличка +Wooden Ladder=Деревянная Лестница +Steel Ladder=Стальная Лестница +Apple Wood Fence=Яблоневый Деревянный Забор +Acacia Wood Fence=Деревянный Забор Из Акации +Jungle Wood Fence=Деревянный Забор Из Тропического Дерева +Pine Wood Fence=Сосновый Деревянный Забор +Aspen Wood Fence=Осиновый Деревянный Забор +Apple Wood Fence Rail=Яблоневый Деревянный Реечный Забор +Acacia Wood Fence Rail=Деревянный Реечный Забор Из Акации +Jungle Wood Fence Rail=Деревянный Реечный Забор Из Тропического Дерева +Pine Wood Fence Rail=Сосновый Деревянный Реечный Забор +Aspen Wood Fence Rail=Осиновый Деревянный Реечный Забор +Glass=Стекло +Obsidian Glass=Обсидиановое Стекло +Brick Block=Кирпичный Блок +Mese Lamp=Месе Лампа +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Облако +Wooden Pickaxe=Деревянная Кирка +Stone Pickaxe=Каменная Кирка +Bronze Pickaxe=Бронзовая Кирка +Steel Pickaxe=Стальная Кирка +Mese Pickaxe=Месе Кирка +Diamond Pickaxe=Алмазная Кирка +Wooden Shovel=Деревянная Лопата +Stone Shovel=Каменная Лопата +Bronze Shovel=Бронзовая Лопата +Steel Shovel=Стальная Лопата +Mese Shovel=Месе Лопата +Diamond Shovel=Алмазная Лопата +Wooden Axe=Деревянный Топор +Stone Axe=Каменный Топор +Bronze Axe=Бронзовый Топор +Steel Axe=Стальной Топор +Mese Axe=Месе Топор +Diamond Axe=Алмазный Топор +Wooden Sword=Деревянный Меч +Stone Sword=Каменный Меч +Bronze Sword=Бронзовый Меч +Steel Sword=Стальной Меч +Mese Sword=Месе Меч +Diamond Sword=Алмазный Меч +Key=Ключ +Torch=Факел +@1 will intersect protection on growth.=@1 пересечёт защиту по росту. + + +##### not used anymore ##### + +Dirt with Dry Grass=Земля с Сухой Травой +Dry Dirt=Сухая Земля +Dry Dirt with Dry Grass=Сухая Земля с Сухой Травой +Dry Grass=Сухая Трава +Mese Post Light=Столб с Месе Фонарем diff --git a/mods/minetest_game/default/locale/default.se.tr b/mods/minetest_game/default/locale/default.se.tr new file mode 100644 index 0000000..74f165f --- /dev/null +++ b/mods/minetest_game/default/locale/default.se.tr @@ -0,0 +1,225 @@ +# textdomain: default +## textdomain: default +Locked Chest=Låst kista +Locked Chest (owned by @1)=Låst kista (Ägd av @1) +You do not own this chest.=Du äger inte denna kistan. +a locked chest=en låst kista +Chest=Kista +Title:=Titel: +Contents:=Innehåll: +Save=Spara +by @1=av @1 +Page @1 of @2=Sida @1 av @2 +"@1" by @2="@1" av @2 +Skeleton Key=Skelett Nyckel +Key to @1's @2=Nyckel till @1s @2 +Blueberries=Blåbär +Book=Bok +Book with Text=Bok med text +Bronze Ingot=Brons tacka +Clay Brick=Tegelsten +Clay Lump=Lerklump +Coal Lump=Kol Klumo +Copper Ingot=Koppar tacka +Copper Lump=Koppar Klump +Diamond=Diamant +Flint=Flinta +Gold Ingot=Guld tacka +Gold Lump=Guld Klump +Iron Lump=Järn Klump +Mese Crystal=Mese Kristall +Mese Crystal Fragment=Mese Kristall Fragment +Obsidian Shard=Obsidian Skärva +Paper=Papper +Steel Ingot=Stål tacka +Stick=Pinne +Tin Ingot=Tenn tacka +Tin Lump=Tenn Klump +Furnace is empty=Ugnen är tom +100% (output full)=100% (utgången full) +@1%=@1% +Not cookable=Inte kokbar +Empty=Tom +Furnace active=Ugn aktiv +Furnace inactive=Ugn inaktiv +(Item: @1; Fuel: @2)=(Sak: @1; Bränsle: @2) +Furnace=Ugn +Stone=Sten +Cobblestone=Kullersten +Stone Brick=Stentegel +Stone Block=Sten block +Mossy Cobblestone=Mossig kullersten +Desert Stone=Öken sten +Desert Cobblestone=Öken kullersten +Desert Stone Brick=Öken stentegel +Desert Stone Block=Öken sten block +Sandstone=Sandsten +Sandstone Brick=Sandstenstegel +Sandstone Block=Sandsten block +Desert Sandstone=Öken sandsten +Desert Sandstone Brick=Öken Sandstenstegel +Desert Sandstone Block=Öken sandsten block +Silver Sandstone=Silver sandsten +Silver Sandstone Brick=Silver Sandstenstegel +Silver Sandstone Block=Silver sandsten block +Obsidian=Obsidian +Obsidian Brick=Obsidiantegel +Obsidian Block=Obsidian block +Dirt=Jord +Dirt with Grass=Jord med gräs +Dirt with Grass and Footsteps=Jord med gräs och fotsteg +Dirt with Savanna Grass= +Dirt with Snow=Jord med snö +Dirt with Rainforest Litter=Jord med regnskogströ +Dirt with Coniferous Litter=Jord med Barrträd +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost=Permafrost +Permafrost with Stones=Permafrost med sten +Permafrost with Moss=Permafrost med mossa +Sand=Sand +Desert Sand=Öken sand +Silver Sand=Silver sand +Gravel=Grus +Clay=Lera +Snow=Snö +Snow Block=Snö block +Ice=Is +Cave Ice=Grott Is +Apple Tree=Äpple Träd +Apple Wood Planks=Äpple Plankor +Apple Tree Sapling=Äpple Planta +Apple Tree Leaves=Äpple Löv +Apple=Äpple +Apple Marker=Äpple Markör +Jungle Tree=Djungel Träd +Jungle Wood Planks=Djungel Plankor +Jungle Tree Leaves=Djungel Löv +Jungle Tree Sapling=Djungel Planta +Emergent Jungle Tree Sapling=Nybliven Djungel Planta +Pine Tree=Tall +Pine Wood Planks= Tall Plankor +Pine Needles=Granbarr +Pine Tree Sapling=Tall Planta +Acacia Tree=Akacia Träd +Acacia Wood Planks=Akacia Plankor +Acacia Tree Leaves=Akacia Löv +Acacia Tree Sapling=Akacia Planta +Aspen Tree=Asp +Aspen Wood Planks=Asp Plankor +Aspen Tree Leaves=Asp Löv +Aspen Tree Sapling=Asp Planta +Coal Ore=Kol Malm +Coal Block=Kol Block +Iron Ore=Järn Malm +Steel Block=Stål Block +Copper Ore=Koppar Malm +Copper Block=Koppar Block +Tin Ore=Tenn Malm +Tin Block=Tenn Block +Bronze Block=Brons Block +Mese Ore=Mese Malm +Mese Block=Mese Block +Gold Ore=Guld Malm +Gold Block=Guld Block +Diamond Ore=Diamant Malm +Diamond Block=Diamant Block +Cactus=Kaktus +Large Cactus Seedling=Stor kaktusplanta +Papyrus=Papyrus +Dry Shrub=Torr Buske +Jungle Grass=Djungel Gräs +Grass=Gräs +Savanna Grass= +Fern=Ormbunke +Marram Grass=Marram Gräs +Bush Stem=Busk Stam +Bush Leaves=Busk Löv +Bush Sapling=Busk Planta +Blueberry Bush Leaves with Berries=Blåbärsbusks Löv med Bär +Blueberry Bush Leaves=Blåbärsbusks Löv +Blueberry Bush Sapling=Blåbärsbusks Plantga +Acacia Bush Stem=Akacia Busks Stam +Acacia Bush Leaves=Akacia Busks Löv +Acacia Bush Sapling=Akacia Busks Planta +Pine Bush Stem=Tall Busks Stam +Pine Bush Needles=Tall Busks Granbarr +Pine Bush Sapling=Tall Busks Planta +Kelp=Brunalg +Green Coral=Grön Korall +Pink Coral=Rosa Korall +Cyan Coral=Cyan Korall +Brown Coral=Brun Korall +Orange Coral=Orange Korall +Coral Skeleton=Korall Skelett +Water Source=Vattenkälla +Flowing Water=Flödande Vatten +River Water Source=Flodvattenkälla +Flowing River Water=Flödande Flodvatten +Lava Source=Lavakälla +Flowing Lava=Flödande Lava +Empty Bookshelf=Tom Bokhylla +Bookshelf (@1 written, @2 empty books)=Bokhylla (@1 skriva, @2 tomma böcker) +Bookshelf=Bokhylla +Text too long=Text för lång +"@1"="@1" +Wooden Sign=Trä Skylt +Steel Sign=Stål Skylt +Wooden Ladder=Trä Stege +Steel Ladder=Stål Stege +Apple Wood Fence=Äpple Trä Staket +Acacia Wood Fence=Akacia Trä Staket +Jungle Wood Fence=Djungel Trä Staket +Pine Wood Fence=Tall Trä Staket +Aspen Wood Fence=Asp Trä Staket +Apple Wood Fence Rail=Äpple Trä Staket Pinne +Acacia Wood Fence Rail=Akacia Trä Staket Pinne +Jungle Wood Fence Rail=Djungel Trä Staket Pinne +Pine Wood Fence Rail=Tall Trä Staket Pinne +Aspen Wood Fence Rail=Asp Trä Staket Pinne +Glass=Glas +Obsidian Glass=Obsidian Glas +Brick Block=Tegelstens Block +Mese Lamp=Mese Lampa +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Moln +Wooden Pickaxe=Trä Hacka +Stone Pickaxe=Sten Hacka +Bronze Pickaxe=Brons Hacka +Steel Pickaxe=Stål Hacka +Mese Pickaxe=Mese Hacka +Diamond Pickaxe=Diamant Hacka +Wooden Shovel=Trä Spade +Stone Shovel=Sten Spade +Bronze Shovel=Brons Spade +Steel Shovel=Stål Spade +Mese Shovel=Mese Spade +Diamond Shovel=Diamant Spade +Wooden Axe=Trä Yxa +Stone Axe=Sten Yxa +Bronze Axe=Brons Yxa +Steel Axe=Stål Yxa +Mese Axe=Mese Yxa +Diamond Axe=Diamant Yxa +Wooden Sword=Trä Svärd +Stone Sword=Sten Svärd +Bronze Sword=Brons Svärd +Steel Sword=Stål Svärd +Mese Sword=Mese Svärd +Diamond Sword=Diamant Svärd +Key=Nyckel +Torch=Fakla +@1 will intersect protection on growth.=@1 kommer korsa skyddet mot tillväxt. + + +##### not used anymore ##### + +Dirt with Dry Grass=Jord med torrt gräs +Dry Dirt=Torr jord +Dry Dirt with Dry Grass=Torr jord med torrt gräs +Dry Grass=Torrt Gräs +Mese Post Light=Mese Postljus diff --git a/mods/minetest_game/default/locale/default.sk.tr b/mods/minetest_game/default/locale/default.sk.tr new file mode 100644 index 0000000..25f4b91 --- /dev/null +++ b/mods/minetest_game/default/locale/default.sk.tr @@ -0,0 +1,220 @@ +# textdomain: default +Locked Chest=Uzamknutá truhlica +Locked Chest (owned by @1)=Uzamknutá truhlica (Vlastník - @1) +You do not own this chest.=Túto truhlicu nevlastníš. +a locked chest=zamknutá truhlica +Chest=Truhlica +Title:=Názov: +Contents:=Obsah: +Save=Uložiť +by @1=od @1 +Page @1 of @2=Strana @1 z @2 +"@1" by @2=„@1“ z @2 +Skeleton Key=Základný kľuč +Key to @1's @2=Kľuč pre @2 hráča @1 +Blueberries=Čučoriedky +Book=Kniha +Book with Text=Kniha s textom +Bronze Ingot=Bronzový ingot +Clay Brick=Nepálená tehla +Clay Lump=Hruda ílu +Coal Lump=Hruda uhlia +Copper Ingot=Medený ingot +Copper Lump=Hruda medi +Diamond=Diamant +Flint=Kresací kamienok +Gold Ingot=Zlatý ingot +Gold Lump=Hruda zlata +Iron Lump=Hruda železa +Mese Crystal=Mese Krištáľ +Mese Crystal Fragment=Fragment Mese krištáľu +Obsidian Shard=Úlomok obsidiánu +Paper=Papier +Steel Ingot=Oceľový ingot +Stick=Palica +Tin Ingot=Cínový ingot +Tin Lump=Hruda cínu +Furnace is empty=Pec je prázdna +100% (output full)=100% (Výstup je plný) +@1%=@1% +Not cookable=Nie je variteľné +Empty=Prázdne +Furnace active=Pec je aktívna +Furnace inactive=Pec je neaktívna +(Item: @1; Fuel: @2)=(Vec: @1; Palivo: @2) +Furnace=Pec +Stone=Kameň +Cobblestone=Dlažbový kameň +Stone Brick=Tehla z kameňa +Stone Block=Blok kameňa +Mossy Cobblestone=Dlažbový kameň obrastený machom +Desert Stone=Púštny kameň +Desert Cobblestone=Púštny dlažbový kameň +Desert Stone Brick=Tehla z púštneho kameňa +Desert Stone Block=Blok púštneho kameňa +Sandstone=Pieskovec +Sandstone Brick=Tehla z pieskovca +Sandstone Block=Blok pieskovca +Desert Sandstone=Púštny pieskovec +Desert Sandstone Brick=Tehla z púštneho pieskovca +Desert Sandstone Block=Blok púštneho pieskovca +Silver Sandstone=Strieborný pieskovec +Silver Sandstone Brick=Tehla zo strieborného pieskovca +Silver Sandstone Block=Blok strieborného pieskovca +Obsidian=Obsidián +Obsidian Brick=Tehla z obsidiánu +Obsidian Block=Blok obsidiánu +Dirt=Hlina +Dirt with Grass=Hlina s trávou +Dirt with Grass and Footsteps=Hlina s trávou a stopami +Dirt with Savanna Grass=Hlina s trávou zo savany +Dirt with Snow=Hlina so snehom +Dirt with Rainforest Litter=Hlina s povrchom dažďového pralesa +Dirt with Coniferous Litter=Hlina s ihličnatým povrchom +Savanna Dirt=Hlina zo savany +Savanna Dirt with Savanna Grass=Hlina zo savany s trávou +Permafrost=Permafrost +Permafrost with Stones=Permafrost s kameňmi +Permafrost with Moss=Permafrost s machom +Sand=Piesok +Desert Sand=Púštny piesok +Silver Sand=Strieborný piesok +Gravel=Štrk +Clay=Íl +Snow=Sneh +Snow Block=Blok snehu +Ice=Ľad +Cave Ice=Jaskynný ľad +Apple Tree=Jabloň +Apple Wood Planks=Drevené dosky z jablone +Apple Tree Sapling=Stromček jablone +Apple Tree Leaves=Listy z jablone +Apple=Jablko +Apple Marker=Jablková značka +Jungle Tree=Ďungľový strom +Jungle Wood Planks=Drevené dosky z džungľového stromu +Jungle Tree Leaves=Listy z džungľového stromu +Jungle Tree Sapling=Džungľový stromček +Emergent Jungle Tree Sapling=Vznikajúci džungľový stromček +Pine Tree=Borovica +Pine Wood Planks=Drevené dosky z borovice +Pine Needles=Ihličie z borovice +Pine Tree Sapling=Borovicový stromček +Acacia Tree=Akácia +Acacia Wood Planks=Drevené dosky z akácie +Acacia Tree Leaves=Listy z akácie +Acacia Tree Sapling=Stromček akácie +Aspen Tree=Osika +Aspen Wood Planks=Drevené dosky z osiky +Aspen Tree Leaves=Listy z osiky +Aspen Tree Sapling=Stromček osiky +Coal Ore=Uhoľná ruda +Coal Block=Blok uhlia +Iron Ore=Železná ruda +Steel Block=Blok ocele +Copper Ore=Medená ruda +Copper Block=Blok medi +Tin Ore=Cínová ruda +Tin Block=Blok cínu +Bronze Block=Blok bronzu +Mese Ore=Mese Ruda +Mese Block=Blok Mese +Gold Ore=Zlatá ruda +Gold Block=Blok zlata +Diamond Ore=Diamantová ruda +Diamond Block=Blok diamantu +Cactus=Kaktus +Large Cactus Seedling=Vaľká sadenica kaktusu +Papyrus=Papyrus +Dry Shrub=Suchý ker +Jungle Grass=Džungľová tráva +Grass=Tráva +Savanna Grass=Tráva zo savany +Fern=Papraď +Marram Grass=Pobrežná tráva +Bush Stem=Stonka z kríka +Bush Leaves=Listy z kríka +Bush Sapling=Sadenica kríka +Blueberry Bush Leaves with Berries=Čučoriedkové listy s čučoriedkami +Blueberry Bush Leaves=Čučoriedkové listy +Blueberry Bush Sapling=Sadenica čučoriedky +Acacia Bush Stem=Stonka z kríka akácie +Acacia Bush Leaves=Listy z kríka akácie +Acacia Bush Sapling=Sadenica kríka akácie +Pine Bush Stem=Stonka kríka borovice +Pine Bush Needles=Ihličie kríka borovice +Pine Bush Sapling=Sadenica kríka borovice +Kelp=Riasa +Green Coral=Zelený koral +Pink Coral=Ružový koral +Cyan Coral=Tyrkysový koral +Brown Coral=Hnedý koral +Orange Coral=Oranžový koral +Coral Skeleton=Koralová kostra +Water Source=Zdroj vody +Flowing Water=Tečúca voda +River Water Source=Zdroj riečnej voda +Flowing River Water=Tečúca riečna voda +Lava Source=Zdroj lávy +Flowing Lava=Tečúca láva +Empty Bookshelf=Prázdna knižnica +Bookshelf (@1 written, @2 empty books)=Knižnica (@1 popísané, @2 prázdne knihy) +Bookshelf=Knižnica +Text too long=Text je príliš dlhý +"@1"=„@1“ +Wooden Sign=Drevená tabuľka +Steel Sign=Oceľová tabuľka +Wooden Ladder=Drevený rebrík +Steel Ladder=Oceľový rebrík +Apple Wood Fence=Drevený plot z jablone +Acacia Wood Fence=Drevený plot z akácie +Jungle Wood Fence=Drevený plot z džungľového dreva +Pine Wood Fence=Drevený plot z borovice +Aspen Wood Fence=Drevený plot z osiky +Apple Wood Fence Rail=Drevené zábradlie z jablone +Acacia Wood Fence Rail=Drevené zábradlie z akácie +Jungle Wood Fence Rail=Drevené zábradlie z džungľového dreva +Pine Wood Fence Rail=Drevené zábradlie z borovice +Aspen Wood Fence Rail=Drevené zábradlie z osiky +Glass=Sklo +Obsidian Glass=Obsidiánové sklo +Brick Block=Blok z tehál +Mese Lamp=Mese lampa +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud=Oblak +Wooden Pickaxe=Drevený krompáč +Stone Pickaxe=Kamenný krompáč +Bronze Pickaxe=Bronzový krompáč +Steel Pickaxe=Oceľový krompáč +Mese Pickaxe=Mese krompáč +Diamond Pickaxe=Diamantový krompáč +Wooden Shovel=Drevená lopata +Stone Shovel=Kamenná lopata +Bronze Shovel=Bronzová lopata +Steel Shovel=Oceľová lopata +Mese Shovel=Mese lopata +Diamond Shovel=Diamantová lopata +Wooden Axe=Drevená sekera +Stone Axe=Kamenná sekera +Bronze Axe=Bronzová sekera +Steel Axe=Oceľová sekera +Mese Axe=Mese sekera +Diamond Axe=Diamantová sekera +Wooden Sword=Drevený meč +Stone Sword=Kamenný meč +Bronze Sword=Bronzový meč +Steel Sword=Oceľový meč +Mese Sword=Mese meč +Diamond Sword=Diamantový meč +Key=Kľúč +Torch=Fakľa +@1 will intersect protection on growth.=@1 prekročí pri raste chránenú zónu. + + +##### not used anymore ##### + +Mese Post Light=Mese stĺpová lampa diff --git a/mods/minetest_game/default/locale/default.zh_CN.tr b/mods/minetest_game/default/locale/default.zh_CN.tr new file mode 100644 index 0000000..0db652d --- /dev/null +++ b/mods/minetest_game/default/locale/default.zh_CN.tr @@ -0,0 +1,221 @@ +# textdomain: default +Locked Chest=已上锁的箱子 +Locked Chest (owned by @1)=已上锁的箱子(属于@1所有) +You do not own this chest.=这个箱子不属于你所有。 +a locked chest=一个已上锁的箱子 +Chest=箱子 +Title:=标题: +Contents:=内容: +Save=保存 +by @1=由@1 +Page @1 of @2=第@1页,共@2页。 +"@1" by @2="@1" by @2 +Skeleton Key=万能钥匙 +Key to @1's @2=@1的@2的钥匙 +Blueberries=蓝莓 +Book=书 +Book with Text=带文字的书 +Bronze Ingot=青铜锭 +Clay Brick=粘土砖 +Clay Lump=粘土块 +Coal Lump=煤块 +Copper Ingot=铜锭 +Copper Lump=铜块 +Diamond=钻石 +Flint=燧石 +Gold Ingot=金锭 +Gold Lump=金块 +Iron Lump=铁块 +Mese Crystal=黄石晶体 +Mese Crystal Fragment=黄石晶体碎片 +Obsidian Shard=黑曜石碎片 +Paper=纸 +Steel Ingot=铁锭 +Stick=棒 +Tin Ingot=锡锭 +Tin Lump=锡块 +Furnace is empty=熔炉是空的 +100% (output full)=100%(输出已满) +@1%=@1% +Not cookable=不可烹饪 +Empty=空 +Furnace active=熔炉正在运转 +Furnace inactive=熔炉未使用 +(Item: @1; Fuel: @2)=(项目:@1;燃料:@2) +Furnace=熔炉 +Stone=石 +Cobblestone=鹅卵石 +Stone Brick=石砖 +Stone Block=石方块 +Mossy Cobblestone=苔藓覆盖的鹅卵石 +Desert Stone=沙漠石 +Desert Cobblestone=沙漠鹅卵石 +Desert Stone Brick=沙漠鹅卵石砖 +Desert Stone Block=沙漠鹅卵石方块 +Sandstone=砂岩 +Sandstone Brick=砂岩砖 +Sandstone Block=砂岩方块 +Desert Sandstone=沙漠砂岩 +Desert Sandstone Brick=沙漠砂岩砖 +Desert Sandstone Block=沙漠砂岩方块 +Silver Sandstone=银砂岩 +Silver Sandstone Brick=银砂岩砖 +Silver Sandstone Block=银砂岩方块 +Obsidian=黑曜石 +Obsidian Brick=黑曜石砖 +Obsidian Block=黑曜石方块 +Dirt=土方块 +Dirt with Grass=草方块 +Dirt with Grass and Footsteps=草方块及脚印 +Dirt with Savanna Grass=草原草方块 +Dirt with Snow=雪土方块 +Dirt with Rainforest Litter=雨林腐土 +Dirt with Coniferous Litter=针叶林腐土 +Savanna Dirt=草原土 +Savanna Dirt with Savanna Grass=草原草方块(草原土) +Permafrost=多年冻土 +Permafrost with Stones=带石头的多年冻土 +Permafrost with Moss=生苔的多年冻土 +Sand=沙 +Desert Sand=沙漠沙 +Silver Sand=银沙 +Gravel=沙砾 +Clay=粘土 +Snow=雪 +Snow Block=雪方块 +Ice=冰 +Cave Ice=洞穴冰 +Apple Tree=苹果树 +Apple Wood Planks=苹果树木板 +Apple Tree Sapling=苹果树苗 +Apple Tree Leaves=苹果树叶 +Apple=苹果 +Apple Marker=苹果标记 +Jungle Tree=丛林树 +Jungle Wood Planks=丛林树木板 +Jungle Tree Leaves=丛林树叶 +Jungle Tree Sapling=丛林树苗 +Emergent Jungle Tree Sapling=应急丛林树苗 +Pine Tree=松树 +Pine Wood Planks=松树木板 +Pine Needles=松针 +Pine Tree Sapling=松树树苗 +Acacia Tree=相思树 +Acacia Wood Planks=相思树木板 +Acacia Tree Leaves=相思树叶 +Acacia Tree Sapling=相思树树苗 +Aspen Tree=白杨树 +Aspen Wood Planks=白杨树木板 +Aspen Tree Leaves=白杨树叶 +Aspen Tree Sapling=白杨树树苗 +Coal Ore=煤炭矿石 +Coal Block=煤炭方块 +Iron Ore=铁矿石 +Steel Block=钢方块 +Copper Ore=铜矿石 +Copper Block=铜方块 +Tin Ore=锡矿石 +Tin Block=锡方块 +Bronze Block=青铜方块 +Mese Ore=黄石矿石 +Mese Block=黄石方块 +Gold Ore=金矿石 +Gold Block=金方块 +Diamond Ore=钻石矿石 +Diamond Block=钻石方块 +Cactus=仙人掌 +Large Cactus Seedling=大仙人掌苗 +Papyrus=莎草纸 +Dry Shrub=干灌木 +Jungle Grass=丛林草 +Grass=草 +Savanna Grass= +Fern=蕨 +Marram Grass=滨草 +Bush Stem=灌木 +Bush Leaves=灌木叶 +Bush Sapling=灌木苗 +Blueberry Bush Leaves with Berries=蓝莓灌木叶与浆果 +Blueberry Bush Leaves=蓝莓灌木叶 +Blueberry Bush Sapling=蓝莓灌木苗 +Acacia Bush Stem=相思灌木 +Acacia Bush Leaves=相思灌木叶 +Acacia Bush Sapling=相思灌木苗 +Pine Bush Stem=松树灌木 +Pine Bush Needles=松树灌木针 +Pine Bush Sapling=松树灌木苗 +Kelp=海带 +Green Coral=绿珊瑚 +Pink Coral=淡红珊瑚 +Cyan Coral=青珊瑚 +Brown Coral=棕珊瑚 +Orange Coral=橙珊瑚 +Coral Skeleton=珊瑚骨架 +Water Source=水方块 +Flowing Water=流动的水 +River Water Source=河水方块 +Flowing River Water=流动的河水 +Lava Source=岩浆方块 +Flowing Lava=流动的岩浆 +Empty Bookshelf=空书架 +Bookshelf (@1 written, @2 empty books)=书架(@1本有字的书,@2本空书) +Bookshelf=书架 +Text too long=文字太长 +"@1"="@1" +Wooden Sign=木牌 +Steel Sign=铁牌 +Wooden Ladder=木梯子 +Steel Ladder=铁梯子 +Apple Wood Fence=苹果木栅栏 +Acacia Wood Fence=相思木栅栏 +Jungle Wood Fence=丛林木栅栏 +Pine Wood Fence=松木栅栏 +Aspen Wood Fence=白杨木栅栏 +Apple Wood Fence Rail=苹果木栏杆 +Acacia Wood Fence Rail=相思木栏杆 +Jungle Wood Fence Rail=丛林木栏杆 +Pine Wood Fence Rail=松木栏杆 +Aspen Wood Fence Rail=白杨木栏杆 +Glass=玻璃 +Obsidian Glass=黑曜石玻璃 +Brick Block=砖方块 +Mese Lamp=黄石灯 +Apple Wood Mese Post Light=苹果木黄石灯柱 +Acacia Wood Mese Post Light=金合欢木黄石灯柱 +Jungle Wood Mese Post Light=丛林木黄石灯柱 +Pine Wood Mese Post Light=松木黄石灯柱 +Aspen Wood Mese Post Light=白杨木黄石灯柱 +Cloud=云 +Wooden Pickaxe=木镐 +Stone Pickaxe=石镐 +Bronze Pickaxe=青铜镐 +Steel Pickaxe=铁镐 +Mese Pickaxe=黄石镐 +Diamond Pickaxe=钻石镐 +Wooden Shovel=木铲 +Stone Shovel=石铲 +Bronze Shovel=青铜铲 +Steel Shovel=铁铲 +Mese Shovel=黄石铲 +Diamond Shovel=钻石铲 +Wooden Axe=木斧 +Stone Axe=石斧 +Bronze Axe=青铜斧 +Steel Axe=铁斧 +Mese Axe=黄石斧 +Diamond Axe=钻石斧 +Wooden Sword=木剑 +Stone Sword=石剑 +Bronze Sword=青铜剑 +Steel Sword=铁剑 +Mese Sword=黄石剑 +Diamond Sword=钻石剑 +Key=钥匙 +Torch=火把 +@1 will intersect protection on growth.=@1将与增长的保护相交。 + + +##### not used anymore ##### + +Dirt with Dry Grass=干草土方块 +Dry Grass=干草 diff --git a/mods/minetest_game/default/locale/default.zh_TW.tr b/mods/minetest_game/default/locale/default.zh_TW.tr new file mode 100644 index 0000000..257f0e5 --- /dev/null +++ b/mods/minetest_game/default/locale/default.zh_TW.tr @@ -0,0 +1,221 @@ +# textdomain: default +Locked Chest=已上鎖的箱子 +Locked Chest (owned by @1)=已上鎖的箱子(屬於@1所有) +You do not own this chest.=這個箱子不屬於你所有。 +a locked chest=一個已上鎖的箱子 +Chest=箱子 +Title:=標題: +Contents:=內容: +Save=保存 +by @1=由@1 +Page @1 of @2=第@1頁,共@2頁。 +"@1" by @2="@1" by @2 +Skeleton Key=萬能鑰匙 +Key to @1's @2=@1的@2的鑰匙 +Blueberries=藍莓 +Book=書 +Book with Text=帶文字的書 +Bronze Ingot=青銅錠 +Clay Brick=粘土磚 +Clay Lump=粘土塊 +Coal Lump=煤塊 +Copper Ingot=銅錠 +Copper Lump=銅塊 +Diamond=鑽石 +Flint=燧石 +Gold Ingot=金錠 +Gold Lump=金塊 +Iron Lump=鐵塊 +Mese Crystal=黃石晶體 +Mese Crystal Fragment=黃石晶體碎片 +Obsidian Shard=黑曜石碎片 +Paper=紙 +Steel Ingot=鐵錠 +Stick=棒 +Tin Ingot=錫錠 +Tin Lump=錫塊 +Furnace is empty=熔爐是空的 +100% (output full)=100%(輸出已滿) +@1%=@1% +Not cookable=不可烹飪 +Empty=空 +Furnace active=熔爐正在運轉 +Furnace inactive=熔爐未使用 +(Item: @1; Fuel: @2)=(項目:@1;燃料:@2) +Furnace=熔爐 +Stone=石 +Cobblestone=鵝卵石 +Stone Brick=石磚 +Stone Block=石方塊 +Mossy Cobblestone=苔蘚覆蓋的鵝卵石 +Desert Stone=沙漠石 +Desert Cobblestone=沙漠鵝卵石 +Desert Stone Brick=沙漠鵝卵石磚 +Desert Stone Block=沙漠鵝卵石方塊 +Sandstone=砂岩 +Sandstone Brick=砂岩磚 +Sandstone Block=砂岩方塊 +Desert Sandstone=沙漠砂岩 +Desert Sandstone Brick=沙漠砂岩磚 +Desert Sandstone Block=沙漠砂岩方塊 +Silver Sandstone=銀砂岩 +Silver Sandstone Brick=銀砂岩磚 +Silver Sandstone Block=銀砂岩方塊 +Obsidian=黑曜石 +Obsidian Brick=黑曜石磚 +Obsidian Block=黑曜石方塊 +Dirt=土方塊 +Dirt with Grass=草方塊 +Dirt with Grass and Footsteps=草方塊及腳印 +Dirt with Savanna Grass=草原草方塊 +Dirt with Snow=雪土方塊 +Dirt with Rainforest Litter=雨林腐土 +Dirt with Coniferous Litter=針葉林腐土 +Savanna Dirt=草原土 +Savanna Dirt with Savanna Grass=草原草方塊(草原土) +Permafrost=多年凍土 +Permafrost with Stones=帶石頭的多年凍土 +Permafrost with Moss=生苔的多年凍土 +Sand=沙 +Desert Sand=沙漠沙 +Silver Sand=銀沙 +Gravel=沙礫 +Clay=粘土 +Snow=雪 +Snow Block=雪方塊 +Ice=冰 +Cave Ice=洞穴冰 +Apple Tree=蘋果樹 +Apple Wood Planks=蘋果樹木板 +Apple Tree Sapling=蘋果樹苗 +Apple Tree Leaves=蘋果樹葉 +Apple=蘋果 +Apple Marker=蘋果標記 +Jungle Tree=叢林樹 +Jungle Wood Planks=叢林樹木板 +Jungle Tree Leaves=叢林樹葉 +Jungle Tree Sapling=叢林樹苗 +Emergent Jungle Tree Sapling=應急叢林樹苗 +Pine Tree=松樹 +Pine Wood Planks=松樹木板 +Pine Needles=松針 +Pine Tree Sapling=松樹樹苗 +Acacia Tree=相思樹 +Acacia Wood Planks=相思樹木板 +Acacia Tree Leaves=相思樹葉 +Acacia Tree Sapling=相思樹樹苗 +Aspen Tree=白楊樹 +Aspen Wood Planks=白楊樹木板 +Aspen Tree Leaves=白楊樹葉 +Aspen Tree Sapling=白楊樹樹苗 +Coal Ore=煤炭礦石 +Coal Block=煤炭方塊 +Iron Ore=鐵礦石 +Steel Block=鋼方塊 +Copper Ore=銅礦石 +Copper Block=銅方塊 +Tin Ore=錫礦石 +Tin Block=錫方塊 +Bronze Block=青銅方塊 +Mese Ore=黃石礦石 +Mese Block=黃石方塊 +Gold Ore=金礦石 +Gold Block=金方塊 +Diamond Ore=鑽石礦石 +Diamond Block=鑽石方塊 +Cactus=仙人掌 +Large Cactus Seedling=大仙人掌苗 +Papyrus=莎草紙 +Dry Shrub=幹灌木 +Jungle Grass=叢林草 +Grass=草 +Savanna Grass= +Fern=蕨 +Marram Grass=濱草 +Bush Stem=灌木 +Bush Leaves=灌木葉 +Bush Sapling=灌木苗 +Blueberry Bush Leaves with Berries=藍莓灌木葉與漿果 +Blueberry Bush Leaves=藍莓灌木葉 +Blueberry Bush Sapling=藍莓灌木苗 +Acacia Bush Stem=相思灌木 +Acacia Bush Leaves=相思灌木葉 +Acacia Bush Sapling=相思灌木苗 +Pine Bush Stem=松樹灌木 +Pine Bush Needles=松樹灌木針 +Pine Bush Sapling=松樹灌木苗 +Kelp=海帶 +Green Coral=綠珊瑚 +Pink Coral=淡紅珊瑚 +Cyan Coral=青珊瑚 +Brown Coral=棕珊瑚 +Orange Coral=橙珊瑚 +Coral Skeleton=珊瑚骨架 +Water Source=水方塊 +Flowing Water=流動的水 +River Water Source=河水方塊 +Flowing River Water=流動的河水 +Lava Source=岩漿方塊 +Flowing Lava=流動的岩漿 +Empty Bookshelf=空書架 +Bookshelf (@1 written, @2 empty books)=書架(@1本有字的書,@2本空書) +Bookshelf=書架 +Text too long=文字太長 +"@1"="@1" +Wooden Sign=木牌 +Steel Sign=鐵牌 +Wooden Ladder=木梯子 +Steel Ladder=鐵梯子 +Apple Wood Fence=蘋果木柵欄 +Acacia Wood Fence=相思木柵欄 +Jungle Wood Fence=叢林木柵欄 +Pine Wood Fence=松木柵欄 +Aspen Wood Fence=白楊木柵欄 +Apple Wood Fence Rail=蘋果木欄杆 +Acacia Wood Fence Rail=相思木欄杆 +Jungle Wood Fence Rail=叢林木欄杆 +Pine Wood Fence Rail=松木欄杆 +Aspen Wood Fence Rail=白楊木欄杆 +Glass=玻璃 +Obsidian Glass=黑曜石玻璃 +Brick Block=磚方塊 +Mese Lamp=黃石燈 +Apple Wood Mese Post Light=蘋果木黃石燈柱 +Acacia Wood Mese Post Light=金合歡木黃石燈柱 +Jungle Wood Mese Post Light=叢林木黃石燈柱 +Pine Wood Mese Post Light=松木黃石燈柱 +Aspen Wood Mese Post Light=白楊木黃石燈柱 +Cloud=雲 +Wooden Pickaxe=木鎬 +Stone Pickaxe=石鎬 +Bronze Pickaxe=青銅鎬 +Steel Pickaxe=鐵鎬 +Mese Pickaxe=黃石鎬 +Diamond Pickaxe=鑽石鎬 +Wooden Shovel=木鏟 +Stone Shovel=石鏟 +Bronze Shovel=青銅鏟 +Steel Shovel=鐵鏟 +Mese Shovel=黃石鏟 +Diamond Shovel=鑽石鏟 +Wooden Axe=木斧 +Stone Axe=石斧 +Bronze Axe=青銅斧 +Steel Axe=鐵斧 +Mese Axe=黃石斧 +Diamond Axe=鑽石斧 +Wooden Sword=木劍 +Stone Sword=石劍 +Bronze Sword=青銅劍 +Steel Sword=鐵劍 +Mese Sword=黃石劍 +Diamond Sword=鑽石劍 +Key=鑰匙 +Torch=火把 +@1 will intersect protection on growth.=@1將與增長的保護相交。 + + +##### not used anymore ##### + +Dirt with Dry Grass=乾草土方塊 +Dry Grass=乾草 diff --git a/mods/minetest_game/default/locale/template.txt b/mods/minetest_game/default/locale/template.txt new file mode 100644 index 0000000..8734752 --- /dev/null +++ b/mods/minetest_game/default/locale/template.txt @@ -0,0 +1,215 @@ +# textdomain: default +Locked Chest= +Locked Chest (owned by @1)= +You do not own this chest.= +a locked chest= +Chest= +Title:= +Contents:= +Save= +by @1= +Page @1 of @2= +"@1" by @2= +Skeleton Key= +Key to @1's @2= +Blueberries= +Book= +Book with Text= +Bronze Ingot= +Clay Brick= +Clay Lump= +Coal Lump= +Copper Ingot= +Copper Lump= +Diamond= +Flint= +Gold Ingot= +Gold Lump= +Iron Lump= +Mese Crystal= +Mese Crystal Fragment= +Obsidian Shard= +Paper= +Steel Ingot= +Stick= +Tin Ingot= +Tin Lump= +Furnace is empty= +100% (output full)= +@1%= +Not cookable= +Empty= +Furnace active= +Furnace inactive= +(Item: @1; Fuel: @2)= +Furnace= +Stone= +Cobblestone= +Stone Brick= +Stone Block= +Mossy Cobblestone= +Desert Stone= +Desert Cobblestone= +Desert Stone Brick= +Desert Stone Block= +Sandstone= +Sandstone Brick= +Sandstone Block= +Desert Sandstone= +Desert Sandstone Brick= +Desert Sandstone Block= +Silver Sandstone= +Silver Sandstone Brick= +Silver Sandstone Block= +Obsidian= +Obsidian Brick= +Obsidian Block= +Dirt= +Dirt with Grass= +Dirt with Grass and Footsteps= +Dirt with Savanna Grass= +Dirt with Snow= +Dirt with Rainforest Litter= +Dirt with Coniferous Litter= +Savanna Dirt= +Savanna Dirt with Savanna Grass= +Permafrost= +Permafrost with Stones= +Permafrost with Moss= +Sand= +Desert Sand= +Silver Sand= +Gravel= +Clay= +Snow= +Snow Block= +Ice= +Cave Ice= +Apple Tree= +Apple Wood Planks= +Apple Tree Sapling= +Apple Tree Leaves= +Apple= +Apple Marker= +Jungle Tree= +Jungle Wood Planks= +Jungle Tree Leaves= +Jungle Tree Sapling= +Emergent Jungle Tree Sapling= +Pine Tree= +Pine Wood Planks= +Pine Needles= +Pine Tree Sapling= +Acacia Tree= +Acacia Wood Planks= +Acacia Tree Leaves= +Acacia Tree Sapling= +Aspen Tree= +Aspen Wood Planks= +Aspen Tree Leaves= +Aspen Tree Sapling= +Coal Ore= +Coal Block= +Iron Ore= +Steel Block= +Copper Ore= +Copper Block= +Tin Ore= +Tin Block= +Bronze Block= +Mese Ore= +Mese Block= +Gold Ore= +Gold Block= +Diamond Ore= +Diamond Block= +Cactus= +Large Cactus Seedling= +Papyrus= +Dry Shrub= +Jungle Grass= +Grass= +Savanna Grass= +Fern= +Marram Grass= +Bush Stem= +Bush Leaves= +Bush Sapling= +Blueberry Bush Leaves with Berries= +Blueberry Bush Leaves= +Blueberry Bush Sapling= +Acacia Bush Stem= +Acacia Bush Leaves= +Acacia Bush Sapling= +Pine Bush Stem= +Pine Bush Needles= +Pine Bush Sapling= +Kelp= +Green Coral= +Pink Coral= +Cyan Coral= +Brown Coral= +Orange Coral= +Coral Skeleton= +Water Source= +Flowing Water= +River Water Source= +Flowing River Water= +Lava Source= +Flowing Lava= +Empty Bookshelf= +Bookshelf (@1 written, @2 empty books)= +Bookshelf= +Text too long= +"@1"= +Wooden Sign= +Steel Sign= +Wooden Ladder= +Steel Ladder= +Apple Wood Fence= +Acacia Wood Fence= +Jungle Wood Fence= +Pine Wood Fence= +Aspen Wood Fence= +Apple Wood Fence Rail= +Acacia Wood Fence Rail= +Jungle Wood Fence Rail= +Pine Wood Fence Rail= +Aspen Wood Fence Rail= +Glass= +Obsidian Glass= +Brick Block= +Mese Lamp= +Apple Wood Mese Post Light= +Acacia Wood Mese Post Light= +Jungle Wood Mese Post Light= +Pine Wood Mese Post Light= +Aspen Wood Mese Post Light= +Cloud= +Wooden Pickaxe= +Stone Pickaxe= +Bronze Pickaxe= +Steel Pickaxe= +Mese Pickaxe= +Diamond Pickaxe= +Wooden Shovel= +Stone Shovel= +Bronze Shovel= +Steel Shovel= +Mese Shovel= +Diamond Shovel= +Wooden Axe= +Stone Axe= +Bronze Axe= +Steel Axe= +Mese Axe= +Diamond Axe= +Wooden Sword= +Stone Sword= +Bronze Sword= +Steel Sword= +Mese Sword= +Diamond Sword= +Key= +Torch= +@1 will intersect protection on growth.= diff --git a/mods/minetest_game/default/mapgen.lua b/mods/minetest_game/default/mapgen.lua new file mode 100644 index 0000000..bb6bdcc --- /dev/null +++ b/mods/minetest_game/default/mapgen.lua @@ -0,0 +1,2504 @@ +-- +-- Aliases for map generators +-- + +-- All mapgens + +minetest.register_alias("mapgen_stone", "default:stone") +minetest.register_alias("mapgen_water_source", "default:water_source") +minetest.register_alias("mapgen_river_water_source", "default:river_water_source") + +-- Additional aliases needed for mapgen v6 + +minetest.register_alias("mapgen_lava_source", "default:lava_source") +minetest.register_alias("mapgen_dirt", "default:dirt") +minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass") +minetest.register_alias("mapgen_sand", "default:sand") +minetest.register_alias("mapgen_gravel", "default:gravel") +minetest.register_alias("mapgen_desert_stone", "default:desert_stone") +minetest.register_alias("mapgen_desert_sand", "default:desert_sand") +minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow") +minetest.register_alias("mapgen_snowblock", "default:snowblock") +minetest.register_alias("mapgen_snow", "default:snow") +minetest.register_alias("mapgen_ice", "default:ice") + +minetest.register_alias("mapgen_tree", "default:tree") +minetest.register_alias("mapgen_leaves", "default:leaves") +minetest.register_alias("mapgen_apple", "default:apple") +minetest.register_alias("mapgen_jungletree", "default:jungletree") +minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves") +minetest.register_alias("mapgen_junglegrass", "default:junglegrass") +minetest.register_alias("mapgen_pine_tree", "default:pine_tree") +minetest.register_alias("mapgen_pine_needles", "default:pine_needles") + +minetest.register_alias("mapgen_cobble", "default:cobble") +minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble") +minetest.register_alias("mapgen_mossycobble", "default:mossycobble") +minetest.register_alias("mapgen_stair_desert_stone", "stairs:stair_desert_stone") + + +-- +-- Register ores +-- + +-- Mgv6 + +function default.register_mgv6_ores() + + -- Blob ore + -- These first to avoid other ores in blobs + + -- Clay + -- This first to avoid clay in sand blobs + + minetest.register_ore({ + ore_type = "blob", + ore = "default:clay", + wherein = {"default:sand"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 0, + y_min = -15, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = -316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Sand + + minetest.register_ore({ + ore_type = "blob", + ore = "default:sand", + wherein = {"default:stone", "default:desert_stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 0, + y_min = -31, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 2316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Dirt + + minetest.register_ore({ + ore_type = "blob", + ore = "default:dirt", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 17676, + octaves = 1, + persist = 0.0 + }, + }) + + -- Gravel + + minetest.register_ore({ + ore_type = "blob", + ore = "default:gravel", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) + + -- Scatter ores + + -- Coal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 9, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 8, + clust_size = 3, + y_max = 64, + y_min = -31000, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 24 * 24 * 24, + clust_num_ores = 27, + clust_size = 6, + y_max = 0, + y_min = -31000, + }) + + -- Iron + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 12, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 7 * 7 * 7, + clust_num_ores = 5, + clust_size = 3, + y_max = 0, + y_min = -31000, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 24 * 24 * 24, + clust_num_ores = 27, + clust_size = 6, + y_max = -64, + y_min = -31000, + }) + + -- Copper + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 4, + clust_size = 3, + y_max = -16, + y_min = -63, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = -64, + y_min = -31000, + }) + + -- Tin + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 4, + clust_size = 3, + y_max = -32, + y_min = -127, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = -128, + y_min = -31000, + }) + + -- Gold + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 3, + clust_size = 2, + y_max = -64, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = -256, + y_min = -31000, + }) + + -- Mese crystal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 18 * 18 * 18, + clust_num_ores = 3, + clust_size = 2, + y_max = -64, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = -256, + y_min = -31000, + }) + + -- Diamond + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 17 * 17 * 17, + clust_num_ores = 4, + clust_size = 3, + y_max = -128, + y_min = -255, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = -256, + y_min = -31000, + }) + + -- Mese block + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = -384, + y_min = -512, + }) +end + + +-- All mapgens except mgv6 + +function default.register_ores() + + -- Stratum ores. + -- These obviously first. + + -- Silver sandstone + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:silver_sandstone", + wherein = {"default:stone"}, + clust_scarcity = 1, + y_max = 46, + y_min = 10, + noise_params = { + offset = 28, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 4, + biomes = {"cold_desert"}, + }) + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:silver_sandstone", + wherein = {"default:stone"}, + clust_scarcity = 1, + y_max = 42, + y_min = 6, + noise_params = { + offset = 24, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 2, + biomes = {"cold_desert"}, + }) + + -- Desert sandstone + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:desert_sandstone", + wherein = {"default:desert_stone"}, + clust_scarcity = 1, + y_max = 46, + y_min = 10, + noise_params = { + offset = 28, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 4, + biomes = {"desert"}, + }) + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:desert_sandstone", + wherein = {"default:desert_stone"}, + clust_scarcity = 1, + y_max = 42, + y_min = 6, + noise_params = { + offset = 24, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 2, + biomes = {"desert"}, + }) + + -- Sandstone + + minetest.register_ore({ + ore_type = "stratum", + ore = "default:sandstone", + wherein = {"default:desert_stone"}, + clust_scarcity = 1, + y_max = 39, + y_min = 3, + noise_params = { + offset = 21, + scale = 16, + spread = {x = 128, y = 128, z = 128}, + seed = 90122, + octaves = 1, + }, + stratum_thickness = 2, + biomes = {"desert"}, + }) + + -- Blob ore. + -- These before scatter ores to avoid other ores in blobs. + + -- Clay + + minetest.register_ore({ + ore_type = "blob", + ore = "default:clay", + wherein = {"default:sand"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 0, + y_min = -15, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = -316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Silver sand + + minetest.register_ore({ + ore_type = "blob", + ore = "default:silver_sand", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 2316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Dirt + + minetest.register_ore({ + ore_type = "blob", + ore = "default:dirt", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 17676, + octaves = 1, + persist = 0.0 + }, + -- Only where default:dirt is present as surface material + biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest", + "deciduous_forest", "deciduous_forest_shore", "rainforest", + "rainforest_swamp"} + }) + + -- Gravel + + minetest.register_ore({ + ore_type = "blob", + ore = "default:gravel", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_max = 31000, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 766, + octaves = 1, + persist = 0.0 + }, + }) + + -- Scatter ores + + -- Coal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 9, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 8 * 8 * 8, + clust_num_ores = 8, + clust_size = 3, + y_max = 16, + y_min = -32, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_coal", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 30, + clust_size = 5, + y_max = -32, + y_min = -512, + }) + + -- Tin + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 4, + clust_size = 3, + y_max = -16, + y_min = -32, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_tin", + wherein = "default:stone", + clust_scarcity = 10 * 10 * 10, + clust_num_ores = 5, + clust_size = 3, + y_max = -32, + y_min = -512, + }) + + -- Copper + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 4, + clust_size = 3, + y_max = -26, + y_min = -32, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_copper", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 5, + clust_size = 3, + y_max = -32, + y_min = -512, + }) + + -- Iron + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 9 * 9 * 9, + clust_num_ores = 12, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 7 * 7 * 7, + clust_num_ores = 5, + clust_size = 3, + y_max = -32, + y_min = -512, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_iron", + wherein = "default:stone", + clust_scarcity = 12 * 12 * 12, + clust_num_ores = 29, + clust_size = 5, + y_max = -64, + y_min = -512, + }) + + -- Gold + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 3, + clust_size = 2, + y_max = -64, + y_min = -512, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_gold", + wherein = "default:stone", + clust_scarcity = 13 * 13 * 13, + clust_num_ores = 5, + clust_size = 3, + y_max = -128, + y_min = -512, + }) + + -- Mese crystal + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 18 * 18 * 18, + clust_num_ores = 3, + clust_size = 2, + y_max = -128, + y_min = -512, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_mese", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_max = -352, + y_min = -512, + }) + + -- Diamond + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 17 * 17 * 17, + clust_num_ores = 4, + clust_size = 3, + y_max = -384, + y_min = -512, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:stone_with_diamond", + wherein = "default:stone", + clust_scarcity = 15 * 15 * 15, + clust_num_ores = 4, + clust_size = 3, + y_max = -448, + y_min = -512, + }) + + -- Mese block + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = 31000, + y_min = 1025, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_max = -416, + y_min = -512, + }) + + minetest.register_ore({ + ore_type = "scatter", + ore = "default:mese", + wherein = "default:stone", + clust_scarcity = 28 * 28 * 28, + clust_num_ores = 5, + clust_size = 3, + y_max = -448, + y_min = -512, + }) +end + + +-- +-- Register biomes +-- + +-- All mapgens except mgv6 + +function default.register_biomes() + + minetest.register_biome({ + name = "underground", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -64, + y_min = -255, + heat_point = 85, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "the_depths", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -256, + y_min = -512, + heat_point = 90, + humidity_point = 23, + }) + + minetest.register_biome({ + name = "the_unknown", + node_cave_liquid = {"default:water_source", "default:lava_source"}, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -512, + y_min = -31000, + heat_point = 50, + humidity_point = 35, + }) + + -- Icesheet + + minetest.register_biome({ + name = "icesheet", + node_dust = "default:snowblock", + node_top = "default:snowblock", + depth_top = 1, + node_filler = "default:snowblock", + depth_filler = 3, + node_stone = "default:cave_ice", + node_water_top = "default:ice", + depth_water_top = 10, + node_river_water = "default:ice", + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:ice", + node_dungeon_stair = "stairs:stair_ice", + y_max = 31000, + y_min = -8, + heat_point = 0, + humidity_point = 73, + }) + + minetest.register_biome({ + name = "icesheet_ocean", + node_dust = "default:snowblock", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_water_top = "default:ice", + depth_water_top = 10, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = -9, + y_min = -128, + heat_point = 0, + humidity_point = 73, + }) + + -- Tundra + + minetest.register_biome({ + name = "tundra_highland", + node_dust = "default:snow", + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 47, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra", + node_top = "default:permafrost_with_stones", + depth_top = 1, + node_filler = "default:permafrost", + depth_filler = 1, + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 4, + y_max = 46, + y_min = 2, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra_beach", + node_top = "default:gravel", + depth_top = 1, + node_filler = "default:gravel", + depth_filler = 2, + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 1, + y_min = -3, + heat_point = 0, + humidity_point = 40, + }) + + minetest.register_biome({ + name = "tundra_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:gravel", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -4, + y_min = -128, + heat_point = 0, + humidity_point = 40, + }) + + -- Taiga + + minetest.register_biome({ + name = "taiga", + node_dust = "default:snow", + node_top = "default:dirt_with_snow", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 25, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "taiga_ocean", + node_dust = "default:snow", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 3, + y_min = -128, + heat_point = 25, + humidity_point = 70, + }) + + -- Snowy grassland + + minetest.register_biome({ + name = "snowy_grassland", + node_dust = "default:snow", + node_top = "default:dirt_with_snow", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 20, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "snowy_grassland_ocean", + node_dust = "default:snow", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 20, + humidity_point = 35, + }) + + -- Grassland + + minetest.register_biome({ + name = "grassland", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 6, + heat_point = 50, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "grassland_dunes", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 2, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 5, + y_min = 4, + heat_point = 50, + humidity_point = 35, + }) + + minetest.register_biome({ + name = "grassland_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 3, + y_min = -255, + heat_point = 50, + humidity_point = 35, + }) + + -- Coniferous forest + + minetest.register_biome({ + name = "coniferous_forest", + node_top = "default:dirt_with_coniferous_litter", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 6, + heat_point = 45, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "coniferous_forest_dunes", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 5, + y_min = 4, + heat_point = 45, + humidity_point = 70, + }) + + minetest.register_biome({ + name = "coniferous_forest_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 3, + y_min = -255, + heat_point = 45, + humidity_point = 70, + }) + + -- Deciduous forest + + minetest.register_biome({ + name = "deciduous_forest", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 1, + heat_point = 60, + humidity_point = 68, + }) + + minetest.register_biome({ + name = "deciduous_forest_shore", + node_top = "default:dirt", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 0, + y_min = -1, + heat_point = 60, + humidity_point = 68, + }) + + minetest.register_biome({ + name = "deciduous_forest_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -2, + y_min = -255, + heat_point = 60, + humidity_point = 68, + }) + + -- Desert + + minetest.register_biome({ + name = "desert", + node_top = "default:desert_sand", + depth_top = 1, + node_filler = "default:desert_sand", + depth_filler = 1, + node_stone = "default:desert_stone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:desert_stone", + node_dungeon_stair = "stairs:stair_desert_stone", + y_max = 31000, + y_min = 4, + heat_point = 92, + humidity_point = 16, + }) + + minetest.register_biome({ + name = "desert_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_stone = "default:desert_stone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:desert_stone", + node_dungeon_stair = "stairs:stair_desert_stone", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 92, + humidity_point = 16, + }) + + -- Sandstone desert + + minetest.register_biome({ + name = "sandstone_desert", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 1, + node_stone = "default:sandstone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:sandstonebrick", + node_dungeon_stair = "stairs:stair_sandstone_block", + y_max = 31000, + y_min = 4, + heat_point = 60, + humidity_point = 0, + }) + + minetest.register_biome({ + name = "sandstone_desert_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_stone = "default:sandstone", + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:sandstonebrick", + node_dungeon_stair = "stairs:stair_sandstone_block", + y_max = 3, + y_min = -255, + heat_point = 60, + humidity_point = 0, + }) + + -- Cold desert + + minetest.register_biome({ + name = "cold_desert", + node_top = "default:silver_sand", + depth_top = 1, + node_filler = "default:silver_sand", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 4, + heat_point = 40, + humidity_point = 0, + }) + + minetest.register_biome({ + name = "cold_desert_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = 3, + y_min = -255, + heat_point = 40, + humidity_point = 0, + }) + + -- Savanna + + minetest.register_biome({ + name = "savanna", + node_top = "default:dry_dirt_with_dry_grass", + depth_top = 1, + node_filler = "default:dry_dirt", + depth_filler = 1, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 1, + heat_point = 89, + humidity_point = 42, + }) + + minetest.register_biome({ + name = "savanna_shore", + node_top = "default:dry_dirt", + depth_top = 1, + node_filler = "default:dry_dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 0, + y_min = -1, + heat_point = 89, + humidity_point = 42, + }) + + minetest.register_biome({ + name = "savanna_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -2, + y_min = -255, + heat_point = 89, + humidity_point = 42, + }) + + -- Rainforest + + minetest.register_biome({ + name = "rainforest", + node_top = "default:dirt_with_rainforest_litter", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 31000, + y_min = 1, + heat_point = 86, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "rainforest_swamp", + node_top = "default:dirt", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + y_max = 0, + y_min = -1, + heat_point = 86, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "rainforest_ocean", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + node_riverbed = "default:sand", + depth_riverbed = 2, + node_cave_liquid = "default:water_source", + node_dungeon = "default:cobble", + node_dungeon_alt = "default:mossycobble", + node_dungeon_stair = "stairs:stair_cobble", + vertical_blend = 1, + y_max = -2, + y_min = -255, + heat_point = 86, + humidity_point = 65, + }) +end + +-- +-- Register decorations +-- + +-- Mgv6 + +function default.register_mgv6_decorations() + + -- Papyrus + + minetest.register_decoration({ + name = "default:papyrus", + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + y_max = 1, + y_min = 1, + decoration = "default:papyrus", + height = 2, + height_max = 4, + spawn_by = "default:water_source", + num_spawn_by = 1, + }) + + -- Cacti + + minetest.register_decoration({ + name = "default:cactus", + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.012, + scale = 0.024, + spread = {x = 100, y = 100, z = 100}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "default:cactus", + height = 3, + height_max = 4, + }) + + -- Long grasses + + for length = 1, 5 do + minetest.register_decoration({ + name = "default:grass_"..length, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.007, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "default:grass_"..length, + }) + end + + -- Dry shrubs + + minetest.register_decoration({ + name = "default:dry_shrub", + deco_type = "simple", + place_on = {"default:desert_sand", "default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.035, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "default:dry_shrub", + param2 = 4, + }) +end + + +-- All mapgens except mgv6 + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + name = "default:grass_" .. length, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "default:grass_" .. length, + }) +end + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + name = "default:dry_grass_" .. length, + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "default:dry_grass_" .. length, + }) +end + +local function register_fern_decoration(seed, length) + minetest.register_decoration({ + name = "default:fern_" .. length, + deco_type = "simple", + place_on = {"default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.2, + spread = {x = 100, y = 100, z = 100}, + seed = seed, + octaves = 3, + persist = 0.7 + }, + biomes = {"coniferous_forest"}, + y_max = 31000, + y_min = 6, + decoration = "default:fern_" .. length, + }) +end + + +function default.register_decorations() + -- Savanna bare dirt patches. + -- Must come before all savanna decorations that are placed on dry grass. + -- Noise is similar to long dry grass noise, but scale inverted, to appear + -- where long dry grass is least dense and shortest. + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 4, + noise_params = { + offset = -1.5, + scale = -1.5, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 4, + persist = 1.0 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "default:dry_dirt", + place_offset_y = -1, + flags = "force_placement", + }) + + -- Apple tree and log + + minetest.register_decoration({ + name = "default:apple_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.024, + scale = 0.015, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/apple_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + name = "default:apple_log", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + place_offset_y = 1, + sidelen = 16, + noise_params = { + offset = 0.0012, + scale = 0.0007, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/apple_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dirt_with_grass", + num_spawn_by = 8, + }) + + -- Emergent jungle tree + -- Due to 32 node height, altitude is limited and prescence depends on chunksize + + local chunksize = tonumber(minetest.get_mapgen_setting("chunksize")) + if chunksize >= 5 then + minetest.register_decoration({ + name = "default:emergent_jungle_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 80, + noise_params = { + offset = 0.0, + scale = 0.0025, + spread = {x = 250, y = 250, z = 250}, + seed = 2685, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest"}, + y_max = 32, + y_min = 1, + schematic = minetest.get_modpath("default") .. + "/schematics/emergent_jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + place_offset_y = -4, + }) + end + + -- Jungle tree and log + + minetest.register_decoration({ + name = "default:jungle_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 80, + fill_ratio = 0.07, + biomes = {"rainforest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + -- Swamp jungle trees + + minetest.register_decoration({ + name = "default:jungle_tree(swamp)", + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + -- Noise tuned to place swamp trees where papyrus is absent + noise_params = { + offset = 0.0, + scale = -0.1, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 1, + persist = 0.5 + }, + biomes = {"rainforest_swamp"}, + y_max = 0, + y_min = -1, + schematic = minetest.get_modpath("default") .. "/schematics/jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + name = "default:jungle_log", + deco_type = "schematic", + place_on = {"default:dirt_with_rainforest_litter"}, + place_offset_y = 1, + sidelen = 80, + fill_ratio = 0.005, + biomes = {"rainforest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/jungle_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dirt_with_rainforest_litter", + num_spawn_by = 8, + }) + + -- Taiga and temperate coniferous forest pine tree, small pine tree and log + + minetest.register_decoration({ + name = "default:pine_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0.010, + scale = 0.048, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/pine_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + name = "default:small_pine_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0.010, + scale = -0.048, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/small_pine_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + name = "default:pine_log", + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + place_offset_y = 1, + sidelen = 80, + fill_ratio = 0.0018, + biomes = {"taiga", "coniferous_forest"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/pine_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = {"default:dirt_with_snow", "default:dirt_with_coniferous_litter"}, + num_spawn_by = 8, + }) + + -- Acacia tree and log + + minetest.register_decoration({ + name = "default:acacia_tree", + deco_type = "schematic", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.002, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/acacia_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + name = "default:acacia_log", + deco_type = "schematic", + place_on = {"default:dry_dirt_with_dry_grass"}, + place_offset_y = 1, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/acacia_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dry_dirt_with_dry_grass", + num_spawn_by = 8, + }) + + -- Aspen tree and log + + minetest.register_decoration({ + name = "default:aspen_tree", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.015, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + name = "default:aspen_log", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + place_offset_y = 1, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.0008, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/aspen_log.mts", + flags = "place_center_x", + rotation = "random", + spawn_by = "default:dirt_with_grass", + num_spawn_by = 8, + }) + + -- Large cactus + + minetest.register_decoration({ + name = "default:large_cactus", + deco_type = "schematic", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.0003, + scale = 0.0009, + spread = {x = 200, y = 200, z = 200}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/large_cactus.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + -- Cactus + + minetest.register_decoration({ + name = "default:cactus", + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.0003, + scale = 0.0009, + spread = {x = 200, y = 200, z = 200}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert"}, + y_max = 31000, + y_min = 4, + decoration = "default:cactus", + height = 2, + height_max = 5, + }) + + -- Papyrus + + -- Dirt version for rainforest swamp + + minetest.register_decoration({ + name = "default:papyrus_on_dirt", + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest_swamp"}, + y_max = 0, + y_min = 0, + schematic = minetest.get_modpath("default") .. "/schematics/papyrus_on_dirt.mts", + }) + + -- Dry dirt version for savanna shore + + minetest.register_decoration({ + name = "default:papyrus_on_dry_dirt", + deco_type = "schematic", + place_on = {"default:dry_dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna_shore"}, + y_max = 0, + y_min = 0, + schematic = minetest.get_modpath("default") .. + "/schematics/papyrus_on_dry_dirt.mts", + }) + + -- Reed + + minetest.register_decoration({ + name = "default:reed_rainforest_swamp", + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest_swamp"}, + y_max = 0, + y_min = 0, + schematic = { + size = {x = 1, y = 5, z = 1}, + data = { + {name = "default:dirt", force_place = true},{name = "swaz:reed"}, {name = "swaz:reed"}, {name = "swaz:reed"}, {name = "swaz:reed"} + } + }, + place_offset_y = 1, + }) + + minetest.register_decoration({ + name = "default:reed_savanna_shore", + deco_type = "schematic", + place_on = {"default:dry_dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna_shore"}, + y_max = 0, + y_min = 0, + schematic = { + size = {x = 1, y = 5, z = 1}, + data = { + {name = "default:dry_dirt", force_place = true},{name = "swaz:reed"}, {name = "swaz:reed"}, {name = "swaz:reed"}, {name = "swaz:reed"} + } + }, + place_offset_y = 1, + }) + + -- Bush + + minetest.register_decoration({ + name = "default:bush", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 137, + octaves = 3, + persist = 0.7, + }, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Blueberry bush + + minetest.register_decoration({ + name = "default:blueberry_bush", + deco_type = "schematic", + place_on = {"default:dirt_with_grass", "default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 697, + octaves = 3, + persist = 0.7, + }, + biomes = {"grassland", "snowy_grassland"}, + y_max = 31000, + y_min = 1, + place_offset_y = 1, + schematic = minetest.get_modpath("default") .. "/schematics/blueberry_bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Acacia bush + + minetest.register_decoration({ + name = "default:acacia_bush", + deco_type = "schematic", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 90155, + octaves = 3, + persist = 0.7, + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + schematic = minetest.get_modpath("default") .. "/schematics/acacia_bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Pine bush + + minetest.register_decoration({ + name = "default:pine_bush", + deco_type = "schematic", + place_on = {"default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = -0.004, + scale = 0.01, + spread = {x = 100, y = 100, z = 100}, + seed = 137, + octaves = 3, + persist = 0.7, + }, + biomes = {"taiga", "snowy_grassland"}, + y_max = 31000, + y_min = 4, + schematic = minetest.get_modpath("default") .. "/schematics/pine_bush.mts", + flags = "place_center_x, place_center_z", + }) + + -- Grasses + + register_grass_decoration(-0.03, 0.09, 5) + register_grass_decoration(-0.015, 0.075, 4) + register_grass_decoration(0, 0.06, 3) + register_grass_decoration(0.015, 0.045, 2) + register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses + + register_dry_grass_decoration(0.01, 0.05, 5) + register_dry_grass_decoration(0.03, 0.03, 4) + register_dry_grass_decoration(0.05, 0.01, 3) + register_dry_grass_decoration(0.07, -0.01, 2) + register_dry_grass_decoration(0.09, -0.03, 1) + + -- Ferns + + register_fern_decoration(14936, 3) + register_fern_decoration(801, 2) + register_fern_decoration(5, 1) + + -- Junglegrass + + minetest.register_decoration({ + name = "default:junglegrass", + deco_type = "simple", + place_on = {"default:dirt_with_rainforest_litter"}, + sidelen = 80, + fill_ratio = 0.1, + biomes = {"rainforest"}, + y_max = 31000, + y_min = 1, + decoration = "default:junglegrass", + }) + + -- Dry shrub + + minetest.register_decoration({ + name = "default:dry_shrub", + deco_type = "simple", + place_on = {"default:desert_sand", + "default:sand", "default:silver_sand"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.02, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert", "sandstone_desert", "cold_desert"}, + y_max = 31000, + y_min = 2, + decoration = "default:dry_shrub", + param2 = 4, + }) + + -- Rose Bush + + minetest.register_decoration({ + name = "default:rose_bush", + decoration = "default:rose_bush", + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.002, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"deciduous_forest"}, + y_max = 31000, + y_min = 2, + }) + + minetest.register_decoration({ + name = "default:bioluminiscent_plant", + decoration = "default:bioluminiscent_plant", + deco_type = "simple", + biomes = {"underground"}, + place_on = {"default:stone"}, + sidelen = 16, + noise_params = { + offset = 0.005, + scale = 0.005, + spread = {x = 20, y = 20, z = 20}, + seed = 549, + octaves = 3, + persist = 0.7 + }, + y_max = -64, + y_min = -255, + flags= "all_floors", + }) + + -- Sunflower + + minetest.register_decoration({ + name = "flowers:sunflower", + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.001, + scale = 0.0002, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"grassland"}, + y_max = 31000, + y_min = 2, + schematic = { + size = {x = 1, y = 2, z = 1}, + data = { + {name = "flowers:sunflower"}, {name = "flowers:sunflower_top"}, + } + }, + flags = "place_center_x, place_center_z, force_placement", + place_offset_y = 1, + }) + + -- Marram grass + + minetest.register_decoration({ + name = "default:marram_grass", + deco_type = "simple", + place_on = {"default:sand"}, + sidelen = 4, + noise_params = { + offset = -0.7, + scale = 4.0, + spread = {x = 16, y = 16, z = 16}, + seed = 513337, + octaves = 1, + persist = 0.0, + flags = "absvalue, eased" + }, + biomes = {"coniferous_forest_dunes", "grassland_dunes"}, + y_max = 6, + y_min = 4, + decoration = { + "default:marram_grass_1", + "default:marram_grass_2", + "default:marram_grass_3", + }, + }) + + -- Tundra moss + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:permafrost_with_stones"}, + sidelen = 4, + noise_params = { + offset = -0.8, + scale = 2.0, + spread = {x = 100, y = 100, z = 100}, + seed = 53995, + octaves = 3, + persist = 1.0 + }, + biomes = {"tundra"}, + y_max = 50, + y_min = 2, + decoration = "default:permafrost_with_moss", + place_offset_y = -1, + flags = "force_placement", + }) + + -- Tundra patchy snow + + minetest.register_decoration({ + deco_type = "simple", + place_on = { + "default:permafrost_with_moss", + "default:permafrost_with_stones", + "default:stone", + "default:gravel" + }, + sidelen = 4, + noise_params = { + offset = 0, + scale = 1.0, + spread = {x = 100, y = 100, z = 100}, + seed = 172555, + octaves = 3, + persist = 1.0 + }, + biomes = {"tundra", "tundra_beach"}, + y_max = 50, + y_min = 1, + decoration = "default:snow", + }) + + -- Coral reef + + minetest.register_decoration({ + name = "default:corals", + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 4, + noise_params = { + offset = -4, + scale = 4, + spread = {x = 50, y = 50, z = 50}, + seed = 7013, + octaves = 3, + persist = 0.7, + }, + biomes = { + "desert_ocean", + "savanna_ocean", + "rainforest_ocean", + }, + y_max = -2, + y_min = -8, + flags = "force_placement", + decoration = { + "default:coral_green", "default:coral_pink", + "default:coral_cyan", "default:coral_brown", + "default:coral_orange", "default:coral_skeleton", + }, + }) + + -- Kelp + + minetest.register_decoration({ + name = "default:kelp", + deco_type = "simple", + place_on = {"default:sand"}, + place_offset_y = -1, + sidelen = 16, + noise_params = { + offset = -0.04, + scale = 0.1, + spread = {x = 200, y = 200, z = 200}, + seed = 87112, + octaves = 3, + persist = 0.7 + }, + biomes = { + "taiga_ocean", + "snowy_grassland_ocean", + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean", + "sandstone_desert_ocean", + "cold_desert_ocean"}, + y_max = -5, + y_min = -10, + flags = "force_placement", + decoration = "default:sand_with_kelp", + param2 = 48, + param2_max = 96, + }) +end + + +-- +-- Detect mapgen to select functions +-- + +minetest.clear_registered_biomes() +minetest.clear_registered_ores() +minetest.clear_registered_decorations() + +local mg_name = minetest.get_mapgen_setting("mg_name") + +if mg_name == "v6" then + default.register_mgv6_ores() + default.register_mgv6_decorations() +else + default.register_biomes() + default.register_ores() + default.register_decorations() +end diff --git a/mods/minetest_game/default/mod.conf b/mods/minetest_game/default/mod.conf new file mode 100644 index 0000000..c9e7468 --- /dev/null +++ b/mods/minetest_game/default/mod.conf @@ -0,0 +1,3 @@ +name = default +description = Minetest Game mod: default +optional_depends = player_api diff --git a/mods/minetest_game/default/nodes.lua b/mods/minetest_game/default/nodes.lua new file mode 100644 index 0000000..c8a11e2 --- /dev/null +++ b/mods/minetest_game/default/nodes.lua @@ -0,0 +1,3004 @@ +-- mods/default/nodes.lua + +-- support for MT game translation. +local S = default.get_translator + +--[[ Node name convention: + +Although many node names are in combined-word form, the required form for new +node names is words separated by underscores. If both forms are used in written +language (for example pinewood and pine wood) the underscore form should be used. + +--]] + + +--[[ Index: + +Stone +----- +(1. Material 2. Cobble variant 3. Brick variant 4. Modified forms) + +default:stone +default:cobble +default:stonebrick +default:stone_block +default:mossycobble + +default:desert_stone +default:desert_cobble +default:desert_stonebrick +default:desert_stone_block + +default:sandstone +default:sandstonebrick +default:sandstone_block +default:desert_sandstone +default:desert_sandstone_brick +default:desert_sandstone_block +default:silver_sandstone +default:silver_sandstone_brick +default:silver_sandstone_block + +default:obsidian +default:obsidianbrick +default:obsidian_block + +Soft / Non-Stone +---------------- +(1. Material 2. Modified forms) + +default:dirt +default:dirt_with_grass +default:dirt_with_grass_footsteps +default:dirt_with_dry_grass +default:dirt_with_snow +default:dirt_with_rainforest_litter +default:dirt_with_coniferous_litter +default:dry_dirt +default:dry_dirt_with_dry_grass + +default:permafrost +default:permafrost_with_stones +default:permafrost_with_moss + +default:sand +default:desert_sand +default:silver_sand + +default:gravel + +default:clay + +default:snow +default:snowblock +default:ice +default:cave_ice + +Trees +----- +(1. Trunk 2. Fabricated trunk 3. Leaves 4. Sapling 5. Fruits) + +default:tree +default:wood +default:leaves +default:sapling +default:apple + +default:jungletree +default:junglewood +default:jungleleaves +default:junglesapling +default:emergent_jungle_sapling + +default:pine_tree +default:pine_wood +default:pine_needles +default:pine_sapling + +default:acacia_tree +default:acacia_wood +default:acacia_leaves +default:acacia_sapling + +default:aspen_tree +default:aspen_wood +default:aspen_leaves +default:aspen_sapling + +Ores +---- +(1. In stone 2. Blocks) + +default:stone_with_coal +default:coalblock + +default:stone_with_iron +default:steelblock + +default:stone_with_copper +default:copperblock + +default:stone_with_tin +default:tinblock + +default:bronzeblock + +default:stone_with_gold +default:goldblock + +default:stone_with_mese +default:mese + +default:stone_with_diamond +default:diamondblock + +Plantlife +--------- + +default:cactus +default:large_cactus_seedling + +default:papyrus +default:dry_shrub +default:junglegrass + +default:grass_1 +default:grass_2 +default:grass_3 +default:grass_4 +default:grass_5 + +default:dry_grass_1 +default:dry_grass_2 +default:dry_grass_3 +default:dry_grass_4 +default:dry_grass_5 + +default:fern_1 +default:fern_2 +default:fern_3 + +default:marram_grass_1 +default:marram_grass_2 +default:marram_grass_3 + +default:bush_stem +default:bush_leaves +default:bush_sapling +default:acacia_bush_stem +default:acacia_bush_leaves +default:acacia_bush_sapling +default:pine_bush_stem +default:pine_bush_needles +default:pine_bush_sapling +default:blueberry_bush_leaves_with_berries +default:blueberry_bush_leaves +default:blueberry_bush_sapling + +default:sand_with_kelp + +Corals +------ + +default:coral_green +default:coral_pink +default:coral_cyan +default:coral_brown +default:coral_orange +default:coral_skeleton + +Liquids +------- +(1. Source 2. Flowing) + +default:water_source +default:water_flowing + +default:river_water_source +default:river_water_flowing + +default:lava_source +default:lava_flowing + +Tools / "Advanced" crafting / Non-"natural" +------------------------------------------- + +default:bookshelf + +default:sign_wall_wood +default:sign_wall_steel + +default:ladder_wood +default:ladder_steel + +default:fence_wood +default:fence_acacia_wood +default:fence_junglewood +default:fence_pine_wood +default:fence_aspen_wood + +default:fence_rail_wood +default:fence_rail_acacia_wood +default:fence_rail_junglewood +default:fence_rail_pine_wood +default:fence_rail_aspen_wood + +default:glass +default:obsidian_glass + +default:brick + +default:meselamp +default:mese_post_light +default:mese_post_light_acacia_wood +default:mese_post_light_junglewood +default:mese_post_light_pine_wood +default:mese_post_light_aspen_wood + +Misc +---- + +default:cloud + +--]] + +-- Required wrapper to allow customization of default.after_place_leaves +local function after_place_leaves(...) + return default.after_place_leaves(...) +end + +-- Required wrapper to allow customization of default.grow_sapling +local function grow_sapling(...) + return default.grow_sapling(...) +end + +-- +-- Stone +-- + +minetest.register_node("default:stone", { + description = S("Stone"), + tiles = {"default_stone.png"}, + groups = {cracky = 3, stone = 1}, + drop = "default:cobble", + legacy_mineral = true, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:cobble", { + description = S("Cobblestone"), + tiles = {"default_cobble.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:stonebrick", { + description = S("Stone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_stone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:stone_block", { + description = S("Stone Block"), + tiles = {"default_stone_block.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:mossycobble", { + description = S("Mossy Cobblestone"), + tiles = {"default_mossycobble.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("default:desert_stone", { + description = S("Desert Stone"), + tiles = {"default_desert_stone.png"}, + groups = {cracky = 3, stone = 1}, + drop = "default:desert_cobble", + legacy_mineral = true, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_cobble", { + description = S("Desert Cobblestone"), + tiles = {"default_desert_cobble.png"}, + is_ground_content = false, + groups = {cracky = 3, stone = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_stonebrick", { + description = S("Desert Stone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_desert_stone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_stone_block", { + description = S("Desert Stone Block"), + tiles = {"default_desert_stone_block.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:sandstone", { + description = S("Sandstone"), + tiles = {"default_sandstone.png"}, + groups = {crumbly = 1, cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:sandstonebrick", { + description = S("Sandstone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_sandstone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:sandstone_block", { + description = S("Sandstone Block"), + tiles = {"default_sandstone_block.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_sandstone", { + description = S("Desert Sandstone"), + tiles = {"default_desert_sandstone.png"}, + groups = {crumbly = 1, cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_sandstone_brick", { + description = S("Desert Sandstone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_desert_sandstone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:desert_sandstone_block", { + description = S("Desert Sandstone Block"), + tiles = {"default_desert_sandstone_block.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:silver_sandstone", { + description = S("Silver Sandstone"), + tiles = {"default_silver_sandstone.png"}, + groups = {crumbly = 1, cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:silver_sandstone_brick", { + description = S("Silver Sandstone Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_silver_sandstone_brick.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:silver_sandstone_block", { + description = S("Silver Sandstone Block"), + tiles = {"default_silver_sandstone_block.png"}, + is_ground_content = false, + groups = {cracky = 2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:obsidian", { + description = S("Obsidian"), + tiles = {"default_obsidian.png"}, + sounds = default.node_sound_stone_defaults(), + groups = {cracky = 1, level = 2}, +}) + +minetest.register_node("default:obsidianbrick", { + description = S("Obsidian Brick"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_obsidian_brick.png"}, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + groups = {cracky = 1, level = 2}, +}) + +minetest.register_node("default:obsidian_block", { + description = S("Obsidian Block"), + tiles = {"default_obsidian_block.png"}, + is_ground_content = false, + sounds = default.node_sound_stone_defaults(), + groups = {cracky = 1, level = 2}, +}) + +-- +-- Soft / Non-Stone +-- + +minetest.register_node("default:dirt", { + description = S("Dirt"), + tiles = {"default_dirt.png"}, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("default:dirt_with_grass", { + description = S("Dirt with Grass"), + tiles = {"default_grass.png", "default_dirt.png", + {name = "default_dirt.png^default_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("default:dirt_with_grass_footsteps", { + description = S("Dirt with Grass and Footsteps"), + tiles = {"default_grass.png^default_footprint.png", "default_dirt.png", + {name = "default_dirt.png^default_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("default:dirt_with_dry_grass", { + description = S("Dirt with Savanna Grass"), + tiles = {"default_dry_grass.png", + "default_dirt.png", + {name = "default_dirt.png^default_dry_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:dirt_with_snow", { + description = S("Dirt with Snow"), + tiles = {"default_snow.png", "default_dirt.png", + {name = "default_dirt.png^default_snow_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.2}, + }), +}) + +minetest.register_node("default:dirt_with_rainforest_litter", { + description = S("Dirt with Rainforest Litter"), + tiles = { + "default_rainforest_litter.png", + "default_dirt.png", + {name = "default_dirt.png^default_rainforest_litter_side.png", + tileable_vertical = false} + }, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:dirt_with_coniferous_litter", { + description = S("Dirt with Coniferous Litter"), + tiles = { + "default_coniferous_litter.png", + "default_dirt.png", + {name = "default_dirt.png^default_coniferous_litter_side.png", + tileable_vertical = false} + }, + groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1}, + drop = "default:dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:dry_dirt", { + description = S("Savanna Dirt"), + tiles = {"default_dry_dirt.png"}, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("default:dry_dirt_with_dry_grass", { + description = S("Savanna Dirt with Savanna Grass"), + tiles = {"default_dry_grass.png", "default_dry_dirt.png", + {name = "default_dry_dirt.png^default_dry_grass_side.png", + tileable_vertical = false}}, + groups = {crumbly = 3, soil = 1}, + drop = "default:dry_dirt", + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.4}, + }), +}) + +minetest.register_node("default:permafrost", { + description = S("Permafrost"), + tiles = {"default_permafrost.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_dirt_defaults(), +}) + +minetest.register_node("default:permafrost_with_stones", { + description = S("Permafrost with Stones"), + tiles = {"default_permafrost.png^default_stones.png", + "default_permafrost.png", + "default_permafrost.png^default_stones_side.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_gravel_defaults(), +}) + +minetest.register_node("default:permafrost_with_moss", { + description = S("Permafrost with Moss"), + tiles = {"default_moss.png", "default_permafrost.png", + {name = "default_permafrost.png^default_moss_side.png", + tileable_vertical = false}}, + groups = {cracky = 3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("default:sand", { + description = S("Sand"), + tiles = {"default_sand.png"}, + groups = {crumbly = 3, falling_node = 1, sand = 1}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("default:desert_sand", { + description = S("Desert Sand"), + tiles = {"default_desert_sand.png"}, + groups = {crumbly = 3, falling_node = 1, sand = 1}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("default:silver_sand", { + description = S("Silver Sand"), + tiles = {"default_silver_sand.png"}, + groups = {crumbly = 3, falling_node = 1, sand = 1}, + sounds = default.node_sound_sand_defaults(), +}) + + +minetest.register_node("default:gravel", { + description = S("Gravel"), + tiles = {"default_gravel.png"}, + groups = {crumbly = 2, falling_node = 1}, + sounds = default.node_sound_gravel_defaults(), + drop = { + max_items = 1, + items = { + {items = {"default:flint"}, rarity = 16}, + {items = {"default:gravel"}} + } + } +}) + +minetest.register_node("default:clay", { + description = S("Clay"), + tiles = {"default_clay.png"}, + groups = {crumbly = 3}, + drop = "default:clay_lump 4", + sounds = default.node_sound_dirt_defaults(), +}) + + +minetest.register_node("default:snow", { + description = S("Snow"), + tiles = {"default_snow.png"}, + inventory_image = "default_snowball.png", + wield_image = "default_snowball.png", + paramtype = "light", + buildable_to = true, + floodable = true, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -6 / 16, 0.5}, + }, + }, + groups = {crumbly = 3, falling_node = 1, snowy = 1}, + sounds = default.node_sound_snow_defaults(), + + on_construct = function(pos) + pos.y = pos.y - 1 + if minetest.get_node(pos).name == "default:dirt_with_grass" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + end + end, +}) + +minetest.register_node("default:snowblock", { + description = S("Snow Block"), + tiles = {"default_snow.png"}, + groups = {crumbly = 3, cools_lava = 1, snowy = 1}, + sounds = default.node_sound_snow_defaults(), + + on_construct = function(pos) + pos.y = pos.y - 1 + if minetest.get_node(pos).name == "default:dirt_with_grass" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + end + end, +}) + +-- 'is ground content = false' to avoid tunnels in sea ice or ice rivers +minetest.register_node("default:ice", { + description = S("Ice"), + tiles = {"default_ice.png"}, + is_ground_content = false, + paramtype = "light", + groups = {cracky = 3, cools_lava = 1, slippery = 3}, + sounds = default.node_sound_ice_defaults(), +}) + +-- Mapgen-placed ice with 'is ground content = true' to contain tunnels +minetest.register_node("default:cave_ice", { + description = S("Cave Ice"), + tiles = {"default_ice.png"}, + paramtype = "light", + groups = {cracky = 3, cools_lava = 1, slippery = 3, + not_in_creative_inventory = 1}, + drop = "default:ice", + sounds = default.node_sound_ice_defaults(), +}) + +-- +-- Trees +-- + +minetest.register_node("default:tree", { + description = S("Apple Tree"), + tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:wood", { + description = S("Apple Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:sapling", { + description = S("Apple Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_sapling.png"}, + inventory_image = "default_sapling.png", + wield_image = "default_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -3, y = 1, z = -3}, + {x = 3, y = 6, z = 3}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("default:leaves", { + description = S("Apple Tree Leaves"), + drawtype = "allfaces_optional", + waving = 1, + tiles = {"default_leaves.png"}, + special_tiles = {"default_leaves_simple.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {"default:sapling"}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {"default:leaves"}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:apple", { + description = S("Apple"), + drawtype = "plantlike", + tiles = {"default_apple.png"}, + inventory_image = "default_apple.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16} + }, + groups = {fleshy = 3, dig_immediate = 3, flammable = 2, + leafdecay = 3, leafdecay_drop = 1, food_apple = 1}, + on_use = minetest.item_eat(2), + sounds = default.node_sound_leaves_defaults(), + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "default:apple", param2 = 1}) + end, + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + if oldnode.param2 == 0 then + minetest.set_node(pos, {name = "default:apple_mark"}) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end + end, +}) + +minetest.register_node("default:apple_mark", { + description = S("Apple Marker"), + inventory_image = "default_apple.png^default_invisible_node_overlay.png", + wield_image = "default_apple.png^default_invisible_node_overlay.png", + drawtype = "airlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + on_timer = function(pos, elapsed) + if not minetest.find_node_near(pos, 1, "default:leaves") then + minetest.remove_node(pos) + elseif minetest.get_node_light(pos) < 11 then + minetest.get_node_timer(pos):start(200) + else + minetest.set_node(pos, {name = "default:apple"}) + end + end +}) + + +minetest.register_node("default:jungletree", { + description = S("Jungle Tree"), + tiles = {"default_jungletree_top.png", "default_jungletree_top.png", + "default_jungletree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:junglewood", { + description = S("Jungle Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_junglewood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:jungleleaves", { + description = S("Jungle Tree Leaves"), + drawtype = "allfaces_optional", + waving = 1, + tiles = {"default_jungleleaves.png"}, + special_tiles = {"default_jungleleaves_simple.png"}, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:junglesapling"}, rarity = 20}, + {items = {"default:jungleleaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:junglesapling", { + description = S("Jungle Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_junglesapling.png"}, + inventory_image = "default_junglesapling.png", + wield_image = "default_junglesapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:junglesapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 15, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("default:emergent_jungle_sapling", { + description = S("Emergent Jungle Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_emergent_jungle_sapling.png"}, + inventory_image = "default_emergent_jungle_sapling.png", + wield_image = "default_emergent_jungle_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:emergent_jungle_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -3, y = -5, z = -3}, + {x = 3, y = 31, z = 3}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + + +minetest.register_node("default:pine_tree", { + description = S("Pine Tree"), + tiles = {"default_pine_tree_top.png", "default_pine_tree_top.png", + "default_pine_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:pine_wood", { + description = S("Pine Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_pine_wood.png"}, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:pine_needles",{ + description = S("Pine Needles"), + drawtype = "allfaces_optional", + tiles = {"default_pine_needles.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:pine_sapling"}, rarity = 20}, + {items = {"default:pine_needles"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:pine_sapling", { + description = S("Pine Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_pine_sapling.png"}, + inventory_image = "default_pine_sapling.png", + wield_image = "default_pine_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 3, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:pine_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 14, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + + +minetest.register_node("default:acacia_tree", { + description = S("Acacia Tree"), + tiles = {"default_acacia_tree_top.png", "default_acacia_tree_top.png", + "default_acacia_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:acacia_wood", { + description = S("Acacia Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_acacia_wood.png"}, + is_ground_content = false, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:acacia_leaves", { + description = S("Acacia Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_acacia_leaves.png"}, + special_tiles = {"default_acacia_leaves_simple.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:acacia_sapling"}, rarity = 20}, + {items = {"default:acacia_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:acacia_sapling", { + description = S("Acacia Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_acacia_sapling.png"}, + inventory_image = "default_acacia_sapling.png", + wield_image = "default_acacia_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:acacia_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -4, y = 1, z = -4}, + {x = 4, y = 7, z = 4}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +minetest.register_node("default:aspen_tree", { + description = S("Aspen Tree"), + tiles = {"default_aspen_tree_top.png", "default_aspen_tree_top.png", + "default_aspen_tree.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node("default:aspen_wood", { + description = S("Aspen Wood Planks"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = {"default_aspen_wood.png"}, + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:aspen_leaves", { + description = S("Aspen Tree Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_aspen_leaves.png"}, + waving = 1, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:aspen_sapling"}, rarity = 20}, + {items = {"default:aspen_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:aspen_sapling", { + description = S("Aspen Tree Sapling"), + drawtype = "plantlike", + tiles = {"default_aspen_sapling.png"}, + inventory_image = "default_aspen_sapling.png", + wield_image = "default_aspen_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 3, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:aspen_sapling", + -- minp, maxp to be checked, relative to sapling pos + -- minp_relative.y = 1 because sapling pos has been checked + {x = -2, y = 1, z = -2}, + {x = 2, y = 12, z = 2}, + -- maximum interval of interior volume check + 4) + + return itemstack + end, +}) + +-- +-- Ores +-- + +minetest.register_node("default:stone_with_coal", { + description = S("Coal Ore"), + tiles = {"default_stone.png^default_mineral_coal.png"}, + groups = {cracky = 3}, + drop = "default:coal_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:coalblock", { + description = S("Coal Block"), + tiles = {"default_coal_block.png"}, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("default:stone_with_iron", { + description = S("Iron Ore"), + tiles = {"default_stone.png^default_mineral_iron.png"}, + groups = {cracky = 2}, + drop = "default:iron_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:steelblock", { + description = S("Steel Block"), + tiles = {"default_steel_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_copper", { + description = S("Copper Ore"), + tiles = {"default_stone.png^default_mineral_copper.png"}, + groups = {cracky = 2}, + drop = "default:copper_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:copperblock", { + description = S("Copper Block"), + tiles = {"default_copper_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_tin", { + description = S("Tin Ore"), + tiles = {"default_stone.png^default_mineral_tin.png"}, + groups = {cracky = 2}, + drop = "default:tin_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:tinblock", { + description = S("Tin Block"), + tiles = {"default_tin_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:bronzeblock", { + description = S("Bronze Block"), + tiles = {"default_bronze_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_mese", { + description = S("Mese Ore"), + tiles = {"default_stone.png^default_mineral_mese.png"}, + groups = {cracky = 1}, + drop = "default:mese_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:mese", { + description = S("Mese Block"), + tiles = {"default_mese_block.png"}, + paramtype = "light", + groups = {cracky = 1, level = 2}, + sounds = default.node_sound_stone_defaults(), + light_source = 3, +}) + + +minetest.register_node("default:stone_with_gold", { + description = S("Gold Ore"), + tiles = {"default_stone.png^default_mineral_gold.png"}, + groups = {cracky = 2}, + drop = "default:gold_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:goldblock", { + description = S("Gold Block"), + tiles = {"default_gold_block.png"}, + is_ground_content = false, + groups = {cracky = 1}, + sounds = default.node_sound_metal_defaults(), +}) + + +minetest.register_node("default:stone_with_diamond", { + description = S("Diamond Ore"), + tiles = {"default_stone.png^default_mineral_diamond.png"}, + groups = {cracky = 1}, + drop = "default:diamond", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:diamondblock", { + description = S("Diamond Block"), + tiles = {"default_diamond_block.png"}, + is_ground_content = false, + groups = {cracky = 1, level = 3}, + sounds = default.node_sound_stone_defaults(), +}) + +-- +-- Plantlife (non-cubic) +-- + +minetest.register_node("default:cactus", { + description = S("Cactus"), + tiles = {"default_cactus_top.png", "default_cactus_top.png", + "default_cactus_side.png"}, + paramtype2 = "facedir", + groups = {choppy = 3}, + sounds = default.node_sound_wood_defaults(), + on_place = minetest.rotate_node, +}) + +minetest.register_node("default:large_cactus_seedling", { + description = S("Large Cactus Seedling"), + drawtype = "plantlike", + tiles = {"default_large_cactus_seedling.png"}, + inventory_image = "default_large_cactus_seedling.png", + wield_image = "default_large_cactus_seedling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = { + -5 / 16, -0.5, -5 / 16, + 5 / 16, 0.5, 5 / 16 + } + }, + groups = {choppy = 3, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_wood_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:large_cactus_seedling", + {x = -2, y = -1, z = -2}, + {x = 2, y = 5, z = 2}, + 4) + + return itemstack + end, + + on_construct = function(pos) + -- Normal cactus farming adds 1 cactus node by ABM, + -- interval 12s, chance 83. + -- Consider starting with 5 cactus nodes. We make sure that growing a + -- large cactus is not a faster way to produce new cactus nodes. + -- Confirmed by experiment, when farming 5 cacti, on average 1 new + -- cactus node is added on average every + -- 83 / 5 = 16.6 intervals = 16.6 * 12 = 199.2s. + -- Large cactus contains on average 14 cactus nodes. + -- 14 * 199.2 = 2788.8s. + -- Set random range to average to 2789s. + minetest.get_node_timer(pos):start(math.random(1859, 3719)) + end, + + on_timer = function(pos) + local node_under = minetest.get_node_or_nil( + {x = pos.x, y = pos.y - 1, z = pos.z}) + if not node_under then + -- Node under not yet loaded, try later + minetest.get_node_timer(pos):start(300) + return + end + + if minetest.get_item_group(node_under.name, "sand") == 0 then + -- Seedling dies + minetest.remove_node(pos) + return + end + + local light_level = minetest.get_node_light(pos) + if not light_level or light_level < 13 then + -- Too dark for growth, try later in case it's night + minetest.get_node_timer(pos):start(300) + return + end + + minetest.log("action", "A large cactus seedling grows into a large" .. + "cactus at ".. minetest.pos_to_string(pos)) + default.grow_large_cactus(pos) + end, +}) + +minetest.register_node("default:papyrus", { + description = S("Papyrus"), + drawtype = "plantlike", + tiles = {"default_papyrus.png"}, + inventory_image = "default_papyrus.png", + wield_image = "default_papyrus.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, + }, + groups = {snappy = 3, flammable = 2}, + sounds = default.node_sound_leaves_defaults(), + + after_dig_node = function(pos, node, metadata, digger) + default.dig_up(pos, node, digger) + end, +}) + +minetest.register_node("default:dry_shrub", { + description = S("Dry Shrub"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_dry_shrub.png"}, + inventory_image = "default_dry_shrub.png", + wield_image = "default_dry_shrub.png", + paramtype = "light", + paramtype2 = "meshoptions", + place_param2 = 4, + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16}, + }, +}) + +minetest.register_node("default:rose_bush", { + description = S("Rose Bush"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_rose_bush.png"}, + inventory_image = "default_rose_bush.png", + wield_image = "default_rose_bush.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flower =1, flora=1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16}, + }, +}) + +minetest.register_node("default:bioluminiscent_plant", { + description = S("Bioluminiscent Plant"), + drawtype = "plantlike", + tiles = {"default_bioluminiscent_plant.png"}, + inventory_image = "default_bioluminiscent_plant.png", + wield_image = "default_bioluminiscent_plant.png", + paramtype = "light", + sunlight_propagates = true, + light_source = minetest.LIGHT_MAX - 10, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flower =1, flora=1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 3.5 / 16, 4 / 16}, + }, +}) + +minetest.register_node("default:junglegrass", { + description = S("Jungle Grass"), + drawtype = "plantlike", + waving = 1, + visual_scale = 1.69, + tiles = {"default_junglegrass.png"}, + inventory_image = "default_junglegrass.png", + wield_image = "default_junglegrass.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, junglegrass = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16}, + }, +}) + +minetest.register_node("default:grass_1", { + description = S("Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_1.png"}, + -- Use texture of a taller grass stage in inventory + inventory_image = "default_grass_3.png", + wield_image = "default_grass_3.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, + normal_grass = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random grass node + local stack = ItemStack("default:grass_" .. math.random(1,5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 5 do + minetest.register_node("default:grass_" .. i, { + description = S("Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_grass_" .. i .. ".png"}, + inventory_image = "default_grass_" .. i .. ".png", + wield_image = "default_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "default:grass_1", + groups = {snappy = 3, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, grass = 1, + normal_grass = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:dry_grass_1", { + description = S("Savanna Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_dry_grass_1.png"}, + inventory_image = "default_dry_grass_3.png", + wield_image = "default_dry_grass_3.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, + attached_node = 1, grass = 1, dry_grass = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random dry grass node + local stack = ItemStack("default:dry_grass_" .. math.random(1, 5)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:dry_grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 5 do + minetest.register_node("default:dry_grass_" .. i, { + description = S("Savanna Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_dry_grass_" .. i .. ".png"}, + inventory_image = "default_dry_grass_" .. i .. ".png", + wield_image = "default_dry_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, + not_in_creative_inventory = 1, grass = 1, dry_grass = 1}, + drop = "default:dry_grass_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:fern_1", { + description = S("Fern"), + drawtype = "plantlike", + visual_scale = 0.8, + waving = 1, + tiles = {"default_fern_1.png"}, + inventory_image = "default_fern_1.png", + wield_image = "default_fern_1.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, grass = 1, + fern = 1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random fern node + local stack = ItemStack("default:fern_" .. math.random(1, 3)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:fern_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 3 do + minetest.register_node("default:fern_" .. i, { + description = S("Fern"), + drawtype = "plantlike", + waving = 1, + visual_scale = 1.0, + tiles = {"default_fern_" .. i .. ".png"}, + inventory_image = "default_fern_" .. i .. ".png", + wield_image = "default_fern_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, + grass = 1, fern = 1, not_in_creative_inventory = 1}, + drop = "default:fern_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:marram_grass_1", { + description = S("Marram Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_marram_grass_1.png"}, + inventory_image = "default_marram_grass_1.png", + wield_image = "default_marram_grass_1.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, grass = 1, marram_grass = 1, + attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + + on_place = function(itemstack, placer, pointed_thing) + -- place a random marram grass node + local stack = ItemStack("default:marram_grass_" .. math.random(1, 3)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack("default:marram_grass_1 " .. + itemstack:get_count() - (1 - ret:get_count())) + end, +}) + +for i = 2, 3 do + minetest.register_node("default:marram_grass_" .. i, { + description = S("Marram Grass"), + drawtype = "plantlike", + waving = 1, + tiles = {"default_marram_grass_" .. i .. ".png"}, + inventory_image = "default_marram_grass_" .. i .. ".png", + wield_image = "default_marram_grass_" .. i .. ".png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, + grass = 1, marram_grass = 1, not_in_creative_inventory = 1}, + drop = "default:marram_grass_1", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25, 6 / 16}, + }, + }) +end + + +minetest.register_node("default:bush_stem", { + description = S("Bush Stem"), + drawtype = "plantlike", + visual_scale = 1.41, + tiles = {"default_bush_stem.png"}, + inventory_image = "default_bush_stem.png", + wield_image = "default_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}, + }, +}) + +minetest.register_node("default:bush_leaves", { + description = S("Bush Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_leaves_simple.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:bush_sapling"}, rarity = 5}, + {items = {"default:bush_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:bush_sapling", { + description = S("Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_bush_sapling.png"}, + inventory_image = "default_bush_sapling.png", + wield_image = "default_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + +minetest.register_node("default:blueberry_bush_leaves_with_berries", { + description = S("Blueberry Bush Leaves with Berries"), + drawtype = "allfaces_optional", + tiles = {"default_blueberry_bush_leaves.png^default_blueberry_overlay.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1, dig_immediate = 3}, + drop = "default:blueberries", + sounds = default.node_sound_leaves_defaults(), + node_dig_prediction = "default:blueberry_bush_leaves", + + after_dig_node = function(pos, oldnode, oldmetadata, digger) + minetest.set_node(pos, {name = "default:blueberry_bush_leaves"}) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, +}) + +minetest.register_node("default:blueberry_bush_leaves", { + description = S("Blueberry Bush Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_blueberry_bush_leaves.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:blueberry_bush_sapling"}, rarity = 5}, + {items = {"default:blueberry_bush_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) < 11 then + minetest.get_node_timer(pos):start(200) + else + minetest.set_node(pos, {name = "default:blueberry_bush_leaves_with_berries"}) + end + end, + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:blueberry_bush_sapling", { + description = S("Blueberry Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_blueberry_bush_sapling.png"}, + inventory_image = "default_blueberry_bush_sapling.png", + wield_image = "default_blueberry_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:blueberry_bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + +minetest.register_node("default:acacia_bush_stem", { + description = S("Acacia Bush Stem"), + drawtype = "plantlike", + visual_scale = 1.41, + tiles = {"default_acacia_bush_stem.png"}, + inventory_image = "default_acacia_bush_stem.png", + wield_image = "default_acacia_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}, + }, +}) + +minetest.register_node("default:acacia_bush_leaves", { + description = S("Acacia Bush Leaves"), + drawtype = "allfaces_optional", + tiles = {"default_acacia_leaves_simple.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:acacia_bush_sapling"}, rarity = 5}, + {items = {"default:acacia_bush_leaves"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:acacia_bush_sapling", { + description = S("Acacia Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_acacia_bush_sapling.png"}, + inventory_image = "default_acacia_bush_sapling.png", + wield_image = "default_acacia_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:acacia_bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + +minetest.register_node("default:pine_bush_stem", { + description = S("Pine Bush Stem"), + drawtype = "plantlike", + visual_scale = 1.41, + tiles = {"default_pine_bush_stem.png"}, + inventory_image = "default_pine_bush_stem.png", + wield_image = "default_pine_bush_stem.png", + paramtype = "light", + sunlight_propagates = true, + groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16}, + }, +}) + +minetest.register_node("default:pine_bush_needles", { + description = S("Pine Bush Needles"), + drawtype = "allfaces_optional", + tiles = {"default_pine_needles.png"}, + paramtype = "light", + groups = {snappy = 3, flammable = 2, leaves = 1}, + drop = { + max_items = 1, + items = { + {items = {"default:pine_bush_sapling"}, rarity = 5}, + {items = {"default:pine_bush_needles"}} + } + }, + sounds = default.node_sound_leaves_defaults(), + + after_place_node = after_place_leaves, +}) + +minetest.register_node("default:pine_bush_sapling", { + description = S("Pine Bush Sapling"), + drawtype = "plantlike", + tiles = {"default_pine_bush_sapling.png"}, + inventory_image = "default_pine_bush_sapling.png", + wield_image = "default_pine_bush_sapling.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + on_timer = grow_sapling, + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16} + }, + groups = {snappy = 2, dig_immediate = 3, flammable = 2, + attached_node = 1, sapling = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end, + + on_place = function(itemstack, placer, pointed_thing) + itemstack = default.sapling_on_place(itemstack, placer, pointed_thing, + "default:pine_bush_sapling", + -- minp, maxp to be checked, relative to sapling pos + {x = -1, y = 0, z = -1}, + {x = 1, y = 1, z = 1}, + -- maximum interval of interior volume check + 2) + + return itemstack + end, +}) + + +minetest.register_node("default:sand_with_kelp", { + description = S("Kelp"), + drawtype = "plantlike_rooted", + waving = 1, + tiles = {"default_sand.png"}, + special_tiles = {{name = "default_kelp.png", tileable_vertical = true}}, + inventory_image = "default_kelp.png", + wield_image = "default_kelp.png", + paramtype = "light", + paramtype2 = "leveled", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-2/16, 0.5, -2/16, 2/16, 3.5, 2/16}, + }, + }, + node_dig_prediction = "default:sand", + node_placement_prediction = "", + sounds = default.node_sound_sand_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = function(itemstack, placer, pointed_thing) + -- Call on_rightclick if the pointed node defines it + if pointed_thing.type == "node" and placer and + not placer:get_player_control().sneak then + local node_ptu = minetest.get_node(pointed_thing.under) + local def_ptu = minetest.registered_nodes[node_ptu.name] + if def_ptu and def_ptu.on_rightclick then + return def_ptu.on_rightclick(pointed_thing.under, node_ptu, placer, + itemstack, pointed_thing) + end + end + + local pos = pointed_thing.under + if minetest.get_node(pos).name ~= "default:sand" then + return itemstack + end + + local height = math.random(4, 6) + local pos_top = {x = pos.x, y = pos.y + height, z = pos.z} + local node_top = minetest.get_node(pos_top) + local def_top = minetest.registered_nodes[node_top.name] + local player_name = placer:get_player_name() + + if def_top and def_top.liquidtype == "source" and + minetest.get_item_group(node_top.name, "water") > 0 then + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pos_top, player_name) then + minetest.set_node(pos, {name = "default:sand_with_kelp", + param2 = height * 16}) + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:sand"}) + end +}) + + +-- +-- Corals +-- + +local function coral_on_place(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" or not placer then + return itemstack + end + + local player_name = placer:get_player_name() + local pos_under = pointed_thing.under + local pos_above = pointed_thing.above + local node_under = minetest.get_node(pos_under) + local def_under = minetest.registered_nodes[node_under.name] + + if def_under and def_under.on_rightclick and not placer:get_player_control().sneak then + return def_under.on_rightclick(pos_under, node_under, + placer, itemstack, pointed_thing) or itemstack + end + + if node_under.name ~= "default:coral_skeleton" or + minetest.get_node(pos_above).name ~= "default:water_source" then + return itemstack + end + + if minetest.is_protected(pos_under, player_name) or + minetest.is_protected(pos_above, player_name) then + minetest.log("action", player_name + .. " tried to place " .. itemstack:get_name() + .. " at protected position " + .. minetest.pos_to_string(pos_under)) + minetest.record_protection_violation(pos_under, player_name) + return itemstack + end + + node_under.name = itemstack:get_name() + minetest.set_node(pos_under, node_under) + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + + return itemstack +end + +minetest.register_node("default:coral_green", { + description = S("Green Coral"), + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_coral_skeleton.png"}, + special_tiles = {{name = "default_coral_green.png", tileable_vertical = true}}, + inventory_image = "default_coral_green.png", + wield_image = "default_coral_green.png", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:coral_skeleton", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = coral_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:coral_skeleton"}) + end, +}) + +minetest.register_node("default:coral_pink", { + description = S("Pink Coral"), + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_coral_skeleton.png"}, + special_tiles = {{name = "default_coral_pink.png", tileable_vertical = true}}, + inventory_image = "default_coral_pink.png", + wield_image = "default_coral_pink.png", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:coral_skeleton", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = coral_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:coral_skeleton"}) + end, +}) + +minetest.register_node("default:coral_cyan", { + description = S("Cyan Coral"), + drawtype = "plantlike_rooted", + waving = 1, + paramtype = "light", + tiles = {"default_coral_skeleton.png"}, + special_tiles = {{name = "default_coral_cyan.png", tileable_vertical = true}}, + inventory_image = "default_coral_cyan.png", + wield_image = "default_coral_cyan.png", + groups = {snappy = 3}, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + {-4/16, 0.5, -4/16, 4/16, 1.5, 4/16}, + }, + }, + node_dig_prediction = "default:coral_skeleton", + node_placement_prediction = "", + sounds = default.node_sound_stone_defaults({ + dig = {name = "default_dig_snappy", gain = 0.2}, + dug = {name = "default_grass_footstep", gain = 0.25}, + }), + + on_place = coral_on_place, + + after_destruct = function(pos, oldnode) + minetest.set_node(pos, {name = "default:coral_skeleton"}) + end, +}) + +minetest.register_node("default:coral_brown", { + description = S("Brown Coral"), + tiles = {"default_coral_brown.png"}, + groups = {cracky = 3}, + drop = "default:coral_skeleton", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:coral_orange", { + description = S("Orange Coral"), + tiles = {"default_coral_orange.png"}, + groups = {cracky = 3}, + drop = "default:coral_skeleton", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("default:coral_skeleton", { + description = S("Coral Skeleton"), + tiles = {"default_coral_skeleton.png"}, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + + +-- +-- Liquids +-- + +minetest.register_node("default:water_source", { + description = S("Water Source"), + drawtype = "liquid", + waving = 3, + tiles = { + { + name = "default_water_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + { + name = "default_water_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + use_texture_alpha = "blend", + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:water_flowing", + liquid_alternative_source = "default:water_source", + liquid_viscosity = 1, + post_effect_color = {a = 103, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + +minetest.register_node("default:water_flowing", { + description = S("Flowing Water"), + drawtype = "flowingliquid", + waving = 3, + tiles = {"default_water.png"}, + special_tiles = { + { + name = "default_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + { + name = "default_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + }, + use_texture_alpha = "blend", + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:water_flowing", + liquid_alternative_source = "default:water_source", + liquid_viscosity = 1, + post_effect_color = {a = 103, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, + cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + + +minetest.register_node("default:river_water_source", { + description = S("River Water Source"), + drawtype = "liquid", + tiles = { + { + name = "default_river_water_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + { + name = "default_river_water_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + use_texture_alpha = "blend", + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:river_water_flowing", + liquid_alternative_source = "default:river_water_source", + liquid_viscosity = 1, + -- Not renewable to avoid horizontal spread of water sources in sloping + -- rivers that can cause water to overflow riverbanks and cause floods. + -- River water source is instead made renewable by the 'force renew' + -- option used in the 'bucket' mod by the river water bucket. + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 103, r = 30, g = 76, b = 90}, + groups = {water = 3, liquid = 3, cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + +minetest.register_node("default:river_water_flowing", { + description = S("Flowing River Water"), + drawtype = "flowingliquid", + tiles = {"default_river_water.png"}, + special_tiles = { + { + name = "default_river_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + { + name = "default_river_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.5, + }, + }, + }, + use_texture_alpha = "blend", + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:river_water_flowing", + liquid_alternative_source = "default:river_water_source", + liquid_viscosity = 1, + liquid_renewable = false, + liquid_range = 2, + post_effect_color = {a = 103, r = 30, g = 76, b = 90}, + groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, + cools_lava = 1}, + sounds = default.node_sound_water_defaults(), +}) + + +minetest.register_node("default:lava_source", { + description = S("Lava Source"), + drawtype = "liquid", + tiles = { + { + name = "default_lava_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.0, + }, + }, + { + name = "default_lava_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.0, + }, + }, + }, + paramtype = "light", + light_source = default.LIGHT_MAX - 1, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "default:lava_flowing", + liquid_alternative_source = "default:lava_source", + liquid_viscosity = 7, + liquid_renewable = false, + damage_per_second = 4 * 2, + post_effect_color = {a = 191, r = 255, g = 64, b = 0}, + groups = {lava = 3, liquid = 2, igniter = 1}, +}) + +minetest.register_node("default:lava_flowing", { + description = S("Flowing Lava"), + drawtype = "flowingliquid", + tiles = {"default_lava.png"}, + special_tiles = { + { + name = "default_lava_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.3, + }, + }, + { + name = "default_lava_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 3.3, + }, + }, + }, + paramtype = "light", + paramtype2 = "flowingliquid", + light_source = default.LIGHT_MAX - 1, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "default:lava_flowing", + liquid_alternative_source = "default:lava_source", + liquid_viscosity = 7, + liquid_renewable = false, + damage_per_second = 4 * 2, + post_effect_color = {a = 191, r = 255, g = 64, b = 0}, + groups = {lava = 3, liquid = 2, igniter = 1, + not_in_creative_inventory = 1}, +}) + +-- +-- Tools / "Advanced" crafting / Non-"natural" +-- + +local bookshelf_formspec = + "size[8,7;]" .. + "list[context;books;0,0.3;8,2;]" .. + "list[current_player;main;0,2.85;8,1;]" .. + "list[current_player;main;0,4.08;8,3;8]" .. + "listring[context;books]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0,2.85) + +local function update_bookshelf(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local invlist = inv:get_list("books") + + local formspec = bookshelf_formspec + -- Inventory slots overlay + local bx, by = 0, 0.3 + local n_written, n_empty = 0, 0 + for i = 1, 16 do + if i == 9 then + bx = 0 + by = by + 1 + end + local stack = invlist[i] + if stack:is_empty() then + formspec = formspec .. + "image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]" + else + local metatable = stack:get_meta():to_table() or {} + if metatable.fields and metatable.fields.text then + n_written = n_written + stack:get_count() + else + n_empty = n_empty + stack:get_count() + end + end + bx = bx + 1 + end + meta:set_string("formspec", formspec) + if n_written + n_empty == 0 then + meta:set_string("infotext", S("Empty Bookshelf")) + else + meta:set_string("infotext", S("Bookshelf (@1 written, @2 empty books)", n_written, n_empty)) + end +end + +minetest.register_node("default:bookshelf", { + description = S("Bookshelf"), + tiles = {"default_wood.png", "default_wood.png", "default_wood.png", + "default_wood.png", "default_bookshelf.png", "default_bookshelf.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("books", 8 * 2) + update_bookshelf(pos) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("books") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack) + if minetest.get_item_group(stack:get_name(), "book") ~= 0 then + return stack:get_count() + end + return 0 + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in bookshelf at " .. minetest.pos_to_string(pos)) + update_bookshelf(pos) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " puts stuff to bookshelf at " .. minetest.pos_to_string(pos)) + update_bookshelf(pos) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from bookshelf at " .. minetest.pos_to_string(pos)) + update_bookshelf(pos) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "books", drops) + drops[#drops+1] = "default:bookshelf" + minetest.remove_node(pos) + return drops + end, +}) + +local function register_sign(material, desc, def) + minetest.register_node("default:sign_wall_" .. material, { + description = desc, + drawtype = "nodebox", + tiles = {"default_sign_wall_" .. material .. ".png"}, + inventory_image = "default_sign_" .. material .. ".png", + wield_image = "default_sign_" .. material .. ".png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + use_texture_alpha = "opaque", + node_box = { + type = "wallmounted", + wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125}, + wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125}, + wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375}, + }, + groups = def.groups, + legacy_wallmounted = true, + sounds = def.sounds, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", "field[text;;${text}]") + end, + on_receive_fields = function(pos, formname, fields, sender) + local player_name = sender:get_player_name() + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return + end + local text = fields.text + if not text then + return + end + if string.len(text) > 512 then + minetest.chat_send_player(player_name, S("Text too long")) + return + end + minetest.log("action", player_name .. " wrote \"" .. text .. + "\" to the sign at " .. minetest.pos_to_string(pos)) + local meta = minetest.get_meta(pos) + meta:set_string("text", text) + + if #text > 0 then + meta:set_string("infotext", S('"@1"', text)) + else + meta:set_string("infotext", '') + end + end, + }) +end + +register_sign("wood", S("Wooden Sign"), { + sounds = default.node_sound_wood_defaults(), + groups = {choppy = 2, attached_node = 1, flammable = 2, oddly_breakable_by_hand = 3} +}) + +register_sign("steel", S("Steel Sign"), { + sounds = default.node_sound_metal_defaults(), + groups = {cracky = 2, attached_node = 1} +}) + +minetest.register_node("default:ladder_wood", { + description = S("Wooden Ladder"), + drawtype = "signlike", + tiles = {"default_ladder_wood.png"}, + inventory_image = "default_ladder_wood.png", + wield_image = "default_ladder_wood.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + climbable = true, + is_ground_content = false, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + }, + groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2}, + legacy_wallmounted = true, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:ladder_steel", { + description = S("Steel Ladder"), + drawtype = "signlike", + tiles = {"default_ladder_steel.png"}, + inventory_image = "default_ladder_steel.png", + wield_image = "default_ladder_steel.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + climbable = true, + is_ground_content = false, + selection_box = { + type = "wallmounted", + --wall_top = = + --wall_bottom = = + --wall_side = = + }, + groups = {cracky = 2}, + sounds = default.node_sound_metal_defaults(), +}) + +default.register_fence("default:fence_wood", { + description = S("Apple Wood Fence"), + texture = "default_fence_wood.png", + inventory_image = "default_fence_overlay.png^default_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_acacia_wood", { + description = S("Acacia Wood Fence"), + texture = "default_fence_acacia_wood.png", + inventory_image = "default_fence_overlay.png^default_acacia_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_acacia_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:acacia_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_junglewood", { + description = S("Jungle Wood Fence"), + texture = "default_fence_junglewood.png", + inventory_image = "default_fence_overlay.png^default_junglewood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_junglewood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:junglewood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_pine_wood", { + description = S("Pine Wood Fence"), + texture = "default_fence_pine_wood.png", + inventory_image = "default_fence_overlay.png^default_pine_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_pine_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:pine_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence("default:fence_aspen_wood", { + description = S("Aspen Wood Fence"), + texture = "default_fence_aspen_wood.png", + inventory_image = "default_fence_overlay.png^default_aspen_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_aspen_wood.png^" .. + "default_fence_overlay.png^[makealpha:255,126,126", + material = "default:aspen_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_wood", { + description = S("Apple Wood Fence Rail"), + texture = "default_fence_rail_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_acacia_wood", { + description = S("Acacia Wood Fence Rail"), + texture = "default_fence_rail_acacia_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_acacia_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:acacia_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_junglewood", { + description = S("Jungle Wood Fence Rail"), + texture = "default_fence_rail_junglewood.png", + inventory_image = "default_fence_rail_overlay.png^default_junglewood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_junglewood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:junglewood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_pine_wood", { + description = S("Pine Wood Fence Rail"), + texture = "default_fence_rail_pine_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_pine_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_pine_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:pine_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults() +}) + +default.register_fence_rail("default:fence_rail_aspen_wood", { + description = S("Aspen Wood Fence Rail"), + texture = "default_fence_rail_aspen_wood.png", + inventory_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_rail_overlay.png^default_aspen_wood.png^" .. + "default_fence_rail_overlay.png^[makealpha:255,126,126", + material = "default:aspen_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults() +}) + +minetest.register_node("default:glass", { + description = S("Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"default_glass.png", "default_glass_detail.png"}, + use_texture_alpha = "clip", -- only needed for stairs API + paramtype = "light", + paramtype2 = "glasslikeliquidlevel", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("default:obsidian_glass", { + description = S("Obsidian Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"}, + use_texture_alpha = "clip", -- only needed for stairs API + paramtype = "light", + paramtype2 = "glasslikeliquidlevel", + is_ground_content = false, + sunlight_propagates = true, + sounds = default.node_sound_glass_defaults(), + groups = {cracky = 3}, +}) + + +minetest.register_node("default:brick", { + description = S("Brick Block"), + paramtype2 = "facedir", + place_param2 = 0, + tiles = { + "default_brick.png^[transformFX", + "default_brick.png", + }, + is_ground_content = false, + groups = {cracky = 3}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("default:meselamp", { + description = S("Mese Lamp"), + drawtype = "glasslike", + tiles = {"default_meselamp.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = default.node_sound_glass_defaults(), + light_source = default.LIGHT_MAX, +}) + +default.register_mesepost("default:mese_post_light", { + description = S("Apple Wood Mese Post Light"), + texture = "default_fence_wood.png", + material = "default:wood", +}) + +default.register_mesepost("default:mese_post_light_acacia_wood", { + description = S("Acacia Wood Mese Post Light"), + texture = "default_fence_acacia_wood.png", + material = "default:acacia_wood", +}) + +default.register_mesepost("default:mese_post_light_junglewood", { + description = S("Jungle Wood Mese Post Light"), + texture = "default_fence_junglewood.png", + material = "default:junglewood", +}) + +default.register_mesepost("default:mese_post_light_pine_wood", { + description = S("Pine Wood Mese Post Light"), + texture = "default_fence_pine_wood.png", + material = "default:pine_wood", +}) + +default.register_mesepost("default:mese_post_light_aspen_wood", { + description = S("Aspen Wood Mese Post Light"), + texture = "default_fence_aspen_wood.png", + material = "default:aspen_wood", +}) + +-- +-- Misc +-- + +minetest.register_node("default:cloud", { + description = S("Cloud"), + tiles = {"default_cloud.png"}, + is_ground_content = false, + sounds = default.node_sound_defaults(), + groups = {not_in_creative_inventory = 1}, +}) + +-- +-- register trees for leafdecay +-- + +if minetest.get_mapgen_setting("mg_name") == "v6" then + default.register_leafdecay({ + trunks = {"default:tree"}, + leaves = {"default:apple", "default:leaves"}, + radius = 2, + }) + + default.register_leafdecay({ + trunks = {"default:jungletree"}, + leaves = {"default:jungleleaves"}, + radius = 3, + }) +else + default.register_leafdecay({ + trunks = {"default:tree"}, + leaves = {"default:apple", "default:leaves"}, + radius = 3, + }) + + default.register_leafdecay({ + trunks = {"default:jungletree"}, + leaves = {"default:jungleleaves"}, + radius = 2, + }) +end + +default.register_leafdecay({ + trunks = {"default:pine_tree"}, + leaves = {"default:pine_needles"}, + radius = 3, +}) + +default.register_leafdecay({ + trunks = {"default:acacia_tree"}, + leaves = {"default:acacia_leaves"}, + radius = 2, +}) + +default.register_leafdecay({ + trunks = {"default:aspen_tree"}, + leaves = {"default:aspen_leaves"}, + radius = 3, +}) + +default.register_leafdecay({ + trunks = {"default:bush_stem"}, + leaves = {"default:bush_leaves"}, + radius = 1, +}) + +default.register_leafdecay({ + trunks = {"default:acacia_bush_stem"}, + leaves = {"default:acacia_bush_leaves"}, + radius = 1, +}) + +default.register_leafdecay({ + trunks = {"default:pine_bush_stem"}, + leaves = {"default:pine_bush_needles"}, + radius = 1, +}) diff --git a/mods/minetest_game/default/schematics/acacia_bush.mts b/mods/minetest_game/default/schematics/acacia_bush.mts new file mode 100644 index 0000000..3322e3b Binary files /dev/null and b/mods/minetest_game/default/schematics/acacia_bush.mts differ diff --git a/mods/minetest_game/default/schematics/acacia_log.mts b/mods/minetest_game/default/schematics/acacia_log.mts new file mode 100644 index 0000000..aff3bd6 Binary files /dev/null and b/mods/minetest_game/default/schematics/acacia_log.mts differ diff --git a/mods/minetest_game/default/schematics/acacia_tree.mts b/mods/minetest_game/default/schematics/acacia_tree.mts new file mode 100644 index 0000000..9b23498 Binary files /dev/null and b/mods/minetest_game/default/schematics/acacia_tree.mts differ diff --git a/mods/minetest_game/default/schematics/acacia_tree_from_sapling.mts b/mods/minetest_game/default/schematics/acacia_tree_from_sapling.mts new file mode 100644 index 0000000..c32a995 Binary files /dev/null and b/mods/minetest_game/default/schematics/acacia_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/apple_log.mts b/mods/minetest_game/default/schematics/apple_log.mts new file mode 100644 index 0000000..92fb900 Binary files /dev/null and b/mods/minetest_game/default/schematics/apple_log.mts differ diff --git a/mods/minetest_game/default/schematics/apple_tree.mts b/mods/minetest_game/default/schematics/apple_tree.mts new file mode 100644 index 0000000..d56cd54 Binary files /dev/null and b/mods/minetest_game/default/schematics/apple_tree.mts differ diff --git a/mods/minetest_game/default/schematics/apple_tree_from_sapling.mts b/mods/minetest_game/default/schematics/apple_tree_from_sapling.mts new file mode 100644 index 0000000..2325100 Binary files /dev/null and b/mods/minetest_game/default/schematics/apple_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/aspen_log.mts b/mods/minetest_game/default/schematics/aspen_log.mts new file mode 100644 index 0000000..d0c723d Binary files /dev/null and b/mods/minetest_game/default/schematics/aspen_log.mts differ diff --git a/mods/minetest_game/default/schematics/aspen_tree.mts b/mods/minetest_game/default/schematics/aspen_tree.mts new file mode 100644 index 0000000..429a831 Binary files /dev/null and b/mods/minetest_game/default/schematics/aspen_tree.mts differ diff --git a/mods/minetest_game/default/schematics/aspen_tree_from_sapling.mts b/mods/minetest_game/default/schematics/aspen_tree_from_sapling.mts new file mode 100644 index 0000000..b7ab3ee Binary files /dev/null and b/mods/minetest_game/default/schematics/aspen_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/blueberry_bush.mts b/mods/minetest_game/default/schematics/blueberry_bush.mts new file mode 100644 index 0000000..cf4d8ef Binary files /dev/null and b/mods/minetest_game/default/schematics/blueberry_bush.mts differ diff --git a/mods/minetest_game/default/schematics/bush.mts b/mods/minetest_game/default/schematics/bush.mts new file mode 100644 index 0000000..d08cf5f Binary files /dev/null and b/mods/minetest_game/default/schematics/bush.mts differ diff --git a/mods/minetest_game/default/schematics/emergent_jungle_tree.mts b/mods/minetest_game/default/schematics/emergent_jungle_tree.mts new file mode 100644 index 0000000..b526430 Binary files /dev/null and b/mods/minetest_game/default/schematics/emergent_jungle_tree.mts differ diff --git a/mods/minetest_game/default/schematics/emergent_jungle_tree_from_sapling.mts b/mods/minetest_game/default/schematics/emergent_jungle_tree_from_sapling.mts new file mode 100644 index 0000000..cb4e4e9 Binary files /dev/null and b/mods/minetest_game/default/schematics/emergent_jungle_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/jungle_log.mts b/mods/minetest_game/default/schematics/jungle_log.mts new file mode 100644 index 0000000..34dca43 Binary files /dev/null and b/mods/minetest_game/default/schematics/jungle_log.mts differ diff --git a/mods/minetest_game/default/schematics/jungle_tree.mts b/mods/minetest_game/default/schematics/jungle_tree.mts new file mode 100644 index 0000000..fe93c8c Binary files /dev/null and b/mods/minetest_game/default/schematics/jungle_tree.mts differ diff --git a/mods/minetest_game/default/schematics/jungle_tree_from_sapling.mts b/mods/minetest_game/default/schematics/jungle_tree_from_sapling.mts new file mode 100644 index 0000000..f32d312 Binary files /dev/null and b/mods/minetest_game/default/schematics/jungle_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/large_cactus.mts b/mods/minetest_game/default/schematics/large_cactus.mts new file mode 100644 index 0000000..cadcdcc Binary files /dev/null and b/mods/minetest_game/default/schematics/large_cactus.mts differ diff --git a/mods/minetest_game/default/schematics/papyrus_on_dirt.mts b/mods/minetest_game/default/schematics/papyrus_on_dirt.mts new file mode 100644 index 0000000..1333a7c Binary files /dev/null and b/mods/minetest_game/default/schematics/papyrus_on_dirt.mts differ diff --git a/mods/minetest_game/default/schematics/papyrus_on_dry_dirt.mts b/mods/minetest_game/default/schematics/papyrus_on_dry_dirt.mts new file mode 100644 index 0000000..3626580 Binary files /dev/null and b/mods/minetest_game/default/schematics/papyrus_on_dry_dirt.mts differ diff --git a/mods/minetest_game/default/schematics/pine_bush.mts b/mods/minetest_game/default/schematics/pine_bush.mts new file mode 100644 index 0000000..ca572a7 Binary files /dev/null and b/mods/minetest_game/default/schematics/pine_bush.mts differ diff --git a/mods/minetest_game/default/schematics/pine_log.mts b/mods/minetest_game/default/schematics/pine_log.mts new file mode 100644 index 0000000..d51a489 Binary files /dev/null and b/mods/minetest_game/default/schematics/pine_log.mts differ diff --git a/mods/minetest_game/default/schematics/pine_tree.mts b/mods/minetest_game/default/schematics/pine_tree.mts new file mode 100644 index 0000000..c80532a Binary files /dev/null and b/mods/minetest_game/default/schematics/pine_tree.mts differ diff --git a/mods/minetest_game/default/schematics/pine_tree_from_sapling.mts b/mods/minetest_game/default/schematics/pine_tree_from_sapling.mts new file mode 100644 index 0000000..0800387 Binary files /dev/null and b/mods/minetest_game/default/schematics/pine_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/small_pine_tree.mts b/mods/minetest_game/default/schematics/small_pine_tree.mts new file mode 100644 index 0000000..b283226 Binary files /dev/null and b/mods/minetest_game/default/schematics/small_pine_tree.mts differ diff --git a/mods/minetest_game/default/schematics/small_pine_tree_from_sapling.mts b/mods/minetest_game/default/schematics/small_pine_tree_from_sapling.mts new file mode 100644 index 0000000..a1b1170 Binary files /dev/null and b/mods/minetest_game/default/schematics/small_pine_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/snowy_pine_tree_from_sapling.mts b/mods/minetest_game/default/schematics/snowy_pine_tree_from_sapling.mts new file mode 100644 index 0000000..3d502a3 Binary files /dev/null and b/mods/minetest_game/default/schematics/snowy_pine_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/schematics/snowy_small_pine_tree_from_sapling.mts b/mods/minetest_game/default/schematics/snowy_small_pine_tree_from_sapling.mts new file mode 100644 index 0000000..d017c9e Binary files /dev/null and b/mods/minetest_game/default/schematics/snowy_small_pine_tree_from_sapling.mts differ diff --git a/mods/minetest_game/default/sounds/default_break_glass.1.ogg b/mods/minetest_game/default/sounds/default_break_glass.1.ogg new file mode 100644 index 0000000..b1ccc5f Binary files /dev/null and b/mods/minetest_game/default/sounds/default_break_glass.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_break_glass.2.ogg b/mods/minetest_game/default/sounds/default_break_glass.2.ogg new file mode 100644 index 0000000..b6cc9e8 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_break_glass.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_break_glass.3.ogg b/mods/minetest_game/default/sounds/default_break_glass.3.ogg new file mode 100644 index 0000000..ae6a6bf Binary files /dev/null and b/mods/minetest_game/default/sounds/default_break_glass.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_chest_close.ogg b/mods/minetest_game/default/sounds/default_chest_close.ogg new file mode 100644 index 0000000..068d900 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_chest_close.ogg differ diff --git a/mods/minetest_game/default/sounds/default_chest_open.ogg b/mods/minetest_game/default/sounds/default_chest_open.ogg new file mode 100644 index 0000000..40b0b93 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_chest_open.ogg differ diff --git a/mods/minetest_game/default/sounds/default_cool_lava.1.ogg b/mods/minetest_game/default/sounds/default_cool_lava.1.ogg new file mode 100644 index 0000000..42506dd Binary files /dev/null and b/mods/minetest_game/default/sounds/default_cool_lava.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_cool_lava.2.ogg b/mods/minetest_game/default/sounds/default_cool_lava.2.ogg new file mode 100644 index 0000000..2747ab8 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_cool_lava.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_cool_lava.3.ogg b/mods/minetest_game/default/sounds/default_cool_lava.3.ogg new file mode 100644 index 0000000..8baeac3 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_cool_lava.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_choppy.1.ogg b/mods/minetest_game/default/sounds/default_dig_choppy.1.ogg new file mode 100644 index 0000000..95fa6d4 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_choppy.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_choppy.2.ogg b/mods/minetest_game/default/sounds/default_dig_choppy.2.ogg new file mode 100644 index 0000000..5d3a044 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_choppy.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_choppy.3.ogg b/mods/minetest_game/default/sounds/default_dig_choppy.3.ogg new file mode 100644 index 0000000..2bb0ace Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_choppy.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_choppy.ogg b/mods/minetest_game/default/sounds/default_dig_choppy.ogg new file mode 100644 index 0000000..e2ecd84 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_choppy.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_cracky.1.ogg b/mods/minetest_game/default/sounds/default_dig_cracky.1.ogg new file mode 100644 index 0000000..ffced27 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_cracky.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_cracky.2.ogg b/mods/minetest_game/default/sounds/default_dig_cracky.2.ogg new file mode 100644 index 0000000..d9e8010 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_cracky.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_cracky.3.ogg b/mods/minetest_game/default/sounds/default_dig_cracky.3.ogg new file mode 100644 index 0000000..7d19d40 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_cracky.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_cracky.ogg b/mods/minetest_game/default/sounds/default_dig_cracky.ogg new file mode 100644 index 0000000..da11679 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_cracky.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_crumbly.ogg b/mods/minetest_game/default/sounds/default_dig_crumbly.ogg new file mode 100644 index 0000000..a0b2a1f Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_crumbly.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_dig_immediate.ogg b/mods/minetest_game/default/sounds/default_dig_dig_immediate.ogg new file mode 100644 index 0000000..e65d766 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_dig_immediate.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_metal.ogg b/mods/minetest_game/default/sounds/default_dig_metal.ogg new file mode 100644 index 0000000..0b58509 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_metal.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_oddly_breakable_by_hand.ogg b/mods/minetest_game/default/sounds/default_dig_oddly_breakable_by_hand.ogg new file mode 100644 index 0000000..ef4d7b1 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_oddly_breakable_by_hand.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dig_snappy.ogg b/mods/minetest_game/default/sounds/default_dig_snappy.ogg new file mode 100644 index 0000000..3686fcd Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dig_snappy.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dirt_footstep.1.ogg b/mods/minetest_game/default/sounds/default_dirt_footstep.1.ogg new file mode 100644 index 0000000..201aa3b Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dirt_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dirt_footstep.2.ogg b/mods/minetest_game/default/sounds/default_dirt_footstep.2.ogg new file mode 100644 index 0000000..2667dbc Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dirt_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dug_metal.1.ogg b/mods/minetest_game/default/sounds/default_dug_metal.1.ogg new file mode 100644 index 0000000..5d6cb5b Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dug_metal.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dug_metal.2.ogg b/mods/minetest_game/default/sounds/default_dug_metal.2.ogg new file mode 100644 index 0000000..63567fc Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dug_metal.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dug_node.1.ogg b/mods/minetest_game/default/sounds/default_dug_node.1.ogg new file mode 100644 index 0000000..c04975d Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dug_node.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_dug_node.2.ogg b/mods/minetest_game/default/sounds/default_dug_node.2.ogg new file mode 100644 index 0000000..9f20926 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_dug_node.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_furnace_active.ogg b/mods/minetest_game/default/sounds/default_furnace_active.ogg new file mode 100644 index 0000000..536edc2 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_furnace_active.ogg differ diff --git a/mods/minetest_game/default/sounds/default_glass_footstep.ogg b/mods/minetest_game/default/sounds/default_glass_footstep.ogg new file mode 100644 index 0000000..191287a Binary files /dev/null and b/mods/minetest_game/default/sounds/default_glass_footstep.ogg differ diff --git a/mods/minetest_game/default/sounds/default_grass_footstep.1.ogg b/mods/minetest_game/default/sounds/default_grass_footstep.1.ogg new file mode 100644 index 0000000..a04cdb4 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_grass_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_grass_footstep.2.ogg b/mods/minetest_game/default/sounds/default_grass_footstep.2.ogg new file mode 100644 index 0000000..d193068 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_grass_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_grass_footstep.3.ogg b/mods/minetest_game/default/sounds/default_grass_footstep.3.ogg new file mode 100644 index 0000000..e1897ea Binary files /dev/null and b/mods/minetest_game/default/sounds/default_grass_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_dig.1.ogg b/mods/minetest_game/default/sounds/default_gravel_dig.1.ogg new file mode 100644 index 0000000..baf8fca Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_dig.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_dig.2.ogg b/mods/minetest_game/default/sounds/default_gravel_dig.2.ogg new file mode 100644 index 0000000..e0c0c50 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_dig.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_dug.1.ogg b/mods/minetest_game/default/sounds/default_gravel_dug.1.ogg new file mode 100644 index 0000000..1303433 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_dug.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_dug.2.ogg b/mods/minetest_game/default/sounds/default_gravel_dug.2.ogg new file mode 100644 index 0000000..ee5ed33 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_dug.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_dug.3.ogg b/mods/minetest_game/default/sounds/default_gravel_dug.3.ogg new file mode 100644 index 0000000..add4c54 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_dug.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_footstep.1.ogg b/mods/minetest_game/default/sounds/default_gravel_footstep.1.ogg new file mode 100644 index 0000000..8d260ce Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_footstep.2.ogg b/mods/minetest_game/default/sounds/default_gravel_footstep.2.ogg new file mode 100644 index 0000000..2aba2c6 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_footstep.3.ogg b/mods/minetest_game/default/sounds/default_gravel_footstep.3.ogg new file mode 100644 index 0000000..1bcd8a1 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_gravel_footstep.4.ogg b/mods/minetest_game/default/sounds/default_gravel_footstep.4.ogg new file mode 100644 index 0000000..696c9ff Binary files /dev/null and b/mods/minetest_game/default/sounds/default_gravel_footstep.4.ogg differ diff --git a/mods/minetest_game/default/sounds/default_hard_footstep.1.ogg b/mods/minetest_game/default/sounds/default_hard_footstep.1.ogg new file mode 100644 index 0000000..0a08efa Binary files /dev/null and b/mods/minetest_game/default/sounds/default_hard_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_hard_footstep.2.ogg b/mods/minetest_game/default/sounds/default_hard_footstep.2.ogg new file mode 100644 index 0000000..be52a87 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_hard_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_hard_footstep.3.ogg b/mods/minetest_game/default/sounds/default_hard_footstep.3.ogg new file mode 100644 index 0000000..a342787 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_hard_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_dig.1.ogg b/mods/minetest_game/default/sounds/default_ice_dig.1.ogg new file mode 100644 index 0000000..97399c8 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_dig.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_dig.2.ogg b/mods/minetest_game/default/sounds/default_ice_dig.2.ogg new file mode 100644 index 0000000..8a5da11 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_dig.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_dig.3.ogg b/mods/minetest_game/default/sounds/default_ice_dig.3.ogg new file mode 100644 index 0000000..765fb9b Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_dig.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_dug.ogg b/mods/minetest_game/default/sounds/default_ice_dug.ogg new file mode 100644 index 0000000..ae37673 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_dug.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_footstep.1.ogg b/mods/minetest_game/default/sounds/default_ice_footstep.1.ogg new file mode 100644 index 0000000..c235f1e Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_footstep.2.ogg b/mods/minetest_game/default/sounds/default_ice_footstep.2.ogg new file mode 100644 index 0000000..61d2c99 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_ice_footstep.3.ogg b/mods/minetest_game/default/sounds/default_ice_footstep.3.ogg new file mode 100644 index 0000000..2ecbb43 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_ice_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_item_smoke.ogg b/mods/minetest_game/default/sounds/default_item_smoke.ogg new file mode 100644 index 0000000..038a46e Binary files /dev/null and b/mods/minetest_game/default/sounds/default_item_smoke.ogg differ diff --git a/mods/minetest_game/default/sounds/default_metal_footstep.1.ogg b/mods/minetest_game/default/sounds/default_metal_footstep.1.ogg new file mode 100644 index 0000000..49fe89b Binary files /dev/null and b/mods/minetest_game/default/sounds/default_metal_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_metal_footstep.2.ogg b/mods/minetest_game/default/sounds/default_metal_footstep.2.ogg new file mode 100644 index 0000000..878711d Binary files /dev/null and b/mods/minetest_game/default/sounds/default_metal_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_metal_footstep.3.ogg b/mods/minetest_game/default/sounds/default_metal_footstep.3.ogg new file mode 100644 index 0000000..2a566a8 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_metal_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node.1.ogg b/mods/minetest_game/default/sounds/default_place_node.1.ogg new file mode 100644 index 0000000..46b9756 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node.2.ogg b/mods/minetest_game/default/sounds/default_place_node.2.ogg new file mode 100644 index 0000000..d34c01a Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node.3.ogg b/mods/minetest_game/default/sounds/default_place_node.3.ogg new file mode 100644 index 0000000..fc29365 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node_hard.1.ogg b/mods/minetest_game/default/sounds/default_place_node_hard.1.ogg new file mode 100644 index 0000000..9f97fac Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node_hard.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node_hard.2.ogg b/mods/minetest_game/default/sounds/default_place_node_hard.2.ogg new file mode 100644 index 0000000..1d3b3de Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node_hard.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node_metal.1.ogg b/mods/minetest_game/default/sounds/default_place_node_metal.1.ogg new file mode 100644 index 0000000..5da085e Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node_metal.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_place_node_metal.2.ogg b/mods/minetest_game/default/sounds/default_place_node_metal.2.ogg new file mode 100644 index 0000000..5ee67fc Binary files /dev/null and b/mods/minetest_game/default/sounds/default_place_node_metal.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_sand_footstep.1.ogg b/mods/minetest_game/default/sounds/default_sand_footstep.1.ogg new file mode 100644 index 0000000..b92feab Binary files /dev/null and b/mods/minetest_game/default/sounds/default_sand_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_sand_footstep.2.ogg b/mods/minetest_game/default/sounds/default_sand_footstep.2.ogg new file mode 100644 index 0000000..6bc5da3 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_sand_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_sand_footstep.3.ogg b/mods/minetest_game/default/sounds/default_sand_footstep.3.ogg new file mode 100644 index 0000000..880306f Binary files /dev/null and b/mods/minetest_game/default/sounds/default_sand_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_snow_footstep.1.ogg b/mods/minetest_game/default/sounds/default_snow_footstep.1.ogg new file mode 100644 index 0000000..97cc825 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_snow_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_snow_footstep.2.ogg b/mods/minetest_game/default/sounds/default_snow_footstep.2.ogg new file mode 100644 index 0000000..97a6baa Binary files /dev/null and b/mods/minetest_game/default/sounds/default_snow_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_snow_footstep.3.ogg b/mods/minetest_game/default/sounds/default_snow_footstep.3.ogg new file mode 100644 index 0000000..bde1f21 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_snow_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_snow_footstep.4.ogg b/mods/minetest_game/default/sounds/default_snow_footstep.4.ogg new file mode 100644 index 0000000..8ca6a59 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_snow_footstep.4.ogg differ diff --git a/mods/minetest_game/default/sounds/default_snow_footstep.5.ogg b/mods/minetest_game/default/sounds/default_snow_footstep.5.ogg new file mode 100644 index 0000000..220d60c Binary files /dev/null and b/mods/minetest_game/default/sounds/default_snow_footstep.5.ogg differ diff --git a/mods/minetest_game/default/sounds/default_tool_breaks.1.ogg b/mods/minetest_game/default/sounds/default_tool_breaks.1.ogg new file mode 100644 index 0000000..2a571ae Binary files /dev/null and b/mods/minetest_game/default/sounds/default_tool_breaks.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_tool_breaks.2.ogg b/mods/minetest_game/default/sounds/default_tool_breaks.2.ogg new file mode 100644 index 0000000..1789352 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_tool_breaks.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_tool_breaks.3.ogg b/mods/minetest_game/default/sounds/default_tool_breaks.3.ogg new file mode 100644 index 0000000..a99c4b7 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_tool_breaks.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_water_footstep.1.ogg b/mods/minetest_game/default/sounds/default_water_footstep.1.ogg new file mode 100644 index 0000000..63b9744 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_water_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_water_footstep.2.ogg b/mods/minetest_game/default/sounds/default_water_footstep.2.ogg new file mode 100644 index 0000000..8d79c1f Binary files /dev/null and b/mods/minetest_game/default/sounds/default_water_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/default_water_footstep.3.ogg b/mods/minetest_game/default/sounds/default_water_footstep.3.ogg new file mode 100644 index 0000000..f889150 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_water_footstep.3.ogg differ diff --git a/mods/minetest_game/default/sounds/default_water_footstep.4.ogg b/mods/minetest_game/default/sounds/default_water_footstep.4.ogg new file mode 100644 index 0000000..6f1eab8 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_water_footstep.4.ogg differ diff --git a/mods/minetest_game/default/sounds/default_wood_footstep.1.ogg b/mods/minetest_game/default/sounds/default_wood_footstep.1.ogg new file mode 100644 index 0000000..34f63a1 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_wood_footstep.1.ogg differ diff --git a/mods/minetest_game/default/sounds/default_wood_footstep.2.ogg b/mods/minetest_game/default/sounds/default_wood_footstep.2.ogg new file mode 100644 index 0000000..124fc29 Binary files /dev/null and b/mods/minetest_game/default/sounds/default_wood_footstep.2.ogg differ diff --git a/mods/minetest_game/default/sounds/player_damage.ogg b/mods/minetest_game/default/sounds/player_damage.ogg new file mode 100644 index 0000000..7888087 Binary files /dev/null and b/mods/minetest_game/default/sounds/player_damage.ogg differ diff --git a/mods/minetest_game/default/textures/bubble.png b/mods/minetest_game/default/textures/bubble.png new file mode 100755 index 0000000..b153ab1 Binary files /dev/null and b/mods/minetest_game/default/textures/bubble.png differ diff --git a/mods/minetest_game/default/textures/crack.png b/mods/minetest_game/default/textures/crack.png new file mode 100755 index 0000000..481c383 Binary files /dev/null and b/mods/minetest_game/default/textures/crack.png differ diff --git a/mods/minetest_game/default/textures/crack_anylength.png b/mods/minetest_game/default/textures/crack_anylength.png new file mode 100755 index 0000000..8e07044 Binary files /dev/null and b/mods/minetest_game/default/textures/crack_anylength.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_bush_sapling.png b/mods/minetest_game/default/textures/default_acacia_bush_sapling.png new file mode 100755 index 0000000..d4faae8 Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_bush_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_bush_stem.png b/mods/minetest_game/default/textures/default_acacia_bush_stem.png new file mode 100755 index 0000000..504ae39 Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_bush_stem.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_leaves.png b/mods/minetest_game/default/textures/default_acacia_leaves.png new file mode 100755 index 0000000..68135ae Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_leaves.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_leaves_simple.png b/mods/minetest_game/default/textures/default_acacia_leaves_simple.png new file mode 100755 index 0000000..68135ae Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_leaves_simple.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_sapling.png b/mods/minetest_game/default/textures/default_acacia_sapling.png new file mode 100755 index 0000000..bc27940 Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_tree.png b/mods/minetest_game/default/textures/default_acacia_tree.png new file mode 100755 index 0000000..0251198 Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_tree.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_tree_top.png b/mods/minetest_game/default/textures/default_acacia_tree_top.png new file mode 100755 index 0000000..4c8a492 Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_tree_top.png differ diff --git a/mods/minetest_game/default/textures/default_acacia_wood.png b/mods/minetest_game/default/textures/default_acacia_wood.png new file mode 100755 index 0000000..9926d64 Binary files /dev/null and b/mods/minetest_game/default/textures/default_acacia_wood.png differ diff --git a/mods/minetest_game/default/textures/default_amethyst_block.png b/mods/minetest_game/default/textures/default_amethyst_block.png new file mode 100644 index 0000000..76f3134 Binary files /dev/null and b/mods/minetest_game/default/textures/default_amethyst_block.png differ diff --git a/mods/minetest_game/default/textures/default_amethyst_gem.png b/mods/minetest_game/default/textures/default_amethyst_gem.png new file mode 100644 index 0000000..bfd6c3d Binary files /dev/null and b/mods/minetest_game/default/textures/default_amethyst_gem.png differ diff --git a/mods/minetest_game/default/textures/default_apple.png b/mods/minetest_game/default/textures/default_apple.png new file mode 100755 index 0000000..b6f5170 Binary files /dev/null and b/mods/minetest_game/default/textures/default_apple.png differ diff --git a/mods/minetest_game/default/textures/default_aspen_leaves.png b/mods/minetest_game/default/textures/default_aspen_leaves.png new file mode 100755 index 0000000..2ffda8f Binary files /dev/null and b/mods/minetest_game/default/textures/default_aspen_leaves.png differ diff --git a/mods/minetest_game/default/textures/default_aspen_leaves_simple.png b/mods/minetest_game/default/textures/default_aspen_leaves_simple.png new file mode 100755 index 0000000..2ffda8f Binary files /dev/null and b/mods/minetest_game/default/textures/default_aspen_leaves_simple.png differ diff --git a/mods/minetest_game/default/textures/default_aspen_sapling.png b/mods/minetest_game/default/textures/default_aspen_sapling.png new file mode 100755 index 0000000..4e97ec9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_aspen_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_aspen_tree.png b/mods/minetest_game/default/textures/default_aspen_tree.png new file mode 100755 index 0000000..73a6dbc Binary files /dev/null and b/mods/minetest_game/default/textures/default_aspen_tree.png differ diff --git a/mods/minetest_game/default/textures/default_aspen_tree_top.png b/mods/minetest_game/default/textures/default_aspen_tree_top.png new file mode 100755 index 0000000..f105a5f Binary files /dev/null and b/mods/minetest_game/default/textures/default_aspen_tree_top.png differ diff --git a/mods/minetest_game/default/textures/default_aspen_wood.png b/mods/minetest_game/default/textures/default_aspen_wood.png new file mode 100755 index 0000000..0e89da5 Binary files /dev/null and b/mods/minetest_game/default/textures/default_aspen_wood.png differ diff --git a/mods/minetest_game/default/textures/default_bioluminiscent_plant.png b/mods/minetest_game/default/textures/default_bioluminiscent_plant.png new file mode 100644 index 0000000..d8d138f Binary files /dev/null and b/mods/minetest_game/default/textures/default_bioluminiscent_plant.png differ diff --git a/mods/minetest_game/default/textures/default_blueberries.png b/mods/minetest_game/default/textures/default_blueberries.png new file mode 100644 index 0000000..737da2c Binary files /dev/null and b/mods/minetest_game/default/textures/default_blueberries.png differ diff --git a/mods/minetest_game/default/textures/default_blueberry_bush_leaves.png b/mods/minetest_game/default/textures/default_blueberry_bush_leaves.png new file mode 100644 index 0000000..810ae80 Binary files /dev/null and b/mods/minetest_game/default/textures/default_blueberry_bush_leaves.png differ diff --git a/mods/minetest_game/default/textures/default_blueberry_bush_sapling.png b/mods/minetest_game/default/textures/default_blueberry_bush_sapling.png new file mode 100644 index 0000000..c22a374 Binary files /dev/null and b/mods/minetest_game/default/textures/default_blueberry_bush_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_blueberry_overlay.png b/mods/minetest_game/default/textures/default_blueberry_overlay.png new file mode 100644 index 0000000..134f870 Binary files /dev/null and b/mods/minetest_game/default/textures/default_blueberry_overlay.png differ diff --git a/mods/minetest_game/default/textures/default_book.png b/mods/minetest_game/default/textures/default_book.png new file mode 100755 index 0000000..d2ddbb0 Binary files /dev/null and b/mods/minetest_game/default/textures/default_book.png differ diff --git a/mods/minetest_game/default/textures/default_book_written.png b/mods/minetest_game/default/textures/default_book_written.png new file mode 100755 index 0000000..3d02db2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_book_written.png differ diff --git a/mods/minetest_game/default/textures/default_bookshelf.png b/mods/minetest_game/default/textures/default_bookshelf.png new file mode 100755 index 0000000..3257e44 Binary files /dev/null and b/mods/minetest_game/default/textures/default_bookshelf.png differ diff --git a/mods/minetest_game/default/textures/default_bookshelf_slot.png b/mods/minetest_game/default/textures/default_bookshelf_slot.png new file mode 100755 index 0000000..c68bcbb Binary files /dev/null and b/mods/minetest_game/default/textures/default_bookshelf_slot.png differ diff --git a/mods/minetest_game/default/textures/default_brick.png b/mods/minetest_game/default/textures/default_brick.png new file mode 100755 index 0000000..40976cd Binary files /dev/null and b/mods/minetest_game/default/textures/default_brick.png differ diff --git a/mods/minetest_game/default/textures/default_bronze_block.png b/mods/minetest_game/default/textures/default_bronze_block.png new file mode 100755 index 0000000..e538af6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_bronze_block.png differ diff --git a/mods/minetest_game/default/textures/default_bronze_ingot.png b/mods/minetest_game/default/textures/default_bronze_ingot.png new file mode 100755 index 0000000..dd0e410 Binary files /dev/null and b/mods/minetest_game/default/textures/default_bronze_ingot.png differ diff --git a/mods/minetest_game/default/textures/default_bush_sapling.png b/mods/minetest_game/default/textures/default_bush_sapling.png new file mode 100755 index 0000000..8766e33 Binary files /dev/null and b/mods/minetest_game/default/textures/default_bush_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_bush_stem.png b/mods/minetest_game/default/textures/default_bush_stem.png new file mode 100755 index 0000000..f7f585c Binary files /dev/null and b/mods/minetest_game/default/textures/default_bush_stem.png differ diff --git a/mods/minetest_game/default/textures/default_cactus_side.png b/mods/minetest_game/default/textures/default_cactus_side.png new file mode 100755 index 0000000..0aef66d Binary files /dev/null and b/mods/minetest_game/default/textures/default_cactus_side.png differ diff --git a/mods/minetest_game/default/textures/default_cactus_top.png b/mods/minetest_game/default/textures/default_cactus_top.png new file mode 100755 index 0000000..2ef92d0 Binary files /dev/null and b/mods/minetest_game/default/textures/default_cactus_top.png differ diff --git a/mods/minetest_game/default/textures/default_chest_front.png b/mods/minetest_game/default/textures/default_chest_front.png new file mode 100755 index 0000000..7ef866a Binary files /dev/null and b/mods/minetest_game/default/textures/default_chest_front.png differ diff --git a/mods/minetest_game/default/textures/default_chest_inside.png b/mods/minetest_game/default/textures/default_chest_inside.png new file mode 100755 index 0000000..a6f0d2d Binary files /dev/null and b/mods/minetest_game/default/textures/default_chest_inside.png differ diff --git a/mods/minetest_game/default/textures/default_chest_lock.png b/mods/minetest_game/default/textures/default_chest_lock.png new file mode 100755 index 0000000..5c4ef16 Binary files /dev/null and b/mods/minetest_game/default/textures/default_chest_lock.png differ diff --git a/mods/minetest_game/default/textures/default_chest_side.png b/mods/minetest_game/default/textures/default_chest_side.png new file mode 100755 index 0000000..3140ef2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_chest_side.png differ diff --git a/mods/minetest_game/default/textures/default_chest_top.png b/mods/minetest_game/default/textures/default_chest_top.png new file mode 100755 index 0000000..b82416d Binary files /dev/null and b/mods/minetest_game/default/textures/default_chest_top.png differ diff --git a/mods/minetest_game/default/textures/default_clay.png b/mods/minetest_game/default/textures/default_clay.png new file mode 100755 index 0000000..f48cb28 Binary files /dev/null and b/mods/minetest_game/default/textures/default_clay.png differ diff --git a/mods/minetest_game/default/textures/default_clay_brick.png b/mods/minetest_game/default/textures/default_clay_brick.png new file mode 100755 index 0000000..7fceafc Binary files /dev/null and b/mods/minetest_game/default/textures/default_clay_brick.png differ diff --git a/mods/minetest_game/default/textures/default_clay_lump.png b/mods/minetest_game/default/textures/default_clay_lump.png new file mode 100755 index 0000000..8a0000d Binary files /dev/null and b/mods/minetest_game/default/textures/default_clay_lump.png differ diff --git a/mods/minetest_game/default/textures/default_cloud.png b/mods/minetest_game/default/textures/default_cloud.png new file mode 100755 index 0000000..faf0ec1 Binary files /dev/null and b/mods/minetest_game/default/textures/default_cloud.png differ diff --git a/mods/minetest_game/default/textures/default_coal_block.png b/mods/minetest_game/default/textures/default_coal_block.png new file mode 100755 index 0000000..67e87a5 Binary files /dev/null and b/mods/minetest_game/default/textures/default_coal_block.png differ diff --git a/mods/minetest_game/default/textures/default_coal_lump.png b/mods/minetest_game/default/textures/default_coal_lump.png new file mode 100755 index 0000000..57c6aab Binary files /dev/null and b/mods/minetest_game/default/textures/default_coal_lump.png differ diff --git a/mods/minetest_game/default/textures/default_cobble.png b/mods/minetest_game/default/textures/default_cobble.png new file mode 100755 index 0000000..88aafa7 Binary files /dev/null and b/mods/minetest_game/default/textures/default_cobble.png differ diff --git a/mods/minetest_game/default/textures/default_coniferous_litter.png b/mods/minetest_game/default/textures/default_coniferous_litter.png new file mode 100644 index 0000000..a9fca0f Binary files /dev/null and b/mods/minetest_game/default/textures/default_coniferous_litter.png differ diff --git a/mods/minetest_game/default/textures/default_coniferous_litter_side.png b/mods/minetest_game/default/textures/default_coniferous_litter_side.png new file mode 100644 index 0000000..250c455 Binary files /dev/null and b/mods/minetest_game/default/textures/default_coniferous_litter_side.png differ diff --git a/mods/minetest_game/default/textures/default_copper_block.png b/mods/minetest_game/default/textures/default_copper_block.png new file mode 100755 index 0000000..508c303 Binary files /dev/null and b/mods/minetest_game/default/textures/default_copper_block.png differ diff --git a/mods/minetest_game/default/textures/default_copper_ingot.png b/mods/minetest_game/default/textures/default_copper_ingot.png new file mode 100755 index 0000000..f6ae850 Binary files /dev/null and b/mods/minetest_game/default/textures/default_copper_ingot.png differ diff --git a/mods/minetest_game/default/textures/default_copper_lump.png b/mods/minetest_game/default/textures/default_copper_lump.png new file mode 100755 index 0000000..2ec0010 Binary files /dev/null and b/mods/minetest_game/default/textures/default_copper_lump.png differ diff --git a/mods/minetest_game/default/textures/default_coral_brown.png b/mods/minetest_game/default/textures/default_coral_brown.png new file mode 100755 index 0000000..cacbe03 Binary files /dev/null and b/mods/minetest_game/default/textures/default_coral_brown.png differ diff --git a/mods/minetest_game/default/textures/default_coral_cyan.png b/mods/minetest_game/default/textures/default_coral_cyan.png new file mode 100644 index 0000000..9d01ada Binary files /dev/null and b/mods/minetest_game/default/textures/default_coral_cyan.png differ diff --git a/mods/minetest_game/default/textures/default_coral_green.png b/mods/minetest_game/default/textures/default_coral_green.png new file mode 100644 index 0000000..fda40b2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_coral_green.png differ diff --git a/mods/minetest_game/default/textures/default_coral_orange.png b/mods/minetest_game/default/textures/default_coral_orange.png new file mode 100755 index 0000000..3c30309 Binary files /dev/null and b/mods/minetest_game/default/textures/default_coral_orange.png differ diff --git a/mods/minetest_game/default/textures/default_coral_pink.png b/mods/minetest_game/default/textures/default_coral_pink.png new file mode 100644 index 0000000..fe60400 Binary files /dev/null and b/mods/minetest_game/default/textures/default_coral_pink.png differ diff --git a/mods/minetest_game/default/textures/default_coral_skeleton.png b/mods/minetest_game/default/textures/default_coral_skeleton.png new file mode 100755 index 0000000..2b7305a Binary files /dev/null and b/mods/minetest_game/default/textures/default_coral_skeleton.png differ diff --git a/mods/minetest_game/default/textures/default_desert_cobble.png b/mods/minetest_game/default/textures/default_desert_cobble.png new file mode 100755 index 0000000..5aa7d6e Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_cobble.png differ diff --git a/mods/minetest_game/default/textures/default_desert_sand.png b/mods/minetest_game/default/textures/default_desert_sand.png new file mode 100755 index 0000000..b46ce7b Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_sand.png differ diff --git a/mods/minetest_game/default/textures/default_desert_sandstone.png b/mods/minetest_game/default/textures/default_desert_sandstone.png new file mode 100755 index 0000000..a393d20 Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_sandstone.png differ diff --git a/mods/minetest_game/default/textures/default_desert_sandstone_block.png b/mods/minetest_game/default/textures/default_desert_sandstone_block.png new file mode 100755 index 0000000..2cc8b4f Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_sandstone_block.png differ diff --git a/mods/minetest_game/default/textures/default_desert_sandstone_brick.png b/mods/minetest_game/default/textures/default_desert_sandstone_brick.png new file mode 100755 index 0000000..b2507d6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_sandstone_brick.png differ diff --git a/mods/minetest_game/default/textures/default_desert_stone.png b/mods/minetest_game/default/textures/default_desert_stone.png new file mode 100755 index 0000000..43ac16e Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_stone.png differ diff --git a/mods/minetest_game/default/textures/default_desert_stone_block.png b/mods/minetest_game/default/textures/default_desert_stone_block.png new file mode 100755 index 0000000..9acc122 Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_stone_block.png differ diff --git a/mods/minetest_game/default/textures/default_desert_stone_brick.png b/mods/minetest_game/default/textures/default_desert_stone_brick.png new file mode 100755 index 0000000..84ccb94 Binary files /dev/null and b/mods/minetest_game/default/textures/default_desert_stone_brick.png differ diff --git a/mods/minetest_game/default/textures/default_diamond.png b/mods/minetest_game/default/textures/default_diamond.png new file mode 100755 index 0000000..45ec32e Binary files /dev/null and b/mods/minetest_game/default/textures/default_diamond.png differ diff --git a/mods/minetest_game/default/textures/default_diamond_block.png b/mods/minetest_game/default/textures/default_diamond_block.png new file mode 100755 index 0000000..8073002 Binary files /dev/null and b/mods/minetest_game/default/textures/default_diamond_block.png differ diff --git a/mods/minetest_game/default/textures/default_dirt.png b/mods/minetest_game/default/textures/default_dirt.png new file mode 100755 index 0000000..290da79 Binary files /dev/null and b/mods/minetest_game/default/textures/default_dirt.png differ diff --git a/mods/minetest_game/default/textures/default_dry_dirt.png b/mods/minetest_game/default/textures/default_dry_dirt.png new file mode 100644 index 0000000..2717fa4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_dirt.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass.png b/mods/minetest_game/default/textures/default_dry_grass.png new file mode 100755 index 0000000..cedb97e Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass_1.png b/mods/minetest_game/default/textures/default_dry_grass_1.png new file mode 100755 index 0000000..e9e9a06 Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass_1.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass_2.png b/mods/minetest_game/default/textures/default_dry_grass_2.png new file mode 100755 index 0000000..461c72d Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass_2.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass_3.png b/mods/minetest_game/default/textures/default_dry_grass_3.png new file mode 100755 index 0000000..59aaf42 Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass_3.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass_4.png b/mods/minetest_game/default/textures/default_dry_grass_4.png new file mode 100755 index 0000000..65c18a2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass_4.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass_5.png b/mods/minetest_game/default/textures/default_dry_grass_5.png new file mode 100755 index 0000000..525dafb Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass_5.png differ diff --git a/mods/minetest_game/default/textures/default_dry_grass_side.png b/mods/minetest_game/default/textures/default_dry_grass_side.png new file mode 100755 index 0000000..d3ce19f Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_grass_side.png differ diff --git a/mods/minetest_game/default/textures/default_dry_shrub.png b/mods/minetest_game/default/textures/default_dry_shrub.png new file mode 100755 index 0000000..9c2f5e6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_dry_shrub.png differ diff --git a/mods/minetest_game/default/textures/default_emergent_jungle_sapling.png b/mods/minetest_game/default/textures/default_emergent_jungle_sapling.png new file mode 100644 index 0000000..b363b3c Binary files /dev/null and b/mods/minetest_game/default/textures/default_emergent_jungle_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_fence.png b/mods/minetest_game/default/textures/default_fence.png new file mode 100755 index 0000000..963c2cd Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence.png differ diff --git a/mods/minetest_game/default/textures/default_fence_acacia_wood.png b/mods/minetest_game/default/textures/default_fence_acacia_wood.png new file mode 100755 index 0000000..b88483c Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_acacia_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_aspen_wood.png b/mods/minetest_game/default/textures/default_fence_aspen_wood.png new file mode 100755 index 0000000..731937d Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_aspen_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_junglewood.png b/mods/minetest_game/default/textures/default_fence_junglewood.png new file mode 100755 index 0000000..54068d6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_junglewood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_overlay.png b/mods/minetest_game/default/textures/default_fence_overlay.png new file mode 100755 index 0000000..718184c Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_overlay.png differ diff --git a/mods/minetest_game/default/textures/default_fence_pine_wood.png b/mods/minetest_game/default/textures/default_fence_pine_wood.png new file mode 100755 index 0000000..f35a6d7 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_pine_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_rail_acacia_wood.png b/mods/minetest_game/default/textures/default_fence_rail_acacia_wood.png new file mode 100644 index 0000000..7081cdb Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_rail_acacia_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_rail_aspen_wood.png b/mods/minetest_game/default/textures/default_fence_rail_aspen_wood.png new file mode 100644 index 0000000..0d35302 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_rail_aspen_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_rail_junglewood.png b/mods/minetest_game/default/textures/default_fence_rail_junglewood.png new file mode 100644 index 0000000..6616059 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_rail_junglewood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_rail_overlay.png b/mods/minetest_game/default/textures/default_fence_rail_overlay.png new file mode 100644 index 0000000..4da47ae Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_rail_overlay.png differ diff --git a/mods/minetest_game/default/textures/default_fence_rail_pine_wood.png b/mods/minetest_game/default/textures/default_fence_rail_pine_wood.png new file mode 100644 index 0000000..b2f74a3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_rail_pine_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_rail_wood.png b/mods/minetest_game/default/textures/default_fence_rail_wood.png new file mode 100644 index 0000000..e41143c Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_rail_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fence_wood.png b/mods/minetest_game/default/textures/default_fence_wood.png new file mode 100755 index 0000000..35971e9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fence_wood.png differ diff --git a/mods/minetest_game/default/textures/default_fern_1.png b/mods/minetest_game/default/textures/default_fern_1.png new file mode 100644 index 0000000..46f51bc Binary files /dev/null and b/mods/minetest_game/default/textures/default_fern_1.png differ diff --git a/mods/minetest_game/default/textures/default_fern_2.png b/mods/minetest_game/default/textures/default_fern_2.png new file mode 100644 index 0000000..d63fe07 Binary files /dev/null and b/mods/minetest_game/default/textures/default_fern_2.png differ diff --git a/mods/minetest_game/default/textures/default_fern_3.png b/mods/minetest_game/default/textures/default_fern_3.png new file mode 100644 index 0000000..5323e7f Binary files /dev/null and b/mods/minetest_game/default/textures/default_fern_3.png differ diff --git a/mods/minetest_game/default/textures/default_flint.png b/mods/minetest_game/default/textures/default_flint.png new file mode 100755 index 0000000..d79495e Binary files /dev/null and b/mods/minetest_game/default/textures/default_flint.png differ diff --git a/mods/minetest_game/default/textures/default_footprint.png b/mods/minetest_game/default/textures/default_footprint.png new file mode 100755 index 0000000..24d3e94 Binary files /dev/null and b/mods/minetest_game/default/textures/default_footprint.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_bottom.png b/mods/minetest_game/default/textures/default_furnace_bottom.png new file mode 100755 index 0000000..92279ba Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_bottom.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_fire_bg.png b/mods/minetest_game/default/textures/default_furnace_fire_bg.png new file mode 100755 index 0000000..518a7c4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_fire_bg.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_fire_fg.png b/mods/minetest_game/default/textures/default_furnace_fire_fg.png new file mode 100755 index 0000000..8e47dae Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_fire_fg.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_front.png b/mods/minetest_game/default/textures/default_furnace_front.png new file mode 100755 index 0000000..f0fc89a Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_front.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_front_active.png b/mods/minetest_game/default/textures/default_furnace_front_active.png new file mode 100755 index 0000000..7342f9c Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_front_active.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_side.png b/mods/minetest_game/default/textures/default_furnace_side.png new file mode 100755 index 0000000..f813ffb Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_side.png differ diff --git a/mods/minetest_game/default/textures/default_furnace_top.png b/mods/minetest_game/default/textures/default_furnace_top.png new file mode 100755 index 0000000..c8ee8a0 Binary files /dev/null and b/mods/minetest_game/default/textures/default_furnace_top.png differ diff --git a/mods/minetest_game/default/textures/default_glass.png b/mods/minetest_game/default/textures/default_glass.png new file mode 100755 index 0000000..8b35d89 Binary files /dev/null and b/mods/minetest_game/default/textures/default_glass.png differ diff --git a/mods/minetest_game/default/textures/default_glass_detail.png b/mods/minetest_game/default/textures/default_glass_detail.png new file mode 100755 index 0000000..9c426cc Binary files /dev/null and b/mods/minetest_game/default/textures/default_glass_detail.png differ diff --git a/mods/minetest_game/default/textures/default_gold_block.png b/mods/minetest_game/default/textures/default_gold_block.png new file mode 100755 index 0000000..7a7f91d Binary files /dev/null and b/mods/minetest_game/default/textures/default_gold_block.png differ diff --git a/mods/minetest_game/default/textures/default_gold_ingot.png b/mods/minetest_game/default/textures/default_gold_ingot.png new file mode 100755 index 0000000..9012daa Binary files /dev/null and b/mods/minetest_game/default/textures/default_gold_ingot.png differ diff --git a/mods/minetest_game/default/textures/default_gold_lump.png b/mods/minetest_game/default/textures/default_gold_lump.png new file mode 100755 index 0000000..e247c4a Binary files /dev/null and b/mods/minetest_game/default/textures/default_gold_lump.png differ diff --git a/mods/minetest_game/default/textures/default_grass.png b/mods/minetest_game/default/textures/default_grass.png new file mode 100755 index 0000000..bf7261b Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass.png differ diff --git a/mods/minetest_game/default/textures/default_grass_1.png b/mods/minetest_game/default/textures/default_grass_1.png new file mode 100755 index 0000000..ca6bf4f Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_1.png differ diff --git a/mods/minetest_game/default/textures/default_grass_2.png b/mods/minetest_game/default/textures/default_grass_2.png new file mode 100755 index 0000000..851aab0 Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_2.png differ diff --git a/mods/minetest_game/default/textures/default_grass_3.png b/mods/minetest_game/default/textures/default_grass_3.png new file mode 100755 index 0000000..9ec109a Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_3.png differ diff --git a/mods/minetest_game/default/textures/default_grass_4.png b/mods/minetest_game/default/textures/default_grass_4.png new file mode 100755 index 0000000..69a68cc Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_4.png differ diff --git a/mods/minetest_game/default/textures/default_grass_5.png b/mods/minetest_game/default/textures/default_grass_5.png new file mode 100755 index 0000000..b2a6e42 Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_5.png differ diff --git a/mods/minetest_game/default/textures/default_grass_footsteps.png b/mods/minetest_game/default/textures/default_grass_footsteps.png new file mode 100755 index 0000000..bf7261b Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_footsteps.png differ diff --git a/mods/minetest_game/default/textures/default_grass_side.png b/mods/minetest_game/default/textures/default_grass_side.png new file mode 100755 index 0000000..ea86a73 Binary files /dev/null and b/mods/minetest_game/default/textures/default_grass_side.png differ diff --git a/mods/minetest_game/default/textures/default_gravel.png b/mods/minetest_game/default/textures/default_gravel.png new file mode 100755 index 0000000..1a3580f Binary files /dev/null and b/mods/minetest_game/default/textures/default_gravel.png differ diff --git a/mods/minetest_game/default/textures/default_ice.png b/mods/minetest_game/default/textures/default_ice.png new file mode 100755 index 0000000..8fdbac2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_ice.png differ diff --git a/mods/minetest_game/default/textures/default_invisible_node_overlay.png b/mods/minetest_game/default/textures/default_invisible_node_overlay.png new file mode 100644 index 0000000..7fc8806 Binary files /dev/null and b/mods/minetest_game/default/textures/default_invisible_node_overlay.png differ diff --git a/mods/minetest_game/default/textures/default_iron_lump.png b/mods/minetest_game/default/textures/default_iron_lump.png new file mode 100755 index 0000000..15857bd Binary files /dev/null and b/mods/minetest_game/default/textures/default_iron_lump.png differ diff --git a/mods/minetest_game/default/textures/default_item_smoke.png b/mods/minetest_game/default/textures/default_item_smoke.png new file mode 100755 index 0000000..ae95c16 Binary files /dev/null and b/mods/minetest_game/default/textures/default_item_smoke.png differ diff --git a/mods/minetest_game/default/textures/default_junglegrass.png b/mods/minetest_game/default/textures/default_junglegrass.png new file mode 100755 index 0000000..f5e9b26 Binary files /dev/null and b/mods/minetest_game/default/textures/default_junglegrass.png differ diff --git a/mods/minetest_game/default/textures/default_jungleleaves.png b/mods/minetest_game/default/textures/default_jungleleaves.png new file mode 100755 index 0000000..62f90f4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_jungleleaves.png differ diff --git a/mods/minetest_game/default/textures/default_jungleleaves_simple.png b/mods/minetest_game/default/textures/default_jungleleaves_simple.png new file mode 100755 index 0000000..62f90f4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_jungleleaves_simple.png differ diff --git a/mods/minetest_game/default/textures/default_junglesapling.png b/mods/minetest_game/default/textures/default_junglesapling.png new file mode 100755 index 0000000..4e97ec9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_junglesapling.png differ diff --git a/mods/minetest_game/default/textures/default_jungletree.png b/mods/minetest_game/default/textures/default_jungletree.png new file mode 100755 index 0000000..660dbfd Binary files /dev/null and b/mods/minetest_game/default/textures/default_jungletree.png differ diff --git a/mods/minetest_game/default/textures/default_jungletree_top.png b/mods/minetest_game/default/textures/default_jungletree_top.png new file mode 100755 index 0000000..6eb68eb Binary files /dev/null and b/mods/minetest_game/default/textures/default_jungletree_top.png differ diff --git a/mods/minetest_game/default/textures/default_junglewood.png b/mods/minetest_game/default/textures/default_junglewood.png new file mode 100755 index 0000000..4bb9164 Binary files /dev/null and b/mods/minetest_game/default/textures/default_junglewood.png differ diff --git a/mods/minetest_game/default/textures/default_kelp.png b/mods/minetest_game/default/textures/default_kelp.png new file mode 100644 index 0000000..6ec3a9a Binary files /dev/null and b/mods/minetest_game/default/textures/default_kelp.png differ diff --git a/mods/minetest_game/default/textures/default_key.png b/mods/minetest_game/default/textures/default_key.png new file mode 100755 index 0000000..014779e Binary files /dev/null and b/mods/minetest_game/default/textures/default_key.png differ diff --git a/mods/minetest_game/default/textures/default_key_alt.png b/mods/minetest_game/default/textures/default_key_alt.png new file mode 100755 index 0000000..5c6940a Binary files /dev/null and b/mods/minetest_game/default/textures/default_key_alt.png differ diff --git a/mods/minetest_game/default/textures/default_key_skeleton.png b/mods/minetest_game/default/textures/default_key_skeleton.png new file mode 100755 index 0000000..ae21d3e Binary files /dev/null and b/mods/minetest_game/default/textures/default_key_skeleton.png differ diff --git a/mods/minetest_game/default/textures/default_ladder.png b/mods/minetest_game/default/textures/default_ladder.png new file mode 100755 index 0000000..ea7310a Binary files /dev/null and b/mods/minetest_game/default/textures/default_ladder.png differ diff --git a/mods/minetest_game/default/textures/default_ladder_steel.png b/mods/minetest_game/default/textures/default_ladder_steel.png new file mode 100755 index 0000000..f59623d Binary files /dev/null and b/mods/minetest_game/default/textures/default_ladder_steel.png differ diff --git a/mods/minetest_game/default/textures/default_ladder_wood.png b/mods/minetest_game/default/textures/default_ladder_wood.png new file mode 100755 index 0000000..ea7310a Binary files /dev/null and b/mods/minetest_game/default/textures/default_ladder_wood.png differ diff --git a/mods/minetest_game/default/textures/default_large_cactus_seedling.png b/mods/minetest_game/default/textures/default_large_cactus_seedling.png new file mode 100644 index 0000000..c8ebf3c Binary files /dev/null and b/mods/minetest_game/default/textures/default_large_cactus_seedling.png differ diff --git a/mods/minetest_game/default/textures/default_lava.png b/mods/minetest_game/default/textures/default_lava.png new file mode 100755 index 0000000..6f3f853 Binary files /dev/null and b/mods/minetest_game/default/textures/default_lava.png differ diff --git a/mods/minetest_game/default/textures/default_lava_flowing_animated.png b/mods/minetest_game/default/textures/default_lava_flowing_animated.png new file mode 100755 index 0000000..b74b60a Binary files /dev/null and b/mods/minetest_game/default/textures/default_lava_flowing_animated.png differ diff --git a/mods/minetest_game/default/textures/default_lava_source_animated.png b/mods/minetest_game/default/textures/default_lava_source_animated.png new file mode 100755 index 0000000..7735a22 Binary files /dev/null and b/mods/minetest_game/default/textures/default_lava_source_animated.png differ diff --git a/mods/minetest_game/default/textures/default_leaves.png b/mods/minetest_game/default/textures/default_leaves.png new file mode 100755 index 0000000..e8d88ba Binary files /dev/null and b/mods/minetest_game/default/textures/default_leaves.png differ diff --git a/mods/minetest_game/default/textures/default_leaves_simple.png b/mods/minetest_game/default/textures/default_leaves_simple.png new file mode 100755 index 0000000..3b36fa6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_leaves_simple.png differ diff --git a/mods/minetest_game/default/textures/default_marram_grass_1.png b/mods/minetest_game/default/textures/default_marram_grass_1.png new file mode 100644 index 0000000..3e28303 Binary files /dev/null and b/mods/minetest_game/default/textures/default_marram_grass_1.png differ diff --git a/mods/minetest_game/default/textures/default_marram_grass_2.png b/mods/minetest_game/default/textures/default_marram_grass_2.png new file mode 100644 index 0000000..58ddf32 Binary files /dev/null and b/mods/minetest_game/default/textures/default_marram_grass_2.png differ diff --git a/mods/minetest_game/default/textures/default_marram_grass_3.png b/mods/minetest_game/default/textures/default_marram_grass_3.png new file mode 100644 index 0000000..4370bcc Binary files /dev/null and b/mods/minetest_game/default/textures/default_marram_grass_3.png differ diff --git a/mods/minetest_game/default/textures/default_mese.png b/mods/minetest_game/default/textures/default_mese.png new file mode 100755 index 0000000..57afcc0 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese.png differ diff --git a/mods/minetest_game/default/textures/default_mese_block.png b/mods/minetest_game/default/textures/default_mese_block.png new file mode 100755 index 0000000..7a663d2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese_block.png differ diff --git a/mods/minetest_game/default/textures/default_mese_crystal.png b/mods/minetest_game/default/textures/default_mese_crystal.png new file mode 100755 index 0000000..ef15344 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese_crystal.png differ diff --git a/mods/minetest_game/default/textures/default_mese_crystal_fragment.png b/mods/minetest_game/default/textures/default_mese_crystal_fragment.png new file mode 100755 index 0000000..e7b2faf Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese_crystal_fragment.png differ diff --git a/mods/minetest_game/default/textures/default_mese_post_light_side.png b/mods/minetest_game/default/textures/default_mese_post_light_side.png new file mode 100644 index 0000000..80a0999 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese_post_light_side.png differ diff --git a/mods/minetest_game/default/textures/default_mese_post_light_side_dark.png b/mods/minetest_game/default/textures/default_mese_post_light_side_dark.png new file mode 100644 index 0000000..4243e48 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese_post_light_side_dark.png differ diff --git a/mods/minetest_game/default/textures/default_mese_post_light_top.png b/mods/minetest_game/default/textures/default_mese_post_light_top.png new file mode 100755 index 0000000..127f0cb Binary files /dev/null and b/mods/minetest_game/default/textures/default_mese_post_light_top.png differ diff --git a/mods/minetest_game/default/textures/default_meselamp.png b/mods/minetest_game/default/textures/default_meselamp.png new file mode 100755 index 0000000..fb9a39b Binary files /dev/null and b/mods/minetest_game/default/textures/default_meselamp.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_coal.png b/mods/minetest_game/default/textures/default_mineral_coal.png new file mode 100755 index 0000000..53c56f4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_coal.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_copper.png b/mods/minetest_game/default/textures/default_mineral_copper.png new file mode 100755 index 0000000..62864a3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_copper.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_diamond.png b/mods/minetest_game/default/textures/default_mineral_diamond.png new file mode 100755 index 0000000..25d7176 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_diamond.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_gold.png b/mods/minetest_game/default/textures/default_mineral_gold.png new file mode 100755 index 0000000..bea9149 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_gold.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_iron.png b/mods/minetest_game/default/textures/default_mineral_iron.png new file mode 100755 index 0000000..ca81430 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_iron.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_mese.png b/mods/minetest_game/default/textures/default_mineral_mese.png new file mode 100755 index 0000000..57afcc0 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_mese.png differ diff --git a/mods/minetest_game/default/textures/default_mineral_tin.png b/mods/minetest_game/default/textures/default_mineral_tin.png new file mode 100755 index 0000000..22df6cd Binary files /dev/null and b/mods/minetest_game/default/textures/default_mineral_tin.png differ diff --git a/mods/minetest_game/default/textures/default_moss.png b/mods/minetest_game/default/textures/default_moss.png new file mode 100644 index 0000000..0b39fd2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_moss.png differ diff --git a/mods/minetest_game/default/textures/default_moss_side.png b/mods/minetest_game/default/textures/default_moss_side.png new file mode 100644 index 0000000..714b202 Binary files /dev/null and b/mods/minetest_game/default/textures/default_moss_side.png differ diff --git a/mods/minetest_game/default/textures/default_mossycobble.png b/mods/minetest_game/default/textures/default_mossycobble.png new file mode 100755 index 0000000..8a30718 Binary files /dev/null and b/mods/minetest_game/default/textures/default_mossycobble.png differ diff --git a/mods/minetest_game/default/textures/default_mycena_clorophos.png b/mods/minetest_game/default/textures/default_mycena_clorophos.png new file mode 100644 index 0000000..2ee52ec Binary files /dev/null and b/mods/minetest_game/default/textures/default_mycena_clorophos.png differ diff --git a/mods/minetest_game/default/textures/default_nc_back.png b/mods/minetest_game/default/textures/default_nc_back.png new file mode 100755 index 0000000..f09f416 Binary files /dev/null and b/mods/minetest_game/default/textures/default_nc_back.png differ diff --git a/mods/minetest_game/default/textures/default_nc_front.png b/mods/minetest_game/default/textures/default_nc_front.png new file mode 100755 index 0000000..cad9eda Binary files /dev/null and b/mods/minetest_game/default/textures/default_nc_front.png differ diff --git a/mods/minetest_game/default/textures/default_nc_rb.png b/mods/minetest_game/default/textures/default_nc_rb.png new file mode 100755 index 0000000..5561345 Binary files /dev/null and b/mods/minetest_game/default/textures/default_nc_rb.png differ diff --git a/mods/minetest_game/default/textures/default_nc_side.png b/mods/minetest_game/default/textures/default_nc_side.png new file mode 100755 index 0000000..f954045 Binary files /dev/null and b/mods/minetest_game/default/textures/default_nc_side.png differ diff --git a/mods/minetest_game/default/textures/default_obsidian.png b/mods/minetest_game/default/textures/default_obsidian.png new file mode 100755 index 0000000..aac62aa Binary files /dev/null and b/mods/minetest_game/default/textures/default_obsidian.png differ diff --git a/mods/minetest_game/default/textures/default_obsidian_block.png b/mods/minetest_game/default/textures/default_obsidian_block.png new file mode 100755 index 0000000..b6674fa Binary files /dev/null and b/mods/minetest_game/default/textures/default_obsidian_block.png differ diff --git a/mods/minetest_game/default/textures/default_obsidian_brick.png b/mods/minetest_game/default/textures/default_obsidian_brick.png new file mode 100755 index 0000000..37dee80 Binary files /dev/null and b/mods/minetest_game/default/textures/default_obsidian_brick.png differ diff --git a/mods/minetest_game/default/textures/default_obsidian_glass.png b/mods/minetest_game/default/textures/default_obsidian_glass.png new file mode 100755 index 0000000..008d201 Binary files /dev/null and b/mods/minetest_game/default/textures/default_obsidian_glass.png differ diff --git a/mods/minetest_game/default/textures/default_obsidian_glass_detail.png b/mods/minetest_game/default/textures/default_obsidian_glass_detail.png new file mode 100755 index 0000000..1397ecc Binary files /dev/null and b/mods/minetest_game/default/textures/default_obsidian_glass_detail.png differ diff --git a/mods/minetest_game/default/textures/default_obsidian_shard.png b/mods/minetest_game/default/textures/default_obsidian_shard.png new file mode 100755 index 0000000..b5ef261 Binary files /dev/null and b/mods/minetest_game/default/textures/default_obsidian_shard.png differ diff --git a/mods/minetest_game/default/textures/default_paper.png b/mods/minetest_game/default/textures/default_paper.png new file mode 100755 index 0000000..23fef5f Binary files /dev/null and b/mods/minetest_game/default/textures/default_paper.png differ diff --git a/mods/minetest_game/default/textures/default_papyrus.png b/mods/minetest_game/default/textures/default_papyrus.png new file mode 100755 index 0000000..378900e Binary files /dev/null and b/mods/minetest_game/default/textures/default_papyrus.png differ diff --git a/mods/minetest_game/default/textures/default_permafrost.png b/mods/minetest_game/default/textures/default_permafrost.png new file mode 100644 index 0000000..10afb5a Binary files /dev/null and b/mods/minetest_game/default/textures/default_permafrost.png differ diff --git a/mods/minetest_game/default/textures/default_pine_bush_sapling.png b/mods/minetest_game/default/textures/default_pine_bush_sapling.png new file mode 100644 index 0000000..fadeff8 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_bush_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_pine_bush_stem.png b/mods/minetest_game/default/textures/default_pine_bush_stem.png new file mode 100644 index 0000000..7dc00f7 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_bush_stem.png differ diff --git a/mods/minetest_game/default/textures/default_pine_needles.png b/mods/minetest_game/default/textures/default_pine_needles.png new file mode 100755 index 0000000..d22bed1 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_needles.png differ diff --git a/mods/minetest_game/default/textures/default_pine_sapling.png b/mods/minetest_game/default/textures/default_pine_sapling.png new file mode 100755 index 0000000..2721570 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_pine_tree.png b/mods/minetest_game/default/textures/default_pine_tree.png new file mode 100755 index 0000000..8c85e42 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_tree.png differ diff --git a/mods/minetest_game/default/textures/default_pine_tree_top.png b/mods/minetest_game/default/textures/default_pine_tree_top.png new file mode 100755 index 0000000..f105a5f Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_tree_top.png differ diff --git a/mods/minetest_game/default/textures/default_pine_wood.png b/mods/minetest_game/default/textures/default_pine_wood.png new file mode 100755 index 0000000..792b9c8 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pine_wood.png differ diff --git a/mods/minetest_game/default/textures/default_pinewood.png b/mods/minetest_game/default/textures/default_pinewood.png new file mode 100755 index 0000000..792b9c8 Binary files /dev/null and b/mods/minetest_game/default/textures/default_pinewood.png differ diff --git a/mods/minetest_game/default/textures/default_rainforest_litter.png b/mods/minetest_game/default/textures/default_rainforest_litter.png new file mode 100755 index 0000000..7cdffac Binary files /dev/null and b/mods/minetest_game/default/textures/default_rainforest_litter.png differ diff --git a/mods/minetest_game/default/textures/default_rainforest_litter_side.png b/mods/minetest_game/default/textures/default_rainforest_litter_side.png new file mode 100755 index 0000000..255a162 Binary files /dev/null and b/mods/minetest_game/default/textures/default_rainforest_litter_side.png differ diff --git a/mods/minetest_game/default/textures/default_river_water.png b/mods/minetest_game/default/textures/default_river_water.png new file mode 100755 index 0000000..ddb34a9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_river_water.png differ diff --git a/mods/minetest_game/default/textures/default_river_water_flowing_animated.png b/mods/minetest_game/default/textures/default_river_water_flowing_animated.png new file mode 100755 index 0000000..dcea173 Binary files /dev/null and b/mods/minetest_game/default/textures/default_river_water_flowing_animated.png differ diff --git a/mods/minetest_game/default/textures/default_river_water_source_animated.png b/mods/minetest_game/default/textures/default_river_water_source_animated.png new file mode 100755 index 0000000..af5bf06 Binary files /dev/null and b/mods/minetest_game/default/textures/default_river_water_source_animated.png differ diff --git a/mods/minetest_game/default/textures/default_rose_bush.png b/mods/minetest_game/default/textures/default_rose_bush.png new file mode 100644 index 0000000..95e497b Binary files /dev/null and b/mods/minetest_game/default/textures/default_rose_bush.png differ diff --git a/mods/minetest_game/default/textures/default_sand.png b/mods/minetest_game/default/textures/default_sand.png new file mode 100755 index 0000000..3a5836c Binary files /dev/null and b/mods/minetest_game/default/textures/default_sand.png differ diff --git a/mods/minetest_game/default/textures/default_sandstone.png b/mods/minetest_game/default/textures/default_sandstone.png new file mode 100755 index 0000000..bf5f803 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sandstone.png differ diff --git a/mods/minetest_game/default/textures/default_sandstone_block.png b/mods/minetest_game/default/textures/default_sandstone_block.png new file mode 100755 index 0000000..cf5d888 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sandstone_block.png differ diff --git a/mods/minetest_game/default/textures/default_sandstone_brick.png b/mods/minetest_game/default/textures/default_sandstone_brick.png new file mode 100755 index 0000000..da19435 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sandstone_brick.png differ diff --git a/mods/minetest_game/default/textures/default_sapling.png b/mods/minetest_game/default/textures/default_sapling.png new file mode 100755 index 0000000..0af62ec Binary files /dev/null and b/mods/minetest_game/default/textures/default_sapling.png differ diff --git a/mods/minetest_game/default/textures/default_scorched_stuff.png b/mods/minetest_game/default/textures/default_scorched_stuff.png new file mode 100755 index 0000000..9ced2fb Binary files /dev/null and b/mods/minetest_game/default/textures/default_scorched_stuff.png differ diff --git a/mods/minetest_game/default/textures/default_sign.png b/mods/minetest_game/default/textures/default_sign.png new file mode 100755 index 0000000..96c1083 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign.png differ diff --git a/mods/minetest_game/default/textures/default_sign_back.png b/mods/minetest_game/default/textures/default_sign_back.png new file mode 100755 index 0000000..b2bedb4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign_back.png differ diff --git a/mods/minetest_game/default/textures/default_sign_steel.png b/mods/minetest_game/default/textures/default_sign_steel.png new file mode 100755 index 0000000..0e64425 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign_steel.png differ diff --git a/mods/minetest_game/default/textures/default_sign_wall.png b/mods/minetest_game/default/textures/default_sign_wall.png new file mode 100755 index 0000000..b2bedb4 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign_wall.png differ diff --git a/mods/minetest_game/default/textures/default_sign_wall_steel.png b/mods/minetest_game/default/textures/default_sign_wall_steel.png new file mode 100755 index 0000000..638e31b Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign_wall_steel.png differ diff --git a/mods/minetest_game/default/textures/default_sign_wall_wood.png b/mods/minetest_game/default/textures/default_sign_wall_wood.png new file mode 100755 index 0000000..1f104b7 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign_wall_wood.png differ diff --git a/mods/minetest_game/default/textures/default_sign_wood.png b/mods/minetest_game/default/textures/default_sign_wood.png new file mode 100755 index 0000000..96c1083 Binary files /dev/null and b/mods/minetest_game/default/textures/default_sign_wood.png differ diff --git a/mods/minetest_game/default/textures/default_silver_sand.png b/mods/minetest_game/default/textures/default_silver_sand.png new file mode 100755 index 0000000..b5f4079 Binary files /dev/null and b/mods/minetest_game/default/textures/default_silver_sand.png differ diff --git a/mods/minetest_game/default/textures/default_silver_sandstone.png b/mods/minetest_game/default/textures/default_silver_sandstone.png new file mode 100755 index 0000000..152c1e3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_silver_sandstone.png differ diff --git a/mods/minetest_game/default/textures/default_silver_sandstone_block.png b/mods/minetest_game/default/textures/default_silver_sandstone_block.png new file mode 100755 index 0000000..c3e1267 Binary files /dev/null and b/mods/minetest_game/default/textures/default_silver_sandstone_block.png differ diff --git a/mods/minetest_game/default/textures/default_silver_sandstone_brick.png b/mods/minetest_game/default/textures/default_silver_sandstone_brick.png new file mode 100755 index 0000000..e3d5d0e Binary files /dev/null and b/mods/minetest_game/default/textures/default_silver_sandstone_brick.png differ diff --git a/mods/minetest_game/default/textures/default_snow.png b/mods/minetest_game/default/textures/default_snow.png new file mode 100755 index 0000000..7793284 Binary files /dev/null and b/mods/minetest_game/default/textures/default_snow.png differ diff --git a/mods/minetest_game/default/textures/default_snow_side.png b/mods/minetest_game/default/textures/default_snow_side.png new file mode 100755 index 0000000..a35740d Binary files /dev/null and b/mods/minetest_game/default/textures/default_snow_side.png differ diff --git a/mods/minetest_game/default/textures/default_snowball.png b/mods/minetest_game/default/textures/default_snowball.png new file mode 100755 index 0000000..d0a07d9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_snowball.png differ diff --git a/mods/minetest_game/default/textures/default_steel_block.png b/mods/minetest_game/default/textures/default_steel_block.png new file mode 100755 index 0000000..37d3368 Binary files /dev/null and b/mods/minetest_game/default/textures/default_steel_block.png differ diff --git a/mods/minetest_game/default/textures/default_steel_ingot.png b/mods/minetest_game/default/textures/default_steel_ingot.png new file mode 100755 index 0000000..2b72136 Binary files /dev/null and b/mods/minetest_game/default/textures/default_steel_ingot.png differ diff --git a/mods/minetest_game/default/textures/default_stick.png b/mods/minetest_game/default/textures/default_stick.png new file mode 100755 index 0000000..0d995b3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_stick.png differ diff --git a/mods/minetest_game/default/textures/default_stone.png b/mods/minetest_game/default/textures/default_stone.png new file mode 100755 index 0000000..f7f5fdc Binary files /dev/null and b/mods/minetest_game/default/textures/default_stone.png differ diff --git a/mods/minetest_game/default/textures/default_stone_block.png b/mods/minetest_game/default/textures/default_stone_block.png new file mode 100755 index 0000000..9b1ee36 Binary files /dev/null and b/mods/minetest_game/default/textures/default_stone_block.png differ diff --git a/mods/minetest_game/default/textures/default_stone_brick.png b/mods/minetest_game/default/textures/default_stone_brick.png new file mode 100755 index 0000000..7d63247 Binary files /dev/null and b/mods/minetest_game/default/textures/default_stone_brick.png differ diff --git a/mods/minetest_game/default/textures/default_stones.png b/mods/minetest_game/default/textures/default_stones.png new file mode 100644 index 0000000..e5660f6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_stones.png differ diff --git a/mods/minetest_game/default/textures/default_stones_side.png b/mods/minetest_game/default/textures/default_stones_side.png new file mode 100644 index 0000000..a38014f Binary files /dev/null and b/mods/minetest_game/default/textures/default_stones_side.png differ diff --git a/mods/minetest_game/default/textures/default_tin_block.png b/mods/minetest_game/default/textures/default_tin_block.png new file mode 100755 index 0000000..b4fb034 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tin_block.png differ diff --git a/mods/minetest_game/default/textures/default_tin_ingot.png b/mods/minetest_game/default/textures/default_tin_ingot.png new file mode 100755 index 0000000..5ea5bef Binary files /dev/null and b/mods/minetest_game/default/textures/default_tin_ingot.png differ diff --git a/mods/minetest_game/default/textures/default_tin_lump.png b/mods/minetest_game/default/textures/default_tin_lump.png new file mode 100755 index 0000000..d84cdc3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tin_lump.png differ diff --git a/mods/minetest_game/default/textures/default_tool_bronzeaxe.png b/mods/minetest_game/default/textures/default_tool_bronzeaxe.png new file mode 100755 index 0000000..77352e3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_bronzeaxe.png differ diff --git a/mods/minetest_game/default/textures/default_tool_bronzepick.png b/mods/minetest_game/default/textures/default_tool_bronzepick.png new file mode 100755 index 0000000..9dadbae Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_bronzepick.png differ diff --git a/mods/minetest_game/default/textures/default_tool_bronzeshovel.png b/mods/minetest_game/default/textures/default_tool_bronzeshovel.png new file mode 100755 index 0000000..72de36d Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_bronzeshovel.png differ diff --git a/mods/minetest_game/default/textures/default_tool_bronzesword.png b/mods/minetest_game/default/textures/default_tool_bronzesword.png new file mode 100755 index 0000000..9364437 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_bronzesword.png differ diff --git a/mods/minetest_game/default/textures/default_tool_diamondaxe.png b/mods/minetest_game/default/textures/default_tool_diamondaxe.png new file mode 100755 index 0000000..5395bf9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_diamondaxe.png differ diff --git a/mods/minetest_game/default/textures/default_tool_diamondpick.png b/mods/minetest_game/default/textures/default_tool_diamondpick.png new file mode 100755 index 0000000..0ccf623 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_diamondpick.png differ diff --git a/mods/minetest_game/default/textures/default_tool_diamondshovel.png b/mods/minetest_game/default/textures/default_tool_diamondshovel.png new file mode 100755 index 0000000..1fc7150 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_diamondshovel.png differ diff --git a/mods/minetest_game/default/textures/default_tool_diamondsword.png b/mods/minetest_game/default/textures/default_tool_diamondsword.png new file mode 100755 index 0000000..2aee3d2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_diamondsword.png differ diff --git a/mods/minetest_game/default/textures/default_tool_meseaxe.png b/mods/minetest_game/default/textures/default_tool_meseaxe.png new file mode 100755 index 0000000..b8c464f Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_meseaxe.png differ diff --git a/mods/minetest_game/default/textures/default_tool_mesepick.png b/mods/minetest_game/default/textures/default_tool_mesepick.png new file mode 100755 index 0000000..0b9080d Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_mesepick.png differ diff --git a/mods/minetest_game/default/textures/default_tool_meseshovel.png b/mods/minetest_game/default/textures/default_tool_meseshovel.png new file mode 100755 index 0000000..03279f2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_meseshovel.png differ diff --git a/mods/minetest_game/default/textures/default_tool_mesesword.png b/mods/minetest_game/default/textures/default_tool_mesesword.png new file mode 100755 index 0000000..af9592a Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_mesesword.png differ diff --git a/mods/minetest_game/default/textures/default_tool_steelaxe.png b/mods/minetest_game/default/textures/default_tool_steelaxe.png new file mode 100755 index 0000000..82267d6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_steelaxe.png differ diff --git a/mods/minetest_game/default/textures/default_tool_steelpick.png b/mods/minetest_game/default/textures/default_tool_steelpick.png new file mode 100755 index 0000000..0adab46 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_steelpick.png differ diff --git a/mods/minetest_game/default/textures/default_tool_steelshovel.png b/mods/minetest_game/default/textures/default_tool_steelshovel.png new file mode 100755 index 0000000..640826f Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_steelshovel.png differ diff --git a/mods/minetest_game/default/textures/default_tool_steelsword.png b/mods/minetest_game/default/textures/default_tool_steelsword.png new file mode 100755 index 0000000..b28d93c Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_steelsword.png differ diff --git a/mods/minetest_game/default/textures/default_tool_stoneaxe.png b/mods/minetest_game/default/textures/default_tool_stoneaxe.png new file mode 100755 index 0000000..9df8f69 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_stoneaxe.png differ diff --git a/mods/minetest_game/default/textures/default_tool_stonepick.png b/mods/minetest_game/default/textures/default_tool_stonepick.png new file mode 100755 index 0000000..ac38ced Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_stonepick.png differ diff --git a/mods/minetest_game/default/textures/default_tool_stoneshovel.png b/mods/minetest_game/default/textures/default_tool_stoneshovel.png new file mode 100755 index 0000000..794afd5 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_stoneshovel.png differ diff --git a/mods/minetest_game/default/textures/default_tool_stonesword.png b/mods/minetest_game/default/textures/default_tool_stonesword.png new file mode 100755 index 0000000..2173a90 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_stonesword.png differ diff --git a/mods/minetest_game/default/textures/default_tool_woodaxe.png b/mods/minetest_game/default/textures/default_tool_woodaxe.png new file mode 100755 index 0000000..2fb4656 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_woodaxe.png differ diff --git a/mods/minetest_game/default/textures/default_tool_woodpick.png b/mods/minetest_game/default/textures/default_tool_woodpick.png new file mode 100755 index 0000000..e78f0e2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_woodpick.png differ diff --git a/mods/minetest_game/default/textures/default_tool_woodshovel.png b/mods/minetest_game/default/textures/default_tool_woodshovel.png new file mode 100755 index 0000000..b99bf7f Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_woodshovel.png differ diff --git a/mods/minetest_game/default/textures/default_tool_woodsword.png b/mods/minetest_game/default/textures/default_tool_woodsword.png new file mode 100755 index 0000000..f32dc6d Binary files /dev/null and b/mods/minetest_game/default/textures/default_tool_woodsword.png differ diff --git a/mods/minetest_game/default/textures/default_torch_animated.png b/mods/minetest_game/default/textures/default_torch_animated.png new file mode 100755 index 0000000..7b00d76 Binary files /dev/null and b/mods/minetest_game/default/textures/default_torch_animated.png differ diff --git a/mods/minetest_game/default/textures/default_torch_on_ceiling_animated.png b/mods/minetest_game/default/textures/default_torch_on_ceiling_animated.png new file mode 100755 index 0000000..7c6bcb3 Binary files /dev/null and b/mods/minetest_game/default/textures/default_torch_on_ceiling_animated.png differ diff --git a/mods/minetest_game/default/textures/default_torch_on_floor.png b/mods/minetest_game/default/textures/default_torch_on_floor.png new file mode 100755 index 0000000..06bb7a9 Binary files /dev/null and b/mods/minetest_game/default/textures/default_torch_on_floor.png differ diff --git a/mods/minetest_game/default/textures/default_torch_on_floor_animated.png b/mods/minetest_game/default/textures/default_torch_on_floor_animated.png new file mode 100755 index 0000000..ff7acb2 Binary files /dev/null and b/mods/minetest_game/default/textures/default_torch_on_floor_animated.png differ diff --git a/mods/minetest_game/default/textures/default_tree.png b/mods/minetest_game/default/textures/default_tree.png new file mode 100755 index 0000000..4e1e2cd Binary files /dev/null and b/mods/minetest_game/default/textures/default_tree.png differ diff --git a/mods/minetest_game/default/textures/default_tree_top.png b/mods/minetest_game/default/textures/default_tree_top.png new file mode 100755 index 0000000..6eb68eb Binary files /dev/null and b/mods/minetest_game/default/textures/default_tree_top.png differ diff --git a/mods/minetest_game/default/textures/default_water.png b/mods/minetest_game/default/textures/default_water.png new file mode 100755 index 0000000..cd8cbc6 Binary files /dev/null and b/mods/minetest_game/default/textures/default_water.png differ diff --git a/mods/minetest_game/default/textures/default_water_flowing_animated.png b/mods/minetest_game/default/textures/default_water_flowing_animated.png new file mode 100755 index 0000000..bbf3152 Binary files /dev/null and b/mods/minetest_game/default/textures/default_water_flowing_animated.png differ diff --git a/mods/minetest_game/default/textures/default_water_source_animated.png b/mods/minetest_game/default/textures/default_water_source_animated.png new file mode 100755 index 0000000..c93d24c Binary files /dev/null and b/mods/minetest_game/default/textures/default_water_source_animated.png differ diff --git a/mods/minetest_game/default/textures/default_wood.png b/mods/minetest_game/default/textures/default_wood.png new file mode 100755 index 0000000..8a4fd32 Binary files /dev/null and b/mods/minetest_game/default/textures/default_wood.png differ diff --git a/mods/minetest_game/default/textures/gui_formbg.png b/mods/minetest_game/default/textures/gui_formbg.png new file mode 100755 index 0000000..cd01894 Binary files /dev/null and b/mods/minetest_game/default/textures/gui_formbg.png differ diff --git a/mods/minetest_game/default/textures/gui_furnace_arrow_bg.png b/mods/minetest_game/default/textures/gui_furnace_arrow_bg.png new file mode 100755 index 0000000..745e49f Binary files /dev/null and b/mods/minetest_game/default/textures/gui_furnace_arrow_bg.png differ diff --git a/mods/minetest_game/default/textures/gui_furnace_arrow_fg.png b/mods/minetest_game/default/textures/gui_furnace_arrow_fg.png new file mode 100755 index 0000000..adbcd9f Binary files /dev/null and b/mods/minetest_game/default/textures/gui_furnace_arrow_fg.png differ diff --git a/mods/minetest_game/default/textures/gui_hb_bg.png b/mods/minetest_game/default/textures/gui_hb_bg.png new file mode 100755 index 0000000..a6caf19 Binary files /dev/null and b/mods/minetest_game/default/textures/gui_hb_bg.png differ diff --git a/mods/minetest_game/default/textures/gui_hotbar.png b/mods/minetest_game/default/textures/gui_hotbar.png new file mode 100755 index 0000000..bb5ffee Binary files /dev/null and b/mods/minetest_game/default/textures/gui_hotbar.png differ diff --git a/mods/minetest_game/default/textures/gui_hotbar_selected.png b/mods/minetest_game/default/textures/gui_hotbar_selected.png new file mode 100755 index 0000000..09248fe Binary files /dev/null and b/mods/minetest_game/default/textures/gui_hotbar_selected.png differ diff --git a/mods/minetest_game/default/textures/heart.png b/mods/minetest_game/default/textures/heart.png new file mode 100755 index 0000000..1fbc0d3 Binary files /dev/null and b/mods/minetest_game/default/textures/heart.png differ diff --git a/mods/minetest_game/default/textures/wieldhand.png b/mods/minetest_game/default/textures/wieldhand.png new file mode 100755 index 0000000..f091b01 Binary files /dev/null and b/mods/minetest_game/default/textures/wieldhand.png differ diff --git a/mods/minetest_game/default/tools.lua b/mods/minetest_game/default/tools.lua new file mode 100644 index 0000000..44468c5 --- /dev/null +++ b/mods/minetest_game/default/tools.lua @@ -0,0 +1,517 @@ +-- mods/default/tools.lua + +-- support for MT game translation. +local S = default.get_translator + +-- The hand +-- Override the hand item registered in the engine in builtin/game/register.lua +minetest.override_item("", { + wield_scale = {x=1,y=1,z=2.5}, + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level = 0, + groupcaps = { + crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1}, + snappy = {times={[3]=0.40}, uses=0, maxlevel=1}, + oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0} + }, + damage_groups = {fleshy=1}, + } +}) + +-- +-- Picks +-- + +minetest.register_tool("default:pick_wood", { + description = S("Wooden Pickaxe"), + inventory_image = "default_tool_woodpick.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=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1, flammable = 2} +}) + +minetest.register_tool("default:pick_stone", { + description = S("Stone Pickaxe"), + inventory_image = "default_tool_stonepick.png", + tool_capabilities = { + full_punch_interval = 1.3, + max_drop_level=0, + groupcaps={ + cracky = {times={[2]=2.0, [3]=1.00}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_bronze", { + description = S("Bronze Pickaxe"), + inventory_image = "default_tool_bronzepick.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.50, [2]=1.80, [3]=0.90}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_steel", { + description = S("Steel Pickaxe"), + inventory_image = "default_tool_steelpick.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky = {times={[1]=4.00, [2]=1.60, [3]=0.80}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_mese", { + description = S("Mese Pickaxe"), + inventory_image = "default_tool_mesepick.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=3, + groupcaps={ + cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=5}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +minetest.register_tool("default:pick_diamond", { + description = S("Diamond Pickaxe"), + inventory_image = "default_tool_diamondpick.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=3, + groupcaps={ + cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=5}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1} +}) + +-- +-- Shovels +-- + +minetest.register_tool("default:shovel_wood", { + description = S("Wooden Shovel"), + inventory_image = "default_tool_woodshovel.png", + wield_image = "default_tool_woodshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + crumbly = {times={[1]=3.00, [2]=1.60, [3]=0.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1, flammable = 2} +}) + +minetest.register_tool("default:shovel_stone", { + description = S("Stone Shovel"), + inventory_image = "default_tool_stoneshovel.png", + wield_image = "default_tool_stoneshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.4, + max_drop_level=0, + groupcaps={ + crumbly = {times={[1]=1.80, [2]=1.20, [3]=0.50}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_bronze", { + description = S("Bronze Shovel"), + inventory_image = "default_tool_bronzeshovel.png", + wield_image = "default_tool_bronzeshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.65, [2]=1.05, [3]=0.45}, uses=25, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_steel", { + description = S("Steel Shovel"), + inventory_image = "default_tool_steelshovel.png", + wield_image = "default_tool_steelshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.1, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_mese", { + description = S("Mese Shovel"), + inventory_image = "default_tool_meseshovel.png", + wield_image = "default_tool_meseshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + crumbly = {times={[1]=1.20, [2]=0.60, [3]=0.30}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +minetest.register_tool("default:shovel_diamond", { + description = S("Diamond Shovel"), + inventory_image = "default_tool_diamondshovel.png", + wield_image = "default_tool_diamondshovel.png^[transformR90", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + crumbly = {times={[1]=1.10, [2]=0.50, [3]=0.30}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {shovel = 1} +}) + +-- +-- Axes +-- + +minetest.register_tool("default:axe_wood", { + description = S("Wooden Axe"), + inventory_image = "default_tool_woodaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=0, + groupcaps={ + choppy = {times={[2]=3.00, [3]=1.60}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1, flammable = 2} +}) + +minetest.register_tool("default:axe_stone", { + description = S("Stone Axe"), + inventory_image = "default_tool_stoneaxe.png", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + choppy={times={[1]=3.00, [2]=2.00, [3]=1.30}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=3}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_bronze", { + description = S("Bronze Axe"), + inventory_image = "default_tool_bronzeaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.75, [2]=1.70, [3]=1.15}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_steel", { + description = S("Steel Axe"), + inventory_image = "default_tool_steelaxe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.50, [2]=1.40, [3]=1.00}, uses=20, maxlevel=2}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_mese", { + description = S("Mese Axe"), + inventory_image = "default_tool_meseaxe.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +minetest.register_tool("default:axe_diamond", { + description = S("Diamond Axe"), + inventory_image = "default_tool_diamondaxe.png", + tool_capabilities = { + full_punch_interval = 0.9, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=7}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {axe = 1} +}) + +-- +-- Swords +-- + +minetest.register_tool("default:sword_wood", { + description = S("Wooden Sword"), + inventory_image = "default_tool_woodsword.png", + tool_capabilities = { + full_punch_interval = 1, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.6, [3]=0.40}, uses=10, maxlevel=1}, + }, + damage_groups = {fleshy=2}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1, flammable = 2} +}) + +minetest.register_tool("default:sword_stone", { + description = S("Stone Sword"), + inventory_image = "default_tool_stonesword.png", + tool_capabilities = { + full_punch_interval = 1.2, + max_drop_level=0, + groupcaps={ + snappy={times={[2]=1.4, [3]=0.40}, uses=20, maxlevel=1}, + }, + damage_groups = {fleshy=4}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_bronze", { + description = S("Bronze Sword"), + inventory_image = "default_tool_bronzesword.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.75, [2]=1.30, [3]=0.375}, uses=25, maxlevel=2}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_steel", { + description = S("Steel Sword"), + inventory_image = "default_tool_steelsword.png", + tool_capabilities = { + full_punch_interval = 0.8, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2}, + }, + damage_groups = {fleshy=6}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_mese", { + description = S("Mese Sword"), + inventory_image = "default_tool_mesesword.png", + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3}, + }, + damage_groups = {fleshy=7}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +minetest.register_tool("default:sword_diamond", { + description = S("Diamond Sword"), + inventory_image = "default_tool_diamondsword.png", + tool_capabilities = { + full_punch_interval = 0.7, + max_drop_level=1, + groupcaps={ + snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=40, maxlevel=3}, + }, + damage_groups = {fleshy=8}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {sword = 1} +}) + +-- +-- Register Craft Recipies +-- + +local craft_ingreds = { + wood = "group:wood", + stone = "group:stone", + steel = "default:steel_ingot", + bronze = "default:bronze_ingot", + mese = "default:mese_crystal", + diamond = "default:diamond" +} + +for name, mat in pairs(craft_ingreds) do + minetest.register_craft({ + output = "default:pick_".. name, + recipe = { + {mat, mat, mat}, + {"", "group:stick", ""}, + {"", "group:stick", ""} + } + }) + + minetest.register_craft({ + output = "default:shovel_".. name, + recipe = { + {mat}, + {"group:stick"}, + {"group:stick"} + } + }) + + minetest.register_craft({ + output = "default:axe_".. name, + recipe = { + {mat, mat}, + {mat, "group:stick"}, + {"", "group:stick"} + } + }) + + minetest.register_craft({ + output = "default:sword_".. name, + recipe = { + {mat}, + {mat}, + {"group:stick"} + } + }) +end + +minetest.register_tool("default:key", { + description = S("Key"), + inventory_image = "default_key.png", + groups = {key = 1, not_in_creative_inventory = 1}, + stack_max = 1, + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local def = minetest.registered_nodes[node.name] + if def and def.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return def.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + if pointed_thing.type ~= "node" then + return itemstack + end + + local pos = pointed_thing.under + node = minetest.get_node(pos) + + if not node or node.name == "ignore" then + return itemstack + end + + local ndef = minetest.registered_nodes[node.name] + if not ndef then + return itemstack + end + + local on_key_use = ndef.on_key_use + if on_key_use then + on_key_use(pos, placer) + end + + return nil + end +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:pick_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:shovel_wood", + burntime = 4, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:axe_wood", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:sword_wood", + burntime = 5, +}) diff --git a/mods/minetest_game/default/torch.lua b/mods/minetest_game/default/torch.lua new file mode 100644 index 0000000..a19f531 --- /dev/null +++ b/mods/minetest_game/default/torch.lua @@ -0,0 +1,157 @@ +-- default/torch.lua + +-- support for MT game translation. +local S = default.get_translator + +local function on_flood(pos, oldnode, newnode) + minetest.add_item(pos, ItemStack("default:torch 1")) + -- Play flame-extinguish sound if liquid is not an 'igniter' + local nodedef = minetest.registered_items[newnode.name] + if not (nodedef and nodedef.groups and + nodedef.groups.igniter and nodedef.groups.igniter > 0) then + minetest.sound_play( + "default_cool_lava", + {pos = pos, max_hear_distance = 16, gain = 0.1}, + true + ) + end + -- Remove the torch node + return false +end + +minetest.register_node("default:torch", { + description = S("Torch"), + drawtype = "mesh", + mesh = "torch_floor.obj", + inventory_image = "default_torch_on_floor.png", + wield_image = "default_torch_on_floor.png", + tiles = {{ + name = "default_torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} + }}, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + liquids_pointable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, attached_node=1, torch=1}, + drop = "default:torch", + selection_box = { + type = "wallmounted", + wall_bottom = {-1/8, -1/2, -1/8, 1/8, 2/16, 1/8}, + }, + sounds = default.node_sound_wood_defaults(), + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local def = minetest.registered_nodes[node.name] + if def and def.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return def.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + local above = pointed_thing.above + local wdir = minetest.dir_to_wallmounted(vector.subtract(under, above)) + local fakestack = itemstack + if wdir == 0 then + fakestack:set_name("default:torch_ceiling") + elseif wdir == 1 then + fakestack:set_name("default:torch") + else + fakestack:set_name("default:torch_wall") + end + + itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir) + itemstack:set_name("default:torch") + + return itemstack + end, + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_node("default:torch_wall", { + drawtype = "mesh", + mesh = "torch_wall.obj", + tiles = {{ + name = "default_torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} + }}, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, + drop = "default:torch", + selection_box = { + type = "wallmounted", + wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8}, + }, + sounds = default.node_sound_wood_defaults(), + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_node("default:torch_ceiling", { + drawtype = "mesh", + mesh = "torch_ceiling.obj", + tiles = {{ + name = "default_torch_on_floor_animated.png", + animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3} + }}, + use_texture_alpha = "clip", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + light_source = 12, + groups = {choppy=2, dig_immediate=3, flammable=1, not_in_creative_inventory=1, attached_node=1, torch=1}, + drop = "default:torch", + selection_box = { + type = "wallmounted", + wall_top = {-1/8, -1/16, -5/16, 1/8, 1/2, 1/8}, + }, + sounds = default.node_sound_wood_defaults(), + floodable = true, + on_flood = on_flood, + on_rotate = false +}) + +minetest.register_lbm({ + name = "default:3dtorch", + nodenames = {"default:torch", "torches:floor", "torches:wall"}, + action = function(pos, node) + if node.param2 == 0 then + minetest.set_node(pos, {name = "default:torch_ceiling", + param2 = node.param2}) + elseif node.param2 == 1 then + minetest.set_node(pos, {name = "default:torch", + param2 = node.param2}) + else + minetest.set_node(pos, {name = "default:torch_wall", + param2 = node.param2}) + end + end +}) + +minetest.register_craft({ + output = "default:torch 4", + recipe = { + {"default:coal_lump"}, + {"group:stick"}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "default:torch", + burntime = 4, +}) diff --git a/mods/minetest_game/default/trees.lua b/mods/minetest_game/default/trees.lua new file mode 100644 index 0000000..569beee --- /dev/null +++ b/mods/minetest_game/default/trees.lua @@ -0,0 +1,607 @@ +-- default/trees.lua + +-- support for MT game translation. +local S = default.get_translator + +local random = math.random + +-- +-- Grow trees from saplings +-- + +-- 'can grow' function + +function default.can_grow(pos) + local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) + if not node_under then + return false + end + if minetest.get_item_group(node_under.name, "soil") == 0 then + return false + end + local light_level = minetest.get_node_light(pos) + if not light_level or light_level < 13 then + return false + end + return true +end + + +-- 'is snow nearby' function + +local function is_snow_nearby(pos) + return minetest.find_node_near(pos, 1, {"group:snowy"}) +end + + +-- Grow sapling + +function default.grow_sapling(pos) + if not default.can_grow(pos) then + -- try again 5 min later + minetest.get_node_timer(pos):start(300) + return + end + + local mg_name = minetest.get_mapgen_setting("mg_name") + local node = minetest.get_node(pos) + if node.name == "default:sapling" then + minetest.log("action", "A sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + if mg_name == "v6" then + default.grow_tree(pos, random(1, 4) == 1) + else + default.grow_new_apple_tree(pos) + end + elseif node.name == "default:junglesapling" then + minetest.log("action", "A jungle sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + if mg_name == "v6" then + default.grow_jungle_tree(pos) + else + default.grow_new_jungle_tree(pos) + end + elseif node.name == "default:pine_sapling" then + minetest.log("action", "A pine sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + local snow = is_snow_nearby(pos) + if mg_name == "v6" then + default.grow_pine_tree(pos, snow) + elseif snow then + default.grow_new_snowy_pine_tree(pos) + else + default.grow_new_pine_tree(pos) + end + elseif node.name == "default:acacia_sapling" then + minetest.log("action", "An acacia sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_acacia_tree(pos) + elseif node.name == "default:aspen_sapling" then + minetest.log("action", "An aspen sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_aspen_tree(pos) + elseif node.name == "default:bush_sapling" then + minetest.log("action", "A bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_bush(pos) + elseif node.name == "default:blueberry_bush_sapling" then + minetest.log("action", "A blueberry bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_blueberry_bush(pos) + elseif node.name == "default:acacia_bush_sapling" then + minetest.log("action", "An acacia bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_acacia_bush(pos) + elseif node.name == "default:pine_bush_sapling" then + minetest.log("action", "A pine bush sapling grows into a bush at ".. + minetest.pos_to_string(pos)) + default.grow_pine_bush(pos) + elseif node.name == "default:emergent_jungle_sapling" then + minetest.log("action", "An emergent jungle sapling grows into a tree at ".. + minetest.pos_to_string(pos)) + default.grow_new_emergent_jungle_tree(pos) + end +end + +minetest.register_lbm({ + name = "default:convert_saplings_to_node_timer", + nodenames = {"default:sapling", "default:junglesapling", + "default:pine_sapling", "default:acacia_sapling", + "default:aspen_sapling"}, + action = function(pos) + minetest.get_node_timer(pos):start(math.random(300, 1500)) + end +}) + +-- +-- Tree generation +-- + +-- Apple tree and jungle tree trunk and leaves function + +local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid, + height, size, iters, is_apple_tree) + local x, y, z = pos.x, pos.y, pos.z + local c_air = minetest.get_content_id("air") + local c_ignore = minetest.get_content_id("ignore") + local c_apple = minetest.get_content_id("default:apple") + + -- Trunk + data[a:index(x, y, z)] = tree_cid -- Force-place lowest trunk node to replace sapling + for yy = y + 1, y + height - 1 do + local vi = a:index(x, yy, z) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore or node_id == leaves_cid then + data[vi] = tree_cid + end + end + + -- Force leaves near the trunk + for z_dist = -1, 1 do + for y_dist = -size, 1 do + local vi = a:index(x - 1, y + height + y_dist, z + z_dist) + for x_dist = -1, 1 do + if data[vi] == c_air or data[vi] == c_ignore then + if is_apple_tree and random(1, 8) == 1 then + data[vi] = c_apple + else + data[vi] = leaves_cid + end + end + vi = vi + 1 + end + end + end + + -- Randomly add leaves in 2x2x2 clusters. + for i = 1, iters do + local clust_x = x + random(-size, size - 1) + local clust_y = y + height + random(-size, 0) + local clust_z = z + random(-size, size - 1) + + for xi = 0, 1 do + for yi = 0, 1 do + for zi = 0, 1 do + local vi = a:index(clust_x + xi, clust_y + yi, clust_z + zi) + if data[vi] == c_air or data[vi] == c_ignore then + if is_apple_tree and random(1, 8) == 1 then + data[vi] = c_apple + else + data[vi] = leaves_cid + end + end + end + end + end + end +end + + +-- Apple tree + +function default.grow_tree(pos, is_apple_tree, bad) + --[[ + NOTE: Tree-placing code is currently duplicated in the engine + and in games that have saplings; both are deprecated but not + replaced yet + --]] + if bad then + error("Deprecated use of default.grow_tree") + end + + local x, y, z = pos.x, pos.y, pos.z + local height = random(4, 5) + local c_tree = minetest.get_content_id("default:tree") + local c_leaves = minetest.get_content_id("default:leaves") + + local vm = minetest.get_voxel_manip() + local minp, maxp = vm:read_from_map( + {x = x - 2, y = y, z = z - 2}, + {x = x + 2, y = y + height + 1, z = z + 2} + ) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm:get_data() + + add_trunk_and_leaves(data, a, pos, c_tree, c_leaves, height, 2, 8, is_apple_tree) + + vm:set_data(data) + vm:write_to_map() + vm:update_map() +end + + +-- Jungle tree + +function default.grow_jungle_tree(pos, bad) + --[[ + NOTE: Jungletree-placing code is currently duplicated in the engine + and in games that have saplings; both are deprecated but not + replaced yet + --]] + if bad then + error("Deprecated use of default.grow_jungle_tree") + end + + local x, y, z = pos.x, pos.y, pos.z + local height = random(8, 12) + local c_air = minetest.get_content_id("air") + local c_ignore = minetest.get_content_id("ignore") + local c_jungletree = minetest.get_content_id("default:jungletree") + local c_jungleleaves = minetest.get_content_id("default:jungleleaves") + + local vm = minetest.get_voxel_manip() + local minp, maxp = vm:read_from_map( + {x = x - 3, y = y - 1, z = z - 3}, + {x = x + 3, y = y + height + 1, z = z + 3} + ) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm:get_data() + + add_trunk_and_leaves(data, a, pos, c_jungletree, c_jungleleaves, + height, 3, 30, false) + + -- Roots + for z_dist = -1, 1 do + local vi_1 = a:index(x - 1, y - 1, z + z_dist) + local vi_2 = a:index(x - 1, y, z + z_dist) + for x_dist = -1, 1 do + if random(1, 3) >= 2 then + if data[vi_1] == c_air or data[vi_1] == c_ignore then + data[vi_1] = c_jungletree + elseif data[vi_2] == c_air or data[vi_2] == c_ignore then + data[vi_2] = c_jungletree + end + end + vi_1 = vi_1 + 1 + vi_2 = vi_2 + 1 + end + end + + vm:set_data(data) + vm:write_to_map() + vm:update_map() +end + + +-- Pine tree from mg mapgen mod, design by sfan5, pointy top added by paramat + +local function add_pine_needles(data, vi, c_air, c_ignore, c_snow, c_pine_needles) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore or node_id == c_snow then + data[vi] = c_pine_needles + end +end + +local function add_snow(data, vi, c_air, c_ignore, c_snow) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore then + data[vi] = c_snow + end +end + +function default.grow_pine_tree(pos, snow) + local x, y, z = pos.x, pos.y, pos.z + local maxy = y + random(9, 13) -- Trunk top + + local c_air = minetest.get_content_id("air") + local c_ignore = minetest.get_content_id("ignore") + local c_pine_tree = minetest.get_content_id("default:pine_tree") + local c_pine_needles = minetest.get_content_id("default:pine_needles") + local c_snow = minetest.get_content_id("default:snow") + + local vm = minetest.get_voxel_manip() + local minp, maxp = vm:read_from_map( + {x = x - 3, y = y, z = z - 3}, + {x = x + 3, y = maxy + 3, z = z + 3} + ) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm:get_data() + + -- Upper branches layer + local dev = 3 + for yy = maxy - 1, maxy + 1 do + for zz = z - dev, z + dev do + local vi = a:index(x - dev, yy, zz) + local via = a:index(x - dev, yy + 1, zz) + for xx = x - dev, x + dev do + if random() < 0.95 - dev * 0.05 then + add_pine_needles(data, vi, c_air, c_ignore, c_snow, + c_pine_needles) + if snow then + add_snow(data, via, c_air, c_ignore, c_snow) + end + end + vi = vi + 1 + via = via + 1 + end + end + dev = dev - 1 + end + + -- Centre top nodes + add_pine_needles(data, a:index(x, maxy + 1, z), c_air, c_ignore, c_snow, + c_pine_needles) + add_pine_needles(data, a:index(x, maxy + 2, z), c_air, c_ignore, c_snow, + c_pine_needles) -- Paramat added a pointy top node + if snow then + add_snow(data, a:index(x, maxy + 3, z), c_air, c_ignore, c_snow) + end + + -- Lower branches layer + local my = 0 + for i = 1, 20 do -- Random 2x2 squares of needles + local xi = x + random(-3, 2) + local yy = maxy + random(-6, -5) + local zi = z + random(-3, 2) + if yy > my then + my = yy + end + for zz = zi, zi+1 do + local vi = a:index(xi, yy, zz) + local via = a:index(xi, yy + 1, zz) + for xx = xi, xi + 1 do + add_pine_needles(data, vi, c_air, c_ignore, c_snow, + c_pine_needles) + if snow then + add_snow(data, via, c_air, c_ignore, c_snow) + end + vi = vi + 1 + via = via + 1 + end + end + end + + dev = 2 + for yy = my + 1, my + 2 do + for zz = z - dev, z + dev do + local vi = a:index(x - dev, yy, zz) + local via = a:index(x - dev, yy + 1, zz) + for xx = x - dev, x + dev do + if random() < 0.95 - dev * 0.05 then + add_pine_needles(data, vi, c_air, c_ignore, c_snow, + c_pine_needles) + if snow then + add_snow(data, via, c_air, c_ignore, c_snow) + end + end + vi = vi + 1 + via = via + 1 + end + end + dev = dev - 1 + end + + -- Trunk + -- Force-place lowest trunk node to replace sapling + data[a:index(x, y, z)] = c_pine_tree + for yy = y + 1, maxy do + local vi = a:index(x, yy, z) + local node_id = data[vi] + if node_id == c_air or node_id == c_ignore or + node_id == c_pine_needles or node_id == c_snow then + data[vi] = c_pine_tree + end + end + + vm:set_data(data) + vm:write_to_map() + vm:update_map() +end + + +-- New apple tree + +function default.grow_new_apple_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/apple_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 3, y = pos.y - 1, z = pos.z - 3}, + path, "random", nil, false) +end + + +-- New jungle tree + +function default.grow_new_jungle_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/jungle_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "random", nil, false) +end + + +-- New emergent jungle tree + +function default.grow_new_emergent_jungle_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/emergent_jungle_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 3, y = pos.y - 5, z = pos.z - 3}, + path, "random", nil, false) +end + + +-- New pine tree + +function default.grow_new_pine_tree(pos) + local path + if math.random() > 0.5 then + path = minetest.get_modpath("default") .. + "/schematics/pine_tree_from_sapling.mts" + else + path = minetest.get_modpath("default") .. + "/schematics/small_pine_tree_from_sapling.mts" + end + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "0", nil, false) +end + + +-- New snowy pine tree + +function default.grow_new_snowy_pine_tree(pos) + local path + if math.random() > 0.5 then + path = minetest.get_modpath("default") .. + "/schematics/snowy_pine_tree_from_sapling.mts" + else + path = minetest.get_modpath("default") .. + "/schematics/snowy_small_pine_tree_from_sapling.mts" + end + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "random", nil, false) +end + + +-- New acacia tree + +function default.grow_new_acacia_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/acacia_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 4, y = pos.y - 1, z = pos.z - 4}, + path, "random", nil, false) +end + + +-- New aspen tree + +function default.grow_new_aspen_tree(pos) + local path = minetest.get_modpath("default") .. + "/schematics/aspen_tree_from_sapling.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "0", nil, false) +end + + +-- Bushes do not need 'from sapling' schematic variants because +-- only the stem node is force-placed in the schematic. + +-- Bush + +function default.grow_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + path, "0", nil, false) +end + +-- Blueberry bush + +function default.grow_blueberry_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/blueberry_bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y, z = pos.z - 1}, + path, "0", nil, false) +end + + +-- Acacia bush + +function default.grow_acacia_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/acacia_bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + path, "0", nil, false) +end + + +-- Pine bush + +function default.grow_pine_bush(pos) + local path = minetest.get_modpath("default") .. + "/schematics/pine_bush.mts" + minetest.place_schematic({x = pos.x - 1, y = pos.y - 1, z = pos.z - 1}, + path, "0", nil, false) +end + + +-- Large cactus + +function default.grow_large_cactus(pos) + local path = minetest.get_modpath("default") .. + "/schematics/large_cactus.mts" + minetest.place_schematic({x = pos.x - 2, y = pos.y - 1, z = pos.z - 2}, + path, "random", nil, false) +end + + +-- +-- Sapling 'on place' function to check protection of node and resulting tree volume +-- + +function default.sapling_on_place(itemstack, placer, pointed_thing, + sapling_name, minp_relative, maxp_relative, interval) + -- Position of sapling + local pos = pointed_thing.under + local node = minetest.get_node_or_nil(pos) + local pdef = node and minetest.registered_nodes[node.name] + + if pdef and pdef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return pdef.on_rightclick(pos, node, placer, itemstack, pointed_thing) + end + + if not pdef or not pdef.buildable_to then + pos = pointed_thing.above + node = minetest.get_node_or_nil(pos) + pdef = node and minetest.registered_nodes[node.name] + if not pdef or not pdef.buildable_to then + return itemstack + end + end + + local player_name = placer and placer:get_player_name() or "" + -- Check sapling position for protection + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return itemstack + end + -- Check tree volume for protection + if minetest.is_area_protected( + vector.add(pos, minp_relative), + vector.add(pos, maxp_relative), + player_name, + interval) then + minetest.record_protection_violation(pos, player_name) + -- Print extra information to explain +-- minetest.chat_send_player(player_name, +-- itemstack:get_definition().description .. " will intersect protection " .. +-- "on growth") + minetest.chat_send_player(player_name, + S("@1 will intersect protection on growth.", + itemstack:get_definition().description)) + return itemstack + end + + minetest.log("action", player_name .. " places node " + .. sapling_name .. " at " .. minetest.pos_to_string(pos)) + + local take_item = not minetest.is_creative_enabled(player_name) + local newnode = {name = sapling_name} + local ndef = minetest.registered_nodes[sapling_name] + minetest.set_node(pos, newnode) + + -- Run callback + if ndef and ndef.after_place_node then + -- Deepcopy place_to and pointed_thing because callback can modify it + if ndef.after_place_node(table.copy(pos), placer, + itemstack, table.copy(pointed_thing)) then + take_item = false + end + end + + -- Run script hook + for _, callback in ipairs(minetest.registered_on_placenodes) do + -- Deepcopy pos, node and pointed_thing because callback can modify them + if callback(table.copy(pos), table.copy(newnode), + placer, table.copy(node or {}), + itemstack, table.copy(pointed_thing)) then + take_item = false + end + end + + if take_item then + itemstack:take_item() + end + + return itemstack +end diff --git a/mods/minetest_game/doors/README.txt b/mods/minetest_game/doors/README.txt new file mode 100644 index 0000000..f9caaff --- /dev/null +++ b/mods/minetest_game/doors/README.txt @@ -0,0 +1,87 @@ +Minetest Game mod: doors +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) + +Modified by BlockMen (MIT): Added sounds, glass doors (glass, obsidian glass) and trapdoor. + +Modified by sofar (sofar@foo-projects.org) (MIT): +Added Steel trapdoor. +Re-implemented most of the door algorithms, added meshes, UV wrapped texture. +Added doors API to facilitate coding mods accessing and operating doors. +Added Fence Gate model, code, and sounds. + +Various Minetest developers and contributors (MIT) + + +Authors of media (textures) +--------------------------- +Following textures created by Fernando Zapata (CC BY-SA 3.0): + door_wood.png + door_wood_a.png + door_wood_a_r.png + door_wood_b.png + door_wood_b_r.png + +Following textures created by BlockMen (CC BY-SA 3.0): + door_trapdoor.png + door_obsidian_glass_side.png + +Following textures created by celeron55 (CC BY-SA 3.0): + door_glass_a.png + door_glass_b.png + +Following textures created by PenguinDad (CC BY-SA 4.0): + door_glass.png + door_obsidian_glass.png + +Following textures created by sofar (CC-BY-SA-3.0): + doors_trapdoor_steel.png + +Following textures created by paramat (CC-BY-SA-3.0): + door_trapdoor_side.png + doors_trapdoor_steel_side.png + +Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen (CC BY-SA 3.0): + door_obsidian_glass.png + +Glass door textures by Krock and paramat based on textures by VanessaE (CC BY-SA 3.0): + doors_door_glass.png + doors_item_glass.png + +All other textures (created by PilzAdam) (CC BY-SA 3.0): + +Door textures were converted to the new texture map by sofar, paramat and +red-001, under the same license as the originals. + + +Authors of media (models) +------------------------- +Door 3d models by sofar (CC-BY-SA-3.0) + - door_a.obj + - door_b.obj +Fence gate models by sofar (CC-BY-SA-3.0) + - fencegate_open.obj + - fencegate_closed.obj + + +Authors of media (sounds) +------------------------- +Opening-Sound created by CGEffex (CC BY 3.0), modified by BlockMen + door_open.ogg +Closing-Sound created by bennstir (CC BY 3.0) + door_close.ogg +fencegate_open.ogg: + http://www.freesound.org/people/mhtaylor67/sounds/126041/ - (CC0 1.0) +fencegate_close.ogg: + http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - (CC-BY-3.0) + http://www.freesound.org/people/rivernile7/sounds/249573/ - (CC-BY-3.0) +Steel door sounds open & close (CC-BY-3.0) by HazMatt + - http://www.freesound.org/people/HazMattt/sounds/187283/ + doors_steel_door_open.ogg + doors_steel_door_close.ogg +doors_glass_door_open.ogg, doors_glass_door_close.ogg: + https://www.freesound.org/people/SkeetMasterFunk69/sounds/235546/ (CC0 1.0) diff --git a/mods/minetest_game/doors/init.lua b/mods/minetest_game/doors/init.lua new file mode 100644 index 0000000..455dfe7 --- /dev/null +++ b/mods/minetest_game/doors/init.lua @@ -0,0 +1,915 @@ +-- doors/init.lua + +-- our API object +doors = {} + +doors.registered_doors = {} +doors.registered_trapdoors = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("doors") + + +local function replace_old_owner_information(pos) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("doors_owner") + if owner and owner ~= "" then + meta:set_string("owner", owner) + meta:set_string("doors_owner", "") + end +end + +-- returns an object to a door object or nil +function doors.get(pos) + local node_name = minetest.get_node(pos).name + if doors.registered_doors[node_name] then + -- A normal upright door + return { + pos = pos, + open = function(self, player) + if self:state() then + return false + end + return doors.door_toggle(self.pos, nil, player) + end, + close = function(self, player) + if not self:state() then + return false + end + return doors.door_toggle(self.pos, nil, player) + end, + toggle = function(self, player) + return doors.door_toggle(self.pos, nil, player) + end, + state = function(self) + local state = minetest.get_meta(self.pos):get_int("state") + return state %2 == 1 + end + } + elseif doors.registered_trapdoors[node_name] then + -- A trapdoor + return { + pos = pos, + open = function(self, player) + if self:state() then + return false + end + return doors.trapdoor_toggle(self.pos, nil, player) + end, + close = function(self, player) + if not self:state() then + return false + end + return doors.trapdoor_toggle(self.pos, nil, player) + end, + toggle = function(self, player) + return doors.trapdoor_toggle(self.pos, nil, player) + end, + state = function(self) + return minetest.get_node(self.pos).name:sub(-5) == "_open" + end + } + else + return nil + end +end + +-- this hidden node is placed on top of the bottom, and prevents +-- nodes from being placed in the top half of the door. +minetest.register_node("doors:hidden", { + description = S("Hidden Door Segment"), + inventory_image = "doors_hidden_segment.png^default_invisible_node_overlay.png", + wield_image = "doors_hidden_segment.png^default_invisible_node_overlay.png", + drawtype = "airlike", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + -- has to be walkable for falling nodes to stop falling. + walkable = true, + pointable = false, + diggable = false, + buildable_to = false, + floodable = false, + drop = "", + groups = {not_in_creative_inventory = 1}, + on_blast = function() end, + -- 1px block inside door hinge near node top + collision_box = { + type = "fixed", + fixed = {-15/32, 13/32, -15/32, -13/32, 1/2, -13/32}, + }, +}) + +-- table used to aid door opening/closing +local transform = { + { + {v = "_a", param2 = 3}, + {v = "_a", param2 = 0}, + {v = "_a", param2 = 1}, + {v = "_a", param2 = 2}, + }, + { + {v = "_c", param2 = 1}, + {v = "_c", param2 = 2}, + {v = "_c", param2 = 3}, + {v = "_c", param2 = 0}, + }, + { + {v = "_b", param2 = 1}, + {v = "_b", param2 = 2}, + {v = "_b", param2 = 3}, + {v = "_b", param2 = 0}, + }, + { + {v = "_d", param2 = 3}, + {v = "_d", param2 = 0}, + {v = "_d", param2 = 1}, + {v = "_d", param2 = 2}, + }, +} + +function doors.door_toggle(pos, node, clicker) + local meta = minetest.get_meta(pos) + node = node or minetest.get_node(pos) + local def = minetest.registered_nodes[node.name] + local name = def.door.name + + local state = meta:get_string("state") + if state == "" then + -- fix up lvm-placed right-hinged doors, default closed + if node.name:sub(-2) == "_b" then + state = 2 + else + state = 0 + end + else + state = tonumber(state) + end + + replace_old_owner_information(pos) + + if clicker and not default.can_interact_with_node(clicker, pos) then + return false + end + + -- until Lua-5.2 we have no bitwise operators :( + if state % 2 == 1 then + state = state - 1 + else + state = state + 1 + end + + local dir = node.param2 + + -- It's possible param2 is messed up, so, validate before using + -- the input data. This indicates something may have rotated + -- the door, even though that is not supported. + if not transform[state + 1] or not transform[state + 1][dir + 1] then + return false + end + + if state % 2 == 0 then + minetest.sound_play(def.door.sounds[1], + {pos = pos, gain = def.door.gains[1], max_hear_distance = 10}, true) + else + minetest.sound_play(def.door.sounds[2], + {pos = pos, gain = def.door.gains[2], max_hear_distance = 10}, true) + end + + minetest.swap_node(pos, { + name = name .. transform[state + 1][dir+1].v, + param2 = transform[state + 1][dir+1].param2 + }) + meta:set_int("state", state) + + return true +end + + +local function on_place_node(place_to, newnode, + placer, oldnode, itemstack, pointed_thing) + -- Run script hook + for _, callback in ipairs(minetest.registered_on_placenodes) do + -- Deepcopy pos, node and pointed_thing because callback can modify them + local place_to_copy = {x = place_to.x, y = place_to.y, z = place_to.z} + local newnode_copy = + {name = newnode.name, param1 = newnode.param1, param2 = newnode.param2} + local oldnode_copy = + {name = oldnode.name, param1 = oldnode.param1, param2 = oldnode.param2} + local pointed_thing_copy = { + type = pointed_thing.type, + above = vector.new(pointed_thing.above), + under = vector.new(pointed_thing.under), + ref = pointed_thing.ref, + } + callback(place_to_copy, newnode_copy, placer, + oldnode_copy, itemstack, pointed_thing_copy) + end +end + +local function can_dig_door(pos, digger) + replace_old_owner_information(pos) + return default.can_interact_with_node(digger, pos) +end + +function doors.register(name, def) + if not name:find(":") then + name = "doors:" .. name + end + + -- replace old doors of this type automatically + minetest.register_lbm({ + name = ":doors:replace_" .. name:gsub(":", "_"), + nodenames = {name.."_b_1", name.."_b_2"}, + action = function(pos, node) + local l = tonumber(node.name:sub(-1)) + local meta = minetest.get_meta(pos) + local h = meta:get_int("right") + 1 + local p2 = node.param2 + local replace = { + {{type = "a", state = 0}, {type = "a", state = 3}}, + {{type = "b", state = 1}, {type = "b", state = 2}} + } + local new = replace[l][h] + -- retain infotext and doors_owner fields + minetest.swap_node(pos, {name = name .. "_" .. new.type, param2 = p2}) + meta:set_int("state", new.state) + -- properly place doors:hidden at the right spot + local p3 = p2 + if new.state >= 2 then + p3 = (p3 + 3) % 4 + end + if new.state % 2 == 1 then + if new.state >= 2 then + p3 = (p3 + 1) % 4 + else + p3 = (p3 + 3) % 4 + end + end + -- wipe meta on top node as it's unused + minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, + {name = "doors:hidden", param2 = p3}) + end + }) + + minetest.register_craftitem(":" .. name, { + description = def.description, + inventory_image = def.inventory_image, + groups = table.copy(def.groups), + + on_place = function(itemstack, placer, pointed_thing) + local pos + + if not pointed_thing.type == "node" then + return itemstack + end + + local node = minetest.get_node(pointed_thing.under) + local pdef = minetest.registered_nodes[node.name] + if pdef and pdef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return pdef.on_rightclick(pointed_thing.under, + node, placer, itemstack, pointed_thing) + end + + if pdef and pdef.buildable_to then + pos = pointed_thing.under + else + pos = pointed_thing.above + node = minetest.get_node(pos) + pdef = minetest.registered_nodes[node.name] + if not pdef or not pdef.buildable_to then + return itemstack + end + end + + local above = {x = pos.x, y = pos.y + 1, z = pos.z} + local top_node = minetest.get_node_or_nil(above) + local topdef = top_node and minetest.registered_nodes[top_node.name] + + if not topdef or not topdef.buildable_to then + return itemstack + end + + local pn = placer and placer:get_player_name() or "" + if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) then + return itemstack + end + + local dir = placer and minetest.dir_to_facedir(placer:get_look_dir()) or 0 + + local ref = { + {x = -1, y = 0, z = 0}, + {x = 0, y = 0, z = 1}, + {x = 1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}, + } + + local aside = { + x = pos.x + ref[dir + 1].x, + y = pos.y + ref[dir + 1].y, + z = pos.z + ref[dir + 1].z, + } + + local state = 0 + if minetest.get_item_group(minetest.get_node(aside).name, "door") == 1 then + state = state + 2 + minetest.set_node(pos, {name = name .. "_b", param2 = dir}) + minetest.set_node(above, {name = "doors:hidden", param2 = (dir + 3) % 4}) + else + minetest.set_node(pos, {name = name .. "_a", param2 = dir}) + minetest.set_node(above, {name = "doors:hidden", param2 = dir}) + end + + local meta = minetest.get_meta(pos) + meta:set_int("state", state) + + if def.protected then + meta:set_string("owner", pn) + meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) + end + + if not minetest.is_creative_enabled(pn) then + itemstack:take_item() + end + + minetest.sound_play(def.sounds.place, {pos = pos}, true) + + on_place_node(pos, minetest.get_node(pos), + placer, node, itemstack, pointed_thing) + + return itemstack + end + }) + def.inventory_image = nil + + if def.recipe then + minetest.register_craft({ + output = name, + recipe = def.recipe, + }) + end + def.recipe = nil + + if not def.sounds then + def.sounds = default.node_sound_wood_defaults() + end + + if not def.sound_open then + def.sound_open = "doors_door_open" + end + + if not def.sound_close then + def.sound_close = "doors_door_close" + end + + if not def.gain_open then + def.gain_open = 0.3 + end + + if not def.gain_close then + def.gain_close = 0.3 + end + + def.groups.not_in_creative_inventory = 1 + def.groups.door = 1 + def.drop = name + def.door = { + name = name, + sounds = {def.sound_close, def.sound_open}, + gains = {def.gain_close, def.gain_open}, + } + if not def.on_rightclick then + def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.door_toggle(pos, node, clicker) + return itemstack + end + end + def.after_dig_node = function(pos, node, meta, digger) + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z}) + end + def.on_rotate = function(pos, node, user, mode, new_param2) + return false + end + + if def.protected then + def.can_dig = can_dig_door + def.on_blast = function() end + def.on_key_use = function(pos, player) + local door = doors.get(pos) + door:toggle(player) + end + def.on_skeleton_key_use = function(pos, player, newsecret) + replace_old_owner_information(pos) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + local pname = player:get_player_name() + + -- verify placer is owner of lockable door + if owner ~= pname then + minetest.record_protection_violation(pos, pname) + minetest.chat_send_player(pname, S("You do not own this locked door.")) + return nil + end + + local secret = meta:get_string("key_lock_secret") + if secret == "" then + secret = newsecret + meta:set_string("key_lock_secret", secret) + end + + return secret, S("a locked door"), owner + end + def.node_dig_prediction = "" + else + def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + -- hidden node doesn't get blasted away. + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + return {name} + end + end + + def.on_destruct = function(pos) + minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) + end + + def.drawtype = "mesh" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.sunlight_propagates = true + def.walkable = true + def.is_ground_content = false + def.buildable_to = false + def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}} + def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}} + def.use_texture_alpha = "clip" + + def.mesh = "door_a.obj" + minetest.register_node(":" .. name .. "_a", table.copy(def)) + + def.mesh = "door_b.obj" + minetest.register_node(":" .. name .. "_b", table.copy(def)) + + def.mesh = "door_a2.obj" + minetest.register_node(":" .. name .. "_c", table.copy(def)) + + def.mesh = "door_b2.obj" + minetest.register_node(":" .. name .. "_d", table.copy(def)) + + doors.registered_doors[name .. "_a"] = true + doors.registered_doors[name .. "_b"] = true + doors.registered_doors[name .. "_c"] = true + doors.registered_doors[name .. "_d"] = true +end + +doors.register("door_wood", { + tiles = {{ name = "doors_door_wood.png", backface_culling = true }}, + description = S("Wooden Door"), + inventory_image = "doors_item_wood.png", + groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + gain_open = 0.06, + gain_close = 0.13, + recipe = { + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"}, + } +}) + +doors.register("door_steel", { + tiles = {{name = "doors_door_steel.png", backface_culling = true}}, + description = S("Steel Door"), + inventory_image = "doors_item_steel.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + gain_open = 0.2, + gain_close = 0.2, + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + } +}) + +doors.register("door_glass", { + tiles = {"doors_door_glass.png"}, + description = S("Glass Door"), + inventory_image = "doors_item_glass.png", + groups = {node = 1, cracky=3, oddly_breakable_by_hand=3}, + sounds = default.node_sound_glass_defaults(), + sound_open = "doors_glass_door_open", + sound_close = "doors_glass_door_close", + gain_open = 0.3, + gain_close = 0.25, + recipe = { + {"default:glass", "default:glass"}, + {"default:glass", "default:glass"}, + {"default:glass", "default:glass"}, + } +}) + +doors.register("door_obsidian_glass", { + tiles = {"doors_door_obsidian_glass.png"}, + description = S("Obsidian Glass Door"), + inventory_image = "doors_item_obsidian_glass.png", + groups = {node = 1, cracky=3}, + sounds = default.node_sound_glass_defaults(), + sound_open = "doors_glass_door_open", + sound_close = "doors_glass_door_close", + gain_open = 0.3, + gain_close = 0.25, + recipe = { + {"default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass"}, + }, +}) + +-- Capture mods using the old API as best as possible. +function doors.register_door(name, def) + if def.only_placer_can_open then + def.protected = true + end + def.only_placer_can_open = nil + + local i = name:find(":") + local modname = name:sub(1, i - 1) + if not def.tiles then + if def.protected then + def.tiles = {{name = "doors_door_steel.png", backface_culling = true}} + else + def.tiles = {{name = "doors_door_wood.png", backface_culling = true}} + end + minetest.log("warning", modname .. " registered door \"" .. name .. "\" " .. + "using deprecated API method \"doors.register_door()\" but " .. + "did not provide the \"tiles\" parameter. A fallback tiledef " .. + "will be used instead.") + end + + doors.register(name, def) +end + +----trapdoor---- + +function doors.trapdoor_toggle(pos, node, clicker) + node = node or minetest.get_node(pos) + + replace_old_owner_information(pos) + + if clicker and not default.can_interact_with_node(clicker, pos) then + return false + end + + local def = minetest.registered_nodes[node.name] + + if string.sub(node.name, -5) == "_open" then + minetest.sound_play(def.sound_close, + {pos = pos, gain = def.gain_close, max_hear_distance = 10}, true) + minetest.swap_node(pos, {name = string.sub(node.name, 1, + string.len(node.name) - 5), param1 = node.param1, param2 = node.param2}) + else + minetest.sound_play(def.sound_open, + {pos = pos, gain = def.gain_open, max_hear_distance = 10}, true) + minetest.swap_node(pos, {name = node.name .. "_open", + param1 = node.param1, param2 = node.param2}) + end +end + +function doors.register_trapdoor(name, def) + if not name:find(":") then + name = "doors:" .. name + end + + local name_closed = name + local name_opened = name.."_open" + + def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + doors.trapdoor_toggle(pos, node, clicker) + return itemstack + end + + -- Common trapdoor configuration + def.drawtype = "nodebox" + def.paramtype = "light" + def.paramtype2 = "facedir" + def.is_ground_content = false + def.use_texture_alpha = "clip" + + if def.protected then + def.can_dig = can_dig_door + def.after_place_node = function(pos, placer, itemstack, pointed_thing) + local pn = placer:get_player_name() + local meta = minetest.get_meta(pos) + meta:set_string("owner", pn) + meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) + + return minetest.is_creative_enabled(pn) + end + + def.on_blast = function() end + def.on_key_use = function(pos, player) + local door = doors.get(pos) + door:toggle(player) + end + def.on_skeleton_key_use = function(pos, player, newsecret) + replace_old_owner_information(pos) + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + local pname = player:get_player_name() + + -- verify placer is owner of lockable door + if owner ~= pname then + minetest.record_protection_violation(pos, pname) + minetest.chat_send_player(pname, S("You do not own this trapdoor.")) + return nil + end + + local secret = meta:get_string("key_lock_secret") + if secret == "" then + secret = newsecret + meta:set_string("key_lock_secret", secret) + end + + return secret, S("a locked trapdoor"), owner + end + def.node_dig_prediction = "" + else + def.on_blast = function(pos, intensity) + minetest.remove_node(pos) + return {name} + end + end + + if not def.sounds then + def.sounds = default.node_sound_wood_defaults() + end + + if not def.sound_open then + def.sound_open = "doors_door_open" + end + + if not def.sound_close then + def.sound_close = "doors_door_close" + end + + if not def.gain_open then + def.gain_open = 0.3 + end + + if not def.gain_close then + def.gain_close = 0.3 + end + + local def_opened = table.copy(def) + local def_closed = table.copy(def) + + def_closed.node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5} + } + def_closed.selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5} + } + def_closed.tiles = { + def.tile_front, + def.tile_front .. '^[transformFY', + def.tile_side, + def.tile_side, + def.tile_side, + def.tile_side + } + + def_opened.node_box = { + type = "fixed", + fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5} + } + def_opened.selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5} + } + def_opened.tiles = { + def.tile_side, + def.tile_side .. '^[transform2', + def.tile_side .. '^[transform3', + def.tile_side .. '^[transform1', + def.tile_front .. '^[transform46', + def.tile_front .. '^[transform6' + } + + def_opened.drop = name_closed + def_opened.groups.not_in_creative_inventory = 1 + + minetest.register_node(name_opened, def_opened) + minetest.register_node(name_closed, def_closed) + + doors.registered_trapdoors[name_opened] = true + doors.registered_trapdoors[name_closed] = true +end + +doors.register_trapdoor("doors:trapdoor", { + description = S("Wooden Trapdoor"), + inventory_image = "doors_trapdoor.png", + wield_image = "doors_trapdoor.png", + tile_front = "doors_trapdoor.png", + tile_side = "doors_trapdoor_side.png", + gain_open = 0.06, + gain_close = 0.13, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, door = 1}, +}) + +doors.register_trapdoor("doors:trapdoor_steel", { + description = S("Steel Trapdoor"), + inventory_image = "doors_trapdoor_steel.png", + wield_image = "doors_trapdoor_steel.png", + tile_front = "doors_trapdoor_steel.png", + tile_side = "doors_trapdoor_steel_side.png", + protected = true, + sounds = default.node_sound_metal_defaults(), + sound_open = "doors_steel_door_open", + sound_close = "doors_steel_door_close", + gain_open = 0.2, + gain_close = 0.2, + groups = {cracky = 1, level = 2, door = 1}, +}) + +minetest.register_craft({ + output = "doors:trapdoor 2", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "doors:trapdoor_steel", + recipe = { + {"default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot"}, + } +}) + + +----fence gate---- +local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0 + +function doors.register_fencegate(name, def) + local fence = { + description = def.description, + drawtype = "mesh", + tiles = {}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + is_ground_content = false, + drop = name .. "_closed", + connect_sides = {"left", "right"}, + groups = def.groups, + sounds = def.sounds, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local node_def = minetest.registered_nodes[node.name] + minetest.swap_node(pos, {name = node_def.gate, param2 = node.param2}) + minetest.sound_play(node_def.sound, {pos = pos, gain = 0.15, + max_hear_distance = 8}, true) + return itemstack + end, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4} + }, + } + + + if type(def.texture) == "string" then + fence.tiles[1] = {name = def.texture, backface_culling = true} + elseif def.texture.backface_culling == nil then + fence.tiles[1] = table.copy(def.texture) + fence.tiles[1].backface_culling = true + else + fence.tiles[1] = def.texture + end + + if not fence.sounds then + fence.sounds = default.node_sound_wood_defaults() + end + + fence.groups.fence = 1 + + local fence_closed = table.copy(fence) + fence_closed.mesh = "doors_fencegate_closed.obj" + fence_closed.gate = name .. "_open" + fence_closed.sound = "doors_fencegate_open" + fence_closed.collision_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8} + } + + local fence_open = table.copy(fence) + fence_open.mesh = "doors_fencegate_open.obj" + fence_open.gate = name .. "_closed" + fence_open.sound = "doors_fencegate_close" + fence_open.groups.not_in_creative_inventory = 1 + fence_open.collision_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/8, -3/8, 1/2 + fence_collision_extra, 1/8}, + {-1/2, -3/8, -1/2, -3/8, 3/8, 0 }} + } + + minetest.register_node(":" .. name .. "_closed", fence_closed) + minetest.register_node(":" .. name .. "_open", fence_open) + + minetest.register_craft({ + output = name .. "_closed", + recipe = { + {"group:stick", def.material, "group:stick"}, + {"group:stick", def.material, "group:stick"} + } + }) +end + +doors.register_fencegate("doors:gate_wood", { + description = S("Apple Wood Fence Gate"), + texture = "default_wood.png", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register_fencegate("doors:gate_acacia_wood", { + description = S("Acacia Wood Fence Gate"), + texture = "default_acacia_wood.png", + material = "default:acacia_wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register_fencegate("doors:gate_junglewood", { + description = S("Jungle Wood Fence Gate"), + texture = "default_junglewood.png", + material = "default:junglewood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +doors.register_fencegate("doors:gate_pine_wood", { + description = S("Pine Wood Fence Gate"), + texture = "default_pine_wood.png", + material = "default:pine_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} +}) + +doors.register_fencegate("doors:gate_aspen_wood", { + description = S("Aspen Wood Fence Gate"), + texture = "default_aspen_wood.png", + material = "default:aspen_wood", + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3} +}) + + +----fuels---- + +minetest.register_craft({ + type = "fuel", + recipe = "doors:trapdoor", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:door_wood", + burntime = 14, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_wood_closed", + burntime = 7, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_acacia_wood_closed", + burntime = 8, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_junglewood_closed", + burntime = 9, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_pine_wood_closed", + burntime = 6, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "doors:gate_aspen_wood_closed", + burntime = 5, +}) diff --git a/mods/minetest_game/doors/license.txt b/mods/minetest_game/doors/license.txt new file mode 100644 index 0000000..8ce73c4 --- /dev/null +++ b/mods/minetest_game/doors/license.txt @@ -0,0 +1,164 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 sofar (sofar@foo-projects.org) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2011-2016 Fernando Zapata +Copyright (C) 2014-2016 celeron55 +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 sofar +Copyright (C) 2016 red-001 +Copyright (C) 2016 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +Copyright (C) 2014-2016 PenguinDad + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/4.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2014 CGEffex +Copyright (C) 2014 bennstir +Copyright (C) 2016 BarkersPinhead +Copyright (C) 2016 rivernile7 +Copyright (C) 2016 HazMatt + +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. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +mhtaylor67 +SkeetMasterFunk69 + +No Copyright + +The person who associated a work with this deed has dedicated the work to the public +domain by waiving all of his or her rights to the work worldwide under copyright law, +including all related and neighboring rights, to the extent allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial purposes, all +without asking permission. See Other Information below. + +Other Information + +In no way are the patent or trademark rights of any person affected by CC0, nor are the +rights that other persons may have in the work or in how the work is used, such as +publicity or privacy rights. +Unless expressly stated otherwise, the person who associated a work with this deed makes +no warranties about the work, and disclaims liability for all uses of the work, to the +fullest extent permitted by applicable law. +When using or citing the work, you should not imply endorsement by the author or the +affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mods/minetest_game/doors/locale/doors.de.tr b/mods/minetest_game/doors/locale/doors.de.tr new file mode 100644 index 0000000..79707ce --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.de.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Verborgenes Türsegment +Owned by @1=Eigentum von @1 +You do not own this locked door.=Diese abgeschlossene Tür gehört Ihnen nicht. +a locked door=eine abgeschlossene Tür +Wooden Door=Holztür +Steel Door=Stahltür +Glass Door=Glastür +Obsidian Glass Door=Obsidianglastür +You do not own this trapdoor.=Diese Falltür gehört Ihnen nicht. +a locked trapdoor=eine abgeschlossene Falltür +Wooden Trapdoor=Holzfalltür +Steel Trapdoor=Stahlfalltür +Apple Wood Fence Gate=Apfelholzzauntor +Acacia Wood Fence Gate=Akazienholzzauntor +Jungle Wood Fence Gate=Dschungelholzzauntor +Pine Wood Fence Gate=Kiefernholzzauntor +Aspen Wood Fence Gate=Espenholzzauntor diff --git a/mods/minetest_game/doors/locale/doors.eo.tr b/mods/minetest_game/doors/locale/doors.eo.tr new file mode 100644 index 0000000..b566732 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.eo.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Kaŝita Porda Segmento +Owned by @1=Estas de @1 +You do not own this locked door.=Vi ne posedas ĉi tiu ŝlosita pordo. +a locked door=ŝlosita pordo +Wooden Door=Ligna Pordo +Steel Door=Ŝtala Pordo +Glass Door=Vitra Pordo +Obsidian Glass Door=Obsidiana Vitra Pordo +You do not own this trapdoor.=Vi ne posedas ĉi tiu plankpordo. +a locked trapdoor=ŝlosita plankpordo +Wooden Trapdoor=Ligna Plankpordo +Steel Trapdoor=Ŝtala Plankpordo +Apple Wood Fence Gate=Poma Ligna Barila Pordo +Acacia Wood Fence Gate=Akacia Ligna Barila Pordo +Jungle Wood Fence Gate=Ĝangala Ligna Barila Pordo +Pine Wood Fence Gate=Pina Ligna Barila Pordo +Aspen Wood Fence Gate=Tremola Ligna Barila Pordo diff --git a/mods/minetest_game/doors/locale/doors.es.tr b/mods/minetest_game/doors/locale/doors.es.tr new file mode 100644 index 0000000..677f2df --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.es.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segmento de puerta oculta +Owned by @1=Propiedad de @1 +You do not own this locked door.=Esta puerta cerrada no te pertenece. +a locked door=una puerta cerrada +Wooden Door=Puerta de madera +Steel Door=Puerta de acero +Glass Door=Puerta de vidrio +Obsidian Glass Door=Puerta de vidrio de obsidiana +You do not own this trapdoor.=Esta trampilla no te pertenece. +a locked trapdoor=una trampilla cerrada +Wooden Trapdoor=Trampilla de madera +Steel Trapdoor=Trampilla de acero +Apple Wood Fence Gate=Puerta de cerca de manzano +Acacia Wood Fence Gate=Puerta de cerca de acacia +Jungle Wood Fence Gate=Puerta de cerca de madera tropical +Pine Wood Fence Gate=Puerta de cerca de pino +Aspen Wood Fence Gate=Puerta de cerca de álamo diff --git a/mods/minetest_game/doors/locale/doors.fr.tr b/mods/minetest_game/doors/locale/doors.fr.tr new file mode 100644 index 0000000..930f75c --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.fr.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segment de porte cachée +Owned by @1=Possédée par @1 +You do not own this locked door.=Cette porte vérouillée ne vous appartient pas. +a locked door=une porte verouillée +Wooden Door=Porte en bois +Steel Door=Porte en acier +Glass Door=Porte en verre +Obsidian Glass Door=Porte en verre d'obsidienne +You do not own this trapdoor.=Vous ne possédez pas cette trappe. +a locked trapdoor=une trappe verouillée +Wooden Trapdoor=Trappe en bois +Steel Trapdoor=Trappe en acier +Apple Wood Fence Gate=Porte de clôture en bois de pommier +Acacia Wood Fence Gate=Porte de clôture en bois d'acacia +Jungle Wood Fence Gate=Porte de clôture en bois de la jungle +Pine Wood Fence Gate=Porte de clôture en bois de pin +Aspen Wood Fence Gate=Porte de clôture en bois de tremble diff --git a/mods/minetest_game/doors/locale/doors.id.tr b/mods/minetest_game/doors/locale/doors.id.tr new file mode 100644 index 0000000..3b74904 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.id.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Bagian Pintu Tersembunyi +Owned by @1=Milik @1 +You do not own this locked door.=Anda bukan pemilik pintu terkunci ini. +a locked door=pintu terkunci +Wooden Door=Pintu Kayu +Steel Door=Pintu Baja +Glass Door=Pintu Kaca +Obsidian Glass Door=Pintu Kaca Obsidian +You do not own this trapdoor.=Anda bukan pemilik pintu kolong ini. +a locked trapdoor=pintu kolong terkunci +Wooden Trapdoor=Pintu Kolong Kayu +Steel Trapdoor=Pintu Kolong Baja +Apple Wood Fence Gate=Gerbang Kayu Pohon Apel +Acacia Wood Fence Gate=Gerbang Kayu Akasia +Jungle Wood Fence Gate=Gerbang Kayu Pohon Rimba +Pine Wood Fence Gate=Gerbang Kayu Pinus +Aspen Wood Fence Gate=Gerbang Kayu Aspen diff --git a/mods/minetest_game/doors/locale/doors.it.tr b/mods/minetest_game/doors/locale/doors.it.tr new file mode 100644 index 0000000..ccd00d3 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.it.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segmento di porta nascosto +Owned by @1=Di proprietà di @1 +You do not own this locked door.=Non sei il proprietario di questa porta chiusa a chiave. +a locked door=una porta chiusa a chiave +Wooden Door=Porta di legno +Steel Door=Porta d'acciaio +Glass Door=Porta di vetro +Obsidian Glass Door=Porta di vetro d'ossidiana +You do not own this trapdoor.=Non sei il proprietario di questa botola. +a locked trapdoor=una botola chiusa a chiave +Wooden Trapdoor=Botola di legno +Steel Trapdoor=Botola d'acciaio +Apple Wood Fence Gate=Cancello della recinzione di legno di melo +Acacia Wood Fence Gate=Cancello della recinzione di legno d'acacia +Jungle Wood Fence Gate=Cancello della recinzione di legno della giungla +Pine Wood Fence Gate=Cancello della recinzione di legno di pino +Aspen Wood Fence Gate=Cancello della recinzione di legno di pioppo diff --git a/mods/minetest_game/doors/locale/doors.jbo.tr b/mods/minetest_game/doors/locale/doors.jbo.tr new file mode 100644 index 0000000..48daa0a --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.jbo.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=lo se mipri pagbu be lo vrogai +Owned by @1=.i ti ponse zoi zo'i.@1.zo'i +You do not own this locked door.=.i do na ponse lo ti selstela vrogai +a locked door=lo selstela vrogai +Wooden Door=lo mudri vrogai +Steel Door=lo gasta vrogai +Glass Door=lo blaci vrogai +Obsidian Glass Door=lo je'erma'ablaci blaci vrogai +You do not own this trapdoor.=.i do na ponse lo ti selstela lolvrogai +a locked trapdoor=lo selstela lolvrogai +Wooden Trapdoor=lo mudri lolvrogai +Steel Trapdoor=lo gasta lolvrogai +Apple Wood Fence Gate=lo plise mudri garbimvrogai +Acacia Wood Fence Gate=lo atkaci,ia mudri garbimvrogai +Jungle Wood Fence Gate=lo glatimdemricfoi mudri garbimvrogai +Pine Wood Fence Gate=lo ckunu mudri garbimvrogai +Aspen Wood Fence Gate=lo mudrpopulu garbimvrogai diff --git a/mods/minetest_game/doors/locale/doors.ms.tr b/mods/minetest_game/doors/locale/doors.ms.tr new file mode 100644 index 0000000..93d6df2 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.ms.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segmen Pintu Tersembunyi +Owned by @1=Milik @1 +You do not own this locked door.=Anda bukan pemilik pintu berkunci ini. +a locked door=pintu berkunci +Wooden Door=Pintu Kayu +Steel Door=Pintu Keluli +Glass Door=Pintu Kaca +Obsidian Glass Door=Pintu Kaca Obsidia +You do not own this trapdoor.=Anda bukan pemilik pintu kolong ini. +a locked trapdoor=pintu kolong berkunci +Wooden Trapdoor=Pintu Kolong Kayu +Steel Trapdoor=Pintu Kolong Keluli +Apple Wood Fence Gate=Pintu Pagar Kayu Epal +Acacia Wood Fence Gate=Pintu Pagar Kayu Akasia +Jungle Wood Fence Gate=Pintu Pagar Kayu Hutan +Pine Wood Fence Gate=Pintu Pagar Kayu Pain +Aspen Wood Fence Gate=Pintu Pagar Kayu Aspen diff --git a/mods/minetest_game/doors/locale/doors.pt_BR.tr b/mods/minetest_game/doors/locale/doors.pt_BR.tr new file mode 100644 index 0000000..8232442 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.pt_BR.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Segmento de Porta Oculto +Owned by @1=Propriedade de @1 +You do not own this locked door.=Você não é dono desta porta trancada. +a locked door=uma porta trancada +Wooden Door=Porta de Madeira +Steel Door=Porta de Aço +Glass Door=Porta de Vidro +Obsidian Glass Door=Porta de Vidro de Obsidiana +You do not own this trapdoor.=Você não é dono deste alçapão. +a locked trapdoor=um alçapão trancado +Wooden Trapdoor=Alçapão de Madeira +Steel Trapdoor=Alçapão de Aço +Apple Wood Fence Gate=Portão de Cerca de Macieira +Acacia Wood Fence Gate=Portão de Cerca de Acácia +Jungle Wood Fence Gate=Portão de Cerca de Madeira da Selva +Pine Wood Fence Gate=Portão de Cerca de Pinheiro +Aspen Wood Fence Gate=Portão de Cerca de Álamo diff --git a/mods/minetest_game/doors/locale/doors.ru.tr b/mods/minetest_game/doors/locale/doors.ru.tr new file mode 100644 index 0000000..dc5c3c0 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.ru.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Спрятанная Часть Двери +Owned by @1=Владелец: @1 +You do not own this locked door.=Вы не владелец этой заблокированной двери. +a locked door=заблокированная дверь +Wooden Door=Деревянная Дверь +Steel Door=Стальная Дверь +Glass Door=Стеклянная Дверь +Obsidian Glass Door=Дверь Из Обсидианового Стекла +You do not own this trapdoor.=Вы не владелец этого люка. +a locked trapdoor=заблокированный люк +Wooden Trapdoor=Деревянный Люк +Steel Trapdoor=Стальной Люк +Apple Wood Fence Gate=Яблоневая Деревянная Калитка +Acacia Wood Fence Gate=Деревянная Калитка Из Акации +Jungle Wood Fence Gate=Деревянная Калитка Из Тропического Дерева +Pine Wood Fence Gate=Сосновая Деревянная Калитка +Aspen Wood Fence Gate=Осиновая Деревянная Калитка diff --git a/mods/minetest_game/doors/locale/doors.se.tr b/mods/minetest_game/doors/locale/doors.se.tr new file mode 100644 index 0000000..1f856ef --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.se.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Dold dörrsegment +Owned by @1=Ägd av @1 +You do not own this locked door.=Du äger inte denna låsta dörr. +a locked door=en låst dörr +Wooden Door=Trä Dörr +Steel Door=Stål Dörr +Glass Door=Glas Dörr +Obsidian Glass Door=Obsidian Glas Dörr +You do not own this trapdoor.=Du äger inte denna fallucka +a locked trapdoor=en låst fallucka +Wooden Trapdoor=Trä Fallucka +Steel Trapdoor=Stål Fallucka +Apple Wood Fence Gate=Äpple Trä Fallucka +Acacia Wood Fence Gate=Akacia Trä Fallucka +Jungle Wood Fence Gate=Djungel Trä Fallucka +Pine Wood Fence Gate=Tall Trä Fallucka +Aspen Wood Fence Gate=Asp Trä Fallucka diff --git a/mods/minetest_game/doors/locale/doors.sk.tr b/mods/minetest_game/doors/locale/doors.sk.tr new file mode 100644 index 0000000..e6943ac --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.sk.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=Skrytá časť dverí +Owned by @1=Vlastník - @1 +You do not own this locked door.=Nevlastníš tieto uzamknuté dvere. +a locked door=uzamknuté dvere +Wooden Door=Drevené dvere +Steel Door=Oceľové dvere +Glass Door=Sklenené dvere +Obsidian Glass Door=Obsidiánové sklenené dvere +You do not own this trapdoor.=Nevlastníš tieto padacie dvere. +a locked trapdoor=uzamknuté padacie dvere +Wooden Trapdoor=Drevené padacie dvere +Steel Trapdoor=Oceľové padacie dvere +Apple Wood Fence Gate=Drevený plot z jablone +Acacia Wood Fence Gate=Drevený plot z akácie +Jungle Wood Fence Gate=Drevený plot z džungľového dreva +Pine Wood Fence Gate=Drevený plot z borovice +Aspen Wood Fence Gate=Drevený plot z osiky diff --git a/mods/minetest_game/doors/locale/doors.zh_CN.tr b/mods/minetest_game/doors/locale/doors.zh_CN.tr new file mode 100644 index 0000000..50f38c0 --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.zh_CN.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=隐藏门段 +Owned by @1=由@1拥有 +You do not own this locked door.=这个门不属于你所有。 +a locked door=一扇已上锁的门 +Wooden Door=木门 +Steel Door=铁门 +Glass Door=玻璃门 +Obsidian Glass Door=黑曜石玻璃门 +You do not own this trapdoor.=这个活板门不属于你所有。 +a locked trapdoor=一扇已上锁的活板门 +Wooden Trapdoor=木活板门 +Steel Trapdoor=铁活板门 +Apple Wood Fence Gate=苹果木栅栏门 +Acacia Wood Fence Gate=相思木栅栏门 +Jungle Wood Fence Gate=丛林木栅栏门 +Pine Wood Fence Gate=松木栅栏门 +Aspen Wood Fence Gate=白杨木栅栏门 diff --git a/mods/minetest_game/doors/locale/doors.zh_TW.tr b/mods/minetest_game/doors/locale/doors.zh_TW.tr new file mode 100644 index 0000000..81e06fc --- /dev/null +++ b/mods/minetest_game/doors/locale/doors.zh_TW.tr @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment=隱藏門段 +Owned by @1=由@1擁有 +You do not own this locked door.=這個門不屬於你所有。 +a locked door=一扇已上鎖的門 +Wooden Door=木門 +Steel Door=鐵門 +Glass Door=玻璃門 +Obsidian Glass Door=黑曜石玻璃門 +You do not own this trapdoor.=這個活板門不屬於你所有。 +a locked trapdoor=一扇已上鎖的活板門 +Wooden Trapdoor=木活板門 +Steel Trapdoor=鐵活板門 +Apple Wood Fence Gate=蘋果木柵欄門 +Acacia Wood Fence Gate=相思木柵欄門 +Jungle Wood Fence Gate=叢林木柵欄門 +Pine Wood Fence Gate=松木柵欄門 +Aspen Wood Fence Gate=白楊木柵欄門 diff --git a/mods/minetest_game/doors/locale/template.txt b/mods/minetest_game/doors/locale/template.txt new file mode 100644 index 0000000..8b5c349 --- /dev/null +++ b/mods/minetest_game/doors/locale/template.txt @@ -0,0 +1,18 @@ +# textdomain: doors +Hidden Door Segment= +Owned by @1= +You do not own this locked door.= +a locked door= +Wooden Door= +Steel Door= +Glass Door= +Obsidian Glass Door= +You do not own this trapdoor.= +a locked trapdoor= +Wooden Trapdoor= +Steel Trapdoor= +Apple Wood Fence Gate= +Acacia Wood Fence Gate= +Jungle Wood Fence Gate= +Pine Wood Fence Gate= +Aspen Wood Fence Gate= diff --git a/mods/minetest_game/doors/mod.conf b/mods/minetest_game/doors/mod.conf new file mode 100644 index 0000000..de053c2 --- /dev/null +++ b/mods/minetest_game/doors/mod.conf @@ -0,0 +1,4 @@ +name = doors +description = Minetest Game mod: doors +depends = default +optional_depends = screwdriver diff --git a/mods/minetest_game/doors/sounds/doors_door_close.ogg b/mods/minetest_game/doors/sounds/doors_door_close.ogg new file mode 100644 index 0000000..fede4af Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_door_close.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_door_open.ogg b/mods/minetest_game/doors/sounds/doors_door_open.ogg new file mode 100644 index 0000000..9a4c4f1 Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_door_open.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_fencegate_close.ogg b/mods/minetest_game/doors/sounds/doors_fencegate_close.ogg new file mode 100644 index 0000000..d42590f Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_fencegate_close.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_fencegate_open.ogg b/mods/minetest_game/doors/sounds/doors_fencegate_open.ogg new file mode 100644 index 0000000..f6dfd1d Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_fencegate_open.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_glass_door_close.ogg b/mods/minetest_game/doors/sounds/doors_glass_door_close.ogg new file mode 100644 index 0000000..b3c1355 Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_glass_door_close.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_glass_door_open.ogg b/mods/minetest_game/doors/sounds/doors_glass_door_open.ogg new file mode 100644 index 0000000..66e6812 Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_glass_door_open.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_steel_door_close.ogg b/mods/minetest_game/doors/sounds/doors_steel_door_close.ogg new file mode 100644 index 0000000..aea7be6 Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_steel_door_close.ogg differ diff --git a/mods/minetest_game/doors/sounds/doors_steel_door_open.ogg b/mods/minetest_game/doors/sounds/doors_steel_door_open.ogg new file mode 100644 index 0000000..de87477 Binary files /dev/null and b/mods/minetest_game/doors/sounds/doors_steel_door_open.ogg differ diff --git a/mods/minetest_game/doors/textures/doors_door_glass.png b/mods/minetest_game/doors/textures/doors_door_glass.png new file mode 100755 index 0000000..7daaa57 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_door_glass.png differ diff --git a/mods/minetest_game/doors/textures/doors_door_obsidian_glass.png b/mods/minetest_game/doors/textures/doors_door_obsidian_glass.png new file mode 100755 index 0000000..f6cd306 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_door_obsidian_glass.png differ diff --git a/mods/minetest_game/doors/textures/doors_door_steel.png b/mods/minetest_game/doors/textures/doors_door_steel.png new file mode 100755 index 0000000..ed4f57b Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_door_steel.png differ diff --git a/mods/minetest_game/doors/textures/doors_door_wood.png b/mods/minetest_game/doors/textures/doors_door_wood.png new file mode 100755 index 0000000..bae9f5d Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_door_wood.png differ diff --git a/mods/minetest_game/doors/textures/doors_hidden_segment.png b/mods/minetest_game/doors/textures/doors_hidden_segment.png new file mode 100644 index 0000000..b3b6f34 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_hidden_segment.png differ diff --git a/mods/minetest_game/doors/textures/doors_item_glass.png b/mods/minetest_game/doors/textures/doors_item_glass.png new file mode 100755 index 0000000..45fcbbf Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_item_glass.png differ diff --git a/mods/minetest_game/doors/textures/doors_item_obsidian_glass.png b/mods/minetest_game/doors/textures/doors_item_obsidian_glass.png new file mode 100755 index 0000000..d0460bc Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_item_obsidian_glass.png differ diff --git a/mods/minetest_game/doors/textures/doors_item_steel.png b/mods/minetest_game/doors/textures/doors_item_steel.png new file mode 100755 index 0000000..6471372 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_item_steel.png differ diff --git a/mods/minetest_game/doors/textures/doors_item_wood.png b/mods/minetest_game/doors/textures/doors_item_wood.png new file mode 100755 index 0000000..fa15033 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_item_wood.png differ diff --git a/mods/minetest_game/doors/textures/doors_trapdoor.png b/mods/minetest_game/doors/textures/doors_trapdoor.png new file mode 100755 index 0000000..bcc0a46 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_trapdoor.png differ diff --git a/mods/minetest_game/doors/textures/doors_trapdoor_side.png b/mods/minetest_game/doors/textures/doors_trapdoor_side.png new file mode 100755 index 0000000..bcc0a46 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_trapdoor_side.png differ diff --git a/mods/minetest_game/doors/textures/doors_trapdoor_steel.png b/mods/minetest_game/doors/textures/doors_trapdoor_steel.png new file mode 100755 index 0000000..bf3d16f Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_trapdoor_steel.png differ diff --git a/mods/minetest_game/doors/textures/doors_trapdoor_steel_side.png b/mods/minetest_game/doors/textures/doors_trapdoor_steel_side.png new file mode 100755 index 0000000..cc806e1 Binary files /dev/null and b/mods/minetest_game/doors/textures/doors_trapdoor_steel_side.png differ diff --git a/mods/minetest_game/dungeon_loot/README.txt b/mods/minetest_game/dungeon_loot/README.txt new file mode 100644 index 0000000..c500d25 --- /dev/null +++ b/mods/minetest_game/dungeon_loot/README.txt @@ -0,0 +1,11 @@ +Minetest Game mod: dungeon_loot +=============================== +Adds randomly generated chests with some "loot" to generated dungeons, +an API to register additional loot is provided. +Only works if dungeons are actually enabled in mapgen flags. + +License information can be found in license.txt + +Authors of source code +---------------------- +Originally by sfan5 (MIT) diff --git a/mods/minetest_game/dungeon_loot/init.lua b/mods/minetest_game/dungeon_loot/init.lua new file mode 100644 index 0000000..9d8ac52 --- /dev/null +++ b/mods/minetest_game/dungeon_loot/init.lua @@ -0,0 +1,8 @@ +dungeon_loot = {} + +dungeon_loot.CHESTS_MIN = 0 -- not necessarily in a single dungeon +dungeon_loot.CHESTS_MAX = 2 +dungeon_loot.STACKS_PER_CHEST_MAX = 8 + +dofile(minetest.get_modpath("dungeon_loot") .. "/loot.lua") +dofile(minetest.get_modpath("dungeon_loot") .. "/mapgen.lua") diff --git a/mods/minetest_game/dungeon_loot/license.txt b/mods/minetest_game/dungeon_loot/license.txt new file mode 100644 index 0000000..0af30a0 --- /dev/null +++ b/mods/minetest_game/dungeon_loot/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017 sfan5 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/minetest_game/dungeon_loot/loot.lua b/mods/minetest_game/dungeon_loot/loot.lua new file mode 100644 index 0000000..a5a4097 --- /dev/null +++ b/mods/minetest_game/dungeon_loot/loot.lua @@ -0,0 +1,60 @@ +-- Loot from the `default` mod is registered here, +-- with the rest being registered in the respective mods + +dungeon_loot.registered_loot = { + -- various items + {name = "default:stick", chance = 0.6, count = {3, 6}}, + {name = "default:flint", chance = 0.4, count = {1, 3}}, + + -- farming / consumable + {name = "default:apple", chance = 0.4, count = {1, 4}}, + {name = "default:cactus", chance = 0.4, count = {1, 4}, + types = {"sandstone", "desert"}}, + + -- minerals + {name = "default:coal_lump", chance = 0.9, count = {1, 12}}, + {name = "default:gold_ingot", chance = 0.5}, + {name = "default:steel_ingot", chance = 0.4, count = {1, 6}}, + {name = "default:mese_crystal", chance = 0.1, count = {2, 3}}, + + -- tools + {name = "default:sword_wood", chance = 0.6}, + {name = "default:pick_stone", chance = 0.3}, + {name = "default:axe_diamond", chance = 0.05}, + + -- natural materials + {name = "default:sand", chance = 0.8, count = {4, 32}, y = {-64, 32768}, + types = {"normal"}}, + {name = "default:desert_sand", chance = 0.8, count = {4, 32}, y = {-64, 32768}, + types = {"sandstone"}}, + {name = "default:desert_cobble", chance = 0.8, count = {4, 32}, + types = {"desert"}}, + {name = "default:snow", chance = 0.8, count = {8, 64}, y = {-64, 32768}, + types = {"ice"}}, + {name = "default:dirt", chance = 0.6, count = {2, 16}, y = {-64, 32768}, + types = {"normal", "sandstone", "desert"}}, + {name = "default:obsidian", chance = 0.25, count = {1, 3}, y = {-32768, -512}}, + {name = "default:mese", chance = 0.15, y = {-32768, -512}}, +} + +function dungeon_loot.register(t) + if t.name ~= nil then + t = {t} -- single entry + end + for _, loot in ipairs(t) do + table.insert(dungeon_loot.registered_loot, loot) + end +end + +function dungeon_loot._internal_get_loot(pos_y, dungeontype) + -- filter by y pos and type + local ret = {} + for _, l in ipairs(dungeon_loot.registered_loot) do + if l.y == nil or (pos_y >= l.y[1] and pos_y <= l.y[2]) then + if l.types == nil or table.indexof(l.types, dungeontype) ~= -1 then + table.insert(ret, l) + end + end + end + return ret +end diff --git a/mods/minetest_game/dungeon_loot/mapgen.lua b/mods/minetest_game/dungeon_loot/mapgen.lua new file mode 100644 index 0000000..b2c80fa --- /dev/null +++ b/mods/minetest_game/dungeon_loot/mapgen.lua @@ -0,0 +1,171 @@ +minetest.set_gen_notify({dungeon = true, temple = true}) + +local function noise3d_integer(noise, pos) + return math.abs(math.floor(noise:get_3d(pos) * 0x7fffffff)) +end + +local function random_sample(rand, list, count) + local ret = {} + for n = 1, count do + local idx = rand:next(1, #list) + table.insert(ret, list[idx]) + table.remove(list, idx) + end + return ret +end + +local function find_walls(cpos) + local is_wall = function(node) + return node.name ~= "air" and node.name ~= "ignore" + end + + local dirs = {{x=1, z=0}, {x=-1, z=0}, {x=0, z=1}, {x=0, z=-1}} + local get_node = minetest.get_node + + local ret = {} + local mindist = {x=0, z=0} + local min = function(a, b) return a ~= 0 and math.min(a, b) or b end + for _, dir in ipairs(dirs) do + for i = 1, 9 do -- 9 = max room size / 2 + local pos = vector.add(cpos, {x=dir.x*i, y=0, z=dir.z*i}) + + -- continue in that direction until we find a wall-like node + local node = get_node(pos) + if is_wall(node) then + local front_below = vector.subtract(pos, {x=dir.x, y=1, z=dir.z}) + local above = vector.add(pos, {x=0, y=1, z=0}) + + -- check that it: + --- is at least 2 nodes high (not a staircase) + --- has a floor + if is_wall(get_node(front_below)) and is_wall(get_node(above)) then + table.insert(ret, {pos = pos, facing = {x=-dir.x, y=0, z=-dir.z}}) + if dir.z == 0 then + mindist.x = min(mindist.x, i-1) + else + mindist.z = min(mindist.z, i-1) + end + end + -- abort even if it wasn't a wall cause something is in the way + break + end + end + end + + local biome = minetest.get_biome_data(cpos) + biome = biome and minetest.get_biome_name(biome.biome) or "" + local type = "normal" + if biome:find("desert") == 1 then + type = "desert" + elseif biome:find("sandstone_desert") == 1 then + type = "sandstone" + elseif biome:find("icesheet") == 1 then + type = "ice" + end + + return { + walls = ret, + size = {x=mindist.x*2, z=mindist.z*2}, + type = type, + } +end + +local function populate_chest(pos, rand, dungeontype) + --minetest.chat_send_all("chest placed at " .. minetest.pos_to_string(pos) .. " [" .. dungeontype .. "]") + --minetest.add_node(vector.add(pos, {x=0, y=1, z=0}), {name="default:torch", param2=1}) + + local item_list = dungeon_loot._internal_get_loot(pos.y, dungeontype) + -- take random (partial) sample of all possible items + local sample_n = math.min(#item_list, dungeon_loot.STACKS_PER_CHEST_MAX) + item_list = random_sample(rand, item_list, sample_n) + + -- apply chances / randomized amounts and collect resulting items + local items = {} + for _, loot in ipairs(item_list) do + if rand:next(0, 1000) / 1000 <= loot.chance then + local itemdef = minetest.registered_items[loot.name] + local amount = 1 + if loot.count ~= nil then + amount = rand:next(loot.count[1], loot.count[2]) + end + + if not itemdef then + minetest.log("warning", "Registered loot item " .. loot.name .. " does not exist") + elseif itemdef.tool_capabilities then + for n = 1, amount do + local wear = rand:next(0.20 * 65535, 0.75 * 65535) -- 20% to 75% wear + table.insert(items, ItemStack({name = loot.name, wear = wear})) + end + elseif itemdef.stack_max == 1 then + -- not stackable, add separately + for n = 1, amount do + table.insert(items, loot.name) + end + else + table.insert(items, ItemStack({name = loot.name, count = amount})) + end + end + end + + -- place items at random places in chest + local inv = minetest.get_meta(pos):get_inventory() + local listsz = inv:get_size("main") + assert(listsz >= #items) + for _, item in ipairs(items) do + local index = rand:next(1, listsz) + if inv:get_stack("main", index):is_empty() then + inv:set_stack("main", index, item) + else + inv:add_item("main", item) -- space occupied, just put it anywhere + end + end +end + + +minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = gennotify["dungeon"] or {} + for _, entry in ipairs(gennotify["temple"] or {}) do + table.insert(poslist, entry) + end + if #poslist == 0 then return end + + local noise = minetest.get_perlin(10115, 4, 0.5, 1) + local rand = PcgRandom(noise3d_integer(noise, poslist[1])) + + local candidates = {} + -- process at most 8 rooms to keep runtime of this predictable + local num_process = math.min(#poslist, 8) + for i = 1, num_process do + local room = find_walls(poslist[i]) + -- skip small rooms and everything that doesn't at least have 3 walls + if math.min(room.size.x, room.size.z) >= 4 and #room.walls >= 3 then + table.insert(candidates, room) + end + end + + local num_chests = rand:next(dungeon_loot.CHESTS_MIN, dungeon_loot.CHESTS_MAX) + num_chests = math.min(#candidates, num_chests) + local rooms = random_sample(rand, candidates, num_chests) + + for _, room in ipairs(rooms) do + -- choose place somewhere in front of any of the walls + local wall = room.walls[rand:next(1, #room.walls)] + local v, vi -- vector / axis that runs alongside the wall + if wall.facing.x ~= 0 then + v, vi = {x=0, y=0, z=1}, "z" + else + v, vi = {x=1, y=0, z=0}, "x" + end + local chestpos = vector.add(wall.pos, wall.facing) + local off = rand:next(-room.size[vi]/2 + 1, room.size[vi]/2 - 1) + chestpos = vector.add(chestpos, vector.multiply(v, off)) + + if minetest.get_node(chestpos).name == "air" then + -- make it face inwards to the room + local facedir = minetest.dir_to_facedir(vector.multiply(wall.facing, -1)) + minetest.add_node(chestpos, {name = "default:chest", param2 = facedir}) + populate_chest(chestpos, PcgRandom(noise3d_integer(noise, chestpos)), room.type) + end + end +end) diff --git a/mods/minetest_game/dungeon_loot/mod.conf b/mods/minetest_game/dungeon_loot/mod.conf new file mode 100644 index 0000000..79d8089 --- /dev/null +++ b/mods/minetest_game/dungeon_loot/mod.conf @@ -0,0 +1,3 @@ +name = dungeon_loot +description = Minetest Game mod: dungeon_loot +depends = default diff --git a/mods/minetest_game/dye/README.txt b/mods/minetest_game/dye/README.txt new file mode 100644 index 0000000..a2fbdd2 --- /dev/null +++ b/mods/minetest_game/dye/README.txt @@ -0,0 +1,13 @@ +Minetest Game mod: dye +====================== +See license.txt for license information. +See init.lua for documentation. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Perttu Ahola (celeron55) (CC BY-SA 3.0) diff --git a/mods/minetest_game/dye/init.lua b/mods/minetest_game/dye/init.lua new file mode 100644 index 0000000..f0affe8 --- /dev/null +++ b/mods/minetest_game/dye/init.lua @@ -0,0 +1,127 @@ +-- dye/init.lua + +dye = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("dye") + +-- Make dye names and descriptions available globally + +dye.dyes = { + {"white", "White"}, + {"grey", "Grey"}, + {"dark_grey", "Dark Grey"}, + {"black", "Black"}, + {"violet", "Violet"}, + {"blue", "Blue"}, + {"cyan", "Cyan"}, + {"dark_green", "Dark Green"}, + {"green", "Green"}, + {"yellow", "Yellow"}, + {"brown", "Brown"}, + {"orange", "Orange"}, + {"red", "Red"}, + {"magenta", "Magenta"}, + {"pink", "Pink"}, +} + +-- Define items + +for _, row in ipairs(dye.dyes) do + local name = row[1] + local description = row[2] + local groups = {dye = 1} + groups["color_" .. name] = 1 + + minetest.register_craftitem("dye:" .. name, { + inventory_image = "dye_" .. name .. ".png", + description = S(description .. " Dye"), + groups = groups + }) + + minetest.register_craft({ + output = "dye:" .. name .. " 4", + recipe = { + {"group:flower,color_" .. name} + }, + }) +end + +-- Manually add coal -> black dye + +minetest.register_craft({ + output = "dye:black 4", + recipe = { + {"group:coal"} + }, +}) + +-- Manually add blueberries->violet dye + +minetest.register_craft({ + output = "dye:violet 2", + recipe = { + {"default:blueberries"} + }, +}) + +-- Mix recipes + +local dye_recipes = { + -- src1, src2, dst + -- RYB mixes + {"red", "blue", "violet"}, -- "purple" + {"yellow", "red", "orange"}, + {"yellow", "blue", "green"}, + -- RYB complementary mixes + {"yellow", "violet", "dark_grey"}, + {"blue", "orange", "dark_grey"}, + -- CMY mixes - approximation + {"cyan", "yellow", "green"}, + {"cyan", "magenta", "blue"}, + {"yellow", "magenta", "red"}, + -- other mixes that result in a color we have + {"red", "green", "brown"}, + {"magenta", "blue", "violet"}, + {"green", "blue", "cyan"}, + {"pink", "violet", "magenta"}, + -- mixes with black + {"white", "black", "grey"}, + {"grey", "black", "dark_grey"}, + {"green", "black", "dark_green"}, + {"orange", "black", "brown"}, + -- mixes with white + {"white", "red", "pink"}, + {"white", "dark_grey", "grey"}, + {"white", "dark_green", "green"}, +} + +for _, mix in pairs(dye_recipes) do + minetest.register_craft({ + type = "shapeless", + output = "dye:" .. mix[3] .. " 2", + recipe = {"dye:" .. mix[1], "dye:" .. mix[2]}, + }) +end + +-- Dummy calls to S() to allow translation scripts to detect the strings. +-- To update this run: +-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Dye")) end + +--[[ +S("White Dye") +S("Grey Dye") +S("Dark Grey Dye") +S("Black Dye") +S("Violet Dye") +S("Blue Dye") +S("Cyan Dye") +S("Dark Green Dye") +S("Green Dye") +S("Yellow Dye") +S("Brown Dye") +S("Orange Dye") +S("Red Dye") +S("Magenta Dye") +S("Pink Dye") +--]] diff --git a/mods/minetest_game/dye/license.txt b/mods/minetest_game/dye/license.txt new file mode 100644 index 0000000..bf9d350 --- /dev/null +++ b/mods/minetest_game/dye/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/dye/locale/dye.de.tr b/mods/minetest_game/dye/locale/dye.de.tr new file mode 100644 index 0000000..f73fb57 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.de.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Weißer Farbstoff +Grey Dye=Grauer Farbstoff +Dark Grey Dye=Dunkelgrauer Farbstoff +Black Dye=Schwarzer Farbstoff +Violet Dye=Violetter Farbstoff +Blue Dye=Blauer Farbstoff +Cyan Dye=Türkiser Farbstoff +Dark Green Dye=Dunkelgrüner Farbstoff +Green Dye=Grüner Farbstoff +Yellow Dye=Gelber Farbstoff +Brown Dye=Brauner Farbstoff +Orange Dye=Orange Farbstoff +Red Dye=Roter Farbstoff +Magenta Dye=Magenta Farbstoff +Pink Dye=Rosa Farbstoff diff --git a/mods/minetest_game/dye/locale/dye.eo.tr b/mods/minetest_game/dye/locale/dye.eo.tr new file mode 100644 index 0000000..2a1c5d6 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.eo.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Blanka Tinkturo +Grey Dye=Griza Tinkturo +Dark Grey Dye=Malhela Griza Tinkturo +Black Dye=Nigra Tinkturo +Violet Dye=Viola Tinkturo +Blue Dye=Blua Tinkturo +Cyan Dye=Bluverda Tinkturo +Dark Green Dye=Malhela Verda Tinkturo +Green Dye=Verda Tinkturo +Yellow Dye=Flava Tinkturo +Brown Dye=Bruna Tinkturo +Orange Dye=Oranĝa Tinkturo +Red Dye=Ruĝa Tinkturo +Magenta Dye=Fiksina Tinkturo +Pink Dye=Roza Tinkturo diff --git a/mods/minetest_game/dye/locale/dye.es.tr b/mods/minetest_game/dye/locale/dye.es.tr new file mode 100644 index 0000000..bd04ef4 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.es.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Tinte blanco +Grey Dye=Tinte gris +Dark Grey Dye=Tinte gris oscuro +Black Dye=Tinte negro +Violet Dye=Tinte violeta +Blue Dye=Tinte azul +Cyan Dye=Tinte cián +Dark Green Dye=Tinte verde oscuro +Green Dye=Tinte verde +Yellow Dye=Tinte amarillo +Brown Dye=Tinte marrón +Orange Dye=Tinte naranja +Red Dye=Tinte rojo +Magenta Dye=Tinte magenta +Pink Dye=Tinte rosa diff --git a/mods/minetest_game/dye/locale/dye.fr.tr b/mods/minetest_game/dye/locale/dye.fr.tr new file mode 100644 index 0000000..390fa07 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.fr.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Colorant blanc +Grey Dye=Colorant gris +Dark Grey Dye=Colorant gris foncé +Black Dye=Colorant noir +Violet Dye=Colorant violet +Blue Dye=Colorant bleu +Cyan Dye=Colorant cyan +Dark Green Dye=Colorant vert foncé +Green Dye=Colorant vert +Yellow Dye=Colorant jaune +Brown Dye=Colorant marron +Orange Dye=Colorant orange +Red Dye=Colorant rouge +Magenta Dye=Colorant magenta +Pink Dye=Colorant rose diff --git a/mods/minetest_game/dye/locale/dye.id.tr b/mods/minetest_game/dye/locale/dye.id.tr new file mode 100644 index 0000000..4122875 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.id.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Pewarna Putih +Grey Dye=Pewarna Abu +Dark Grey Dye=Pewarna Abu Tua +Black Dye=Pewarna Hitam +Violet Dye=Pewarna Ungu +Blue Dye=Pewarna Biru +Cyan Dye=Pewarna Sian +Dark Green Dye=Pewarna Hijau Tua +Green Dye=Pewarna Hijau +Yellow Dye=Pewarna Kuning +Brown Dye=Pewarna Cokelat +Orange Dye=Pewarna Oranye +Red Dye=Pewarna Merah +Magenta Dye=Pewarna Magenta +Pink Dye=Pewarna Merah Jambu diff --git a/mods/minetest_game/dye/locale/dye.it.tr b/mods/minetest_game/dye/locale/dye.it.tr new file mode 100644 index 0000000..9deb385 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.it.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Tintura bianca +Grey Dye=Tintura grigia +Dark Grey Dye=Tintura grigia scura +Black Dye=Tintura nera +Violet Dye=Tintura viola +Blue Dye=Tintura blu +Cyan Dye=Tintura ciano +Dark Green Dye=Tintura verde scura +Green Dye=Tintura verde +Yellow Dye=Tintura gialla +Brown Dye=Tintura marrone +Orange Dye=Tintura arancione +Red Dye=Tintura rossa +Magenta Dye=Tintura magenta +Pink Dye=Tintura rosa diff --git a/mods/minetest_game/dye/locale/dye.jbo.tr b/mods/minetest_game/dye/locale/dye.jbo.tr new file mode 100644 index 0000000..39ec7ab --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.jbo.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=lo blabi xinmo +Grey Dye=lo grusi xinmo +Dark Grey Dye=lo xekri grusi xinmo +Black Dye=lo xekri xinmo +Violet Dye=lo zirpu xinmo +Blue Dye=lo blanu xinmo +Cyan Dye=lo cicna xinmo +Dark Green Dye=lo xekri crino xinmo +Green Dye=lo crino xinmo +Yellow Dye=lo pelxu xinmo +Brown Dye=lo bunre xinmo +Orange Dye=lo narju xinmo +Red Dye=lo xunre xinmo +Magenta Dye=lo nukni xinmo +Pink Dye=lo xunblabi xinmo diff --git a/mods/minetest_game/dye/locale/dye.ms.tr b/mods/minetest_game/dye/locale/dye.ms.tr new file mode 100644 index 0000000..50c0473 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.ms.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Pewarna Putih +Grey Dye=Pewarna Kelabu +Dark Grey Dye=Pewarna Kelabu Gelap +Black Dye=Pewarna Hitam +Violet Dye=Pewarna Ungu +Blue Dye=Pewarna Biru +Cyan Dye=Pewarna Biru Kehijauan +Dark Green Dye=Pewarna Hijau Gelap +Green Dye=Pewarna Hijau +Yellow Dye=Pewarna Kuning +Brown Dye=Pewarna Perang +Orange Dye=Pewarna Jingga +Red Dye=Pewarna Merah +Magenta Dye=Pewarna Merah Lembayung +Pink Dye=Pewarna Merah Jambu diff --git a/mods/minetest_game/dye/locale/dye.pt_BR.tr b/mods/minetest_game/dye/locale/dye.pt_BR.tr new file mode 100644 index 0000000..29e98da --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.pt_BR.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Tinta Branca +Grey Dye=Tinta Cinza +Dark Grey Dye=Tinta Cinza-escuro +Black Dye=Tinta Preta +Violet Dye=Tinta Violeta +Blue Dye=Tinta Azul +Cyan Dye=Tinta Ciano +Dark Green Dye=Tinta Verde-escuro +Green Dye=Tinta Verde +Yellow Dye=Tinta Amarela +Brown Dye=Tinta Marrom +Orange Dye=Tinta Laranja +Red Dye=Tinta Vermelha +Magenta Dye=Tinta Magenta +Pink Dye=Tinta Rosa diff --git a/mods/minetest_game/dye/locale/dye.ru.tr b/mods/minetest_game/dye/locale/dye.ru.tr new file mode 100644 index 0000000..fa3c5c4 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.ru.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Белая Краска +Grey Dye=Серая Краска +Dark Grey Dye=Тёмно-Серая Краска +Black Dye=Черная Краска +Violet Dye=Фиолетовая Краска +Blue Dye=Синяя Краска +Cyan Dye=Голубая Краска +Dark Green Dye=Тёмно-Зелёная Краска +Green Dye=Зелёная Краска +Yellow Dye=Жёлтая Краска +Brown Dye=Бурая Краска +Orange Dye=Оранжевая Краска +Red Dye=Красная Краска +Magenta Dye=Пурпурная Краска +Pink Dye=Розовая Краска diff --git a/mods/minetest_game/dye/locale/dye.se.tr b/mods/minetest_game/dye/locale/dye.se.tr new file mode 100644 index 0000000..936f161 --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.se.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Vit Färg +Grey Dye=Grå Färg +Dark Grey Dye=Mörk Grå Färg +Black Dye=Svart Färg +Violet Dye=Violett Färg +Blue Dye=Blå Färg +Cyan Dye=Cyan Färg +Dark Green Dye=Mörk Grön Färg +Green Dye=Grön Färg +Yellow Dye=Gul Färg +Brown Dye=Brun Färg +Orange Dye=Orange Färg +Red Dye=Röd Färg +Magenta Dye=Magenta Färg +Pink Dye=Rosa Färg diff --git a/mods/minetest_game/dye/locale/dye.sk.tr b/mods/minetest_game/dye/locale/dye.sk.tr new file mode 100644 index 0000000..625804c --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.sk.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=Biele farbivo +Grey Dye=Šedé farbivo +Dark Grey Dye=Tmavo šedé farbivo +Black Dye=Čierne farbivo +Violet Dye=Fialové farbivo +Blue Dye=Modré farbivo +Cyan Dye=Tyrkysové farbivo +Dark Green Dye=Tmavozelené farbivo +Green Dye=Zelené farbivo +Yellow Dye=Žlté farbivo +Brown Dye=Hnedé farbivo +Orange Dye=Oranžové farbivo +Red Dye=Červené farbivo +Magenta Dye=Purpurové farbivo +Pink Dye=Ružové farbivo diff --git a/mods/minetest_game/dye/locale/dye.zh_CN.tr b/mods/minetest_game/dye/locale/dye.zh_CN.tr new file mode 100644 index 0000000..11bf9cb --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.zh_CN.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=白色染料 +Grey Dye=灰色染料 +Dark Grey Dye=暗灰染料 +Black Dye=黑色染料 +Violet Dye=紫色染料 +Blue Dye=蓝色染料 +Cyan Dye=青色染料 +Dark Green Dye=暗绿染料 +Green Dye=绿色染料 +Yellow Dye=黄色染料 +Brown Dye=棕色染料 +Orange Dye=橙色染料 +Red Dye=红色染料 +Magenta Dye=品红染料 +Pink Dye=粉红染料 diff --git a/mods/minetest_game/dye/locale/dye.zh_TW.tr b/mods/minetest_game/dye/locale/dye.zh_TW.tr new file mode 100644 index 0000000..b84d07e --- /dev/null +++ b/mods/minetest_game/dye/locale/dye.zh_TW.tr @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye=白色染料 +Grey Dye=灰色染料 +Dark Grey Dye=暗灰染料 +Black Dye=黑色染料 +Violet Dye=紫色染料 +Blue Dye=藍色染料 +Cyan Dye=青色染料 +Dark Green Dye=暗綠染料 +Green Dye=綠色染料 +Yellow Dye=黃色染料 +Brown Dye=棕色染料 +Orange Dye=橙色染料 +Red Dye=紅色染料 +Magenta Dye=品紅染料 +Pink Dye=粉紅染料 diff --git a/mods/minetest_game/dye/locale/template.txt b/mods/minetest_game/dye/locale/template.txt new file mode 100644 index 0000000..c20bab5 --- /dev/null +++ b/mods/minetest_game/dye/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: dye +White Dye= +Grey Dye= +Dark Grey Dye= +Black Dye= +Violet Dye= +Blue Dye= +Cyan Dye= +Dark Green Dye= +Green Dye= +Yellow Dye= +Brown Dye= +Orange Dye= +Red Dye= +Magenta Dye= +Pink Dye= diff --git a/mods/minetest_game/dye/mod.conf b/mods/minetest_game/dye/mod.conf new file mode 100644 index 0000000..32bb816 --- /dev/null +++ b/mods/minetest_game/dye/mod.conf @@ -0,0 +1,2 @@ +name = dye +description = Minetest Game mod: dye diff --git a/mods/minetest_game/dye/textures/dye_black.png b/mods/minetest_game/dye/textures/dye_black.png new file mode 100755 index 0000000..6ee6ddb Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_black.png differ diff --git a/mods/minetest_game/dye/textures/dye_blue.png b/mods/minetest_game/dye/textures/dye_blue.png new file mode 100755 index 0000000..c46fbb0 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_blue.png differ diff --git a/mods/minetest_game/dye/textures/dye_brown.png b/mods/minetest_game/dye/textures/dye_brown.png new file mode 100755 index 0000000..fc0d539 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_brown.png differ diff --git a/mods/minetest_game/dye/textures/dye_cyan.png b/mods/minetest_game/dye/textures/dye_cyan.png new file mode 100755 index 0000000..e9ffbfc Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_cyan.png differ diff --git a/mods/minetest_game/dye/textures/dye_dark_green.png b/mods/minetest_game/dye/textures/dye_dark_green.png new file mode 100755 index 0000000..734278d Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_dark_green.png differ diff --git a/mods/minetest_game/dye/textures/dye_dark_grey.png b/mods/minetest_game/dye/textures/dye_dark_grey.png new file mode 100755 index 0000000..d9ee371 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_dark_grey.png differ diff --git a/mods/minetest_game/dye/textures/dye_green.png b/mods/minetest_game/dye/textures/dye_green.png new file mode 100755 index 0000000..4b319da Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_green.png differ diff --git a/mods/minetest_game/dye/textures/dye_grey.png b/mods/minetest_game/dye/textures/dye_grey.png new file mode 100755 index 0000000..c9a9922 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_grey.png differ diff --git a/mods/minetest_game/dye/textures/dye_magenta.png b/mods/minetest_game/dye/textures/dye_magenta.png new file mode 100755 index 0000000..323dc90 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_magenta.png differ diff --git a/mods/minetest_game/dye/textures/dye_orange.png b/mods/minetest_game/dye/textures/dye_orange.png new file mode 100755 index 0000000..ac9d14b Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_orange.png differ diff --git a/mods/minetest_game/dye/textures/dye_pink.png b/mods/minetest_game/dye/textures/dye_pink.png new file mode 100755 index 0000000..f377d4e Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_pink.png differ diff --git a/mods/minetest_game/dye/textures/dye_red.png b/mods/minetest_game/dye/textures/dye_red.png new file mode 100755 index 0000000..d8fecd0 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_red.png differ diff --git a/mods/minetest_game/dye/textures/dye_violet.png b/mods/minetest_game/dye/textures/dye_violet.png new file mode 100755 index 0000000..96bdf95 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_violet.png differ diff --git a/mods/minetest_game/dye/textures/dye_white.png b/mods/minetest_game/dye/textures/dye_white.png new file mode 100755 index 0000000..86eecb1 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_white.png differ diff --git a/mods/minetest_game/dye/textures/dye_yellow.png b/mods/minetest_game/dye/textures/dye_yellow.png new file mode 100755 index 0000000..f1f5506 Binary files /dev/null and b/mods/minetest_game/dye/textures/dye_yellow.png differ diff --git a/mods/minetest_game/env_sounds/README.txt b/mods/minetest_game/env_sounds/README.txt new file mode 100644 index 0000000..3b3d275 --- /dev/null +++ b/mods/minetest_game/env_sounds/README.txt @@ -0,0 +1,17 @@ +Minetest Game mod: env_sounds +============================= +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) + +Authors of media (sounds) +------------------------- +Yuval (CC0 1.0) +https://freesound.org/people/Yuval/sounds/197023/ + env_sounds_water.*.ogg + +Halion (CC0 1.0) +https://freesound.org/people/Halion/sounds/17785/ + env_sounds_lava.*.ogg diff --git a/mods/minetest_game/env_sounds/init.lua b/mods/minetest_game/env_sounds/init.lua new file mode 100644 index 0000000..31cc483 --- /dev/null +++ b/mods/minetest_game/env_sounds/init.lua @@ -0,0 +1,112 @@ +-- Parameters + +-- Node search radius around player +local radius = 8 + +local allsounds = { + ["env_sounds_water"] = { + trigger = {"default:water_flowing", "default:river_water_flowing"}, + base_volume = 0.04, + max_volume = 0.4, + per_node = 0.004, + }, + ["env_sounds_lava"] = { + trigger = {"default:lava_source", "default:lava_flowing"}, + base_volume = 0, + max_volume = 0.6, + per_node = { + ["default:lava_source"] = 0.008, + ["default:lava_flowing"] = 0.002, + }, + }, +} + +if minetest.settings:get_bool("river_source_sounds") then + table.insert(allsounds["env_sounds_water"].trigger, + "default:river_water_source") +end + + +-- Cache the union of all trigger nodes + +local cache_triggers = {} + +for sound, def in pairs(allsounds) do + for _, name in ipairs(def.trigger) do + table.insert(cache_triggers, name) + end +end + + +-- Update sound for player + +local function update_sound(player) + local player_name = player:get_player_name() + local ppos = player:get_pos() + ppos = vector.add(ppos, player:get_properties().eye_height) + local areamin = vector.subtract(ppos, radius) + local areamax = vector.add(ppos, radius) + + local pos = minetest.find_nodes_in_area(areamin, areamax, cache_triggers, true) + if next(pos) == nil then -- If table empty + return + end + for sound, def in pairs(allsounds) do + -- Find average position + local posav = {0, 0, 0} + local count = 0 + for _, name in ipairs(def.trigger) do + if pos[name] then + for _, p in ipairs(pos[name]) do + posav[1] = posav[1] + p.x + posav[2] = posav[2] + p.y + posav[3] = posav[3] + p.z + end + count = count + #pos[name] + end + end + + if count > 0 then + posav = vector.new(posav[1] / count, posav[2] / count, + posav[3] / count) + + -- Calculate gain + local gain = def.base_volume + if type(def.per_node) == 'table' then + for name, multiplier in pairs(def.per_node) do + if pos[name] then + gain = gain + #pos[name] * multiplier + end + end + else + gain = gain + count * def.per_node + end + gain = math.min(gain, def.max_volume) + + minetest.sound_play(sound, { + pos = posav, + to_player = player_name, + gain = gain, + }, true) + end + end +end + + +-- Update sound when player joins + +minetest.register_on_joinplayer(function(player) + update_sound(player) +end) + + +-- Cyclic sound update + +local function cyclic_update() + for _, player in pairs(minetest.get_connected_players()) do + update_sound(player) + end + minetest.after(3.5, cyclic_update) +end + +minetest.after(0, cyclic_update) diff --git a/mods/minetest_game/env_sounds/license.txt b/mods/minetest_game/env_sounds/license.txt new file mode 100644 index 0000000..ff8867d --- /dev/null +++ b/mods/minetest_game/env_sounds/license.txt @@ -0,0 +1,57 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2019 paramat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (sounds) +-------------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +Yuval + +No Copyright + +The person who associated a work with this deed has dedicated the work to the +public domain by waiving all of his or her rights to the work worldwide under +copyright law, including all related and neighboring rights, to the extent +allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. See Other Information below. + +Other Information: + +In no way are the patent or trademark rights of any person affected by CC0, nor +are the rights that other persons may have in the work or in how the work is +used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this +deed makes no warranties about the work, and disclaims liability for all uses +of the work, to the fullest extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author +or the affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mods/minetest_game/env_sounds/mod.conf b/mods/minetest_game/env_sounds/mod.conf new file mode 100644 index 0000000..ad6feb3 --- /dev/null +++ b/mods/minetest_game/env_sounds/mod.conf @@ -0,0 +1,3 @@ +name = env_sounds +description = Minetest Game mod: env_sounds +depends = default diff --git a/mods/minetest_game/env_sounds/sounds/env_sounds_lava.1.ogg b/mods/minetest_game/env_sounds/sounds/env_sounds_lava.1.ogg new file mode 100644 index 0000000..3eafce2 Binary files /dev/null and b/mods/minetest_game/env_sounds/sounds/env_sounds_lava.1.ogg differ diff --git a/mods/minetest_game/env_sounds/sounds/env_sounds_lava.2.ogg b/mods/minetest_game/env_sounds/sounds/env_sounds_lava.2.ogg new file mode 100644 index 0000000..8648f17 Binary files /dev/null and b/mods/minetest_game/env_sounds/sounds/env_sounds_lava.2.ogg differ diff --git a/mods/minetest_game/env_sounds/sounds/env_sounds_water.1.ogg b/mods/minetest_game/env_sounds/sounds/env_sounds_water.1.ogg new file mode 100644 index 0000000..aa80882 Binary files /dev/null and b/mods/minetest_game/env_sounds/sounds/env_sounds_water.1.ogg differ diff --git a/mods/minetest_game/env_sounds/sounds/env_sounds_water.2.ogg b/mods/minetest_game/env_sounds/sounds/env_sounds_water.2.ogg new file mode 100644 index 0000000..b3ff114 Binary files /dev/null and b/mods/minetest_game/env_sounds/sounds/env_sounds_water.2.ogg differ diff --git a/mods/minetest_game/env_sounds/sounds/env_sounds_water.3.ogg b/mods/minetest_game/env_sounds/sounds/env_sounds_water.3.ogg new file mode 100644 index 0000000..431a6ed Binary files /dev/null and b/mods/minetest_game/env_sounds/sounds/env_sounds_water.3.ogg differ diff --git a/mods/minetest_game/env_sounds/sounds/env_sounds_water.4.ogg b/mods/minetest_game/env_sounds/sounds/env_sounds_water.4.ogg new file mode 100644 index 0000000..56c2ee2 Binary files /dev/null and b/mods/minetest_game/env_sounds/sounds/env_sounds_water.4.ogg differ diff --git a/mods/minetest_game/farming/README.txt b/mods/minetest_game/farming/README.txt new file mode 100644 index 0000000..a6427d0 --- /dev/null +++ b/mods/minetest_game/farming/README.txt @@ -0,0 +1,43 @@ +Minetest Game mod: farming +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by PilzAdam (MIT) +webdesigner97 (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Created by PilzAdam (CC BY 3.0): + farming_bread.png + farming_soil.png + farming_soil_wet.png + farming_soil_wet_side.png + farming_string.png + +Created by BlockMen (CC BY 3.0): + farming_tool_diamondhoe.png + farming_tool_mesehoe.png + farming_tool_bronzehoe.png + farming_tool_steelhoe.png + farming_tool_stonehoe.png + farming_tool_woodhoe.png + +Created by MasterGollum (CC BY 3.0): + farming_straw.png + +Created by Gambit (CC BY 3.0): + farming_wheat.png + farming_wheat_*.png + farming_cotton_*.png + farming_flour.png + farming_cotton_seed.png + farming_wheat_seed.png + +Created by Napiophelios (CC BY-SA 3.0): + farming_cotton.png + +Created by Extex101 (CC BY-SA 3.0): + farming_cotton_wild.png diff --git a/mods/minetest_game/farming/api.lua b/mods/minetest_game/farming/api.lua new file mode 100644 index 0000000..17a5fa7 --- /dev/null +++ b/mods/minetest_game/farming/api.lua @@ -0,0 +1,401 @@ +-- farming/api.lua + +-- support for MT game translation. +local S = farming.get_translator + +-- Wear out hoes, place soil +-- TODO Ignore group:flower +farming.registered_plants = {} + +farming.hoe_on_use = function(itemstack, user, pointed_thing, uses) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return + end + if pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local p = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z} + local above = minetest.get_node(p) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return + end + if not minetest.registered_nodes[above.name] then + return + end + + -- check if the node above the pointed thing is air + if above.name ~= "air" then + return + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") ~= 1 then + return + end + + -- check if (wet) soil defined + local regN = minetest.registered_nodes + if regN[under.name].soil == nil or regN[under.name].soil.wet == nil or regN[under.name].soil.dry == nil then + return + end + + local player_name = user and user:get_player_name() or "" + + if minetest.is_protected(pt.under, player_name) then + minetest.record_protection_violation(pt.under, player_name) + return + end + if minetest.is_protected(pt.above, player_name) then + minetest.record_protection_violation(pt.above, player_name) + return + end + + -- turn the node into soil and play sound + minetest.set_node(pt.under, {name = regN[under.name].soil.dry}) + minetest.sound_play("default_dig_crumbly", { + pos = pt.under, + gain = 0.5, + }, true) + + if not minetest.is_creative_enabled(player_name) then + -- wear tool + local wdef = itemstack:get_definition() + itemstack:add_wear(65535/(uses-1)) + -- tool break sound + if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then + minetest.sound_play(wdef.sound.breaks, {pos = pt.above, + gain = 0.5}, true) + end + end + return itemstack +end + +-- Register new hoes +farming.register_hoe = function(name, def) + -- Check for : prefix (register new hoes in your mod's namespace) + if name:sub(1,1) ~= ":" then + name = ":" .. name + end + -- Check def table + if def.description == nil then + def.description = S("Hoe") + end + if def.inventory_image == nil then + def.inventory_image = "unknown_item.png" + end + if def.max_uses == nil then + def.max_uses = 30 + end + -- Register the tool + minetest.register_tool(name, { + description = def.description, + inventory_image = def.inventory_image, + on_use = function(itemstack, user, pointed_thing) + return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses) + end, + groups = def.groups, + sound = {breaks = "default_tool_breaks"}, + }) + -- Register its recipe + if def.recipe then + minetest.register_craft({ + output = name:sub(2), + recipe = def.recipe + }) + elseif def.material then + minetest.register_craft({ + output = name:sub(2), + recipe = { + {def.material, def.material}, + {"", "group:stick"}, + {"", "group:stick"} + } + }) + end +end + +-- how often node timers for plants will tick, +/- some random value +local function tick(pos) + minetest.get_node_timer(pos):start(math.random(166, 286)) +end +-- how often a growth failure tick is retried (e.g. too dark) +local function tick_again(pos) + minetest.get_node_timer(pos):start(math.random(40, 80)) +end + +-- Seed placement +farming.place_seed = function(itemstack, placer, pointed_thing, plantname) + local pt = pointed_thing + -- check if pointing at a node + if not pt then + return itemstack + end + if pt.type ~= "node" then + return itemstack + end + + local under = minetest.get_node(pt.under) + local above = minetest.get_node(pt.above) + + local player_name = placer and placer:get_player_name() or "" + + if minetest.is_protected(pt.under, player_name) then + minetest.record_protection_violation(pt.under, player_name) + return + end + if minetest.is_protected(pt.above, player_name) then + minetest.record_protection_violation(pt.above, player_name) + return + end + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] then + return itemstack + end + if not minetest.registered_nodes[above.name] then + return itemstack + end + + -- check if pointing at the top of the node + if pt.above.y ~= pt.under.y+1 then + return itemstack + end + + -- check if you can replace the node above the pointed node + if not minetest.registered_nodes[above.name].buildable_to then + return itemstack + end + + -- check if pointing at soil + if minetest.get_item_group(under.name, "soil") < 2 then + return itemstack + end + + -- add the node and remove 1 item from the itemstack + minetest.log("action", player_name .. " places node " .. plantname .. " at " .. + minetest.pos_to_string(pt.above)) + minetest.add_node(pt.above, {name = plantname, param2 = 1}) + tick(pt.above) + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + return itemstack +end + +farming.grow_plant = function(pos, elapsed) + local node = minetest.get_node(pos) + local name = node.name + local def = minetest.registered_nodes[name] + + if not def.next_plant then + -- disable timer for fully grown plant + return + end + + -- grow seed + if minetest.get_item_group(node.name, "seed") and def.fertility then + local soil_node = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) + if not soil_node then + tick_again(pos) + return + end + -- omitted is a check for light, we assume seeds can germinate in the dark. + for _, v in pairs(def.fertility) do + if minetest.get_item_group(soil_node.name, v) ~= 0 then + local placenode = {name = def.next_plant} + if def.place_param2 then + placenode.param2 = def.place_param2 + end + minetest.swap_node(pos, placenode) + if minetest.registered_nodes[def.next_plant].next_plant then + tick(pos) + return + end + end + end + + return + end + + -- check if on wet soil + local below = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) + if minetest.get_item_group(below.name, "soil") < 3 then + tick_again(pos) + return + end + + -- check light + local light = minetest.get_node_light(pos) + if not light or light < def.minlight or light > def.maxlight then + tick_again(pos) + return + end + + -- grow + local placenode = {name = def.next_plant} + if def.place_param2 then + placenode.param2 = def.place_param2 + end + minetest.swap_node(pos, placenode) + + -- new timer needed? + if minetest.registered_nodes[def.next_plant].next_plant then + tick(pos) + end + return +end + +-- Register plants +farming.register_plant = function(name, def) + local mname = name:split(":")[1] + local pname = name:split(":")[2] + + -- Check def table + if not def.description then + def.description = S("Seed") + end + if not def.harvest_description then + def.harvest_description = pname:gsub("^%l", string.upper) + end + if not def.inventory_image then + def.inventory_image = "unknown_item.png" + end + if not def.steps then + return nil + end + if not def.minlight then + def.minlight = 1 + end + if not def.maxlight then + def.maxlight = 14 + end + if not def.fertility then + def.fertility = {} + end + + farming.registered_plants[pname] = def + + -- Register seed + local lbm_nodes = {mname .. ":seed_" .. pname} + local g = {seed = 1, snappy = 3, attached_node = 1, flammable = 2} + for k, v in pairs(def.fertility) do + g[v] = 1 + end + minetest.register_node(":" .. mname .. ":seed_" .. pname, { + description = def.description, + tiles = {def.inventory_image}, + inventory_image = def.inventory_image, + wield_image = def.inventory_image, + drawtype = "signlike", + groups = g, + paramtype = "light", + paramtype2 = "wallmounted", + place_param2 = def.place_param2 or nil, -- this isn't actually used for placement + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + fertility = def.fertility, + sounds = default.node_sound_dirt_defaults({ + dig = {name = "", gain = 0}, + dug = {name = "default_grass_footstep", gain = 0.2}, + place = {name = "default_place_node", gain = 0.25}, + }), + + on_place = function(itemstack, placer, pointed_thing) + local under = pointed_thing.under + local node = minetest.get_node(under) + local udef = minetest.registered_nodes[node.name] + if udef and udef.on_rightclick and + not (placer and placer:is_player() and + placer:get_player_control().sneak) then + return udef.on_rightclick(under, node, placer, itemstack, + pointed_thing) or itemstack + end + + return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":seed_" .. pname) + end, + next_plant = mname .. ":" .. pname .. "_1", + on_timer = farming.grow_plant, + minlight = def.minlight, + maxlight = def.maxlight, + }) + + -- Register harvest + minetest.register_craftitem(":" .. mname .. ":" .. pname, { + description = def.harvest_description, + inventory_image = mname .. "_" .. pname .. ".png", + groups = def.groups or {flammable = 2}, + }) + + -- Register growing steps + for i = 1, def.steps do + local base_rarity = 1 + if def.steps ~= 1 then + base_rarity = 8 - (i - 1) * 7 / (def.steps - 1) + end + local drop = { + items = { + {items = {mname .. ":" .. pname}, rarity = base_rarity}, + {items = {mname .. ":" .. pname}, rarity = base_rarity * 2}, + {items = {mname .. ":seed_" .. pname}, rarity = base_rarity}, + {items = {mname .. ":seed_" .. pname}, rarity = base_rarity * 2}, + } + } + local nodegroups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1} + nodegroups[pname] = i + + local next_plant = nil + + if i < def.steps then + next_plant = mname .. ":" .. pname .. "_" .. (i + 1) + lbm_nodes[#lbm_nodes + 1] = mname .. ":" .. pname .. "_" .. i + end + + minetest.register_node(":" .. mname .. ":" .. pname .. "_" .. i, { + drawtype = "plantlike", + waving = 1, + tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"}, + paramtype = "light", + paramtype2 = def.paramtype2 or nil, + place_param2 = def.place_param2 or nil, + walkable = false, + buildable_to = true, + drop = drop, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}, + }, + groups = nodegroups, + sounds = default.node_sound_leaves_defaults(), + next_plant = next_plant, + on_timer = farming.grow_plant, + minlight = def.minlight, + maxlight = def.maxlight, + }) + end + + -- replacement LBM for pre-nodetimer plants + minetest.register_lbm({ + name = ":" .. mname .. ":start_nodetimer_" .. pname, + nodenames = lbm_nodes, + action = function(pos, node) + tick_again(pos) + end, + }) + + -- Return + local r = { + seed = mname .. ":seed_" .. pname, + harvest = mname .. ":" .. pname + } + return r +end diff --git a/mods/minetest_game/farming/hoes.lua b/mods/minetest_game/farming/hoes.lua new file mode 100644 index 0000000..d005f6d --- /dev/null +++ b/mods/minetest_game/farming/hoes.lua @@ -0,0 +1,54 @@ +-- farming/hoes.lua + +-- support for MT game translation. +local S = farming.get_translator + +farming.register_hoe(":farming:hoe_wood", { + description = S("Wooden Hoe"), + inventory_image = "farming_tool_woodhoe.png", + max_uses = 30, + material = "group:wood", + groups = {hoe = 1, flammable = 2}, +}) + +farming.register_hoe(":farming:hoe_stone", { + description = S("Stone Hoe"), + inventory_image = "farming_tool_stonehoe.png", + max_uses = 90, + material = "group:stone", + groups = {hoe = 1} +}) + +farming.register_hoe(":farming:hoe_steel", { + description = S("Steel Hoe"), + inventory_image = "farming_tool_steelhoe.png", + max_uses = 500, + material = "default:steel_ingot", + groups = {hoe = 1} +}) + +-- The following are deprecated by removing the 'material' field to prevent +-- crafting and removing from creative inventory, to cause them to eventually +-- disappear from worlds. The registrations should be removed in a future +-- release. + +farming.register_hoe(":farming:hoe_bronze", { + description = S("Bronze Hoe"), + inventory_image = "farming_tool_bronzehoe.png", + max_uses = 220, + groups = {hoe = 1, not_in_creative_inventory = 1}, +}) + +farming.register_hoe(":farming:hoe_mese", { + description = S("Mese Hoe"), + inventory_image = "farming_tool_mesehoe.png", + max_uses = 350, + groups = {hoe = 1, not_in_creative_inventory = 1}, +}) + +farming.register_hoe(":farming:hoe_diamond", { + description = S("Diamond Hoe"), + inventory_image = "farming_tool_diamondhoe.png", + max_uses = 500, + groups = {hoe = 1, not_in_creative_inventory = 1}, +}) diff --git a/mods/minetest_game/farming/init.lua b/mods/minetest_game/farming/init.lua new file mode 100644 index 0000000..d328cb4 --- /dev/null +++ b/mods/minetest_game/farming/init.lua @@ -0,0 +1,171 @@ +-- farming/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("farming") + +-- Global farming namespace + +farming = {} +farming.path = minetest.get_modpath("farming") +farming.get_translator = S + +-- Load files + +dofile(farming.path .. "/api.lua") +dofile(farming.path .. "/nodes.lua") +dofile(farming.path .. "/hoes.lua") + + +-- Wheat + +farming.register_plant("farming:wheat", { + description = S("Wheat Seed"), + harvest_description = S("Wheat"), + paramtype2 = "meshoptions", + inventory_image = "farming_wheat_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland"}, + groups = {food_wheat = 1, flammable = 4}, + place_param2 = 3, +}) + +minetest.register_craftitem("farming:flour", { + description = S("Flour"), + inventory_image = "farming_flour.png", + groups = {food_flour = 1, flammable = 1}, +}) + +minetest.register_craftitem("farming:bread", { + description = S("Bread"), + inventory_image = "farming_bread.png", + on_use = minetest.item_eat(5), + groups = {food_bread = 1, flammable = 2}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour", + recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:bread", + recipe = "farming:flour" +}) + + +-- Cotton + +farming.register_plant("farming:cotton", { + description = S("Cotton Seed"), + harvest_description = S("Cotton"), + inventory_image = "farming_cotton_seed.png", + steps = 8, + minlight = 13, + maxlight = default.LIGHT_MAX, + fertility = {"grassland", "desert"}, + groups = {flammable = 4}, +}) + +minetest.register_decoration({ + name = "farming:cotton_wild", + deco_type = "simple", + place_on = {"default:dry_dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = -0.1, + scale = 0.1, + spread = {x = 50, y = 50, z = 50}, + seed = 4242, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna"}, + y_max = 31000, + y_min = 1, + decoration = "farming:cotton_wild", +}) + +minetest.register_craftitem("farming:string", { + description = S("String"), + inventory_image = "farming_string.png", + groups = {flammable = 2}, +}) + +minetest.register_craft({ + output = "wool:white", + recipe = { + {"farming:cotton", "farming:cotton"}, + {"farming:cotton", "farming:cotton"}, + } +}) + +minetest.register_craft({ + output = "farming:string 2", + recipe = { + {"farming:cotton"}, + {"farming:cotton"}, + } +}) + + +-- Straw + +minetest.register_craft({ + output = "farming:straw 3", + recipe = { + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + } +}) + +minetest.register_craft({ + output = "farming:wheat 3", + recipe = { + {"farming:straw"}, + } +}) + + +-- Fuels + +minetest.register_craft({ + type = "fuel", + recipe = "farming:wheat", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:cotton", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:string", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:hoe_wood", + burntime = 5, +}) + + +-- Register farming items as dungeon loot + +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + {name = "farming:string", chance = 0.5, count = {1, 8}}, + {name = "farming:wheat", chance = 0.5, count = {2, 5}}, + {name = "farming:seed_cotton", chance = 0.4, count = {1, 4}, + types = {"normal"}}, + }) +end diff --git a/mods/minetest_game/farming/license.txt b/mods/minetest_game/farming/license.txt new file mode 100644 index 0000000..b9708de --- /dev/null +++ b/mods/minetest_game/farming/license.txt @@ -0,0 +1,95 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 webdesigner97 +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +License of media (textures) +--------------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2012-2016 PilzAdam +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2015-2016 MasterGollum +Copyright (C) 2015-2016 Gambit + +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. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2017 Napiophelios +Copyright (C) 2020 Extex101 + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/farming/locale/farming.de.tr b/mods/minetest_game/farming/locale/farming.de.tr new file mode 100644 index 0000000..b16748d --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.de.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Hoe=Hacke +Seed=Samen +Wooden Hoe=Holzhacke +Stone Hoe=Steinhacke +Steel Hoe=Stahlhacke +Bronze Hoe=Bronzehacke +Mese Hoe=Mesehacke +Diamond Hoe=Diamanthacke +Wheat Seed=Weizensamen +Wheat=Weizen +Flour=Mehl +Bread=Brot +Cotton Seed=Baumwollsamen +Cotton=Baumwolle +String=Faden +Soil=Ackerboden +Wet Soil=Nasser Ackerboden +Savanna Soil=Savannenackerboden +Wet Savanna Soil=Nasser Savannenackerboden +Desert Sand Soil=Wüstensandackerboden +Wet Desert Sand Soil=Nasser Wüstensandackerboden +Straw=Stroh +Straw Stair=Strohtreppe +Inner Straw Stair=Innere Strohtreppe +Outer Straw Stair=Äußere Strohtreppe +Straw Slab=Strohplatte +Wild Cotton=Wilde Baumwolle diff --git a/mods/minetest_game/farming/locale/farming.eo.tr b/mods/minetest_game/farming/locale/farming.eo.tr new file mode 100644 index 0000000..70caa10 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.eo.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Soil=Tero +Wet Soil=Malseka Tero +Savanna Soil=Savana Tero +Wet Savanna Soil=Malseka Savana Tero +Desert Sand Soil=Dezerta Sablo Tero +Wet Desert Sand Soil=Malseka Dezerta Sablo Tero +Straw=Pajlo +Straw Stair=Pajla Ŝtupo +Inner Straw Stair=Interna Pajla Ŝtupo +Outer Straw Stair=Ekstera Pajla Ŝtupo +Straw Slab=Pajla Plato +Wild Cotton=Sovaĝa Katuno +Wheat Seed=Tritika Semo +Wheat=Tritiko +Flour=Faruno +Bread=Pano +Cotton Seed=Katuna Semo +Cotton=Katuno +String=Ŝnuro +Wooden Hoe=Ligna Sarkilo +Stone Hoe=Ŝtona Sarkilo +Steel Hoe=Ŝtala Sarkilo +Bronze Hoe=Bronza Sarkilo +Mese Hoe=Mesea Sarkilo +Diamond Hoe=Diamanta Sarkilo +Hoe=Sarkilo +Seed=Semo diff --git a/mods/minetest_game/farming/locale/farming.es.tr b/mods/minetest_game/farming/locale/farming.es.tr new file mode 100644 index 0000000..818c634 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.es.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe=Azada +Seed=Semilla +Wooden Hoe=Azada de madera +Stone Hoe=Azada de piedra +Steel Hoe=Azada de acero +Bronze Hoe=Azada de bronce +Mese Hoe=Azada de mese +Diamond Hoe=Azada de diamante +Wheat Seed=Semilla de trigo +Wheat=Trigo +Flour=Harina +Bread=Pan +Cotton Seed=Semilla de algodón +Cotton=Algodón +String=Hilo +Soil=Tierra de cultivo +Wet Soil=Tierra de cultivo humeda +Savanna Soil=Tierra de cultivo de sabana +Wet Savanna Soil=Tierra de cultivo humeda de sabana +Desert Sand Soil=Tierra de cultivo de arena de desierto +Wet Desert Sand Soil=Tierra de cultivo de arena de desierto humeda +Straw=Paja +Straw Stair=Escalera de paja +Inner Straw Stair=Escalera de paja interior +Outer Straw Stair=Escalera de paja exterior +Straw Slab=Losa de paja +Wild Cotton=Algodón silvestre + + +##### not used anymore ##### + +Dry Soil=Tierra de cultivo seca +Wet Dry Soil=Tierra de cultivo seca-humeda diff --git a/mods/minetest_game/farming/locale/farming.fr.tr b/mods/minetest_game/farming/locale/farming.fr.tr new file mode 100644 index 0000000..84d52b0 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.fr.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=Houe en bois +Stone Hoe=Houe en pierre +Steel Hoe=Houe en acier +Bronze Hoe=Houe en bronze +Mese Hoe=Houe en Mese +Diamond Hoe=Houe en diamant +Wheat Seed=Grain de blé +Wheat=Blé +Flour=Farine +Bread=Pain +Cotton Seed=Graine de coton +Cotton=Coton +String=Ficelle +Soil=Sol +Wet Soil=Sol humide +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=Sol de sable du désert +Wet Desert Sand Soil=Sol de sable du désert humide +Straw=Paille +Straw Stair=Escalier de paille +Inner Straw Stair=Escalier intérieur en paille +Outer Straw Stair=Escalier extérieur en paille +Straw Slab=Dalle de paille +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=Sol sec +Wet Dry Soil=Sol sec et humide diff --git a/mods/minetest_game/farming/locale/farming.id.tr b/mods/minetest_game/farming/locale/farming.id.tr new file mode 100644 index 0000000..7b27680 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.id.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Hoe=Cangkul +Seed=Benih +Wooden Hoe=Cangkul Kayu +Stone Hoe=Cangkul Batu +Steel Hoe=Cangkul Baja +Bronze Hoe=Cangkul Perunggu +Mese Hoe=Cangkul Mese +Diamond Hoe=Cangkul Berlian +Wheat Seed=Benih Gandum +Wheat=Gandum +Flour=Tepung +Bread=Roti +Cotton Seed=Benih Kapas +Cotton=Kapas +String=Benang +Soil=Tanah Tanam +Wet Soil=Tanah Tanam Basah +Savanna Soil=Tanah Tanam Sabana +Wet Savanna Soil=Tanah Tanam Sabana Basah +Desert Sand Soil=Pasir Tanam Gurun +Wet Desert Sand Soil=Pasir Tanam Gurun Basah +Straw=Jerami +Straw Stair=Tangga Jerami +Inner Straw Stair=Tangga Jerami Dalam +Outer Straw Stair=Tangga Jerami Luar +Straw Slab=Lempengan Jerami +Wild Cotton=Kapas Liar diff --git a/mods/minetest_game/farming/locale/farming.it.tr b/mods/minetest_game/farming/locale/farming.it.tr new file mode 100644 index 0000000..aeb9c0a --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.it.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=Zappa di legno +Stone Hoe=Zappa di pietra +Steel Hoe=Zappa d'acciaio +Bronze Hoe=Zappa di bronzo +Mese Hoe=Zappa di mese +Diamond Hoe=Zappa di diamante +Wheat Seed=Seme di grano +Wheat=Grano +Flour=Farina +Bread=Pane +Cotton Seed=Seme di cotone +Cotton=Cotone +String=Filo +Soil=Terreno +Wet Soil=Terreno bagnato +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=Terreno di sabbia del deserto +Wet Desert Sand Soil=Terreno bagnato di sabbia del deserto +Straw=Paglia +Straw Stair=Scala di paglia +Inner Straw Stair=Scala di paglia interna +Outer Straw Stair=Scala di paglia esterna +Straw Slab=Lastra di paglia +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=Terreno asciutto +Wet Dry Soil=Terreno asciutto bagnato diff --git a/mods/minetest_game/farming/locale/farming.jbo.tr b/mods/minetest_game/farming/locale/farming.jbo.tr new file mode 100644 index 0000000..06bfa32 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.jbo.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Hoe=lo te plixa +Seed=lo tsiju +Wooden Hoe=lo mudri te plixa +Stone Hoe=lo rokci te plixa +Steel Hoe=lo gasta te plixa +Bronze Hoe=lo ransu te plixa +Mese Hoe=lo za'e kunrmese te plixa +Diamond Hoe=lo tabjme te plixa +Wheat Seed=lo tsiju be lo maxri +Wheat=lo maxri +Flour=lo grupu'o +Bread=lo nanba +Cotton Seed=lo tsiju be lo mapni +Cotton=lo mapni +String=lo cilta +Soil=lo ferti dertu +Wet Soil=lo cilmo ke ferti dertu +Savanna Soil=lo ferti ke sudytu'a dertu +Wet Savanna Soil=lo cilmo ke ferti ke sudytu'a dertu +Desert Sand Soil=lo ferti ke cantu'a canre +Wet Desert Sand Soil=lo cilmo ke ferti ke cantu'a canre +Straw=lo sudysrasu +Straw Stair=lo sudysrasu serti +Inner Straw Stair=lo zo'i sudysrasu serti +Outer Straw Stair=lo ze'o sudysrasu serti +Straw Slab=lo sudysrasu ke xadba bliku +Wild Cotton=lo cilce ke mapni spati diff --git a/mods/minetest_game/farming/locale/farming.ms.tr b/mods/minetest_game/farming/locale/farming.ms.tr new file mode 100644 index 0000000..95b8709 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.ms.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=Cangkul Kayu +Stone Hoe=Cangkul Batu +Steel Hoe=Cangkul Keluli +Bronze Hoe=Cangkul Gangsa +Mese Hoe=Cangkul Mese +Diamond Hoe=Cangkul Intan +Wheat Seed=Benih Gandum +Wheat=Gandum +Flour=Tepung +Bread=Roti +Cotton Seed=Benih Kapas +Cotton=Kapas +String=Benang +Soil=Tanih +Wet Soil=Tanih Lembap +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=Tanih Pasir Gurun +Wet Desert Sand Soil=Tanih Pasir Gurun Lembap +Straw=Jerami +Straw Stair=Tangga Jerami +Inner Straw Stair=Tangga Jerami Dalaman +Outer Straw Stair=Tangga Jerami Luaran +Straw Slab=Papak Jerami +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=Tanih Kering +Wet Dry Soil=Tanih Kering Lembap diff --git a/mods/minetest_game/farming/locale/farming.pt_BR.tr b/mods/minetest_game/farming/locale/farming.pt_BR.tr new file mode 100644 index 0000000..fb0a83c --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.pt_BR.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Hoe=Enxada +Seed=Semente +Wooden Hoe=Enxada de Madeira +Stone Hoe=Enxada de Pedra +Steel Hoe=Enxada de Aço +Bronze Hoe=Enxada de Bronze +Mese Hoe=Enxada de Mese +Diamond Hoe=Enxada de Diamante +Wheat Seed=Semente de Trigo +Wheat=Trigo +Flour=Farinha +Bread=Pão +Cotton Seed=Semente de Algodão +Cotton=Algodão +String=Fio +Soil=Solo +Wet Soil=Solo Molhado +Savanna Soil=Solo da Savana +Wet Savanna Soil=Solo da Savana Molhado +Desert Sand Soil=Solo Arenoso do Deserto +Wet Desert Sand Soil=Solo Arenoso do Deserto Molhado +Straw=Palha +Straw Stair=Escada de Palha +Inner Straw Stair=Escada de Palha Externa +Outer Straw Stair=Escada de Palha Interna +Straw Slab=Laje de Palha +Wild Cotton=Algodão Selvagem diff --git a/mods/minetest_game/farming/locale/farming.ru.tr b/mods/minetest_game/farming/locale/farming.ru.tr new file mode 100644 index 0000000..a6d1b6d --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.ru.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=Деревянная Мотыга +Stone Hoe=Каменная Мотыга +Steel Hoe=Стальная Мотыга +Bronze Hoe=Бронзовая Мотыга +Mese Hoe=Месе Мотыга +Diamond Hoe=Алмазная Мотыга +Wheat Seed=Семена Пшеницы +Wheat=Пшеница +Flour=Мука +Bread=Хлеб +Cotton Seed=Семена Хлопка +Cotton=Хлопок +String=Нить +Soil=Почва +Wet Soil=Влажная Почва +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=Пустынная Песчаная Почва +Wet Desert Sand Soil=Влажная Пустынная Песчаная Почва +Straw=Солома +Straw Stair=Соломенная Ступень +Inner Straw Stair=Угловая Соломенная Ступень (Внутренний Угол) +Outer Straw Stair=Угловая Соломенная Ступень (Внешний Угол) +Straw Slab=Соломенная Плита +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=Сухая Почва +Wet Dry Soil=Влажная Сухая Почва diff --git a/mods/minetest_game/farming/locale/farming.se.tr b/mods/minetest_game/farming/locale/farming.se.tr new file mode 100644 index 0000000..3b69fba --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.se.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=Träsko +Stone Hoe=Stensko +Steel Hoe=Stålsko +Bronze Hoe=Bronssko +Mese Hoe=Mesesko +Diamond Hoe=Diamantsko +Wheat Seed=Vetefrö +Wheat=Vete +Flour=Mjöl +Bread=Bröd +Cotton Seed=Bollumsfrö +Cotton=Bomull +String=Snöra +Soil=Odlningsmark +Wet Soil=Våt Odlningsmark +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=Öken Sand Odlningsmark +Wet Desert Sand Soil=Våt Öken Sand Odlningsmark +Straw=Halm +Straw Stair=Halmstrappa +Inner Straw Stair=Inre Halmstrappa +Outer Straw Stair=Yttre Halmstrappa +Straw Slab=Halmplatta +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=Torr Odlningsmark +Wet Dry Soil=Våt Torr Odlningsmark diff --git a/mods/minetest_game/farming/locale/farming.sk.tr b/mods/minetest_game/farming/locale/farming.sk.tr new file mode 100644 index 0000000..2caa4b5 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.sk.tr @@ -0,0 +1,28 @@ +# textdomain: farming +Hoe=Motyka +Seed=Semienko +Wooden Hoe=Drevená motyka +Stone Hoe=Kamenná motyka +Steel Hoe=Oceľová motyka +Bronze Hoe=Bronzová motyka +Mese Hoe=Mese motyka +Diamond Hoe=Diamantová motyka +Wheat Seed=Pšeničné semienko +Wheat=Pšenica +Flour=Múka +Bread=Chlieb +Cotton Seed=Bavlnené semienko +Cotton=Bavlna +String=Šňúra +Soil=Zemina +Wet Soil=Mokrá zemina +Savanna Soil=Zemina zo savany +Wet Savanna Soil=Morká zemina zo savany +Desert Sand Soil=Zemina s púšte +Wet Desert Sand Soil=Mokrá zemina s púšte +Straw=Slama +Straw Stair=Slamenné schody +Inner Straw Stair=Vnútorné slamenné schodisko +Outer Straw Stair=Vonkajšie slamenné schodisko +Straw Slab=Slamenná doska +Wild Cotton=Divoká bavlna diff --git a/mods/minetest_game/farming/locale/farming.zh_CN.tr b/mods/minetest_game/farming/locale/farming.zh_CN.tr new file mode 100644 index 0000000..741ba45 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.zh_CN.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=木锄头 +Stone Hoe=石锄头 +Steel Hoe=铁锄头 +Bronze Hoe=青铜锄头 +Mese Hoe=黄石锄头 +Diamond Hoe=钻石锄头 +Wheat Seed=小麦种子 +Wheat=小麦 +Flour=面粉 +Bread=面包 +Cotton Seed=棉花种子 +Cotton=棉 +String=线 +Soil=土 +Wet Soil=湿土 +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=沙漠沙土 +Wet Desert Sand Soil=湿沙漠沙土 +Straw=稻草 +Straw Stair=稻草台阶 +Inner Straw Stair=稻草内楼梯 +Outer Straw Stair=稻草外楼梯 +Straw Slab=稻草板 +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=干土 +Wet Dry Soil=湿干土 diff --git a/mods/minetest_game/farming/locale/farming.zh_TW.tr b/mods/minetest_game/farming/locale/farming.zh_TW.tr new file mode 100644 index 0000000..e6a1f35 --- /dev/null +++ b/mods/minetest_game/farming/locale/farming.zh_TW.tr @@ -0,0 +1,34 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe=木鋤頭 +Stone Hoe=石鋤頭 +Steel Hoe=鐵鋤頭 +Bronze Hoe=青銅鋤頭 +Mese Hoe=黃石鋤頭 +Diamond Hoe=鑽石鋤頭 +Wheat Seed=小麥種子 +Wheat=小麥 +Flour=麵粉 +Bread=麵包 +Cotton Seed=棉花種子 +Cotton=棉 +String=線 +Soil=土 +Wet Soil=溼土 +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil=沙漠沙土 +Wet Desert Sand Soil=溼沙漠沙土 +Straw=稻草 +Straw Stair=稻草臺階 +Inner Straw Stair=稻草內樓梯 +Outer Straw Stair=稻草外樓梯 +Straw Slab=稻草板 +Wild Cotton= + + +##### not used anymore ##### + +Dry Soil=乾土 +Wet Dry Soil=溼乾土 diff --git a/mods/minetest_game/farming/locale/template.txt b/mods/minetest_game/farming/locale/template.txt new file mode 100644 index 0000000..af92347 --- /dev/null +++ b/mods/minetest_game/farming/locale/template.txt @@ -0,0 +1,28 @@ +# textdomain: farming +Hoe= +Seed= +Wooden Hoe= +Stone Hoe= +Steel Hoe= +Bronze Hoe= +Mese Hoe= +Diamond Hoe= +Wheat Seed= +Wheat= +Flour= +Bread= +Cotton Seed= +Cotton= +String= +Soil= +Wet Soil= +Savanna Soil= +Wet Savanna Soil= +Desert Sand Soil= +Wet Desert Sand Soil= +Straw= +Straw Stair= +Inner Straw Stair= +Outer Straw Stair= +Straw Slab= +Wild Cotton= diff --git a/mods/minetest_game/farming/mod.conf b/mods/minetest_game/farming/mod.conf new file mode 100644 index 0000000..9a76a6a --- /dev/null +++ b/mods/minetest_game/farming/mod.conf @@ -0,0 +1,4 @@ +name = farming +description = Minetest Game mod: farming +depends = default, wool, stairs +optional_depends = dungeon_loot diff --git a/mods/minetest_game/farming/nodes.lua b/mods/minetest_game/farming/nodes.lua new file mode 100644 index 0000000..b5f90f9 --- /dev/null +++ b/mods/minetest_game/farming/nodes.lua @@ -0,0 +1,282 @@ +-- farming/nodes.lua + +-- support for MT game translation. +local S = farming.get_translator + +minetest.override_item("default:dirt", { + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_grass", { + soil = { + base = "default:dirt_with_grass", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_dry_grass", { + soil = { + base = "default:dirt_with_dry_grass", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_rainforest_litter", { + soil = { + base = "default:dirt_with_rainforest_litter", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dirt_with_coniferous_litter", { + soil = { + base = "default:dirt_with_coniferous_litter", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.override_item("default:dry_dirt", { + soil = { + base = "default:dry_dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.override_item("default:dry_dirt_with_dry_grass", { + soil = { + base = "default:dry_dirt_with_dry_grass", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.register_node("farming:soil", { + description = S("Soil"), + tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, + drop = "default:dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.register_node("farming:soil_wet", { + description = S("Wet Soil"), + tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, + drop = "default:dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dirt", + dry = "farming:soil", + wet = "farming:soil_wet" + } +}) + +minetest.register_node("farming:dry_soil", { + description = S("Savanna Soil"), + tiles = {"default_dry_dirt.png^farming_soil.png", "default_dry_dirt.png"}, + drop = "default:dry_dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=2, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dry_dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.register_node("farming:dry_soil_wet", { + description = S("Wet Savanna Soil"), + tiles = {"default_dry_dirt.png^farming_soil_wet.png", "default_dry_dirt.png^farming_soil_wet_side.png"}, + drop = "default:dry_dirt", + groups = {crumbly=3, not_in_creative_inventory=1, soil=3, wet = 1, grassland = 1, field = 1}, + sounds = default.node_sound_dirt_defaults(), + soil = { + base = "default:dry_dirt", + dry = "farming:dry_soil", + wet = "farming:dry_soil_wet" + } +}) + +minetest.override_item("default:desert_sand", { + groups = {crumbly=3, falling_node=1, sand=1, soil = 1}, + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) +minetest.register_node("farming:desert_sand_soil", { + description = S("Desert Sand Soil"), + drop = "default:desert_sand", + tiles = {"farming_desert_sand_soil.png", "default_desert_sand.png"}, + groups = {crumbly=3, not_in_creative_inventory = 1, falling_node=1, sand=1, soil = 2, desert = 1, field = 1}, + sounds = default.node_sound_sand_defaults(), + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) + +minetest.register_node("farming:desert_sand_soil_wet", { + description = S("Wet Desert Sand Soil"), + drop = "default:desert_sand", + tiles = {"farming_desert_sand_soil_wet.png", "farming_desert_sand_soil_wet_side.png"}, + groups = {crumbly=3, falling_node=1, sand=1, not_in_creative_inventory=1, soil=3, wet = 1, desert = 1, field = 1}, + sounds = default.node_sound_sand_defaults(), + soil = { + base = "default:desert_sand", + dry = "farming:desert_sand_soil", + wet = "farming:desert_sand_soil_wet" + } +}) + +minetest.register_node("farming:straw", { + description = S("Straw"), + tiles = {"farming_straw.png"}, + is_ground_content = false, + groups = {snappy=3, flammable=4, fall_damage_add_percent=-30}, + sounds = default.node_sound_leaves_defaults(), +}) + +-- Registered before the stairs so the stairs get fuel recipes. +minetest.register_craft({ + type = "fuel", + recipe = "farming:straw", + burntime = 3, +}) + +do + local recipe = "farming:straw" + local groups = {snappy = 3, flammable = 4} + local images = {"farming_straw.png"} + local sounds = default.node_sound_leaves_defaults() + + stairs.register_stair("straw", recipe, groups, images, S("Straw Stair"), + sounds, true) + stairs.register_stair_inner("straw", recipe, groups, images, "", + sounds, true, S("Inner Straw Stair")) + stairs.register_stair_outer("straw", recipe, groups, images, "", + sounds, true, S("Outer Straw Stair")) + stairs.register_slab("straw", recipe, groups, images, S("Straw Slab"), + sounds, true) +end + +minetest.register_abm({ + label = "Farming soil", + nodenames = {"group:field"}, + interval = 15, + chance = 4, + action = function(pos, node) + local n_def = minetest.registered_nodes[node.name] or nil + local wet = n_def.soil.wet or nil + local base = n_def.soil.base or nil + local dry = n_def.soil.dry or nil + if not n_def or not n_def.soil or not wet or not base or not dry then + return + end + + pos.y = pos.y + 1 + local nn = minetest.get_node_or_nil(pos) + if not nn or not nn.name then + return + end + local nn_def = minetest.registered_nodes[nn.name] or nil + pos.y = pos.y - 1 + + if nn_def and nn_def.walkable and minetest.get_item_group(nn.name, "plant") == 0 then + minetest.set_node(pos, {name = base}) + return + end + -- check if there is water nearby + local wet_lvl = minetest.get_item_group(node.name, "wet") + if minetest.find_node_near(pos, 3, {"group:water"}) then + -- if it is dry soil and not base node, turn it into wet soil + if wet_lvl == 0 then + minetest.set_node(pos, {name = wet}) + end + else + -- only turn back if there are no unloaded blocks (and therefore + -- possible water sources) nearby + if not minetest.find_node_near(pos, 3, {"ignore"}) then + -- turn it back into base if it is already dry + if wet_lvl == 0 then + -- only turn it back if there is no plant/seed on top of it + if minetest.get_item_group(nn.name, "plant") == 0 and minetest.get_item_group(nn.name, "seed") == 0 then + minetest.set_node(pos, {name = base}) + end + + -- if its wet turn it back into dry soil + elseif wet_lvl == 1 then + minetest.set_node(pos, {name = dry}) + end + end + end + end, +}) + + +-- Make default:grass_* occasionally drop wheat seed + +for i = 1, 5 do + minetest.override_item("default:grass_"..i, {drop = { + max_items = 1, + items = { + {items = {"farming:seed_wheat"}, rarity = 5}, + {items = {"default:grass_1"}}, + } + }}) +end + + +-- Make default:junglegrass occasionally drop cotton seed. + +-- This is the old source of cotton seeds that makes no sense. It is a leftover +-- from Mapgen V6 where junglegrass was the only plant available to be a source. +-- This source is kept for now to avoid disruption but should probably be +-- removed in future as players get used to the new source. + +minetest.override_item("default:junglegrass", {drop = { + max_items = 1, + items = { + {items = {"farming:seed_cotton"}, rarity = 8}, + {items = {"default:junglegrass"}}, + } +}}) + + +-- Wild cotton as a source of cotton seed + +minetest.register_node("farming:cotton_wild", { + description = S("Wild Cotton"), + drawtype = "plantlike", + waving = 1, + tiles = {"farming_cotton_wild.png"}, + inventory_image = "farming_cotton_wild.png", + wield_image = "farming_cotton_wild.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {snappy = 3, attached_node = 1, flammable = 4}, + drop = "farming:seed_cotton", + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-6 / 16, -8 / 16, -6 / 16, 6 / 16, 5 / 16, 6 / 16}, + }, +}) diff --git a/mods/minetest_game/farming/textures/farming_bread.png b/mods/minetest_game/farming/textures/farming_bread.png new file mode 100755 index 0000000..6a5c2a6 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_bread.png differ diff --git a/mods/minetest_game/farming/textures/farming_carrot.png b/mods/minetest_game/farming/textures/farming_carrot.png new file mode 100755 index 0000000..7b79c11 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_carrot.png differ diff --git a/mods/minetest_game/farming/textures/farming_carrot_1.png b/mods/minetest_game/farming/textures/farming_carrot_1.png new file mode 100755 index 0000000..08605d9 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_carrot_1.png differ diff --git a/mods/minetest_game/farming/textures/farming_carrot_2.png b/mods/minetest_game/farming/textures/farming_carrot_2.png new file mode 100755 index 0000000..ecd80b2 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_carrot_2.png differ diff --git a/mods/minetest_game/farming/textures/farming_carrot_3.png b/mods/minetest_game/farming/textures/farming_carrot_3.png new file mode 100755 index 0000000..d477798 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_carrot_3.png differ diff --git a/mods/minetest_game/farming/textures/farming_carrot_4.png b/mods/minetest_game/farming/textures/farming_carrot_4.png new file mode 100755 index 0000000..482bbc6 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_carrot_4.png differ diff --git a/mods/minetest_game/farming/textures/farming_corn_seed.png b/mods/minetest_game/farming/textures/farming_corn_seed.png new file mode 100755 index 0000000..93eef4f Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_corn_seed.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton.png b/mods/minetest_game/farming/textures/farming_cotton.png new file mode 100755 index 0000000..40d58d1 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_1.png b/mods/minetest_game/farming/textures/farming_cotton_1.png new file mode 100755 index 0000000..9e75ce9 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_1.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_2.png b/mods/minetest_game/farming/textures/farming_cotton_2.png new file mode 100755 index 0000000..c6dbefe Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_2.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_3.png b/mods/minetest_game/farming/textures/farming_cotton_3.png new file mode 100755 index 0000000..ff24b0b Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_3.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_4.png b/mods/minetest_game/farming/textures/farming_cotton_4.png new file mode 100755 index 0000000..9a998a1 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_4.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_5.png b/mods/minetest_game/farming/textures/farming_cotton_5.png new file mode 100755 index 0000000..3da3c66 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_5.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_6.png b/mods/minetest_game/farming/textures/farming_cotton_6.png new file mode 100755 index 0000000..d85762b Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_6.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_7.png b/mods/minetest_game/farming/textures/farming_cotton_7.png new file mode 100755 index 0000000..cb27e6c Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_7.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_8.png b/mods/minetest_game/farming/textures/farming_cotton_8.png new file mode 100755 index 0000000..cb27e6c Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_8.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_seed.png b/mods/minetest_game/farming/textures/farming_cotton_seed.png new file mode 100755 index 0000000..3551fbd Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_seed.png differ diff --git a/mods/minetest_game/farming/textures/farming_cotton_wild.png b/mods/minetest_game/farming/textures/farming_cotton_wild.png new file mode 100644 index 0000000..aee1c08 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_cotton_wild.png differ diff --git a/mods/minetest_game/farming/textures/farming_desert_sand_soil.png b/mods/minetest_game/farming/textures/farming_desert_sand_soil.png new file mode 100755 index 0000000..d160dfd Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_desert_sand_soil.png differ diff --git a/mods/minetest_game/farming/textures/farming_desert_sand_soil_wet.png b/mods/minetest_game/farming/textures/farming_desert_sand_soil_wet.png new file mode 100755 index 0000000..f1f7592 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_desert_sand_soil_wet.png differ diff --git a/mods/minetest_game/farming/textures/farming_desert_sand_soil_wet_side.png b/mods/minetest_game/farming/textures/farming_desert_sand_soil_wet_side.png new file mode 100755 index 0000000..71547d6 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_desert_sand_soil_wet_side.png differ diff --git a/mods/minetest_game/farming/textures/farming_flour.png b/mods/minetest_game/farming/textures/farming_flour.png new file mode 100755 index 0000000..0cdad91 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_flour.png differ diff --git a/mods/minetest_game/farming/textures/farming_potatoe.png b/mods/minetest_game/farming/textures/farming_potatoe.png new file mode 100755 index 0000000..a23019e Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_potatoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_potatoe_1.png b/mods/minetest_game/farming/textures/farming_potatoe_1.png new file mode 100755 index 0000000..08605d9 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_potatoe_1.png differ diff --git a/mods/minetest_game/farming/textures/farming_potatoe_2.png b/mods/minetest_game/farming/textures/farming_potatoe_2.png new file mode 100755 index 0000000..d477798 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_potatoe_2.png differ diff --git a/mods/minetest_game/farming/textures/farming_potatoe_3.png b/mods/minetest_game/farming/textures/farming_potatoe_3.png new file mode 100755 index 0000000..6bf6a17 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_potatoe_3.png differ diff --git a/mods/minetest_game/farming/textures/farming_pumpkin_face.png b/mods/minetest_game/farming/textures/farming_pumpkin_face.png new file mode 100755 index 0000000..1a61cb3 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_pumpkin_face.png differ diff --git a/mods/minetest_game/farming/textures/farming_pumpkin_face_light.png b/mods/minetest_game/farming/textures/farming_pumpkin_face_light.png new file mode 100755 index 0000000..1750425 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_pumpkin_face_light.png differ diff --git a/mods/minetest_game/farming/textures/farming_pumpkin_seed.png b/mods/minetest_game/farming/textures/farming_pumpkin_seed.png new file mode 100755 index 0000000..4c02d32 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_pumpkin_seed.png differ diff --git a/mods/minetest_game/farming/textures/farming_pumpkin_side.png b/mods/minetest_game/farming/textures/farming_pumpkin_side.png new file mode 100755 index 0000000..3c46a3c Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_pumpkin_side.png differ diff --git a/mods/minetest_game/farming/textures/farming_pumpkin_top.png b/mods/minetest_game/farming/textures/farming_pumpkin_top.png new file mode 100755 index 0000000..2e875f9 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_pumpkin_top.png differ diff --git a/mods/minetest_game/farming/textures/farming_scarecrow_front.png b/mods/minetest_game/farming/textures/farming_scarecrow_front.png new file mode 100755 index 0000000..1a61cb3 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_scarecrow_front.png differ diff --git a/mods/minetest_game/farming/textures/farming_soil.png b/mods/minetest_game/farming/textures/farming_soil.png new file mode 100755 index 0000000..b1d2f54 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_soil.png differ diff --git a/mods/minetest_game/farming/textures/farming_soil_wet.png b/mods/minetest_game/farming/textures/farming_soil_wet.png new file mode 100755 index 0000000..bb2d191 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_soil_wet.png differ diff --git a/mods/minetest_game/farming/textures/farming_soil_wet_side.png b/mods/minetest_game/farming/textures/farming_soil_wet_side.png new file mode 100755 index 0000000..9fdf290 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_soil_wet_side.png differ diff --git a/mods/minetest_game/farming/textures/farming_straw.png b/mods/minetest_game/farming/textures/farming_straw.png new file mode 100755 index 0000000..866d45c Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_straw.png differ diff --git a/mods/minetest_game/farming/textures/farming_strawberry_1.png b/mods/minetest_game/farming/textures/farming_strawberry_1.png new file mode 100755 index 0000000..08605d9 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_strawberry_1.png differ diff --git a/mods/minetest_game/farming/textures/farming_strawberry_2.png b/mods/minetest_game/farming/textures/farming_strawberry_2.png new file mode 100755 index 0000000..ecd80b2 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_strawberry_2.png differ diff --git a/mods/minetest_game/farming/textures/farming_strawberry_3.png b/mods/minetest_game/farming/textures/farming_strawberry_3.png new file mode 100755 index 0000000..aaadf0d Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_strawberry_3.png differ diff --git a/mods/minetest_game/farming/textures/farming_strawberry_4.png b/mods/minetest_game/farming/textures/farming_strawberry_4.png new file mode 100755 index 0000000..86f97d4 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_strawberry_4.png differ diff --git a/mods/minetest_game/farming/textures/farming_string.png b/mods/minetest_game/farming/textures/farming_string.png new file mode 100755 index 0000000..1c7bf4b Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_string.png differ diff --git a/mods/minetest_game/farming/textures/farming_sugar.png b/mods/minetest_game/farming/textures/farming_sugar.png new file mode 100644 index 0000000..7514fd6 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_sugar.png differ diff --git a/mods/minetest_game/farming/textures/farming_tool_bronzehoe.png b/mods/minetest_game/farming/textures/farming_tool_bronzehoe.png new file mode 100755 index 0000000..a229585 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_tool_bronzehoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_tool_diamondhoe.png b/mods/minetest_game/farming/textures/farming_tool_diamondhoe.png new file mode 100755 index 0000000..e40c123 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_tool_diamondhoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_tool_mesehoe.png b/mods/minetest_game/farming/textures/farming_tool_mesehoe.png new file mode 100755 index 0000000..db6a644 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_tool_mesehoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_tool_steelhoe.png b/mods/minetest_game/farming/textures/farming_tool_steelhoe.png new file mode 100755 index 0000000..4a01c7a Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_tool_steelhoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_tool_stonehoe.png b/mods/minetest_game/farming/textures/farming_tool_stonehoe.png new file mode 100755 index 0000000..02f4cd5 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_tool_stonehoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_tool_woodhoe.png b/mods/minetest_game/farming/textures/farming_tool_woodhoe.png new file mode 100755 index 0000000..5499bba Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_tool_woodhoe.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat.png b/mods/minetest_game/farming/textures/farming_wheat.png new file mode 100755 index 0000000..c716a73 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_1.png b/mods/minetest_game/farming/textures/farming_wheat_1.png new file mode 100755 index 0000000..975c7bb Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_1.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_2.png b/mods/minetest_game/farming/textures/farming_wheat_2.png new file mode 100755 index 0000000..4bb74a1 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_2.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_3.png b/mods/minetest_game/farming/textures/farming_wheat_3.png new file mode 100755 index 0000000..3692f15 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_3.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_4.png b/mods/minetest_game/farming/textures/farming_wheat_4.png new file mode 100755 index 0000000..15effde Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_4.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_5.png b/mods/minetest_game/farming/textures/farming_wheat_5.png new file mode 100755 index 0000000..d44ce01 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_5.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_6.png b/mods/minetest_game/farming/textures/farming_wheat_6.png new file mode 100755 index 0000000..8c2d7d3 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_6.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_7.png b/mods/minetest_game/farming/textures/farming_wheat_7.png new file mode 100755 index 0000000..8c2d7d3 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_7.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_8.png b/mods/minetest_game/farming/textures/farming_wheat_8.png new file mode 100755 index 0000000..6632822 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_8.png differ diff --git a/mods/minetest_game/farming/textures/farming_wheat_seed.png b/mods/minetest_game/farming/textures/farming_wheat_seed.png new file mode 100755 index 0000000..fc2ca77 Binary files /dev/null and b/mods/minetest_game/farming/textures/farming_wheat_seed.png differ diff --git a/mods/minetest_game/fire/README.txt b/mods/minetest_game/fire/README.txt new file mode 100644 index 0000000..25ba26e --- /dev/null +++ b/mods/minetest_game/fire/README.txt @@ -0,0 +1,35 @@ +Minetest Game mod: fire +======================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures and sounds) +-------------------------------------- +Everything not listed in here: +Copyright (C) 2012 Perttu Ahola (celeron55) (CC BY-SA 3.0) + +Muadtralk (CC BY-SA 3.0) + fire_basic_flame_animated.png + +Gambit (CC BY-SA 3.0) + fire_flint_steel.png + +dobroide (CC BY 3.0) +http://www.freesound.org/people/dobroide/sounds/4211/ + fire_small.ogg + +Dynamicell (CC BY 3.0) +http://www.freesound.org/people/Dynamicell/sounds/17548/ + fire_large.ogg + fire_fire.*.ogg + +fire_small.ogg and fire_large.ogg are unused but kept temporarily to not break +other mods that may use them. + +Benboncan (CC BY 3.0) +https://www.freesound.org/people/Benboncan/sounds/66457/ + fire_flint_and_steel.ogg diff --git a/mods/minetest_game/fire/init.lua b/mods/minetest_game/fire/init.lua new file mode 100644 index 0000000..621e00e --- /dev/null +++ b/mods/minetest_game/fire/init.lua @@ -0,0 +1,307 @@ +-- fire/init.lua + +-- Global namespace for functions +fire = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("fire") + +-- 'Enable fire' setting +local fire_enabled = minetest.settings:get_bool("enable_fire") +if fire_enabled == nil then + -- enable_fire setting not specified, check for disable_fire + local fire_disabled = minetest.settings:get_bool("disable_fire") + if fire_disabled == nil then + -- Neither setting specified, check whether singleplayer + fire_enabled = minetest.is_singleplayer() + else + fire_enabled = not fire_disabled + end +end + +-- +-- Items +-- + +-- Flood flame function +local function flood_flame(pos, _, newnode) + -- Play flame extinguish sound if liquid is not an 'igniter' + if minetest.get_item_group(newnode.name, "igniter") == 0 then + minetest.sound_play("fire_extinguish_flame", + {pos = pos, max_hear_distance = 16, gain = 0.15}, true) + end + -- Remove the flame + return false +end + +-- Flame nodes +local fire_node = { + drawtype = "firelike", + tiles = {{ + name = "fire_basic_flame_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1 + }} + }, + inventory_image = "fire_basic_flame.png", + paramtype = "light", + light_source = 13, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + floodable = true, + damage_per_second = 4, + groups = {igniter = 2, dig_immediate = 3, fire = 1}, + drop = "", + on_flood = flood_flame +} + +-- Basic flame node +local flame_fire_node = table.copy(fire_node) +flame_fire_node.description = S("Fire") +flame_fire_node.groups.not_in_creative_inventory = 1 +flame_fire_node.on_timer = function(pos) + if not minetest.find_node_near(pos, 1, {"group:flammable"}) then + minetest.remove_node(pos) + return + end + -- Restart timer + return true +end +flame_fire_node.on_construct = function(pos) + minetest.get_node_timer(pos):start(math.random(30, 60)) +end + +minetest.register_node("fire:basic_flame", flame_fire_node) + +-- Permanent flame node +local permanent_fire_node = table.copy(fire_node) +permanent_fire_node.description = S("Permanent Fire") + +minetest.register_node("fire:permanent_flame", permanent_fire_node) + +-- Flint and Steel +minetest.register_tool("fire:flint_and_steel", { + description = S("Flint and Steel"), + inventory_image = "fire_flint_steel.png", + sound = {breaks = "default_tool_breaks"}, + + on_use = function(itemstack, user, pointed_thing) + local sound_pos = pointed_thing.above or user:get_pos() + minetest.sound_play("fire_flint_and_steel", + {pos = sound_pos, gain = 0.5, max_hear_distance = 8}, true) + local player_name = user:get_player_name() + if pointed_thing.type == "node" then + local node_under = minetest.get_node(pointed_thing.under).name + local nodedef = minetest.registered_nodes[node_under] + if not nodedef then + return + end + if minetest.is_protected(pointed_thing.under, player_name) then + minetest.chat_send_player(player_name, "This area is protected") + return + end + if nodedef.on_ignite then + nodedef.on_ignite(pointed_thing.under, user) + elseif minetest.get_item_group(node_under, "flammable") >= 1 + and minetest.get_node(pointed_thing.above).name == "air" then + minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"}) + end + end + if not minetest.is_creative_enabled(player_name) then + -- Wear tool + local wdef = itemstack:get_definition() + itemstack:add_wear(1000) + + -- Tool break sound + if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then + minetest.sound_play(wdef.sound.breaks, + {pos = sound_pos, gain = 0.5}, true) + end + return itemstack + end + end +}) + +minetest.register_craft({ + output = "fire:flint_and_steel", + recipe = { + {"default:flint", "default:steel_ingot"} + } +}) + +-- Override coalblock to enable permanent flame above +-- Coalblock is non-flammable to avoid unwanted basic_flame nodes +minetest.override_item("default:coalblock", { + after_destruct = function(pos) + pos.y = pos.y + 1 + if minetest.get_node(pos).name == "fire:permanent_flame" then + minetest.remove_node(pos) + end + end, + on_ignite = function(pos) + local flame_pos = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.get_node(flame_pos).name == "air" then + minetest.set_node(flame_pos, {name = "fire:permanent_flame"}) + end + end +}) + + +-- +-- Sound +-- + +-- Enable if no setting present +local flame_sound = minetest.settings:get_bool("flame_sound", true) + +if flame_sound then + local handles = {} + local timer = 0 + + -- Parameters + local radius = 8 -- Flame node search radius around player + local cycle = 3 -- Cycle time for sound updates + + -- Update sound for player + function fire.update_player_sound(player) + local player_name = player:get_player_name() + -- Search for flame nodes in radius around player + local ppos = player:get_pos() + local areamin = vector.subtract(ppos, radius) + local areamax = vector.add(ppos, radius) + local fpos, num = minetest.find_nodes_in_area( + areamin, + areamax, + {"fire:basic_flame", "fire:permanent_flame"} + ) + -- Total number of flames in radius + local flames = (num["fire:basic_flame"] or 0) + + (num["fire:permanent_flame"] or 0) + -- Stop previous sound + if handles[player_name] then + minetest.sound_stop(handles[player_name]) + handles[player_name] = nil + end + -- If flames + if flames > 0 then + -- Find centre of flame positions + local fposmid = fpos[1] + -- If more than 1 flame + if #fpos > 1 then + local fposmin = areamax + local fposmax = areamin + for i = 1, #fpos do + local fposi = fpos[i] + if fposi.x > fposmax.x then + fposmax.x = fposi.x + end + if fposi.y > fposmax.y then + fposmax.y = fposi.y + end + if fposi.z > fposmax.z then + fposmax.z = fposi.z + end + if fposi.x < fposmin.x then + fposmin.x = fposi.x + end + if fposi.y < fposmin.y then + fposmin.y = fposi.y + end + if fposi.z < fposmin.z then + fposmin.z = fposi.z + end + end + fposmid = vector.divide(vector.add(fposmin, fposmax), 2) + end + -- Play sound + local handle = minetest.sound_play("fire_fire", { + pos = fposmid, + to_player = player_name, + gain = math.min(0.06 * (1 + flames * 0.125), 0.18), + max_hear_distance = 32, + loop = true -- In case of lag + }) + -- Store sound handle for this player + if handle then + handles[player_name] = handle + end + end + end + + -- Cycle for updating players sounds + minetest.register_globalstep(function(dtime) + timer = timer + dtime + if timer < cycle then + return + end + + timer = 0 + local players = minetest.get_connected_players() + for n = 1, #players do + fire.update_player_sound(players[n]) + end + end) + + -- Stop sound and clear handle on player leave + minetest.register_on_leaveplayer(function(player) + local player_name = player:get_player_name() + if handles[player_name] then + minetest.sound_stop(handles[player_name]) + handles[player_name] = nil + end + end) +end + + +-- Deprecated function kept temporarily to avoid crashes if mod fire nodes call it +function fire.update_sounds_around() end + +-- +-- ABMs +-- + +if fire_enabled then + -- Ignite neighboring nodes, add basic flames + minetest.register_abm({ + label = "Ignite flame", + nodenames = {"group:flammable"}, + neighbors = {"group:igniter"}, + interval = 7, + chance = 12, + catch_up = false, + action = function(pos) + local p = minetest.find_node_near(pos, 1, {"air"}) + if p then + minetest.set_node(p, {name = "fire:basic_flame"}) + end + end + }) + + -- Remove flammable nodes around basic flame + minetest.register_abm({ + label = "Remove flammable nodes", + nodenames = {"fire:basic_flame"}, + neighbors = "group:flammable", + interval = 5, + chance = 18, + catch_up = false, + action = function(pos) + local p = minetest.find_node_near(pos, 1, {"group:flammable"}) + if not p then + return + end + local flammable_node = minetest.get_node(p) + local def = minetest.registered_nodes[flammable_node.name] + if def.on_burn then + def.on_burn(p) + else + minetest.remove_node(p) + minetest.check_for_falling(p) + end + end + }) +end diff --git a/mods/minetest_game/fire/license.txt b/mods/minetest_game/fire/license.txt new file mode 100644 index 0000000..43f9cd7 --- /dev/null +++ b/mods/minetest_game/fire/license.txt @@ -0,0 +1,84 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2012-2016 celeron55, Perttu Ahola +Copyright (C) 2012-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures and sounds) +--------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Muadtralk +Copyright (C) 2013-2016 Gambit + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) +Copyright (C) 2005 dobroide +Copyright (C) 2006 Dynamicell +Copyright (C) 2009 Benboncan + +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. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ diff --git a/mods/minetest_game/fire/locale/fire.de.tr b/mods/minetest_game/fire/locale/fire.de.tr new file mode 100644 index 0000000..dad7c34 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.de.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Feuer +Permanent Fire=Permanentes Feuer +Flint and Steel=Feuerstein und Stahl diff --git a/mods/minetest_game/fire/locale/fire.eo.tr b/mods/minetest_game/fire/locale/fire.eo.tr new file mode 100644 index 0000000..2fc0679 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.eo.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Fajro +Permanent Fire=Ĉiama Fajro +Flint and Steel=Siliko kaj Ŝtalo diff --git a/mods/minetest_game/fire/locale/fire.es.tr b/mods/minetest_game/fire/locale/fire.es.tr new file mode 100644 index 0000000..4ce3f32 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.es.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Fuego +Permanent Fire=Fuego permanente +Flint and Steel=Yesca y pedernal diff --git a/mods/minetest_game/fire/locale/fire.fr.tr b/mods/minetest_game/fire/locale/fire.fr.tr new file mode 100644 index 0000000..a16b471 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.fr.tr @@ -0,0 +1,10 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel=Briquet à silex en acier + + +##### not used anymore ##### + +# textdomain: fire +Permanent Flame=Flamme permanente diff --git a/mods/minetest_game/fire/locale/fire.id.tr b/mods/minetest_game/fire/locale/fire.id.tr new file mode 100644 index 0000000..a6d2da5 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.id.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Api +Permanent Fire=Api Abadi +Flint and Steel=Pemantik Api diff --git a/mods/minetest_game/fire/locale/fire.it.tr b/mods/minetest_game/fire/locale/fire.it.tr new file mode 100644 index 0000000..61eae45 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.it.tr @@ -0,0 +1,10 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel=Acciarino + + +##### not used anymore ##### + +# textdomain: fire +Permanent Flame=Fiamma permanente diff --git a/mods/minetest_game/fire/locale/fire.jbo.tr b/mods/minetest_game/fire/locale/fire.jbo.tr new file mode 100644 index 0000000..b081236 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.jbo.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=lo fagri +Permanent Fire=lo vitno fagri +Flint and Steel=lo fakro'i jo'u gasta diff --git a/mods/minetest_game/fire/locale/fire.ms.tr b/mods/minetest_game/fire/locale/fire.ms.tr new file mode 100644 index 0000000..fdd20a5 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.ms.tr @@ -0,0 +1,10 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel=Pemetik Api + + +##### not used anymore ##### + +# textdomain: fire +Permanent Flame=Api Abadi diff --git a/mods/minetest_game/fire/locale/fire.pt_BR.tr b/mods/minetest_game/fire/locale/fire.pt_BR.tr new file mode 100644 index 0000000..8a37359 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.pt_BR.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Fogo +Permanent Fire=Fogo Permanente +Flint and Steel=Sílex e Fogo diff --git a/mods/minetest_game/fire/locale/fire.ru.tr b/mods/minetest_game/fire/locale/fire.ru.tr new file mode 100644 index 0000000..d2cb81f --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.ru.tr @@ -0,0 +1,10 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel=Огниво + + +##### not used anymore ##### + +# textdomain: fire +Permanent Flame=Вечный Огонь diff --git a/mods/minetest_game/fire/locale/fire.se.tr b/mods/minetest_game/fire/locale/fire.se.tr new file mode 100644 index 0000000..9a51aed --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.se.tr @@ -0,0 +1,10 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel=Flinta och Stål + + +##### not used anymore ##### + +# textdomain: fire +Permanent Flame=Permanent Eld diff --git a/mods/minetest_game/fire/locale/fire.sk.tr b/mods/minetest_game/fire/locale/fire.sk.tr new file mode 100644 index 0000000..125c860 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.sk.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=Oheň +Permanent Fire=Stály oheň +Flint and Steel=Pazúrik a ocieľka diff --git a/mods/minetest_game/fire/locale/fire.zh_CN.tr b/mods/minetest_game/fire/locale/fire.zh_CN.tr new file mode 100644 index 0000000..052089a --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=火焰 +Permanent Fire=永久火焰 +Flint and Steel=火石和钢 diff --git a/mods/minetest_game/fire/locale/fire.zh_TW.tr b/mods/minetest_game/fire/locale/fire.zh_TW.tr new file mode 100644 index 0000000..9e3d766 --- /dev/null +++ b/mods/minetest_game/fire/locale/fire.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: fire +Fire=火焰 +Permanent Fire=永久火焰 +Flint and Steel=火石和鋼 diff --git a/mods/minetest_game/fire/locale/template.txt b/mods/minetest_game/fire/locale/template.txt new file mode 100644 index 0000000..e4e44e7 --- /dev/null +++ b/mods/minetest_game/fire/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: fire +Fire= +Permanent Fire= +Flint and Steel= diff --git a/mods/minetest_game/fire/mod.conf b/mods/minetest_game/fire/mod.conf new file mode 100644 index 0000000..c70f23b --- /dev/null +++ b/mods/minetest_game/fire/mod.conf @@ -0,0 +1,3 @@ +name = fire +description = Minetest Game mod: fire +depends = default diff --git a/mods/minetest_game/fire/sounds/fire_extinguish_flame.1.ogg b/mods/minetest_game/fire/sounds/fire_extinguish_flame.1.ogg new file mode 100644 index 0000000..42506dd Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_extinguish_flame.1.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_extinguish_flame.2.ogg b/mods/minetest_game/fire/sounds/fire_extinguish_flame.2.ogg new file mode 100644 index 0000000..2747ab8 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_extinguish_flame.2.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_extinguish_flame.3.ogg b/mods/minetest_game/fire/sounds/fire_extinguish_flame.3.ogg new file mode 100644 index 0000000..8baeac3 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_extinguish_flame.3.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_fire.1.ogg b/mods/minetest_game/fire/sounds/fire_fire.1.ogg new file mode 100644 index 0000000..cbfee4c Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_fire.1.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_fire.2.ogg b/mods/minetest_game/fire/sounds/fire_fire.2.ogg new file mode 100644 index 0000000..e8d0eb1 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_fire.2.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_fire.3.ogg b/mods/minetest_game/fire/sounds/fire_fire.3.ogg new file mode 100644 index 0000000..5cad3d9 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_fire.3.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_flint_and_steel.ogg b/mods/minetest_game/fire/sounds/fire_flint_and_steel.ogg new file mode 100644 index 0000000..6996e16 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_flint_and_steel.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_large.ogg b/mods/minetest_game/fire/sounds/fire_large.ogg new file mode 100644 index 0000000..fe78e62 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_large.ogg differ diff --git a/mods/minetest_game/fire/sounds/fire_small.ogg b/mods/minetest_game/fire/sounds/fire_small.ogg new file mode 100644 index 0000000..5aac595 Binary files /dev/null and b/mods/minetest_game/fire/sounds/fire_small.ogg differ diff --git a/mods/minetest_game/fire/textures/fire_basic_flame.png b/mods/minetest_game/fire/textures/fire_basic_flame.png new file mode 100755 index 0000000..86dc4eb Binary files /dev/null and b/mods/minetest_game/fire/textures/fire_basic_flame.png differ diff --git a/mods/minetest_game/fire/textures/fire_basic_flame_animated.png b/mods/minetest_game/fire/textures/fire_basic_flame_animated.png new file mode 100755 index 0000000..83be03b Binary files /dev/null and b/mods/minetest_game/fire/textures/fire_basic_flame_animated.png differ diff --git a/mods/minetest_game/fire/textures/fire_flint_steel.png b/mods/minetest_game/fire/textures/fire_flint_steel.png new file mode 100755 index 0000000..0da807c Binary files /dev/null and b/mods/minetest_game/fire/textures/fire_flint_steel.png differ diff --git a/mods/minetest_game/fireflies/README.txt b/mods/minetest_game/fireflies/README.txt new file mode 100644 index 0000000..7382578 --- /dev/null +++ b/mods/minetest_game/fireflies/README.txt @@ -0,0 +1,22 @@ +Minetest Game mod: fireflies +============================ +Adds fireflies to the world on mapgen, which can then be caught in a net and placed in +bottles to provide light. + +Authors of source code +---------------------- +Shara RedCat (MIT) + +Authors of media (textures) +--------------------------- +Shara RedCat (CC BY-SA 3.0): + fireflies_firefly.png + fireflies_firefly_animated.png + fireflies_bugnet.png + fireflies_bottle.png + fireflies_bottle_animated.png + +fireflies_bugnet.png is modified from a texture by tenplus1 (CC0) + +fireflies_bottle.png and fireflies_bottle_animated.png are +modified from a texture by Vanessa Ezekowitz (CC BY-SA 3.0) \ No newline at end of file diff --git a/mods/minetest_game/fireflies/init.lua b/mods/minetest_game/fireflies/init.lua new file mode 100644 index 0000000..59a40c5 --- /dev/null +++ b/mods/minetest_game/fireflies/init.lua @@ -0,0 +1,291 @@ +-- firefly/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("fireflies") + + +minetest.register_node("fireflies:firefly", { + description = S("Firefly"), + drawtype = "plantlike", + tiles = {{ + name = "fireflies_firefly_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + inventory_image = "fireflies_firefly.png", + wield_image = "fireflies_firefly.png", + waving = 1, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + walkable = false, + groups = {catchable = 1}, + selection_box = { + type = "fixed", + fixed = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + }, + light_source = 6, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "fireflies:firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) > 11 then + minetest.set_node(pos, {name = "fireflies:hidden_firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + +minetest.register_node("fireflies:hidden_firefly", { + description = S("Hidden Firefly"), + drawtype = "airlike", + inventory_image = "fireflies_firefly.png^default_invisible_node_overlay.png", + wield_image = "fireflies_firefly.png^default_invisible_node_overlay.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + drop = "", + groups = {not_in_creative_inventory = 1}, + floodable = true, + on_place = function(itemstack, placer, pointed_thing) + local player_name = placer:get_player_name() + local pos = pointed_thing.above + + if not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pointed_thing.under, player_name) and + minetest.get_node(pos).name == "air" then + minetest.set_node(pos, {name = "fireflies:hidden_firefly"}) + minetest.get_node_timer(pos):start(1) + itemstack:take_item() + end + return itemstack + end, + on_timer = function(pos, elapsed) + if minetest.get_node_light(pos) <= 11 then + minetest.set_node(pos, {name = "fireflies:firefly"}) + end + minetest.get_node_timer(pos):start(30) + end +}) + + +-- bug net +minetest.register_tool("fireflies:bug_net", { + description = S("Bug Net"), + inventory_image = "fireflies_bugnet.png", + on_use = function(itemstack, player, pointed_thing) + local player_name = player and player:get_player_name() or "" + if not pointed_thing or pointed_thing.type ~= "node" or + minetest.is_protected(pointed_thing.under, player_name) then + return + end + local node_name = minetest.get_node(pointed_thing.under).name + local inv = player:get_inventory() + if minetest.get_item_group(node_name, "catchable") == 1 then + minetest.set_node(pointed_thing.under, {name = "air"}) + local stack = ItemStack(node_name.." 1") + local leftover = inv:add_item("main", stack) + if leftover:get_count() > 0 then + minetest.add_item(pointed_thing.under, node_name.." 1") + end + end + if not minetest.is_creative_enabled(player_name) then + itemstack:add_wear(256) + return itemstack + end + end +}) + +minetest.register_craft( { + output = "fireflies:bug_net", + recipe = { + {"farming:string", "farming:string"}, + {"farming:string", "farming:string"}, + {"group:stick", ""} + } +}) + + +-- firefly in a bottle +minetest.register_node("fireflies:firefly_bottle", { + description = S("Firefly in a Bottle"), + inventory_image = "fireflies_bottle.png", + wield_image = "fireflies_bottle.png", + tiles = {{ + name = "fireflies_bottle_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1.5 + }, + }}, + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + light_source = 9, + walkable = false, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + sounds = default.node_sound_glass_defaults(), + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + local lower_pos = {x = pos.x, y = pos.y + 1, z = pos.z} + if minetest.is_protected(pos, player:get_player_name()) or + minetest.get_node(lower_pos).name ~= "air" then + return + end + + local upper_pos = {x = pos.x, y = pos.y + 2, z = pos.z} + local firefly_pos + + if not minetest.is_protected(upper_pos, player:get_player_name()) and + minetest.get_node(upper_pos).name == "air" then + firefly_pos = upper_pos + elseif not minetest.is_protected(lower_pos, player:get_player_name()) then + firefly_pos = lower_pos + end + + if firefly_pos then + minetest.set_node(pos, {name = "vessels:glass_bottle"}) + minetest.set_node(firefly_pos, {name = "fireflies:firefly"}) + minetest.get_node_timer(firefly_pos):start(1) + end + end +}) + +minetest.register_craft( { + output = "fireflies:firefly_bottle", + recipe = { + {"fireflies:firefly"}, + {"vessels:glass_bottle"} + } +}) + + +-- register fireflies as decorations + +if minetest.get_mapgen_setting("mg_name") == "v6" then + + minetest.register_decoration({ + name = "fireflies:firefly_low", + deco_type = "simple", + place_on = "default:dirt_with_grass", + place_offset_y = 2, + sidelen = 80, + fill_ratio = 0.0002, + y_max = 31000, + y_min = 1, + decoration = "fireflies:hidden_firefly", + }) + + minetest.register_decoration({ + name = "fireflies:firefly_high", + deco_type = "simple", + place_on = "default:dirt_with_grass", + place_offset_y = 3, + sidelen = 80, + fill_ratio = 0.0002, + y_max = 31000, + y_min = 1, + decoration = "fireflies:hidden_firefly", + }) + +else + + minetest.register_decoration({ + name = "fireflies:firefly_low", + deco_type = "simple", + place_on = { + "default:dirt_with_grass", + "default:dirt_with_coniferous_litter", + "default:dirt_with_rainforest_litter", + "default:dirt" + }, + place_offset_y = 2, + sidelen = 80, + fill_ratio = 0.0005, + biomes = { + "deciduous_forest", + "coniferous_forest", + "rainforest", + "rainforest_swamp" + }, + y_max = 31000, + y_min = -1, + decoration = "fireflies:hidden_firefly", + }) + + minetest.register_decoration({ + name = "fireflies:firefly_high", + deco_type = "simple", + place_on = { + "default:dirt_with_grass", + "default:dirt_with_coniferous_litter", + "default:dirt_with_rainforest_litter", + "default:dirt" + }, + place_offset_y = 3, + sidelen = 80, + fill_ratio = 0.0005, + biomes = { + "deciduous_forest", + "coniferous_forest", + "rainforest", + "rainforest_swamp" + }, + y_max = 31000, + y_min = -1, + decoration = "fireflies:hidden_firefly", + }) + +end + + +-- get decoration IDs +local firefly_low = minetest.get_decoration_id("fireflies:firefly_low") +local firefly_high = minetest.get_decoration_id("fireflies:firefly_high") + +minetest.set_gen_notify({decoration = true}, {firefly_low, firefly_high}) + +-- start nodetimers +minetest.register_on_generated(function(minp, maxp, blockseed) + local gennotify = minetest.get_mapgen_object("gennotify") + local poslist = {} + + for _, pos in ipairs(gennotify["decoration#"..firefly_low] or {}) do + local firefly_low_pos = {x = pos.x, y = pos.y + 3, z = pos.z} + table.insert(poslist, firefly_low_pos) + end + for _, pos in ipairs(gennotify["decoration#"..firefly_high] or {}) do + local firefly_high_pos = {x = pos.x, y = pos.y + 4, z = pos.z} + table.insert(poslist, firefly_high_pos) + end + + if #poslist ~= 0 then + for i = 1, #poslist do + local pos = poslist[i] + minetest.get_node_timer(pos):start(1) + end + end +end) diff --git a/mods/minetest_game/fireflies/license.txt b/mods/minetest_game/fireflies/license.txt new file mode 100644 index 0000000..eebdad6 --- /dev/null +++ b/mods/minetest_game/fireflies/license.txt @@ -0,0 +1,58 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (c) 2018 Shara RedCat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2018 Shara RedCat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ \ No newline at end of file diff --git a/mods/minetest_game/fireflies/locale/fireflies.de.tr b/mods/minetest_game/fireflies/locale/fireflies.de.tr new file mode 100644 index 0000000..c5d116a --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.de.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Glühwürmchen +Hidden Firefly=Verborgenes Glühwürmchen +Bug Net=Insektennetz +Firefly in a Bottle=Glühwürmchen in einer Flasche diff --git a/mods/minetest_game/fireflies/locale/fireflies.eo.tr b/mods/minetest_game/fireflies/locale/fireflies.eo.tr new file mode 100644 index 0000000..7145cf9 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.eo.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Fulgoro +Hidden Firefly=Kaŝita Fulgoro +Bug Net=Cima Reto +Firefly in a Bottle=Fulgoro en Botelo diff --git a/mods/minetest_game/fireflies/locale/fireflies.es.tr b/mods/minetest_game/fireflies/locale/fireflies.es.tr new file mode 100644 index 0000000..95d053e --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.es.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Luciérnaga +Hidden Firefly=Luciérnaga oculta +Bug Net=Red de insectos +Firefly in a Bottle=Luciérnaga en botella diff --git a/mods/minetest_game/fireflies/locale/fireflies.fr.tr b/mods/minetest_game/fireflies/locale/fireflies.fr.tr new file mode 100644 index 0000000..3deda66 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.fr.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Luciole +Hidden Firefly=Luciole cachée +Bug Net=Filet à papillon +Firefly in a Bottle=Luciole en bouteille diff --git a/mods/minetest_game/fireflies/locale/fireflies.id.tr b/mods/minetest_game/fireflies/locale/fireflies.id.tr new file mode 100644 index 0000000..bc6434e --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.id.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Kunang-Kunang +Hidden Firefly=Kunang-Kunang Tersembunyi +Bug Net=Jaring Serangga +Firefly in a Bottle=Kunang-Kunang dalam Botol diff --git a/mods/minetest_game/fireflies/locale/fireflies.it.tr b/mods/minetest_game/fireflies/locale/fireflies.it.tr new file mode 100644 index 0000000..22ad57b --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.it.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Lucciola +Hidden Firefly=Lucciola nascosta +Bug Net=Retino +Firefly in a Bottle=Lucciola imbottigliata diff --git a/mods/minetest_game/fireflies/locale/fireflies.jbo.tr b/mods/minetest_game/fireflies/locale/fireflies.jbo.tr new file mode 100644 index 0000000..4e69ab4 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.jbo.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=lo gusycinki +Hidden Firefly=lo se mipri gusycinki +Bug Net=lo cinki julne +Firefly in a Bottle=lo gusycinki poi nenri lo botpi diff --git a/mods/minetest_game/fireflies/locale/fireflies.ms.tr b/mods/minetest_game/fireflies/locale/fireflies.ms.tr new file mode 100644 index 0000000..509d03d --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.ms.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Kelip-Kelip +Hidden Firefly=Kelip-Kelip Tersembunyi +Bug Net=Jaring Pepijat +Firefly in a Bottle=Kelip-Kelip dalam Botol diff --git a/mods/minetest_game/fireflies/locale/fireflies.pt_BR.tr b/mods/minetest_game/fireflies/locale/fireflies.pt_BR.tr new file mode 100644 index 0000000..543c00b --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.pt_BR.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Vaga-lume +Hidden Firefly=Vaga-lume escondido +Bug Net=Rede de Insetos +Firefly in a Bottle=Vaga-lume em uma garrafa diff --git a/mods/minetest_game/fireflies/locale/fireflies.ru.tr b/mods/minetest_game/fireflies/locale/fireflies.ru.tr new file mode 100644 index 0000000..c05f288 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.ru.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Светлячок +Hidden Firefly=Притаившийся Светлячок +Bug Net=Сачок Для Ловли Насекомых +Firefly in a Bottle=Светлячок в Бутылке diff --git a/mods/minetest_game/fireflies/locale/fireflies.se.tr b/mods/minetest_game/fireflies/locale/fireflies.se.tr new file mode 100644 index 0000000..ebd0cf9 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.se.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Eldfluga +Hidden Firefly=Gömd Eldfluga +Bug Net=Buggernät +Firefly in a Bottle=Eldfluga i en flaska diff --git a/mods/minetest_game/fireflies/locale/fireflies.sk.tr b/mods/minetest_game/fireflies/locale/fireflies.sk.tr new file mode 100644 index 0000000..b68674d --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.sk.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=Svetluška +Hidden Firefly=Skrytá svetluška +Bug Net=Sieťka na hmyz +Firefly in a Bottle=Svetluška vo fľaši diff --git a/mods/minetest_game/fireflies/locale/fireflies.zh_CN.tr b/mods/minetest_game/fireflies/locale/fireflies.zh_CN.tr new file mode 100644 index 0000000..5971785 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.zh_CN.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=萤火虫 +Hidden Firefly=隐藏的萤火虫 +Bug Net=虫网 +Firefly in a Bottle=放在瓶子里的萤火虫 diff --git a/mods/minetest_game/fireflies/locale/fireflies.zh_TW.tr b/mods/minetest_game/fireflies/locale/fireflies.zh_TW.tr new file mode 100644 index 0000000..af754a9 --- /dev/null +++ b/mods/minetest_game/fireflies/locale/fireflies.zh_TW.tr @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly=螢火蟲 +Hidden Firefly=隱藏的螢火蟲 +Bug Net=蟲網 +Firefly in a Bottle=放在瓶子裡的螢火蟲 diff --git a/mods/minetest_game/fireflies/locale/template.txt b/mods/minetest_game/fireflies/locale/template.txt new file mode 100644 index 0000000..91aa8ff --- /dev/null +++ b/mods/minetest_game/fireflies/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: fireflies +Firefly= +Hidden Firefly= +Bug Net= +Firefly in a Bottle= diff --git a/mods/minetest_game/fireflies/mod.conf b/mods/minetest_game/fireflies/mod.conf new file mode 100644 index 0000000..a533588 --- /dev/null +++ b/mods/minetest_game/fireflies/mod.conf @@ -0,0 +1,3 @@ +name = fireflies +description = Minetest Game mod: fireflies +depends = default, vessels diff --git a/mods/minetest_game/fireflies/textures/fireflies_bottle.png b/mods/minetest_game/fireflies/textures/fireflies_bottle.png new file mode 100644 index 0000000..ecca036 Binary files /dev/null and b/mods/minetest_game/fireflies/textures/fireflies_bottle.png differ diff --git a/mods/minetest_game/fireflies/textures/fireflies_bottle_animated.png b/mods/minetest_game/fireflies/textures/fireflies_bottle_animated.png new file mode 100644 index 0000000..294ff97 Binary files /dev/null and b/mods/minetest_game/fireflies/textures/fireflies_bottle_animated.png differ diff --git a/mods/minetest_game/fireflies/textures/fireflies_bugnet.png b/mods/minetest_game/fireflies/textures/fireflies_bugnet.png new file mode 100644 index 0000000..8ec3d33 Binary files /dev/null and b/mods/minetest_game/fireflies/textures/fireflies_bugnet.png differ diff --git a/mods/minetest_game/fireflies/textures/fireflies_firefly.png b/mods/minetest_game/fireflies/textures/fireflies_firefly.png new file mode 100644 index 0000000..c086689 Binary files /dev/null and b/mods/minetest_game/fireflies/textures/fireflies_firefly.png differ diff --git a/mods/minetest_game/fireflies/textures/fireflies_firefly_animated.png b/mods/minetest_game/fireflies/textures/fireflies_firefly_animated.png new file mode 100644 index 0000000..e6932e3 Binary files /dev/null and b/mods/minetest_game/fireflies/textures/fireflies_firefly_animated.png differ diff --git a/mods/minetest_game/flowers/README.txt b/mods/minetest_game/flowers/README.txt new file mode 100644 index 0000000..4b3149c --- /dev/null +++ b/mods/minetest_game/flowers/README.txt @@ -0,0 +1,30 @@ +Minetest Game mod: flowers +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Ironzorg (MIT) and VanessaE (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +RHRhino (CC BY-SA 3.0): + flowers_dandelion_white.png + flowers_geranium.png + flowers_rose.png + flowers_tulip.png + flowers_viola.png + +Gambit (CC BY-SA 3.0): + flowers_mushroom_brown.png + flowers_mushroom_red.png + flowers_waterlily.png + +yyt16384 (CC BY-SA 3.0): + flowers_waterlily_bottom.png -- Derived from Gambit's texture + +paramat (CC BY-SA 3.0): + flowers_dandelion_yellow.png -- Derived from RHRhino's texture + flowers_tulip_black.png -- Derived from RHRhino's texture + flowers_chrysanthemum_green.png diff --git a/mods/minetest_game/flowers/init.lua b/mods/minetest_game/flowers/init.lua new file mode 100644 index 0000000..bf572c5 --- /dev/null +++ b/mods/minetest_game/flowers/init.lua @@ -0,0 +1,513 @@ +-- flowers/init.lua + +-- Minetest 0.4 mod: default +-- See README.txt for licensing and other information. + + +-- Namespace for functions + +flowers = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("flowers") + + +-- Map Generation + +dofile(minetest.get_modpath("flowers") .. "/mapgen.lua") + + +-- +-- Flowers +-- + +-- Aliases for original flowers mod + +minetest.register_alias("flowers:flower_rose", "flowers:rose") +minetest.register_alias("flowers:flower_tulip", "flowers:tulip") +minetest.register_alias("flowers:flower_dandelion_yellow", "flowers:dandelion_yellow") +minetest.register_alias("flowers:flower_geranium", "flowers:geranium") +minetest.register_alias("flowers:flower_viola", "flowers:viola") +minetest.register_alias("flowers:flower_dandelion_white", "flowers:dandelion_white") + + +-- Flower registration + +local function add_simple_flower(name, desc, box, f_groups, inv_img) + -- Common flowers' groups + f_groups.snappy = 3 + f_groups.flower = 1 + f_groups.flora = 1 + f_groups.attached_node = 1 + + local inventory_image = "flowers_" .. name + if inv_img then + inventory_image = inventory_image .. "_inv" + end + + minetest.register_node("flowers:" .. name, { + description = desc, + drawtype = "plantlike", + waving = 1, + tiles = {"flowers_" .. name .. ".png"}, + inventory_image = inventory_image .. ".png", + wield_image = "flowers_" .. name .. ".png", + sunlight_propagates = true, + paramtype = "light", + walkable = false, + buildable_to = true, + groups = f_groups, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = box + } + }) +end + +flowers.datas = { + { + "rose", + S("Red Rose"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 5 / 16, 2 / 16}, + {color_red = 1, flammable = 1}, + true + }, + { + "tulip", + S("Orange Tulip"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_orange = 1, flammable = 1} + }, + { + "dandelion_yellow", + S("Yellow Dandelion"), + {-4 / 16, -0.5, -4 / 16, 4 / 16, -2 / 16, 4 / 16}, + {color_yellow = 1, flammable = 1} + }, + { + "chrysanthemum_green", + S("Green Chrysanthemum"), + {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + {color_green = 1, flammable = 1} + }, + { + "geranium", + S("Blue Geranium"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 2 / 16, 2 / 16}, + {color_blue = 1, flammable = 1} + }, + { + "viola", + S("Viola"), + {-5 / 16, -0.5, -5 / 16, 5 / 16, -1 / 16, 5 / 16}, + {color_violet = 1, flammable = 1} + }, + { + "dandelion_white", + S("White Dandelion"), + {-5 / 16, -0.5, -5 / 16, 5 / 16, -2 / 16, 5 / 16}, + {color_white = 1, flammable = 1} + }, + { + "tulip_black", + S("Black Tulip"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_black = 1, flammable = 1} + }, + { + "calla", + S("Calla"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_white = 1, flammable = 1} + }, + { + "gerbera_daisy", + S("Gerbera Daisy"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_orange = 1, flammable = 1} + }, + { + "yellow_bell", + S("Campanilla Amarilla"), + {-2 / 16, -0.5, -2 / 16, 2 / 16, 3 / 16, 2 / 16}, + {color_yellow = 1, flammable = 1} + }, + { + "calendula", + S("Pink Calendula"), + {-5 / 16, -0.5, -5 / 16, 5 / 16, -2 / 16, 5 / 16}, + {color_pink = 1, flammable = 1} + }, +} + +for _,item in pairs(flowers.datas) do + add_simple_flower(unpack(item)) +end + + +-- Flower spread +-- Public function to enable override by mods + +function flowers.flower_spread(pos, node) + pos.y = pos.y - 1 + local under = minetest.get_node(pos) + pos.y = pos.y + 1 + -- Replace flora with dry shrub in desert sand and silver sand, + -- as this is the only way to generate them. + -- However, preserve grasses in sand dune biomes. + if minetest.get_item_group(under.name, "sand") == 1 and + under.name ~= "default:sand" then + minetest.set_node(pos, {name = "default:dry_shrub"}) + return + end + + if minetest.get_item_group(under.name, "soil") == 0 then + return + end + + local light = minetest.get_node_light(pos) + if not light or light < 13 then + return + end + + local pos0 = vector.subtract(pos, 4) + local pos1 = vector.add(pos, 4) + -- Testing shows that a threshold of 3 results in an appropriate maximum + -- density of approximately 7 flora per 9x9 area. + if #minetest.find_nodes_in_area(pos0, pos1, "group:flora") > 3 then + return + end + + local soils = minetest.find_nodes_in_area_under_air( + pos0, pos1, "group:soil") + local num_soils = #soils + if num_soils >= 1 then + for si = 1, math.min(3, num_soils) do + local soil = soils[math.random(num_soils)] + local soil_name = minetest.get_node(soil).name + local soil_above = {x = soil.x, y = soil.y + 1, z = soil.z} + light = minetest.get_node_light(soil_above) + if light and light >= 13 and + -- Only spread to same surface node + soil_name == under.name and + -- Desert sand is in the soil group + soil_name ~= "default:desert_sand" then + minetest.set_node(soil_above, {name = node.name}) + end + end + end +end + +minetest.register_abm({ + label = "Flower spread", + nodenames = {"group:flora"}, + interval = 13, + chance = 300, + action = function(...) + flowers.flower_spread(...) + end, +}) + + +-- +-- Mushrooms +-- + +minetest.register_node("flowers:mushroom_red", { + description = S("Red Mushroom"), + tiles = {"flowers_mushroom_red.png"}, + inventory_image = "flowers_mushroom_red.png", + wield_image = "flowers_mushroom_red.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {mushroom = 1, snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(-5), + selection_box = { + type = "fixed", + fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, -1 / 16, 4 / 16}, + } +}) + +minetest.register_node("flowers:mushroom_brown", { + description = S("Brown Mushroom"), + tiles = {"flowers_mushroom_brown.png"}, + inventory_image = "flowers_mushroom_brown.png", + wield_image = "flowers_mushroom_brown.png", + drawtype = "plantlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + groups = {mushroom = 1, food_mushroom = 1, snappy = 3, attached_node = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + on_use = minetest.item_eat(1), + selection_box = { + type = "fixed", + fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, -2 / 16, 3 / 16}, + } +}) + + +-- Mushroom spread and death + +function flowers.mushroom_spread(pos, node) + if minetest.get_node_light(pos, 0.5) > 3 then + if minetest.get_node_light(pos, nil) == 15 then + minetest.remove_node(pos) + end + return + end + local positions = minetest.find_nodes_in_area_under_air( + {x = pos.x - 1, y = pos.y - 2, z = pos.z - 1}, + {x = pos.x + 1, y = pos.y + 1, z = pos.z + 1}, + {"group:soil", "group:tree"}) + if #positions == 0 then + return + end + local pos2 = positions[math.random(#positions)] + pos2.y = pos2.y + 1 + if minetest.get_node_light(pos2, 0.5) <= 3 then + minetest.set_node(pos2, {name = node.name}) + end +end + +minetest.register_abm({ + label = "Mushroom spread", + nodenames = {"group:mushroom"}, + interval = 11, + chance = 150, + action = function(...) + flowers.mushroom_spread(...) + end, +}) + + +-- These old mushroom related nodes can be simplified now + +minetest.register_alias("flowers:mushroom_spores_brown", "flowers:mushroom_brown") +minetest.register_alias("flowers:mushroom_spores_red", "flowers:mushroom_red") +minetest.register_alias("flowers:mushroom_fertile_brown", "flowers:mushroom_brown") +minetest.register_alias("flowers:mushroom_fertile_red", "flowers:mushroom_red") +minetest.register_alias("mushroom:brown_natural", "flowers:mushroom_brown") +minetest.register_alias("mushroom:red_natural", "flowers:mushroom_red") + + +-- +-- Waterlily +-- + +local waterlily_def = { + description = S("Waterlily"), + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + tiles = {"flowers_waterlily.png", "flowers_waterlily_bottom.png"}, + use_texture_alpha = true, + inventory_image = "flowers_waterlily.png", + wield_image = "flowers_waterlily.png", + use_texture_alpha = "clip", + liquids_pointable = true, + walkable = false, + buildable_to = true, + floodable = true, + groups = {snappy = 3, flower = 1, flammable = 1}, + sounds = default.node_sound_leaves_defaults(), + node_placement_prediction = "", + node_box = { + type = "fixed", + fixed = {-0.5, -31 / 64, -0.5, 0.5, -15 / 32, 0.5} + }, + selection_box = { + type = "fixed", + fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, -15 / 32, 7 / 16} + }, + + on_place = function(itemstack, placer, pointed_thing) + local pos = pointed_thing.above + local node = minetest.get_node(pointed_thing.under) + local def = minetest.registered_nodes[node.name] + + if def and def.on_rightclick then + return def.on_rightclick(pointed_thing.under, node, placer, itemstack, + pointed_thing) + end + + if def and def.liquidtype == "source" and + minetest.get_item_group(node.name, "water") > 0 then + local player_name = placer and placer:get_player_name() or "" + if not minetest.is_protected(pos, player_name) then + minetest.set_node(pos, {name = "flowers:waterlily" .. + (def.waving == 3 and "_waving" or ""), + param2 = math.random(0, 3)}) + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + else + minetest.chat_send_player(player_name, "Node is protected") + minetest.record_protection_violation(pos, player_name) + end + end + + return itemstack + end +} + +local waterlily_waving_def = table.copy(waterlily_def) +waterlily_waving_def.waving = 3 +waterlily_waving_def.drop = "flowers:waterlily" +waterlily_waving_def.groups.not_in_creative_inventory = 1 + +minetest.register_node("flowers:waterlily", waterlily_def) +minetest.register_node("flowers:waterlily_waving", waterlily_waving_def) + +-- +-- Sunflower +-- + +minetest.register_node("flowers:sunflower_top", { + description = S("Sunflower").. " "..S("(flower)"), + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"flowers_sunflower_top.png"}, + inventory_image = "flowers_sunflower_top_inv.png", + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, flammable = 3, flower =1, flora=1, attached_node = 1, not_in_creative_inventory = 1}, + sounds = default.node_sound_leaves_defaults(), + drop = "flowers:sunflower", + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.1875, 0.5, 0.1875} + }, + after_destruct = function(pos, oldnode) + pos.y = pos.y - 1 + local node = minetest.get_node_or_nil(pos) + if node and node.name == "flowers:sunflower" then + minetest.remove_node(pos) + end + end +}) + +minetest.register_node("flowers:sunflower", { + description = S("Sunflower"), + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"flowers_sunflower_bottom.png"}, + inventory_image = "flowers_sunflower_top.png", + wield_image = "flowers_sunflower_top.png", + paramtype = "light", + walkable = true, + waving = 1, + groups = {snappy = 3, flammable = 3, flower =1, flora=1, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.1875, 0.5, 0.1875} + }, + + on_place = function(itemstack, placer, pointed_thing) + if not(pointed_thing.type) == "node" then + return + end + local pos_above = minetest.get_pointed_thing_position(pointed_thing, true) + local pos_sunflower_top = pos_above + pos_sunflower_top.y = pos_sunflower_top.y + 1 + local node = minetest.get_node_or_nil(pos_sunflower_top) + if node and node.name == "air" then + pos_above.y = pos_above.y - 1 + minetest.set_node(pos_above, {name = "flowers:sunflower"}) + local player_name = placer and placer:get_player_name() or "" + if not (creative and creative.is_enabled_for + and creative.is_enabled_for(player_name)) then + itemstack:take_item() + end + return itemstack + end + end, + + on_construct = function(pos) + pos.y = pos.y + 1 + minetest.place_node(pos, {name = "flowers:sunflower_top"}) + end, + + after_destruct = function(pos, oldnode) + pos.y = pos.y + 1 + local node = minetest.get_node_or_nil(pos) + if node and node.name == "flowers:sunflower_top" then + minetest.remove_node(pos) + end + end +}) + +-- Hedges + +flowers.hedges = { + { + "white_blue", + S("White & Blue"), + {"flowers:dandelion_white", "flowers:geranium"} + }, + { + "violet_blue", + S("Violet & Blue"), + {"flowers:viola", "flowers:geranium"} + }, + { + "red_pink", + S("Red & Pink"), + {"default:rose_bush", "flowers:geranium"} + }, + { + "yellow_orange", + S("Yellow & Orange"), + {"flowers:dandelion_yellow", "flowers:gerbera_daisy"} + } +} + +local function add_hedge(name, desc, recipe_items) + + local node_name = "flowers:" .. name.."".."hedge" + + local drop_items = recipe_items + + recipe_items[#recipe_items+1] = "group:leaves" + + minetest.register_node(node_name, { + description = S("@1 Hedge", desc), + drawtype = "allfaces_optional", + tiles = {"flowers_" .. name .. "_hedge" .. ".png"}, + wield_image = "flowers_" .. name .. "_hedge" .. ".png", + sunlight_propagates = true, + paramtype = "light", + is_ground_content = false, + groups = {snappy = 3, flammable = 2, flower = 1, flora = 1}, + sounds = default.node_sound_leaves_defaults(), + drop = { + max_items = 1, + items = { + { + items = drop_items, + rarity = 1, + inherit_color = true, + } + } + } + }) + + minetest.register_craft({ + output = node_name, + type = "shapeless", + recipe = recipe_items, + }) + +end + +for _,item in pairs(flowers.hedges) do + add_hedge(unpack(item)) +end diff --git a/mods/minetest_game/flowers/license.txt b/mods/minetest_game/flowers/license.txt new file mode 100644 index 0000000..419ebe5 --- /dev/null +++ b/mods/minetest_game/flowers/license.txt @@ -0,0 +1,63 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Ironzorg, VanessaE +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 RHRhino +Copyright (C) 2015-2016 Gambit +Copyright (C) 2016 yyt16384 +Copyright (C) 2017 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/flowers/locale/flowers.de.tr b/mods/minetest_game/flowers/locale/flowers.de.tr new file mode 100644 index 0000000..18afb2a --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.de.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rote Rose +Orange Tulip=Orange Tulpe +Yellow Dandelion=Gelber Löwenzahn +Green Chrysanthemum=Grüne Chrysantheme +Blue Geranium=Blaue Geranie +Viola=Veilchen +White Dandelion=Weißer Löwenzahn +Black Tulip=Schwarze Tulpe +Red Mushroom=Roter Pilz +Brown Mushroom=Brauner Pilz +Waterlily=Wasserlilie diff --git a/mods/minetest_game/flowers/locale/flowers.eo.tr b/mods/minetest_game/flowers/locale/flowers.eo.tr new file mode 100644 index 0000000..0153fdf --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.eo.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Ruĝa Rozo +Orange Tulip=Oranĝa Tulipo +Yellow Dandelion=Flava Leontodo +Green Chrysanthemum=Verda Krizantemo +Blue Geranium=Blua Geranio +Viola=Violo +White Dandelion=Blanka Leontodo +Black Tulip=Nigra Tulipo +Red Mushroom=Ruĝa Fungo +Brown Mushroom=Bruna Fungo +Waterlily=Nimfeo diff --git a/mods/minetest_game/flowers/locale/flowers.es.tr b/mods/minetest_game/flowers/locale/flowers.es.tr new file mode 100644 index 0000000..cdea81d --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.es.tr @@ -0,0 +1,23 @@ +# textdomain: flowers +Red Rose=Rosa roja +Orange Tulip=Tulipán naranja +Yellow Dandelion=Diente de León amarillo +Green Chrysanthemum=Crisantemo verde +Blue Geranium=Geranio azul +Viola=Violeta +White Dandelion=Diente de León blanco +Black Tulip=Tulipán negro +Red Mushroom=Champiñón rojo +Brown Mushroom=Champiñón café +Waterlily=Nenúfar +Sunflower=Girasol +(flower)=(flor) +@1 Hedge=Seto @1 +White & Blue=blanquiazul +Violet & Blue=violeta azulado +Yellow & Orange=amarillo anaranjado +Red & Pink=rojo rosáceo +Gerbera Daisy=Margarita gerbera +Yellow Bell=Campanilla amarilla +Pink Calendula=Caléndula rosa + diff --git a/mods/minetest_game/flowers/locale/flowers.fr.tr b/mods/minetest_game/flowers/locale/flowers.fr.tr new file mode 100644 index 0000000..41e0d00 --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.fr.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rose rouge +Orange Tulip=Tulipe orange +Yellow Dandelion=Pissenlit jaune +Green Chrysanthemum=Chrysanthème vert +Blue Geranium=Géranium bleu +Viola=Violette +White Dandelion=Pissenlit blanc +Black Tulip=Tulipe noire +Red Mushroom=Champignon rouge +Brown Mushroom=Champignon brun +Waterlily=Nénuphar diff --git a/mods/minetest_game/flowers/locale/flowers.id.tr b/mods/minetest_game/flowers/locale/flowers.id.tr new file mode 100644 index 0000000..730529b --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.id.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Mawar Merah +Orange Tulip=Tulip Oranye +Yellow Dandelion=Dandelion Kuning +Green Chrysanthemum=Krisan Hijau +Blue Geranium=Geranium Biru +Viola=Viola +White Dandelion=Dandelion Putih +Black Tulip=Tulip Hitam +Red Mushroom=Jamur Merah +Brown Mushroom=Jamur Cokelat +Waterlily=Teratai diff --git a/mods/minetest_game/flowers/locale/flowers.it.tr b/mods/minetest_game/flowers/locale/flowers.it.tr new file mode 100644 index 0000000..1ab49dd --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.it.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rosa rossa +Orange Tulip=Tulipano arancione +Yellow Dandelion=Dente di leone giallo +Green Chrysanthemum=Crisantemo verde +Blue Geranium=Geranio blu +Viola=Viola +White Dandelion=Dente di leone bianco +Black Tulip=Tulipano nero +Red Mushroom=Fungo rosso +Brown Mushroom=Fungo marrone +Waterlily=Ninfea diff --git a/mods/minetest_game/flowers/locale/flowers.jbo.tr b/mods/minetest_game/flowers/locale/flowers.jbo.tr new file mode 100644 index 0000000..8f81608 --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.jbo.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=lo xunre rozgu +Orange Tulip=lo narju tujli +Yellow Dandelion=lo pelxu spatrtaraksaku +Green Chrysanthemum=lo crino xrisantemo +Blue Geranium=lo blanu plargoni +Viola=lo spatrvi'ola +White Dandelion=lo blabi spatrtaraksaku +Black Tulip=lo xekri tujli +Red Mushroom=lo xunre ledgrute +Brown Mushroom=lo bunre ledgrute +Waterlily=lo spatrnimfe'a diff --git a/mods/minetest_game/flowers/locale/flowers.ms.tr b/mods/minetest_game/flowers/locale/flowers.ms.tr new file mode 100644 index 0000000..4e846eb --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.ms.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Ros Merah +Orange Tulip=Tulip Jingga +Yellow Dandelion=Dandelion Kuning +Green Chrysanthemum=Kekwa Hijau +Blue Geranium=Geranium Biru +Viola=Violet +White Dandelion=Dandelion Putih +Black Tulip=Tulip Hitam +Red Mushroom=Cendawan Merah +Brown Mushroom=Cendawan Perang +Waterlily=Teratai diff --git a/mods/minetest_game/flowers/locale/flowers.pt_BR.tr b/mods/minetest_game/flowers/locale/flowers.pt_BR.tr new file mode 100644 index 0000000..1f5ff92 --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.pt_BR.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Rosa Vermelha +Orange Tulip=Tulipa Laranja +Yellow Dandelion=Dente-de-leão Amarelo +Green Chrysanthemum=Crisântemo Verde +Blue Geranium=Gerânio Azul +Viola=Violeta +White Dandelion=Dente-de-leão Branco +Black Tulip=Tulipa Negra +Red Mushroom=Cogumelo Vermelho +Brown Mushroom=Cogumelo Marrom +Waterlily=Nenúfar diff --git a/mods/minetest_game/flowers/locale/flowers.ru.tr b/mods/minetest_game/flowers/locale/flowers.ru.tr new file mode 100644 index 0000000..d861e2a --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.ru.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Красная Роза +Orange Tulip=Оранжевый Тюльпан +Yellow Dandelion=Желтый Одуванчик +Green Chrysanthemum=Зелёная Хризантема +Blue Geranium=Синяя Герань +Viola=Фиалка +White Dandelion=Белый Одуванчик +Black Tulip=Черный Тюльпан +Red Mushroom=Мухомор +Brown Mushroom=Коричневый Гриб +Waterlily=Кувшинка diff --git a/mods/minetest_game/flowers/locale/flowers.se.tr b/mods/minetest_game/flowers/locale/flowers.se.tr new file mode 100644 index 0000000..018e133 --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.se.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Röd ros +Orange Tulip=Orange Tulpan +Yellow Dandelion=Gul Maskros +Green Chrysanthemum=Grön Krysantemum +Blue Geranium=Blå Geranium +Viola=Violett Viola +White Dandelion=Vit Maskros +Black Tulip=Svart Tulpan +Red Mushroom=Röd Svamp +Brown Mushroom=Brun Svamp +Waterlily=Näckros diff --git a/mods/minetest_game/flowers/locale/flowers.sk.tr b/mods/minetest_game/flowers/locale/flowers.sk.tr new file mode 100644 index 0000000..75d4ae1 --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.sk.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=Červená ruža +Orange Tulip=Oranžový tulipán +Yellow Dandelion=Žltá púpava +Green Chrysanthemum=Zelená chryzantéma +Blue Geranium=Modrý muškát +Viola=Fialka +White Dandelion=Biela púpava +Black Tulip=Čierny tulipán +Red Mushroom=Červená huba +Brown Mushroom=Hnedá huba +Waterlily=Lekno diff --git a/mods/minetest_game/flowers/locale/flowers.zh_CN.tr b/mods/minetest_game/flowers/locale/flowers.zh_CN.tr new file mode 100644 index 0000000..3139dfb --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.zh_CN.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=红玫瑰 +Orange Tulip=橙郁金香 +Yellow Dandelion=黄蒲公英 +Green Chrysanthemum=绿菊花 +Blue Geranium=蓝天竺葵 +Viola=三色堇 +White Dandelion=白蒲公英 +Black Tulip=黑郁金香 +Red Mushroom=红蘑菇 +Brown Mushroom=棕蘑菇 +Waterlily=睡莲 diff --git a/mods/minetest_game/flowers/locale/flowers.zh_TW.tr b/mods/minetest_game/flowers/locale/flowers.zh_TW.tr new file mode 100644 index 0000000..a3a3ec5 --- /dev/null +++ b/mods/minetest_game/flowers/locale/flowers.zh_TW.tr @@ -0,0 +1,12 @@ +# textdomain: flowers +Red Rose=紅玫瑰 +Orange Tulip=橙鬱金香 +Yellow Dandelion=黃蒲公英 +Green Chrysanthemum=綠菊花 +Blue Geranium=藍天竺葵 +Viola=三色堇 +White Dandelion=白蒲公英 +Black Tulip=黑鬱金香 +Red Mushroom=紅蘑菇 +Brown Mushroom=棕蘑菇 +Waterlily=睡蓮 diff --git a/mods/minetest_game/flowers/locale/template.txt b/mods/minetest_game/flowers/locale/template.txt new file mode 100644 index 0000000..cc07aa2 --- /dev/null +++ b/mods/minetest_game/flowers/locale/template.txt @@ -0,0 +1,20 @@ +# textdomain: flowers +Red Rose= +Orange Tulip= +Yellow Dandelion= +Green Chrysanthemum= +Blue Geranium= +Viola= +White Dandelion= +Black Tulip= +Red Mushroom= +Brown Mushroom= +Waterlily= +Sunflower= +(flower)= +@1 Hedge= +White & Blue= +Violet & Blue= +Gerbera Daisy= +Yellow Bell= +Pink Calendula= diff --git a/mods/minetest_game/flowers/mapgen.lua b/mods/minetest_game/flowers/mapgen.lua new file mode 100644 index 0000000..b6004f4 --- /dev/null +++ b/mods/minetest_game/flowers/mapgen.lua @@ -0,0 +1,189 @@ +-- +-- Mgv6 +-- + +local function register_mgv6_flower(flower_name) + minetest.register_decoration({ + name = "flowers:"..flower_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 100, y = 100, z = 100}, + seed = 436, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "flowers:"..flower_name, + }) +end + +local function register_mgv6_mushroom(mushroom_name) + minetest.register_decoration({ + name = "flowers:"..mushroom_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.04, + spread = {x = 100, y = 100, z = 100}, + seed = 7133, + octaves = 3, + persist = 0.6 + }, + y_max = 30, + y_min = 1, + decoration = "flowers:"..mushroom_name, + spawn_by = "default:tree", + num_spawn_by = 1, + }) +end + +local function register_mgv6_waterlily() + minetest.register_decoration({ + name = "flowers:waterlily", + deco_type = "simple", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.12, + scale = 0.3, + spread = {x = 100, y = 100, z = 100}, + seed = 33, + octaves = 3, + persist = 0.7 + }, + y_max = 0, + y_min = 0, + decoration = "flowers:waterlily_waving", + param2 = 0, + param2_max = 3, + place_offset_y = 1, + }) +end + +function flowers.register_mgv6_decorations() + register_mgv6_flower("rose") + register_mgv6_flower("rose_bush") + register_mgv6_flower("tulip") + register_mgv6_flower("dandelion_yellow") + register_mgv6_flower("geranium") + register_mgv6_flower("viola") + register_mgv6_flower("dandelion_white") + register_mgv6_flower("calla") + register_mgv6_flower("gerbera_daisy") + + register_mgv6_mushroom("mushroom_brown") + register_mgv6_mushroom("mushroom_red") + + register_mgv6_waterlily() +end + + +-- +-- All other biome API mapgens +-- + +local function register_flower(seed, flower_name) + minetest.register_decoration({ + name = "flowers:"..flower_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.02, + scale = 0.04, + spread = {x = 200, y = 200, z = 200}, + seed = seed, + octaves = 3, + persist = 0.6 + }, + biomes = {"grassland", "deciduous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "flowers:"..flower_name, + }) +end + +local function register_mushroom(mushroom_name) + minetest.register_decoration({ + name = "flowers:"..mushroom_name, + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest", "coniferous_forest"}, + y_max = 31000, + y_min = 1, + decoration = "flowers:"..mushroom_name, + }) +end + +local function register_waterlily() + minetest.register_decoration({ + name = "default:waterlily", + deco_type = "simple", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.12, + scale = 0.3, + spread = {x = 200, y = 200, z = 200}, + seed = 33, + octaves = 3, + persist = 0.7 + }, + biomes = {"rainforest_swamp", "savanna_shore", "deciduous_forest_shore"}, + y_max = 0, + y_min = 0, + decoration = "flowers:waterlily_waving", + param2 = 0, + param2_max = 3, + place_offset_y = 1, + }) +end + +function flowers.register_decorations() + register_flower(436, "rose") + register_flower(126, "rose_bush") + register_flower(19822, "tulip") + register_flower(1220999, "dandelion_yellow") + register_flower(800081, "chrysanthemum_green") + register_flower(36662, "geranium") + register_flower(1133, "viola") + register_flower(73133, "dandelion_white") + register_flower(42, "tulip_black") + register_flower(34563, "calla") + register_flower(126, "gerbera_daisy") + register_flower(23456, "yellow_bell") + register_flower(548, "calendula") + + register_mushroom("mushroom_brown") + register_mushroom("mushroom_red") + + register_waterlily() +end + + +-- +-- Detect mapgen to select functions +-- + +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" then + flowers.register_mgv6_decorations() +else + flowers.register_decorations() +end diff --git a/mods/minetest_game/flowers/mod.conf b/mods/minetest_game/flowers/mod.conf new file mode 100644 index 0000000..cdafe64 --- /dev/null +++ b/mods/minetest_game/flowers/mod.conf @@ -0,0 +1,3 @@ +name = flowers +description = Minetest Game mod: flowers +depends = default diff --git a/mods/minetest_game/flowers/textures/flowers_calendula.png b/mods/minetest_game/flowers/textures/flowers_calendula.png new file mode 100644 index 0000000..b88a20c Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_calendula.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_calla.png b/mods/minetest_game/flowers/textures/flowers_calla.png new file mode 100644 index 0000000..dcbf671 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_calla.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_chrysanthemum_green.png b/mods/minetest_game/flowers/textures/flowers_chrysanthemum_green.png new file mode 100644 index 0000000..9b54ce9 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_chrysanthemum_green.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_cotton.png b/mods/minetest_game/flowers/textures/flowers_cotton.png new file mode 100755 index 0000000..b92932f Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_cotton.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_dandelion_white.png b/mods/minetest_game/flowers/textures/flowers_dandelion_white.png new file mode 100755 index 0000000..901b824 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_dandelion_white.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_dandelion_yellow.png b/mods/minetest_game/flowers/textures/flowers_dandelion_yellow.png new file mode 100755 index 0000000..51306f4 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_dandelion_yellow.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_geranium.png b/mods/minetest_game/flowers/textures/flowers_geranium.png new file mode 100755 index 0000000..5f2896e Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_geranium.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_gerbera_daisy.png b/mods/minetest_game/flowers/textures/flowers_gerbera_daisy.png new file mode 100644 index 0000000..27b05f7 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_gerbera_daisy.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_mushroom_brown.png b/mods/minetest_game/flowers/textures/flowers_mushroom_brown.png new file mode 100755 index 0000000..817780a Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_mushroom_brown.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_mushroom_red.png b/mods/minetest_game/flowers/textures/flowers_mushroom_red.png new file mode 100755 index 0000000..cf4ea50 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_mushroom_red.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_red_pink_hedge.png b/mods/minetest_game/flowers/textures/flowers_red_pink_hedge.png new file mode 100644 index 0000000..af27c36 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_red_pink_hedge.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_rose.png b/mods/minetest_game/flowers/textures/flowers_rose.png new file mode 100755 index 0000000..759bb03 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_rose.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_rose_inv.png b/mods/minetest_game/flowers/textures/flowers_rose_inv.png new file mode 100644 index 0000000..4c8fa2e Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_rose_inv.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_sunflower_bottom.png b/mods/minetest_game/flowers/textures/flowers_sunflower_bottom.png new file mode 100644 index 0000000..61ce81d Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_sunflower_bottom.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_sunflower_top.png b/mods/minetest_game/flowers/textures/flowers_sunflower_top.png new file mode 100644 index 0000000..effbad9 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_sunflower_top.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_sunflower_top_inv.png b/mods/minetest_game/flowers/textures/flowers_sunflower_top_inv.png new file mode 100644 index 0000000..b41eb18 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_sunflower_top_inv.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_tulip.png b/mods/minetest_game/flowers/textures/flowers_tulip.png new file mode 100755 index 0000000..7ef662c Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_tulip.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_tulip_black.png b/mods/minetest_game/flowers/textures/flowers_tulip_black.png new file mode 100644 index 0000000..b0d77d4 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_tulip_black.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_viola.png b/mods/minetest_game/flowers/textures/flowers_viola.png new file mode 100755 index 0000000..835512a Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_viola.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_violet_blue_hedge.png b/mods/minetest_game/flowers/textures/flowers_violet_blue_hedge.png new file mode 100644 index 0000000..17ba119 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_violet_blue_hedge.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_waterlily.png b/mods/minetest_game/flowers/textures/flowers_waterlily.png new file mode 100755 index 0000000..99ce766 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_waterlily.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_waterlily_bottom.png b/mods/minetest_game/flowers/textures/flowers_waterlily_bottom.png new file mode 100644 index 0000000..dce93e0 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_waterlily_bottom.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_white_blue_hedge.png b/mods/minetest_game/flowers/textures/flowers_white_blue_hedge.png new file mode 100644 index 0000000..00d42f2 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_white_blue_hedge.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_yellow_bell.png b/mods/minetest_game/flowers/textures/flowers_yellow_bell.png new file mode 100644 index 0000000..c65a041 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_yellow_bell.png differ diff --git a/mods/minetest_game/flowers/textures/flowers_yellow_orange_hedge.png b/mods/minetest_game/flowers/textures/flowers_yellow_orange_hedge.png new file mode 100644 index 0000000..f1619c9 Binary files /dev/null and b/mods/minetest_game/flowers/textures/flowers_yellow_orange_hedge.png differ diff --git a/mods/minetest_game/game_api.txt b/mods/minetest_game/game_api.txt new file mode 100644 index 0000000..24a78e9 --- /dev/null +++ b/mods/minetest_game/game_api.txt @@ -0,0 +1,1088 @@ +Minetest Game API +================= +GitHub Repo: https://github.com/minetest/minetest_game + + +Introduction +------------ + +The Minetest Game game offers multiple new possibilities in addition to the Minetest engine's built-in API, +allowing you to add new plants to farming mod, buckets for new liquids, new stairs and custom panes. +For information on the Minetest API, visit https://github.com/minetest/minetest/blob/master/doc/lua_api.txt +Please note: + + * [XYZ] refers to a section the Minetest API + * [#ABC] refers to a section in this document + * [pos] refers to a position table `{x = -5, y = 0, z = 200}` + + +Bucket API +---------- + +The bucket API allows registering new types of buckets for non-default liquids. + + bucket.register_liquid( + "default:lava_source", -- name of the source node + "default:lava_flowing", -- name of the flowing node + "bucket:bucket_lava", -- name of the new bucket item (or nil if liquid is not takeable) + "bucket_lava.png", -- texture of the new bucket item (ignored if itemname == nil) + "Lava Bucket", -- text description of the bucket item + {lava_bucket = 1}, -- groups of the bucket item, OPTIONAL + false -- force-renew, OPTIONAL. Force the liquid source to renew if it has + -- a source neighbour, even if defined as 'liquid_renewable = false'. + -- Needed to avoid creating holes in sloping rivers. + ) + +The filled bucket item is returned to the player that uses an empty bucket pointing to the given liquid source. +When punching with an empty bucket pointing to an entity or a non-liquid node, the on_punch of the entity or node will be triggered. + + +Beds API +-------- + + beds.register_bed( + "beds:bed", -- Bed name + def -- See [#Bed definition] + ) + + * `beds.can_dig(bed_pos)` Returns a boolean whether the bed at `bed_pos` may be dug + * `beds.read_spawns() ` Returns a table containing players respawn positions + * `beds.kick_players()` Forces all players to leave bed + * `beds.skip_night()` Sets world time to morning and saves respawn position of all players currently sleeping + +### Bed definition + + { + description = "Simple Bed", + inventory_image = "beds_bed.png", + wield_image = "beds_bed.png", + tiles = { + bottom = {'Tile definition'}, -- the tiles of the bottom part of the bed. + top = {Tile definition} -- the tiles of the bottom part of the bed. + }, + nodebox = { + bottom = 'regular nodebox', -- bottom part of bed (see [Node boxes]) + top = 'regular nodebox', -- top part of bed (see [Node boxes]) + }, + selectionbox = 'regular nodebox', -- for both nodeboxes (see [Node boxes]) + recipe = { -- Craft recipe + {"group:wool", "group:wool", "group:wool"}, + {"group:wood", "group:wood", "group:wood"} + } + } + + +Bones API +--------- + +An ordered list of listnames (default: "main", "craft") of the player inventory, +that will be placed into bones or dropped on player death can be looked up or changed +in `bones.player_inventory_lists`. + +e.g. `table.insert(bones.player_inventory_lists, "backpack")` + + +Creative API +------------ + +Use `creative.register_tab(name, title, items)` to add a tab with filtered items. +For example, + + creative.register_tab("tools", "Tools", minetest.registered_tools) + +is used to show all tools. Name is used in the sfinv page name, title is the +human readable title. + +Creative provides `creative.is_enabled_for(name)`, which is identical in +functionality to the engine's `minetest.creative_is_enabled(name)`. +Its use is deprecated and it should also not be overriden. + +The contents of `creative.formspec_add` is appended to every creative inventory +page. Mods can use it to add additional formspec elements onto the default +creative inventory formspec to be drawn after each update. + +Group overrides can be used for any registered item, node or tool. Use one of +the groups stated below to pick which category it will appear in. + + node = 1 -- Appears in the Nodes category + tool = 1 -- Appears in the Tools category + craftitem = 1 -- Appears in the Items category + + +Chests API +---------- + +The chests API allows the creation of chests, which have their own inventories for holding items. + +`default.chest.get_chest_formspec(pos)` + + * Returns a formspec for a specific chest. + * `pos` Location of the chest node, e.g `{x = 1, y = 1, z = 1}` + +`default.chest.chest_lid_obstructed(pos)` + + * Returns a boolean depending on whether or not a chest has its top obstructed by a solid node. + * `pos` Location of the chest node, e.g `{x = 1, y = 1, z = 1}` + +`default.chest.chest_lid_close(pn)` + + * Closes the chest that a player is currently looking in. + * `pn` The name of the player whose chest is going to be closed + +`default.chest.open_chests` + + * A table indexed by player name to keep track of who opened what chest. + * Key: The name of the player. + * Value: A table containing information about the chest the player is looking at. + e.g `{ pos = {1, 1, 1}, sound = null, swap = "default:chest" }` + +`default.chest.register_chest(name, def)` + + * Registers new chest + * `name` Name for chest e.g. "default:chest" + * `def` See [#Chest Definition] + +### Chest Definition + + description = "Chest", + tiles = { + "default_chest_top.png", + "default_chest_top.png", + "default_chest_side.png", + "default_chest_side.png", + "default_chest_front.png", + "default_chest_inside.png" + }, -- Textures which are applied to the chest model. + sounds = default.node_sound_wood_defaults(), + sound_open = "default_chest_open", + sound_close = "default_chest_close", + groups = {choppy = 2, oddly_breakable_by_hand = 2}, + protected = false, -- If true, only placer can modify chest. + + +Doors API +--------- + +The doors mod allows modders to register custom doors and trapdoors. + +`doors.registered_doors[name] = Door definition` + * Table of registered doors, indexed by door name + +`doors.registered_trapdoors[name] = Trapdoor definition` + * Table of registered trap doors, indexed by trap door name + +`doors.register_door(name, def)` + + * Registers new door + * `name` Name for door + * `def` See [#Door definition] + +`doors.register_trapdoor(name, def)` + + * Registers new trapdoor + * `name` Name for trapdoor + * `def` See [#Trapdoor definition] + +`doors.register_fencegate(name, def)` + + * Registers new fence gate + * `name` Name for fence gate + * `def` See [#Fence gate definition] + +`doors.get(pos)` + + * `pos` A position as a table, e.g `{x = 1, y = 1, z = 1}` + * Returns an ObjectRef to a door, or nil if the position does not contain a door + + ### Methods + + :open(player) -- Open the door object, returns if door was opened + :close(player) -- Close the door object, returns if door was closed + :toggle(player) -- Toggle the door state, returns if state was toggled + :state() -- returns the door state, true = open, false = closed + + the "player" parameter can be omitted in all methods. If passed then + the usual permission checks will be performed to make sure the player + has the permissions needed to open this door. If omitted then no + permission checks are performed. + +`doors.door_toggle(pos, node, clicker)` + + * Toggle door open or shut + * `pos` Position of the door + * `node` Node definition + * `clicker` Player definition for the player that clicked on the door + +### Door definition + + description = "Door description", + inventory_image = "mod_door_inv.png", + groups = {choppy = 2}, + tiles = {"mod_door.png"}, -- UV map. + -- The front and back of the door must be identical in appearence as they swap on + -- open/close. + recipe = craftrecipe, + sounds = default.node_sound_wood_defaults(), -- optional + sound_open = sound play for open door, -- optional + sound_close = sound play for close door, -- optional + gain_open = 0.3, -- optional, defaults to 0.3 + gain_close = 0.3, -- optional, defaults to 0.3 + protected = false, -- If true, only placer can open the door (locked for others) + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + -- optional function containing the on_rightclick callback, defaults to a doors.door_toggle-wrapper + +### Trapdoor definition + + description = "Trapdoor description", + inventory_image = "mod_trapdoor_inv.png", + groups = {choppy = 2}, + tile_front = "doors_trapdoor.png", -- the texture for the front and back of the trapdoor + tile_side = "doors_trapdoor_side.png", + -- The texture for the four sides of the trapdoor. + -- The texture should have the trapdoor side drawn twice, in the lowest and highest + -- 1/8ths of the texture, both upright. The area between is not used. + -- The lower 1/8th will be used for the closed trapdoor, the higher 1/8th will be used + -- for the open trapdoor. + sounds = default.node_sound_wood_defaults(), -- optional + sound_open = sound play for open door, -- optional + sound_close = sound play for close door, -- optional + gain_open = 0.3, -- optional, defaults to 0.3 + gain_close = 0.3, -- optional, defaults to 0.3 + protected = false, -- If true, only placer can open the door (locked for others) + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + -- function containing the on_rightclick callback + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + -- function containing the on_rightclick callback + +### Fence gate definition + + description = "Wooden Fence Gate", + texture = "default_wood.png", -- `backface_culling` will automatically be + -- set to `true` if not specified. + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), -- optional + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + -- function containing the on_rightclick callback + + +Dungeon Loot API +---------------- + +The mod that places chests with loot in dungeons provides an API to register additional loot. + +`dungeon_loot.register(def)` + + * Registers one or more loot items + * `def` Can be a single [#Loot definition] or a list of them + +`dungeon_loot.registered_loot` + + * Table of all registered loot, not to be modified manually + +### Loot definition + + name = "item:name", + chance = 0.5, + -- ^ chance value from 0.0 to 1.0 that the item will appear in the chest when chosen + -- Due to an extra step in the selection process, 0.5 does not(!) mean that + -- on average every second chest will have this item + count = {1, 4}, + -- ^ table with minimum and maximum amounts of this item + -- optional, defaults to always single item + y = {-32768, -512}, + -- ^ table with minimum and maximum heights this item can be found at + -- optional, defaults to no height restrictions + types = {"desert"}, + -- ^ table with types of dungeons this item can be found in + -- supported types: "normal" (the cobble/mossycobble one), "sandstone" + -- "desert" and "ice" + -- optional, defaults to no type restrictions + + +Fence API +--------- + +Allows creation of new fences with "fencelike" drawtype. + +`default.register_fence(name, item definition)` + + Registers a new fence. Custom fields texture and material are required, as + are name and description. The rest is optional. You can pass most normal + nodedef fields here except drawtype. The fence group will always be added + for this node. + +### fence definition + + name = "default:fence_wood", + description = "Wooden Fence", + texture = "default_wood.png", + material = "default:wood", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + +Walls API +--------- + +The walls API allows easy addition of stone auto-connecting wall nodes. + +walls.register(name, desc, texture, mat, sounds) +^ name = "walls:stone_wall". Node name. +^ desc = "A Stone wall" +^ texture = "default_stone.png" +^ mat = "default:stone". Used to auto-generate crafting recipe. +^ sounds = sounds: see [#Default sounds] + + +Farming API +----------- + +The farming API allows you to easily register plants and hoes. + +`farming.register_hoe(name, hoe definition)` + * Register a new hoe, see [#hoe definition] + +`farming.register_plant(name, Plant definition)` + * Register a new growing plant, see [#Plant definition] + +`farming.registered_plants[name] = definition` + * Table of registered plants, indexed by plant name + +### Hoe Definition + + + { + description = "", -- Description for tooltip + inventory_image = "unknown_item.png", -- Image to be used as wield- and inventory image + max_uses = 30, -- Uses until destroyed + material = "", -- Material for recipes + recipe = { -- Craft recipe, if material isn't used + {"air", "air", "air"}, + {"", "group:stick"}, + {"", "group:stick"}, + } + } + +### Plant definition + + { + description = "", -- Description of seed item + harvest_description = "", -- Description of harvest item + -- (optional, derived automatically if not provided) + inventory_image = "unknown_item.png", -- Image to be used as seed's wield- and inventory image + steps = 8, -- How many steps the plant has to grow, until it can be harvested + -- ^ Always provide a plant texture for each step, format: modname_plantname_i.png (i = stepnumber) + minlight = 13, -- Minimum light to grow + maxlight = default.LIGHT_MAX -- Maximum light to grow + } + + +Fire API +-------- + +Add group flammable when registering a node to make fire seek for it. +Add it to an item to make it burn up when dropped in lava or fire. +New node def property: + +`on_burn(pos)` + + * Called when fire attempts to remove a burning node. + * `pos` Position of the burning node. + + `on_ignite(pos, igniter)` + + * Called when Flint and steel (or a mod defined ignitor) is used on a node. + Defining it may prevent the default action (spawning flames) from triggering. + * `pos` Position of the ignited node. + * `igniter` Player that used the tool, when available. + + +Give Initial Stuff API +---------------------- + +`give_initial_stuff.give(player)` + +^ Give initial stuff to "player" + +`give_initial_stuff.add(stack)` + +^ Add item to the initial stuff +^ Stack can be an ItemStack or a item name eg: "default:dirt 99" +^ Can be called after the game has loaded + +`give_initial_stuff.clear()` + +^ Removes all items from the initial stuff +^ Can be called after the game has loaded + +`give_initial_stuff.get_list()` + +^ returns list of item stacks + +`give_initial_stuff.set_list(list)` + +^ List of initial items with numeric indices. + +`give_initial_stuff.add_from_csv(str)` + +^ str is a comma separated list of initial stuff +^ Adds items to the list of items to be given + + +Player API +---------- + +The player API can register player models and update the player's appearance. + +* `player_api.register_model(name, def)` + * Register a new model to be used by players + * `name`: model filename such as "character.x", "foo.b3d", etc. + * `def`: see [#Model definition] + * Saved to player_api.registered_models + +* `player_api.registered_models[name]` + * Get a model's definition + * `name`: model filename + * See [#Model definition] + +* `player_api.set_model(player, model_name)` + * Change a player's model + * `player`: PlayerRef + * `model_name`: model registered with player_api.register_model() + +* `player_api.set_animation(player, anim_name, speed)` + * Applies an animation to a player + * `player`: PlayerRef + * `anim_name`: name of the animation + * `speed`: frames per second. If nil, the default from the model def is used + +* `player_api.set_textures(player, textures)` + * Sets player textures + * `player`: PlayerRef + * `textures`: array of textures. If nil, the default from the model def is used + +* `player_api.get_animation(player)` + * Returns a table containing fields `model`, `textures` and `animation` + * Any of the fields of the returned table may be nil + * `player`: PlayerRef + +* `player_api.player_attached` + * A table that maps a player name to a boolean + * If the value for a given player is set to true, the default player animations + (walking, digging, ...) will no longer be updated, and knockback from damage is + prevented for that player + * Example of usage: A mod sets a player's value to true when attached to a vehicle + +### Model Definition + + { + animation_speed = 30, -- Default animation speed, in FPS + textures = {"character.png", }, -- Default array of textures + visual_size = {x = 1, y = 1}, -- Used to scale the model + animations = { + -- = {x = , y = }, + foo = {x = 0, y = 19}, + bar = {x = 20, y = 39}, + -- ... + }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, -- In nodes from feet position + stepheight = 0.6, -- In nodes + eye_height = 1.47, -- In nodes above feet position + } + + +TNT API +------- + +`tnt.register_tnt(definition)` + +^ Register a new type of tnt. + + * `name` The name of the node. If no prefix is given `tnt` is used. + * `description` A description for your TNT. + * `radius` The radius within which the TNT can destroy nodes. The default is 3. + * `damage_radius` The radius within which the TNT can damage players and mobs. By default it is twice the `radius`. + * `sound` The sound played when explosion occurs. By default it is `tnt_explode`. + * `disable_drops` Disable drops. By default it is set to false. + * `ignore_protection` Don't check `minetest.is_protected` before removing a node. + * `ignore_on_blast` Don't call `on_blast` even if a node has one. + * `tiles` Textures for node + * `side` Side tiles. By default the name of the tnt with a suffix of `_side.png`. + * `top` Top tile. By default the name of the tnt with a suffix of `_top.png`. + * `bottom` Bottom tile. By default the name of the tnt with a suffix of `_bottom.png`. + * `burning` Top tile when lit. By default the name of the tnt with a suffix of `_top_burning_animated.png". + +`tnt.boom(position[, definition])` + +^ Create an explosion. + +* `position` The center of explosion. +* `definition` The TNT definion as passed to `tnt.register` with the following addition: + * `explode_center` false by default which removes TNT node on blast, when true will explode center node. + +`tnt.burn(position, [nodename])` + +^ Ignite node at position, triggering its `on_ignite` callback (see fire mod). +If no such callback exists, fallback to turn tnt group nodes to their +"_burning" variant. + nodename isn't required unless already known. + +To make dropping items from node inventories easier, you can use the +following helper function from 'default': + +default.get_inventory_drops(pos, inventory, drops) + +^ Return drops from node inventory "inventory" in drops. + +* `pos` - the node position +* `inventory` - the name of the inventory (string) +* `drops` - an initialized list + +The function returns no values. The drops are returned in the `drops` +parameter, and drops is not reinitialized so you can call it several +times in a row to add more inventory items to it. + + +`on_blast` callbacks: + +Both nodedefs and entitydefs can provide an `on_blast()` callback + +`nodedef.on_blast(pos, intensity)` +^ Allow drop and node removal overriding +* `pos` - node position +* `intensity` - TNT explosion measure. larger or equal to 1.0 +^ Should return a list of drops (e.g. {"default:stone"}) +^ Should perform node removal itself. If callback exists in the nodedef +^ then the TNT code will not destroy this node. + +`entitydef.on_blast(luaobj, damage)` +^ Allow TNT effects on entities to be overridden +* `luaobj` - LuaEntityRef of the entity +* `damage` - suggested HP damage value +^ Should return a list of (bool do_damage, bool do_knockback, table drops) +* `do_damage` - if true then TNT mod wil damage the entity +* `do_knockback` - if true then TNT mod will knock the entity away +* `drops` - a list of drops, e.g. {"wool:red"} + + +Screwdriver API +--------------- + +The screwdriver API allows you to control a node's behaviour when a screwdriver is used on it. +To use it, add the `on_screwdriver` function to the node definition. + +`on_rotate(pos, node, user, mode, new_param2)` + + * `pos` Position of the node that the screwdriver is being used on + * `node` that node + * `user` The player who used the screwdriver + * `mode` screwdriver.ROTATE_FACE or screwdriver.ROTATE_AXIS + * `new_param2` the new value of param2 that would have been set if on_rotate wasn't there + * return value: false to disallow rotation, nil to keep default behaviour, true to allow + it but to indicate that changed have already been made (so the screwdriver will wear out) + * use `on_rotate = false` to always disallow rotation + * use `on_rotate = screwdriver.rotate_simple` to allow only face rotation + + +Sethome API +----------- + +The sethome API adds three global functions to allow mods to read a players home position, +set a players home position and teleport a player to home position. + +`sethome.get(name)` + + * `name` Player who's home position you wish to get + * return value: false if no player home coords exist, position table if true + +`sethome.set(name, pos)` + + * `name` Player who's home position you wish to set + * `pos` Position table containing coords of home position + * return value: false if unable to set and save new home position, otherwise true + +`sethome.go(name)` + + * `name` Player you wish to teleport to their home position + * return value: false if player cannot be sent home, otherwise true + + +Sfinv API +--------- + +It is recommended that you read this link for a good introduction to the +sfinv API by its author: https://rubenwardy.com/minetest_modding_book/en/chapters/sfinv.html + +### sfinv Methods + +**Pages** + +* sfinv.set_page(player, pagename) - changes the page +* sfinv.get_page(player) - get the current page name. Will never return nil +* sfinv.get_homepage_name(player) - get the page name of the first page to show to a player +* sfinv.register_page(name, def) - register a page, see section below +* sfinv.override_page(name, def) - overrides fields of an page registered with register_page. + * Note: Page must already be defined, (opt)depend on the mod defining it. +* sfinv.set_player_inventory_formspec(player) - (re)builds page formspec + and calls set_inventory_formspec(). +* sfinv.get_formspec(player, context) - builds current page's formspec + +**Contexts** + +* sfinv.get_or_create_context(player) - gets the player's context +* sfinv.set_context(player, context) + +**Theming** + +* sfinv.make_formspec(player, context, content, show_inv, size) - adds a theme to a formspec + * show_inv, defaults to false. Whether to show the player's main inventory + * size, defaults to `size[8,8.6]` if not specified +* sfinv.get_nav_fs(player, context, nav, current_idx) - creates tabheader or "" + +### sfinv Members + +* pages - table of pages[pagename] = def +* pages_unordered - array table of pages in order of addition (used to build navigation tabs). +* contexts - contexts[playername] = player_context +* enabled - set to false to disable. Good for inventory rehaul mods like unified inventory + +### Context + +A table with these keys: + +* page - current page name +* nav - a list of page names +* nav_titles - a list of page titles +* nav_idx - current nav index (in nav and nav_titles) +* any thing you want to store + * sfinv will clear the stored data on log out / log in + +### sfinv.register_page + +sfinv.register_page(name, def) + +def is a table containing: + +* `title` - human readable page name (required) +* `get(self, player, context)` - returns a formspec string. See formspec variables. (required) +* `is_in_nav(self, player, context)` - return true to show in the navigation (the tab header, by default) +* `on_player_receive_fields(self, player, context, fields)` - on formspec submit. +* `on_enter(self, player, context)` - called when the player changes pages, usually using the tabs. +* `on_leave(self, player, context)` - when leaving this page to go to another, called before other's on_enter + +### get formspec + +Use sfinv.make_formspec to apply a layout: + + return sfinv.make_formspec(player, context, [[ + list[current_player;craft;1.75,0.5;3,3;] + list[current_player;craftpreview;5.75,1.5;1,1;] + image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270] + listring[current_player;main] + listring[current_player;craft] + image[0,4.25;1,1;gui_hb_bg.png] + image[1,4.25;1,1;gui_hb_bg.png] + image[2,4.25;1,1;gui_hb_bg.png] + image[3,4.25;1,1;gui_hb_bg.png] + image[4,4.25;1,1;gui_hb_bg.png] + image[5,4.25;1,1;gui_hb_bg.png] + image[6,4.25;1,1;gui_hb_bg.png] + image[7,4.25;1,1;gui_hb_bg.png] + ]], true) + +See above (methods section) for more options. + +### Customising themes + +Simply override this function to change the navigation: + + function sfinv.get_nav_fs(player, context, nav, current_idx) + return "navformspec" + end + +And override this function to change the layout: + + function sfinv.make_formspec(player, context, content, show_inv, size) + local tmp = { + size or "size[8,8.6]", + theme_main, + sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx), + content + } + if show_inv then + tmp[4] = theme_inv + end + return table.concat(tmp, "") + end + + +Stairs API +---------- + +The stairs API lets you register stairs and slabs and ensures that they are registered the same way as those +delivered with Minetest Game, to keep them compatible with other mods. + +`stairs.register_stair(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + +`stairs.register_slab(subname, recipeitem, groups, images, description, sounds, worldaligntex)` + + * Registers a slab + * `subname`: Basically the material name (e.g. cobble) used for the slab name. Nodename pattern: "stairs:slab_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble" + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the slab's definition + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + +`stairs.register_stair_inner(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)` + + * Registers an inner corner stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_inner_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Inner" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + * `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional) + +`stairs.register_stair_outer(subname, recipeitem, groups, images, description, sounds, worldaligntex, full_description)` + + * Registers an outer corner stair + * `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_outer_subname" + * `recipeitem`: Item used in the craft recipe, e.g. "default:cobble", may be `nil` + * `groups`: See [Known damage and digging time defining groups] + * `images`: See [Tile definition] + * `description`: Used for the description field in the stair's definition with "Outer" prepended + * `sounds`: See [#Default sounds] + * `worldaligntex`: A bool to set all textures world-aligned. Default false. See [Tile definition] + * `full_description`: Overrides the description, bypassing string concatenation. This is useful for translation. (optional) + +``` +stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, + sounds, worldaligntex, desc_stair_inner, desc_stair_outer) +``` + + * A wrapper for stairs.register_stair, stairs.register_slab, stairs.register_stair_inner, stairs.register_stair_outer + * Uses almost the same arguments as stairs.register_stair + * `desc_stair`: Description for stair nodes. For corner stairs 'Inner' or 'Outer' will be prefixed unless + `desc_stair_inner` or `desc_stair_outer` are specified, which are used instead. + * `desc_slab`: Description for slab node + * `desc_stair_inner`: Description for inner stair node + * `desc_stair_outer`: Description for outer stair node + + +Xpanes API +---------- + +Creates panes that automatically connect to each other + +`xpanes.register_pane(subname, def)` + + * `subname`: used for nodename. Result: "xpanes:subname" and "xpanes:subname_{2..15}" + * `def`: See [#Pane definition] + +### Pane definition + + { + textures = { + "texture for front and back", + (unused), + "texture for the 4 edges" + }, -- More tiles aren't supported + groups = {group = rating}, -- Uses the known node groups, see [Known damage and digging time defining groups] + sounds = SoundSpec, -- See [#Default sounds] + recipe = {{"","","","","","","","",""}}, -- Recipe field only + use_texture_alpha = true, -- Optional boolean (default: `false`) for colored glass panes + } + + +Raillike definitions +-------------------- + +The following nodes use the group `connect_to_raillike` and will only connect to +raillike nodes within this group and the same group value. +Use `minetest.raillike_group()` to get the group value. + +| Node type | Raillike group name +|-----------------------|--------------------- +| default:rail | "rail" +| tnt:gunpowder | "gunpowder" +| tnt:gunpowder_burning | "gunpowder" + +Example: +If you want to add a new rail type and want it to connect with default:rail, +add `connect_to_raillike=minetest.raillike_group("rail")` into the `groups` table +of your node. + + +Default sounds +-------------- + +Sounds inside the default table can be used within the sounds field of node definitions. + + * `default.node_sound_defaults()` + * `default.node_sound_stone_defaults()` + * `default.node_sound_dirt_defaults()` + * `default.node_sound_sand_defaults()` + * `default.node_sound_wood_defaults()` + * `default.node_sound_leaves_defaults()` + * `default.node_sound_glass_defaults()` + * `default.node_sound_metal_defaults()` + + +Default constants +----------------- + +`default.LIGHT_MAX` The maximum light level (see [Node definition] light_source) + + +GUI and formspecs +----------------- + +`default.get_hotbar_bg(x, y)` + + * Get the hotbar background as string, containing the formspec elements + * x: Horizontal position in the formspec + * y: Vertical position in the formspec + +`default.gui_bg` + + * Deprecated, remove from mods. + +`default.gui_bg_img` + + * Deprecated, remove from mods. + +`default.gui_slots` + + * Deprecated, remove from mods. + +`default.gui_survival_form` + + * Entire formspec for the survival inventory + +`default.get_furnace_active_formspec(fuel_percent, item_percent)` + + * Get the active furnace formspec using the defined GUI elements + * fuel_percent: Percent of how much the fuel is used + * item_percent: Percent of how much the item is cooked + +`default.get_furnace_inactive_formspec()` + + * Get the inactive furnace formspec using the defined GUI elements + + +Leafdecay +--------- + +To enable leaf decay for leaves when a tree is cut down by a player, +register the tree with the default.register_leafdecay(leafdecaydef) +function. + +If `param2` of any registered node is ~= 0, the node will always be +preserved. Thus, if the player places a node of that kind, you will +want to set `param2 = 1` or so. + +The function `default.after_place_leaves` can be set as +`after_place_node of a node` to set param2 to 1 if the player places +the node (should not be used for nodes that use param2 otherwise +(e.g. facedir)). + +If the node is in the `leafdecay_drop` group then it will always be +dropped as an item. + +`default.register_leafdecay(leafdecaydef)` + +`leafdecaydef` is a table, with following members: + { + trunks = {"default:tree"}, -- nodes considered trunks + leaves = {"default:leaves", "default:apple"}, + -- nodes considered for removal + radius = 3, -- radius to consider for searching + } + +Note: all the listed nodes in `trunks` have their `on_after_destruct` +callback overridden. All the nodes listed in `leaves` have their +`on_timer` callback overridden. + + +Dyes +---- + +Minetest Game dyes are registered with: + + groups = {dye = 1, color_ = 1}, + +To make recipes that will work with dyes from many mods, define them using the +dye group and the color groups. + +Dye color groups: + + * `color_white` + * `color_grey` + * `color_dark_grey` + * `color_black` + * `color_red` + * `color_pink` + * `color_orange` + * `color_brown` + * `color_yellow` + * `color_green` + * `color_dark_green` + * `color_blue` + * `color_cyan` + * `color_violet` + * `color_magenta` + +Example of one shapeless recipe using the dye group and a color group: + + minetest.register_craft({ + type = "shapeless", + output = ":item_yellow", + recipe = {":item_no_color", "group:dye,color_yellow"}, + }) + + +Trees +----- + + * `default.grow_tree(pos, is_apple_tree)` + * Grows a mgv6 tree or apple tree at pos + + * `default.grow_jungle_tree(pos)` + * Grows a mgv6 jungletree at pos + + * `default.grow_pine_tree(pos)` + * Grows a mgv6 pinetree at pos + + * `default.grow_new_apple_tree(pos)` + * Grows a new design apple tree at pos + + * `default.grow_new_jungle_tree(pos)` + * Grows a new design jungle tree at pos + + * `default.grow_new_pine_tree(pos)` + * Grows a new design pine tree at pos + + * `default.grow_new_snowy_pine_tree(pos)` + * Grows a new design snowy pine tree at pos + + * `default.grow_new_acacia_tree(pos)` + * Grows a new design acacia tree at pos + + * `default.grow_new_aspen_tree(pos)` + * Grows a new design aspen tree at pos + + * `default.grow_bush(pos)` + * Grows a bush at pos + + * `default.grow_acacia_bush(pos)` + * Grows an acaia bush at pos + + * `default.grow_pine_bush(pos)` + * Grows a pine bush at pos + + * `default.grow_blueberry_bush(pos)` + * Grows a blueberry bush at pos + + +Carts +----- + + carts.register_rail( + "mycarts:myrail", -- Rail name + nodedef, -- standard nodedef + railparams -- rail parameter struct (optional) + ) + + railparams = { + on_step(obj, dtime), -- Event handler called when + -- cart is on rail + acceleration, -- integer acceleration factor (negative + -- values to brake) + } + + The event handler is called after all default calculations + are made, so the custom on_step handler can override things + like speed, acceleration, player attachment. The handler will + likely be called many times per second, so the function needs + to make sure that the event is handled properly. + + +Key API +------- + +The key API allows mods to add key functionality to nodes that have +ownership or specific permissions. Using the API will make it so +that a node owner can use skeleton keys on their nodes to create keys +for that node in that location, and give that key to other players, +allowing them some sort of access that they otherwise would not have +due to node protection. + +To make your new nodes work with the key API, you need to register +two callback functions in each nodedef: + + +`on_key_use(pos, player)` + * Is called when a player right-clicks (uses) a normal key on your + * node. + * `pos` - position of the node + * `player` - PlayerRef + * return value: none, ignored + +The `on_key_use` callback should validate that the player is wielding +a key item with the right key meta secret. If needed the code should +deny access to the node functionality. + +If formspecs are used, the formspec callbacks should duplicate these +checks in the metadata callback functions. + + +`on_skeleton_key_use(pos, player, newsecret)` + + * Is called when a player right-clicks (uses) a skeleton key on your + * node. + * `pos` - position of the node + * `player` - PlayerRef + * `newsecret` - a secret value(string) + * return values: + * `secret` - `nil` or the secret value that unlocks the door + * `name` - a string description of the node ("a locked chest") + * `owner` - name of the node owner + +The `on_skeleton_key_use` function should validate that the player has +the right permissions to make a new key for the item. The newsecret +value is useful if the node has no secret value. The function should +store this secret value somewhere so that in the future it may compare +key secrets and match them to allow access. If a node already has a +secret value, the function should return that secret value instead +of the newsecret value. The secret value stored for the node should +not be overwritten, as this would invalidate existing keys. + +Aside from the secret value, the function should retun a descriptive +name for the node and the owner name. The return values are all +encoded in the key that will be given to the player in replacement +for the wielded skeleton key. + +if `nil` is returned, it is assumed that the wielder did not have +permissions to create a key for this node, and no key is created. + +`default.register_craft_metadata_copy(ingredient, result)` +---------------------------------------------------------- + +This function registers a shapeless recipe that takes `ingredient` +and `result` as input and outputs `result`. + +The metadata of the input `result` is copied to the output `result`. diff --git a/mods/minetest_game/game_commands/README.txt b/mods/minetest_game/game_commands/README.txt new file mode 100644 index 0000000..a451608 --- /dev/null +++ b/mods/minetest_game/game_commands/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: game_commands +================================ +See license.txt for license information. + +Authors of source code +---------------------- +rubenwardy (MIT) diff --git a/mods/minetest_game/game_commands/init.lua b/mods/minetest_game/game_commands/init.lua new file mode 100644 index 0000000..e038be1 --- /dev/null +++ b/mods/minetest_game/game_commands/init.lua @@ -0,0 +1,31 @@ +-- game_commands/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("game_commands") + + +minetest.register_chatcommand("killme", { + description = S("Kill yourself to respawn"), + func = function(name) + local player = minetest.get_player_by_name(name) + if player then + if minetest.settings:get_bool("enable_damage") then + player:set_hp(0) + return true + else + for _, callback in pairs(minetest.registered_on_respawnplayers) do + if callback(player) then + return true + end + end + + -- There doesn't seem to be a way to get a default spawn pos + -- from the lua API + return false, S("No static_spawnpoint defined") + end + else + -- Show error message if used when not logged in, eg: from IRC mod + return false, S("You need to be online to be killed!") + end + end +}) diff --git a/mods/minetest_game/game_commands/license.txt b/mods/minetest_game/game_commands/license.txt new file mode 100644 index 0000000..fa85564 --- /dev/null +++ b/mods/minetest_game/game_commands/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017-2018 rubenwardy + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/minetest_game/game_commands/locale/game_commands.de.tr b/mods/minetest_game/game_commands/locale/game_commands.de.tr new file mode 100644 index 0000000..24b0e25 --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.de.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Selbstmord begehen, um zu Respawnen +No static_spawnpoint defined=Kein static_spawnpoint definiert +You need to be online to be killed!=Sie müssen online sein, um getötet zu werden! diff --git a/mods/minetest_game/game_commands/locale/game_commands.eo.tr b/mods/minetest_game/game_commands/locale/game_commands.eo.tr new file mode 100644 index 0000000..08bcdec --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.eo.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Ĉesigu vi mem por renaski +No static_spawnpoint defined=Ne estas difina static_spawnpoint +You need to be online to be killed!=Vi devas esti onlina por ĉesigi! diff --git a/mods/minetest_game/game_commands/locale/game_commands.es.tr b/mods/minetest_game/game_commands/locale/game_commands.es.tr new file mode 100644 index 0000000..702a2ef --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.es.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Suicídate para reaparecer +No static_spawnpoint defined=No se ha definido un punto de aparición +You need to be online to be killed!=¡Necesitas estar en línea para que te maten! diff --git a/mods/minetest_game/game_commands/locale/game_commands.fr.tr b/mods/minetest_game/game_commands/locale/game_commands.fr.tr new file mode 100644 index 0000000..0e295d6 --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.fr.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Se suicider pour réapparaître +No static_spawnpoint defined=Pas de point d'apparition défini +You need to be online to be killed!=Vous devez être en ligne pour être tué ! diff --git a/mods/minetest_game/game_commands/locale/game_commands.id.tr b/mods/minetest_game/game_commands/locale/game_commands.id.tr new file mode 100644 index 0000000..1ab364b --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.id.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Bunuh diri untuk bangkit kembali +No static_spawnpoint defined=Tiada static_spawnpoint (titik bangkit statis) yang diatur +You need to be online to be killed!=Anda harus daring untuk dibunuh! diff --git a/mods/minetest_game/game_commands/locale/game_commands.it.tr b/mods/minetest_game/game_commands/locale/game_commands.it.tr new file mode 100644 index 0000000..91646b0 --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.it.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Ucciditi per ricomparire +No static_spawnpoint defined=Nessuno static_spawnpoint definito +You need to be online to be killed!=Devi essere in linea per essere ucciso! diff --git a/mods/minetest_game/game_commands/locale/game_commands.jbo.tr b/mods/minetest_game/game_commands/locale/game_commands.jbo.tr new file mode 100644 index 0000000..ddddcd7 --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.jbo.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=.i ro nu do catra do cu tadji pa nu do tolcanci +No static_spawnpoint defined=.i no da ckaji lo me la'o zoi.static_spawnpoint.zoi +You need to be online to be killed!=.i lo nu samjo'e cu sarcu lo nu do se catra diff --git a/mods/minetest_game/game_commands/locale/game_commands.ms.tr b/mods/minetest_game/game_commands/locale/game_commands.ms.tr new file mode 100644 index 0000000..ed4a0bd --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.ms.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Bunuh diri anda untuk lahir semula +No static_spawnpoint defined=Tiada titik permulaan statik (tetapan static_spawnpoint) ditakrifkan +You need to be online to be killed!=Anda mesti berada dalam talian untuk dibunuh! diff --git a/mods/minetest_game/game_commands/locale/game_commands.pt_BR.tr b/mods/minetest_game/game_commands/locale/game_commands.pt_BR.tr new file mode 100644 index 0000000..6c52c0b --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.pt_BR.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Mate-se para reaparecer +No static_spawnpoint defined=Nenhum ponto de reaparecer estático definido +You need to be online to be killed!=Você precisa estar online para ser morto! diff --git a/mods/minetest_game/game_commands/locale/game_commands.ru.tr b/mods/minetest_game/game_commands/locale/game_commands.ru.tr new file mode 100644 index 0000000..26d9e08 --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.ru.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Убейте себя, чтобы возродиться +No static_spawnpoint defined=static_spawnpoint не определён +You need to be online to be killed!=Вы должны быть онлайн, чтобы убить себя! diff --git a/mods/minetest_game/game_commands/locale/game_commands.se.tr b/mods/minetest_game/game_commands/locale/game_commands.se.tr new file mode 100644 index 0000000..afefc9b --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.se.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Döda dig själv för att respawna +No static_spawnpoint defined=Ingen static_spawnpoint definierat +You need to be online to be killed!=Du måsta vara online för att bli dödad! diff --git a/mods/minetest_game/game_commands/locale/game_commands.sk.tr b/mods/minetest_game/game_commands/locale/game_commands.sk.tr new file mode 100644 index 0000000..f7d153a --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.sk.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=Samovražda pre znovuzrodenie +No static_spawnpoint defined=Nie je definované stále miesto znovuzrodenia +You need to be online to be killed!=Musíš byť online, aby si mohol byť zabitý! diff --git a/mods/minetest_game/game_commands/locale/game_commands.zh_CN.tr b/mods/minetest_game/game_commands/locale/game_commands.zh_CN.tr new file mode 100644 index 0000000..3c69dfb --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=杀死自己并重生 +No static_spawnpoint defined=static_spawnpoint 未定义 +You need to be online to be killed!=您需要在线才能被杀死! diff --git a/mods/minetest_game/game_commands/locale/game_commands.zh_TW.tr b/mods/minetest_game/game_commands/locale/game_commands.zh_TW.tr new file mode 100644 index 0000000..34e148d --- /dev/null +++ b/mods/minetest_game/game_commands/locale/game_commands.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn=殺死自己並重生 +No static_spawnpoint defined=static_spawnpoint 未定義 +You need to be online to be killed!=您需要在線才能被殺死! diff --git a/mods/minetest_game/game_commands/locale/template.txt b/mods/minetest_game/game_commands/locale/template.txt new file mode 100644 index 0000000..903f160 --- /dev/null +++ b/mods/minetest_game/game_commands/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: game_commands +Kill yourself to respawn= +No static_spawnpoint defined= +You need to be online to be killed!= diff --git a/mods/minetest_game/game_commands/mod.conf b/mods/minetest_game/game_commands/mod.conf new file mode 100644 index 0000000..5571ff5 --- /dev/null +++ b/mods/minetest_game/game_commands/mod.conf @@ -0,0 +1,2 @@ +name = game_commands +description = Minetest Game mod: game_commands diff --git a/mods/minetest_game/give_initial_stuff/README.txt b/mods/minetest_game/give_initial_stuff/README.txt new file mode 100644 index 0000000..cbd240f --- /dev/null +++ b/mods/minetest_game/give_initial_stuff/README.txt @@ -0,0 +1,8 @@ +Minetest Game mod: give_initial_stuff +===================================== +See license.txt for license information. + +Authors of source code +---------------------- +Perttu Ahola (celeron55) (MIT) +Various Minetest developers and contributors (MIT) diff --git a/mods/minetest_game/give_initial_stuff/init.lua b/mods/minetest_game/give_initial_stuff/init.lua new file mode 100644 index 0000000..dbcc3f8 --- /dev/null +++ b/mods/minetest_game/give_initial_stuff/init.lua @@ -0,0 +1,46 @@ +-- gave_initial_stuff/init.lua + +local stuff_string = minetest.settings:get("initial_stuff") or + "default:pick_wood,default:axe_wood,default:shovel_wood,default:apple,".. + "farming:breadº" + +give_initial_stuff = { + items = {} +} + +function give_initial_stuff.give(player) + minetest.log("action", + "Giving initial stuff to player " .. player:get_player_name()) + local inv = player:get_inventory() + for _, stack in ipairs(give_initial_stuff.items) do + inv:add_item("main", stack) + end +end + +function give_initial_stuff.add(stack) + give_initial_stuff.items[#give_initial_stuff.items + 1] = ItemStack(stack) +end + +function give_initial_stuff.clear() + give_initial_stuff.items = {} +end + +function give_initial_stuff.add_from_csv(str) + local items = str:split(",") + for _, itemname in ipairs(items) do + give_initial_stuff.add(itemname) + end +end + +function give_initial_stuff.set_list(list) + give_initial_stuff.items = list +end + +function give_initial_stuff.get_list() + return give_initial_stuff.items +end + +give_initial_stuff.add_from_csv(stuff_string) +if minetest.settings:get_bool("give_initial_stuff") then + minetest.register_on_newplayer(give_initial_stuff.give) +end diff --git a/mods/minetest_game/give_initial_stuff/license.txt b/mods/minetest_game/give_initial_stuff/license.txt new file mode 100644 index 0000000..8134c92 --- /dev/null +++ b/mods/minetest_game/give_initial_stuff/license.txt @@ -0,0 +1,25 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/minetest_game/give_initial_stuff/mod.conf b/mods/minetest_game/give_initial_stuff/mod.conf new file mode 100644 index 0000000..51d31ae --- /dev/null +++ b/mods/minetest_game/give_initial_stuff/mod.conf @@ -0,0 +1,3 @@ +name = give_initial_stuff +description = Minetest Game mod: give_initial_stuff +depends = default diff --git a/mods/minetest_game/hudinfo/init.lua b/mods/minetest_game/hudinfo/init.lua new file mode 100644 index 0000000..7d82e1a --- /dev/null +++ b/mods/minetest_game/hudinfo/init.lua @@ -0,0 +1,87 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +local hbinfo = {} +hbinfo.players = {} + +minetest.register_on_leaveplayer(function(player) + hbinfo.players[player:get_player_name()] = nil +end) + +local biome_description = { + grassland = S("Grassland"), + coniferous_forest = S("Coniferous forest"), + deciduous_forest = S("Deciduous forest"), + rainforest = S("Rainforest"), + savanna = S("Savanna"), + desert = S("Desert"), + sandstone_desert = S("Sandstone desert"), + cold_desert = S("Cold desert"), + snowy_grassland = S("Snowy grassland"), + taiga = S("Taiga"), + tundra = S("Tundra"), + ice_sheet = S("Ice Sheet"), + grassland_dunes = S("Grassland dunes"), + coniferous_forest_dunes = S("Coniferous forest dunes"), + deciduous_forest_shore = S("Deciduous forest shore"), + rainforest_swamp = S("Rainforest swamp"), + savanna_shore = S("Savanna shore"), + taiga_beach = S("Taiga beach"), + tundra_beach = S("Tundra beach"), + tundra_ocean = S("Tundra ocean"), + snowy_grassland_ocean = S("Snowy grassland ocean"), + grassland_ocean = S("Grassland ocean"), + coniferous_forest_ocean = S("Coniferous forest ocean"), + deciduous_forest_ocean = S("Deciduous forest ocean"), + cold_desert_ocean = S("Cold desert ocean"), + sandstone_desert_ocean = S("Sandstone desert ocean"), + savanna_ocean = S("Savanna ocean"), + rainforest_ocean = S("Rainforest ocean"), + desert_ocean = S("Desert ocean"), + ice_sheet_ocean = S("Ice sheet ocean"), + swampz = S("Swamp"), + swampz_shore = S("Swampz shore"), + temperate_rainforest = S("Temperate rainforest"), + salt_desert = S("Salt desert"), +} + +local function get_biome_name(player) + local biome_name = minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome) or "" + if biome_name == "" then + return biome_name + end + local description = biome_description[biome_name] or "" + return description +end + +minetest.register_on_joinplayer(function(player) + local player_name = player:get_player_name() + local _biome_name = get_biome_name(player) + local _idx = player:hud_add({ + hud_elem_type = "text", + number = "0xFFFFFF", + position = {x = 0, y = 1}, + text = _biome_name, + alignment = {x = 1, y = -1}, + scale = {x = 100, y = 100}, + }) + hbinfo.players[player_name] = {idx = _idx, biome_name = _biome_name} +end) + +local timer = 0 +minetest.register_globalstep(function(dtime) + timer = timer + dtime; + if timer >= 1 then + for _, player in pairs(minetest.get_connected_players()) do + local biome_name = get_biome_name(player) + local player_name = player:get_player_name() + if not(biome_name == hbinfo.players[player_name].biome_name) then + hbinfo.players[player_name].biome_name = biome_name + player:hud_change(hbinfo.players[player_name].idx, "text", biome_name) + end + end + timer = 0 + end +end) + + + diff --git a/mods/minetest_game/hudinfo/locale/hudinfo.es.tr b/mods/minetest_game/hudinfo/locale/hudinfo.es.tr new file mode 100644 index 0000000..fdef787 --- /dev/null +++ b/mods/minetest_game/hudinfo/locale/hudinfo.es.tr @@ -0,0 +1,35 @@ +# textdomain: hudinfo +Grassland=Pradera +Coniferous forest=Bosque de coníferas +Deciduous forest=Bosque caducifolio +Rainforest=Bosque tropical +Savanna=Sabana +Desert=Desierto +Sandstone desert=Desierto de arenisca +Cold desert=Desierto frío +Snowy grassland=Pradera nevada +Taiga=Taiga +Tundra=Tundra +Ice Sheet=Casquete glaciar +Grassland dunes=Dunas de pradera +Coniferous forest dunes=Dunas de bosque de coníferas +Deciduous forest shore=Costa de bosque caducifolio +Rainforest swamp=Pantano de selva tropical +Savanna shore=Costa de sabana +Taiga beach=Playa de taiga +Tundra beach=Playa de tundra +Tundra ocean=Oceáno de tundra +Snowy grassland ocean=Oceáno de pradera nevada +Grassland ocean=Oceáno de pradera +Coniferous forest ocean=Oceáno de bosque de coníferas +Deciduous forest ocean=Oceáno de bosque caducifolio +Cold desert ocean=Oceáno de desierto frío +Sandstone desert ocean=Oceáno de desierto de arenisca +Savanna ocean=Oceáno de sabana +Rainforest ocean=Oceáno de selva tropical +Desert ocean=Oceáno de desierto +Ice sheet ocean=Oceáno de glaciar +Swamp=Ciénaga +Swampz shore=Costa de ciénaga +Temperate rainforest=Bosque húmedo templado +Salt desert=Desierto de sal diff --git a/mods/minetest_game/hudinfo/mod.conf b/mods/minetest_game/hudinfo/mod.conf new file mode 100644 index 0000000..2a04ea5 --- /dev/null +++ b/mods/minetest_game/hudinfo/mod.conf @@ -0,0 +1,3 @@ +name = hudinfo +description = Some info as biome, time... for the player +depends = default diff --git a/mods/minetest_game/map/README.txt b/mods/minetest_game/map/README.txt new file mode 100644 index 0000000..068439a --- /dev/null +++ b/mods/minetest_game/map/README.txt @@ -0,0 +1,44 @@ +Minetest Game mod: map +====================== +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) + +Authors of media (textures) +--------------------------- +TumeniNodes (CC BY-SA 3.0): + map_mapping_kit.png (map) + +paramat (CC BY-SA 3.0): + map_mapping_kit.png (compass and pen) + +Crafting +-------- +map:mapping_kit + +default:glass G +default:paper P +group:stick S +default:steel_ingot I +group:wood W +dye:black D + +GPS +IPI +WPD + +Usage +----- +In survival mode, use of the minimap requires the mapping kit item in your +inventory. It can take up to 5 seconds for adding to or removal from inventory +to have an effect, however to instantly allow the use of the minimap 'use' +(leftclick) the item. +Minimap radar mode is always disallowed in survival mode. + +Minimap and minimap radar mode are automatically allowed in creative mode and +for any player with the 'creative' privilege. + +The 'map.update_hud_flags()' function is global so can be redefined by a mod for +alternative behaviour. diff --git a/mods/minetest_game/map/init.lua b/mods/minetest_game/map/init.lua new file mode 100644 index 0000000..b91e528 --- /dev/null +++ b/mods/minetest_game/map/init.lua @@ -0,0 +1,80 @@ +-- map/init.lua + +-- Mod global namespace + +map = {} + + +-- Load support for MT game translation. +local S = minetest.get_translator("map") + + +-- Update HUD flags +-- Global to allow overriding + +function map.update_hud_flags(player) + local creative_enabled = minetest.is_creative_enabled(player:get_player_name()) + + local minimap_enabled = creative_enabled or + player:get_inventory():contains_item("main", "map:mapping_kit") + local radar_enabled = creative_enabled + + player:hud_set_flags({ + minimap = minimap_enabled, + minimap_radar = radar_enabled + }) +end + + +-- Set HUD flags 'on joinplayer' + +minetest.register_on_joinplayer(function(player) + map.update_hud_flags(player) +end) + + +-- Cyclic update of HUD flags + +local function cyclic_update() + for _, player in ipairs(minetest.get_connected_players()) do + map.update_hud_flags(player) + end + minetest.after(5.3, cyclic_update) +end + +minetest.after(5.3, cyclic_update) + + +-- Mapping kit item + +minetest.register_craftitem("map:mapping_kit", { + description = S("Mapping Kit") .. "\n" .. S("Use with 'Minimap' key"), + inventory_image = "map_mapping_kit.png", + stack_max = 1, + groups = {flammable = 3, tool = 1}, + + on_use = function(itemstack, user, pointed_thing) + map.update_hud_flags(user) + end, +}) + + +-- Crafting + +minetest.register_craft({ + output = "map:mapping_kit", + recipe = { + {"default:glass", "default:paper", "group:stick"}, + {"default:steel_ingot", "default:paper", "default:steel_ingot"}, + {"group:wood", "default:paper", "dye:black"}, + } +}) + + +-- Fuel + +minetest.register_craft({ + type = "fuel", + recipe = "map:mapping_kit", + burntime = 5, +}) diff --git a/mods/minetest_game/map/license.txt b/mods/minetest_game/map/license.txt new file mode 100644 index 0000000..a89f59c --- /dev/null +++ b/mods/minetest_game/map/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2017 paramat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2017 TumeniNodes +Copyright (C) 2017 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/map/locale/map.de.tr b/mods/minetest_game/map/locale/map.de.tr new file mode 100644 index 0000000..1a784ab --- /dev/null +++ b/mods/minetest_game/map/locale/map.de.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kartenset +Use with 'Minimap' key=Mit „Karte an/aus“-Taste benutzen diff --git a/mods/minetest_game/map/locale/map.eo.tr b/mods/minetest_game/map/locale/map.eo.tr new file mode 100644 index 0000000..15c1cab --- /dev/null +++ b/mods/minetest_game/map/locale/map.eo.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Mapa Ilaro +Use with 'Minimap' key=Uzu per 'malgrandmapo' ŝlosilo diff --git a/mods/minetest_game/map/locale/map.es.tr b/mods/minetest_game/map/locale/map.es.tr new file mode 100644 index 0000000..0faed52 --- /dev/null +++ b/mods/minetest_game/map/locale/map.es.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit de cartografía +Use with 'Minimap' key=Usar con la tecla 'Minimapa' diff --git a/mods/minetest_game/map/locale/map.fr.tr b/mods/minetest_game/map/locale/map.fr.tr new file mode 100644 index 0000000..29f8e20 --- /dev/null +++ b/mods/minetest_game/map/locale/map.fr.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit de carthographie +Use with 'Minimap' key=Utiliser avec le bouton « Minimap » diff --git a/mods/minetest_game/map/locale/map.id.tr b/mods/minetest_game/map/locale/map.id.tr new file mode 100644 index 0000000..cb31d0f --- /dev/null +++ b/mods/minetest_game/map/locale/map.id.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Alat Pemetaan +Use with 'Minimap' key=Pakai dengan tombol 'Peta Mini' diff --git a/mods/minetest_game/map/locale/map.it.tr b/mods/minetest_game/map/locale/map.it.tr new file mode 100644 index 0000000..59885e9 --- /dev/null +++ b/mods/minetest_game/map/locale/map.it.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit di mappatura +Use with 'Minimap' key=Usalo col tasto 'Minimappa' diff --git a/mods/minetest_game/map/locale/map.jbo.tr b/mods/minetest_game/map/locale/map.jbo.tr new file mode 100644 index 0000000..8f37c18 --- /dev/null +++ b/mods/minetest_game/map/locale/map.jbo.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=lo cartu ke sidju bakfu +Use with 'Minimap' key=.i tu'a le cmalu cartu batke cu tadji lo nu pilno diff --git a/mods/minetest_game/map/locale/map.ms.tr b/mods/minetest_game/map/locale/map.ms.tr new file mode 100644 index 0000000..8564f91 --- /dev/null +++ b/mods/minetest_game/map/locale/map.ms.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Alat Pemetaan +Use with 'Minimap' key=Guna dengan kekunci 'Peta Mini' diff --git a/mods/minetest_game/map/locale/map.pt_BR.tr b/mods/minetest_game/map/locale/map.pt_BR.tr new file mode 100644 index 0000000..0095c39 --- /dev/null +++ b/mods/minetest_game/map/locale/map.pt_BR.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kit de mapeamento +Use with 'Minimap' key=Use com a tecla do 'mini-mapa' diff --git a/mods/minetest_game/map/locale/map.ru.tr b/mods/minetest_game/map/locale/map.ru.tr new file mode 100644 index 0000000..73120b6 --- /dev/null +++ b/mods/minetest_game/map/locale/map.ru.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Картографический комплект +Use with 'Minimap' key=Используйте с ключом 'Minimap' diff --git a/mods/minetest_game/map/locale/map.se.tr b/mods/minetest_game/map/locale/map.se.tr new file mode 100644 index 0000000..de6ac36 --- /dev/null +++ b/mods/minetest_game/map/locale/map.se.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kartläggningssats +Use with 'Minimap' key=Använd med 'Minimap' tangent diff --git a/mods/minetest_game/map/locale/map.sk.tr b/mods/minetest_game/map/locale/map.sk.tr new file mode 100644 index 0000000..2016c85 --- /dev/null +++ b/mods/minetest_game/map/locale/map.sk.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=Kartografická súprava +Use with 'Minimap' key=Použi klávesou 'Prepni minimpu' diff --git a/mods/minetest_game/map/locale/map.zh_CN.tr b/mods/minetest_game/map/locale/map.zh_CN.tr new file mode 100644 index 0000000..cec95bb --- /dev/null +++ b/mods/minetest_game/map/locale/map.zh_CN.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=地图绘制工具包 +Use with 'Minimap' key=与“迷你地图”键一起使用 diff --git a/mods/minetest_game/map/locale/map.zh_TW.tr b/mods/minetest_game/map/locale/map.zh_TW.tr new file mode 100644 index 0000000..a098124 --- /dev/null +++ b/mods/minetest_game/map/locale/map.zh_TW.tr @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit=地圖繪製工具包 +Use with 'Minimap' key=與“迷你地圖”鍵一起使用 diff --git a/mods/minetest_game/map/locale/template.txt b/mods/minetest_game/map/locale/template.txt new file mode 100644 index 0000000..2dbe2ee --- /dev/null +++ b/mods/minetest_game/map/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: map +Mapping Kit= +Use with 'Minimap' key= diff --git a/mods/minetest_game/map/mod.conf b/mods/minetest_game/map/mod.conf new file mode 100644 index 0000000..bb045c7 --- /dev/null +++ b/mods/minetest_game/map/mod.conf @@ -0,0 +1,3 @@ +name = map +description = Minetest Game mod: map +depends = default, dye diff --git a/mods/minetest_game/map/textures/map_mapping_kit.png b/mods/minetest_game/map/textures/map_mapping_kit.png new file mode 100644 index 0000000..015b878 Binary files /dev/null and b/mods/minetest_game/map/textures/map_mapping_kit.png differ diff --git a/mods/minetest_game/modpack.txt b/mods/minetest_game/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/minetest_game/mtg_craftguide/README.md b/mods/minetest_game/mtg_craftguide/README.md new file mode 100644 index 0000000..9c4ed7a --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/README.md @@ -0,0 +1,25 @@ +Minetest Game mod: mtg_craftguide +================================= + +Adds a "Recipes" tab to the inventory. Click an item to see it's recipes. +Click again to show usages. + +Based on [craftguide](https://github.com/minetest-mods/craftguide). + +Authors of media +---------------- + +paramat (CC BY-SA 3.0): + +* craftguide_clear_icon.png +* craftguide_next_icon.png +* craftguide_prev_icon.png +* craftguide_search_icon.png + +Neuromancer (CC BY-SA 3.0): + +* craftguide_furnace.png + +Wuzzy (CC BY-SA 3.0): + +* craftguide_shapeless.png diff --git a/mods/minetest_game/mtg_craftguide/init.lua b/mods/minetest_game/mtg_craftguide/init.lua new file mode 100644 index 0000000..f3de3db --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/init.lua @@ -0,0 +1,434 @@ +local S = minetest.get_translator("mtg_craftguide") +local esc = minetest.formspec_escape + +local player_data = {} +local init_items = {} +local recipes_cache = {} +local usages_cache = {} + +local group_stereotypes = { + dye = "dye:white", + wool = "wool:white", + coal = "default:coal_lump", + vessel = "vessels:glass_bottle", + flower = "flowers:dandelion_yellow" +} + +local group_names = { + coal = S("Any coal"), + sand = S("Any sand"), + wool = S("Any wool"), + stick = S("Any stick"), + vessel = S("Any vessel"), + wood = S("Any wood planks"), + stone = S("Any kind of stone block"), + + ["color_red,flower"] = S("Any red flower"), + ["color_blue,flower"] = S("Any blue flower"), + ["color_black,flower"] = S("Any black flower"), + ["color_green,flower"] = S("Any green flower"), + ["color_white,flower"] = S("Any white flower"), + ["color_orange,flower"] = S("Any orange flower"), + ["color_violet,flower"] = S("Any violet flower"), + ["color_yellow,flower"] = S("Any yellow flower"), + + ["color_red,dye"] = S("Any red dye"), + ["color_blue,dye"] = S("Any blue dye"), + ["color_cyan,dye"] = S("Any cyan dye"), + ["color_grey,dye"] = S("Any grey dye"), + ["color_pink,dye"] = S("Any pink dye"), + ["color_black,dye"] = S("Any black dye"), + ["color_brown,dye"] = S("Any brown dye"), + ["color_green,dye"] = S("Any green dye"), + ["color_white,dye"] = S("Any white dye"), + ["color_orange,dye"] = S("Any orange dye"), + ["color_violet,dye"] = S("Any violet dye"), + ["color_yellow,dye"] = S("Any yellow dye"), + ["color_magenta,dye"] = S("Any magenta dye"), + ["color_dark_grey,dye"] = S("Any dark grey dye"), + ["color_dark_green,dye"] = S("Any dark green dye") +} + +local function table_replace(t, val, new) + for k, v in pairs(t) do + if v == val then + t[k] = new + end + end +end + +local function extract_groups(str) + if str:sub(1, 6) == "group:" then + return str:sub(7):split() + end + return nil +end + +local function item_has_groups(item_groups, groups) + for _, group in ipairs(groups) do + if not item_groups[group] then + return false + end + end + return true +end + +local function groups_to_item(groups) + if #groups == 1 then + local group = groups[1] + if group_stereotypes[group] then + return group_stereotypes[group] + elseif minetest.registered_items["default:"..group] then + return "default:"..group + end + end + + for name, def in pairs(minetest.registered_items) do + if item_has_groups(def.groups, groups) then + return name + end + end + + return ":unknown" +end + +local function get_craftable_recipes(output) + local recipes = minetest.get_all_craft_recipes(output) + if not recipes then + return nil + end + + for i = #recipes, 1, -1 do + for _, item in pairs(recipes[i].items) do + local groups = extract_groups(item) + if groups then + item = groups_to_item(groups) + end + if not minetest.registered_items[item] then + table.remove(recipes, i) + break + end + end + end + + if #recipes > 0 then + return recipes + end +end + +local function show_item(def) + return def.groups.not_in_craft_guide ~= 1 and def.description ~= "" +end + +local function cache_usages(recipe) + local added = {} + for _, item in pairs(recipe.items) do + if not added[item] then + local groups = extract_groups(item) + if groups then + for name, def in pairs(minetest.registered_items) do + if not added[name] and show_item(def) + and item_has_groups(def.groups, groups) then + local usage = table.copy(recipe) + table_replace(usage.items, item, name) + usages_cache[name] = usages_cache[name] or {} + table.insert(usages_cache[name], usage) + added[name] = true + end + end + elseif show_item(minetest.registered_items[item]) then + usages_cache[item] = usages_cache[item] or {} + table.insert(usages_cache[item], recipe) + end + added[item] = true + end + end +end + +minetest.register_on_mods_loaded(function() + for name, def in pairs(minetest.registered_items) do + if show_item(def) then + local recipes = get_craftable_recipes(name) + if recipes then + recipes_cache[name] = recipes + for _, recipe in ipairs(recipes) do + cache_usages(recipe) + end + end + end + end + for name, def in pairs(minetest.registered_items) do + if recipes_cache[name] or usages_cache[name] then + table.insert(init_items, name) + end + end + table.sort(init_items) +end) + +local function coords(i, cols) + return i % cols, math.floor(i / cols) +end + +local function is_fuel(item) + return minetest.get_craft_result({method="fuel", items={item}}).time > 0 +end + +local function item_button_fs(fs, x, y, item, element_name, groups) + table.insert(fs, ("item_image_button[%s,%s;1.05,1.05;%s;%s;%s]") + :format(x, y, item, element_name, groups and "\n"..esc(S("G")) or "")) + + local tooltip + if groups then + table.sort(groups) + tooltip = group_names[table.concat(groups, ",")] + if not tooltip then + local groupstr = {} + for _, group in ipairs(groups) do + table.insert(groupstr, minetest.colorize("yellow", group)) + end + groupstr = table.concat(groupstr, ", ") + tooltip = S("Any item belonging to the group(s): @1", groupstr) + end + elseif is_fuel(item) then + local itemdef = minetest.registered_items[item:match("%S*")] + local desc = itemdef and itemdef.description or S("Unknown Item") + tooltip = desc.."\n"..minetest.colorize("orange", S("Fuel")) + end + if tooltip then + table.insert(fs, ("tooltip[%s;%s]"):format(element_name, esc(tooltip))) + end +end + +local function recipe_fs(fs, data) + local recipe = data.recipes[data.rnum] + local width = recipe.width + local cooktime, shapeless + + if recipe.method == "cooking" then + cooktime, width = width, 1 + elseif width == 0 then + shapeless = true + if #recipe.items == 1 then + width = 1 + elseif #recipe.items <= 4 then + width = 2 + else + width = 3 + end + end + + table.insert(fs, ("label[5.5,1;%s]"):format(esc(data.show_usages + and S("Usage @1 of @2", data.rnum, #data.recipes) + or S("Recipe @1 of @2", data.rnum, #data.recipes)))) + + if #data.recipes > 1 then + table.insert(fs, + "image_button[5.5,1.6;0.8,0.8;craftguide_prev_icon.png;recipe_prev;]".. + "image_button[6.2,1.6;0.8,0.8;craftguide_next_icon.png;recipe_next;]".. + "tooltip[recipe_prev;"..esc(S("Previous recipe")).."]".. + "tooltip[recipe_next;"..esc(S("Next recipe")).."]") + end + + local rows = math.ceil(table.maxn(recipe.items) / width) + if width > 3 or rows > 3 then + table.insert(fs, ("label[0,1;%s]") + :format(esc(S("Recipe is too big to be displayed.")))) + return + end + + local base_x = 3 - width + local base_y = rows == 1 and 1 or 0 + + for i, item in pairs(recipe.items) do + local x, y = coords(i - 1, width) + + local elem_name = item + local groups = extract_groups(item) + if groups then + item = groups_to_item(groups) + elem_name = esc(item.."."..table.concat(groups, "+")) + end + item_button_fs(fs, base_x + x, base_y + y, item, elem_name, groups) + end + + if shapeless or recipe.method == "cooking" then + table.insert(fs, ("image[3.2,0.5;0.5,0.5;craftguide_%s.png]") + :format(shapeless and "shapeless" or "furnace")) + local tooltip = shapeless and S("Shapeless") or + S("Cooking time: @1", minetest.colorize("yellow", cooktime)) + table.insert(fs, "tooltip[3.2,0.5;0.5,0.5;"..esc(tooltip).."]") + end + table.insert(fs, "image[3,1;1,1;sfinv_crafting_arrow.png]") + + item_button_fs(fs, 4, 1, recipe.output, recipe.output:match("%S*")) +end + +local function get_formspec(player) + local name = player:get_player_name() + local data = player_data[name] + data.pagemax = math.max(1, math.ceil(#data.items / 32)) + + local fs = {} + table.insert(fs, + "style_type[item_image_button;padding=2]".. + "field[0.3,4.2;2.8,1.2;filter;;"..esc(data.filter).."]".. + "label[5.8,4.15;"..minetest.colorize("yellow", data.pagenum).." / ".. + data.pagemax.."]".. + "image_button[2.63,4.05;0.8,0.8;craftguide_search_icon.png;search;]".. + "image_button[3.25,4.05;0.8,0.8;craftguide_clear_icon.png;clear;]".. + "image_button[5,4.05;0.8,0.8;craftguide_prev_icon.png;prev;]".. + "image_button[7.25,4.05;0.8,0.8;craftguide_next_icon.png;next;]".. + "tooltip[search;"..esc(S("Search")).."]".. + "tooltip[clear;"..esc(S("Reset")).."]".. + "tooltip[prev;"..esc(S("Previous page")).."]".. + "tooltip[next;"..esc(S("Next page")).."]".. + "field_close_on_enter[filter;false]") + + if #data.items == 0 then + table.insert(fs, "label[3,2;"..esc(S("No items to show.")).."]") + else + local first_item = (data.pagenum - 1) * 32 + for i = first_item, first_item + 31 do + local item = data.items[i + 1] + if not item then + break + end + local x, y = coords(i % 32, 8) + item_button_fs(fs, x, y, item, item) + end + end + + table.insert(fs, "container[0,5.6]") + if data.recipes then + recipe_fs(fs, data) + elseif data.prev_item then + table.insert(fs, ("label[2,1;%s]"):format(esc(data.show_usages + and S("No usages.").."\n"..S("Click again to show recipes.") + or S("No recipes.").."\n"..S("Click again to show usages.")))) + end + table.insert(fs, "container_end[]") + + return table.concat(fs) +end + +local function imatch(str, filter) + return str:lower():find(filter, 1, true) ~= nil +end + +local function execute_search(data) + local filter = data.filter + if filter == "" then + data.items = init_items + return + end + data.items = {} + + for _, item in ipairs(init_items) do + local def = minetest.registered_items[item] + local desc = def and minetest.get_translated_string(data.lang_code, def.description) + + if imatch(item, filter) or desc and imatch(desc, filter) then + table.insert(data.items, item) + end + end +end + +local function on_receive_fields(player, fields) + local name = player:get_player_name() + local data = player_data[name] + + if fields.clear then + data.filter = "" + data.pagenum = 1 + data.prev_item = nil + data.recipes = nil + data.items = init_items + return true + + elseif fields.key_enter_field == "filter" or fields.search then + local new = fields.filter:lower() + if data.filter == new then + return + end + data.filter = new + data.pagenum = 1 + execute_search(data) + return true + + elseif fields.prev or fields.next then + if data.pagemax == 1 then + return + end + data.pagenum = data.pagenum + (fields.next and 1 or -1) + if data.pagenum > data.pagemax then + data.pagenum = 1 + elseif data.pagenum == 0 then + data.pagenum = data.pagemax + end + return true + + elseif fields.recipe_next or fields.recipe_prev then + data.rnum = data.rnum + (fields.recipe_next and 1 or -1) + if data.rnum > #data.recipes then + data.rnum = 1 + elseif data.rnum == 0 then + data.rnum = #data.recipes + end + return true + + else + local item + for field in pairs(fields) do + if field:find(":") then + item = field:match("[%w_:]+") + break + end + end + if not item then + return + end + + if item == data.prev_item then + data.show_usages = not data.show_usages + else + data.show_usages = nil + end + if data.show_usages then + data.recipes = usages_cache[item] + else + data.recipes = recipes_cache[item] + end + data.prev_item = item + data.rnum = 1 + return true + end +end + +minetest.register_on_joinplayer(function(player) + local name = player:get_player_name() + local info = minetest.get_player_information(name) + + player_data[name] = { + filter = "", + pagenum = 1, + items = init_items, + lang_code = info.lang_code + } +end) + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + player_data[name] = nil +end) + +sfinv.register_page("mtg_craftguide:craftguide", { + title = esc(S("Recipes")), + get = function(self, player, context) + return sfinv.make_formspec(player, context, get_formspec(player)) + end, + on_player_receive_fields = function(self, player, context, fields) + if on_receive_fields(player, fields) then + sfinv.set_player_inventory_formspec(player) + end + end +}) diff --git a/mods/minetest_game/mtg_craftguide/license.txt b/mods/minetest_game/mtg_craftguide/license.txt new file mode 100644 index 0000000..8d28c5c --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/license.txt @@ -0,0 +1,63 @@ +License of source code +---------------------- + +The MIT License (MIT) + +Copyright (C) 2015-2019 Jean-Patrick Guerrero and contributors. +Copyright (C) 2020 pauloue + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) + +Copyright (C) 2018 paramat +Copyright (C) Neuromancer +Copyright (C) 2017 Wuzzy + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.de.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.de.tr new file mode 100644 index 0000000..d90f833 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.de.tr @@ -0,0 +1,53 @@ +# textdomain: mtg_craftguide +Any coal=Beliebige Kohle +Any sand=Beliebiger Sand +Any wool=Beliebige Wolle +Any stick=Beliebiger Stock +Any vessel=Beliebiges Gefäß +Any wood planks=Beliebige Holzplanken +Any kind of stone block=Beliebige Art von Steinblock +Any red flower=Beliebige rote Blume +Any blue flower=Beliebige blaue Blume +Any black flower=Beliebige schwarze Blume +Any green flower=Beliebige grüne Blume +Any white flower=Beliebige weiße Blume +Any orange flower=Beliebige orange Blume +Any violet flower=Beliebige violette Blume +Any yellow flower=Beliebige gelbe Blume +Any red dye=Beliebiger roter Farbstoff +Any blue dye=Beliebiger blauer Farbstoff +Any cyan dye=Beliebiger türkiser Farbstoff +Any grey dye=Beliebiger grauer Farbstoff +Any pink dye=Beliebiger rosa Farbstoff +Any black dye=Beliebiger schwarzer Farbstoff +Any brown dye=Beliebiger brauner Farbstoff +Any green dye=Beliebiger grüner Farbstoff +Any white dye=Beliebiger weißer Farbstoff +Any orange dye=Beliebiger orange Farbstoff +Any violet dye=Beliebiger violetter Farbstoff +Any yellow dye=Beliebiger gelber Farbstoff +Any magenta dye=Beliebiger magenta Farbstoff +Any dark grey dye=Beliebiger dunkelgrauer Farbstoff +Any dark green dye=Beliebiger dunkelgrüner Farbstoff +# Label for group ingredients +G=G +Any item belonging to the group(s): @1=Beliebiger Gegenstand, der zu Gruppe(n) gehört: @1 +Unknown Item=Unbekannter Gegenstand +Fuel=Brennstoff +Usage @1 of @2=Verwendung @1 von @2 +Recipe @1 of @2=Rezept @1 von @2 +Previous recipe=Vorheriges Rezept +Next recipe=Nächstes Rezept +Recipe is too big to be displayed.=Rezept ist zu groß für die Anzeige. +Shapeless=Formlos +Cooking time: @1=Kochdauer: @1 +Search=Suche +Reset=Zurücksetzen +Previous page=Vorherige Seite +Next page=Nächste Seite +No items to show.=Keine Gegenstände anzuzeigen. +No usages.=Keine Verwendungen. +Click again to show recipes.=Erneut klicken, um Rezepte zu zeigen. +No recipes.=Keine Rezepte. +Click again to show usages.=Erneut klicken, um Verwendungen zu zeigen. +Recipes=Rezepte diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.eo.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.eo.tr new file mode 100644 index 0000000..428e528 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.eo.tr @@ -0,0 +1,57 @@ +# textdomain: mtg_craftguide + + +### init.lua ### + +Any black dye=Ajna nigra tinkturo +Any black flower=Ajna nigra floro +Any blue dye=Ajna blua tinkturo +Any blue flower=Ajna blua floro +Any brown dye=Ajna bruna tinkturo +Any coal=Ajna karbo +Any cyan dye=Ajna bluverda tinkturo +Any dark green dye=Ajna malhela verda tinkturo +Any dark grey dye=Ajna malhela graja tinkturo +Any green dye=Ajna verda tinkturo +Any green flower=Ajna verda floro +Any grey dye=Ajna graja tinkturo +Any item belonging to the group(s): @1=Ajna objekto de la aro(j) +Any kind of stone block=Ia ŝtona ŝtipo +Any magenta dye=Ajna fuksina tinkturo +Any orange dye=Ajna oranĝa tinkturo +Any orange flower=Ajna oranĝa floro +Any pink dye=Ajna rosa tinkturo +Any red dye=Ajna ruĝa tinkturo +Any red flower=Ajna ruĝa floro +Any sand=Ajna sablo +Any stick=Ajna bastono +Any vessel=Ajna vazo +Any violet dye=Ajna viola tinkturo +Any violet flower=Ajna viola floro +Any white dye=Ajna blanka tinkturo +Any white flower=Ajna blanka floro +Any wood planks=Ajna ligna tabulo +Any wool=Ajna lano +Any yellow dye=Ajna flava tinkturo +Any yellow flower=Ajna flava floro +Click again to show recipes.=Anklaku ankoraŭ por prezenti receptojn +Click again to show usages.=Anklaku ankoraŭ por prezenti utiloj +Cooking time: @1=Tempo por kuirado: @1 +Fuel=Brulaĵo +# Label for group ingredients +G=A +Next page=Sekvinta paĝo +Next recipe=Sekvinta recepto +No items to show.=Ne estas objektoj por prezenti +No recipes.=Ne estas receptoj +No usages.=Ne estas utiloj +Previous page=Pasinta paĝo +Previous recipe=Pasinta recepto +Recipe @1 of @2=Recepto @1 el @2 +Recipe is too big to be displayed.=La recepto estas tro granda por prezenti +Recipes=Receptoj +Reset=Rekomincigu +Search=Ŝerĉu +Shapeless=Senforma +Unknown Item=Obskura Objekto +Usage @1 of @2=Utilo @1 el @2 diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.es.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.es.tr new file mode 100644 index 0000000..6108bf0 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.es.tr @@ -0,0 +1,57 @@ +# textdomain: mtg_craftguide + +Any coal=Carbón +Any sand=Arena +Any wool=Lana +Any stick=Palitos +Any vessel=Recipiente +Any wood planks=Tablas de madera +Any kind of stone block=Derivado de bloque de piedra +Any red flower=Flor roja +Any blue flower=Flor azul +Any black flower=Flor negra +Any green flower=Flor verde +Any white flower=Flor blanca +Any orange flower=Flor naranja +Any violet flower=Flor violeta +Any yellow flower=Flor amarilla +Any red dye=Tinte rojo +Any blue dye=Tinte azul +Any cyan dye=Tinte cian +Any grey dye=Tinte gris +Any pink dye=Tinte rosa +Any black dye=Tinte negro +Any brown dye=Tinte marrón +Any green dye=Tinte verde +Any white dye=Tinte blanco +Any orange dye=Tinte naranja +Any violet dye=Tinte violeta +Any yellow dye=Tinte amarillo +Any magenta dye=Tinte magenta +Any dark grey dye=Tinte gris oscuro +Any dark green dye=Tinte verde oscuro + + +# Label for group ingredients + +G=G +Any item belonging to the group(s): @1=Objeto del grupo: @1 +Unknown Item=Objeto desconocido +Fuel=Combustible +Usage @1 of @2=Usa @1 en @2 +Recipe @1 of @2=Receta @1 en @2 +Previous recipe=Receta anterior +Next recipe=Próxima Receta +Recipe is too big to be displayed.=La receta es muy grande para ser mostrada. +Shapeless=Sin forma +Cooking time: @1=Tiempo de cocción: @1 +Search=Buscar +Reset=Resetear +Previous page=Página anterior +Next page=Próxima página +No items to show.=No hay objetos para mostrar. +No usages.=Sin usos. +Click again to show recipes.=Clica de nuevo para mostrar recetas. +No recipes.=No hay recetas. +Click again to show usages.=Clica de nuevo para mostrar usos. +Recipes=Recetas diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.fr.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.fr.tr new file mode 100644 index 0000000..78ab6eb --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.fr.tr @@ -0,0 +1,53 @@ +# textdomain: mtg_craftguide +Any coal=Quelconque charbon +Any sand=Quelconque sable +Any wool=Quelconque laine +Any stick=Quelconque bâton +Any vessel=Quelconque couvert +Any wood planks=Quelconques planches de bois +Any kind of stone block=Quelconque roche +Any red flower=Quelconque fleur rouge +Any blue flower=Quelconque fleur bleue +Any black flower=Quelconque fleur noire +Any green flower=Quelconque fleur verte +Any white flower=Quelconque fleur blanche +Any orange flower=Quelconque fleur orange +Any violet flower=Quelconque fleur violette +Any yellow flower=Quelconque fleur jaune +Any red dye=Quelconque colorant rouge +Any blue dye=Quelconque colorant bleu +Any cyan dye=Quelconque colorant bleu ciel +Any grey dye=Quelconque colorant gris +Any pink dye=Quelconque colorant rose +Any black dye=Quelconque colorant noir +Any brown dye=Quelconque colorant marron +Any green dye=Quelconque colorant vert +Any white dye=Quelconque colorant blanc +Any orange dye=Quelconque colorant orange +Any violet dye=Quelconque colorant violet +Any yellow dye=Quelconque colorant jaune +Any magenta dye=Quelconque colorant magenta +Any dark grey dye=Quelconque colorant gris foncé +Any dark green dye=Quelconque colorant vert foncé +# Label for group ingredients +G= +Any item belonging to the group(s): @1=Tout item appartenant au(x) groupe(s) : @1 +Unknown Item= +Fuel= +Usage @1 of @2=Usage @1 sur @2 +Recipe @1 of @2=Recette @1 sur @2 +Previous recipe= +Next recipe= +Recipe is too big to be displayed.= +Shapeless=Sans forme +Cooking time: @1=Temps de cuisson : @1 +Search= +Reset= +Previous page= +Next page= +No items to show.= +No usages.= +Click again to show recipes.= +No recipes.= +Click again to show usages.= +Recipes=Recettes diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.jbo.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.jbo.tr new file mode 100644 index 0000000..c9e6fbf --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.jbo.tr @@ -0,0 +1,54 @@ +# textdomain: mtg_craftguide +Any coal=lo cmina lo'i kolme +Any sand=lo cmima lo'i sance +Any wool=lo cmima lo'i sunla +Any stick=lo cmima lo'i grana +Any vessel=lo cmima lo'i vasru +Any wood planks=lo cmima lo'i mudri tanbo +Any kind of stone block=lo cmima lo'i rokci bliku +Any red flower=lo cmima lo'i xunre xrula +Any blue flower=lo cmima lo'i blanu xrula +Any black flower=lo cmima lo'i xekri xrula +Any green flower=lo cmima lo'i crino xrula +Any white flower=lo cmima lo'i blabi xrula +Any orange flower=lo cmima lo'i narju xrula +Any violet flower=lo cmima lo'i zirpu xrula +Any yellow flower=lo cmima lo'i pelxu xrula +Any red dye=lo cmima lo'i xunre xinmo +Any blue dye=lo cmima lo'i blanu xinmo +Any cyan dye=lo cmima lo'i cicna xinmo +Any grey dye=lo cmima lo'i grusi xinmo +Any pink dye=lo cmima lo'i xunblabi xinmo +Any black dye=lo cmima lo'i xekri xinmo +Any brown dye=lo cmima lo'i bunre xinmo +Any green dye=lo cmima lo'i crino xinmo +Any white dye=lo cmima lo'i blabi xinmo +Any orange dye=lo cmima lo'i narju xinmo +Any violet dye=lo cmima lo'i zirpu xinmo +Any yellow dye=lo cmima lo'i pelxu xinmo +Any magenta dye=lo cmima lo'i nukni xinmo +Any dark grey dye=lo cmima lo'i xekri grusi xinmo +Any dark green dye=lo cmima lo'i xekri crino xinmo +# Label for group ingredients +# c = cmima +G=c +Any item belonging to the group(s): @1=lo cmima lo'i me zoi gi'u.@1.gi'u +Unknown Item=lo na te djuno dacti +Fuel=.i livla +Usage @1 of @2=.i meirmoi fe li @1 li @2@nle'i te zbasu +Recipe @1 of @2=.i meirmoi fe li @1 li @2@nle'i te jukpa +Previous recipe=lidne +Next recipe=selyli'e +Recipe is too big to be displayed.=.i lo te jukpa cu dukse lo ka barda tezu'e lo nu jarco +Shapeless=tarmi claxu +Cooking time: @1=lo pu'u jukpa cu snidu li @1 +Search=sisku +Reset=kraga'igau +Previous page=lidne +Next page=selyli'e +No items to show.=no da dacti cu se jarco +No usages.=na te zbasu +Click again to show recipes.=.i ko rapli .iklki fi lo nu .arco lo te jukpa +No recipes.=na te jukpa +Click again to show usages.=.i ko rapli .iklki fi lo nu .arco lo te zbasu +Recipes=lo te jukpa diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.pt_BR.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.pt_BR.tr new file mode 100644 index 0000000..a4bbf7f --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.pt_BR.tr @@ -0,0 +1,53 @@ +# textdomain: mtg_craftguide +Any coal=Qualquer carvão +Any sand=Qualquer areia +Any wool=Qualquer madeira +Any stick=Qualquer graveto +Any vessel=Qualquer navio +Any wood planks=Qualquer tábua de madeira +Any kind of stone block=Qualquer tipo de bloco de pedra +Any red flower=Qualquer flor vermelha +Any blue flower=Qualquer flor azul +Any black flower=Qualquer flor preta +Any green flower=Qualquer flor verde +Any white flower=Qualquer flor branca +Any orange flower=Qualquer flor laranja +Any violet flower=Qualquer flor violeta +Any yellow flower=Qualquer flor amarela +Any red dye=Qualquer tinta vermelha +Any blue dye=Qualquer tinta azul +Any cyan dye=Qualquer tinta ciano +Any grey dye=Qualquer tinta cinza +Any pink dye=Qualquer tinta rosa +Any black dye=Qualquer tinta preto +Any brown dye=Qualquer tinta marrom +Any green dye=Qualquer tinta verde +Any white dye=Qualquer tinta branca +Any orange dye=Qualquer tinta laranja +Any violet dye=Qualquer tinta violeta +Any yellow dye=Qualquer tinta amarela +Any magenta dye=Qualquer tinta magenta +Any dark grey dye=Qualquer tinta cinza-escuro +Any dark green dye=Qualquer tinta cinza-escuro +# Label for group ingredients +G=G +Any item belonging to the group(s): @1=Qualquer item pertencente ao(s) grupo(s): @1 +Unknown Item=Item Desconhecido +Fuel=Combustível +Usage @1 of @2=Uso @1 de @2 +Recipe @1 of @2=Receita @1 de @2 +Previous recipe=Receita anterior +Next recipe=Próxima receita +Recipe is too big to be displayed.=Receita é muito grande para ser exibida. +Shapeless=Sem forma +Cooking time: @1=Tempo de Cozimento: @1 +Search=Buscar +Reset=Redefinir +Previous page=Página anterior +Next page=Próxima página +No items to show.=Nenhum item para mostrar. +No usages.=Nenhum uso. +Click again to show recipes.=Clique novamente para mostrar receitas. +No recipes.=Nenhuma receita. +Click again to show usages.=Clique novamente para mostrar os usos. +Recipes=Receitas diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_CN.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_CN.tr new file mode 100644 index 0000000..56ae7d5 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_CN.tr @@ -0,0 +1,53 @@ +# textdomain: mtg_craftguide +Any coal=任何煤炭 +Any sand=任何沙子 +Any wool=任何羊毛 +Any stick=任何棒 +Any vessel=任何容器 +Any wood planks=任何木板 +Any kind of stone block=任何种类的石块 +Any red flower=任何红色花朵 +Any blue flower=任何蓝色花朵 +Any black flower=任何黑色花朵 +Any green flower=任何绿色花朵 +Any white flower=任何白色花朵 +Any orange flower=任何橙色花朵 +Any violet flower=任何紫色花朵 +Any yellow flower=任何黄色花朵 +Any red dye=任何红色染料 +Any blue dye=任何蓝色染料 +Any cyan dye=任何青色染料 +Any grey dye=任何灰色染料 +Any pink dye=任何粉色染料 +Any black dye=任何黑色染料 +Any brown dye=任何棕色染料 +Any green dye=任何绿色染料 +Any white dye=任何白色染料 +Any orange dye=任何橙色染料 +Any violet dye=任何紫色染料 +Any yellow dye=任何黄色染料 +Any magenta dye=任何品红染料 +Any dark grey dye=任何暗灰染料 +Any dark green dye=任何暗绿染料 +# Label for group ingredients +G= +Any item belonging to the group(s): @1=属于该组的任何项目:@1 +Unknown Item=未知项目 +Fuel=燃料 +Usage @1 of @2=用法@1,共@2个 +Recipe @1 of @2=配方@1,共@2个 +Previous recipe=上一配方 +Next recipe=下一配方 +Recipe is too big to be displayed.=配方太大,无法显示 +Shapeless=没有形状 +Cooking time: @1=烹饪时间:@1 +Search=搜索 +Reset=重置 +Previous page=上一页 +Next page=下一页 +No items to show.=没有项目可以显示。 +No usages.=没有用法 +Click again to show recipes.=再次单击以显示配方。 +No recipes.=没有配方。 +Click again to show usages.=再次单击以显示用法 +Recipes=配方 diff --git a/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_TW.tr b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_TW.tr new file mode 100644 index 0000000..859cdfe --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_TW.tr @@ -0,0 +1,53 @@ +# textdomain: mtg_craftguide +Any coal=任何煤炭 +Any sand=任何沙子 +Any wool=任何羊毛 +Any stick=任何棒 +Any vessel=任何容器 +Any wood planks=任何木板 +Any kind of stone block=任何種類的石塊 +Any red flower=任何紅色花朵 +Any blue flower=任何藍色花朵 +Any black flower=任何黑色花朵 +Any green flower=任何綠色花朵 +Any white flower=任何白色花朵 +Any orange flower=任何橙色花朵 +Any violet flower=任何紫色花朵 +Any yellow flower=任何黃色花朵 +Any red dye=任何紅色染料 +Any blue dye=任何藍色染料 +Any cyan dye=任何青色染料 +Any grey dye=任何灰色染料 +Any pink dye=任何粉色染料 +Any black dye=任何黑色染料 +Any brown dye=任何棕色染料 +Any green dye=任何綠色染料 +Any white dye=任何白色染料 +Any orange dye=任何橙色染料 +Any violet dye=任何紫色染料 +Any yellow dye=任何黃色染料 +Any magenta dye=任何品紅染料 +Any dark grey dye=任何暗灰染料 +Any dark green dye=任何暗綠染料 +# Label for group ingredients +G= +Any item belonging to the group(s): @1=屬於該組的任何項目:@1 +Unknown Item=未知項目 +Fuel=燃料 +Usage @1 of @2=用法@1,共@2個 +Recipe @1 of @2=配方@1,共@2個 +Previous recipe=上一配方 +Next recipe=下一配方 +Recipe is too big to be displayed.=配方太大,無法顯示 +Shapeless=沒有形狀 +Cooking time: @1=烹飪時間:@1 +Search=搜索 +Reset=重置 +Previous page=上一頁 +Next page=下一頁 +No items to show.=沒有項目可以顯示。 +No usages.=沒有用法 +Click again to show recipes.=再次單擊以顯示配方。 +No recipes.=沒有配方。 +Click again to show usages.=再次單擊以顯示用法 +Recipes=配方 diff --git a/mods/minetest_game/mtg_craftguide/locale/template.txt b/mods/minetest_game/mtg_craftguide/locale/template.txt new file mode 100644 index 0000000..e02a721 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/template.txt @@ -0,0 +1,53 @@ +# textdomain: mtg_craftguide +Any coal= +Any sand= +Any wool= +Any stick= +Any vessel= +Any wood planks= +Any kind of stone block= +Any red flower= +Any blue flower= +Any black flower= +Any green flower= +Any white flower= +Any orange flower= +Any violet flower= +Any yellow flower= +Any red dye= +Any blue dye= +Any cyan dye= +Any grey dye= +Any pink dye= +Any black dye= +Any brown dye= +Any green dye= +Any white dye= +Any orange dye= +Any violet dye= +Any yellow dye= +Any magenta dye= +Any dark grey dye= +Any dark green dye= +# Label for group ingredients +G= +Any item belonging to the group(s): @1= +Unknown Item= +Fuel= +Usage @1 of @2= +Recipe @1 of @2= +Previous recipe= +Next recipe= +Recipe is too big to be displayed.= +Shapeless= +Cooking time: @1= +Search= +Reset= +Previous page= +Next page= +No items to show.= +No usages.= +Click again to show recipes.= +No recipes.= +Click again to show usages.= +Recipes= diff --git a/mods/minetest_game/mtg_craftguide/mod.conf b/mods/minetest_game/mtg_craftguide/mod.conf new file mode 100644 index 0000000..3b2d975 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/mod.conf @@ -0,0 +1,3 @@ +name = mtg_craftguide +description = Minetest Game mod: mtg_craftguide +depends = sfinv diff --git a/mods/minetest_game/mtg_craftguide/textures/craftguide_clear_icon.png b/mods/minetest_game/mtg_craftguide/textures/craftguide_clear_icon.png new file mode 100644 index 0000000..1a0e513 Binary files /dev/null and b/mods/minetest_game/mtg_craftguide/textures/craftguide_clear_icon.png differ diff --git a/mods/minetest_game/mtg_craftguide/textures/craftguide_furnace.png b/mods/minetest_game/mtg_craftguide/textures/craftguide_furnace.png new file mode 100644 index 0000000..60d1a61 Binary files /dev/null and b/mods/minetest_game/mtg_craftguide/textures/craftguide_furnace.png differ diff --git a/mods/minetest_game/mtg_craftguide/textures/craftguide_next_icon.png b/mods/minetest_game/mtg_craftguide/textures/craftguide_next_icon.png new file mode 100644 index 0000000..266c9ba Binary files /dev/null and b/mods/minetest_game/mtg_craftguide/textures/craftguide_next_icon.png differ diff --git a/mods/minetest_game/mtg_craftguide/textures/craftguide_prev_icon.png b/mods/minetest_game/mtg_craftguide/textures/craftguide_prev_icon.png new file mode 100644 index 0000000..c807296 Binary files /dev/null and b/mods/minetest_game/mtg_craftguide/textures/craftguide_prev_icon.png differ diff --git a/mods/minetest_game/mtg_craftguide/textures/craftguide_search_icon.png b/mods/minetest_game/mtg_craftguide/textures/craftguide_search_icon.png new file mode 100644 index 0000000..1c374ca Binary files /dev/null and b/mods/minetest_game/mtg_craftguide/textures/craftguide_search_icon.png differ diff --git a/mods/minetest_game/mtg_craftguide/textures/craftguide_shapeless.png b/mods/minetest_game/mtg_craftguide/textures/craftguide_shapeless.png new file mode 100644 index 0000000..51d8ce5 Binary files /dev/null and b/mods/minetest_game/mtg_craftguide/textures/craftguide_shapeless.png differ diff --git a/mods/minetest_game/player_api/README.txt b/mods/minetest_game/player_api/README.txt new file mode 100644 index 0000000..37afadf --- /dev/null +++ b/mods/minetest_game/player_api/README.txt @@ -0,0 +1,27 @@ +Minetest Game mod: player_api +============================= +See license.txt for license information. + +Provides an API to allow multiple mods to set player models and textures. +Also sets the default model, texture, and player flags. +This mod is only for content related to the Player API and the player object. + +Authors of source code +---------------------- +Originally by celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures, models and sounds) +---------------------------------------------- +Original model by MirceaKitsune (CC BY-SA 3.0). +Various alterations and fixes by kilbith, sofar, xunto, Rogier-5, TeTpaAka, Desour, +stujones11, An0n3m0us (CC BY-SA 3.0): + character.b3d + character.blend + +Jordach (CC BY-SA 3.0): + character.png + +celeron55, Perttu Ahola (CC BY-SA 3.0): + player.png + player_back.png diff --git a/mods/minetest_game/player_api/api.lua b/mods/minetest_game/player_api/api.lua new file mode 100644 index 0000000..5e68b7c --- /dev/null +++ b/mods/minetest_game/player_api/api.lua @@ -0,0 +1,432 @@ +-- Minetest 0.4 mod: player +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("player_api") + +player_api = {} + +-- Player animation blending +-- Note: This is currently broken due to a bug in Irrlicht, leave at 0 +local animation_blend = 0 + +player_api.registered_models = { } + +-- Local for speed. +local models = player_api.registered_models + +function player_api.register_model(name, def) + models[name] = def +end + +-- Player stats and animations +local player_model = {} +local player_textures = {} +local player_anim = {} +local player_sneak = {} +player_api.player_attached = {} + +function player_api.get_animation(player) + local name = player:get_player_name() + return { + model = player_model[name], + textures = player_textures[name], + animation = player_anim[name], + } +end + +function player_api.set_gender(player, gender) + if not(gender) or gender == "random" then + if math.random(2) == 1 then + gender = "male" + else + gender = "female" + end + end + player:get_meta():set_string("gender", gender) + return gender +end + +function player_api.get_gender(player) + return player:get_meta():get_string("gender") +end + +function player_api.get_gender_model(gender) + local model + if gender == "male" then + if minetest.get_modpath("3d_armor")~=nil then + model = "3d_armor_character.b3d" + else + model = "character.b3d" + end + else + if minetest.get_modpath("3d_armor")~=nil then + model = "3d_armor_female.b3d" + else + model = "female.b3d" + end + end + return model +end + +function player_api.set_base_texture(player, gender) + local meta = player:get_meta() + meta:set_string("base_texture", gender) +end + +minetest.register_chatcommand("toggle_gender", { + description = S("Change the gender, from male to female or viceversa"), + func = function(name, param) + local player = minetest.get_player_by_name(name) + local meta = player:get_meta() + local old_gender = player_api.get_gender(player) + if old_gender then + local new_gender + if old_gender == "male" then + new_gender = "female" + else + new_gender = "male" + end + meta:set_string("gender", new_gender) + player_api.set_model(player, player_api.get_gender_model(new_gender)) + local gender_model = player_api.get_gender_model(new_gender) + local cloth = player_api.compose_cloth(player) + player_api.registered_models[gender_model].textures[1] = cloth + player_api.set_textures(player, models[gender_model].textures) + local new_gender_cap = new_gender:gsub("^%l", string.upper) + minetest.chat_send_player(name, S("Your gender is changed to").." "..S(new_gender_cap)..".") + end + end, +}) + +--converts yaw to degrees +local function yaw_to_degrees(yaw) + return(yaw * 180.0 / math.pi) +end + +local last_look_at_dir + +local function move_head(player, on_water) + local look_at_dir = player:get_look_dir() + --apply change only if the pitch changed + if last_look_at_dir and look_at_dir.y == last_look_at_dir.y then + return + else + last_look_at_dir = look_at_dir + end + local pitch = yaw_to_degrees(math.asin(look_at_dir.y)) + if on_water then + pitch = pitch + 70 + end + local head_rotation = {x= pitch, y= 0, z= 0} --the head movement {pitch, yaw, roll} + local head_offset + if minetest.get_modpath("3d_armor")~=nil then + head_offset = 6.75 + else + head_offset = 6.3 + end + local head_position = {x=0, y=head_offset, z=0} + player:set_bone_position("Head", head_position, head_rotation) --set the head movement +end + +-- Called when a player's appearance needs to be updated +function player_api.set_model(player, model_name) + local name = player:get_player_name() + local model = models[model_name] + if model then + if player_model[name] == model_name then + return + end + player:set_properties({ + mesh = model_name, + textures = player_textures[name] or model.textures, + visual = "mesh", + visual_size = model.visual_size or {x = 1, y = 1}, + collisionbox = model.collisionbox or {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, + stepheight = model.stepheight or 0.6, + eye_height = model.eye_height or 1.47, + }) + player_api.set_animation(player, "stand") + else + player:set_properties({ + textures = {"player.png", "player_back.png"}, + visual = "upright_sprite", + visual_size = {x = 1, y = 2}, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3}, + stepheight = 0.6, + eye_height = 1.625, + }) + end + player_model[name] = model_name +end + +function player_api.set_textures(player, textures) + local name = player:get_player_name() + local model = models[player_model[name]] + local model_textures = model and model.textures or nil + player_textures[name] = textures or model_textures + player:set_properties({textures = textures or model_textures}) +end + +function player_api.set_animation(player, anim_name, speed) + local name = player:get_player_name() + if player_anim[name] == anim_name then + return + end + local model = player_model[name] and models[player_model[name]] + if not (model and model.animations[anim_name]) then + return + end + local anim = model.animations[anim_name] + player_anim[name] = anim_name + player:set_animation(anim, speed or model.animation_speed, animation_blend) +end + +minetest.register_on_leaveplayer(function(player) + local name = player:get_player_name() + player_model[name] = nil + player_anim[name] = nil + player_textures[name] = nil + player_sneak[name] = nil + player_api.player_attached[name] = nil +end) + +-- Localize for better performance. +local player_set_animation = player_api.set_animation +local player_attached = player_api.player_attached + +-- Prevent knockback for attached players +local old_calculate_knockback = minetest.calculate_knockback +function minetest.calculate_knockback(player, ...) + if player_attached[player:get_player_name()] then + return 0 + end + return old_calculate_knockback(player, ...) +end + +-- Check each player and apply animations +local timer = 0 +minetest.register_globalstep(function(dtime) + for _, player in pairs(minetest.get_connected_players()) do + local name = player:get_player_name() + local model_name = player_model[name] + local model = model_name and models[model_name] + if model and not player_attached[name] then + local controls = player:get_player_control() + local animation_speed_mod = model.animation_speed or 30 + + -- Determine if the player is sneaking, and reduce animation speed if so + if controls.sneak then + animation_speed_mod = animation_speed_mod / 2 + end + + local on_water + --Determine if the player is in a water node + local player_pos = player:get_pos() + local node_name = minetest.get_node(player_pos).name + if minetest.registered_nodes[node_name] then + if minetest.registered_nodes[node_name]["liquidtype"] == "source" or + minetest.registered_nodes[node_name]["liquidtype"] == "flowing" then + local player_pos_below = {x= player_pos.x, y= player_pos.y-1, z= player_pos.z} + local node_name_below = minetest.get_node(player_pos_below).name + local player_pos_above = {x= player_pos.x, y= player_pos.y+1, z= player_pos.z} + local node_name_above = minetest.get_node(player_pos_above).name + if minetest.registered_nodes[node_name_below] and minetest.registered_nodes[node_name_above] then + local node_below_is_liquid + if minetest.registered_nodes[node_name_below]["liquidtype"] == "source" or + minetest.registered_nodes[node_name_below]["liquidtype"] == "flowing" then + node_below_is_liquid = true + else + node_below_is_liquid = false + end + local node_above_is_liquid + if minetest.registered_nodes[node_name_above]["liquidtype"] == "source" or + minetest.registered_nodes[node_name_above]["liquidtype"] == "flowing" then + node_above_is_liquid = true + else + node_above_is_liquid = false + end + local node_above_is_air + if minetest.registered_nodes[node_name_above] == "air" then + node_above_is_air = true + else + node_above_is_air = false + end + if ((node_below_is_liquid) and not(node_above_is_air)) or + (not(node_below_is_liquid) and node_above_is_liquid) then + on_water = true + else + on_water = false + end + else + on_water = true + end + else + on_water = false + end + end + + --Set head pitch if not on singleplayer and first person view + --minetest.chat_send_all(tostring(player:get_fov())) + --if not(minetest.is_singleplayer() and (player:get_fov() == 0)) then + --minetest.chat_send_all("test") + move_head(player, on_water) + --end + + -- Apply animations based on what the player is doing + if player:get_hp() == 0 then + player_set_animation(player, "lay") + -- Determine if the player is walking + elseif controls.up or controls.down or controls.left or controls.right then + if player_sneak[name] ~= controls.sneak then + player_anim[name] = nil + player_sneak[name] = controls.sneak + end + if controls.LMB or controls.RMB then + if not(on_water) then + player_set_animation(player, "walk_mine", animation_speed_mod) + else + player_set_animation(player, "swin_and_mine", animation_speed_mod) + end + else + if not(on_water) then + player_set_animation(player, "walk", animation_speed_mod) + else + player_set_animation(player, "swin", animation_speed_mod) + end + end + elseif controls.LMB or controls.RMB then + if not(on_water) then + player_set_animation(player, "mine", animation_speed_mod) + else + player_set_animation(player, "swin_mine", animation_speed_mod) + end + else + if not(on_water) then + player_set_animation(player, "stand", animation_speed_mod) + else + player_set_animation(player, "swin_stand", animation_speed_mod) + end + end + if on_water and player_pos.y < 0 then + timer = timer + dtime + if timer > 1 then + player_pos.y = player_pos.y + 1 + minetest.add_particlespawner({ + amount = 6, + time = 1, + minpos = player_pos, + maxpos = player_pos, + minvel = {x=0, y=0, z=0}, + maxvel = {x=1, y=5, z=1}, + minacc = {x=0, y=0, z=0}, + maxacc = {x=1, y=1, z=1}, + minexptime = 0.2, + maxexptime = 1.0, + minsize = 1, + maxsize = 1.5, + collisiondetection = false, + vertical = false, + texture = "bubble.png", + }) + timer = 0 + end + end + end + end +end) + +function player_api.get_gender_formspec(name) + local text = S("Select your gender") + + local formspec = { + "formspec_version[3]", + "size[3.2,2.476]", + "label[0.375,0.5;", minetest.formspec_escape(text), "]", + "image_button_exit[0.375,1;1,1;player_male_face.png;btn_male;"..S("Male").."]", + "image_button_exit[1.7,1;1,1;player_female_face.png;btn_female;"..S("Female").."]" + } + + -- table.concat is faster than string concatenation - `..` + return table.concat(formspec, "") +end + +function player_api.select_gender(player_name) + minetest.show_formspec(player_name, "player_api:gender", player_api.get_gender_formspec(player_name)) +end + +function player_api.set_texture(player) + local cloth = player_api.compose_cloth(player) + local gender = player_api.get_gender(player) + local gender_model = player_api.get_gender_model(gender) + player_api.registered_models[gender_model].textures[1] = cloth + player_api.set_model(player, gender_model) + if minetest.get_modpath("3d_armor")~=nil then + --armor.default_skin = cloth + local player_name = player:get_player_name() + armor.textures[player_name].skin = cloth + end + player_api.set_textures(player, models[gender_model].textures) +end + +function player_api.compose_face(player, scale) + return player_api.compose_base_texture(player, { + canvas_size = "16x16", + scale = scale, + skin_texture = "player_face_skin.png", + eyebrowns_pos = "0,0", + eye_right_pos = "2,8", + eye_left_pos = "10,8", + mouth_pos = "0,12", + hair_preview = true, + hair_pos = "0,0", + }) +end + +--Level functions +function player_api.lvl_up(player) + local meta = player:get_meta() + local level = meta:get_int("level") + meta:set_int("level", (level + 1)) +end + +function player_api.lvl_down(player) + local meta = player:get_meta() + local level = meta:get_int("level") + if level == 0 then + return + end + meta:set_int("level", (level - 1)) +end + +function player_api.set_lvl(player, level) + if level <= 0 then + return + else + player:get_meta():set_int("level", level) + end +end + +function player_api.reset_lvl(player, level) + player:get_meta():set_int("level", 0) +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "player_api:gender" then + return + end + local gender + if fields.btn_male or fields.btn_female then + if fields.btn_male then + gender = "male" + else + gender = "female" + end + player_api.set_gender(player, gender) + else + player_api.set_gender(player, "random") + end + player_api.set_base_textures(player) --set the default base_texture + player_api.set_cloths(player) --set the default clothes + player_api.set_texture(player) +end) diff --git a/mods/minetest_game/player_api/base_texture.lua b/mods/minetest_game/player_api/base_texture.lua new file mode 100644 index 0000000..0af85f1 --- /dev/null +++ b/mods/minetest_game/player_api/base_texture.lua @@ -0,0 +1,145 @@ +player_api.hair_colors = { + black = { + color = "#000000", + ratio = 175, + }, + gray = nil, + light_brown = { + color = "#7a4c20", + ratio = 150, + }, + brown = { + color = "#7a4c20", + ratio = 192, + }, + red = { + color = "#ed6800", + ratio = 140, + }, + blonde = { + color = "#a7ad06", + ratio = 112, + }, +} + +local hair_colors_redux = {} +for key, value in pairs(player_api.hair_colors) do + hair_colors_redux[#hair_colors_redux+1] = key +end + +player_api.skin_colors = { + normal = nil, + light_brown = { + color = "#bea080", + ratio = 225, + }, + brown = { + color = "#a56d40", + ratio = 150, + }, + black = { + color = "#462409", + ratio = 127, + }, +} + +local skin_colors_redux = {} +for key, value in pairs(player_api.skin_colors) do + skin_colors_redux[#skin_colors_redux+1] = key +end + +player_api.eye_colors = {"brown", "gray", "green", "blue", "hazel", "violet", "black", "pink"} + +function player_api.get_base_texture_table(player) + local meta = player:get_meta() + local base_texture_str = meta:get_string("base_texture") + if base_texture_str == nil or base_texture_str == "" then + player_api.set_base_textures(player) + end + local base_texture = minetest.deserialize(base_texture_str) + return base_texture +end + +function player_api.set_base_texture(player, base_texture) + local meta = player:get_meta() + meta:set_string("base_texture", minetest.serialize(base_texture)) +end + +function player_api.set_base_textures(player) + local meta = player:get_meta() + local base_texture = {} + local gender = meta:get_string("gender") + local hair_color = hair_colors_redux[math.random(#hair_colors_redux)] + local eye_color = "player_"..player_api.eye_colors[math.random(#player_api.eye_colors)].."_eye.png" + if gender == "male" then + base_texture["eyebrowns"] = {texture = "player_eyebrowns_default.png", color = nil} + base_texture["eye"] = eye_color + base_texture["mouth"] = {texture = "player_male_mouth_default.png", color = nil} + base_texture["hair"] = {texture = "player_male_hair_default.png", color = hair_color} + else + base_texture["eyebrowns"] = {texture = "player_eyebrowns_default.png", color = nil} + base_texture["eye"] = eye_color + base_texture["mouth"] = {texture = "player_female_mouth_default.png", color = nil} + base_texture["hair"] = {texture = "player_female_hair_default.png", color = hair_color} + end + base_texture["skin"] = {texture = "player_skin.png", color = + skin_colors_redux[math.random(#skin_colors_redux)]} + player_api.set_base_texture(player, base_texture) +end + +function player_api.colorize_texture(player, what, texture) + local base_texture = player_api.get_base_texture_table(player) + if base_texture[what]["color"] then + local value + if what == "skin" then + value = player_api.skin_colors[base_texture[what]["color"]] + else --"hair" + value = player_api.hair_colors[base_texture[what]["color"]] + end + if value then + return texture .. "\\^\\[colorize\\:\\"..value.color.."\\:"..tostring(value.ratio) + else + return texture + end + else + return texture + end +end + +function player_api.compose_base_texture(player, def) + local base_texture = player_api.get_base_texture_table(player) + local texture = player_api.colorize_texture(player, "skin", "[combine:"..def.canvas_size..":0,0="..def.skin_texture) + + local ordered_keys = {} + + for key in pairs(base_texture) do + table.insert(ordered_keys, key) + end + + table.sort(ordered_keys) + + for i = 1, #ordered_keys do + local key, value = ordered_keys[i], base_texture[ordered_keys[i]] + if key == "eyebrowns" then + value.texture = player_api.colorize_texture(player, "eyebrowns", value.texture) + texture = texture .. ":"..def.eyebrowns_pos.."="..value.texture + elseif key == "eye" then + texture = texture .. ":"..def.eye_right_pos.."="..value + texture = texture .. ":"..def.eye_left_pos.."="..value + elseif key == "mouth" then + texture = texture .. ":"..def.mouth_pos.."="..value.texture + elseif key == "hair" then + if def.hair_preview then + value.texture = string.sub(value.texture, 0, -5).."_preview.png" + end + value.texture = player_api.colorize_texture(player, "hair", value.texture) + texture = texture .. ":"..def.hair_pos.."="..value.texture + end + end + if def.scale then + local dimensions = string.split(def.canvas_size, "x") + texture = texture.."^[resize:"..tostring(tonumber(dimensions[1])*def.scale).."x" + ..tostring(tonumber(dimensions[2])*def.scale) + end + return texture +end diff --git a/mods/minetest_game/player_api/cloths.lua b/mods/minetest_game/player_api/cloths.lua new file mode 100644 index 0000000..670c3ad --- /dev/null +++ b/mods/minetest_game/player_api/cloths.lua @@ -0,0 +1,206 @@ +local S = minetest.get_translator("player_api") + +function player_api.has_cloths(player) + local inv = player:get_inventory() + if inv:is_empty("cloths") then + return false + else + return true + end +end + +function player_api.register_cloth(name, def) + if not(def.inventory_image) then + def.wield_image = def.texture + end + if not(def.wield_image) then + def.wield_image = def.inventory_image + end + local tooltip + local gender, gender_color + local description + if not def.attached then + if def.groups["cloth"] == 1 then + tooltip = S("Head") + elseif def.groups["cloth"] == 2 then + tooltip = S("Upper") + elseif def.groups["cloth"] == 3 then + tooltip = S("Lower") + else + tooltip = S("Footwear") + end + tooltip = "(" .. tooltip .. ")" + if def.gender == "male" then + gender = S("Male") + gender_color = "#00baff" + elseif def.gender == "female" then + gender = S("Female") + gender_color = "#ff69b4" + else + gender = S("Unisex") + gender_color = "#9400d3" + end + tooltip = tooltip.."\n".. minetest.colorize(gender_color, gender) + description = def.description .. "\n" .. tooltip + end + minetest.register_craftitem(name, { + description = description or nil, + inventory_image = def.inventory_image or nil, + wield_image = def.wield_image or nil, + stack_max = def.stack_max or 16, + _cloth_attach = def.attach or nil, + _cloth_attached = def.attached or false, + _cloth_texture = def.texture or nil, + _cloth_preview = def.preview or nil, + _cloth_gender = def.gender or nil, + groups = def.groups or nil, + }) +end + +player_api.register_cloth("player_api:cloth_female_upper_default", { + description = S("Purple Stripe Summer T-shirt"), + inventory_image = "cloth_female_upper_default_inv.png", + wield_image = "cloth_female_upper_default.png", + texture = "cloth_female_upper_default.png", + preview = "cloth_female_upper_preview.png", + gender = "female", + groups = {cloth = 2}, +}) + +player_api.register_cloth("player_api:cloth_female_lower_default", { + description = S("Fresh Summer Denim Shorts"), + inventory_image = "cloth_female_lower_default_inv.png", + wield_image = "cloth_female_lower_default_inv.png", + texture = "cloth_female_lower_default.png", + preview = "cloth_female_lower_preview.png", + gender = "female", + groups = {cloth = 3}, +}) + +player_api.register_cloth("player_api:cloth_unisex_footwear_default", { + description = S("Common Black Shoes"), + inventory_image = "cloth_unisex_footwear_default_inv.png", + wield_image = "cloth_unisex_footwear_default_inv.png", + texture = "cloth_unisex_footwear_default.png", + preview = "cloth_unisex_footwear_preview.png", + gender = "unisex", + groups = {cloth = 4}, +}) + +player_api.register_cloth("player_api:cloth_female_head_default", { + description = S("Pink Bow"), + inventory_image = "cloth_female_head_default_inv.png", + wield_image = "cloth_female_head_default_inv.png", + texture = "cloth_female_head_default.png", + preview = "cloth_female_head_preview.png", + gender = "female", + groups = {cloth = 1}, +}) + +player_api.register_cloth("player_api:cloth_male_upper_default", { + description = S("Classic Green Sweater"), + inventory_image = "cloth_male_upper_default_inv.png", + wield_image = "cloth_male_upper_default_inv.png", + texture = "cloth_male_upper_default.png", + preview = "cloth_male_upper_preview.png", + gender = "male", + groups = {cloth = 2}, +}) + +player_api.register_cloth("player_api:cloth_male_lower_default", { + description = S("Fine Blue Pants"), + inventory_image = "cloth_male_lower_default_inv.png", + wield_image = "cloth_male_lower_default_inv.png", + texture = "cloth_male_lower_default.png", + preview = "cloth_male_lower_preview.png", + gender = "male", + groups = {cloth = 3}, +}) + +function player_api.set_cloths(player) + local gender = player:get_meta():get_string("gender") + --Create the "cloths" inventory + local inv = player:get_inventory() + inv:set_size("cloths", 8) + + if gender == "male" then + inv:add_item("cloths", 'player_api:cloth_male_upper_default') + inv:add_item("cloths", 'player_api:cloth_male_lower_default') + else + inv:add_item("cloths", 'player_api:cloth_female_head_default') + inv:add_item("cloths", 'player_api:cloth_female_upper_default') + inv:add_item("cloths", 'player_api:cloth_female_lower_default') + end + inv:add_item("cloths", 'player_api:cloth_unisex_footwear_default') +end + +local cloth_pos = { + "48,0", + "32,32", + "0,32", + "0,32", +} + +function player_api.compose_cloth(player) + local inv = player:get_inventory() + local inv_list = inv:get_list("cloths") + local upper_ItemStack, lower_ItemStack, footwear_ItemStack, head_ItemStack + local underwear = false + local attached_cloth = {} + for i = 1, #inv_list do + local item_name = inv_list[i]:get_name() + local cloth_itemstack = minetest.registered_items[item_name] + --minetest.chat_send_all(item_name) + local cloth_type = minetest.get_item_group(item_name, "cloth") + --if cloth_type then minetest.chat_send_all(cloth_type) end + if cloth_type == 1 then + head_ItemStack = cloth_itemstack._cloth_texture + elseif cloth_type == 2 then + upper_ItemStack = cloth_itemstack._cloth_texture + elseif cloth_type == 3 then + lower_ItemStack = cloth_itemstack._cloth_texture + underwear = true + elseif cloth_type == 4 then + footwear_ItemStack = cloth_itemstack._cloth_texture + end + if cloth_itemstack._cloth_attach then + attached_cloth[#attached_cloth+1] = cloth_itemstack._cloth_attach + end + end + if not(underwear) then + lower_ItemStack = "cloth_lower_underwear_default.png" + end + local base_texture = player_api.compose_base_texture(player, { + canvas_size ="128x64", + skin_texture = "player_skin.png", + eyebrowns_pos = "16,16", + eye_right_pos = "18,24", + eye_left_pos = "26,24", + mouth_pos = "16,28", + hair_preview = false, + hair_pos = "0,0", + }) + local cloth = base_texture.."^".."[combine:128x64:0,0=" + if head_ItemStack then + cloth = cloth .. ":"..cloth_pos[1].."="..head_ItemStack + end + if upper_ItemStack then + cloth = cloth .. ":"..cloth_pos[2].."="..upper_ItemStack + end + if lower_ItemStack then + cloth = cloth .. ":"..cloth_pos[3].."="..lower_ItemStack + end + if footwear_ItemStack then + cloth = cloth .. ":"..cloth_pos[4].."="..footwear_ItemStack + end + --Now attached cloth + if not(next(attached_cloth) == nil) then + for i = 1, #attached_cloth do + local attached_item_name = attached_cloth[i] + local attached_itemstack = minetest.registered_items[attached_item_name] + local attached_cloth_type = minetest.get_item_group(attached_item_name, "cloth") + cloth = cloth .. ":"..cloth_pos[attached_cloth_type].."="..attached_itemstack._cloth_texture + end + end + return cloth +end diff --git a/mods/minetest_game/player_api/init.lua b/mods/minetest_game/player_api/init.lua new file mode 100644 index 0000000..de77180 --- /dev/null +++ b/mods/minetest_game/player_api/init.lua @@ -0,0 +1,66 @@ +-- player/init.lua + +dofile(minetest.get_modpath("player_api") .. "/api.lua") +dofile(minetest.get_modpath("player_api") .. "/base_texture.lua") +dofile(minetest.get_modpath("player_api") .. "/cloths.lua") + +-- Default player appearance +player_api.register_model("character.b3d", { + animation_speed = 30, + textures = {"character.png"}, + animations = { + -- Standard animations. + stand = {x = 0, y = 79}, + lay = {x = 162, y = 166}, + walk = {x = 168, y = 187}, + mine = {x = 189, y = 198}, + walk_mine = {x = 200, y = 219}, + sit = {x = 81, y = 160}, + swin = {x = 232, y = 280}, + swin_mine = {x = 281, y = 305}, + swin_and_mine = {x = 306, y = 330}, + swin_stand = {x = 232, y = 232}, + }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, + stepheight = 0.6, + eye_height = 1.47, +}) + +player_api.register_model("female.b3d", { + animation_speed = 30, + textures = { + "female.png", + "3d_armor_trans.png", + "3d_armor_trans.png", + }, + animations = { + -- Standard animations. + stand = {x = 0, y = 79}, + lay = {x = 162, y = 166}, + walk = {x = 168, y = 187}, + mine = {x = 189, y = 198}, + walk_mine = {x = 200, y = 219}, + sit = {x = 81, y = 160}, + swin = {x = 232, y = 280}, + swin_mine = {x = 281, y = 305}, + swin_and_mine = {x = 306, y = 330}, + swin_stand = {x = 232, y = 232}, + }, + collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, + stepheight = 0.6, + eye_height = 1.47, +}) + +-- Update appearance when the player joins +minetest.register_on_joinplayer(function(player) + local player_name = player:get_player_name() + player_api.player_attached[player_name] = false + local gender = player_api.get_gender(player) + if gender == "" then + player_api.select_gender(player_name) --select the gender + else + local cloth = player_api.compose_cloth(player) + player_api.registered_models[player_api.get_gender_model(gender)].textures[1] = cloth + player_api.set_model(player, player_api.get_gender_model(gender)) + end +end) diff --git a/mods/minetest_game/player_api/license.txt b/mods/minetest_game/player_api/license.txt new file mode 100644 index 0000000..bdc4315 --- /dev/null +++ b/mods/minetest_game/player_api/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011 celeron55, Perttu Ahola +Copyright (C) 2011 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2011 celeron55, Perttu Ahola +Copyright (C) 2012 MirceaKitsune +Copyright (C) 2012 Jordach +Copyright (C) 2015 kilbith +Copyright (C) 2016 sofar +Copyright (C) 2016 xunto +Copyright (C) 2016 Rogier-5 +Copyright (C) 2017 TeTpaAka +Copyright (C) 2017 Desour +Copyright (C) 2018 stujones11 +Copyright (C) 2019 An0n3m0us + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/player_api/locale/player_api.de.tr b/mods/minetest_game/player_api/locale/player_api.de.tr new file mode 100644 index 0000000..d66ba50 --- /dev/null +++ b/mods/minetest_game/player_api/locale/player_api.de.tr @@ -0,0 +1,4 @@ +# textdomain: player_api +Select your gender=Wählen Sie Ihr Geschlecht +Male=Mann +Female=Frau diff --git a/mods/minetest_game/player_api/locale/player_api.es.tr b/mods/minetest_game/player_api/locale/player_api.es.tr new file mode 100644 index 0000000..c8a500c --- /dev/null +++ b/mods/minetest_game/player_api/locale/player_api.es.tr @@ -0,0 +1,17 @@ +# textdomain: player_api +Select your gender=Selecciona tu género +Male=Hombre +Female=Mujer +Unisex=Unisex +Change the gender, from male to female or viceversa=Cambiar el género, de hombre a mujer o viceversa +Your gender is changed to=Tu género se ha cambiado a +Head=Cabeza +Upper=Parte superior +Lower=Parte inferior +Footwear=Calzado +Purple Stripe Summer T-shirt=Camiseta veraniega púrpura a rayas +Fresh Summer Denim Shorts=Pantalones vaqueros cortos y frescos +Pink Bow=Lazo rosa +Fine Blue Pants=Pantalones azules finos +Classic Green Sweater=Jersei verde clásico +Common Black Shoes=Zapatos negros comunes diff --git a/mods/minetest_game/player_api/locale/player_api.fr.tr b/mods/minetest_game/player_api/locale/player_api.fr.tr new file mode 100644 index 0000000..8e6da96 --- /dev/null +++ b/mods/minetest_game/player_api/locale/player_api.fr.tr @@ -0,0 +1,4 @@ +# textdomain: player_api +Select your gender=Choisissez votre sexe +Male=Homme +Female=Femme diff --git a/mods/minetest_game/player_api/locale/player_api.it.tr b/mods/minetest_game/player_api/locale/player_api.it.tr new file mode 100644 index 0000000..e3e8582 --- /dev/null +++ b/mods/minetest_game/player_api/locale/player_api.it.tr @@ -0,0 +1,4 @@ +# textdomain: player_api +Select your gender=Seleziona il tuo genere +Male=Uomo +Female=Donna diff --git a/mods/minetest_game/player_api/locale/player_api.pt.tr b/mods/minetest_game/player_api/locale/player_api.pt.tr new file mode 100644 index 0000000..52d7a18 --- /dev/null +++ b/mods/minetest_game/player_api/locale/player_api.pt.tr @@ -0,0 +1,4 @@ +# textdomain: player_api +Select your gender=Seleccione o seu género +Male=Homem +Female=Mulher diff --git a/mods/minetest_game/player_api/locale/player_api.ru.tr b/mods/minetest_game/player_api/locale/player_api.ru.tr new file mode 100644 index 0000000..01a5fa9 --- /dev/null +++ b/mods/minetest_game/player_api/locale/player_api.ru.tr @@ -0,0 +1,4 @@ +# textdomain: player_api +Select your gender=Выберите свой пол +Male=Человек +Female=Женщина diff --git a/mods/minetest_game/player_api/mod.conf b/mods/minetest_game/player_api/mod.conf new file mode 100644 index 0000000..198b86d --- /dev/null +++ b/mods/minetest_game/player_api/mod.conf @@ -0,0 +1,2 @@ +name = player_api +description = Minetest Game mod: player_api diff --git a/mods/minetest_game/player_api/models/character.b3d b/mods/minetest_game/player_api/models/character.b3d new file mode 100644 index 0000000..e18454a Binary files /dev/null and b/mods/minetest_game/player_api/models/character.b3d differ diff --git a/mods/minetest_game/player_api/models/character.blend b/mods/minetest_game/player_api/models/character.blend new file mode 100644 index 0000000..b91767d Binary files /dev/null and b/mods/minetest_game/player_api/models/character.blend differ diff --git a/mods/minetest_game/player_api/models/character.png b/mods/minetest_game/player_api/models/character.png new file mode 100644 index 0000000..89959d2 Binary files /dev/null and b/mods/minetest_game/player_api/models/character.png differ diff --git a/mods/minetest_game/player_api/models/female.b3d b/mods/minetest_game/player_api/models/female.b3d new file mode 100644 index 0000000..547f353 Binary files /dev/null and b/mods/minetest_game/player_api/models/female.b3d differ diff --git a/mods/minetest_game/player_api/models/female.blend b/mods/minetest_game/player_api/models/female.blend new file mode 100644 index 0000000..7ff1465 Binary files /dev/null and b/mods/minetest_game/player_api/models/female.blend differ diff --git a/mods/minetest_game/player_api/models/female.blend.b3d b/mods/minetest_game/player_api/models/female.blend.b3d new file mode 100644 index 0000000..25bc55e Binary files /dev/null and b/mods/minetest_game/player_api/models/female.blend.b3d differ diff --git a/mods/minetest_game/player_api/models/female.png b/mods/minetest_game/player_api/models/female.png new file mode 100644 index 0000000..efc43e7 Binary files /dev/null and b/mods/minetest_game/player_api/models/female.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_head_default.png b/mods/minetest_game/player_api/textures/cloth_female_head_default.png new file mode 100644 index 0000000..ae25519 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_head_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_head_default_inv.png b/mods/minetest_game/player_api/textures/cloth_female_head_default_inv.png new file mode 100644 index 0000000..602c5b4 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_head_default_inv.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_head_preview.png b/mods/minetest_game/player_api/textures/cloth_female_head_preview.png new file mode 100644 index 0000000..e2c60f6 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_head_preview.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_lower_default.png b/mods/minetest_game/player_api/textures/cloth_female_lower_default.png new file mode 100644 index 0000000..ace59f1 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_lower_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_lower_default_inv.png b/mods/minetest_game/player_api/textures/cloth_female_lower_default_inv.png new file mode 100644 index 0000000..22e3153 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_lower_default_inv.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_lower_preview.png b/mods/minetest_game/player_api/textures/cloth_female_lower_preview.png new file mode 100644 index 0000000..7e8291e Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_lower_preview.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_upper_default.png b/mods/minetest_game/player_api/textures/cloth_female_upper_default.png new file mode 100644 index 0000000..6371ba9 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_upper_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_upper_default_inv.png b/mods/minetest_game/player_api/textures/cloth_female_upper_default_inv.png new file mode 100644 index 0000000..e2f9ac2 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_upper_default_inv.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_female_upper_preview.png b/mods/minetest_game/player_api/textures/cloth_female_upper_preview.png new file mode 100644 index 0000000..641cd32 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_female_upper_preview.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_lower_underwear_default.png b/mods/minetest_game/player_api/textures/cloth_lower_underwear_default.png new file mode 100644 index 0000000..29912ee Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_lower_underwear_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_lower_underwear_preview.png b/mods/minetest_game/player_api/textures/cloth_lower_underwear_preview.png new file mode 100644 index 0000000..9aa9734 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_lower_underwear_preview.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_male_lower_default.png b/mods/minetest_game/player_api/textures/cloth_male_lower_default.png new file mode 100644 index 0000000..1a29119 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_male_lower_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_male_lower_default_inv.png b/mods/minetest_game/player_api/textures/cloth_male_lower_default_inv.png new file mode 100644 index 0000000..aa8f4fc Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_male_lower_default_inv.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_male_lower_preview.png b/mods/minetest_game/player_api/textures/cloth_male_lower_preview.png new file mode 100644 index 0000000..d841b7a Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_male_lower_preview.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_male_upper_default.png b/mods/minetest_game/player_api/textures/cloth_male_upper_default.png new file mode 100644 index 0000000..675a9a1 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_male_upper_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_male_upper_default_inv.png b/mods/minetest_game/player_api/textures/cloth_male_upper_default_inv.png new file mode 100644 index 0000000..29691cd Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_male_upper_default_inv.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_male_upper_preview.png b/mods/minetest_game/player_api/textures/cloth_male_upper_preview.png new file mode 100644 index 0000000..7402ddb Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_male_upper_preview.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_unisex_footwear_default.png b/mods/minetest_game/player_api/textures/cloth_unisex_footwear_default.png new file mode 100644 index 0000000..2649932 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_unisex_footwear_default.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_unisex_footwear_default_inv.png b/mods/minetest_game/player_api/textures/cloth_unisex_footwear_default_inv.png new file mode 100644 index 0000000..ce9f6cd Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_unisex_footwear_default_inv.png differ diff --git a/mods/minetest_game/player_api/textures/cloth_unisex_footwear_preview.png b/mods/minetest_game/player_api/textures/cloth_unisex_footwear_preview.png new file mode 100644 index 0000000..baaa693 Binary files /dev/null and b/mods/minetest_game/player_api/textures/cloth_unisex_footwear_preview.png differ diff --git a/mods/minetest_game/player_api/textures/player.png b/mods/minetest_game/player_api/textures/player.png new file mode 100644 index 0000000..6d61c43 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player.png differ diff --git a/mods/minetest_game/player_api/textures/player_back.png b/mods/minetest_game/player_api/textures/player_back.png new file mode 100644 index 0000000..5e9ef05 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_back.png differ diff --git a/mods/minetest_game/player_api/textures/player_black_eye.png b/mods/minetest_game/player_api/textures/player_black_eye.png new file mode 100644 index 0000000..490ff00 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_black_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_blue_eye.png b/mods/minetest_game/player_api/textures/player_blue_eye.png new file mode 100644 index 0000000..c3e01d3 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_blue_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_brown_eye.png b/mods/minetest_game/player_api/textures/player_brown_eye.png new file mode 100644 index 0000000..22071ef Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_brown_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_eyebrowns_default.png b/mods/minetest_game/player_api/textures/player_eyebrowns_default.png new file mode 100644 index 0000000..ea63e9f Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_eyebrowns_default.png differ diff --git a/mods/minetest_game/player_api/textures/player_face_skin.png b/mods/minetest_game/player_api/textures/player_face_skin.png new file mode 100644 index 0000000..2485061 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_face_skin.png differ diff --git a/mods/minetest_game/player_api/textures/player_female_face.png b/mods/minetest_game/player_api/textures/player_female_face.png new file mode 100644 index 0000000..65798ce Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_female_face.png differ diff --git a/mods/minetest_game/player_api/textures/player_female_hair_default.png b/mods/minetest_game/player_api/textures/player_female_hair_default.png new file mode 100644 index 0000000..de4b42e Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_female_hair_default.png differ diff --git a/mods/minetest_game/player_api/textures/player_female_hair_default_preview.png b/mods/minetest_game/player_api/textures/player_female_hair_default_preview.png new file mode 100644 index 0000000..46322f0 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_female_hair_default_preview.png differ diff --git a/mods/minetest_game/player_api/textures/player_female_mouth_default.png b/mods/minetest_game/player_api/textures/player_female_mouth_default.png new file mode 100644 index 0000000..25800da Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_female_mouth_default.png differ diff --git a/mods/minetest_game/player_api/textures/player_gray_eye.png b/mods/minetest_game/player_api/textures/player_gray_eye.png new file mode 100644 index 0000000..26d6df6 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_gray_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_green_eye.png b/mods/minetest_game/player_api/textures/player_green_eye.png new file mode 100644 index 0000000..8bec815 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_green_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_hazel_eye.png b/mods/minetest_game/player_api/textures/player_hazel_eye.png new file mode 100644 index 0000000..90b7f31 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_hazel_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_male_face.png b/mods/minetest_game/player_api/textures/player_male_face.png new file mode 100644 index 0000000..37e024c Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_male_face.png differ diff --git a/mods/minetest_game/player_api/textures/player_male_hair_default.png b/mods/minetest_game/player_api/textures/player_male_hair_default.png new file mode 100644 index 0000000..3ceaaf0 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_male_hair_default.png differ diff --git a/mods/minetest_game/player_api/textures/player_male_hair_default_preview.png b/mods/minetest_game/player_api/textures/player_male_hair_default_preview.png new file mode 100644 index 0000000..cb7393c Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_male_hair_default_preview.png differ diff --git a/mods/minetest_game/player_api/textures/player_male_mouth_default.png b/mods/minetest_game/player_api/textures/player_male_mouth_default.png new file mode 100644 index 0000000..bd91cca Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_male_mouth_default.png differ diff --git a/mods/minetest_game/player_api/textures/player_pink_eye.png b/mods/minetest_game/player_api/textures/player_pink_eye.png new file mode 100644 index 0000000..72f51cb Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_pink_eye.png differ diff --git a/mods/minetest_game/player_api/textures/player_skin.png b/mods/minetest_game/player_api/textures/player_skin.png new file mode 100644 index 0000000..ede5c39 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_skin.png differ diff --git a/mods/minetest_game/player_api/textures/player_violet_eye.png b/mods/minetest_game/player_api/textures/player_violet_eye.png new file mode 100644 index 0000000..74a2e79 Binary files /dev/null and b/mods/minetest_game/player_api/textures/player_violet_eye.png differ diff --git a/mods/minetest_game/screenshot.png b/mods/minetest_game/screenshot.png new file mode 100644 index 0000000..d648ea4 Binary files /dev/null and b/mods/minetest_game/screenshot.png differ diff --git a/mods/minetest_game/screwdriver/README.txt b/mods/minetest_game/screwdriver/README.txt new file mode 100644 index 0000000..14c073e --- /dev/null +++ b/mods/minetest_game/screwdriver/README.txt @@ -0,0 +1,13 @@ +Minetest Game mod: screwdriver +============================== +See license.txt for license information. + +License of source code +---------------------- +Originally by RealBadAngel, Maciej Kasatkin (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +License of media (textures) +--------------------------- +Created by Gambit (CC BY-SA 3.0): + screwdriver.png diff --git a/mods/minetest_game/screwdriver/init.lua b/mods/minetest_game/screwdriver/init.lua new file mode 100644 index 0000000..98548f0 --- /dev/null +++ b/mods/minetest_game/screwdriver/init.lua @@ -0,0 +1,177 @@ +-- screwdriver/init.lua + +screwdriver = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("screwdriver") + + +screwdriver.ROTATE_FACE = 1 +screwdriver.ROTATE_AXIS = 2 +screwdriver.disallow = function(pos, node, user, mode, new_param2) + return false +end +screwdriver.rotate_simple = function(pos, node, user, mode, new_param2) + if mode ~= screwdriver.ROTATE_FACE then + return false + end +end + +-- For attached wallmounted nodes: returns true if rotation is valid +-- simplified version of minetest:builtin/game/falling.lua#L148. +local function check_attached_node(pos, rotation) + local d = minetest.wallmounted_to_dir(rotation) + local p2 = vector.add(pos, d) + local n = minetest.get_node(p2).name + local def2 = minetest.registered_nodes[n] + if def2 and not def2.walkable then + return false + end + return true +end + +screwdriver.rotate = {} + +local facedir_tbl = { + [screwdriver.ROTATE_FACE] = { + [0] = 1, [1] = 2, [2] = 3, [3] = 0, + [4] = 5, [5] = 6, [6] = 7, [7] = 4, + [8] = 9, [9] = 10, [10] = 11, [11] = 8, + [12] = 13, [13] = 14, [14] = 15, [15] = 12, + [16] = 17, [17] = 18, [18] = 19, [19] = 16, + [20] = 21, [21] = 22, [22] = 23, [23] = 20, + }, + [screwdriver.ROTATE_AXIS] = { + [0] = 4, [1] = 4, [2] = 4, [3] = 4, + [4] = 8, [5] = 8, [6] = 8, [7] = 8, + [8] = 12, [9] = 12, [10] = 12, [11] = 12, + [12] = 16, [13] = 16, [14] = 16, [15] = 16, + [16] = 20, [17] = 20, [18] = 20, [19] = 20, + [20] = 0, [21] = 0, [22] = 0, [23] = 0, + }, +} + +screwdriver.rotate.facedir = function(pos, node, mode) + local rotation = node.param2 % 32 -- get first 5 bits + local other = node.param2 - rotation + rotation = facedir_tbl[mode][rotation] or 0 + return rotation + other +end + +screwdriver.rotate.colorfacedir = screwdriver.rotate.facedir + +local wallmounted_tbl = { + [screwdriver.ROTATE_FACE] = {[2] = 5, [3] = 4, [4] = 2, [5] = 3, [1] = 0, [0] = 1}, + [screwdriver.ROTATE_AXIS] = {[2] = 5, [3] = 4, [4] = 2, [5] = 1, [1] = 0, [0] = 3} +} + +screwdriver.rotate.wallmounted = function(pos, node, mode) + local rotation = node.param2 % 8 -- get first 3 bits + local other = node.param2 - rotation + rotation = wallmounted_tbl[mode][rotation] or 0 + if minetest.get_item_group(node.name, "attached_node") ~= 0 then + -- find an acceptable orientation + for i = 1, 5 do + if not check_attached_node(pos, rotation) then + rotation = wallmounted_tbl[mode][rotation] or 0 + else + break + end + end + end + return rotation + other +end + +screwdriver.rotate.colorwallmounted = screwdriver.rotate.wallmounted + +-- Handles rotation +screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses) + if pointed_thing.type ~= "node" then + return + end + + local pos = pointed_thing.under + local player_name = user and user:get_player_name() or "" + + if minetest.is_protected(pos, player_name) then + minetest.record_protection_violation(pos, player_name) + return + end + + local node = minetest.get_node(pos) + local ndef = minetest.registered_nodes[node.name] + if not ndef then + return itemstack + end + -- can we rotate this paramtype2? + local fn = screwdriver.rotate[ndef.paramtype2] + if not fn and not ndef.on_rotate then + return itemstack + end + + local should_rotate = true + local new_param2 + if fn then + new_param2 = fn(pos, node, mode) + else + new_param2 = node.param2 + end + + -- Node provides a handler, so let the handler decide instead if the node can be rotated + if ndef.on_rotate then + -- Copy pos and node because callback can modify it + local result = ndef.on_rotate(vector.new(pos), + {name = node.name, param1 = node.param1, param2 = node.param2}, + user, mode, new_param2) + if result == false then -- Disallow rotation + return itemstack + elseif result == true then + should_rotate = false + end + elseif ndef.on_rotate == false then + return itemstack + elseif ndef.can_dig and not ndef.can_dig(pos, user) then + return itemstack + end + + if should_rotate and new_param2 ~= node.param2 then + node.param2 = new_param2 + minetest.swap_node(pos, node) + minetest.check_for_falling(pos) + end + + if not minetest.is_creative_enabled(player_name) then + itemstack:add_wear(65535 / ((uses or 200) - 1)) + end + + return itemstack +end + +-- Screwdriver +minetest.register_tool("screwdriver:screwdriver", { + description = S("Screwdriver") .. "\n" .. S("(left-click rotates face, right-click rotates axis)"), + inventory_image = "screwdriver.png", + groups = {tool = 1}, + on_use = function(itemstack, user, pointed_thing) + screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_FACE, 200) + return itemstack + end, + on_place = function(itemstack, user, pointed_thing) + screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, 200) + return itemstack + end, +}) + + +minetest.register_craft({ + output = "screwdriver:screwdriver", + recipe = { + {"default:steel_ingot"}, + {"group:stick"} + } +}) + +minetest.register_alias("screwdriver:screwdriver1", "screwdriver:screwdriver") +minetest.register_alias("screwdriver:screwdriver2", "screwdriver:screwdriver") +minetest.register_alias("screwdriver:screwdriver3", "screwdriver:screwdriver") +minetest.register_alias("screwdriver:screwdriver4", "screwdriver:screwdriver") diff --git a/mods/minetest_game/screwdriver/license.txt b/mods/minetest_game/screwdriver/license.txt new file mode 100644 index 0000000..d9b721b --- /dev/null +++ b/mods/minetest_game/screwdriver/license.txt @@ -0,0 +1,50 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2013-2016 RealBadAngel, Maciej Kasatkin +Copyright (C) 2013-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2013-2016 Gambit + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.de.tr b/mods/minetest_game/screwdriver/locale/screwdriver.de.tr new file mode 100644 index 0000000..3c48ab4 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.de.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Schraubendreher +(left-click rotates face, right-click rotates axis)=(Linksklick dreht Seite, Rechtsklick dreht Achse) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.eo.tr b/mods/minetest_game/screwdriver/locale/screwdriver.eo.tr new file mode 100644 index 0000000..cf0976a --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.eo.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Ŝraŭbturnilo +(left-click rotates face, right-click rotates axis)=(maldekstra-klako turnas supraĵo, dekstra-klako turnas akso) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.es.tr b/mods/minetest_game/screwdriver/locale/screwdriver.es.tr new file mode 100644 index 0000000..868ffc3 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.es.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Destornillador +(left-click rotates face, right-click rotates axis)=(clic-izquierdo gira la cara, clic-derecho rota el eje) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.fr.tr b/mods/minetest_game/screwdriver/locale/screwdriver.fr.tr new file mode 100644 index 0000000..fe34a9b --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.fr.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Tournevis +(left-click rotates face, right-click rotates axis)=(clic gauche pour changer de face, clic droit pour changer d'axe) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.id.tr b/mods/minetest_game/screwdriver/locale/screwdriver.id.tr new file mode 100644 index 0000000..ec83c79 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.id.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Obeng +(left-click rotates face, right-click rotates axis)=(klik kiri putar sisi, klik kanan putar sumbu) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.it.tr b/mods/minetest_game/screwdriver/locale/screwdriver.it.tr new file mode 100644 index 0000000..ff44b89 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.it.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Cacciavite +(left-click rotates face, right-click rotates axis)=(click sinistro ruota la faccia, click destro ruota l'asse) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.jbo.tr b/mods/minetest_game/screwdriver/locale/screwdriver.jbo.tr new file mode 100644 index 0000000..1a85bb6 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.jbo.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=lo lupcartci +(left-click rotates face, right-click rotates axis)=.i tu'a le zulselpevysmacu cu rinka lo nu le sefta cu carna@n.i tu'a le prityselpevysmacu cu rinka lo nu le jendu cu carna diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.ms.tr b/mods/minetest_game/screwdriver/locale/screwdriver.ms.tr new file mode 100644 index 0000000..f296fc5 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.ms.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Pemutar Skru +(left-click rotates face, right-click rotates axis)=(klik-kiri putar muka, klik-kanan putar paksi) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.pt_BR.tr b/mods/minetest_game/screwdriver/locale/screwdriver.pt_BR.tr new file mode 100644 index 0000000..3e89f40 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.pt_BR.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Chave de fenda +(left-click rotates face, right-click rotates axis)=(Clique esquerdo rotaciona a face, clique direito rotaciona o eixo) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.ru.tr b/mods/minetest_game/screwdriver/locale/screwdriver.ru.tr new file mode 100644 index 0000000..bbab330 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.ru.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Отвёртка +(left-click rotates face, right-click rotates axis)=(клик левой кнопкой мыши вращает грань, клик правой кнопкой мыши вращает ось) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.se.tr b/mods/minetest_game/screwdriver/locale/screwdriver.se.tr new file mode 100644 index 0000000..be440a7 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.se.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Skruvmejsel +(left-click rotates face, right-click rotates axis)=(vänster-klick roterar ansikte, höger-klick roterar axeln) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.sk.tr b/mods/minetest_game/screwdriver/locale/screwdriver.sk.tr new file mode 100644 index 0000000..74cb417 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.sk.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=Skrutkovač +(left-click rotates face, right-click rotates axis)=(Ľavý klik otáča stranu, pravý klik otáča os) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.zh_CN.tr b/mods/minetest_game/screwdriver/locale/screwdriver.zh_CN.tr new file mode 100644 index 0000000..caddf79 --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.zh_CN.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=螺丝刀 +(left-click rotates face, right-click rotates axis)=(左键单击旋转面,右键单击旋转轴) diff --git a/mods/minetest_game/screwdriver/locale/screwdriver.zh_TW.tr b/mods/minetest_game/screwdriver/locale/screwdriver.zh_TW.tr new file mode 100644 index 0000000..e638bfa --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/screwdriver.zh_TW.tr @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver=螺絲刀 +(left-click rotates face, right-click rotates axis)=(左鍵單擊旋轉面,右鍵單擊旋轉軸) diff --git a/mods/minetest_game/screwdriver/locale/template.txt b/mods/minetest_game/screwdriver/locale/template.txt new file mode 100644 index 0000000..4cc8e2a --- /dev/null +++ b/mods/minetest_game/screwdriver/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: screwdriver +Screwdriver= +(left-click rotates face, right-click rotates axis)= diff --git a/mods/minetest_game/screwdriver/mod.conf b/mods/minetest_game/screwdriver/mod.conf new file mode 100644 index 0000000..306c52b --- /dev/null +++ b/mods/minetest_game/screwdriver/mod.conf @@ -0,0 +1,2 @@ +name = screwdriver +description = Minetest Game mod: screwdriver diff --git a/mods/minetest_game/screwdriver/textures/screwdriver.png b/mods/minetest_game/screwdriver/textures/screwdriver.png new file mode 100644 index 0000000..b2a56d5 Binary files /dev/null and b/mods/minetest_game/screwdriver/textures/screwdriver.png differ diff --git a/mods/minetest_game/sethome/README.txt b/mods/minetest_game/sethome/README.txt new file mode 100644 index 0000000..6f0a282 --- /dev/null +++ b/mods/minetest_game/sethome/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: sethome +========================== +See license.txt for license information. + +Authors of source code +---------------------- +sfan5 (MIT) diff --git a/mods/minetest_game/sethome/init.lua b/mods/minetest_game/sethome/init.lua new file mode 100644 index 0000000..9fc8e6a --- /dev/null +++ b/mods/minetest_game/sethome/init.lua @@ -0,0 +1,107 @@ +-- sethome/init.lua + +sethome = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("sethome") + + +local homes_file = minetest.get_worldpath() .. "/homes" +local homepos = {} + +local function loadhomes() + local input = io.open(homes_file, "r") + if not input then + return -- no longer an error + end + + -- Iterate over all stored positions in the format "x y z player" for each line + for pos, name in input:read("*a"):gmatch("(%S+ %S+ %S+)%s([%w_-]+)[\r\n]") do + homepos[name] = minetest.string_to_pos(pos) + end + input:close() +end + +loadhomes() + +sethome.set = function(name, pos) + local player = minetest.get_player_by_name(name) + if not player or not pos then + return false + end + local player_meta = player:get_meta() + player_meta:set_string("sethome:home", minetest.pos_to_string(pos)) + + -- remove `name` from the old storage file + if not homepos[name] then + return true + end + local data = {} + local output = io.open(homes_file, "w") + if output then + homepos[name] = nil + for i, v in pairs(homepos) do + table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, i)) + end + output:write(table.concat(data)) + io.close(output) + return true + end + return true -- if the file doesn't exist - don't return an error. +end + +sethome.get = function(name) + local player = minetest.get_player_by_name(name) + local player_meta = player:get_meta() + local pos = minetest.string_to_pos(player_meta:get_string("sethome:home")) + if pos then + return pos + end + + -- fetch old entry from storage table + pos = homepos[name] + if pos then + return vector.new(pos) + else + return nil + end +end + +sethome.go = function(name) + local pos = sethome.get(name) + local player = minetest.get_player_by_name(name) + if player and pos then + player:set_pos(pos) + return true + end + return false +end + +minetest.register_privilege("home", { + description = S("Can use /sethome and /home"), + give_to_singleplayer = false +}) + +minetest.register_chatcommand("home", { + description = S("Teleport you to your home point"), + privs = {home = true}, + func = function(name) + if sethome.go(name) then + return true, S("Teleported to home!") + end + return false, S("Set a home using /sethome") + end, +}) + +minetest.register_chatcommand("sethome", { + description = S("Set your home point"), + privs = {home = true}, + func = function(name) + name = name or "" -- fallback to blank name if nil + local player = minetest.get_player_by_name(name) + if player and sethome.set(name, player:get_pos()) then + return true, S("Home set!") + end + return false, S("Player not found!") + end, +}) diff --git a/mods/minetest_game/sethome/license.txt b/mods/minetest_game/sethome/license.txt new file mode 100644 index 0000000..09f03b0 --- /dev/null +++ b/mods/minetest_game/sethome/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 sfan5 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/minetest_game/sethome/locale/sethome.de.tr b/mods/minetest_game/sethome/locale/sethome.de.tr new file mode 100644 index 0000000..46279dd --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.de.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Kann /sethome und /home benutzen +Teleport you to your home point=Teleportieren Sie sich zu Ihrem Zuhause-Punkt +Teleported to home!=Nach Hause teleportiert! +Set a home using /sethome=Ein Zuhause mit /sethome setzen +Set your home point=Ihren Zuhause-Punkt setzen +Home set!=Zuhause gesetzt! +Player not found!=Spieler nicht gefunden! diff --git a/mods/minetest_game/sethome/locale/sethome.eo.tr b/mods/minetest_game/sethome/locale/sethome.eo.tr new file mode 100644 index 0000000..c505064 --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.eo.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Povas uzi /sethome kaj /home +Teleport you to your home point=Teletransportu vi al via hejmo +Teleported to home!=Teletransportis al hejmo! +Set a home using /sethome=Fiksi hejmon per /sethome +Set your home point=Fiksi vian hejman punkto +Home set!=Hejmo fiksis! +Player not found!=Ludanto ne estas trovebla! diff --git a/mods/minetest_game/sethome/locale/sethome.es.tr b/mods/minetest_game/sethome/locale/sethome.es.tr new file mode 100644 index 0000000..7c04ee3 --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.es.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Puedes usar /sethome y /home +Teleport you to your home point=Teletranspórtate a tu hogar +Teleported to home!=¡Teletransportado a tu hogar! +Set a home using /sethome=Establece tu hogar usando /sethome +Set your home point=Establece el sitio de tu hogar +Home set!=¡Hogar establecido! +Player not found!=¡Jugador no encontrado! diff --git a/mods/minetest_game/sethome/locale/sethome.fr.tr b/mods/minetest_game/sethome/locale/sethome.fr.tr new file mode 100644 index 0000000..852621d --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.fr.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Peut utiliser /sethome et /home +Teleport you to your home point=Vous téléporter à votre domicile +Teleported to home!=Téléporté à votre domicile ! +Set a home using /sethome=Définir un domicile en utilisant /sethome +Set your home point=Définir votre domicile +Home set!=Domicile défini ! +Player not found!=Joueur non trouvé ! diff --git a/mods/minetest_game/sethome/locale/sethome.id.tr b/mods/minetest_game/sethome/locale/sethome.id.tr new file mode 100644 index 0000000..1966978 --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.id.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Boleh pakai /sethome dan /home +Teleport you to your home point=Teleportasi ke rumah Anda +Teleported to home!=Teleportasi ke rumah! +Set a home using /sethome=Atur letak rumah dengan /sethome +Set your home point=Atur letak rumah +Home set!=Letak rumah diatur! +Player not found!=Pemain tidak ditemukan! diff --git a/mods/minetest_game/sethome/locale/sethome.it.tr b/mods/minetest_game/sethome/locale/sethome.it.tr new file mode 100644 index 0000000..6bdf11c --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.it.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Può usare /sethome e /home +Teleport you to your home point=Ti teletrasporta al tuo punto di domicilio +Teleported to home!=Teletrasportato a casa! +Set a home using /sethome=Imposta un domicilio usando /sethome +Set your home point=Imposta il tuo punto di domicilio +Home set!=Domicilio impostato! +Player not found!=Giocatore non trovato! diff --git a/mods/minetest_game/sethome/locale/sethome.jbo.tr b/mods/minetest_game/sethome/locale/sethome.jbo.tr new file mode 100644 index 0000000..46279dd --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.jbo.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Kann /sethome und /home benutzen +Teleport you to your home point=Teleportieren Sie sich zu Ihrem Zuhause-Punkt +Teleported to home!=Nach Hause teleportiert! +Set a home using /sethome=Ein Zuhause mit /sethome setzen +Set your home point=Ihren Zuhause-Punkt setzen +Home set!=Zuhause gesetzt! +Player not found!=Spieler nicht gefunden! diff --git a/mods/minetest_game/sethome/locale/sethome.ms.tr b/mods/minetest_game/sethome/locale/sethome.ms.tr new file mode 100644 index 0000000..7e9ec76 --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.ms.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Boleh guna /sethome dan /home +Teleport you to your home point=Teleportasikan anda ke titik rumah anda +Teleported to home!=Diteleportasikan ke rumah! +Set a home using /sethome=Tetapkan rumah menggunakan /sethome +Set your home point=Tetapkan titik rumah anda +Home set!=Rumah ditetapkan! +Player not found!=Pemain tidak dijumpai! diff --git a/mods/minetest_game/sethome/locale/sethome.pt_BR.tr b/mods/minetest_game/sethome/locale/sethome.pt_BR.tr new file mode 100644 index 0000000..fe2c35c --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.pt_BR.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Pode usar /sethome e /home +Teleport you to your home point=Teletransportá-lo para seu ponto de origem +Teleported to home!=Teletransportado para o ponto de origem! +Set a home using /sethome=Defina um ponto de origem usando /sethome +Set your home point=Define seu ponto de origem +Home set!=Ponto de origem definido! +Player not found!=Jogador não encontrado! diff --git a/mods/minetest_game/sethome/locale/sethome.ru.tr b/mods/minetest_game/sethome/locale/sethome.ru.tr new file mode 100644 index 0000000..6738824 --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.ru.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Возможность использовать /sethome и /home +Teleport you to your home point=Вы телепортируетесь в свою домашнюю точку +Teleported to home!=Вы телепортировались домой! +Set a home using /sethome=Установите домашнюю точку, используя /sethome +Set your home point=Установите вашу домашнюю точку +Home set!=Домашняя точка установлена! +Player not found!=Игрок не обнаружен! diff --git a/mods/minetest_game/sethome/locale/sethome.se.tr b/mods/minetest_game/sethome/locale/sethome.se.tr new file mode 100644 index 0000000..4ae8c52 --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.se.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Kan används /sethome och /home +Teleport you to your home point=Teleportera dig till din hempunkt +Teleported to home!=Teleporterad hem! +Set a home using /sethome=Ställ in ett hem med /sethome +Set your home point=Ställ in din hempunkt +Home set!=Hem inställt! +Player not found!=Spelare inte hittad! diff --git a/mods/minetest_game/sethome/locale/sethome.sk.tr b/mods/minetest_game/sethome/locale/sethome.sk.tr new file mode 100644 index 0000000..be5233e --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.sk.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=Môžeš použivať /sethome a /home +Teleport you to your home point=Teleportuj sa domov +Teleported to home!=Teleportovaný domov! +Set a home using /sethome=Nastav si domov použitím /sethome +Set your home point=Nastaviť si domov +Home set!=Domov nastavený! +Player not found!=Hráč nenájdený! diff --git a/mods/minetest_game/sethome/locale/sethome.zh_CN.tr b/mods/minetest_game/sethome/locale/sethome.zh_CN.tr new file mode 100644 index 0000000..9e3780a --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=可以使用/sethome和/home +Teleport you to your home point=传送您到您家的地点 +Teleported to home!=已传送到家! +Set a home using /sethome=使用/sethome设定家 +Set your home point=设定您家的地点 +Home set!=已设定家! +Player not found!=未找到玩家! diff --git a/mods/minetest_game/sethome/locale/sethome.zh_TW.tr b/mods/minetest_game/sethome/locale/sethome.zh_TW.tr new file mode 100644 index 0000000..43e14aa --- /dev/null +++ b/mods/minetest_game/sethome/locale/sethome.zh_TW.tr @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home=可以使用/sethome和/home +Teleport you to your home point=傳送您到您家的地點 +Teleported to home!=已傳送到家! +Set a home using /sethome=使用/sethome設定家 +Set your home point=設定您家的地點 +Home set!=已設定家! +Player not found!=未找到玩家! diff --git a/mods/minetest_game/sethome/locale/template.txt b/mods/minetest_game/sethome/locale/template.txt new file mode 100644 index 0000000..d04bd50 --- /dev/null +++ b/mods/minetest_game/sethome/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: sethome +Can use /sethome and /home= +Teleport you to your home point= +Teleported to home!= +Set a home using /sethome= +Set your home point= +Home set!= +Player not found!= diff --git a/mods/minetest_game/sethome/mod.conf b/mods/minetest_game/sethome/mod.conf new file mode 100644 index 0000000..0079925 --- /dev/null +++ b/mods/minetest_game/sethome/mod.conf @@ -0,0 +1,2 @@ +name = sethome +description = Minetest Game mod: sethome diff --git a/mods/minetest_game/sfinv/README.txt b/mods/minetest_game/sfinv/README.txt new file mode 100644 index 0000000..a69e3c3 --- /dev/null +++ b/mods/minetest_game/sfinv/README.txt @@ -0,0 +1,18 @@ +Minetest Game mod: sfinv +======================== +See license.txt for license information. + +Simple Fast Inventory. +A cleaner, simpler, solution to having an advanced inventory in Minetest. +See game_api.txt for this mod's API. +Available for use outside of MTG here: +https://forum.minetest.net/viewtopic.php?t=19765 + +Authors of source code +---------------------- +rubenwardy (MIT) + +Authors of media +---------------- +paramat (CC BY-SA 3.0): + sfinv_crafting_arrow.png - derived from a texture by BlockMen (CC BY-SA 3.0) diff --git a/mods/minetest_game/sfinv/api.lua b/mods/minetest_game/sfinv/api.lua new file mode 100644 index 0000000..1dbc44a --- /dev/null +++ b/mods/minetest_game/sfinv/api.lua @@ -0,0 +1,189 @@ +sfinv = { + pages = {}, + pages_unordered = {}, + contexts = {}, + enabled = true +} + +function sfinv.register_page(name, def) + assert(name, "Invalid sfinv page. Requires a name") + assert(def, "Invalid sfinv page. Requires a def[inition] table") + assert(def.get, "Invalid sfinv page. Def requires a get function.") + assert(not sfinv.pages[name], "Attempt to register already registered sfinv page " .. dump(name)) + + sfinv.pages[name] = def + def.name = name + table.insert(sfinv.pages_unordered, def) +end + +function sfinv.override_page(name, def) + assert(name, "Invalid sfinv page override. Requires a name") + assert(def, "Invalid sfinv page override. Requires a def[inition] table") + local page = sfinv.pages[name] + assert(page, "Attempt to override sfinv page " .. dump(name) .. " which does not exist.") + for key, value in pairs(def) do + page[key] = value + end +end + +function sfinv.get_nav_fs(player, context, nav, current_idx) + -- Only show tabs if there is more than one page + if #nav > 1 then + return "tabheader[0,0;sfinv_nav_tabs;" .. table.concat(nav, ",") .. + ";" .. current_idx .. ";true;false]" + else + return "" + end +end + +local theme_inv = [[ + image[0,5.2;1,1;gui_hb_bg.png] + image[1,5.2;1,1;gui_hb_bg.png] + image[2,5.2;1,1;gui_hb_bg.png] + image[3,5.2;1,1;gui_hb_bg.png] + image[4,5.2;1,1;gui_hb_bg.png] + image[5,5.2;1,1;gui_hb_bg.png] + image[6,5.2;1,1;gui_hb_bg.png] + image[7,5.2;1,1;gui_hb_bg.png] + list[current_player;main;0,5.2;8,1;] + list[current_player;main;0,6.35;8,3;8] + ]] + +function sfinv.make_formspec(player, context, content, show_inv, size) + local tmp = { + size or "size[8,9.1]", + sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx), + show_inv and theme_inv or "", + content + } + return table.concat(tmp, "") +end + +function sfinv.get_homepage_name(player) + return "sfinv:crafting" +end + +function sfinv.get_formspec(player, context) + -- Generate navigation tabs + local nav = {} + local nav_ids = {} + local current_idx = 1 + for i, pdef in pairs(sfinv.pages_unordered) do + if not pdef.is_in_nav or pdef:is_in_nav(player, context) then + nav[#nav + 1] = pdef.title + nav_ids[#nav_ids + 1] = pdef.name + if pdef.name == context.page then + current_idx = #nav_ids + end + end + end + context.nav = nav_ids + context.nav_titles = nav + context.nav_idx = current_idx + + -- Generate formspec + local page = sfinv.pages[context.page] or sfinv.pages["404"] + if page then + return page:get(player, context) + else + local old_page = context.page + local home_page = sfinv.get_homepage_name(player) + + if old_page == home_page then + minetest.log("error", "[sfinv] Couldn't find " .. dump(old_page) .. + ", which is also the old page") + + return "" + end + + context.page = home_page + assert(sfinv.pages[context.page], "[sfinv] Invalid homepage") + minetest.log("warning", "[sfinv] Couldn't find " .. dump(old_page) .. + " so switching to homepage") + + return sfinv.get_formspec(player, context) + end +end + +function sfinv.get_or_create_context(player) + local name = player:get_player_name() + local context = sfinv.contexts[name] + if not context then + context = { + page = sfinv.get_homepage_name(player) + } + sfinv.contexts[name] = context + end + return context +end + +function sfinv.set_context(player, context) + sfinv.contexts[player:get_player_name()] = context +end + +function sfinv.set_player_inventory_formspec(player, context) + local fs = sfinv.get_formspec(player, + context or sfinv.get_or_create_context(player)) + player:set_inventory_formspec(fs) +end + +function sfinv.set_page(player, pagename) + local context = sfinv.get_or_create_context(player) + local oldpage = sfinv.pages[context.page] + if oldpage and oldpage.on_leave then + oldpage:on_leave(player, context) + end + context.page = pagename + local page = sfinv.pages[pagename] + if page.on_enter then + page:on_enter(player, context) + end + sfinv.set_player_inventory_formspec(player, context) +end + +function sfinv.get_page(player) + local context = sfinv.contexts[player:get_player_name()] + return context and context.page or sfinv.get_homepage_name(player) +end + +minetest.register_on_joinplayer(function(player) + if sfinv.enabled then + sfinv.set_player_inventory_formspec(player) + end +end) + +minetest.register_on_leaveplayer(function(player) + sfinv.contexts[player:get_player_name()] = nil +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "" or not sfinv.enabled then + return false + end + + -- Get Context + local name = player:get_player_name() + local context = sfinv.contexts[name] + if not context then + sfinv.set_player_inventory_formspec(player) + return false + end + + -- Was a tab selected? + if fields.sfinv_nav_tabs and context.nav then + local tid = tonumber(fields.sfinv_nav_tabs) + if tid and tid > 0 then + local id = context.nav[tid] + local page = sfinv.pages[id] + if id and page then + sfinv.set_page(player, id) + end + end + else + -- Pass event to page + local page = sfinv.pages[context.page] + if page and page.on_player_receive_fields then + return page:on_player_receive_fields(player, context, fields) + end + end +end) diff --git a/mods/minetest_game/sfinv/init.lua b/mods/minetest_game/sfinv/init.lua new file mode 100644 index 0000000..71e9ee7 --- /dev/null +++ b/mods/minetest_game/sfinv/init.lua @@ -0,0 +1,19 @@ +-- sfinv/init.lua + +dofile(minetest.get_modpath("sfinv") .. "/api.lua") + +-- Load support for MT game translation. +local S = minetest.get_translator("sfinv") + +sfinv.register_page("sfinv:crafting", { + title = S("Crafting"), + get = function(self, player, context) + return sfinv.make_formspec(player, context, [[ + list[current_player;craft;1.75,0.5;3,3;] + list[current_player;craftpreview;5.75,1.5;1,1;] + image[4.75,1.5;1,1;sfinv_crafting_arrow.png] + listring[current_player;main] + listring[current_player;craft] + ]], true) + end +}) diff --git a/mods/minetest_game/sfinv/license.txt b/mods/minetest_game/sfinv/license.txt new file mode 100644 index 0000000..6676d74 --- /dev/null +++ b/mods/minetest_game/sfinv/license.txt @@ -0,0 +1,59 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2016-2018 rubenwardy + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +License of media +---------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2019 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/sfinv/locale/sfinv.de.tr b/mods/minetest_game/sfinv/locale/sfinv.de.tr new file mode 100644 index 0000000..044e9ba --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.de.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Fertigung diff --git a/mods/minetest_game/sfinv/locale/sfinv.eo.tr b/mods/minetest_game/sfinv/locale/sfinv.eo.tr new file mode 100644 index 0000000..1fac1ad --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.eo.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Konstruado diff --git a/mods/minetest_game/sfinv/locale/sfinv.es.tr b/mods/minetest_game/sfinv/locale/sfinv.es.tr new file mode 100644 index 0000000..d3d6609 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.es.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Creación diff --git a/mods/minetest_game/sfinv/locale/sfinv.fr.tr b/mods/minetest_game/sfinv/locale/sfinv.fr.tr new file mode 100644 index 0000000..58ead96 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.fr.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Artisanat diff --git a/mods/minetest_game/sfinv/locale/sfinv.id.tr b/mods/minetest_game/sfinv/locale/sfinv.id.tr new file mode 100644 index 0000000..643196e --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.id.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Kerajinan diff --git a/mods/minetest_game/sfinv/locale/sfinv.it.tr b/mods/minetest_game/sfinv/locale/sfinv.it.tr new file mode 100644 index 0000000..e449b75 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.it.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Assemblaggio diff --git a/mods/minetest_game/sfinv/locale/sfinv.jbo.tr b/mods/minetest_game/sfinv/locale/sfinv.jbo.tr new file mode 100644 index 0000000..0ff0328 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.jbo.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=nu zbasu diff --git a/mods/minetest_game/sfinv/locale/sfinv.ms.tr b/mods/minetest_game/sfinv/locale/sfinv.ms.tr new file mode 100644 index 0000000..f62ba8a --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.ms.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Pertukangan diff --git a/mods/minetest_game/sfinv/locale/sfinv.pt_BR.tr b/mods/minetest_game/sfinv/locale/sfinv.pt_BR.tr new file mode 100644 index 0000000..f9e57ae --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.pt_BR.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Construir diff --git a/mods/minetest_game/sfinv/locale/sfinv.ru.tr b/mods/minetest_game/sfinv/locale/sfinv.ru.tr new file mode 100644 index 0000000..d7c11b2 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.ru.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Крафтинг diff --git a/mods/minetest_game/sfinv/locale/sfinv.se.tr b/mods/minetest_game/sfinv/locale/sfinv.se.tr new file mode 100644 index 0000000..df426b6 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.se.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Tillverkning diff --git a/mods/minetest_game/sfinv/locale/sfinv.sk.tr b/mods/minetest_game/sfinv/locale/sfinv.sk.tr new file mode 100644 index 0000000..18566f1 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.sk.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Vytváranie diff --git a/mods/minetest_game/sfinv/locale/sfinv.zh_CN.tr b/mods/minetest_game/sfinv/locale/sfinv.zh_CN.tr new file mode 100644 index 0000000..3ec3c72 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.zh_CN.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=合成 diff --git a/mods/minetest_game/sfinv/locale/sfinv.zh_TW.tr b/mods/minetest_game/sfinv/locale/sfinv.zh_TW.tr new file mode 100644 index 0000000..3ec3c72 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/sfinv.zh_TW.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=合成 diff --git a/mods/minetest_game/sfinv/locale/template.txt b/mods/minetest_game/sfinv/locale/template.txt new file mode 100644 index 0000000..ace5519 --- /dev/null +++ b/mods/minetest_game/sfinv/locale/template.txt @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting= diff --git a/mods/minetest_game/sfinv/mod.conf b/mods/minetest_game/sfinv/mod.conf new file mode 100644 index 0000000..2934435 --- /dev/null +++ b/mods/minetest_game/sfinv/mod.conf @@ -0,0 +1,2 @@ +name = sfinv +description = Minetest Game mod: sfinv diff --git a/mods/minetest_game/sfinv/textures/sfinv_crafting_arrow.png b/mods/minetest_game/sfinv/textures/sfinv_crafting_arrow.png new file mode 100644 index 0000000..42bba58 Binary files /dev/null and b/mods/minetest_game/sfinv/textures/sfinv_crafting_arrow.png differ diff --git a/mods/minetest_game/spawn/README.txt b/mods/minetest_game/spawn/README.txt new file mode 100644 index 0000000..fc16c2a --- /dev/null +++ b/mods/minetest_game/spawn/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: spawn +======================== +See license.txt for license information. + +Authors of source code +---------------------- +paramat (MIT) diff --git a/mods/minetest_game/spawn/init.lua b/mods/minetest_game/spawn/init.lua new file mode 100644 index 0000000..12c957f --- /dev/null +++ b/mods/minetest_game/spawn/init.lua @@ -0,0 +1,158 @@ +-- spawn/init.lua + +-- Disable by mapgen, setting or if 'static_spawnpoint' is set +-------------------------------------------------------------- + +local mg_name = minetest.get_mapgen_setting("mg_name") +if mg_name == "v6" or mg_name == "singlenode" or + minetest.settings:get("static_spawnpoint") or + minetest.settings:get_bool("engine_spawn") then + return +end + + +-- Parameters +------------- + +-- Resolution of search grid in nodes. +local res = 64 +-- Number of points checked in the square search grid (edge * edge). +local checks = 128 * 128 +-- Starting point for biome checks. This also sets the y co-ordinate for all +-- points checked, so the suitable biomes must be active at this y. +local pos = {x = 0, y = 8, z = 0} + + +-- Table of suitable biomes + +local biome_ids = { + minetest.get_biome_id("taiga"), + minetest.get_biome_id("coniferous_forest"), + minetest.get_biome_id("deciduous_forest"), + minetest.get_biome_id("grassland"), + minetest.get_biome_id("savanna"), +} + +-- End of parameters +-------------------- + + +-- Direction table + +local dirs = { + {x = 0, y = 0, z = 1}, + {x = -1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}, + {x = 1, y = 0, z = 0}, +} + + +-- Initial variables + +local edge_len = 1 +local edge_dist = 0 +local dir_step = 0 +local dir_ind = 1 +local searched = false +local success = false +local spawn_pos = {} + + +-- Get world 'mapgen_limit' and 'chunksize' to calculate 'spawn_limit'. +-- This accounts for how mapchunks are not generated if they or their shell exceed +-- 'mapgen_limit'. + +local mapgen_limit = tonumber(minetest.get_mapgen_setting("mapgen_limit")) +local chunksize = tonumber(minetest.get_mapgen_setting("chunksize")) +local spawn_limit = math.max(mapgen_limit - (chunksize + 1) * 16, 0) + + +--Functions +----------- + +-- Get next position on square search spiral + +local function next_pos() + if edge_dist == edge_len then + edge_dist = 0 + dir_ind = dir_ind + 1 + if dir_ind == 5 then + dir_ind = 1 + end + dir_step = dir_step + 1 + edge_len = math.floor(dir_step / 2) + 1 + end + + local dir = dirs[dir_ind] + local move = vector.multiply(dir, res) + + edge_dist = edge_dist + 1 + + return vector.add(pos, move) +end + + +-- Spawn position search + +local function search() + for iter = 1, checks do + local biome_data = minetest.get_biome_data(pos) + -- Sometimes biome_data is nil + local biome = biome_data and biome_data.biome + for id_ind = 1, #biome_ids do + local biome_id = biome_ids[id_ind] + if biome == biome_id then + local spawn_y = minetest.get_spawn_level(pos.x, pos.z) + if spawn_y then + spawn_pos = {x = pos.x, y = spawn_y, z = pos.z} + return true + end + end + end + + pos = next_pos() + -- Check for position being outside world edge + if math.abs(pos.x) > spawn_limit or math.abs(pos.z) > spawn_limit then + return false + end + end + + return false +end + + +-- On new player spawn and player respawn + +-- Search for spawn position once per server session. If successful, store +-- position and reposition players, otherwise leave them at engine spawn +-- position. + +local function on_spawn(player) + if not searched then + success = search() + searched = true + end + if success then + player:set_pos(spawn_pos) + end + return success +end + +minetest.register_on_newplayer(function(player) + on_spawn(player) +end) + +local enable_bed_respawn = minetest.settings:get_bool("enable_bed_respawn") +if enable_bed_respawn == nil then + enable_bed_respawn = true +end + +minetest.register_on_respawnplayer(function(player) + -- Avoid respawn conflict with beds mod + if beds and enable_bed_respawn and + beds.spawn[player:get_player_name()] then + return + end + + return on_spawn(player) +end) diff --git a/mods/minetest_game/spawn/license.txt b/mods/minetest_game/spawn/license.txt new file mode 100644 index 0000000..a466aab --- /dev/null +++ b/mods/minetest_game/spawn/license.txt @@ -0,0 +1,24 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2018 paramat + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT diff --git a/mods/minetest_game/spawn/mod.conf b/mods/minetest_game/spawn/mod.conf new file mode 100644 index 0000000..ec3d564 --- /dev/null +++ b/mods/minetest_game/spawn/mod.conf @@ -0,0 +1,4 @@ +name = spawn +description = Minetest Game mod: spawn +depends = default +optional_depends = beds diff --git a/mods/minetest_game/stairs/README.txt b/mods/minetest_game/stairs/README.txt new file mode 100644 index 0000000..26317f7 --- /dev/null +++ b/mods/minetest_game/stairs/README.txt @@ -0,0 +1,27 @@ +Minetest Game mod: stairs +========================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Kahrl (LGPLv2.1+) and +celeron55, Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures) +--------------------------- + +Textures +-------- +Copyright (c) 2018 Shara RedCat (CC BY-SA 3.0): + Derived from a texture by PilzAdam (CC BY-SA 3.0): + stairs_obsidian_glass_outer_stairside.png + stairs_obsidian_glass_stairside.png + +Copyright (c) 2018 TumeniNodes (CC BY-SA 3.0): + Derived from a texture by celeron55 (CC BY-SA 3.0) and + converted to bright white by Krock (CC BY-SA 3.0): + stairs_glass_stairside.png + stairs_glass_split.png + Derived from a texture by PilzAdam (CC BY-SA 3.0): + stairs_obsidian_glass_split.png diff --git a/mods/minetest_game/stairs/init.lua b/mods/minetest_game/stairs/init.lua new file mode 100644 index 0000000..89e0d24 --- /dev/null +++ b/mods/minetest_game/stairs/init.lua @@ -0,0 +1,1125 @@ +-- stairs/init.lua + +-- Minetest 0.4 mod: stairs +-- See README.txt for licensing and other information. + + +-- Global namespace for functions + +stairs = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("stairs") +-- Same as S, but will be ignored by translation file update scripts +local T = S + + +-- Register aliases for new pine node names + +minetest.register_alias("stairs:stair_pinewood", "stairs:stair_pine_wood") +minetest.register_alias("stairs:slab_pinewood", "stairs:slab_pine_wood") + + +-- Get setting for replace ABM + +local replace = minetest.settings:get_bool("enable_stairs_replace_abm") + +local function rotate_and_place(itemstack, placer, pointed_thing) + local p0 = pointed_thing.under + local p1 = pointed_thing.above + local param2 = 0 + + if placer then + local placer_pos = placer:get_pos() + if placer_pos then + param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos)) + end + + local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing) + local fpos = finepos.y % 1 + + if p0.y - 1 == p1.y or (fpos > 0 and fpos < 0.5) + or (fpos < -0.5 and fpos > -0.999999999) then + param2 = param2 + 20 + if param2 == 21 then + param2 = 23 + elseif param2 == 23 then + param2 = 21 + end + end + end + return minetest.item_place(itemstack, placer, pointed_thing, param2) +end + +local function warn_if_exists(nodename) + if minetest.registered_nodes[nodename] then + minetest.log("warning", "Overwriting stairs node: " .. nodename) + end +end + + +-- Register stair +-- Node will be called stairs:stair_ + +function stairs.register_stair(subname, recipeitem, groups, images, description, + sounds, worldaligntex) + local src_def = minetest.registered_nodes[recipeitem] + + -- Set backface culling and world-aligned textures + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { + name = image, + backface_culling = true, + } + if worldaligntex then + stair_images[i].align_style = "world" + end + else + stair_images[i] = table.copy(image) + if stair_images[i].backface_culling == nil then + stair_images[i].backface_culling = true + end + if worldaligntex and stair_images[i].align_style == nil then + stair_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.stair = 1 + warn_if_exists("stairs:stair_" .. subname) + minetest.register_node(":stairs:stair_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = stair_images, + use_texture_alpha = src_def and src_def.use_texture_alpha, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, + {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}, + }, + }, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return rotate_and_place(itemstack, placer, pointed_thing) + end, + }) + + -- for replace ABM + if replace then + minetest.register_node(":stairs:stair_" .. subname .. "upside_down", { + replace_name = "stairs:stair_" .. subname, + groups = {slabs_replace = 1}, + }) + end + + if recipeitem then + -- Recipe matches appearence in inventory + minetest.register_craft({ + output = "stairs:stair_" .. subname .. " 8", + recipe = { + {"", "", recipeitem}, + {"", recipeitem, recipeitem}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Use stairs to craft full blocks again (1:1) + minetest.register_craft({ + output = recipeitem .. " 3", + recipe = { + {"stairs:stair_" .. subname, "stairs:stair_" .. subname}, + {"stairs:stair_" .. subname, "stairs:stair_" .. subname}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:stair_" .. subname, + burntime = math.floor(baseburntime * 0.75), + }) + end + end +end + + +-- Register slab +-- Node will be called stairs:slab_ + +function stairs.register_slab(subname, recipeitem, groups, images, description, + sounds, worldaligntex) + local src_def = minetest.registered_nodes[recipeitem] + + -- Set world-aligned textures + local slab_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + slab_images[i] = { + name = image, + } + if worldaligntex then + slab_images[i].align_style = "world" + end + else + slab_images[i] = table.copy(image) + if worldaligntex and image.align_style == nil then + slab_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.slab = 1 + warn_if_exists("stairs:slab_" .. subname) + minetest.register_node(":stairs:slab_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = slab_images, + use_texture_alpha = src_def and src_def.use_texture_alpha, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, + }, + on_place = function(itemstack, placer, pointed_thing) + local under = minetest.get_node(pointed_thing.under) + local wield_item = itemstack:get_name() + local player_name = placer and placer:get_player_name() or "" + + if under and under.name:find("^stairs:slab_") then + -- place slab using under node orientation + local dir = minetest.dir_to_facedir(vector.subtract( + pointed_thing.above, pointed_thing.under), true) + + local p2 = under.param2 + + -- Placing a slab on an upside down slab should make it right-side up. + if p2 >= 20 and dir == 8 then + p2 = p2 - 20 + -- same for the opposite case: slab below normal slab + elseif p2 <= 3 and dir == 4 then + p2 = p2 + 20 + end + + -- else attempt to place node with proper param2 + minetest.item_place_node(ItemStack(wield_item), placer, pointed_thing, p2) + if not minetest.is_creative_enabled(player_name) then + itemstack:take_item() + end + return itemstack + else + return rotate_and_place(itemstack, placer, pointed_thing) + end + end, + }) + + -- for replace ABM + if replace then + minetest.register_node(":stairs:slab_" .. subname .. "upside_down", { + replace_name = "stairs:slab_".. subname, + groups = {slabs_replace = 1}, + }) + end + + if recipeitem then + minetest.register_craft({ + output = "stairs:slab_" .. subname .. " 6", + recipe = { + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Use 2 slabs to craft a full block again (1:1) + minetest.register_craft({ + output = recipeitem, + recipe = { + {"stairs:slab_" .. subname}, + {"stairs:slab_" .. subname}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:slab_" .. subname, + burntime = math.floor(baseburntime * 0.5), + }) + end + end +end + + +-- Optionally replace old "upside_down" nodes with new param2 versions. +-- Disabled by default. + +if replace then + minetest.register_abm({ + label = "Slab replace", + nodenames = {"group:slabs_replace"}, + interval = 16, + chance = 1, + action = function(pos, node) + node.name = minetest.registered_nodes[node.name].replace_name + node.param2 = node.param2 + 20 + if node.param2 == 21 then + node.param2 = 23 + elseif node.param2 == 23 then + node.param2 = 21 + end + minetest.set_node(pos, node) + end, + }) +end + + +-- Register inner stair +-- Node will be called stairs:stair_inner_ + +function stairs.register_stair_inner(subname, recipeitem, groups, images, + description, sounds, worldaligntex, full_description) + local src_def = minetest.registered_nodes[recipeitem] + + -- Set backface culling and world-aligned textures + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { + name = image, + backface_culling = true, + } + if worldaligntex then + stair_images[i].align_style = "world" + end + else + stair_images[i] = table.copy(image) + if stair_images[i].backface_culling == nil then + stair_images[i].backface_culling = true + end + if worldaligntex and stair_images[i].align_style == nil then + stair_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.stair = 1 + if full_description then + description = full_description + else + description = "Inner " .. description + end + warn_if_exists("stairs:stair_inner_" .. subname) + minetest.register_node(":stairs:stair_inner_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = stair_images, + use_texture_alpha = src_def and src_def.use_texture_alpha, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, + {-0.5, 0.0, 0.0, 0.5, 0.5, 0.5}, + {-0.5, 0.0, -0.5, 0.0, 0.5, 0.0}, + }, + }, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return rotate_and_place(itemstack, placer, pointed_thing) + end, + }) + + if recipeitem then + minetest.register_craft({ + output = "stairs:stair_inner_" .. subname .. " 7", + recipe = { + {"", recipeitem, ""}, + {recipeitem, "", recipeitem}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:stair_inner_" .. subname, + burntime = math.floor(baseburntime * 0.875), + }) + end + end +end + + +-- Register outer stair +-- Node will be called stairs:stair_outer_ + +function stairs.register_stair_outer(subname, recipeitem, groups, images, + description, sounds, worldaligntex, full_description) + local src_def = minetest.registered_nodes[recipeitem] + + -- Set backface culling and world-aligned textures + local stair_images = {} + for i, image in ipairs(images) do + if type(image) == "string" then + stair_images[i] = { + name = image, + backface_culling = true, + } + if worldaligntex then + stair_images[i].align_style = "world" + end + else + stair_images[i] = table.copy(image) + if stair_images[i].backface_culling == nil then + stair_images[i].backface_culling = true + end + if worldaligntex and stair_images[i].align_style == nil then + stair_images[i].align_style = "world" + end + end + end + local new_groups = table.copy(groups) + new_groups.stair = 1 + if full_description then + description = full_description + else + description = "Outer " .. description + end + warn_if_exists("stairs:stair_outer_" .. subname) + minetest.register_node(":stairs:stair_outer_" .. subname, { + description = description, + drawtype = "nodebox", + tiles = stair_images, + use_texture_alpha = src_def and src_def.use_texture_alpha, + paramtype = "light", + paramtype2 = "facedir", + is_ground_content = false, + groups = new_groups, + sounds = sounds, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.0, 0.5}, + {-0.5, 0.0, 0.0, 0.0, 0.5, 0.5}, + }, + }, + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return rotate_and_place(itemstack, placer, pointed_thing) + end, + }) + + if recipeitem then + minetest.register_craft({ + output = "stairs:stair_outer_" .. subname .. " 6", + recipe = { + {"", recipeitem, ""}, + {recipeitem, recipeitem, recipeitem}, + }, + }) + + -- Fuel + local baseburntime = minetest.get_craft_result({ + method = "fuel", + width = 1, + items = {recipeitem} + }).time + if baseburntime > 0 then + minetest.register_craft({ + type = "fuel", + recipe = "stairs:stair_outer_" .. subname, + burntime = math.floor(baseburntime * 0.625), + }) + end + end +end + + +-- Stair/slab registration function. +-- Nodes will be called stairs:{stair,slab}_ + +function stairs.register_stair_and_slab(subname, recipeitem, groups, images, + desc_stair, desc_slab, sounds, worldaligntex, + desc_stair_inner, desc_stair_outer) + stairs.register_stair(subname, recipeitem, groups, images, desc_stair, + sounds, worldaligntex) + stairs.register_stair_inner(subname, recipeitem, groups, images, + desc_stair, sounds, worldaligntex, desc_stair_inner) + stairs.register_stair_outer(subname, recipeitem, groups, images, + desc_stair, sounds, worldaligntex, desc_stair_outer) + stairs.register_slab(subname, recipeitem, groups, images, desc_slab, + sounds, worldaligntex) +end + +-- Local function so we can apply translations +local function my_register_stair_and_slab(subname, recipeitem, groups, images, + desc_stair, desc_slab, sounds, worldaligntex) + stairs.register_stair(subname, recipeitem, groups, images, S(desc_stair), + sounds, worldaligntex) + stairs.register_stair_inner(subname, recipeitem, groups, images, "", + sounds, worldaligntex, T("Inner " .. desc_stair)) + stairs.register_stair_outer(subname, recipeitem, groups, images, "", + sounds, worldaligntex, T("Outer " .. desc_stair)) + stairs.register_slab(subname, recipeitem, groups, images, S(desc_slab), + sounds, worldaligntex) +end + + +-- Register default stairs and slabs + +my_register_stair_and_slab( + "wood", + "default:wood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_wood.png"}, + "Wooden Stair", + "Wooden Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "junglewood", + "default:junglewood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_junglewood.png"}, + "Jungle Wood Stair", + "Jungle Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "pine_wood", + "default:pine_wood", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_pine_wood.png"}, + "Pine Wood Stair", + "Pine Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "acacia_wood", + "default:acacia_wood", + {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, + {"default_acacia_wood.png"}, + "Acacia Wood Stair", + "Acacia Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "aspen_wood", + "default:aspen_wood", + {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + {"default_aspen_wood.png"}, + "Aspen Wood Stair", + "Aspen Wood Slab", + default.node_sound_wood_defaults(), + false +) + +my_register_stair_and_slab( + "stone", + "default:stone", + {cracky = 3}, + {"default_stone.png"}, + "Stone Stair", + "Stone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "cobble", + "default:cobble", + {cracky = 3}, + {"default_cobble.png"}, + "Cobblestone Stair", + "Cobblestone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "mossycobble", + "default:mossycobble", + {cracky = 3}, + {"default_mossycobble.png"}, + "Mossy Cobblestone Stair", + "Mossy Cobblestone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "stonebrick", + "default:stonebrick", + {cracky = 2}, + {"default_stone_brick.png"}, + "Stone Brick Stair", + "Stone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "stone_block", + "default:stone_block", + {cracky = 2}, + {"default_stone_block.png"}, + "Stone Block Stair", + "Stone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_stone", + "default:desert_stone", + {cracky = 3}, + {"default_desert_stone.png"}, + "Desert Stone Stair", + "Desert Stone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_cobble", + "default:desert_cobble", + {cracky = 3}, + {"default_desert_cobble.png"}, + "Desert Cobblestone Stair", + "Desert Cobblestone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_stonebrick", + "default:desert_stonebrick", + {cracky = 2}, + {"default_desert_stone_brick.png"}, + "Desert Stone Brick Stair", + "Desert Stone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "desert_stone_block", + "default:desert_stone_block", + {cracky = 2}, + {"default_desert_stone_block.png"}, + "Desert Stone Block Stair", + "Desert Stone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "sandstone", + "default:sandstone", + {crumbly = 1, cracky = 3}, + {"default_sandstone.png"}, + "Sandstone Stair", + "Sandstone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "sandstonebrick", + "default:sandstonebrick", + {cracky = 2}, + {"default_sandstone_brick.png"}, + "Sandstone Brick Stair", + "Sandstone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "sandstone_block", + "default:sandstone_block", + {cracky = 2}, + {"default_sandstone_block.png"}, + "Sandstone Block Stair", + "Sandstone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_sandstone", + "default:desert_sandstone", + {crumbly = 1, cracky = 3}, + {"default_desert_sandstone.png"}, + "Desert Sandstone Stair", + "Desert Sandstone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "desert_sandstone_brick", + "default:desert_sandstone_brick", + {cracky = 2}, + {"default_desert_sandstone_brick.png"}, + "Desert Sandstone Brick Stair", + "Desert Sandstone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "desert_sandstone_block", + "default:desert_sandstone_block", + {cracky = 2}, + {"default_desert_sandstone_block.png"}, + "Desert Sandstone Block Stair", + "Desert Sandstone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "silver_sandstone", + "default:silver_sandstone", + {crumbly = 1, cracky = 3}, + {"default_silver_sandstone.png"}, + "Silver Sandstone Stair", + "Silver Sandstone Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "silver_sandstone_brick", + "default:silver_sandstone_brick", + {cracky = 2}, + {"default_silver_sandstone_brick.png"}, + "Silver Sandstone Brick Stair", + "Silver Sandstone Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "silver_sandstone_block", + "default:silver_sandstone_block", + {cracky = 2}, + {"default_silver_sandstone_block.png"}, + "Silver Sandstone Block Stair", + "Silver Sandstone Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "obsidian", + "default:obsidian", + {cracky = 1, level = 2}, + {"default_obsidian.png"}, + "Obsidian Stair", + "Obsidian Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "obsidianbrick", + "default:obsidianbrick", + {cracky = 1, level = 2}, + {"default_obsidian_brick.png"}, + "Obsidian Brick Stair", + "Obsidian Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "obsidian_block", + "default:obsidian_block", + {cracky = 1, level = 2}, + {"default_obsidian_block.png"}, + "Obsidian Block Stair", + "Obsidian Block Slab", + default.node_sound_stone_defaults(), + true +) + +my_register_stair_and_slab( + "brick", + "default:brick", + {cracky = 3}, + {"default_brick.png"}, + "Brick Stair", + "Brick Slab", + default.node_sound_stone_defaults(), + false +) + +my_register_stair_and_slab( + "steelblock", + "default:steelblock", + {cracky = 1, level = 2}, + {"default_steel_block.png"}, + "Steel Block Stair", + "Steel Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "tinblock", + "default:tinblock", + {cracky = 1, level = 2}, + {"default_tin_block.png"}, + "Tin Block Stair", + "Tin Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "copperblock", + "default:copperblock", + {cracky = 1, level = 2}, + {"default_copper_block.png"}, + "Copper Block Stair", + "Copper Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "bronzeblock", + "default:bronzeblock", + {cracky = 1, level = 2}, + {"default_bronze_block.png"}, + "Bronze Block Stair", + "Bronze Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "goldblock", + "default:goldblock", + {cracky = 1}, + {"default_gold_block.png"}, + "Gold Block Stair", + "Gold Block Slab", + default.node_sound_metal_defaults(), + true +) + +my_register_stair_and_slab( + "ice", + "default:ice", + {cracky = 3, cools_lava = 1, slippery = 3}, + {"default_ice.png"}, + "Ice Stair", + "Ice Slab", + default.node_sound_ice_defaults(), + true +) + +my_register_stair_and_slab( + "snowblock", + "default:snowblock", + {crumbly = 3, cools_lava = 1, snowy = 1}, + {"default_snow.png"}, + "Snow Block Stair", + "Snow Block Slab", + default.node_sound_snow_defaults(), + true +) + +-- Glass stair nodes need to be registered individually to utilize specialized textures. + +stairs.register_stair( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"stairs_glass_split.png", "default_glass.png", + "stairs_glass_stairside.png^[transformFX", "stairs_glass_stairside.png", + "default_glass.png", "stairs_glass_split.png"}, + S("Glass Stair"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_slab( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"default_glass.png", "default_glass.png", "stairs_glass_split.png"}, + S("Glass Slab"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_stair_inner( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"stairs_glass_stairside.png^[transformR270", "default_glass.png", + "stairs_glass_stairside.png^[transformFX", "default_glass.png", + "default_glass.png", "stairs_glass_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Inner Glass Stair") +) + +stairs.register_stair_outer( + "glass", + "default:glass", + {cracky = 3, oddly_breakable_by_hand = 3}, + {"stairs_glass_stairside.png^[transformR90", "default_glass.png", + "stairs_glass_outer_stairside.png", "stairs_glass_stairside.png", + "stairs_glass_stairside.png^[transformR90","stairs_glass_outer_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Outer Glass Stair") +) + +stairs.register_stair( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"stairs_obsidian_glass_split.png", "default_obsidian_glass.png", + "stairs_obsidian_glass_stairside.png^[transformFX", "stairs_obsidian_glass_stairside.png", + "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"}, + S("Obsidian Glass Stair"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_slab( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"default_obsidian_glass.png", "default_obsidian_glass.png", "stairs_obsidian_glass_split.png"}, + S("Obsidian Glass Slab"), + default.node_sound_glass_defaults(), + false +) + +stairs.register_stair_inner( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"stairs_obsidian_glass_stairside.png^[transformR270", "default_obsidian_glass.png", + "stairs_obsidian_glass_stairside.png^[transformFX", "default_obsidian_glass.png", + "default_obsidian_glass.png", "stairs_obsidian_glass_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Inner Obsidian Glass Stair") +) + +stairs.register_stair_outer( + "obsidian_glass", + "default:obsidian_glass", + {cracky = 3}, + {"stairs_obsidian_glass_stairside.png^[transformR90", "default_obsidian_glass.png", + "stairs_obsidian_glass_outer_stairside.png", "stairs_obsidian_glass_stairside.png", + "stairs_obsidian_glass_stairside.png^[transformR90","stairs_obsidian_glass_outer_stairside.png"}, + "", + default.node_sound_glass_defaults(), + false, + S("Outer Obsidian Glass Stair") +) + +-- Dummy calls to S() to allow translation scripts to detect the strings. +-- To update this add this code to my_register_stair_and_slab: +-- for _,x in ipairs({"","Inner ","Outer "}) do print(("S(%q)"):format(x..desc_stair)) end +-- print(("S(%q)"):format(desc_slab)) + +--[[ +S("Wooden Stair") +S("Inner Wooden Stair") +S("Outer Wooden Stair") +S("Wooden Slab") +S("Jungle Wood Stair") +S("Inner Jungle Wood Stair") +S("Outer Jungle Wood Stair") +S("Jungle Wood Slab") +S("Pine Wood Stair") +S("Inner Pine Wood Stair") +S("Outer Pine Wood Stair") +S("Pine Wood Slab") +S("Acacia Wood Stair") +S("Inner Acacia Wood Stair") +S("Outer Acacia Wood Stair") +S("Acacia Wood Slab") +S("Aspen Wood Stair") +S("Inner Aspen Wood Stair") +S("Outer Aspen Wood Stair") +S("Aspen Wood Slab") +S("Stone Stair") +S("Inner Stone Stair") +S("Outer Stone Stair") +S("Stone Slab") +S("Cobblestone Stair") +S("Inner Cobblestone Stair") +S("Outer Cobblestone Stair") +S("Cobblestone Slab") +S("Mossy Cobblestone Stair") +S("Inner Mossy Cobblestone Stair") +S("Outer Mossy Cobblestone Stair") +S("Mossy Cobblestone Slab") +S("Stone Brick Stair") +S("Inner Stone Brick Stair") +S("Outer Stone Brick Stair") +S("Stone Brick Slab") +S("Stone Block Stair") +S("Inner Stone Block Stair") +S("Outer Stone Block Stair") +S("Stone Block Slab") +S("Desert Stone Stair") +S("Inner Desert Stone Stair") +S("Outer Desert Stone Stair") +S("Desert Stone Slab") +S("Desert Cobblestone Stair") +S("Inner Desert Cobblestone Stair") +S("Outer Desert Cobblestone Stair") +S("Desert Cobblestone Slab") +S("Desert Stone Brick Stair") +S("Inner Desert Stone Brick Stair") +S("Outer Desert Stone Brick Stair") +S("Desert Stone Brick Slab") +S("Desert Stone Block Stair") +S("Inner Desert Stone Block Stair") +S("Outer Desert Stone Block Stair") +S("Desert Stone Block Slab") +S("Sandstone Stair") +S("Inner Sandstone Stair") +S("Outer Sandstone Stair") +S("Sandstone Slab") +S("Sandstone Brick Stair") +S("Inner Sandstone Brick Stair") +S("Outer Sandstone Brick Stair") +S("Sandstone Brick Slab") +S("Sandstone Block Stair") +S("Inner Sandstone Block Stair") +S("Outer Sandstone Block Stair") +S("Sandstone Block Slab") +S("Desert Sandstone Stair") +S("Inner Desert Sandstone Stair") +S("Outer Desert Sandstone Stair") +S("Desert Sandstone Slab") +S("Desert Sandstone Brick Stair") +S("Inner Desert Sandstone Brick Stair") +S("Outer Desert Sandstone Brick Stair") +S("Desert Sandstone Brick Slab") +S("Desert Sandstone Block Stair") +S("Inner Desert Sandstone Block Stair") +S("Outer Desert Sandstone Block Stair") +S("Desert Sandstone Block Slab") +S("Silver Sandstone Stair") +S("Inner Silver Sandstone Stair") +S("Outer Silver Sandstone Stair") +S("Silver Sandstone Slab") +S("Silver Sandstone Brick Stair") +S("Inner Silver Sandstone Brick Stair") +S("Outer Silver Sandstone Brick Stair") +S("Silver Sandstone Brick Slab") +S("Silver Sandstone Block Stair") +S("Inner Silver Sandstone Block Stair") +S("Outer Silver Sandstone Block Stair") +S("Silver Sandstone Block Slab") +S("Obsidian Stair") +S("Inner Obsidian Stair") +S("Outer Obsidian Stair") +S("Obsidian Slab") +S("Obsidian Brick Stair") +S("Inner Obsidian Brick Stair") +S("Outer Obsidian Brick Stair") +S("Obsidian Brick Slab") +S("Obsidian Block Stair") +S("Inner Obsidian Block Stair") +S("Outer Obsidian Block Stair") +S("Obsidian Block Slab") +S("Brick Stair") +S("Inner Brick Stair") +S("Outer Brick Stair") +S("Brick Slab") +S("Steel Block Stair") +S("Inner Steel Block Stair") +S("Outer Steel Block Stair") +S("Steel Block Slab") +S("Tin Block Stair") +S("Inner Tin Block Stair") +S("Outer Tin Block Stair") +S("Tin Block Slab") +S("Copper Block Stair") +S("Inner Copper Block Stair") +S("Outer Copper Block Stair") +S("Copper Block Slab") +S("Bronze Block Stair") +S("Inner Bronze Block Stair") +S("Outer Bronze Block Stair") +S("Bronze Block Slab") +S("Gold Block Stair") +S("Inner Gold Block Stair") +S("Outer Gold Block Stair") +S("Gold Block Slab") +S("Ice Stair") +S("Inner Ice Stair") +S("Outer Ice Stair") +S("Ice Slab") +S("Snow Block Stair") +S("Inner Snow Block Stair") +S("Outer Snow Block Stair") +S("Snow Block Slab") +--]] diff --git a/mods/minetest_game/stairs/license.txt b/mods/minetest_game/stairs/license.txt new file mode 100644 index 0000000..57bd98c --- /dev/null +++ b/mods/minetest_game/stairs/license.txt @@ -0,0 +1,16 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2017 Kahrl +Copyright (C) 2011-2017 celeron55, Perttu Ahola +Copyright (C) 2012-2017 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html diff --git a/mods/minetest_game/stairs/locale/stairs.de.tr b/mods/minetest_game/stairs/locale/stairs.de.tr new file mode 100644 index 0000000..beb4579 --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.de.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Glastreppe +Glass Slab=Glasplatte +Inner Glass Stair=Innere Glastreppe +Outer Glass Stair=Äußere Glastreppe +Obsidian Glass Stair=Obsidianglastreppe +Obsidian Glass Slab=Obsidianglasplatte +Inner Obsidian Glass Stair=Innere Obsidianglastreppe +Outer Obsidian Glass Stair=Äußere Obsidianglastreppe +Wooden Stair=Holztreppe +Inner Wooden Stair=Innere Holztreppe +Outer Wooden Stair=Äußere Holztreppe +Wooden Slab=Holzplatte +Jungle Wood Stair=Dschungelholztreppe +Inner Jungle Wood Stair=Innere Dschungelholztreppe +Outer Jungle Wood Stair=Äußere Dschungelholztreppe +Jungle Wood Slab=Dschungelholzplatte +Pine Wood Stair=Kiefernholztreppe +Inner Pine Wood Stair=Innere Kiefernholztreppe +Outer Pine Wood Stair=Äußere Kiefernholztreppe +Pine Wood Slab=Kiefernholzplatte +Acacia Wood Stair=Akazienholztreppe +Inner Acacia Wood Stair=Innere Akazienholztreppe +Outer Acacia Wood Stair=Äußere Akazienholztreppe +Acacia Wood Slab=Akazienholzplatte +Aspen Wood Stair=Espenholztreppe +Inner Aspen Wood Stair=Innere Espenholztreppe +Outer Aspen Wood Stair=Äußere Espenholztreppe +Aspen Wood Slab=Espenholzplatte +Stone Stair=Steintreppe +Inner Stone Stair=Innere Steintreppe +Outer Stone Stair=Äußere Steintreppe +Stone Slab=Steinplatte +Cobblestone Stair=Kopfsteinpflastertreppe +Inner Cobblestone Stair=Innere Kopfsteinpflastertreppe +Outer Cobblestone Stair=Äußere Kopfsteinpflastertreppe +Cobblestone Slab=Kopfsteinpflasterplatte +Mossy Cobblestone Stair=Moosige Kopfsteinpflastertreppe +Inner Mossy Cobblestone Stair=Innere moosige Kopfsteinpflastertreppe +Outer Mossy Cobblestone Stair=Äußere moosige Kopfsteinpflastertreppe +Mossy Cobblestone Slab=Moosige Kopfsteinpflasterplatte +Stone Brick Stair=Steinziegeltreppe +Inner Stone Brick Stair=Innere Steinziegeltreppe +Outer Stone Brick Stair=Äußere Steinziegeltreppe +Stone Brick Slab=Steinziegelplatte +Stone Block Stair=Steinblocktreppe +Inner Stone Block Stair=Innere Steinblocktreppe +Outer Stone Block Stair=Äußere Steinblocktreppe +Stone Block Slab=Steinblockplatte +Desert Stone Stair=Wüstensteintreppe +Inner Desert Stone Stair=Innere Wüstensteintreppe +Outer Desert Stone Stair=Äußere Wüstensteintreppe +Desert Stone Slab=Wüstensteinplatte +Desert Cobblestone Stair=Wüstenkopfsteinpflastertreppe +Inner Desert Cobblestone Stair=Innere Wüstenkopfsteinpflastertreppe +Outer Desert Cobblestone Stair=Äußere Wüstenkopfsteinpflastertreppe +Desert Cobblestone Slab=Wüstenkopfsteinpflasterplatte +Desert Stone Brick Stair=Wüstensteinziegeltreppe +Inner Desert Stone Brick Stair=Innere Wüstensteinziegeltreppe +Outer Desert Stone Brick Stair=Äußere Wüstensteinziegeltreppe +Desert Stone Brick Slab=Wüstensteinziegelplatte +Desert Stone Block Stair=Wüstensteinblocktreppe +Inner Desert Stone Block Stair=Innere Wüstensteinblocktreppe +Outer Desert Stone Block Stair=Äußere Wüstensteinblocktreppe +Desert Stone Block Slab=Wüstensteinblockplatte +Sandstone Stair=Sandsteintreppe +Inner Sandstone Stair=Innere Sandsteintreppe +Outer Sandstone Stair=Äußere Sandsteintreppe +Sandstone Slab=Sandsteinplatte +Sandstone Brick Stair=Sandsteinziegeltreppe +Inner Sandstone Brick Stair=Innere Sandsteinziegeltreppe +Outer Sandstone Brick Stair=Äußere Sandsteinziegeltreppe +Sandstone Brick Slab=Sandsteinziegelplatte +Sandstone Block Stair=Sandsteinblocktreppe +Inner Sandstone Block Stair=Innere Sandsteinblocktreppe +Outer Sandstone Block Stair=Äußere Sandsteinblocktreppe +Sandstone Block Slab=Sandsteinblockplatte +Desert Sandstone Stair=Wüstensandsteintreppe +Inner Desert Sandstone Stair=Innere Wüstensandsteintreppe +Outer Desert Sandstone Stair=Äußere Wüstensandsteintreppe +Desert Sandstone Slab=Wüstensandsteinplatte +Desert Sandstone Brick Stair=Wüstensandsteinziegeltreppe +Inner Desert Sandstone Brick Stair=Innere Wüstensandsteinziegeltreppe +Outer Desert Sandstone Brick Stair=Äußere Wüstensandsteinziegeltreppe +Desert Sandstone Brick Slab=Wüstensandsteinziegelplatte +Desert Sandstone Block Stair=Wüstensandsteinblocktreppe +Inner Desert Sandstone Block Stair=Innere Wüstensandsteinblocktreppe +Outer Desert Sandstone Block Stair=Äußere Wüstensandsteinblocktreppe +Desert Sandstone Block Slab=Wüstensandsteinblockplatte +Silver Sandstone Stair=Silbersandsteintreppe +Inner Silver Sandstone Stair=Innere Silbersandsteintreppe +Outer Silver Sandstone Stair=Äußere Silbersandsteintreppe +Silver Sandstone Slab=Silbersandsteinplatte +Silver Sandstone Brick Stair=Silbersandsteinziegeltreppe +Inner Silver Sandstone Brick Stair=Innere Silbersandsteinziegeltreppe +Outer Silver Sandstone Brick Stair=Äußere Silbersandsteinziegeltreppe +Silver Sandstone Brick Slab=Silbersandsteinziegelplatte +Silver Sandstone Block Stair=Silbersandsteinblocktreppe +Inner Silver Sandstone Block Stair=Innere Silbersandsteinblocktreppe +Outer Silver Sandstone Block Stair=Äußere Silbersandsteinblocktreppe +Silver Sandstone Block Slab=Silbersandsteinblockplatte +Obsidian Stair=Obsidiantreppe +Inner Obsidian Stair=Innere Obsidiantreppe +Outer Obsidian Stair=Äußere Obsidiantreppe +Obsidian Slab=Obsidianplatte +Obsidian Brick Stair=Obsidianziegeltreppe +Inner Obsidian Brick Stair=Innere Obsidianziegeltreppe +Outer Obsidian Brick Stair=Äußere Obsidianziegeltreppe +Obsidian Brick Slab=Obsidianziegelplatte +Obsidian Block Stair=Obsidianblocktreppe +Inner Obsidian Block Stair=Innere Obsidianblocktreppe +Outer Obsidian Block Stair=Äußere Obsidianblocktreppe +Obsidian Block Slab=Obsidianblockplatte +Brick Stair=Ziegeltreppe +Inner Brick Stair=Innere Ziegeltreppe +Outer Brick Stair=Äußere Ziegeltreppe +Brick Slab=Ziegelplatte +Steel Block Stair=Stahlblocktreppe +Inner Steel Block Stair=Innere Stahlblocktreppe +Outer Steel Block Stair=Äußere Stahlblocktreppe +Steel Block Slab=Stahlblockplatte +Tin Block Stair=Zinnblocktreppe +Inner Tin Block Stair=Innere Zinnblocktreppe +Outer Tin Block Stair=Äußere Zinnblocktreppe +Tin Block Slab=Zinnblockplatte +Copper Block Stair=Kupferblocktreppe +Inner Copper Block Stair=Innere Kupferblocktreppe +Outer Copper Block Stair=Äußere Kupferblocktreppe +Copper Block Slab=Kupferblockplatte +Bronze Block Stair=Bronzeblocktreppe +Inner Bronze Block Stair=Innere Bronzeblocktreppe +Outer Bronze Block Stair=Äußere Bronzeblocktreppe +Bronze Block Slab=Bronzeblockplatte +Gold Block Stair=Goldblocktreppe +Inner Gold Block Stair=Innere Goldblocktreppe +Outer Gold Block Stair=Äußere Goldblocktreppe +Gold Block Slab=Goldblockplatte +Ice Stair=Eistreppe +Inner Ice Stair=Innere Eistreppe +Outer Ice Stair=Äußere Eistreppe +Ice Slab=Eisplatte +Snow Block Stair=Schneeblocktreppe +Inner Snow Block Stair=Innere Schneeblocktreppe +Outer Snow Block Stair=Äußere Schneeblocktreppe +Snow Block Slab=Schneeblockplatte diff --git a/mods/minetest_game/stairs/locale/stairs.eo.tr b/mods/minetest_game/stairs/locale/stairs.eo.tr new file mode 100644 index 0000000..3609d8d --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.eo.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Vitra Ŝtupo +Glass Slab=Vitra Plato +Inner Glass Stair=Interna Vitra Ŝtupo +Outer Glass Stair=Ekstera Vitra Ŝtupo +Obsidian Glass Stair=Obsidiana Vitra Ŝtupo +Obsidian Glass Slab=Obsidiana Vitra Plato +Inner Obsidian Glass Stair=Interna Obsidiana Vitra Ŝtupo +Outer Obsidian Glass Stair=Ekstera Obsidiana Vitra Ŝtupo +Wooden Stair=Ligna Ŝtupo +Inner Wooden Stair=Interna Ligna Ŝtupo +Outer Wooden Stair=Ekstera Ligna Ŝtupo +Wooden Slab=Ligna Plato +Jungle Wood Stair=Ĝangala Ligna Ŝtupo +Inner Jungle Wood Stair=Interna Ĝangala Ligna Ŝtupo +Outer Jungle Wood Stair=Ekstera Ĝangala Ligna Ŝtupo +Jungle Wood Slab=Ĝangala Ligna Plato +Pine Wood Stair=Pina Ligna Ŝtupo +Inner Pine Wood Stair=Interna Pina Ligna Ŝtupo +Outer Pine Wood Stair=Ekstera Pina Ligna Ŝtupo +Pine Wood Slab=Pina Ligna Plato +Acacia Wood Stair=Akacia Ligna Ŝtupo +Inner Acacia Wood Stair=Interna Akacia Ligna Ŝtupo +Outer Acacia Wood Stair=Ekstera Akacia Ligna Ŝtupo +Acacia Wood Slab=Akacia Ligna Plato +Aspen Wood Stair=Tremola Ligna Ŝtupo +Inner Aspen Wood Stair=Interna Tremola Ligna Ŝtupo +Outer Aspen Wood Stair=Ekstera Tremola Ligna Ŝtupo +Aspen Wood Slab=Tremola Ligna Plato +Stone Stair=Ŝtona Ŝtupo +Inner Stone Stair=Interna Ŝtona Ŝtupo +Outer Stone Stair=Ekstera Ŝtona Ŝtupo +Stone Slab=Ŝtona Plato +Cobblestone Stair=Pavimŝtona Ŝtupo +Inner Cobblestone Stair=Interna Pavimŝtona Ŝtupo +Outer Cobblestone Stair=Ekstera Pavimŝtona Ŝtupo +Cobblestone Slab=Pavimŝtona Plato +Mossy Cobblestone Stair=Muska Pavimŝtona Ŝtupo +Inner Mossy Cobblestone Stair=Interna Muska Pavimŝtona Ŝtupo +Outer Mossy Cobblestone Stair=Ekstera Muska Pavimŝtona Ŝtupo +Mossy Cobblestone Slab=Muska Pavimŝtona Plato +Stone Brick Stair=Ŝtona Brika Ŝtupo +Inner Stone Brick Stair=Interna Ŝtona Brika Ŝtupo +Outer Stone Brick Stair=Ekstera Ŝtona Brika Ŝtupo +Stone Brick Slab=Ŝtona Brika Plato +Stone Block Stair=Ŝtona Ŝtipa Ŝtupo +Inner Stone Block Stair=Interna Ŝtona Ŝtipa Ŝtupo +Outer Stone Block Stair=Ekstera Ŝtona Ŝtipa Ŝtupo +Stone Block Slab=Ŝtona Ŝtipa Plato +Desert Stone Stair=Dezerta Ŝtona Ŝtupo +Inner Desert Stone Stair=Interna Dezerta Ŝtona Ŝtupo +Outer Desert Stone Stair=Ekstera Dezerta Ŝtona Ŝtupo +Desert Stone Slab=Dezerta Ŝtona Plato +Desert Cobblestone Stair=Dezerta Pavimŝtona Ŝtupo +Inner Desert Cobblestone Stair=Interna Dezerta Pavimŝtona Ŝtupo +Outer Desert Cobblestone Stair=Ekstera Dezerta Pavimŝtona Ŝtupo +Desert Cobblestone Slab=Dezerta Pavimŝtona Plato +Desert Stone Brick Stair=Dezerta Ŝtona Brika Ŝtupo +Inner Desert Stone Brick Stair=Interna Dezerta Ŝtona Brika Ŝtupo +Outer Desert Stone Brick Stair=Ekstera Dezerta Ŝtona Brika Ŝtupo +Desert Stone Brick Slab=Dezerta Ŝtona Brika Plato +Desert Stone Block Stair=Dezerta Ŝtona Ŝtipo Ŝtupo +Inner Desert Stone Block Stair=Interna Dezerta Ŝtona Ŝtipo Stupo +Outer Desert Stone Block Stair=Ekstera Dezerta Ŝtona Ŝtipo Ŝtupo +Desert Stone Block Slab=Dezerta Ŝtona Ŝtipo Plato +Sandstone Stair=Sablŝtona Ŝtupo +Inner Sandstone Stair=Interna Ŝablŝtona Ŝtupo +Outer Sandstone Stair=Ekstera Ŝablŝtona Ŝtupo +Sandstone Slab=Ŝablŝtona Plato +Sandstone Brick Stair=Ŝablŝtona Brika Ŝtupo +Inner Sandstone Brick Stair=Interna Ŝablŝtona Brika Ŝtupo +Outer Sandstone Brick Stair=Ekstera Ŝablŝtona Brika Ŝtupo +Sandstone Brick Slab=Ŝablŝtona Brika Plato +Sandstone Block Stair=Ŝablŝtona Ŝtipa Ŝtupo +Inner Sandstone Block Stair=Interna Ŝablŝtona Ŝtipa Ŝtupo +Outer Sandstone Block Stair=Ekstera Ŝablŝtona Ŝtipa Ŝtupo +Sandstone Block Slab=Ŝablŝtona Ŝtipa Plato +Desert Sandstone Stair=Dezerta Ŝablŝtona Ŝtupo +Inner Desert Sandstone Stair=Interna Dezerta Ŝablŝtona Ŝtupo +Outer Desert Sandstone Stair=Ekstera Dezerta Ŝablŝtona Ŝtupo +Desert Sandstone Slab=Dezerta Ŝablŝtona Plato +Desert Sandstone Brick Stair=Dezerta Ŝablŝtona Brika Ŝtupo +Inner Desert Sandstone Brick Stair=Interna Dezerta Ŝablŝtona Brika Ŝtupo +Outer Desert Sandstone Brick Stair=Ekstera Dezerta Ŝablŝtona Brika Ŝtupo +Desert Sandstone Brick Slab=Dezerta Ŝablŝtona Brika Plato +Desert Sandstone Block Stair=Dezerta Ŝablŝtona Ŝtipa Ŝtupo +Inner Desert Sandstone Block Stair=Interna Dezerta Ŝablŝtona Brika Ŝtupo +Outer Desert Sandstone Block Stair=Ekstera Dezerta Ŝablŝtona Brika Ŝtupo +Desert Sandstone Block Slab=Dezerta Ŝablŝtona Ŝtipa Plato +Silver Sandstone Stair=Arĝenta Ŝablŝtona Ŝtupo +Inner Silver Sandstone Stair=Interna Arĝenta Ŝablŝtona Ŝtupo +Outer Silver Sandstone Stair=Ekstera Arĝenta Ŝablŝtona Ŝtupo +Silver Sandstone Slab=Arĝenta Ŝablŝtona Plato +Silver Sandstone Brick Stair=Arĝenta Ŝablŝtona Brika Ŝtupo +Inner Silver Sandstone Brick Stair=Interna Arĝenta Ŝablŝtona Brika Ŝtupo +Outer Silver Sandstone Brick Stair=Ekstera Arĝenta Ŝablŝtona Brika Ŝtupo +Silver Sandstone Brick Slab=Arĝenta Ŝablŝtona Brika Plato +Silver Sandstone Block Stair=Arĝenta Ŝablŝtona Ŝtipa Ŝtupo +Inner Silver Sandstone Block Stair=Interna Arĝenta Ŝablŝtona Ŝtipa Ŝtupo +Outer Silver Sandstone Block Stair=Ekstera Arĝenta Ŝablŝtona Ŝtipa Ŝtupo +Silver Sandstone Block Slab=Arĝenta Ŝablŝtona Ŝtipa Plato +Obsidian Stair=Obsidiana Ŝtupo +Inner Obsidian Stair=Interna Obsidiana Ŝtupo +Outer Obsidian Stair=Ekstera Obsidiana Ŝtupo +Obsidian Slab=Obsidiana Plato +Obsidian Brick Stair=Obsidiana Brika Ŝtupo +Inner Obsidian Brick Stair=Interna Obsidiana Brika Ŝtupo +Outer Obsidian Brick Stair=Ekstera Obsidiana Brika Ŝtupo +Obsidian Brick Slab=Obsidiana Brika Plato +Obsidian Block Stair=Obsidiana Ŝtipa Ŝtupo +Inner Obsidian Block Stair=Interna Obsidiana Ŝtipa Ŝtupo +Outer Obsidian Block Stair=Ekstera Obsidiana Ŝtipa Ŝtupo +Obsidian Block Slab=Obsidiana Ŝtipa Plato +Brick Stair=Brika Ŝtupo +Inner Brick Stair=Interna Brika Ŝtupo +Outer Brick Stair=Ekstera Brika Ŝtupo +Brick Slab=Brika Plato +Steel Block Stair=Ŝtala Ŝtipa Ŝtupo +Inner Steel Block Stair=Interna Ŝtala Ŝtipa Ŝtupo +Outer Steel Block Stair=Ekstera Ŝtala Ŝtipa Ŝtupo +Steel Block Slab=Ŝtala Ŝtipa Plato +Tin Block Stair=Stana Ŝtipa Ŝtupo +Inner Tin Block Stair=Interna Stana Ŝtipa Ŝtupo +Outer Tin Block Stair=Ekstera Stana Ŝtipa Ŝtupo +Tin Block Slab=Stana Ŝtipa Plato +Copper Block Stair=Kupra Ŝtipa Ŝtupo +Inner Copper Block Stair=Interna Kupra Ŝtipa Ŝtupo +Outer Copper Block Stair=Ekstera Kupra Ŝtipa Ŝtupo +Copper Block Slab=Kupra Ŝtipa Plato +Bronze Block Stair=Bronza Ŝtipa Ŝtupo +Inner Bronze Block Stair=Interna Bronza Ŝtipa Ŝtupo +Outer Bronze Block Stair=Ekstera Bronza Ŝtipa Ŝtupo +Bronze Block Slab=Bronza Ŝtipa Plato +Gold Block Stair=Ora Ŝtipa Ŝtupo +Inner Gold Block Stair=Interna Ora Ŝtipa Ŝtupo +Outer Gold Block Stair=Ekstera Ora Ŝtipa Ŝtupo +Gold Block Slab=Ora Ŝtipa Plato +Ice Stair=Glacia Ŝtupo +Inner Ice Stair=Interna Glacia Ŝtupo +Outer Ice Stair=Ekstera Glacia Ŝtupo +Ice Slab=Glacia Plato +Snow Block Stair=Neĝa Ŝtipa Ŝtupo +Inner Snow Block Stair=Interna Neĝa Ŝtipa Ŝtupo +Outer Snow Block Stair=Ekstera Neĝa Ŝtipa Ŝtupo +Snow Block Slab=Neĝa Ŝtipa Plato diff --git a/mods/minetest_game/stairs/locale/stairs.es.tr b/mods/minetest_game/stairs/locale/stairs.es.tr new file mode 100644 index 0000000..374540c --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.es.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Escalera de vidrio +Glass Slab=Losa de vidrio +Inner Glass Stair=Escalera interior de vidrio +Outer Glass Stair=Escalera exterior de vidrio +Obsidian Glass Stair=Escalera de vidrio de obsidiana +Obsidian Glass Slab=Losa de vidrio de obsidiana +Inner Obsidian Glass Stair=Escalera interior de vidrio de obsidiana +Outer Obsidian Glass Stair=Escalera exterior de vidrio de obsidiana +Wooden Stair=Escalera de madera +Inner Wooden Stair=Escalera interior de madera +Outer Wooden Stair=Escalera exterior de madera +Wooden Slab=Losa de madera +Jungle Wood Stair=Escalera de madera tropical +Inner Jungle Wood Stair=Escalera interior de madera tropical +Outer Jungle Wood Stair=Escalera exterior de madera tropical +Jungle Wood Slab=Losa de madera tropical +Pine Wood Stair=Escalera de pino +Inner Pine Wood Stair=Escalera interior de pino +Outer Pine Wood Stair=Escalera exterior de pino +Pine Wood Slab=Losa de pino +Acacia Wood Stair=Escalera de acacia +Inner Acacia Wood Stair=Escalera interior de acacia +Outer Acacia Wood Stair=Escalera exterior de acacia +Acacia Wood Slab=Losa de acacia +Aspen Wood Stair=Escalera de álamo +Inner Aspen Wood Stair=Escalera interior de álamo +Outer Aspen Wood Stair=Escalera exterior de álamo +Aspen Wood Slab=Losa de álamo +Stone Stair=Escalera de piedra +Inner Stone Stair=Escalera interior de piedra +Outer Stone Stair=Escalera exterior de piedra +Stone Slab=Losa de piedra +Cobblestone Stair=Escalera de adoquines +Inner Cobblestone Stair=Escalera interior de adoquines +Outer Cobblestone Stair=Escalera exterior de adoquines +Cobblestone Slab=Losa de adoquines +Mossy Cobblestone Stair=Escalera de adoquines musgosos +Inner Mossy Cobblestone Stair=Escalera interior de adoquines musgosos +Outer Mossy Cobblestone Stair=Escalera exterior de adoquines musgosos +Mossy Cobblestone Slab=Losa de adoquines musgosos +Stone Brick Stair=Escalera de ladrillos de piedra +Inner Stone Brick Stair=Escalera interior de ladrillos de piedra +Outer Stone Brick Stair=Escalera exterior de ladrillos de piedra +Stone Brick Slab=Losa de ladrillos de piedra +Stone Block Stair=Escalera de bloques de piedra +Inner Stone Block Stair=Escalera interior de bloques de piedra +Outer Stone Block Stair=Escalera exterior de bloques de piedra +Stone Block Slab=Losa de bloques de piedra +Desert Stone Stair=Escalera de piedra desértica +Inner Desert Stone Stair=Escalera interior de piedra desértica +Outer Desert Stone Stair=Escalera exterior de piedra desértica +Desert Stone Slab=Losa de piedra desértica +Desert Cobblestone Stair=Escalera de adoquines desérticos +Inner Desert Cobblestone Stair=Escalera interior de adoquines desérticos +Outer Desert Cobblestone Stair=Escalera exterior de adoquines desérticos +Desert Cobblestone Slab=Losa de adoquines desérticos +Desert Stone Brick Stair=Escalera de ladrillos desérticos +Inner Desert Stone Brick Stair=Escalera interior de ladrillos desérticos +Outer Desert Stone Brick Stair=Escalera exterior de ladrillos desérticos +Desert Stone Brick Slab=Losa de ladrillos desérticos +Desert Stone Block Stair=Escalera de bloques de piedra desértica +Inner Desert Stone Block Stair=Escalera interior de bloques de piedra desértica +Outer Desert Stone Block Stair=Escalera exterior de bloques de piedra desértica +Desert Stone Block Slab=Losa de bloques de piedra desértica +Sandstone Stair=Escalera de arenisca +Inner Sandstone Stair=Escalera interior de arenisca +Outer Sandstone Stair=Escalera exterior de arenisca +Sandstone Slab=Losa de arenisca +Sandstone Brick Stair=Escalera de ladrillos de arenisca +Inner Sandstone Brick Stair=Escalera interior de ladrillos de arenisca +Outer Sandstone Brick Stair=Escalera exterior de ladrillos de arenisca +Sandstone Brick Slab=Losa de ladrillos de arenisca +Sandstone Block Stair=Escalera de bloques de arenisca +Inner Sandstone Block Stair=Escalera interior de bloques de arenisca +Outer Sandstone Block Stair=Escalera exterior de bloques de arenisca +Sandstone Block Slab=Losa de bloques de arenisca +Desert Sandstone Stair=Escalera de arenisca desértica +Inner Desert Sandstone Stair=Escalera interior de arenisca desértica +Outer Desert Sandstone Stair=Escalera exterior de arenisca desértica +Desert Sandstone Slab=Losa de arenisca desértica +Desert Sandstone Brick Stair=Escalera de ladrillos de arenisca desértica +Inner Desert Sandstone Brick Stair=Escalera interior de ladrillos de arenisca desértica +Outer Desert Sandstone Brick Stair=Escalera exterior de ladrillos de arenisca desértica +Desert Sandstone Brick Slab=Losa de ladrillos de arenisca desértica +Desert Sandstone Block Stair=Escalera de bloques de arenisca desértica +Inner Desert Sandstone Block Stair=Escalera interior de bloques de arenisca desértica +Outer Desert Sandstone Block Stair=Escalera exterior de bloques de arenisca desértica +Desert Sandstone Block Slab=Losa de bloques de arenisca desértica +Silver Sandstone Stair=Escalera de arenisca plateada +Inner Silver Sandstone Stair=Escalera interior de arenisca plateada +Outer Silver Sandstone Stair=Escalera exterior de arenisca plateada +Silver Sandstone Slab=Losa de arenisca plateada +Silver Sandstone Brick Stair=Escalera de ladrillos de arenisca plateada +Inner Silver Sandstone Brick Stair=Escalera interior de ladrillos de arenisca plateada +Outer Silver Sandstone Brick Stair=Escalera exterior de ladrillos de arenisca plateada +Silver Sandstone Brick Slab=Losa de ladrillos de arenisca plateada +Silver Sandstone Block Stair=Escalera de bloques de arenisca plateada +Inner Silver Sandstone Block Stair=Escalera interior de bloques de arenisca plateada +Outer Silver Sandstone Block Stair=Escalera exterior de bloques de arenisca plateada +Silver Sandstone Block Slab=Losa de bloques de arenisca plateada +Obsidian Stair=Escalera de obsidiana +Inner Obsidian Stair=Escalera interior de obsidiana +Outer Obsidian Stair=Escalera exterior de obsidiana +Obsidian Slab=Losa de obsidiana +Obsidian Brick Stair=Escalera de ladrillos de obsidiana +Inner Obsidian Brick Stair=Escalera interior de ladrillos de obsidiana +Outer Obsidian Brick Stair=Escalera exterior de ladrillos de obsidiana +Obsidian Brick Slab=Losa de ladrillos de obsidiana +Obsidian Block Stair=Escalera de bloques de obsidiana +Inner Obsidian Block Stair=Escalera interior de bloques de obsidiana +Outer Obsidian Block Stair=Escalera exterior de bloques de obsidiana +Obsidian Block Slab=Losa de bloques de obsidiana +Brick Stair=Escalera de ladrillos +Inner Brick Stair=Escalera interior de ladrillos +Outer Brick Stair=Escalera exterior de ladrillos +Brick Slab=Losa de ladrillos +Steel Block Stair=Escalera de acero +Inner Steel Block Stair=Escalera interior de acero +Outer Steel Block Stair=Escalera exterior de acero +Steel Block Slab=Losa de acero +Tin Block Stair=Escalera de estaño +Inner Tin Block Stair=Escalera interior de estaño +Outer Tin Block Stair=Escalera exterior de estaño +Tin Block Slab=Losa de estaño +Copper Block Stair=Escalera de cobre +Inner Copper Block Stair=Escalera interior de cobre +Outer Copper Block Stair=Escalera exterior de cobre +Copper Block Slab=Losa de cobre +Bronze Block Stair=Escalera de bronce +Inner Bronze Block Stair=Escalera interior de bronce +Outer Bronze Block Stair=Escalera exterior de bronce +Bronze Block Slab=Losa de bronce +Gold Block Stair=Escalera de oro +Inner Gold Block Stair=Escalera interior de oro +Outer Gold Block Stair=Escalera exterior de oro +Gold Block Slab=Losa de oro +Ice Stair=Escalera de hielo +Inner Ice Stair=Escalera interior de hielo +Outer Ice Stair=Escalera exterior de hielo +Ice Slab=Losa de hielo +Snow Block Stair=Escalera de nieve +Inner Snow Block Stair=Escalera interior de nieve +Outer Snow Block Stair=Escalera exterior de nieve +Snow Block Slab=Losa de nieve diff --git a/mods/minetest_game/stairs/locale/stairs.fr.tr b/mods/minetest_game/stairs/locale/stairs.fr.tr new file mode 100644 index 0000000..81b575e --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.fr.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Escalier de verre +Glass Slab=Dalle de verre +Inner Glass Stair=Escalier intérieur de verre +Outer Glass Stair=Escalier extérieur de verre +Obsidian Glass Stair=Escalier de verre d'obsidienne +Obsidian Glass Slab=Dalle de verre d'obsidienne +Inner Obsidian Glass Stair=Escalier intérieur de verre d'obsidienne +Outer Obsidian Glass Stair=Escalier extérieur de verre d'obsidienne +Wooden Stair=Escalier en bois +Inner Wooden Stair=Escalier intérieur en bois +Outer Wooden Stair=Escalier extérieur en bois +Wooden Slab=Dalle de bois +Jungle Wood Stair=Escalier en bois de la jungle +Inner Jungle Wood Stair=Escalier intérieur en bois de la jungle +Outer Jungle Wood Stair=Escalier extérieur en bois de la jungle +Jungle Wood Slab=Dalle en bois de la jungle +Pine Wood Stair=Escalier en pin +Inner Pine Wood Stair=Escalier intérieur en pin +Outer Pine Wood Stair=Escalier extérieur en pin +Pine Wood Slab=Dalle en pin +Acacia Wood Stair=Escalier en acacia +Inner Acacia Wood Stair=Escalier intérieur en acacia +Outer Acacia Wood Stair=Escalier extérieur en acacia +Acacia Wood Slab=Dalle en acacia +Aspen Wood Stair=Escalier en tremble +Inner Aspen Wood Stair=Escalier intérieur en tremble +Outer Aspen Wood Stair=Escalier extérieur en tremble +Aspen Wood Slab=Dalle en tremble +Stone Stair=Escalier de pierre +Inner Stone Stair=Escalier intérieur de pierre +Outer Stone Stair=Escalier extérieur de pierre +Stone Slab=Dalle de pierre +Cobblestone Stair=Escalier en pavé +Inner Cobblestone Stair=Escalier intérieur en pavé +Outer Cobblestone Stair=Escalier extérieur en pavé +Cobblestone Slab=Dalle en pavé +Mossy Cobblestone Stair=Escalier en pavé moussu +Inner Mossy Cobblestone Stair=Escalier intérieur en pavé moussu +Outer Mossy Cobblestone Stair=Escalier extérieur en pavé moussu +Mossy Cobblestone Slab=Dalle en pavé moussu +Stone Brick Stair=Escalier en brique de pierre +Inner Stone Brick Stair=Escalier intérieur en brique de pierre +Outer Stone Brick Stair=Escalier extérieur en brique de pierre +Stone Brick Slab=Dalle en brique de pierre +Stone Block Stair=Escalier en bloc de pierre +Inner Stone Block Stair=Escalier intérieur en bloc de pierre +Outer Stone Block Stair=Escalier extérieur en bloc de pierre +Stone Block Slab=Dalle en bloc de pierre +Desert Stone Stair=Escalier en pierre du désert +Inner Desert Stone Stair=Escalier intérieur en pierre du désert +Outer Desert Stone Stair=Escalier extérieur en pierre du désert +Desert Stone Slab=Dalle en pierre du désert +Desert Cobblestone Stair=Escalier en pavé du désert +Inner Desert Cobblestone Stair=Escalier intérieur en pavé du désert +Outer Desert Cobblestone Stair=Escalier extérieur en pavé du désert +Desert Cobblestone Slab=Dalle en pavé du désert +Desert Stone Brick Stair=Escalier en brique de pierre du désert +Inner Desert Stone Brick Stair=Escalier intérieur en brique de pierre du désert +Outer Desert Stone Brick Stair=Escalier extérieur en brique de pierre du désert +Desert Stone Brick Slab=Dalle en brique de pierre du désert +Desert Stone Block Stair=Escalier en bloc de pierre du désert +Inner Desert Stone Block Stair=Escalier intérieur en bloc de pierre du désert +Outer Desert Stone Block Stair=Escalier extérieur en bloc de pierre du désert +Desert Stone Block Slab=Dalle en bloc de pierre du désert +Sandstone Stair=Escalier en grès +Inner Sandstone Stair=Escalier intérieur en grès +Outer Sandstone Stair=Escalier extérieur en grès +Sandstone Slab=Dalle en grès +Sandstone Brick Stair=Escalier en brique de grès +Inner Sandstone Brick Stair=Escalier intérieur en brique de grès +Outer Sandstone Brick Stair=Escalier extérieur en brique de grès +Sandstone Brick Slab=Dalle en brique de grès +Sandstone Block Stair=Escalier en bloc de grès +Inner Sandstone Block Stair=Escalier intérieur en bloc de grès +Outer Sandstone Block Stair=Escalier extérieur en bloc de grès +Sandstone Block Slab=Dalle en bloc de grès +Desert Sandstone Stair=Escalier en grès du désert +Inner Desert Sandstone Stair=Escalier intérieur en grès du désert +Outer Desert Sandstone Stair=Escalier extérieur en grès du désert +Desert Sandstone Slab=Dalle en grès du désert +Desert Sandstone Brick Stair=Escalier en brique de grès du désert +Inner Desert Sandstone Brick Stair=Escalier intérieur en brique de grès du désert +Outer Desert Sandstone Brick Stair=Escalier extérieur en brique de grès du désert +Desert Sandstone Brick Slab=Dalle en brique de grès du désert +Desert Sandstone Block Stair=Escalier en bloc de grès du désert +Inner Desert Sandstone Block Stair=Escalier intérieur en bloc de grès du désert +Outer Desert Sandstone Block Stair=Escalier extérieur en bloc de grès du désert +Desert Sandstone Block Slab=Dalle en bloc de grès du désert +Silver Sandstone Stair=Escalier en grès argenté +Inner Silver Sandstone Stair=Escalier intérieur en grès argenté +Outer Silver Sandstone Stair=Escalier extérieur en grès argenté +Silver Sandstone Slab=Dalle en grès argenté +Silver Sandstone Brick Stair=Escalier en brique de grès argenté +Inner Silver Sandstone Brick Stair=Escalier intérieur en brique de grès argenté +Outer Silver Sandstone Brick Stair=Escalier extérieur en brique de grès argenté +Silver Sandstone Brick Slab=Dalle en brique de grès argenté +Silver Sandstone Block Stair=Escalier en bloc de grès argenté +Inner Silver Sandstone Block Stair=Escalier intérieur en bloc de grès argenté +Outer Silver Sandstone Block Stair=Escalier extérieur en bloc de grès argenté +Silver Sandstone Block Slab=Dalle en bloc de grès argenté +Obsidian Stair=Escalier en obsidienne +Inner Obsidian Stair=Escalier intérieur en obsidienne +Outer Obsidian Stair=Escalier extérieur en obsidienne +Obsidian Slab=Dalle en obsidienne +Obsidian Brick Stair=Escalier en brique d'obsidienne +Inner Obsidian Brick Stair=Escalier intérieur en brique d'obsidienne +Outer Obsidian Brick Stair=Escalier extérieur en brique d'obsidienne +Obsidian Brick Slab=Dalle en brique d'obsidienne +Obsidian Block Stair=Escalier en bloc d'obsidienne +Inner Obsidian Block Stair=Escalier intérieur en bloc d'obsidienne +Outer Obsidian Block Stair=Escalier extérieur en bloc d'obsidienne +Obsidian Block Slab=Dalle en bloc d'obsidienne +Brick Stair=Escalier en brique +Inner Brick Stair=Escalier intérieur en brique +Outer Brick Stair=Escalier extérieur en brique +Brick Slab=Dalle en brique +Steel Block Stair=Escalier en acier +Inner Steel Block Stair=Escalier intérieur en acier +Outer Steel Block Stair=Escalier extérieur en acier +Steel Block Slab=Dalle en acier +Tin Block Stair=Escalier en bloc d'étain +Inner Tin Block Stair=Escalier intérieur en bloc d'étain +Outer Tin Block Stair=Escalier extérieur en bloc d'étain +Tin Block Slab=Dalle en bloc d'étain +Copper Block Stair=Escalier en bloc de cuivre +Inner Copper Block Stair=Escalier intérieur en bloc de cuivre +Outer Copper Block Stair=Escalier extérieur en bloc de cuivre +Copper Block Slab=Dalle en bloc de cuivre +Bronze Block Stair=Escalier en bronze +Inner Bronze Block Stair=Escalier intérieur en bronze +Outer Bronze Block Stair=Escalier extérieur en bronze +Bronze Block Slab=Dalle en bronze +Gold Block Stair=Escalier en bloc d'or +Inner Gold Block Stair=Escalier intérieur en bloc d'or +Outer Gold Block Stair=Escalier extérieur en bloc d'or +Gold Block Slab=Dalle en bloc d'or +Ice Stair=Escalier de glace +Inner Ice Stair=Escalier intérieur de glace +Outer Ice Stair=Escalier extérieur de glace +Ice Slab=Dalle de glace +Snow Block Stair=Escalier en bloc de neige +Inner Snow Block Stair=Escalier intérieur en bloc de neige +Outer Snow Block Stair=Escalier extérieur en bloc de neige +Snow Block Slab=Dalle en bloc de neige diff --git a/mods/minetest_game/stairs/locale/stairs.id.tr b/mods/minetest_game/stairs/locale/stairs.id.tr new file mode 100644 index 0000000..dbdfaa0 --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.id.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Tangga Kaca +Glass Slab=Lempengan Kaca +Inner Glass Stair=Tangga Kaca Dalam +Outer Glass Stair=Tangga Kaca Luar +Obsidian Glass Stair=Tangga Kaca Obsidian +Obsidian Glass Slab=Lempengan Kaca Obsidian +Inner Obsidian Glass Stair=Tangga Kaca Obsidian Dalam +Outer Obsidian Glass Stair=Tangga Kaca Obsidian Luar +Wooden Stair=Tangga Kayu +Inner Wooden Stair=Tangga Kayu Dalam +Outer Wooden Stair=Tangga Kayu Luar +Wooden Slab=Lempengan Kayu +Jungle Wood Stair=Tangga Kayu Rimba +Inner Jungle Wood Stair=Tangga Kayu Rimba Dalam +Outer Jungle Wood Stair=Tangga Kayu Rimba Luar +Jungle Wood Slab=Lempengan Kayu Rimba +Pine Wood Stair=Tangga Kayu Pinus +Inner Pine Wood Stair=Tangga Kayu Pinus Dalam +Outer Pine Wood Stair=Tangga Kayu Pinus Luar +Pine Wood Slab=Lempengan Kayu Pinus +Acacia Wood Stair=Tangga Kayu Akasia +Inner Acacia Wood Stair=Tangga Kayu Akasia Dalam +Outer Acacia Wood Stair=Tangga Kayu Akasia Luar +Acacia Wood Slab=Lempengan Kayu Akasia +Aspen Wood Stair=Tangga Kayu Aspen +Inner Aspen Wood Stair=Tangga Kayu Aspen Dalam +Outer Aspen Wood Stair=Tangga Kayu Aspen Luar +Aspen Wood Slab=Lempengan Kayu Aspen +Stone Stair=Tangga Batu +Inner Stone Stair=Tangga Batu Dalam +Outer Stone Stair=Tangga Batu Luar +Stone Slab=Lempengan Batu +Cobblestone Stair=Tangga Bongkahan Batu +Inner Cobblestone Stair=Tangga Bongkahan Batu Dalam +Outer Cobblestone Stair=Tangga Bongkahan Batu Luar +Cobblestone Slab=Lempengan Bongkahan Batu +Mossy Cobblestone Stair=Tangga Bongkahan Batu Berlumut +Inner Mossy Cobblestone Stair=Tangga Bongkahan Batu Berlumut Dalam +Outer Mossy Cobblestone Stair=Tangga Bongkahan Batu Berlumut Luar +Mossy Cobblestone Slab=Lempengan Bongkahan Batu Berlumut +Stone Brick Stair=Tangga Tembok Batu +Inner Stone Brick Stair=Tangga Tembok Batu Dalam +Outer Stone Brick Stair=Tangga Tembok Batu Luar +Stone Brick Slab=Lempengan Tembok Batu +Stone Block Stair=Tangga Balok Batu +Inner Stone Block Stair=Tangga Balok Batu Dalam +Outer Stone Block Stair=Tangga Balok Batu Luar +Stone Block Slab=Lempengan Balok Batu +Desert Stone Stair=Tangga Batu Gurun +Inner Desert Stone Stair=Tangga Batu Gurun Dalam +Outer Desert Stone Stair=Tangga Batu Gurun Luar +Desert Stone Slab=Lempengan Batu Gurun +Desert Cobblestone Stair=Tangga Bongkahan Batu Gurun +Inner Desert Cobblestone Stair=Tangga Bongkahan Batu Gurun Dalam +Outer Desert Cobblestone Stair=Tangga Bongkahan Batu Gurun Luar +Desert Cobblestone Slab=Lempengan Bongkahan Batu Gurun +Desert Stone Brick Stair=Tangga Tembok Batu Gurun +Inner Desert Stone Brick Stair=Tangga Tembok Batu Gurun Dalam +Outer Desert Stone Brick Stair=Tangga Tembok Batu Gurun Luar +Desert Stone Brick Slab=Lempengan Tembok Batu Gurun +Desert Stone Block Stair=Tangga Balok Batu Gurun +Inner Desert Stone Block Stair=Tangga Balok Batu Gurun Dalam +Outer Desert Stone Block Stair=Tangga Balok Batu Gurun Luar +Desert Stone Block Slab=Lempengan Balok Batu Gurun +Sandstone Stair=Tangga Batu Pasir +Inner Sandstone Stair=Tangga Batu Pasir Dalam +Outer Sandstone Stair=Tangga Batu Pasir Luar +Sandstone Slab=Lempengan Batu Pasir +Sandstone Brick Stair=Tangga Tembok Batu Pasir +Inner Sandstone Brick Stair=Tangga Tembok Batu Pasir Dalam +Outer Sandstone Brick Stair=Tangga Tembok Batu Pasir Luar +Sandstone Brick Slab=Lempengan Tembok Batu Pasir +Sandstone Block Stair=Tangga Balok Batu Pasir +Inner Sandstone Block Stair=Tangga Balok Batu Pasir Dalam +Outer Sandstone Block Stair=Tangga Balok Batu Pasir Luar +Sandstone Block Slab=Lempengan Balok Batu Pasir +Desert Sandstone Stair=Tangga Batu Pasir Gurun +Inner Desert Sandstone Stair=Tangga Batu Pasir Gurun Dalam +Outer Desert Sandstone Stair=Tangga Batu Pasir Gurun Luar +Desert Sandstone Slab=Lempengan Batu Pasir Gurun +Desert Sandstone Brick Stair=Tangga Tembok Batu Pasir Gurun +Inner Desert Sandstone Brick Stair=Tangga Tembok Batu Pasir Gurun Dalam +Outer Desert Sandstone Brick Stair=Tangga Tembok Batu Pasir Gurun Luar +Desert Sandstone Brick Slab=Lempengan Tembok Batu Pasir Gurun +Desert Sandstone Block Stair=Tangga Balok Batu Pasir Gurun +Inner Desert Sandstone Block Stair=Tangga Balok Batu Pasir Gurun Dalam +Outer Desert Sandstone Block Stair=Tangga Balok Batu Pasir Gurun Luar +Desert Sandstone Block Slab=Lempengan Balok Batu Pasir Gurun +Silver Sandstone Stair=Tangga Batu Pasir Perak +Inner Silver Sandstone Stair=Tangga Batu Pasir Perak Dalam +Outer Silver Sandstone Stair=Tangga Batu Pasir Perak Luar +Silver Sandstone Slab=Lempengan Batu Pasir Perak +Silver Sandstone Brick Stair=Tangga Tembok Batu Pasir Perak +Inner Silver Sandstone Brick Stair=Tangga Tembok Batu Pasir Perak Dalam +Outer Silver Sandstone Brick Stair=Tangga Tembok Batu Pasir Perak Luar +Silver Sandstone Brick Slab=Lempengan Tembok Batu Pasir Perak +Silver Sandstone Block Stair=Tangga Balok Batu Pasir Perak +Inner Silver Sandstone Block Stair=Tangga Balok Batu Pasir Perak Dalam +Outer Silver Sandstone Block Stair=Tangga Balok Batu Pasir Perak Luar +Silver Sandstone Block Slab=Lempengan Balok Batu Pasir Perak +Obsidian Stair=Tangga Obsidian +Inner Obsidian Stair=Tangga Obsidian Dalam +Outer Obsidian Stair=Tangga Obsidian Luar +Obsidian Slab=Lempengan Obsidian +Obsidian Brick Stair=Tangga Tembok Obsidian +Inner Obsidian Brick Stair=Tangga Tembok Obsidian Dalam +Outer Obsidian Brick Stair=Tangga Tembok Obsidian Luar +Obsidian Brick Slab=Lempengan Tembok Obsidian +Obsidian Block Stair=Tangga Balok Obsidian +Inner Obsidian Block Stair=Tangga Balok Obsidian Dalam +Outer Obsidian Block Stair=Tangga Balok Obsidian Luar +Obsidian Block Slab=Lempengan Balok Obsidian +Brick Stair=Tangga Bata +Inner Brick Stair=Tangga Bata Dalam +Outer Brick Stair=Tangga Bata Luar +Brick Slab=Lempengan Bata +Steel Block Stair=Tangga Balok Baja +Inner Steel Block Stair=Tangga Balok Baja Dalam +Outer Steel Block Stair=Tangga Balok Baja Luar +Steel Block Slab=Lempengan Balok Baja +Tin Block Stair=Tangga Balok Timah +Inner Tin Block Stair=Tangga Balok Timah Dalam +Outer Tin Block Stair=Tangga Balok Timah Luar +Tin Block Slab=Lempengan Balok Timah +Copper Block Stair=Tangga Balok Tembaga +Inner Copper Block Stair=Tangga Balok Tembaga Dalam +Outer Copper Block Stair=Tangga Balok Tembaga Luar +Copper Block Slab=Lempengan Balok Tembaga +Bronze Block Stair=Tangga Balok Perunggu +Inner Bronze Block Stair=Tangga Balok Perunggu Dalam +Outer Bronze Block Stair=Tangga Balok Perunggu Luar +Bronze Block Slab=Lempengan Balok Perunggu +Gold Block Stair=Tangga Balok Emas +Inner Gold Block Stair=Tangga Balok Emas Dalam +Outer Gold Block Stair=Tangga Balok Emas Luar +Gold Block Slab=Lempengan Balok Emas +Ice Stair=Tangga Es +Inner Ice Stair=Tangga Es Dalam +Outer Ice Stair=Tangga Es Luar +Ice Slab=Lempengan Es +Snow Block Stair=Tangga Balok Salju +Inner Snow Block Stair=Tangga Balok Salju Dalam +Outer Snow Block Stair=Tangga Balok Salju Luar +Snow Block Slab=Lempengan Balok Salju diff --git a/mods/minetest_game/stairs/locale/stairs.it.tr b/mods/minetest_game/stairs/locale/stairs.it.tr new file mode 100644 index 0000000..16945ec --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.it.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Scala di vetro +Glass Slab=Lastra di vetro +Inner Glass Stair=Scala di vetro interna +Outer Glass Stair=Scala di vetro esterna +Obsidian Glass Stair=Scala di vetro d'ossidiana +Obsidian Glass Slab=Lastra di vetro d'ossidiana +Inner Obsidian Glass Stair=Scala di vetro d'ossidiana interna +Outer Obsidian Glass Stair=Scala di vetro d'ossidiana esterna +Wooden Stair=Scala di legno +Inner Wooden Stair=Scala di legno interna +Outer Wooden Stair=Scala di legno esterna +Wooden Slab=Lastra di legno +Jungle Wood Stair=Scala di legno della giungla +Inner Jungle Wood Stair=Scala di legno della giungla interna +Outer Jungle Wood Stair=Scala di legno della giungla esterna +Jungle Wood Slab=Lastra di legno della giungla +Pine Wood Stair=Scala di legno di pino +Inner Pine Wood Stair=Scala di legno di pino interna +Outer Pine Wood Stair=Scala di legno di pino esterna +Pine Wood Slab=Lastra di legno di pino +Acacia Wood Stair=Scala di legno d'acacia +Inner Acacia Wood Stair=Scala di legno d'acacia interna +Outer Acacia Wood Stair=Scala di legno d'acacia esterna +Acacia Wood Slab=Lastra di legno d'acacia +Aspen Wood Stair=Scala di legno di pioppo +Inner Aspen Wood Stair=Scala di legno di pioppo interna +Outer Aspen Wood Stair=Scala di legno di pioppo esterna +Aspen Wood Slab=Lastra di legno di pioppo +Stone Stair=Scala di pietra +Inner Stone Stair=Scala di pietra interna +Outer Stone Stair=Scala di pietra esterna +Stone Slab=Lastra di pietra +Cobblestone Stair=Scala di ciottoli +Inner Cobblestone Stair=Scala di ciottoli interna +Outer Cobblestone Stair=Scala di ciottoli esterna +Cobblestone Slab=Lastra di ciottoli +Mossy Cobblestone Stair=Scala di ciottoli muschiosi +Inner Mossy Cobblestone Stair=Scala di ciottoli muschiosi interna +Outer Mossy Cobblestone Stair=Scala di ciottoli muschiosi esterna +Mossy Cobblestone Slab=Lastra di ciottoli muschiosi +Stone Brick Stair=Scala di mattone di pietra +Inner Stone Brick Stair=Scala di mattone di pietra interna +Outer Stone Brick Stair=Scala di mattone di pietra esterna +Stone Brick Slab=Lastra di mattone di pietra +Stone Block Stair=Scala di blocco di pietra +Inner Stone Block Stair=Scala di blocco di pietra interna +Outer Stone Block Stair=Scala di blocco di pietra esterna +Stone Block Slab=Lastra di blocco di pietra +Desert Stone Stair=Scala di pietra del deserto +Inner Desert Stone Stair=Scala di pietra del deserto interna +Outer Desert Stone Stair=Scala di pietra del deserto esterna +Desert Stone Slab=Lastra di pietra del deserto +Desert Cobblestone Stair=Scala di ciottoli del deserto +Inner Desert Cobblestone Stair=Scala di ciottoli del deserto interna +Outer Desert Cobblestone Stair=Scala di ciottoli del deserto esterna +Desert Cobblestone Slab=Lastra di ciottoli del deserto +Desert Stone Brick Stair=Scala di mattone di pietra del deserto +Inner Desert Stone Brick Stair=Scala di mattone di pietra del deserto interna +Outer Desert Stone Brick Stair=Scala di mattone di pietra del deserto esterna +Desert Stone Brick Slab=Lastra di mattone di pietra del deserto +Desert Stone Block Stair=Scala di blocco di pietra del deserto +Inner Desert Stone Block Stair=Scala di blocco di pietra del deserto interna +Outer Desert Stone Block Stair=Scala di blocco di pietra del deserto esterna +Desert Stone Block Slab=Lastra di blocco di pietra del deserto +Sandstone Stair=Scala d'arenaria +Inner Sandstone Stair=Scala d'arenaria interna +Outer Sandstone Stair=Scala d'arenaria esterna +Sandstone Slab=Lastra d'arenaria +Sandstone Brick Stair=Scala di mattone d'arenaria +Inner Sandstone Brick Stair=Scala di mattone d'arenaria interna +Outer Sandstone Brick Stair=Scala di mattone d'arenaria esterna +Sandstone Brick Slab=Lastra di mattone d'arenaria +Sandstone Block Stair=Scala di blocco d'arenaria +Inner Sandstone Block Stair=Scala di blocco d'arenaria interna +Outer Sandstone Block Stair=Scala di blocco d'arenaria esterna +Sandstone Block Slab=Lastra di blocco d'arenaria +Desert Sandstone Stair=Scala d'arenaria del deserto +Inner Desert Sandstone Stair=Scala d'arenaria del deserto interna +Outer Desert Sandstone Stair=Scala d'arenaria del deserto esterna +Desert Sandstone Slab=Lastra d'arenaria del deserto +Desert Sandstone Brick Stair=Scala di mattone d'arenaria del deserto +Inner Desert Sandstone Brick Stair=Scala di mattone d'arenaria del deserto interna +Outer Desert Sandstone Brick Stair=Scala di mattone d'arenaria del deserto esterna +Desert Sandstone Brick Slab=Lastra di mattone d'arenaria del deserto +Desert Sandstone Block Stair=Scala di blocco d'arenaria del deserto +Inner Desert Sandstone Block Stair=Scala di blocco d'arenaria del deserto interna +Outer Desert Sandstone Block Stair=Scala di blocco d'arenaria del deserto esterna +Desert Sandstone Block Slab=Lastra di blocco d'arenaria del deserto +Silver Sandstone Stair=Scala d'arenaria argentata +Inner Silver Sandstone Stair=Scala d'arenaria argentata interna +Outer Silver Sandstone Stair=Scala d'arenaria argentata esterna +Silver Sandstone Slab=Lastra d'arenaria argentata +Silver Sandstone Brick Stair=Scala di mattone d'arenaria argentata +Inner Silver Sandstone Brick Stair=Scala di mattone d'arenaria argentata interna +Outer Silver Sandstone Brick Stair=Scala di mattone d'arenaria argentata esterna +Silver Sandstone Brick Slab=Lastra di mattone d'arenaria argentata +Silver Sandstone Block Stair=Scala di blocco d'arenaria argentata +Inner Silver Sandstone Block Stair=Scala di blocco d'arenaria argentata interna +Outer Silver Sandstone Block Stair=Scala di blocco d'arenaria argentata esterna +Silver Sandstone Block Slab=Lastra di blocco d'arenaria argentata +Obsidian Stair=Scala d'ossidiana +Inner Obsidian Stair=Scala d'ossidiana interna +Outer Obsidian Stair=Scala d'ossidiana esterna +Obsidian Slab=Lastra d'ossidiana +Obsidian Brick Stair=Scala di mattone d'ossidiana +Inner Obsidian Brick Stair=Scala di mattone d'ossidiana interna +Outer Obsidian Brick Stair=Scala di mattone d'ossidiana esterna +Obsidian Brick Slab=Lastra di mattone d'ossidiana +Obsidian Block Stair=Scala di blocco d'ossidiana +Inner Obsidian Block Stair=Scala di blocco d'ossidiana interna +Outer Obsidian Block Stair=Scala di blocco d'ossidiana esterna +Obsidian Block Slab=Lastra di blocco d'ossidiana +Brick Stair=Scala di mattone +Inner Brick Stair=Scala di mattone interna +Outer Brick Stair=Scala di mattone esterna +Brick Slab=Lastra di mattone +Steel Block Stair=Scala di blocco d'acciaio +Inner Steel Block Stair=Scala di blocco d'acciaio interna +Outer Steel Block Stair=Scala di blocco d'acciaio esterna +Steel Block Slab=Lastra di blocco d'acciaio +Tin Block Stair=Scala di blocco di stagno +Inner Tin Block Stair=Scala di blocco di stagno interna +Outer Tin Block Stair=Scala di blocco di stagno esterna +Tin Block Slab=Lastra di blocco di stagno +Copper Block Stair=Scala di blocco di rame +Inner Copper Block Stair=Scala di blocco di rame interna +Outer Copper Block Stair=Scala di blocco di rame esterna +Copper Block Slab=Lastra di blocco di rame +Bronze Block Stair=Scala di blocco di bronzo +Inner Bronze Block Stair=Scala di blocco di bronzo interna +Outer Bronze Block Stair=Scala di blocco di bronzo esterna +Bronze Block Slab=Lastra di blocco di bronzo +Gold Block Stair=Scala di blocco d'oro +Inner Gold Block Stair=Scala di blocco d'oro interna +Outer Gold Block Stair=Scala di blocco d'oro esterna +Gold Block Slab=Lastra di blocco d'oro +Ice Stair=Scala di ghiaccio +Inner Ice Stair=Scala di ghiaccio interna +Outer Ice Stair=Scala di ghiaccio esterna +Ice Slab=Lastra di ghiaccio +Snow Block Stair=Scala di blocco di neve +Inner Snow Block Stair=Scala di blocco di neve interna +Outer Snow Block Stair=Scala di blocco di neve esterna +Snow Block Slab=Lastra di blocco di neve diff --git a/mods/minetest_game/stairs/locale/stairs.jbo.tr b/mods/minetest_game/stairs/locale/stairs.jbo.tr new file mode 100644 index 0000000..76c3bac --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.jbo.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=lo blaci serti +Glass Slab=lo blaci xadba bliku +Inner Glass Stair=lo zo'i blaci serti +Outer Glass Stair=lo ze'o blaci serti +Obsidian Glass Stair=lo je'erma'ablaci blaci serti +Obsidian Glass Slab=lo je'erma'ablaci blaci ke xadba bliku +Inner Obsidian Glass Stair=lo zo'i je'erma'ablaci blaci serti +Outer Obsidian Glass Stair=lo ze'o je'erma'ablaci blaci serti +Wooden Stair=lo mudri serti +Inner Wooden Stair=lo zo'i blaci serti +Outer Wooden Stair=lo ze'o blaci serti +Wooden Slab=lo mudri ke xadba bliku +Jungle Wood Stair=lo glatimdemricfoi mudri serti +Inner Jungle Wood Stair=lo zo'i glatimdemricfoi mudri serti +Outer Jungle Wood Stair=lo ze'o glatimdemricfoi mudri serti +Jungle Wood Slab=lo glatimdemricfoi mudri ke xadba bliku +Pine Wood Stair=lo ckunu mudri serti +Inner Pine Wood Stair=lo zo'i ckunu mudri serti +Outer Pine Wood Stair=lo ze'o ckunu mudri serti +Pine Wood Slab=lo ckunu mudri ke xadba bliku +Acacia Wood Stair=lo atkaci,ia mudri serti +Inner Acacia Wood Stair=lo zo'i atkaci,ia mudri serti +Outer Acacia Wood Stair=lo ze'o atkaci,ia mudri serti +Acacia Wood Slab=lo atkaci,ia mudri ke xadba bliku +Aspen Wood Stair=lo mudrpopulu serti +Inner Aspen Wood Stair=lo zo'i mudrpopulu serti +Outer Aspen Wood Stair=lo ze'o mudrpopulu serti +Aspen Wood Slab=lo mudrpopulu ke xadba bliku +Stone Stair=lo rokci serti +Inner Stone Stair=lo zo'i rokci serti +Outer Stone Stair=lo ze'o rokci serti +Stone Slab=lo rokci ke xadba bliku +Cobblestone Stair=lo lolro'iboi serti +Inner Cobblestone Stair=lo zo'i lolro'iboi serti +Outer Cobblestone Stair=lo ze'o lolro'iboi serti +Cobblestone Slab=lo lolro'iboi xadba bliku +Mossy Cobblestone Stair=lo clika lolro'iboi serti +Inner Mossy Cobblestone Stair=lo zo'i clika lolro'iboi serti +Outer Mossy Cobblestone Stair=lo ze'o clika lolro'iboi serti +Mossy Cobblestone Slab=lo clika lolro'iboi ke xadba bliku +Stone Brick Stair=lo morna rokci serti +Inner Stone Brick Stair=lo zo'i morna rokci serti +Outer Stone Brick Stair=lo ze'o morna rokci serti +Stone Brick Slab=lo morna rokci ke xadba bliku +Stone Block Stair=lo rokci bliku serti +Inner Stone Block Stair=lo zo'i rokci bliku serti +Outer Stone Block Stair=lo ze'o rokci bliku serti +Stone Block Slab=lo rokci bliku ke xadba bliku +Desert Stone Stair=lo cantu'a rokci serti +Inner Desert Stone Stair=lo zo'i cantu'a rokci serti +Outer Desert Stone Stair=lo ze'o cantu'a rokci serti +Desert Stone Slab=lo cantu'a rokci ke xadba bliku +Desert Cobblestone Stair=lo cantu'a lolro'iboi serti +Inner Desert Cobblestone Stair=lo zo'i cantu'a lolro'iboi serti +Outer Desert Cobblestone Stair=lo ze'o cantu'a lolro'iboi serti +Desert Cobblestone Slab=lo cantu'a lolro'iboi ke xadba bliku +Desert Stone Brick Stair=lo morna ke cantu'a rokci serti +Inner Desert Stone Brick Stair=lo zo'i morna ke cantu'a rokci serti +Outer Desert Stone Brick Stair=lo ze'o morna ke cantu'a rokci serti +Desert Stone Brick Slab=lo morna ke cantu'a rokci ke xadba bliku +Desert Stone Block Stair=lo cantu'a rokci bliku serti +Inner Desert Stone Block Stair=lo zo'i cantu'a rokci bliku serti +Outer Desert Stone Block Stair=lo ze'o cantu'a rokci bliku serti +Desert Stone Block Slab=lo cantu'a rokci bliku ke xadba bliku +Sandstone Stair=lo canro'i serti +Inner Sandstone Stair=lo zo'i canro'i serti +Outer Sandstone Stair=lo ze'o canro'i serti +Sandstone Slab=lo canro'i ke xadba bliku +Sandstone Brick Stair=lo morna ke canro'i serti +Inner Sandstone Brick Stair=lo zo'i morna ke canro'i serti +Outer Sandstone Brick Stair=lo ze'o morna ke canro'i serti +Sandstone Brick Slab=lo morna canro'i ke xadba bliku +Sandstone Block Stair=lo canro'i bliku serti +Inner Sandstone Block Stair=lo zo'i canro'i bliku serti +Outer Sandstone Block Stair=lo ze'o canro'i bliku serti +Sandstone Block Slab=lo canro'i bliku ke xadba bliku +Desert Sandstone Stair=lo cantu'a canro'i serti +Inner Desert Sandstone Stair=lo zo'i cantu'a canro'i serti +Outer Desert Sandstone Stair=lo ze'o cantu'a canro'i serti +Desert Sandstone Slab=lo cantu'a canro'i ke xadba bliku +Desert Sandstone Brick Stair=lo morna ke cantu'a canro'i serti +Inner Desert Sandstone Brick Stair=lo zo'i morna ke cantu'a canro'i serti +Outer Desert Sandstone Brick Stair=lo ze'o morna ke cantu'a canro'i serti +Desert Sandstone Brick Slab=lo morna ke cantu'a canro'i ke xadba bliku +Desert Sandstone Block Stair=lo cantu'a canro'i bliku serti +Inner Desert Sandstone Block Stair=lo zo'i cantu'a canro'i bliku serti +Outer Desert Sandstone Block Stair=lo ze'o cantu'a canro'i bliku serti +Desert Sandstone Block Slab=lo cantu'a canro'i ke xadba bliku +Silver Sandstone Stair=lo rijyska canro'i serti +Inner Silver Sandstone Stair=lo zo'i rijyska canro'i serti +Outer Silver Sandstone Stair=lo ze'o rijyska canro'i serti +Silver Sandstone Slab=lo rijyska canro'i ke xadba bliku +Silver Sandstone Brick Stair=lo morna ke rijyska canro'i serti +Inner Silver Sandstone Brick Stair=lo zo'i morna ke rijyska canro'i serti +Outer Silver Sandstone Brick Stair=lo ze'o morna ke rijyska canro'i serti +Silver Sandstone Brick Slab=lo morna ke rijyska canro'i ke xadba bliku +Silver Sandstone Block Stair=lo rijyska canro'i bliku serti +Inner Silver Sandstone Block Stair=lo zo'i rijyska canro'i bliku serti +Outer Silver Sandstone Block Stair=lo ze'o rijyska canro'i bliku serti +Silver Sandstone Block Slab=lo rijyska canro'i bliku ke xadba bliku +Obsidian Stair=lo je'erma'ablaci serti +Inner Obsidian Stair=lo zo'i je'erma'ablaci serti +Outer Obsidian Stair=lo ze'o je'erma'ablaci serti +Obsidian Slab=lo je'erma'ablaci ke xadba bliku +Obsidian Brick Stair=lo morna ke je'erma'ablaci serti +Inner Obsidian Brick Stair=lo zo'i morna ke je'erma'ablaci serti +Outer Obsidian Brick Stair=lo ze'o morna ke je'erma'ablaci serti +Obsidian Brick Slab=lo morna je'erma'ablaci ke xadba bliku +Obsidian Block Stair=lo je'erma'ablaci bliku serti +Inner Obsidian Block Stair=lo zo'i je'erma'ablaci bliku serti +Outer Obsidian Block Stair=lo ze'o je'erma'ablaci bliku serti +Obsidian Block Slab=lo je'erma'ablaci bliku ke xadba bliku +Brick Stair=lo kitybli serti +Inner Brick Stair=lo zo'i kitybli serti +Outer Brick Stair=lo ze'o kitybli serti +Brick Slab=lo kitybli xadba bliku +Steel Block Stair=lo gasta bliku serti +Inner Steel Block Stair=lo zo'i gasta bliku serti +Outer Steel Block Stair=lo ze'o gasta bliku serti +Steel Block Slab=lo gasta bliku ke xadba bliku +Tin Block Stair=lo tinci bliku serti +Inner Tin Block Stair=lo zo'i tinci bliku serti +Outer Tin Block Stair=lo ze'o tinci bliku serti +Tin Block Slab=lo tinci bliku ke xadba bliku +Copper Block Stair=lo tunka bliku serti +Inner Copper Block Stair=lo zo'i tunka bliku serti +Outer Copper Block Stair=lo ze'o tunka bliku serti +Copper Block Slab=lo tunka xadba bliku +Bronze Block Stair=lo ransu bliku serti +Inner Bronze Block Stair=lo zo'i ransu bliku serti +Outer Bronze Block Stair=lo ze'o ransu bliku serti +Bronze Block Slab=lo ransu xadba bliku +Gold Block Stair=lo solji bliku serti +Inner Gold Block Stair=lo zo'i solji bliku serti +Outer Gold Block Stair=lo ze'o solji bliku serti +Gold Block Slab=lo solji bliku ke xadba bliku +Ice Stair=lo bisli serti +Inner Ice Stair=lo zo'i bisli serti +Outer Ice Stair=lo ze'o bisli serti +Ice Slab=lo bisli ke xadba bliku +Snow Block Stair=lo snime bliku serti +Inner Snow Block Stair=lo zo'i snime bliku serti +Outer Snow Block Stair=lo ze'o snime bliku serti +Snow Block Slab=lo snime bliku ke xadba bliku diff --git a/mods/minetest_game/stairs/locale/stairs.ms.tr b/mods/minetest_game/stairs/locale/stairs.ms.tr new file mode 100644 index 0000000..a39c7f6 --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.ms.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Tangga Kaca +Glass Slab=Papak Kaca +Inner Glass Stair=Tangga Kaca Dalaman +Outer Glass Stair=Tangga Kaca Luaran +Obsidian Glass Stair=Tangga Obsidia +Obsidian Glass Slab=Papak Obsidia +Inner Obsidian Glass Stair=Tangga Obsidia Dalaman +Outer Obsidian Glass Stair=Tangga Obsidia Luaran +Wooden Stair=Tangga Kayu +Inner Wooden Stair=Tangga Kayu Dalaman +Outer Wooden Stair=Tangga Kayu Luaran +Wooden Slab=Papak Kayu +Jungle Wood Stair=Tangga Kayu Hutan +Inner Jungle Wood Stair=Tangga Kayu Hutan Dalaman +Outer Jungle Wood Stair=Tangga Kayu Hutan Luaran +Jungle Wood Slab=Papak Kayu Hutan +Pine Wood Stair=Tangga Kayu Pain +Inner Pine Wood Stair=Tangga Kayu Pain Dalaman +Outer Pine Wood Stair=Tangga Kayu Pain Luaran +Pine Wood Slab=Papak Kayu Pain +Acacia Wood Stair=Tangga Kayu Akasia +Inner Acacia Wood Stair=Tangga Kayu Akasia Dalaman +Outer Acacia Wood Stair=Tangga Kayu Akasia Luaran +Acacia Wood Slab=Papak Kayu Akasia +Aspen Wood Stair=Tangga Kayu Aspen +Inner Aspen Wood Stair=Tangga Kayu Aspen Dalaman +Outer Aspen Wood Stair=Tangga Kayu Aspen Luaran +Aspen Wood Slab=Papak Kayu Aspen +Stone Stair=Tangga Batu +Inner Stone Stair=Tangga Batu Dalaman +Outer Stone Stair=Tangga Batu Luaran +Stone Slab=Papak Batu +Cobblestone Stair=Tangga Batu Buntar +Inner Cobblestone Stair=Tangga Batu Buntar Dalaman +Outer Cobblestone Stair=Tangga Batu Buntar Luaran +Cobblestone Slab=Papak Batu Buntar +Mossy Cobblestone Stair=Tangga Batu Buntar Berlumut +Inner Mossy Cobblestone Stair=Tangga Batu Buntar Berlumut Dalaman +Outer Mossy Cobblestone Stair=Tangga Batu Buntar Berlumut Luaran +Mossy Cobblestone Slab=Papak Batu Buntar Berlumut +Stone Brick Stair=Tangga Bata Batu +Inner Stone Brick Stair=Tangga Bata Batu Dalaman +Outer Stone Brick Stair=Tangga Bata Batu Luaran +Stone Brick Slab=Papak Bata Batu +Stone Block Stair=Tangga Bongkah Batu +Inner Stone Block Stair=Tangga Bongkah Batu Dalaman +Outer Stone Block Stair=Tangga Bongkah Batu Luaran +Stone Block Slab=Papak Bongkah Batu +Desert Stone Stair=Tangga Batu Gurun +Inner Desert Stone Stair=Tangga Batu Gurun Dalaman +Outer Desert Stone Stair=Tangga Batu Gurun Luaran +Desert Stone Slab=Papak Batu Gurun +Desert Cobblestone Stair=Tangga Batu Buntar Gurun +Inner Desert Cobblestone Stair=Tangga Batu Buntar Gurun Dalaman +Outer Desert Cobblestone Stair=Tangga Batu Buntar Gurun Luaran +Desert Cobblestone Slab=Papak Batu Buntar Gurun +Desert Stone Brick Stair=Tangga Bata Batu Gurun +Inner Desert Stone Brick Stair=Tangga Bata Batu Gurun Dalaman +Outer Desert Stone Brick Stair=Tangga Bata Batu Gurun Luaran +Desert Stone Brick Slab=Papak Bata Batu Gurun +Desert Stone Block Stair=Tangga Bongkah Batu Gurun +Inner Desert Stone Block Stair=Tangga Bongkah Batu Gurun Dalaman +Outer Desert Stone Block Stair=Tangga Bongkah Batu Gurun Luaran +Desert Stone Block Slab=Papak Bongkah Batu Gurun +Sandstone Stair=Tangga Batu Pasir +Inner Sandstone Stair=Tangga Batu Pasir Dalaman +Outer Sandstone Stair=Tangga Batu Pasir Luaran +Sandstone Slab=Papak Batu Pasir +Sandstone Brick Stair=Tangga Bata Batu Pasir +Inner Sandstone Brick Stair=Tangga Bata Batu Pasir Dalaman +Outer Sandstone Brick Stair=Tangga Bata Batu Pasir Luaran +Sandstone Brick Slab=Papak Bata Batu Pasir +Sandstone Block Stair=Tangga Bongkah Batu Pasir +Inner Sandstone Block Stair=Tangga Bongkah Batu Pasir Dalaman +Outer Sandstone Block Stair=Tangga Bongkah Batu Pasir Luaran +Sandstone Block Slab=Papak Bongkah Batu Pasir +Desert Sandstone Stair=Tangga Batu Pasir Gurun +Inner Desert Sandstone Stair=Tangga Batu Pasir Gurun Dalaman +Outer Desert Sandstone Stair=Tangga Batu Pasir Gurun Luaran +Desert Sandstone Slab=Papak Batu Pasir Gurun +Desert Sandstone Brick Stair=Tangga Bata Batu Pasir Gurun +Inner Desert Sandstone Brick Stair=Tangga Bata Batu Pasir Gurun Dalaman +Outer Desert Sandstone Brick Stair=Tangga Bata Batu Pasir Gurun Luaran +Desert Sandstone Brick Slab=Papak Bata Batu Pasir Gurun +Desert Sandstone Block Stair=Tangga Bongkah Batu Pasir Gurun +Inner Desert Sandstone Block Stair=Tangga Bongkah Batu Pasir Gurun Dalaman +Outer Desert Sandstone Block Stair=Tangga Bongkah Batu Pasir Gurun Luaran +Desert Sandstone Block Slab=Papak Bongkah Batu Pasir Gurun +Silver Sandstone Stair=Tangga Batu Pasir Perak +Inner Silver Sandstone Stair=Tangga Batu Pasir Perak Dalaman +Outer Silver Sandstone Stair=Tangga Batu Pasir Perak Luaran +Silver Sandstone Slab=Papak Batu Pasir Perak +Silver Sandstone Brick Stair=Tangga Bata Batu Pasir Perak +Inner Silver Sandstone Brick Stair=Tangga Bata Batu Pasir Perak Dalaman +Outer Silver Sandstone Brick Stair=Tangga Bata Batu Pasir Perak Luaran +Silver Sandstone Brick Slab=Papak Bata Batu Pasir Perak +Silver Sandstone Block Stair=Tangga Bongkah Batu Pasir Perak +Inner Silver Sandstone Block Stair=Tangga Bongkah Batu Pasir Perak Dalaman +Outer Silver Sandstone Block Stair=Tangga Bongkah Batu Pasir Perak Luaran +Silver Sandstone Block Slab=Papak Bongkah Batu Pasir Perak +Obsidian Stair=Tangga Obsidia +Inner Obsidian Stair=Tangga Obsidia Dalaman +Outer Obsidian Stair=Tangga Obsidia Luaran +Obsidian Slab=Papak Obsidia +Obsidian Brick Stair=Tangga Bata Obsidia +Inner Obsidian Brick Stair=Tangga Bata Obsidia Dalaman +Outer Obsidian Brick Stair=Tangga Bata Obsidia Luaran +Obsidian Brick Slab=Papak Bata Obsidia +Obsidian Block Stair=Tangga Bongkah Obsidia +Inner Obsidian Block Stair=Tangga Bongkah Obsidia Dalaman +Outer Obsidian Block Stair=Tangga Bongkah Obsidia Luaran +Obsidian Block Slab=Papak Bongkah Obsidia +Brick Stair=Tangga Bata +Inner Brick Stair=Tangga Bata Dalaman +Outer Brick Stair=Tangga Bata Luaran +Brick Slab=Papak Bata +Steel Block Stair=Tangga Bongkah Keluli +Inner Steel Block Stair=Tangga Bongkah Keluli Dalaman +Outer Steel Block Stair=Tangga Bongkah Keluli Luaran +Steel Block Slab=Papak Bongkah Keluli +Tin Block Stair=Tangga Bongkah Timah +Inner Tin Block Stair=Tangga Bongkah Timah Dalaman +Outer Tin Block Stair=Tangga Bongkah Timah Luaran +Tin Block Slab=Papak Bongkah Timah +Copper Block Stair=Tangga Bongkah Tembaga +Inner Copper Block Stair=Tangga Bongkah Tembaga Dalaman +Outer Copper Block Stair=Tangga Bongkah Tembaga Luaran +Copper Block Slab=Papak Bongkah Tembaga +Bronze Block Stair=Tangga Bongkah Gangsa +Inner Bronze Block Stair=Tangga Bongkah Gangsa Dalaman +Outer Bronze Block Stair=Tangga Bongkah Gangsa Luaran +Bronze Block Slab=Papak Bongkah Gangsa +Gold Block Stair=Tangga Bongkah Emas +Inner Gold Block Stair=Tangga Bongkah Emas Dalaman +Outer Gold Block Stair=Tangga Bongkah Emas Luaran +Gold Block Slab=Papak Bongkah Emas +Ice Stair=Tangga Ais +Inner Ice Stair=Tangga Ais Dalaman +Outer Ice Stair=Tangga Ais Luaran +Ice Slab=Papak Ais +Snow Block Stair=Tangga Bongkah Salji +Inner Snow Block Stair=Tangga Bongkah Salji Dalaman +Outer Snow Block Stair=Tangga Bongkah Salji Luaran +Snow Block Slab=Papak Bongkah Salji diff --git a/mods/minetest_game/stairs/locale/stairs.pt_BR.tr b/mods/minetest_game/stairs/locale/stairs.pt_BR.tr new file mode 100644 index 0000000..41777a8 --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.pt_BR.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Escada de vidro +Glass Slab=Placa de vidro +Inner Glass Stair=Escada interior de vidro +Outer Glass Stair=Escada exterior de vidro +Obsidian Glass Stair=Escada de vidro de obsidiana +Obsidian Glass Slab=Placa de vidro de obsidiana +Inner Obsidian Glass Stair=Escada interior de vidro de obsidiana +Outer Obsidian Glass Stair=Escada exterior de vidro de obsidiana +Wooden Stair=Escada de madeira +Inner Wooden Stair=Escada interior de madeira +Outer Wooden Stair=Escada exterior de madeira +Wooden Slab=Laje de madeira +Jungle Wood Stair=Escada de madeira da selva +Inner Jungle Wood Stair=Escada interior de madeira da selva +Outer Jungle Wood Stair=Escada exterior de madeira da selva +Jungle Wood Slab=Laje de madeira da selva +Pine Wood Stair=Escada de madeira de pinho +Inner Pine Wood Stair=Escada interior de madeira de pinho +Outer Pine Wood Stair=Escada exterior de madeira de pinho +Pine Wood Slab=Laje de madeira de pinho +Acacia Wood Stair=Escada de madeira de acácia +Inner Acacia Wood Stair=Escada interior de madeira de acácia +Outer Acacia Wood Stair=Escada exterior de madeira de acácia +Acacia Wood Slab=Placa de madeira de acácia +Aspen Wood Stair=Escada de Álamo +Inner Aspen Wood Stair=Escada interior de Álamo +Outer Aspen Wood Stair=Escada exterior de Álamo +Aspen Wood Slab=Laje de Álamo +Stone Stair=Escada de Pedra +Inner Stone Stair=Escada interior de Pedra +Outer Stone Stair=Escada exterior de Pedra +Stone Slab=Laje de pedra +Cobblestone Stair=Escada de paralelepípedo +Inner Cobblestone Stair=Escada interior de paralelepípedo +Outer Cobblestone Stair=Escada exterior de paralelepípedo +Cobblestone Slab=Laje de paralelepípedo +Mossy Cobblestone Stair=Escada de paralelepípedo com musgo +Inner Mossy Cobblestone Stair=Escada interior de paralelepípedo com musgo +Outer Mossy Cobblestone Stair=Escada exterior de paralelepípedo com musgo +Mossy Cobblestone Slab=Laje de paralelepípedo com musgo +Stone Brick Stair=Escada de tijolo de pedra +Inner Stone Brick Stair=Escada interior de tijolo de pedra +Outer Stone Brick Stair=Escada exterior de tijolo de pedra +Stone Brick Slab=Laje de tijolo de pedra +Stone Block Stair=Escada Bloco de Pedra +Inner Stone Block Stair=Escada Interna de Bloco de Pedra +Outer Stone Block Stair=Escada Externa de Bloco de Pedra +Stone Block Slab=Laje de bloco de pedra +Desert Stone Stair=Escada de Pedra do Deserto +Inner Desert Stone Stair=Escada Interior de Pedra do Deserto +Outer Desert Stone Stair=Escada Exterior de Pedra do Deserto +Desert Stone Slab=Laje de pedra do deserto +Desert Cobblestone Stair=Escada de paralelepípedo do deserto +Inner Desert Cobblestone Stair=Escada interior de paralelepípedo do deserto +Outer Desert Cobblestone Stair=Escada exterior de paralelepípedo do deserto +Desert Cobblestone Slab=Laje de paralelepípedo do deserto +Desert Stone Brick Stair=Escada de tijolo de pedra do deserto +Inner Desert Stone Brick Stair=Escada interior de tijolos de pedra do deserto +Outer Desert Stone Brick Stair=Escada exterior de tijolos de pedra do deserto +Desert Stone Brick Slab=Laje de tijolo de pedra do deserto +Desert Stone Block Stair=Escada de Bloco de Pedra do Deserto +Inner Desert Stone Block Stair=Escada interior de bloco de pedra do deserto +Outer Desert Stone Block Stair=Escada exterior de Bloco de Pedra do Deserto +Desert Stone Block Slab=Laje do bloco de pedra do deserto +Sandstone Stair=Escada de arenito +Inner Sandstone Stair=Escada interior de arenito +Outer Sandstone Stair=Escada Exterior de Arenito +Sandstone Slab=Laje de arenito +Sandstone Brick Stair=Escada de tijolo de arenito +Inner Sandstone Brick Stair=Escada interior de tijolos de arenito +Outer Sandstone Brick Stair=Escada Exterior de Tijolo de Arenito +Sandstone Brick Slab=Laje de tijolo de arenito +Sandstone Block Stair=Escada do Bloco de Arenito +Inner Sandstone Block Stair=Escada interior de bloco de arenito +Outer Sandstone Block Stair=Escada exterior de bloco de arenito +Sandstone Block Slab=Laje de bloco de arenito +Desert Sandstone Stair=Escada de arenito do deserto +Inner Desert Sandstone Stair=Escada interior de arenito do deserto +Outer Desert Sandstone Stair=Escada exterior de arenito do deserto +Desert Sandstone Slab=Laje de arenito do deserto +Desert Sandstone Brick Stair=Escada de tijolos de arenito do deserto +Inner Desert Sandstone Brick Stair=Escada interior de tijolos de arenito do deserto +Outer Desert Sandstone Brick Stair=Escada exterior de tijolos de arenito do deserto +Desert Sandstone Brick Slab=Laje de tijolo de arenito do deserto +Desert Sandstone Block Stair=Escada do bloco de arenito do deserto +Inner Desert Sandstone Block Stair=Escada interior do bloco de arenito do deserto +Outer Desert Sandstone Block Stair=Escada exterior de bloco de arenito do deserto +Desert Sandstone Block Slab=Laje de bloco de arenito do deserto +Silver Sandstone Stair=Escada de arenito prateado +Inner Silver Sandstone Stair=Escada interior de Arenito Prateado +Outer Silver Sandstone Stair=Escada exterior de Arenito Prateado +Silver Sandstone Slab=Laje de arenito prateado +Silver Sandstone Brick Stair=Escada de tijolos de arenito prateado +Inner Silver Sandstone Brick Stair=Escada interior de tijolos de arenito prateado +Outer Silver Sandstone Brick Stair=Escada exterior de tijolos de arenito prateado +Silver Sandstone Brick Slab=Laje de tijolo de arenito prateado +Silver Sandstone Block Stair=Escada de blocos de arenito prateado +Inner Silver Sandstone Block Stair=Escada interior de bloco de arenito prateado +Outer Silver Sandstone Block Stair=Escada exterior de bloco de arenito prateado +Silver Sandstone Block Slab=Laje de bloco de arenito prateado +Obsidian Stair=Escada de Obsidiana +Inner Obsidian Stair=Escada interior de Obsidiana +Outer Obsidian Stair=Escada exterior de Obsidiana +Obsidian Slab=Laje de Obsidiana +Obsidian Brick Stair=Escada de Tijolos de Obsidiana +Inner Obsidian Brick Stair=Escada interna de Tijolos de Obsidiana +Outer Obsidian Brick Stair=Escada externa de Tijolos de Obsidiana +Obsidian Brick Slab=Laje de tijolos de obsidiana +Obsidian Block Stair=Escada de Bloco de Obsidiana +Inner Obsidian Block Stair=Escada interior de Bloco de obsidiana +Outer Obsidian Block Stair=Escada exterior de Bloco de obsidiana +Obsidian Block Slab=Laje de bloco de obsidiana +Brick Stair=Escada de Tijolos +Inner Brick Stair=Escada interior de Tijolos +Outer Brick Stair=Escada exterior de Tijolos +Brick Slab=Laje de tijolos +Steel Block Stair=Escada de bloco de aço +Inner Steel Block Stair=Escada interior de bloco de aço +Outer Steel Block Stair=Escada exterior de bloco de aço +Steel Block Slab=Laje de bloco de aço +Tin Block Stair=Escada de bloco de estanho +Inner Tin Block Stair=Escada interior de bloco de estanho +Outer Tin Block Stair=Escada exterior de bloco de lata +Tin Block Slab=Laje de bloco de estanho +Copper Block Stair=Escada de bloco de cobre +Inner Copper Block Stair=Escada interior de Bloco de Cobre +Outer Copper Block Stair=Escada exterior do Bloco de Cobre +Copper Block Slab=Laje de bloco de cobre +Bronze Block Stair=Escada Bloco de Bronze +Inner Bronze Block Stair=Escada interior de bloco de bronze +Outer Bronze Block Stair=Escada exterior de Bloco de Bronze +Bronze Block Slab=Laje de bloco de bronze +Gold Block Stair=Escada Bloco de Ouro +Inner Gold Block Stair=Escada interior de Bloco de Ouro +Outer Gold Block Stair=Escada exterior de Bloco de Ouro +Gold Block Slab=Laje de Bloco de Ouro +Ice Stair=Escada de gelo +Inner Ice Stair=Escada de gelo interior +Outer Ice Stair=Escada de gelo exterior +Ice Slab=Laje de gelo +Snow Block Stair=Escada Bloco de Neve +Inner Snow Block Stair=Escada de bloco de neve interior +Outer Snow Block Stair=Escada de bloco de neve exterior +Snow Block Slab=Laje de bloco de neve diff --git a/mods/minetest_game/stairs/locale/stairs.ru.tr b/mods/minetest_game/stairs/locale/stairs.ru.tr new file mode 100644 index 0000000..2d5850e --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.ru.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Стеклянная Ступень +Glass Slab=Стеклянная Плита +Inner Glass Stair=Угловая Стеклянная Ступень (Внутренний Угол) +Outer Glass Stair=Угловая Стеклянная Ступень (Внешний Угол) +Obsidian Glass Stair=Стеклянная Ступень Из Обсидиана +Obsidian Glass Slab=Стеклянная Плита Из Обсидиана +Inner Obsidian Glass Stair=Угловая Стеклянная Ступень Из Обсидиана (Внутренний Угол) +Outer Obsidian Glass Stair=Угловая Стеклянная Ступень Из Обсидиана (Внешний Угол) +Wooden Stair=Яблоневая Деревянная Ступень +Inner Wooden Stair=Угловая Яблоневая Деревянная Ступень (Внутренний Угол) +Outer Wooden Stair=Угловая Яблоневая Деревянная Ступень (Внешний Угол) +Wooden Slab=Яблоневая Деревянная Плита +Jungle Wood Stair=Тропическая Деревянная Ступень +Inner Jungle Wood Stair=Угловая Тропическая Деревянная Ступень (Внутренний Угол) +Outer Jungle Wood Stair=Угловая Тропическая Деревянная Ступень (Внешний Угол) +Jungle Wood Slab=Тропическая Деревянная Плита +Pine Wood Stair=Сосновая Деревянная Ступень +Inner Pine Wood Stair=Угловая Сосновая Деревянная Ступень (Внутренний Угол) +Outer Pine Wood Stair=Угловая Сосновая Деревянная Ступень (Внешний Угол) +Pine Wood Slab=Сосновая Деревянная Плита +Acacia Wood Stair=Деревянная Ступень Из Акации +Inner Acacia Wood Stair=Угловая Деревянная Ступень Из Акации (Внутренний Угол) +Outer Acacia Wood Stair=Угловая Деревянная Ступень Из Акации (Внешний Угол) +Acacia Wood Slab=Деревянная Плита Из Акации +Aspen Wood Stair=Осиновая Деревянная Ступень +Inner Aspen Wood Stair=Угловая Осиновая Деревянная Ступень (Внутренний Угол) +Outer Aspen Wood Stair=Угловая осиновая Деревянная Ступень (Внешний Угол) +Aspen Wood Slab=Осиновая Деревянная Плита +Stone Stair=Каменная Ступень +Inner Stone Stair=Угловая Каменная Ступень (Внутренний Угол) +Outer Stone Stair=Угловая Каменная Ступень (Внешний Угол) +Stone Slab=Каменная Плита +Cobblestone Stair=Булыжниковая Ступень +Inner Cobblestone Stair=Угловая Булыжниковая Ступень (Внутренний Угол) +Outer Cobblestone Stair=Угловая Булыжниковая Ступень (Внешний Угол) +Cobblestone Slab=Булыжниковая Плита +Mossy Cobblestone Stair=Мшистая Булыжниковая Ступень +Inner Mossy Cobblestone Stair=Угловая Мшистая Булыжниковая Ступень (Внутренний Угол) +Outer Mossy Cobblestone Stair=Угловая Мшистая Булыжниковая Ступень (Внешний Угол) +Mossy Cobblestone Slab=Мшистая Булыжниковая Плита +Stone Brick Stair=Cтупень Из Каменных Кирпичей +Inner Stone Brick Stair=Угловая Ступень Из Каменных Кирпичей (Внутренний Угол) +Outer Stone Brick Stair=Угловая Ступень Из Каменных Кирпичей (Внешний Угол) +Stone Brick Slab=Плита Из Каменных Кирпичей +Stone Block Stair=Ступень Из Каменного Блока +Inner Stone Block Stair=Угловая Ступень Из Каменного Блока (Внутренний Угол) +Outer Stone Block Stair=Угловая Ступень Из Каменного Блока (Внешний Угол) +Stone Block Slab=Плита Из Каменного Блока +Desert Stone Stair=Ступень Из Пустынного Камня +Inner Desert Stone Stair=Угловая Ступень Из Пустынного Камня (Внутренний Угол) +Outer Desert Stone Stair=Угловая Ступень Из Пустынного Камня (Внешний Угол) +Desert Stone Slab=Плита Из Пустынного Камня +Desert Cobblestone Stair=Ступень Из Пустынного Булыжника +Inner Desert Cobblestone Stair=Угловая Ступень Из Пустынного Булыжника (Внутренний Угол) +Outer Desert Cobblestone Stair=Угловая Ступень Из Пустынного Булыжника (Внешний Угол) +Desert Cobblestone Slab=Плита Из Пустынного Камня +Desert Stone Brick Stair=Ступень Из Кирпичей Пустынного Камня +Inner Desert Stone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Камня (Внутренний Угол) +Outer Desert Stone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Камня (Внешний Угол) +Desert Stone Brick Slab=Плита Из Кирпичей Пустынного Камня +Desert Stone Block Stair=Ступень Из Пустынного Каменного Блока +Inner Desert Stone Block Stair=Угловая Ступень Из Пустынного Каменного Блока (Внутренний Угол) +Outer Desert Stone Block Stair=Угловая Ступень Из Пустынного Каменного Блока (Внешний Угол) +Desert Stone Block Slab=Плита Из Пустынного Каменного Блока +Sandstone Stair=Песчаниковая Ступень +Inner Sandstone Stair=Угловая Песчаниковая Ступень (Внутренний Угол) +Outer Sandstone Stair=Угловая Песчаниковая Ступень (Внешний Угол) +Sandstone Slab=Песчаниковая Плита +Sandstone Brick Stair=Ступень Из Песчаниковых Кирпичей +Inner Sandstone Brick Stair=Угловая Ступень Из Песчаниковых Кирпичей (Внутренний Угол) +Outer Sandstone Brick Stair=Угловая Ступень Из Песчаниковых Кирпичей (Внешний Угол) +Sandstone Brick Slab=Плита Из Песчаниковых Кирпичей +Sandstone Block Stair=Ступень Из Песчаникового Блока +Inner Sandstone Block Stair=Угловая Ступень Из Песчаникового Блока (Внутренний Угол) +Outer Sandstone Block Stair=Угловая Ступень Из Песчаникового Блока (Внешний Угол) +Sandstone Block Slab=Плита Из Песчаникового Блока +Desert Sandstone Stair=Ступень Из Пустынного Песчаника +Inner Desert Sandstone Stair=Угловая Ступень Из Пустынного Песчаника (Внутренний Угол) +Outer Desert Sandstone Stair=Угловая Ступень Из Пустынного Песчаника (Внешний Угол) +Desert Sandstone Slab=Плита Из Пустынного Песчаника +Desert Sandstone Brick Stair=Ступень Из Кирпичей Пустынного Песчаника +Inner Desert Sandstone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Песчаника (Внутренний Угол) +Outer Desert Sandstone Brick Stair=Угловая Ступень Из Кирпичей Пустынного Песчаника (Внешний Угол) +Desert Sandstone Brick Slab=Плита Из Кирпичей Пустынного Песчаника +Desert Sandstone Block Stair=Ступень Из Пустынного Песчаникового Блока +Inner Desert Sandstone Block Stair=Угловая Ступень Из Пустынного Песчаникового Блока (Внутренний Угол) +Outer Desert Sandstone Block Stair=Угловая Ступень Из Пустынного Песчаникового Блока (Внешний Угол) +Desert Sandstone Block Slab=Плита Из Пустынного Песчаникового Блока +Silver Sandstone Stair=Ступень Из Серебрянного Песчаника +Inner Silver Sandstone Stair=Угловая Ступень Из Серебряного Песчаника (Внутренний Угол) +Outer Silver Sandstone Stair=Угловая Ступень Из Серебряного Песчаника (Внешний Угол) +Silver Sandstone Slab=Плита Из Серебряного Песчаника +Silver Sandstone Brick Stair=Ступень Из Кирпичей Серебряного Песчаника +Inner Silver Sandstone Brick Stair=Угловая Ступень Из Кирпичей Серебряного Песчаника (Внутренний Угол) +Outer Silver Sandstone Brick Stair=Угловая Ступень Из Кирпичей Серебряного Песчаника (Внешний Угол) +Silver Sandstone Brick Slab=Плита Из Кирпичей Серебряного Песчаника +Silver Sandstone Block Stair=Ступень Из Серебряного Песчаникового Блока +Inner Silver Sandstone Block Stair=Угловая Ступень Из Серебряного Песчаникового Блока (Внутренний Угол) +Outer Silver Sandstone Block Stair=Угловая Ступень Из Серебряного Песчаникового Блока (Внешний Угол) +Silver Sandstone Block Slab=Плита Из Серебряного Песчаникового Блока +Obsidian Stair=Обсидиановая Ступень +Inner Obsidian Stair=Угловая Обсидиановая Ступень (Внутренний Угол) +Outer Obsidian Stair=Угловая Обсидиановая Ступень (Внешний Угол) +Obsidian Slab=Обсидиановая Плита +Obsidian Brick Stair=Ступень Из Обсидиановых Кирпичей +Inner Obsidian Brick Stair=Угловая Ступень Из Обсидиановых Кирпичей (Внутренний Угол) +Outer Obsidian Brick Stair=Угловая Ступень Из Обсидиановых Кирпичей (Внешний Угол) +Obsidian Brick Slab=Плита Из Обсидиановых Кирпичей +Obsidian Block Stair=Ступень Из Обсидианового Блока +Inner Obsidian Block Stair=Угловая Ступень Из Обсидианового Блока (Внутренний Угол) +Outer Obsidian Block Stair=Угловая Ступень Из Обсидианового Блока (Внешний Угол) +Obsidian Block Slab=Плита Из Обсидианового Блока +Brick Stair=Ступень Из Кирпичей +Inner Brick Stair=Угловая Ступень Из Кирпичей (Внутренний Угол) +Outer Brick Stair=Угловая Ступень Из Кирпичей (Внешний Угол) +Brick Slab=Плита Из Кирпичей +Steel Block Stair=Ступень Из Стального Блока +Inner Steel Block Stair=Угловая Ступень Из Стального Блока (Внутренний Угол) +Outer Steel Block Stair=Угловая Ступень Из Стального Блока (Внешний Угол) +Steel Block Slab=Плита Из Стального Блока +Tin Block Stair=Ступень Из Оловянного Блока +Inner Tin Block Stair=Угловая Ступень Из Оловянного Блока (Внутренний Угол) +Outer Tin Block Stair=Угловая Ступень Из Оловянного Блока (Внешний Угол) +Tin Block Slab=Плита Из Оловянного Блока +Copper Block Stair=Ступень Из Медного Блока +Inner Copper Block Stair=Угловая Ступень Из Медного Блока (Внутренний Угол) +Outer Copper Block Stair=Угловая Ступень Из Медного Блока (Внешний Угол) +Copper Block Slab=Плита Из Медного Блока +Bronze Block Stair=Ступень Из Бронзового Блока +Inner Bronze Block Stair=Угловая Ступень Из Бронзового Блока (Внутренний Угол) +Outer Bronze Block Stair=Угловая Ступень Из Бронзового Блока (Внешний Угол) +Bronze Block Slab=Плита Из Бронзового Блока +Gold Block Stair=Ступень Из Золотого Блока +Inner Gold Block Stair=Угловая Ступень Из Золотого Блока (Внутренний Угол) +Outer Gold Block Stair=Угловая Ступень Из Золотого Блока (Внешний Угол) +Gold Block Slab=Плита Из Золотого Блока +Ice Stair=Ледяная Ступень +Inner Ice Stair=Угловая Ледяная Ступень (Внутренний Угол) +Outer Ice Stair=Угловая Ледяная Ступень (Внешний Угол) +Ice Slab=Ледяная Плита +Snow Block Stair=Ступень Из Снежного Блока +Inner Snow Block Stair=Угловая Ступень Из Снежного Блока (Внутренний Угол) +Outer Snow Block Stair=Угловая Ступень Из Снежного Блока (Внешний Угол) +Snow Block Slab=Плита Из Снежного Блока diff --git a/mods/minetest_game/stairs/locale/stairs.se.tr b/mods/minetest_game/stairs/locale/stairs.se.tr new file mode 100644 index 0000000..3ace06d --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.se.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Glastrappa +Glass Slab=Glasplatta +Inner Glass Stair=Inre glasstrappa +Outer Glass Stair=Yttre glasstrappa +Obsidian Glass Stair=Obsidian Glass Trappa +Obsidian Glass Slab=Obsidian glasplatta +Inner Obsidian Glass Stair=Inre Obsidian Glass Trappa +Outer Obsidian Glass Stair=Yttre Obsidian Glass Trappa +Wooden Stair=Trätrappa +Inner Wooden Stair=Inre trätrappa +Outer Wooden Stair=Yttre trätrappa +Wooden Slab=Träplatta +Jungle Wood Stair=Jungle Wood Stair +Inner Jungle Wood Stair=Inre Jungle Wood Stair +Outer Jungle Wood Stair=Ytter Jungle Wood Stair +Jungle Wood Slab=Jungle Wood Platta +Pine Wood Stair=Pine Wood Stair +Inner Pine Wood Stair=Inre tall trä trappa +Outer Pine Wood Stair=Ytter tall Trätrappa +Pine Wood Slab=Tallskiva +Acacia Wood Stair=Acacia Wood Stair +Inner Acacia Wood Stair=Inre Acacia Trätrappa +Outer Acacia Wood Stair=Yttre Acacia Trätrappa +Acacia Wood Slab=Acacia träplatta +Aspen Wood Stair=Asp Trä Stair +Inner Aspen Wood Stair=Inre Aspen Trätrappa +Outer Aspen Wood Stair=Yttre Aspen Trätrappa +Aspen Wood Slab=Asp Trä Platta +Stone Stair=Stentrappa +Inner Stone Stair=Inre stentrappa +Outer Stone Stair=Yttre stentrappa +Stone Slab=Stenplatta +Cobblestone Stair=Kullersten trappa +Inner Cobblestone Stair=Inre kullerstensTrappa +Outer Cobblestone Stair=Yttre kullerstensTrappa +Cobblestone Slab=Kullerstenplatta +Mossy Cobblestone Stair=Mossig kullerstensTrappa +Inner Mossy Cobblestone Stair=Inre mossiga kullerstensTrappa +Outer Mossy Cobblestone Stair=Yttre mossiga kullerstensTrappa +Mossy Cobblestone Slab=Mossig kullerstenplatta +Stone Brick Stair=Sten Brick Trappa +Inner Stone Brick Stair=Inre sten tegel trappa +Outer Stone Brick Stair=Yttre sten tegel trappa +Stone Brick Slab=Sten tegelplatta +Stone Block Stair=Sten Block Trappa +Inner Stone Block Stair=Inre stenblock trappa +Outer Stone Block Stair=Yttre stenblock trappa +Stone Block Slab=Stenblockplatta +Desert Stone Stair=Öken Sten Trappa +Inner Desert Stone Stair=Inre Öken Sten Stair +Outer Desert Stone Stair=Outer Öken Sten Stair +Desert Stone Slab=Öken Sten Platta +Desert Cobblestone Stair=Öken Kullersten Trappa +Inner Desert Cobblestone Stair=Inre Öken Kullersten Trappa +Outer Desert Cobblestone Stair=Outer Öken Kullersten Trappa +Desert Cobblestone Slab=Öken Kullersten Platta +Desert Stone Brick Stair=Öken Sten Brick Trappa +Inner Desert Stone Brick Stair=Inre Öken Sten Brick Trappa +Outer Desert Stone Brick Stair=Outer Öken Sten Brick Trappa +Desert Stone Brick Slab=Öken Sten tegelplatta +Desert Stone Block Stair=Öken Sten Block Trappa +Inner Desert Stone Block Stair=Inre Öken Sten Block Stair +Outer Desert Stone Block Stair=Outer Öken Sten Block Trappa +Desert Stone Block Slab=Öken Sten Block Platta +Sandstone Stair=Sandstenstrappa +Inner Sandstone Stair=Inre Sandstenstrappa +Outer Sandstone Stair=Yttre Sandstenstrappa +Sandstone Slab=Sandstenplatta +Sandstone Brick Stair=Sandsten tegel trappa +Inner Sandstone Brick Stair=Inre Sandsten tegel trappa +Outer Sandstone Brick Stair=Yttre Sandsten tegel trappa +Sandstone Brick Slab=Sandsten tegelplatta +Sandstone Block Stair=Sandsten block trappa +Inner Sandstone Block Stair=Inre Sandsten block trappa +Outer Sandstone Block Stair=Yttre Sandsten block trappa +Sandstone Block Slab=Sandsten Block Platta +Desert Sandstone Stair=Öken Sandsten Trappa +Inner Desert Sandstone Stair=Inre Öken Sandsten Trappa +Outer Desert Sandstone Stair=Outer Öken Sandsten Trappa +Desert Sandstone Slab=Öken Sandsten Platta +Desert Sandstone Brick Stair=Öken Sandsten Brick Trappa +Inner Desert Sandstone Brick Stair=Inre Öken Sandsten Brick Trappa +Outer Desert Sandstone Brick Stair=Outer Öken Sandsten Brick Trappa +Desert Sandstone Brick Slab=Öken Sandsten Tegelplatta +Desert Sandstone Block Stair=Öken Sandsten Block Trappa +Inner Desert Sandstone Block Stair=Inre Öken Sandsten Block Trappa +Outer Desert Sandstone Block Stair=Outer Öken Sandsten Block Trappa +Desert Sandstone Block Slab=Öken Sandsten Block Platta +Silver Sandstone Stair=Silver Sandsten trappa +Inner Silver Sandstone Stair=Inre silver Sandsten trappa +Outer Silver Sandstone Stair=Yttre silver Sandsten trappa +Silver Sandstone Slab=Silver Sandsten platta +Silver Sandstone Brick Stair=Silver Sandsten tegel trappa +Inner Silver Sandstone Brick Stair=Inre silver Sandsten tegel trappa +Outer Silver Sandstone Brick Stair=Yttre silver Sandsten tegel trappa +Silver Sandstone Brick Slab=Silver Sandsten tegelplatta +Silver Sandstone Block Stair=Silver Sandsten block trappa +Inner Silver Sandstone Block Stair=Inre silver Sandsten block trappa +Outer Silver Sandstone Block Stair=Yttre silver Sandsten block trappa +Silver Sandstone Block Slab=Silver Sandsten block platta +Obsidian Stair=Obsidian Trappa +Inner Obsidian Stair=Inre Obsidian Trappa +Outer Obsidian Stair=Yttre Obsidian Trappa +Obsidian Slab=Obsidian Platta +Obsidian Brick Stair=Obsidian Brick Stair +Inner Obsidian Brick Stair=Inre Obsidian Brick Trappa +Outer Obsidian Brick Stair=Yttre Obsidian Brick Trappa +Obsidian Brick Slab=Obsidian tegelplatta +Obsidian Block Stair=Obsidian Block Stair +Inner Obsidian Block Stair=Inre Obsidian Block Trappa +Outer Obsidian Block Stair=Yttre Obsidian Block Trappa +Obsidian Block Slab=Obsidian Block Slab +Brick Stair=Tegel trappa +Inner Brick Stair=Inre tegel trappa +Outer Brick Stair=Yttre tegel trappa +Brick Slab=Tegelplatta +Steel Block Stair=Stålblock trappa +Inner Steel Block Stair=Inre stålblock trappa +Outer Steel Block Stair=Yttre stålblocktrappa +Steel Block Slab=Stålblockplatta +Tin Block Stair=Tinn Block Trappa +Inner Tin Block Stair=Inre tennblock trappa +Outer Tin Block Stair=Yttre tennblock trappa +Tin Block Slab=Tennblockplatta +Copper Block Stair=Kopparblock trappa +Inner Copper Block Stair=Inre kopparblock trappa +Outer Copper Block Stair=Yttre kopparblock trappa +Copper Block Slab=Kopparblockplatta +Bronze Block Stair=Bronze Block Trappa +Inner Bronze Block Stair=Inre bronsblock trappa +Outer Bronze Block Stair=Yttre bronsblock trappa +Bronze Block Slab=Bronsblockplatta +Gold Block Stair=Guldblockstrappa +Inner Gold Block Stair=Inre guldblock trappa +Outer Gold Block Stair=Yttre guldblock trappa +Gold Block Slab=Guldblockplatta +Ice Stair=Ice Stair +Inner Ice Stair=Inre istrappa +Outer Ice Stair=Yttre istrappa +Ice Slab=Isplatta +Snow Block Stair=Snow Block Stair +Inner Snow Block Stair=Inre snöblock trappa +Outer Snow Block Stair=Yttre snöblock trappa +Snow Block Slab= diff --git a/mods/minetest_game/stairs/locale/stairs.sk.tr b/mods/minetest_game/stairs/locale/stairs.sk.tr new file mode 100644 index 0000000..b006fdb --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.sk.tr @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair=Sklenené schod +Glass Slab=Sklenený stupienok +Inner Glass Stair=Vnútorný sklenené schod +Outer Glass Stair=Vonkajší sklenené schod +Obsidian Glass Stair=Obsidiánové sklenené schod +Obsidian Glass Slab=Obsidiánový sklenený stupienok +Inner Obsidian Glass Stair=Vnútorný obsidiánové sklenené schod +Outer Obsidian Glass Stair=Vonkajší obsidiánové sklenené schod +Wooden Stair=Drevené schod +Inner Wooden Stair=Vnútorný drevené schod +Outer Wooden Stair=Vonkajší drevené schod +Wooden Slab=Drevený stupienok +Jungle Wood Stair=Drevené schod z džungľového dreva +Inner Jungle Wood Stair=Vnútorný drevené schod z džungľového dreva +Outer Jungle Wood Stair=Vonkajší drevené schod z džungľového dreva +Jungle Wood Slab=Stupienok z džungľového dreva +Pine Wood Stair=Drevené schod z borovicového dreva +Inner Pine Wood Stair=Vnútorný drevené schod z borovicového dreva +Outer Pine Wood Stair=Vonkajší drevené schod z borovicového dreva +Pine Wood Slab=Stupienok z borovicového dreva +Acacia Wood Stair=Drevené schod z akáciového dreva +Inner Acacia Wood Stair=Vnútorný drevené schod z akáciového dreva +Outer Acacia Wood Stair=Vonkajší drevené schod z akáciového dreva +Acacia Wood Slab=Stupienok z akáciového dreva +Aspen Wood Stair=Drevené schod z osiky +Inner Aspen Wood Stair=Vnútorný drevené schod z osiky +Outer Aspen Wood Stair=Vonkajší drevené schod z osiky +Aspen Wood Slab=Stupienok z osiky +Stone Stair=Kamenné schod +Inner Stone Stair=Vnútorný kamenné schod +Outer Stone Stair=Vonkajší kamenné schod +Stone Slab=Kamenný stupienok +Cobblestone Stair=Schod z dlažbového kameňa +Inner Cobblestone Stair=Vnútorný schod z dlažbového kameňa +Outer Cobblestone Stair=Vonkajší schod z dlažbového kameňa +Cobblestone Slab=Stupienok z dlažbového kameňa +Mossy Cobblestone Stair=Schod dlažbového kameňa obrastené machom +Inner Mossy Cobblestone Stair=Vnútorný schod dlažbového kameňa obrastené machom +Outer Mossy Cobblestone Stair=Vonkajší schod dlažbového kameňa obrastené machom +Mossy Cobblestone Slab=Stupienok z dlažbového kameňa obrastený machom +Stone Brick Stair=Schod z kamenných tehál +Inner Stone Brick Stair=Vnútorný schod z kamenných tehál +Outer Stone Brick Stair=Vonkajší schod z kamenných tehál +Stone Brick Slab=Stupienok z kamenných tehál +Stone Block Stair=Schod z kameňa +Inner Stone Block Stair=Vnútorný schod z kameňa +Outer Stone Block Stair=Vonkajší schod z kameňa +Stone Block Slab=Stupienok z kameňa +Desert Stone Stair=Schod z púštneho kameňa +Inner Desert Stone Stair=Vnútorný schod z púštneho kameňa +Outer Desert Stone Stair=Vonkajší schod z púštneho kameňa +Desert Stone Slab=Stupienok z púštneho kameňa +Desert Cobblestone Stair=Schod z púštneho dlažbového kameňa +Inner Desert Cobblestone Stair=Vnútorný schod z púštneho dlažbového kameňa +Outer Desert Cobblestone Stair=Vonkajší schod z púštneho dlažbového kameňa +Desert Cobblestone Slab=Stupienok z púštneho dlažbového kameňa +Desert Stone Brick Stair=Schod z tehiel z púštneho kameňa +Inner Desert Stone Brick Stair=Vnútorný schod z tehiel z púštneho kameňa +Outer Desert Stone Brick Stair=Vonkajší schod z tehiel z púštneho kameňa +Desert Stone Brick Slab=Stupienok z tehiel z púštneho kameňa +Desert Stone Block Stair=Schod z blokov púštneho kameňa +Inner Desert Stone Block Stair=Vnútorný schod z blokov púštneho kameňa +Outer Desert Stone Block Stair=Vonkajší schod z blokov púštneho kameňa +Desert Stone Block Slab=Stupienok z blokov púštneho kameňa +Sandstone Stair=Schod z pieskovca +Inner Sandstone Stair=Vnútorný schod z pieskovca +Outer Sandstone Stair=Vonkajší schod z pieskovca +Sandstone Slab=Stupienok z pieskovca +Sandstone Brick Stair=Schod z tehál pieskovca +Inner Sandstone Brick Stair=Vnútorný schod z tehál pieskovca +Outer Sandstone Brick Stair=Vonkajší schod z tehál pieskovca +Sandstone Brick Slab=Stupienok z tehál pieskovca +Sandstone Block Stair=Schod z blokov pieskovca +Inner Sandstone Block Stair=Vnútorný schod z blokov pieskovca +Outer Sandstone Block Stair=Vonkajší schod z blokov pieskovca +Sandstone Block Slab=Stupienok z blokov pieskovca +Desert Sandstone Stair=Schod z púštneho pieskovca +Inner Desert Sandstone Stair=Vnútorný schod z púštneho pieskovca +Outer Desert Sandstone Stair=Vonkajší schod z púštneho pieskovca +Desert Sandstone Slab=Stupienok z púštneho pieskovca +Desert Sandstone Brick Stair=Schod z tehál z púštneho pieskovca +Inner Desert Sandstone Brick Stair=Vnútorný schod z tehál z púštneho pieskovca +Outer Desert Sandstone Brick Stair=Vonkajší schod z tehál z púštneho pieskovca +Desert Sandstone Brick Slab=Stupienok z tehál z púštneho pieskovca +Desert Sandstone Block Stair=Schod z blokov púštneho pieskovca +Inner Desert Sandstone Block Stair=Vnútorný schod z blokov púštneho pieskovca +Outer Desert Sandstone Block Stair=Vonkajší schod z blokov púštneho pieskovca +Desert Sandstone Block Slab=Stupienok z blokov púštneho pieskovca +Silver Sandstone Stair=Schod zo strieborného pieskovca +Inner Silver Sandstone Stair=Vnútorný schod zo strieborného pieskovca +Outer Silver Sandstone Stair=Vonkajší schod zo strieborného pieskovca +Silver Sandstone Slab=Stupienok zo strieborného pieskovca +Silver Sandstone Brick Stair=Schod z tehál zo strieborného pieskovca +Inner Silver Sandstone Brick Stair=Vnútorný schod z tehál zo strieborného pieskovca +Outer Silver Sandstone Brick Stair=Vonkajší schod z tehál zo strieborného pieskovca +Silver Sandstone Brick Slab=Stupienok z tehál zo strieborného pieskovca +Silver Sandstone Block Stair=Schod z blokov strieborného pieskovca +Inner Silver Sandstone Block Stair=Vnútorný schod z blokov strieborného pieskovca +Outer Silver Sandstone Block Stair=Vonkajší schod z blokov strieborného pieskovca +Silver Sandstone Block Slab=Stupienok z blokov strieborného pieskovca +Obsidian Stair=Schod z obsidiánu +Inner Obsidian Stair=Vnútorný schod z obsidiánu +Outer Obsidian Stair=Vonkajší schod z obsidiánu +Obsidian Slab=Stupienok z obsidiánu +Obsidian Brick Stair=Schod z tehál obsidiánu +Inner Obsidian Brick Stair=Vnútorný schod z tehál obsidiánu +Outer Obsidian Brick Stair=Vonkajší schod z tehál obsidiánu +Obsidian Brick Slab=Stupienok z tehál obsidiánu +Obsidian Block Stair=Schod z bloku obsidiánu +Inner Obsidian Block Stair=Vnútorný schod z bloku obsidiánu +Outer Obsidian Block Stair=Vonkajší schod z bloku obsidiánu +Obsidian Block Slab=Stupienok z bloku obsidiánu +Brick Stair=Schod z tehál +Inner Brick Stair=Vnútorný schod z tehál +Outer Brick Stair=Vonkajší schod z tehál +Brick Slab=Stupienok z tehál +Steel Block Stair=Oceľový schod +Inner Steel Block Stair=Vnútorný oceľový schod +Outer Steel Block Stair=Vonkajší oceľový schod +Steel Block Slab=Oceľový stupienok +Tin Block Stair=Cínový schod +Inner Tin Block Stair=Vnútorný cínový schod +Outer Tin Block Stair=Vonkajší cínový schod +Tin Block Slab=Cínový stupienok +Copper Block Stair=Medený schod +Inner Copper Block Stair=Vnútorný medený schod +Outer Copper Block Stair=Vonkajší medený schod +Copper Block Slab=Medený stupienok +Bronze Block Stair=Bronzový schod +Inner Bronze Block Stair=Vnútorný bronzový schod +Outer Bronze Block Stair=Vonkajší bronzový schod +Bronze Block Slab=Bronzový stupienok +Gold Block Stair=Zlatý schod +Inner Gold Block Stair=Vnútorný zlatý schod +Outer Gold Block Stair=Vonkajší zlatý schod +Gold Block Slab=Zlatý stupienok +Ice Stair=Ľadový schod +Inner Ice Stair=Vnútorný ľadový schod +Outer Ice Stair=Vonkajší ľadový schod +Ice Slab=Ľadový stupienok +Snow Block Stair=Snehový schod +Inner Snow Block Stair=Vnútorný snehový schod +Outer Snow Block Stair=Vonkajší snehový schod +Snow Block Slab=Snehový stupienok diff --git a/mods/minetest_game/stairs/locale/stairs.zh_CN.tr b/mods/minetest_game/stairs/locale/stairs.zh_CN.tr new file mode 100644 index 0000000..8564665 --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.zh_CN.tr @@ -0,0 +1,153 @@ +# textdomain: stairs +Glass Stair=玻璃楼梯 +Glass Slab=玻璃台阶 +Inner Glass Stair=玻璃楼梯(内) +Outer Glass Stair=玻璃楼梯(外) +Obsidian Glass Stair=黑曜石玻璃楼梯 +Obsidian Glass Slab=黑曜石玻璃台阶 +Inner Obsidian Glass Stair=黑曜石玻璃楼梯(内) +Outer Obsidian Glass Stair=黑曜石玻璃楼梯(外) +Wooden Stair=木制楼梯 +Inner Wooden Stair=木楼梯(内) +Outer Wooden Stair=木楼梯(外) +Wooden Slab=木制台阶 +Jungle Wood Stair=丛林木楼梯 +Inner Jungle Wood Stair=丛林木楼梯(内) +Outer Jungle Wood Stair=丛林木楼梯(外) +Jungle Wood Slab=丛林木台阶 +Pine Wood Stair=松木楼梯 +Inner Pine Wood Stair=松木楼梯(内) +Outer Pine Wood Stair=松木楼梯(外) +Pine Wood Slab=松木台阶 +Acacia Wood Stair=金合欢木楼梯 +Inner Acacia Wood Stair=金合欢木楼梯(内) +Outer Acacia Wood Stair=金合欢木楼梯(外) +Acacia Wood Slab=金合欢木台阶 +Aspen Wood Stair=白杨木楼梯 +Inner Aspen Wood Stair=白杨木楼梯(内) +Outer Aspen Wood Stair=白杨木楼梯(外) +Aspen Wood Slab=白杨木台阶 +Stone Stair=石楼梯 +Inner Stone Stair=石楼梯(内) +Outer Stone Stair=石楼梯(外) +Stone Slab=石台阶 +Cobblestone Stair=圆石楼梯 +Inner Cobblestone Stair=圆石楼梯(内) +Outer Cobblestone Stair=圆石楼梯(外) +Cobblestone Slab=圆石台阶 +Mossy Cobblestone Stair=苔石楼梯 +Inner Mossy Cobblestone Stair=苔石楼梯(内) +Outer Mossy Cobblestone Stair=苔石楼梯(外) +Mossy Cobblestone Slab=苔石台阶 +Stone Brick Stair=石砖楼梯 +Inner Stone Brick Stair=石砖楼梯(内) +Outer Stone Brick Stair=石砖楼梯(外) +Stone Brick Slab=石砖台阶 +Stone Block Stair=石块楼梯 +Inner Stone Block Stair=石块楼梯(内) +Outer Stone Block Stair=石块楼梯(外) +Stone Block Slab=石块台阶 +Desert Stone Stair=沙漠石楼梯 +Inner Desert Stone Stair=沙漠石楼梯(内) +Outer Desert Stone Stair=沙漠石楼梯(外) +Desert Stone Slab=沙漠石台阶 +Desert Cobblestone Stair=沙漠圆石楼梯 +Inner Desert Cobblestone Stair=沙漠圆石楼梯(内) +Outer Desert Cobblestone Stair=沙漠圆石楼梯(外) +Desert Cobblestone Slab=沙漠圆石台阶 +Desert Stone Brick Stair=沙漠石砖楼梯 +Inner Desert Stone Brick Stair=沙漠石砖楼梯(内) +Outer Desert Stone Brick Stair=沙漠石砖楼梯(外) +Desert Stone Brick Slab=沙漠石砖台阶 +Desert Stone Block Stair=沙漠石块楼梯 +Inner Desert Stone Block Stair=沙漠石块楼梯(内) +Outer Desert Stone Block Stair=沙漠石块楼梯(外) +Desert Stone Block Slab=沙漠石块台阶 +Sandstone Stair=沙石楼梯 +Inner Sandstone Stair=沙石楼梯(内) +Outer Sandstone Stair=沙石楼梯(外) +Sandstone Slab=沙石台阶 +Sandstone Brick Stair=沙石砖楼梯 +Inner Sandstone Brick Stair=沙石砖楼梯(内) +Outer Sandstone Brick Stair=沙石砖楼梯(外) +Sandstone Brick Slab=沙石砖台阶 +Sandstone Block Stair=沙石块楼梯 +Inner Sandstone Block Stair=沙石块楼梯(内) +Outer Sandstone Block Stair=沙石块楼梯(外) +Sandstone Block Slab=沙石块台阶 +Desert Sandstone Stair=沙漠沙石楼梯 +Inner Desert Sandstone Stair=沙漠沙石楼梯(内) +Outer Desert Sandstone Stair=沙漠沙石楼梯(外) +Desert Sandstone Slab=沙漠沙石台阶 +Desert Sandstone Brick Stair=沙漠沙石砖楼梯 +Inner Desert Sandstone Brick Stair=沙漠沙石砖楼梯(内) +Outer Desert Sandstone Brick Stair=沙漠沙石砖楼梯(外) +Desert Sandstone Brick Slab=沙漠沙石砖台阶 +Desert Sandstone Block Stair=沙漠沙石块楼梯 +Inner Desert Sandstone Block Stair=沙漠沙石块楼梯(内) +Outer Desert Sandstone Block Stair=沙漠沙石块楼梯(外) +Desert Sandstone Block Slab=沙漠沙石块台阶 +Silver Sandstone Stair=银沙石楼梯 +Inner Silver Sandstone Stair=银沙石楼梯(内) +Outer Silver Sandstone Stair=银沙石楼梯(外) +Silver Sandstone Slab=银沙石台阶 +Silver Sandstone Brick Stair=银沙石砖楼梯 +Inner Silver Sandstone Brick Stair=银沙石砖楼梯(内) +Outer Silver Sandstone Brick Stair=银沙石砖楼梯(外) +Silver Sandstone Brick Slab=银沙石砖台阶 +Silver Sandstone Block Stair=银沙石块楼梯 +Inner Silver Sandstone Block Stair=银沙石块楼梯(内) +Outer Silver Sandstone Block Stair=银沙石块楼梯(外) +Silver Sandstone Block Slab=银沙石块台阶 +Obsidian Stair=黑曜石楼梯 +Inner Obsidian Stair=黑曜石楼梯(内) +Outer Obsidian Stair=黑曜石楼梯(外) +Obsidian Slab=黑曜石台阶 +Obsidian Brick Stair=黑曜石砖楼梯 +Inner Obsidian Brick Stair=黑曜石砖楼梯(内) +Outer Obsidian Brick Stair=黑曜石砖楼梯(外) +Obsidian Brick Slab=黑曜石砖台阶 +Obsidian Block Stair=黑曜石块楼梯 +Inner Obsidian Block Stair=黑曜石块楼梯(内) +Outer Obsidian Block Stair=黑曜石块楼梯(外) +Obsidian Block Slab=黑曜石块台阶 +Brick Stair=砖楼梯 +Inner Brick Stair=砖楼梯(内) +Outer Brick Stair=砖楼梯(外) +Brick Slab=砖制台阶 +Steel Block Stair=铁块楼梯 +Inner Steel Block Stair=铁块楼梯(内) +Outer Steel Block Stair=铁块楼梯(外) +Steel Block Slab=铁块台阶 +Tin Block Stair=锡块楼梯 +Inner Tin Block Stair=锡块楼梯(内) +Outer Tin Block Stair=锡块楼梯(外) +Tin Block Slab=锡块台阶 +Copper Block Stair=铜块楼梯 +Inner Copper Block Stair=铜块楼梯(内) +Outer Copper Block Stair=铜块楼梯(外) +Copper Block Slab=铜块台阶 +Bronze Block Stair=青铜块楼梯 +Inner Bronze Block Stair=青铜块楼梯(内) +Outer Bronze Block Stair=青铜块楼梯(外) +Bronze Block Slab=青铜块台阶 +Gold Block Stair=金块楼梯 +Inner Gold Block Stair=金块楼梯(内) +Outer Gold Block Stair=金块楼梯(外) +Gold Block Slab=金块台阶 +Ice Stair=冰阶梯 +Inner Ice Stair=冰块楼梯(内) +Outer Ice Stair=冰块楼梯(外) +Ice Slab=冰台阶 +Snow Block Stair=雪块楼梯 +Inner Snow Block Stair=雪块楼梯(内) +Outer Snow Block Stair=雪块楼梯(外) +Snow Block Slab=雪块台阶 + + +##### not used anymore ##### + +Blue Stained Stair=蓝木楼梯 +Inner Blue Stained Stair=蓝木楼梯(内) +Outer Blue Stained Stair=蓝木楼梯(外) +Blue Stained Slab=蓝木台阶 diff --git a/mods/minetest_game/stairs/locale/stairs.zh_TW.tr b/mods/minetest_game/stairs/locale/stairs.zh_TW.tr new file mode 100644 index 0000000..eaed61f --- /dev/null +++ b/mods/minetest_game/stairs/locale/stairs.zh_TW.tr @@ -0,0 +1,153 @@ +# textdomain: stairs +Glass Stair=玻璃樓梯 +Glass Slab=玻璃臺階 +Inner Glass Stair=玻璃樓梯(內) +Outer Glass Stair=玻璃樓梯(外) +Obsidian Glass Stair=黑曜石玻璃樓梯 +Obsidian Glass Slab=黑曜石玻璃臺階 +Inner Obsidian Glass Stair=黑曜石玻璃樓梯(內) +Outer Obsidian Glass Stair=黑曜石玻璃樓梯(外) +Wooden Stair=木製樓梯 +Inner Wooden Stair=木樓梯(內) +Outer Wooden Stair=木樓梯(外) +Wooden Slab=木製臺階 +Jungle Wood Stair=叢林木樓梯 +Inner Jungle Wood Stair=叢林木樓梯(內) +Outer Jungle Wood Stair=叢林木樓梯(外) +Jungle Wood Slab=叢林木臺階 +Pine Wood Stair=松木樓梯 +Inner Pine Wood Stair=松木樓梯(內) +Outer Pine Wood Stair=松木樓梯(外) +Pine Wood Slab=松木臺階 +Acacia Wood Stair=金合歡木樓梯 +Inner Acacia Wood Stair=金合歡木樓梯(內) +Outer Acacia Wood Stair=金合歡木樓梯(外) +Acacia Wood Slab=金合歡木臺階 +Aspen Wood Stair=白楊木樓梯 +Inner Aspen Wood Stair=白楊木樓梯(內) +Outer Aspen Wood Stair=白楊木樓梯(外) +Aspen Wood Slab=白楊木臺階 +Stone Stair=石樓梯 +Inner Stone Stair=石樓梯(內) +Outer Stone Stair=石樓梯(外) +Stone Slab=石臺階 +Cobblestone Stair=圓石樓梯 +Inner Cobblestone Stair=圓石樓梯(內) +Outer Cobblestone Stair=圓石樓梯(外) +Cobblestone Slab=圓石臺階 +Mossy Cobblestone Stair=苔石樓梯 +Inner Mossy Cobblestone Stair=苔石樓梯(內) +Outer Mossy Cobblestone Stair=苔石樓梯(外) +Mossy Cobblestone Slab=苔石臺階 +Stone Brick Stair=石磚樓梯 +Inner Stone Brick Stair=石磚樓梯(內) +Outer Stone Brick Stair=石磚樓梯(外) +Stone Brick Slab=石磚臺階 +Stone Block Stair=石塊樓梯 +Inner Stone Block Stair=石塊樓梯(內) +Outer Stone Block Stair=石塊樓梯(外) +Stone Block Slab=石塊臺階 +Desert Stone Stair=沙漠石樓梯 +Inner Desert Stone Stair=沙漠石樓梯(內) +Outer Desert Stone Stair=沙漠石樓梯(外) +Desert Stone Slab=沙漠石臺階 +Desert Cobblestone Stair=沙漠圓石樓梯 +Inner Desert Cobblestone Stair=沙漠圓石樓梯(內) +Outer Desert Cobblestone Stair=沙漠圓石樓梯(外) +Desert Cobblestone Slab=沙漠圓石臺階 +Desert Stone Brick Stair=沙漠石磚樓梯 +Inner Desert Stone Brick Stair=沙漠石磚樓梯(內) +Outer Desert Stone Brick Stair=沙漠石磚樓梯(外) +Desert Stone Brick Slab=沙漠石磚臺階 +Desert Stone Block Stair=沙漠石塊樓梯 +Inner Desert Stone Block Stair=沙漠石塊樓梯(內) +Outer Desert Stone Block Stair=沙漠石塊樓梯(外) +Desert Stone Block Slab=沙漠石塊臺階 +Sandstone Stair=沙石樓梯 +Inner Sandstone Stair=沙石樓梯(內) +Outer Sandstone Stair=沙石樓梯(外) +Sandstone Slab=沙石臺階 +Sandstone Brick Stair=沙石磚樓梯 +Inner Sandstone Brick Stair=沙石磚樓梯(內) +Outer Sandstone Brick Stair=沙石磚樓梯(外) +Sandstone Brick Slab=沙石磚臺階 +Sandstone Block Stair=沙石塊樓梯 +Inner Sandstone Block Stair=沙石塊樓梯(內) +Outer Sandstone Block Stair=沙石塊樓梯(外) +Sandstone Block Slab=沙石塊臺階 +Desert Sandstone Stair=沙漠沙石樓梯 +Inner Desert Sandstone Stair=沙漠沙石樓梯(內) +Outer Desert Sandstone Stair=沙漠沙石樓梯(外) +Desert Sandstone Slab=沙漠沙石臺階 +Desert Sandstone Brick Stair=沙漠沙石磚樓梯 +Inner Desert Sandstone Brick Stair=沙漠沙石磚樓梯(內) +Outer Desert Sandstone Brick Stair=沙漠沙石磚樓梯(外) +Desert Sandstone Brick Slab=沙漠沙石磚臺階 +Desert Sandstone Block Stair=沙漠沙石塊樓梯 +Inner Desert Sandstone Block Stair=沙漠沙石塊樓梯(內) +Outer Desert Sandstone Block Stair=沙漠沙石塊樓梯(外) +Desert Sandstone Block Slab=沙漠沙石塊臺階 +Silver Sandstone Stair=銀沙石樓梯 +Inner Silver Sandstone Stair=銀沙石樓梯(內) +Outer Silver Sandstone Stair=銀沙石樓梯(外) +Silver Sandstone Slab=銀沙石臺階 +Silver Sandstone Brick Stair=銀沙石磚樓梯 +Inner Silver Sandstone Brick Stair=銀沙石磚樓梯(內) +Outer Silver Sandstone Brick Stair=銀沙石磚樓梯(外) +Silver Sandstone Brick Slab=銀沙石磚臺階 +Silver Sandstone Block Stair=銀沙石塊樓梯 +Inner Silver Sandstone Block Stair=銀沙石塊樓梯(內) +Outer Silver Sandstone Block Stair=銀沙石塊樓梯(外) +Silver Sandstone Block Slab=銀沙石塊臺階 +Obsidian Stair=黑曜石樓梯 +Inner Obsidian Stair=黑曜石樓梯(內) +Outer Obsidian Stair=黑曜石樓梯(外) +Obsidian Slab=黑曜石臺階 +Obsidian Brick Stair=黑曜石磚樓梯 +Inner Obsidian Brick Stair=黑曜石磚樓梯(內) +Outer Obsidian Brick Stair=黑曜石磚樓梯(外) +Obsidian Brick Slab=黑曜石磚臺階 +Obsidian Block Stair=黑曜石塊樓梯 +Inner Obsidian Block Stair=黑曜石塊樓梯(內) +Outer Obsidian Block Stair=黑曜石塊樓梯(外) +Obsidian Block Slab=黑曜石塊臺階 +Brick Stair=磚樓梯 +Inner Brick Stair=磚樓梯(內) +Outer Brick Stair=磚樓梯(外) +Brick Slab=磚制臺階 +Steel Block Stair=鐵塊樓梯 +Inner Steel Block Stair=鐵塊樓梯(內) +Outer Steel Block Stair=鐵塊樓梯(外) +Steel Block Slab=鐵塊臺階 +Tin Block Stair=錫塊樓梯 +Inner Tin Block Stair=錫塊樓梯(內) +Outer Tin Block Stair=錫塊樓梯(外) +Tin Block Slab=錫塊臺階 +Copper Block Stair=銅塊樓梯 +Inner Copper Block Stair=銅塊樓梯(內) +Outer Copper Block Stair=銅塊樓梯(外) +Copper Block Slab=銅塊臺階 +Bronze Block Stair=青銅塊樓梯 +Inner Bronze Block Stair=青銅塊樓梯(內) +Outer Bronze Block Stair=青銅塊樓梯(外) +Bronze Block Slab=青銅塊臺階 +Gold Block Stair=金塊樓梯 +Inner Gold Block Stair=金塊樓梯(內) +Outer Gold Block Stair=金塊樓梯(外) +Gold Block Slab=金塊臺階 +Ice Stair=冰階梯 +Inner Ice Stair=冰塊樓梯(內) +Outer Ice Stair=冰塊樓梯(外) +Ice Slab=冰臺階 +Snow Block Stair=雪塊樓梯 +Inner Snow Block Stair=雪塊樓梯(內) +Outer Snow Block Stair=雪塊樓梯(外) +Snow Block Slab=雪塊臺階 + + +##### not used anymore ##### + +Blue Stained Stair=藍木樓梯 +Inner Blue Stained Stair=藍木樓梯(內) +Outer Blue Stained Stair=藍木樓梯(外) +Blue Stained Slab=藍木臺階 diff --git a/mods/minetest_game/stairs/locale/template.txt b/mods/minetest_game/stairs/locale/template.txt new file mode 100644 index 0000000..ca2c865 --- /dev/null +++ b/mods/minetest_game/stairs/locale/template.txt @@ -0,0 +1,145 @@ +# textdomain: stairs +Glass Stair= +Glass Slab= +Inner Glass Stair= +Outer Glass Stair= +Obsidian Glass Stair= +Obsidian Glass Slab= +Inner Obsidian Glass Stair= +Outer Obsidian Glass Stair= +Wooden Stair= +Inner Wooden Stair= +Outer Wooden Stair= +Wooden Slab= +Jungle Wood Stair= +Inner Jungle Wood Stair= +Outer Jungle Wood Stair= +Jungle Wood Slab= +Pine Wood Stair= +Inner Pine Wood Stair= +Outer Pine Wood Stair= +Pine Wood Slab= +Acacia Wood Stair= +Inner Acacia Wood Stair= +Outer Acacia Wood Stair= +Acacia Wood Slab= +Aspen Wood Stair= +Inner Aspen Wood Stair= +Outer Aspen Wood Stair= +Aspen Wood Slab= +Stone Stair= +Inner Stone Stair= +Outer Stone Stair= +Stone Slab= +Cobblestone Stair= +Inner Cobblestone Stair= +Outer Cobblestone Stair= +Cobblestone Slab= +Mossy Cobblestone Stair= +Inner Mossy Cobblestone Stair= +Outer Mossy Cobblestone Stair= +Mossy Cobblestone Slab= +Stone Brick Stair= +Inner Stone Brick Stair= +Outer Stone Brick Stair= +Stone Brick Slab= +Stone Block Stair= +Inner Stone Block Stair= +Outer Stone Block Stair= +Stone Block Slab= +Desert Stone Stair= +Inner Desert Stone Stair= +Outer Desert Stone Stair= +Desert Stone Slab= +Desert Cobblestone Stair= +Inner Desert Cobblestone Stair= +Outer Desert Cobblestone Stair= +Desert Cobblestone Slab= +Desert Stone Brick Stair= +Inner Desert Stone Brick Stair= +Outer Desert Stone Brick Stair= +Desert Stone Brick Slab= +Desert Stone Block Stair= +Inner Desert Stone Block Stair= +Outer Desert Stone Block Stair= +Desert Stone Block Slab= +Sandstone Stair= +Inner Sandstone Stair= +Outer Sandstone Stair= +Sandstone Slab= +Sandstone Brick Stair= +Inner Sandstone Brick Stair= +Outer Sandstone Brick Stair= +Sandstone Brick Slab= +Sandstone Block Stair= +Inner Sandstone Block Stair= +Outer Sandstone Block Stair= +Sandstone Block Slab= +Desert Sandstone Stair= +Inner Desert Sandstone Stair= +Outer Desert Sandstone Stair= +Desert Sandstone Slab= +Desert Sandstone Brick Stair= +Inner Desert Sandstone Brick Stair= +Outer Desert Sandstone Brick Stair= +Desert Sandstone Brick Slab= +Desert Sandstone Block Stair= +Inner Desert Sandstone Block Stair= +Outer Desert Sandstone Block Stair= +Desert Sandstone Block Slab= +Silver Sandstone Stair= +Inner Silver Sandstone Stair= +Outer Silver Sandstone Stair= +Silver Sandstone Slab= +Silver Sandstone Brick Stair= +Inner Silver Sandstone Brick Stair= +Outer Silver Sandstone Brick Stair= +Silver Sandstone Brick Slab= +Silver Sandstone Block Stair= +Inner Silver Sandstone Block Stair= +Outer Silver Sandstone Block Stair= +Silver Sandstone Block Slab= +Obsidian Stair= +Inner Obsidian Stair= +Outer Obsidian Stair= +Obsidian Slab= +Obsidian Brick Stair= +Inner Obsidian Brick Stair= +Outer Obsidian Brick Stair= +Obsidian Brick Slab= +Obsidian Block Stair= +Inner Obsidian Block Stair= +Outer Obsidian Block Stair= +Obsidian Block Slab= +Brick Stair= +Inner Brick Stair= +Outer Brick Stair= +Brick Slab= +Steel Block Stair= +Inner Steel Block Stair= +Outer Steel Block Stair= +Steel Block Slab= +Tin Block Stair= +Inner Tin Block Stair= +Outer Tin Block Stair= +Tin Block Slab= +Copper Block Stair= +Inner Copper Block Stair= +Outer Copper Block Stair= +Copper Block Slab= +Bronze Block Stair= +Inner Bronze Block Stair= +Outer Bronze Block Stair= +Bronze Block Slab= +Gold Block Stair= +Inner Gold Block Stair= +Outer Gold Block Stair= +Gold Block Slab= +Ice Stair= +Inner Ice Stair= +Outer Ice Stair= +Ice Slab= +Snow Block Stair= +Inner Snow Block Stair= +Outer Snow Block Stair= +Snow Block Slab= diff --git a/mods/minetest_game/stairs/mod.conf b/mods/minetest_game/stairs/mod.conf new file mode 100644 index 0000000..7548fa7 --- /dev/null +++ b/mods/minetest_game/stairs/mod.conf @@ -0,0 +1,3 @@ +name = stairs +description = Minetest Game mod: stairs +depends = default diff --git a/mods/minetest_game/stairs/textures/stairs_glass_outer_stairside.png b/mods/minetest_game/stairs/textures/stairs_glass_outer_stairside.png new file mode 100644 index 0000000..9b298c8 Binary files /dev/null and b/mods/minetest_game/stairs/textures/stairs_glass_outer_stairside.png differ diff --git a/mods/minetest_game/stairs/textures/stairs_glass_split.png b/mods/minetest_game/stairs/textures/stairs_glass_split.png new file mode 100644 index 0000000..6287959 Binary files /dev/null and b/mods/minetest_game/stairs/textures/stairs_glass_split.png differ diff --git a/mods/minetest_game/stairs/textures/stairs_glass_stairside.png b/mods/minetest_game/stairs/textures/stairs_glass_stairside.png new file mode 100644 index 0000000..c424294 Binary files /dev/null and b/mods/minetest_game/stairs/textures/stairs_glass_stairside.png differ diff --git a/mods/minetest_game/stairs/textures/stairs_obsidian_glass_outer_stairside.png b/mods/minetest_game/stairs/textures/stairs_obsidian_glass_outer_stairside.png new file mode 100644 index 0000000..0098f68 Binary files /dev/null and b/mods/minetest_game/stairs/textures/stairs_obsidian_glass_outer_stairside.png differ diff --git a/mods/minetest_game/stairs/textures/stairs_obsidian_glass_split.png b/mods/minetest_game/stairs/textures/stairs_obsidian_glass_split.png new file mode 100644 index 0000000..7647b9b Binary files /dev/null and b/mods/minetest_game/stairs/textures/stairs_obsidian_glass_split.png differ diff --git a/mods/minetest_game/stairs/textures/stairs_obsidian_glass_stairside.png b/mods/minetest_game/stairs/textures/stairs_obsidian_glass_stairside.png new file mode 100644 index 0000000..40b1754 Binary files /dev/null and b/mods/minetest_game/stairs/textures/stairs_obsidian_glass_stairside.png differ diff --git a/mods/minetest_game/tnt/README.txt b/mods/minetest_game/tnt/README.txt new file mode 100644 index 0000000..df244fe --- /dev/null +++ b/mods/minetest_game/tnt/README.txt @@ -0,0 +1,74 @@ +Minetest Game mod: tnt +====================== +See license.txt for license information. + +Authors of source code +---------------------- +PilzAdam (MIT) +ShadowNinja (MIT) +sofar (sofar@foo-projects.org) (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media +---------------- +BlockMen (CC BY-SA 3.0): +All textures not mentioned below. + +ShadowNinja (CC BY-SA 3.0): +tnt_smoke.png + +Wuzzy (CC BY-SA 3.0): +All gunpowder textures except tnt_gunpowder_inventory.png. + +sofar (sofar@foo-projects.org) (CC BY-SA 3.0): +tnt_blast.png + +paramat (CC BY-SA 3.0) +tnt_tnt_stick.png - Derived from a texture by benrob0329. + +TumeniNodes (CC0 1.0) +tnt_explode.ogg +renamed, edited, and converted to .ogg from Explosion2.wav +by steveygos93 (CC0 1.0) + + +tnt_ignite.ogg +renamed, edited, and converted to .ogg from sparkler_fuse_nm.wav +by theneedle.tv (CC0 1.0) + + +tnt_gunpowder_burning.ogg +renamed, edited, and converted to .ogg from road flare ignite burns.wav +by frankelmedico (CC0 1.0) + + + +Introduction +------------ +This mod adds TNT to Minetest. TNT is a tool to help the player +in mining. + +How to use the mod: + +Craft gunpowder by placing coal and gravel in the crafting area. +The gunpowder can be used to craft TNT sticks or as a fuse trail for TNT. + +To craft 2 TNT sticks: +G_G +GPG +G_G +G = gunpowder +P = paper +The sticks are not usable as an explosive. + +Craft TNT from 9 TNT sticks. + +There are different ways to ignite TNT: + 1. Hit it with a torch. + 2. Hit a gunpowder fuse trail that leads to TNT with a torch or + flint-and-steel. + 3. Activate it with mesecons (fastest way). + +For 1 TNT: +Node destruction radius is 3 nodes. +Player and object damage radius is 6 nodes. diff --git a/mods/minetest_game/tnt/init.lua b/mods/minetest_game/tnt/init.lua new file mode 100644 index 0000000..fd1f9e4 --- /dev/null +++ b/mods/minetest_game/tnt/init.lua @@ -0,0 +1,700 @@ +-- tnt/init.lua + +tnt = {} + +-- Load support for MT game translation. +local S = minetest.get_translator("tnt") + + +-- Default to enabled when in singleplayer +local enable_tnt = minetest.settings:get_bool("enable_tnt") +if enable_tnt == nil then + enable_tnt = minetest.is_singleplayer() +end + +-- loss probabilities array (one in X will be lost) +local loss_prob = {} + +loss_prob["default:cobble"] = 3 +loss_prob["default:dirt"] = 4 + +local tnt_radius = tonumber(minetest.settings:get("tnt_radius") or 3) + +-- Fill a list with data for content IDs, after all nodes are registered +local cid_data = {} +minetest.register_on_mods_loaded(function() + for name, def in pairs(minetest.registered_nodes) do + cid_data[minetest.get_content_id(name)] = { + name = name, + drops = def.drops, + flammable = def.groups.flammable, + on_blast = def.on_blast, + } + end +end) + +local function rand_pos(center, pos, radius) + local def + local reg_nodes = minetest.registered_nodes + local i = 0 + repeat + -- Give up and use the center if this takes too long + if i > 4 then + pos.x, pos.z = center.x, center.z + break + end + pos.x = center.x + math.random(-radius, radius) + pos.z = center.z + math.random(-radius, radius) + def = reg_nodes[minetest.get_node(pos).name] + i = i + 1 + until def and not def.walkable +end + +local function eject_drops(drops, pos, radius) + local drop_pos = vector.new(pos) + for _, item in pairs(drops) do + local count = math.min(item:get_count(), item:get_stack_max()) + while count > 0 do + local take = math.max(1,math.min(radius * radius, + count, + item:get_stack_max())) + rand_pos(pos, drop_pos, radius) + local dropitem = ItemStack(item) + dropitem:set_count(take) + local obj = minetest.add_item(drop_pos, dropitem) + if obj then + obj:get_luaentity().collect = true + obj:set_acceleration({x = 0, y = -10, z = 0}) + obj:set_velocity({x = math.random(-3, 3), + y = math.random(0, 10), + z = math.random(-3, 3)}) + end + count = count - take + end + end +end + +local function add_drop(drops, item) + item = ItemStack(item) + local name = item:get_name() + if loss_prob[name] ~= nil and math.random(1, loss_prob[name]) == 1 then + return + end + + local drop = drops[name] + if drop == nil then + drops[name] = item + else + drop:set_count(drop:get_count() + item:get_count()) + end +end + +local basic_flame_on_construct -- cached value +local function destroy(drops, npos, cid, c_air, c_fire, + on_blast_queue, on_construct_queue, + ignore_protection, ignore_on_blast, owner) + if not ignore_protection and minetest.is_protected(npos, owner) then + return cid + end + + local def = cid_data[cid] + + if not def then + return c_air + elseif not ignore_on_blast and def.on_blast then + on_blast_queue[#on_blast_queue + 1] = { + pos = vector.new(npos), + on_blast = def.on_blast + } + return cid + elseif def.flammable then + on_construct_queue[#on_construct_queue + 1] = { + fn = basic_flame_on_construct, + pos = vector.new(npos) + } + return c_fire + else + local node_drops = minetest.get_node_drops(def.name, "") + for _, item in pairs(node_drops) do + add_drop(drops, item) + end + return c_air + end +end + +local function calc_velocity(pos1, pos2, old_vel, power) + -- Avoid errors caused by a vector of zero length + if vector.equals(pos1, pos2) then + return old_vel + end + + local vel = vector.direction(pos1, pos2) + vel = vector.normalize(vel) + vel = vector.multiply(vel, power) + + -- Divide by distance + local dist = vector.distance(pos1, pos2) + dist = math.max(dist, 1) + vel = vector.divide(vel, dist) + + -- Add old velocity + vel = vector.add(vel, old_vel) + + -- randomize it a bit + vel = vector.add(vel, { + x = math.random() - 0.5, + y = math.random() - 0.5, + z = math.random() - 0.5, + }) + + -- Limit to terminal velocity + dist = vector.length(vel) + if dist > 250 then + vel = vector.divide(vel, dist / 250) + end + return vel +end + +local function entity_physics(pos, radius, drops) + local objs = minetest.get_objects_inside_radius(pos, radius) + for _, obj in pairs(objs) do + local obj_pos = obj:get_pos() + local dist = math.max(1, vector.distance(pos, obj_pos)) + + local damage = (4 / dist) * radius + if obj:is_player() then + local dir = vector.normalize(vector.subtract(obj_pos, pos)) + local moveoff = vector.multiply(dir, 2 / dist * radius) + obj:add_velocity(moveoff) + + obj:set_hp(obj:get_hp() - damage) + else + local luaobj = obj:get_luaentity() + + -- object might have disappeared somehow + if luaobj then + local do_damage = true + local do_knockback = true + local entity_drops = {} + local objdef = minetest.registered_entities[luaobj.name] + + if objdef and objdef.on_blast then + do_damage, do_knockback, entity_drops = objdef.on_blast(luaobj, damage) + end + + if do_knockback then + local obj_vel = obj:get_velocity() + obj:set_velocity(calc_velocity(pos, obj_pos, + obj_vel, radius * 10)) + end + if do_damage then + if not obj:get_armor_groups().immortal then + obj:punch(obj, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = damage}, + }, nil) + end + end + for _, item in pairs(entity_drops) do + add_drop(drops, item) + end + end + end + end +end + +local function add_effects(pos, radius, drops) + minetest.add_particle({ + pos = pos, + velocity = vector.new(), + acceleration = vector.new(), + expirationtime = 0.4, + size = radius * 10, + collisiondetection = false, + vertical = false, + texture = "tnt_boom.png", + glow = 15, + }) + minetest.add_particlespawner({ + amount = 64, + time = 0.5, + minpos = vector.subtract(pos, radius / 2), + maxpos = vector.add(pos, radius / 2), + minvel = {x = -10, y = -10, z = -10}, + maxvel = {x = 10, y = 10, z = 10}, + minacc = vector.new(), + maxacc = vector.new(), + minexptime = 1, + maxexptime = 2.5, + minsize = radius * 3, + maxsize = radius * 5, + texture = "tnt_smoke.png", + }) + + -- we just dropped some items. Look at the items entities and pick + -- one of them to use as texture + local texture = "tnt_blast.png" --fallback texture + local node + local most = 0 + for name, stack in pairs(drops) do + local count = stack:get_count() + if count > most then + most = count + local def = minetest.registered_nodes[name] + if def then + node = { name = name } + end + if def and def.tiles and def.tiles[1] then + texture = def.tiles[1] + end + end + end + + minetest.add_particlespawner({ + amount = 64, + time = 0.1, + minpos = vector.subtract(pos, radius / 2), + maxpos = vector.add(pos, radius / 2), + minvel = {x = -3, y = 0, z = -3}, + maxvel = {x = 3, y = 5, z = 3}, + minacc = {x = 0, y = -10, z = 0}, + maxacc = {x = 0, y = -10, z = 0}, + minexptime = 0.8, + maxexptime = 2.0, + minsize = radius * 0.33, + maxsize = radius, + texture = texture, + -- ^ only as fallback for clients without support for `node` parameter + node = node, + collisiondetection = true, + }) +end + +function tnt.burn(pos, nodename) + local name = nodename or minetest.get_node(pos).name + local def = minetest.registered_nodes[name] + if not def then + return + elseif def.on_ignite then + def.on_ignite(pos) + elseif minetest.get_item_group(name, "tnt") > 0 then + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.sound_play("tnt_ignite", {pos = pos}, true) + minetest.get_node_timer(pos):start(1) + end +end + +local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast, owner, explode_center) + pos = vector.round(pos) + -- scan for adjacent TNT nodes first, and enlarge the explosion + local vm1 = VoxelManip() + local p1 = vector.subtract(pos, 2) + local p2 = vector.add(pos, 2) + local minp, maxp = vm1:read_from_map(p1, p2) + local a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + local data = vm1:get_data() + local count = 0 + local c_tnt + local c_tnt_burning = minetest.get_content_id("tnt:tnt_burning") + local c_tnt_boom = minetest.get_content_id("tnt:boom") + local c_air = minetest.get_content_id("air") + if enable_tnt then + c_tnt = minetest.get_content_id("tnt:tnt") + else + c_tnt = c_tnt_burning -- tnt is not registered if disabled + end + -- make sure we still have explosion even when centre node isnt tnt related + if explode_center then + count = 1 + end + + for z = pos.z - 2, pos.z + 2 do + for y = pos.y - 2, pos.y + 2 do + local vi = a:index(pos.x - 2, y, z) + for x = pos.x - 2, pos.x + 2 do + local cid = data[vi] + if cid == c_tnt or cid == c_tnt_boom or cid == c_tnt_burning then + count = count + 1 + data[vi] = c_air + end + vi = vi + 1 + end + end + end + + vm1:set_data(data) + vm1:write_to_map() + + -- recalculate new radius + radius = math.floor(radius * math.pow(count, 1/3)) + + -- perform the explosion + local vm = VoxelManip() + local pr = PseudoRandom(os.time()) + p1 = vector.subtract(pos, radius) + p2 = vector.add(pos, radius) + minp, maxp = vm:read_from_map(p1, p2) + a = VoxelArea:new({MinEdge = minp, MaxEdge = maxp}) + data = vm:get_data() + + local drops = {} + local on_blast_queue = {} + local on_construct_queue = {} + basic_flame_on_construct = minetest.registered_nodes["fire:basic_flame"].on_construct + + local c_fire = minetest.get_content_id("fire:basic_flame") + for z = -radius, radius do + for y = -radius, radius do + local vi = a:index(pos.x + (-radius), pos.y + y, pos.z + z) + for x = -radius, radius do + local r = vector.length(vector.new(x, y, z)) + if (radius * radius) / (r * r) >= (pr:next(80, 125) / 100) then + local cid = data[vi] + local p = {x = pos.x + x, y = pos.y + y, z = pos.z + z} + if cid ~= c_air then + data[vi] = destroy(drops, p, cid, c_air, c_fire, + on_blast_queue, on_construct_queue, + ignore_protection, ignore_on_blast, owner) + end + end + vi = vi + 1 + end + end + end + + vm:set_data(data) + vm:write_to_map() + vm:update_map() + vm:update_liquids() + + -- call check_single_for_falling for everything within 1.5x blast radius + for y = -radius * 1.5, radius * 1.5 do + for z = -radius * 1.5, radius * 1.5 do + for x = -radius * 1.5, radius * 1.5 do + local rad = {x = x, y = y, z = z} + local s = vector.add(pos, rad) + local r = vector.length(rad) + if r / radius < 1.4 then + minetest.check_single_for_falling(s) + end + end + end + end + + for _, queued_data in pairs(on_blast_queue) do + local dist = math.max(1, vector.distance(queued_data.pos, pos)) + local intensity = (radius * radius) / (dist * dist) + local node_drops = queued_data.on_blast(queued_data.pos, intensity) + if node_drops then + for _, item in pairs(node_drops) do + add_drop(drops, item) + end + end + end + + for _, queued_data in pairs(on_construct_queue) do + queued_data.fn(queued_data.pos) + end + + minetest.log("action", "TNT owned by " .. owner .. " detonated at " .. + minetest.pos_to_string(pos) .. " with radius " .. radius) + + return drops, radius +end + +function tnt.boom(pos, def) + def = def or {} + def.radius = def.radius or 1 + def.damage_radius = def.damage_radius or def.radius * 2 + local meta = minetest.get_meta(pos) + local owner = meta:get_string("owner") + if not def.explode_center and def.ignore_protection ~= true then + minetest.set_node(pos, {name = "tnt:boom"}) + end + local sound = def.sound or "tnt_explode" + minetest.sound_play(sound, {pos = pos, gain = 2.5, + max_hear_distance = math.min(def.radius * 20, 128)}, true) + local drops, radius = tnt_explode(pos, def.radius, def.ignore_protection, + def.ignore_on_blast, owner, def.explode_center) + -- append entity drops + local damage_radius = (radius / math.max(1, def.radius)) * def.damage_radius + entity_physics(pos, damage_radius, drops) + if not def.disable_drops then + eject_drops(drops, pos, radius) + end + add_effects(pos, radius, drops) + minetest.log("action", "A TNT explosion occurred at " .. minetest.pos_to_string(pos) .. + " with radius " .. radius) +end + +minetest.register_node("tnt:boom", { + drawtype = "airlike", + inventory_image = "tnt_boom.png", + wield_image = "tnt_boom.png", + light_source = default.LIGHT_MAX, + walkable = false, + drop = "", + groups = {dig_immediate = 3, not_in_creative_inventory = 1}, + -- unaffected by explosions + on_blast = function() end, +}) + +minetest.register_node("tnt:gunpowder", { + description = S("Gun Powder"), + drawtype = "raillike", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + walkable = false, + tiles = { + "tnt_gunpowder_straight.png", + "tnt_gunpowder_curved.png", + "tnt_gunpowder_t_junction.png", + "tnt_gunpowder_crossing.png" + }, + inventory_image = "tnt_gunpowder_inventory.png", + wield_image = "tnt_gunpowder_inventory.png", + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + groups = {dig_immediate = 2, attached_node = 1, flammable = 5, + connect_to_raillike = minetest.raillike_group("gunpowder")}, + sounds = default.node_sound_leaves_defaults(), + + on_punch = function(pos, node, puncher) + if puncher:get_wielded_item():get_name() == "default:torch" then + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + minetest.log("action", puncher:get_player_name() .. + " ignites tnt:gunpowder at " .. + minetest.pos_to_string(pos)) + end + end, + on_blast = function(pos, intensity) + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + end, + on_burn = function(pos) + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + end, + on_ignite = function(pos, igniter) + minetest.set_node(pos, {name = "tnt:gunpowder_burning"}) + end, +}) + +minetest.register_node("tnt:gunpowder_burning", { + drawtype = "raillike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + light_source = 5, + tiles = {{ + name = "tnt_gunpowder_burning_straight_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_curved_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_t_junction_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + { + name = "tnt_gunpowder_burning_crossing_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }}, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + drop = "", + groups = { + dig_immediate = 2, + attached_node = 1, + connect_to_raillike = minetest.raillike_group("gunpowder"), + not_in_creative_inventory = 1 + }, + sounds = default.node_sound_leaves_defaults(), + on_timer = function(pos, elapsed) + for dx = -1, 1 do + for dz = -1, 1 do + if math.abs(dx) + math.abs(dz) == 1 then + for dy = -1, 1 do + tnt.burn({ + x = pos.x + dx, + y = pos.y + dy, + z = pos.z + dz, + }) + end + end + end + end + minetest.remove_node(pos) + end, + -- unaffected by explosions + on_blast = function() end, + on_construct = function(pos) + minetest.sound_play("tnt_gunpowder_burning", {pos = pos, + gain = 2}, true) + minetest.get_node_timer(pos):start(1) + end, +}) + +minetest.register_craft({ + output = "tnt:gunpowder 5", + type = "shapeless", + recipe = {"default:coal_lump", "default:gravel"} +}) + +minetest.register_craftitem("tnt:tnt_stick", { + description = S("TNT Stick"), + inventory_image = "tnt_tnt_stick.png", + groups = {flammable = 5}, +}) + +if enable_tnt then + minetest.register_craft({ + output = "tnt:tnt_stick 2", + recipe = { + {"tnt:gunpowder", "", "tnt:gunpowder"}, + {"tnt:gunpowder", "default:paper", "tnt:gunpowder"}, + {"tnt:gunpowder", "", "tnt:gunpowder"}, + } + }) + + minetest.register_craft({ + output = "tnt:tnt", + recipe = { + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"}, + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"}, + {"tnt:tnt_stick", "tnt:tnt_stick", "tnt:tnt_stick"} + } + }) + + minetest.register_abm({ + label = "TNT ignition", + nodenames = {"group:tnt", "tnt:gunpowder"}, + neighbors = {"fire:basic_flame", "default:lava_source", "default:lava_flowing"}, + interval = 4, + chance = 1, + action = function(pos, node) + tnt.burn(pos, node.name) + end, + }) +end + +function tnt.register_tnt(def) + local name + if not def.name:find(':') then + name = "tnt:" .. def.name + else + name = def.name + def.name = def.name:match(":([%w_]+)") + end + if not def.tiles then def.tiles = {} end + local tnt_top = def.tiles.top or def.name .. "_top.png" + local tnt_bottom = def.tiles.bottom or def.name .. "_bottom.png" + local tnt_side = def.tiles.side or def.name .. "_side.png" + local tnt_burning = def.tiles.burning or def.name .. "_top_burning_animated.png" + if not def.damage_radius then def.damage_radius = def.radius * 2 end + + if enable_tnt then + minetest.register_node(":" .. name, { + description = def.description, + tiles = {tnt_top, tnt_bottom, tnt_side}, + is_ground_content = false, + groups = {dig_immediate = 2, mesecon = 2, tnt = 1, flammable = 5}, + sounds = default.node_sound_wood_defaults(), + after_place_node = function(pos, placer) + if placer:is_player() then + local meta = minetest.get_meta(pos) + meta:set_string("owner", placer:get_player_name()) + end + end, + on_punch = function(pos, node, puncher) + if puncher:get_wielded_item():get_name() == "default:torch" then + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.registered_nodes[name .. "_burning"].on_construct(pos) + minetest.log("action", puncher:get_player_name() .. + " ignites " .. node.name .. " at " .. + minetest.pos_to_string(pos)) + end + end, + on_blast = function(pos, intensity) + minetest.after(0.1, function() + tnt.boom(pos, def) + end) + end, + mesecons = {effector = + {action_on = + function(pos) + tnt.boom(pos, def) + end + } + }, + on_burn = function(pos) + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.registered_nodes[name .. "_burning"].on_construct(pos) + end, + on_ignite = function(pos, igniter) + minetest.swap_node(pos, {name = name .. "_burning"}) + minetest.registered_nodes[name .. "_burning"].on_construct(pos) + end, + }) + end + + minetest.register_node(":" .. name .. "_burning", { + tiles = { + { + name = tnt_burning, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 1, + } + }, + tnt_bottom, tnt_side + }, + light_source = 5, + drop = "", + sounds = default.node_sound_wood_defaults(), + groups = {falling_node = 1, not_in_creative_inventory = 1}, + on_timer = function(pos, elapsed) + tnt.boom(pos, def) + end, + -- unaffected by explosions + on_blast = function() end, + on_construct = function(pos) + minetest.sound_play("tnt_ignite", {pos = pos}, true) + minetest.get_node_timer(pos):start(4) + minetest.check_for_falling(pos) + end, + }) +end + +tnt.register_tnt({ + name = "tnt:tnt", + description = S("TNT"), + radius = tnt_radius, +}) diff --git a/mods/minetest_game/tnt/license.txt b/mods/minetest_game/tnt/license.txt new file mode 100644 index 0000000..e59ec6e --- /dev/null +++ b/mods/minetest_game/tnt/license.txt @@ -0,0 +1,100 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 PilzAdam +Copyright (C) 2014-2016 ShadowNinja +Copyright (C) 2016 sofar (sofar@foo-projects.org) +Copyright (C) 2014-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + +=================================== + +Licenses of media +----------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2014-2016 ShadowNinja +Copyright (C) 2015-2016 Wuzzy +Copyright (C) 2016 sofar (sofar@foo-projects.org) +Copyright (C) 2018 paramat + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +==================================================== + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication +for audio files (found in sounds folder) +TumeniNodes +steveygos93 +theneedle.tv +frankelmedico + +No Copyright + +The person who associated a work with this deed has dedicated the work to the public domain +by waiving all of his or her rights to the work worldwide under copyright law, including all +related and neighboring rights, to the extent allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial purposes, all +without asking permission. See Other Information below. + +In no way are the patent or trademark rights of any person affected by CC0, nor are the +rights that other persons may have in the work or in how the work is used, such as publicity +or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this deed makes no +warranties about the work, and disclaims liability for all uses of the work, to the fullest +extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author or the affirmer. + +This license is acceptable for Free Cultural Works. +For more Information: +https://creativecommons.org/publicdomain/zero/1.0/ + diff --git a/mods/minetest_game/tnt/locale/template.txt b/mods/minetest_game/tnt/locale/template.txt new file mode 100644 index 0000000..62bcb15 --- /dev/null +++ b/mods/minetest_game/tnt/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder= +TNT Stick= +TNT= diff --git a/mods/minetest_game/tnt/locale/tnt.de.tr b/mods/minetest_game/tnt/locale/tnt.de.tr new file mode 100644 index 0000000..09d2ac2 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.de.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Schießpulver +TNT Stick=TNT-Stange +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.eo.tr b/mods/minetest_game/tnt/locale/tnt.eo.tr new file mode 100644 index 0000000..8624091 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.eo.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Pulvo +TNT Stick=Dinamita Bastono +TNT=Dinamito diff --git a/mods/minetest_game/tnt/locale/tnt.es.tr b/mods/minetest_game/tnt/locale/tnt.es.tr new file mode 100644 index 0000000..d9f3f20 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.es.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Pólvora +TNT Stick=Cartucho de TNT +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.fr.tr b/mods/minetest_game/tnt/locale/tnt.fr.tr new file mode 100644 index 0000000..3fe48fb --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.fr.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Poudre à canon +TNT Stick=Bâton de TNT +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.id.tr b/mods/minetest_game/tnt/locale/tnt.id.tr new file mode 100644 index 0000000..2652ae0 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.id.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Bubuk Mesiu +TNT Stick=Tongkat TNT +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.it.tr b/mods/minetest_game/tnt/locale/tnt.it.tr new file mode 100644 index 0000000..6437c00 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.it.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Polvere da sparo +TNT Stick=Candelotto di TNT +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.jbo.tr b/mods/minetest_game/tnt/locale/tnt.jbo.tr new file mode 100644 index 0000000..b1b425a --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.jbo.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=lo tercelpu'o +TNT Stick=lo granrti'enti +TNT=lo bamrti'enti diff --git a/mods/minetest_game/tnt/locale/tnt.ms.tr b/mods/minetest_game/tnt/locale/tnt.ms.tr new file mode 100644 index 0000000..c4c5fdd --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.ms.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Serbuk Senjata Api +TNT Stick=Batang TNT +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.pt_BR.tr b/mods/minetest_game/tnt/locale/tnt.pt_BR.tr new file mode 100644 index 0000000..d4fc174 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.pt_BR.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Pólvora +TNT Stick=Banana de Dinamite +TNT=Dinamite diff --git a/mods/minetest_game/tnt/locale/tnt.ru.tr b/mods/minetest_game/tnt/locale/tnt.ru.tr new file mode 100644 index 0000000..a8cee43 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.ru.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Порох +TNT Stick=Тротиловая Палка +TNT=Тротил diff --git a/mods/minetest_game/tnt/locale/tnt.se.tr b/mods/minetest_game/tnt/locale/tnt.se.tr new file mode 100644 index 0000000..fd08913 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.se.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Krut +TNT Stick=Dynamitpinne +TNT=Dynamit diff --git a/mods/minetest_game/tnt/locale/tnt.sk.tr b/mods/minetest_game/tnt/locale/tnt.sk.tr new file mode 100644 index 0000000..639b8c8 --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.sk.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=Pušný prach +TNT Stick=Časť TNT +TNT=TNT diff --git a/mods/minetest_game/tnt/locale/tnt.zh_CN.tr b/mods/minetest_game/tnt/locale/tnt.zh_CN.tr new file mode 100644 index 0000000..0a3294e --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=火药粉 +TNT Stick=炸药棒 +TNT=炸药包 diff --git a/mods/minetest_game/tnt/locale/tnt.zh_TW.tr b/mods/minetest_game/tnt/locale/tnt.zh_TW.tr new file mode 100644 index 0000000..c1b3caf --- /dev/null +++ b/mods/minetest_game/tnt/locale/tnt.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: tnt +Gun Powder=火藥粉 +TNT Stick=炸藥棒 +TNT=炸藥包 diff --git a/mods/minetest_game/tnt/mod.conf b/mods/minetest_game/tnt/mod.conf new file mode 100644 index 0000000..9385e82 --- /dev/null +++ b/mods/minetest_game/tnt/mod.conf @@ -0,0 +1,3 @@ +name = tnt +description = Minetest Game mod: tnt +depends = default, fire diff --git a/mods/minetest_game/tnt/sounds/tnt_explode.ogg b/mods/minetest_game/tnt/sounds/tnt_explode.ogg new file mode 100644 index 0000000..e00a16c Binary files /dev/null and b/mods/minetest_game/tnt/sounds/tnt_explode.ogg differ diff --git a/mods/minetest_game/tnt/sounds/tnt_gunpowder_burning.ogg b/mods/minetest_game/tnt/sounds/tnt_gunpowder_burning.ogg new file mode 100644 index 0000000..8581c2d Binary files /dev/null and b/mods/minetest_game/tnt/sounds/tnt_gunpowder_burning.ogg differ diff --git a/mods/minetest_game/tnt/sounds/tnt_ignite.ogg b/mods/minetest_game/tnt/sounds/tnt_ignite.ogg new file mode 100644 index 0000000..1a7062e Binary files /dev/null and b/mods/minetest_game/tnt/sounds/tnt_ignite.ogg differ diff --git a/mods/minetest_game/tnt/textures/tnt_blast.png b/mods/minetest_game/tnt/textures/tnt_blast.png new file mode 100644 index 0000000..92be28b Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_blast.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_boom.png b/mods/minetest_game/tnt/textures/tnt_boom.png new file mode 100644 index 0000000..c848bfc Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_boom.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_bottom.png b/mods/minetest_game/tnt/textures/tnt_bottom.png new file mode 100755 index 0000000..b68c741 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_bottom.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_crossing_animated.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_crossing_animated.png new file mode 100644 index 0000000..efab2a9 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_crossing_animated.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_curved_animated.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_curved_animated.png new file mode 100644 index 0000000..bd1437f Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_curved_animated.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_straight_animated.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_straight_animated.png new file mode 100644 index 0000000..654e539 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_straight_animated.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png new file mode 100644 index 0000000..5b567e3 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_burning_t_junction_animated.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_crossing.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_crossing.png new file mode 100644 index 0000000..c0487a0 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_crossing.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_curved.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_curved.png new file mode 100644 index 0000000..8ed01db Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_curved.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_inventory.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_inventory.png new file mode 100755 index 0000000..2712786 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_inventory.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_straight.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_straight.png new file mode 100644 index 0000000..427feb9 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_straight.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_gunpowder_t_junction.png b/mods/minetest_game/tnt/textures/tnt_gunpowder_t_junction.png new file mode 100644 index 0000000..b30c2b4 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_gunpowder_t_junction.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_side.png b/mods/minetest_game/tnt/textures/tnt_side.png new file mode 100755 index 0000000..07f7bae Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_side.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_smoke.png b/mods/minetest_game/tnt/textures/tnt_smoke.png new file mode 100644 index 0000000..6788974 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_smoke.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_tnt_stick.png b/mods/minetest_game/tnt/textures/tnt_tnt_stick.png new file mode 100644 index 0000000..bc47a29 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_tnt_stick.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_top.png b/mods/minetest_game/tnt/textures/tnt_top.png new file mode 100755 index 0000000..b4a3ce3 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_top.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_top_burning.png b/mods/minetest_game/tnt/textures/tnt_top_burning.png new file mode 100644 index 0000000..fc0d490 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_top_burning.png differ diff --git a/mods/minetest_game/tnt/textures/tnt_top_burning_animated.png b/mods/minetest_game/tnt/textures/tnt_top_burning_animated.png new file mode 100755 index 0000000..b4a3ce3 Binary files /dev/null and b/mods/minetest_game/tnt/textures/tnt_top_burning_animated.png differ diff --git a/mods/minetest_game/vessels/README.txt b/mods/minetest_game/vessels/README.txt new file mode 100644 index 0000000..a54e330 --- /dev/null +++ b/mods/minetest_game/vessels/README.txt @@ -0,0 +1,22 @@ +Minetest Game mod: vessels +========================== +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Vanessa Ezekowitz (LGPLv2.1+) +Modified by Perttu Ahola (LGPLv2.1+) +Various Minetest developers and contributors (LGPLv2.1+) + +Authors of media (textures) +--------------------------- +All not listed below, Vanessa Ezekowitz (CC BY-SA 3.0) + +The following textures were modified by Thomas-S (CC BY-SA 3.0): + vessels_drinking_glass.png + vessels_drinking_glass_inv.png + vessels_glass_bottle.png + vessels_steel_bottle.png + +The following texture was created by Wuzzy (CC BY-SA 3.0): + vessels_shelf_slot.png (based on vessels_glass_bottle.png) diff --git a/mods/minetest_game/vessels/init.lua b/mods/minetest_game/vessels/init.lua new file mode 100644 index 0000000..d15efb5 --- /dev/null +++ b/mods/minetest_game/vessels/init.lua @@ -0,0 +1,274 @@ +-- vessels/init.lua + +-- Minetest 0.4 mod: vessels +-- See README.txt for licensing and other information. + +-- Load support for MT game translation. +local S = minetest.get_translator("vessels") + + +local vessels_shelf_formspec = + "size[8,7;]" .. + "list[context;vessels;0,0.3;8,2;]" .. + "list[current_player;main;0,2.85;8,1;]" .. + "list[current_player;main;0,4.08;8,3;8]" .. + "listring[context;vessels]" .. + "listring[current_player;main]" .. + default.get_hotbar_bg(0, 2.85) + +local function update_vessels_shelf(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local invlist = inv:get_list("vessels") + + local formspec = vessels_shelf_formspec + -- Inventory slots overlay + local vx, vy = 0, 0.3 + local n_items = 0 + for i = 1, 16 do + if i == 9 then + vx = 0 + vy = vy + 1 + end + if not invlist or invlist[i]:is_empty() then + formspec = formspec .. + "image[" .. vx .. "," .. vy .. ";1,1;vessels_shelf_slot.png]" + else + local stack = invlist[i] + if not stack:is_empty() then + n_items = n_items + stack:get_count() + end + end + vx = vx + 1 + end + meta:set_string("formspec", formspec) + if n_items == 0 then + meta:set_string("infotext", S("Empty Vessels Shelf")) + else + meta:set_string("infotext", S("Vessels Shelf (@1 items)", n_items)) + end +end + +minetest.register_node("vessels:shelf", { + description = S("Vessels Shelf"), + tiles = {"default_wood.png", "default_wood.png", "default_wood.png", + "default_wood.png", "vessels_shelf.png", "vessels_shelf.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + update_vessels_shelf(pos) + local inv = meta:get_inventory() + inv:set_size("vessels", 8 * 2) + end, + can_dig = function(pos,player) + local inv = minetest.get_meta(pos):get_inventory() + return inv:is_empty("vessels") + end, + allow_metadata_inventory_put = function(pos, listname, index, stack, player) + if minetest.get_item_group(stack:get_name(), "vessel") ~= 0 then + return stack:get_count() + end + return 0 + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name() .. + " moves stuff in vessels shelf at ".. minetest.pos_to_string(pos)) + update_vessels_shelf(pos) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " moves stuff to vessels shelf at ".. minetest.pos_to_string(pos)) + update_vessels_shelf(pos) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name() .. + " takes stuff from vessels shelf at ".. minetest.pos_to_string(pos)) + update_vessels_shelf(pos) + end, + on_blast = function(pos) + local drops = {} + default.get_inventory_drops(pos, "vessels", drops) + drops[#drops + 1] = "vessels:shelf" + minetest.remove_node(pos) + return drops + end, +}) + +minetest.register_craft({ + output = "vessels:shelf", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"group:vessel", "group:vessel", "group:vessel"}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + +minetest.register_node("vessels:glass_bottle", { + description = S("Empty Glass Bottle"), + drawtype = "plantlike", + tiles = {"vessels_glass_bottle.png"}, + inventory_image = "vessels_glass_bottle.png", + wield_image = "vessels_glass_bottle.png", + paramtype = "light", + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft( { + output = "vessels:glass_bottle 10", + recipe = { + {"default:glass", "", "default:glass"}, + {"default:glass", "", "default:glass"}, + {"", "default:glass", ""} + } +}) + +minetest.register_node("vessels:drinking_glass", { + description = S("Empty Drinking Glass"), + drawtype = "plantlike", + tiles = {"vessels_drinking_glass.png"}, + inventory_image = "vessels_drinking_glass_inv.png", + wield_image = "vessels_drinking_glass.png", + paramtype = "light", + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft( { + output = "vessels:drinking_glass 14", + recipe = { + {"default:glass", "", "default:glass"}, + {"default:glass", "", "default:glass"}, + {"default:glass", "default:glass", "default:glass"} + } +}) + +minetest.register_node("vessels:steel_bottle", { + description = S("Empty Heavy Steel Bottle"), + drawtype = "plantlike", + tiles = {"vessels_steel_bottle.png"}, + inventory_image = "vessels_steel_bottle.png", + wield_image = "vessels_steel_bottle.png", + paramtype = "light", + is_ground_content = false, + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_defaults(), +}) + +minetest.register_craft( { + output = "vessels:steel_bottle 5", + recipe = { + {"default:steel_ingot", "", "default:steel_ingot"}, + {"default:steel_ingot", "", "default:steel_ingot"}, + {"", "default:steel_ingot", ""} + } +}) + + +-- Glass and steel recycling + +minetest.register_craftitem("vessels:glass_fragments", { + description = S("Glass Fragments"), + inventory_image = "vessels_glass_fragments.png", +}) + +minetest.register_craft( { + type = "shapeless", + output = "vessels:glass_fragments", + recipe = { + "vessels:glass_bottle", + "vessels:glass_bottle", + }, +}) + +minetest.register_craft( { + type = "shapeless", + output = "vessels:glass_fragments", + recipe = { + "vessels:drinking_glass", + "vessels:drinking_glass", + }, +}) + +minetest.register_craft({ + type = "cooking", + output = "default:glass", + recipe = "vessels:glass_fragments", +}) + +minetest.register_craft( { + type = "cooking", + output = "default:steel_ingot", + recipe = "vessels:steel_bottle", +}) + +minetest.register_craft({ + type = "fuel", + recipe = "vessels:shelf", + burntime = 30, +}) + +-- Register glass fragments as dungeon loot +if minetest.global_exists("dungeon_loot") then + dungeon_loot.register({ + name = "vessels:glass_fragments", chance = 0.35, count = {1, 4} + }) +end + +-- Rose Vase + +if minetest.get_modpath("flowers") ~= nil then + + minetest.register_node("vessels:rose_vase", { + description = S("Rose on a vase"), + drawtype = "plantlike", + tiles = {"vessels_rose_vase.png"}, + walkable = false, + groups = {cracky = 2, attached_node = 1}, + drop = "vessels:rose_vase", + --paramtype = "light", + sunlight_propagates = false, + --light_source = LIGHT_MAX - 1, + sounds = default.node_sound_glass_defaults(), + inventory_image = "vessels_rose_vase.png", + selection_box = { + type = "fixed", + fixed = { -0.25, -0.5, -0.25, 0.25, 0.4, 0.25 }, + }, + + after_place_node = function(pos, placer, itemstack) + minetest.set_node(pos, {name = "vessels:rose_vase", param2 = 1}) + end, + }) + + minetest.register_craft({ + type = "shaped", + output = "vessels:rose_vase", + recipe = { + {"", "", ""}, + {"", "flowers:rose", ""}, + {"", "vessels:glass_bottle", ""}, + } + }) +end diff --git a/mods/minetest_game/vessels/license.txt b/mods/minetest_game/vessels/license.txt new file mode 100644 index 0000000..de16a3b --- /dev/null +++ b/mods/minetest_game/vessels/license.txt @@ -0,0 +1,52 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2012-2016 Vanessa Ezekowitz +Copyright (C) 2012-2016 celeron55, Perttu Ahola +Copyright (C) 2012-2016 Various Minetest developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Vanessa Ezekowitz +Copyright (C) 2016 Thomas-S + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/vessels/locale/template.txt b/mods/minetest_game/vessels/locale/template.txt new file mode 100644 index 0000000..e6e5f69 --- /dev/null +++ b/mods/minetest_game/vessels/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf= +Vessels Shelf (@1 items)= +Vessels Shelf= +Empty Glass Bottle= +Empty Drinking Glass= +Empty Heavy Steel Bottle= +Glass Fragments= diff --git a/mods/minetest_game/vessels/locale/vessels.de.tr b/mods/minetest_game/vessels/locale/vessels.de.tr new file mode 100644 index 0000000..162e359 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.de.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Leeres Gefäßregal +Vessels Shelf (@1 items)=Gefäßregal (@1 Gegenstände) +Vessels Shelf=Gefäßregal +Empty Glass Bottle=Leere Glasflasche +Empty Drinking Glass=Leeres Trinkglas +Empty Heavy Steel Bottle=Leere schwere Stahlflasche +Glass Fragments=Glasfragmente diff --git a/mods/minetest_game/vessels/locale/vessels.eo.tr b/mods/minetest_game/vessels/locale/vessels.eo.tr new file mode 100644 index 0000000..c6f9af7 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.eo.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Malplena Vaza Plataĵo +Vessels Shelf (@1 items)=Vaza Plataĵo (@1 objektoj) +Vessels Shelf=Vaza Plataĵo +Empty Glass Bottle=Malplena Vitra Botelo +Empty Drinking Glass=Malplena Glaso por Trinkado +Empty Heavy Steel Bottle=Malplena Peza Ŝtala Botelo +Glass Fragments=Vitra Eroj diff --git a/mods/minetest_game/vessels/locale/vessels.es.tr b/mods/minetest_game/vessels/locale/vessels.es.tr new file mode 100644 index 0000000..3e672a9 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.es.tr @@ -0,0 +1,9 @@ +# textdomain: vessels +Empty Vessels Shelf=Estante de vasijas vacío +Vessels Shelf (@1 items)=Estante de vasijas (@1 objetos) +Vessels Shelf=Estante de vasijas +Empty Glass Bottle=Botella de vidrio vacía +Empty Drinking Glass=Vaso para beber vacío +Empty Heavy Steel Bottle=Botella de acero vacía +Glass Fragments=Fragmentos de vidrio +Rose on a vase=Rosa en jarrón diff --git a/mods/minetest_game/vessels/locale/vessels.fr.tr b/mods/minetest_game/vessels/locale/vessels.fr.tr new file mode 100644 index 0000000..f099c19 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.fr.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Etagère à récipient vide +Vessels Shelf (@1 items)=Etagère à récipient (@1 articles) +Vessels Shelf=Etagère à récipient +Empty Glass Bottle=Bouteille de verre vide +Empty Drinking Glass=Verre vide +Empty Heavy Steel Bottle=Bouteille d'acier lourde vide +Glass Fragments=Fragments de verre diff --git a/mods/minetest_game/vessels/locale/vessels.id.tr b/mods/minetest_game/vessels/locale/vessels.id.tr new file mode 100644 index 0000000..f80fbc3 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.id.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Rak Bejana Kosong +Vessels Shelf (@1 items)=Rak Bejana (@1 barang) +Vessels Shelf=Rak Bejana +Empty Glass Bottle=Botol Kaca Kosong +Empty Drinking Glass=Gelas Minum Kosong +Empty Heavy Steel Bottle=Botol Baja Berat Kosong +Glass Fragments=Pecahan Kaca diff --git a/mods/minetest_game/vessels/locale/vessels.it.tr b/mods/minetest_game/vessels/locale/vessels.it.tr new file mode 100644 index 0000000..70ea575 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.it.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Scaffale per contenitori vuoto +Vessels Shelf (@1 items)=Scaffale per contenitori (@1 oggetti) +Vessels Shelf=Scaffale per contenitori +Empty Glass Bottle=Bottiglia di vetro vuota +Empty Drinking Glass=Bicchiere di vetro vuoto +Empty Heavy Steel Bottle=Bottigia di metallo pesante vuota +Glass Fragments=Frammenti di vetro diff --git a/mods/minetest_game/vessels/locale/vessels.jbo.tr b/mods/minetest_game/vessels/locale/vessels.jbo.tr new file mode 100644 index 0000000..6e1145e --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.jbo.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=.i ti kunti ke vasru kajna +Vessels Shelf (@1 items)=.i lo ti vasru kajna cu vasru lo @1 dacti +Vessels Shelf=lo vasru kajna +Empty Glass Bottle=lo blacybo'i be no da +Empty Drinking Glass=lo blacykabri be no da +Empty Heavy Steel Bottle=lo tilju ke gasta botpi be no da +Glass Fragments=lo derxi be lo blaci spisa diff --git a/mods/minetest_game/vessels/locale/vessels.ms.tr b/mods/minetest_game/vessels/locale/vessels.ms.tr new file mode 100644 index 0000000..da7a0f0 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.ms.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Rak Bekas Kaca Kosong +Vessels Shelf (@1 items)=Rak Bekas Kaca (@1 barang) +Vessels Shelf=Rak Bekas Kaca +Empty Glass Bottle=Botol Kaca Kosong +Empty Drinking Glass=Gelas Minuman Kosong +Empty Heavy Steel Bottle=Botol Keluli Berat Kosong +Glass Fragments=Serpihan Kaca diff --git a/mods/minetest_game/vessels/locale/vessels.pt_BR.tr b/mods/minetest_game/vessels/locale/vessels.pt_BR.tr new file mode 100644 index 0000000..c22cb06 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.pt_BR.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Prateleira de Vasos Vazia +Vessels Shelf (@1 items)=Prateleira de Vasos (@1 itens) +Vessels Shelf=Prateleira de Vasos +Empty Glass Bottle=Garrafa de Vidro Vazia +Empty Drinking Glass=Copo Vazio +Empty Heavy Steel Bottle=Garrafa de Aço Pesada Vazia +Glass Fragments=Cacos de Vidro diff --git a/mods/minetest_game/vessels/locale/vessels.ru.tr b/mods/minetest_game/vessels/locale/vessels.ru.tr new file mode 100644 index 0000000..070d884 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.ru.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Полка с Пустыми Сосудами +Vessels Shelf (@1 items)=Полка с Сосудами (@1 предметы) +Vessels Shelf=Полка с Сосудами +Empty Glass Bottle=Пустая Стеклянная Бутылка +Empty Drinking Glass=Пустая Питьевая Бутылка +Empty Heavy Steel Bottle=Пустая Стальная Бутылка +Glass Fragments=Стеклянные Осколки diff --git a/mods/minetest_game/vessels/locale/vessels.se.tr b/mods/minetest_game/vessels/locale/vessels.se.tr new file mode 100644 index 0000000..a7c3a98 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.se.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Tom Fartygshylla +Vessels Shelf (@1 items)=Fartygshylla (@1 saker) +Vessels Shelf=Fartygshylla +Empty Glass Bottle=Tom Glasflska +Empty Drinking Glass=Tom Drycksflaska +Empty Heavy Steel Bottle=Tom Tung Stål Flaska +Glass Fragments=Glasbitar diff --git a/mods/minetest_game/vessels/locale/vessels.sk.tr b/mods/minetest_game/vessels/locale/vessels.sk.tr new file mode 100644 index 0000000..6ec640b --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.sk.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=Prázdna polica na fľašky +Vessels Shelf (@1 items)=Polica na fľašky (@1 položka/y) +Vessels Shelf=Polica na fľašky +Empty Glass Bottle=Prázdna sklenená fľaša +Empty Drinking Glass=Prázdny pohár na pitie +Empty Heavy Steel Bottle=Prázdna oceľová fľaša +Glass Fragments=Časti skla diff --git a/mods/minetest_game/vessels/locale/vessels.zh_CN.tr b/mods/minetest_game/vessels/locale/vessels.zh_CN.tr new file mode 100644 index 0000000..e303e24 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.zh_CN.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=空容器架 +Vessels Shelf (@1 items)=容器架(@1项) +Vessels Shelf=容器架 +Empty Glass Bottle=空玻璃瓶 +Empty Drinking Glass=空水杯 +Empty Heavy Steel Bottle=空重型钢瓶 +Glass Fragments=玻璃碎片 diff --git a/mods/minetest_game/vessels/locale/vessels.zh_TW.tr b/mods/minetest_game/vessels/locale/vessels.zh_TW.tr new file mode 100644 index 0000000..6aecb35 --- /dev/null +++ b/mods/minetest_game/vessels/locale/vessels.zh_TW.tr @@ -0,0 +1,8 @@ +# textdomain: vessels +Empty Vessels Shelf=空容器架 +Vessels Shelf (@1 items)=容器架(@1項) +Vessels Shelf=容器架 +Empty Glass Bottle=空玻璃瓶 +Empty Drinking Glass=空水杯 +Empty Heavy Steel Bottle=空重型鋼瓶 +Glass Fragments=玻璃碎片 diff --git a/mods/minetest_game/vessels/mod.conf b/mods/minetest_game/vessels/mod.conf new file mode 100644 index 0000000..eba9076 --- /dev/null +++ b/mods/minetest_game/vessels/mod.conf @@ -0,0 +1,4 @@ +name = vessels +description = Minetest Game mod: vessels +depends = default +optional_depends = dungeon_loot diff --git a/mods/minetest_game/vessels/textures/vessels_drinking_glass.png b/mods/minetest_game/vessels/textures/vessels_drinking_glass.png new file mode 100755 index 0000000..152b425 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_drinking_glass.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_drinking_glass_inv.png b/mods/minetest_game/vessels/textures/vessels_drinking_glass_inv.png new file mode 100755 index 0000000..bd4e17a Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_drinking_glass_inv.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_glass_bottle.png b/mods/minetest_game/vessels/textures/vessels_glass_bottle.png new file mode 100755 index 0000000..dacd722 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_glass_bottle.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_glass_bottle_inv.png b/mods/minetest_game/vessels/textures/vessels_glass_bottle_inv.png new file mode 100755 index 0000000..6709bb7 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_glass_bottle_inv.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_glass_fragments.png b/mods/minetest_game/vessels/textures/vessels_glass_fragments.png new file mode 100755 index 0000000..696dc6a Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_glass_fragments.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_rose_vase.png b/mods/minetest_game/vessels/textures/vessels_rose_vase.png new file mode 100644 index 0000000..30691a5 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_rose_vase.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_shelf.png b/mods/minetest_game/vessels/textures/vessels_shelf.png new file mode 100755 index 0000000..2deab67 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_shelf.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_shelf_slot.png b/mods/minetest_game/vessels/textures/vessels_shelf_slot.png new file mode 100755 index 0000000..c9d1ff7 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_shelf_slot.png differ diff --git a/mods/minetest_game/vessels/textures/vessels_steel_bottle.png b/mods/minetest_game/vessels/textures/vessels_steel_bottle.png new file mode 100755 index 0000000..4a3a7c6 Binary files /dev/null and b/mods/minetest_game/vessels/textures/vessels_steel_bottle.png differ diff --git a/mods/minetest_game/walls/README.txt b/mods/minetest_game/walls/README.txt new file mode 100644 index 0000000..ba33bd7 --- /dev/null +++ b/mods/minetest_game/walls/README.txt @@ -0,0 +1,7 @@ +Minetest Game mod: walls +======================== +See license.txt for license information. + +Authors of source code +---------------------- +Auke Kok (LGPLv2.1+) diff --git a/mods/minetest_game/walls/init.lua b/mods/minetest_game/walls/init.lua new file mode 100644 index 0000000..b2a163f --- /dev/null +++ b/mods/minetest_game/walls/init.lua @@ -0,0 +1,67 @@ +-- walls/init.lua + +walls = {} + +local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0 + +-- Load support for MT game translation. +local S = minetest.get_translator("walls") + +walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds) + --make wall_texture_table paramenter backwards compatible for mods passing single texture + if type(wall_texture_table) ~= "table" then + wall_texture_table = { wall_texture_table } + end + -- inventory node, and pole-type wall start item + minetest.register_node(wall_name, { + description = wall_desc, + drawtype = "nodebox", + node_box = { + type = "connected", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}, + -- connect_bottom = + connect_front = {-3/16, -1/2, -1/2, 3/16, 3/8, -1/4}, + connect_left = {-1/2, -1/2, -3/16, -1/4, 3/8, 3/16}, + connect_back = {-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}, + connect_right = { 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}, + }, + collision_box = { + type = "connected", + fixed = {-1/4, -1/2, -1/4, 1/4, 1/2 + fence_collision_extra, 1/4}, + -- connect_top = + -- connect_bottom = + connect_front = {-1/4,-1/2,-1/2,1/4,1/2 + fence_collision_extra,-1/4}, + connect_left = {-1/2,-1/2,-1/4,-1/4,1/2 + fence_collision_extra,1/4}, + connect_back = {-1/4,-1/2,1/4,1/4,1/2 + fence_collision_extra,1/2}, + connect_right = {1/4,-1/2,-1/4,1/2,1/2 + fence_collision_extra,1/4}, + }, + connects_to = { "group:wall", "group:stone", "group:fence" }, + paramtype = "light", + is_ground_content = false, + tiles = wall_texture_table, + walkable = true, + groups = { cracky = 3, wall = 1, stone = 2 }, + sounds = wall_sounds, + }) + + -- crafting recipe + minetest.register_craft({ + output = wall_name .. " 6", + recipe = { + { "", "", "" }, + { wall_mat, wall_mat, wall_mat}, + { wall_mat, wall_mat, wall_mat}, + } + }) + +end + +walls.register("walls:cobble", S("Cobblestone Wall"), {"default_cobble.png"}, + "default:cobble", default.node_sound_stone_defaults()) + +walls.register("walls:mossycobble", S("Mossy Cobblestone Wall"), {"default_mossycobble.png"}, + "default:mossycobble", default.node_sound_stone_defaults()) + +walls.register("walls:desertcobble", S("Desert Cobblestone Wall"), {"default_desert_cobble.png"}, + "default:desert_cobble", default.node_sound_stone_defaults()) + diff --git a/mods/minetest_game/walls/license.txt b/mods/minetest_game/walls/license.txt new file mode 100644 index 0000000..ccfaf1c --- /dev/null +++ b/mods/minetest_game/walls/license.txt @@ -0,0 +1,14 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2015 Auke Kok + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html diff --git a/mods/minetest_game/walls/locale/template.txt b/mods/minetest_game/walls/locale/template.txt new file mode 100644 index 0000000..6721dc6 --- /dev/null +++ b/mods/minetest_game/walls/locale/template.txt @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall= +Mossy Cobblestone Wall= +Desert Cobblestone Wall= diff --git a/mods/minetest_game/walls/locale/walls.de.tr b/mods/minetest_game/walls/locale/walls.de.tr new file mode 100644 index 0000000..c31d4f6 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.de.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Kopfsteinpflastermauer +Mossy Cobblestone Wall=Moosige Kopfsteinpflastermauer +Desert Cobblestone Wall=Wüstenkopfsteinpflastermauer diff --git a/mods/minetest_game/walls/locale/walls.eo.tr b/mods/minetest_game/walls/locale/walls.eo.tr new file mode 100644 index 0000000..85efcbf --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.eo.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Pavimŝtona Muro +Mossy Cobblestone Wall=Muska Pavimŝtona Muro +Desert Cobblestone Wall=Dezerta Pavimŝtona Muro diff --git a/mods/minetest_game/walls/locale/walls.es.tr b/mods/minetest_game/walls/locale/walls.es.tr new file mode 100644 index 0000000..796710f --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.es.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Pared de adoquines +Mossy Cobblestone Wall=Pared de adoquines musgosos +Desert Cobblestone Wall=Pared de adoquines desérticos diff --git a/mods/minetest_game/walls/locale/walls.fr.tr b/mods/minetest_game/walls/locale/walls.fr.tr new file mode 100644 index 0000000..8dcb625 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.fr.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Mur en pavé +Mossy Cobblestone Wall=Mur en pavé moussu +Desert Cobblestone Wall=Mur en pavé du désert diff --git a/mods/minetest_game/walls/locale/walls.id.tr b/mods/minetest_game/walls/locale/walls.id.tr new file mode 100644 index 0000000..8bfd9c7 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.id.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Tembok Bongkahan Batu +Mossy Cobblestone Wall=Tembok Bongkahan Batu Berlumut +Desert Cobblestone Wall=Tembok Bongkahan Batu Gurun diff --git a/mods/minetest_game/walls/locale/walls.it.tr b/mods/minetest_game/walls/locale/walls.it.tr new file mode 100644 index 0000000..4babad2 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.it.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Muro di ciottoli +Mossy Cobblestone Wall=Muro di ciottoli muschiosi +Desert Cobblestone Wall=Muro di ciottoli del deserto diff --git a/mods/minetest_game/walls/locale/walls.jbo.tr b/mods/minetest_game/walls/locale/walls.jbo.tr new file mode 100644 index 0000000..aba765c --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.jbo.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=lo lolro'iboi bitmu +Mossy Cobblestone Wall=lo clika lolro'iboi bitmu +Desert Cobblestone Wall=lo cantu'a lolro'iboi bitmu diff --git a/mods/minetest_game/walls/locale/walls.ms.tr b/mods/minetest_game/walls/locale/walls.ms.tr new file mode 100644 index 0000000..9375342 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.ms.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Pagar Batu Buntar +Mossy Cobblestone Wall=Pagar Batu Buntar Berlumut +Desert Cobblestone Wall=Pagar Batu Buntar Gurun diff --git a/mods/minetest_game/walls/locale/walls.pt_BR.tr b/mods/minetest_game/walls/locale/walls.pt_BR.tr new file mode 100644 index 0000000..58c3d12 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.pt_BR.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Parede de Paralelepípedo +Mossy Cobblestone Wall=Parede de Paralelepípedo com Musgo +Desert Cobblestone Wall=Parede de Paralelepípedo do Deserto diff --git a/mods/minetest_game/walls/locale/walls.ru.tr b/mods/minetest_game/walls/locale/walls.ru.tr new file mode 100644 index 0000000..1ed653f --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.ru.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Булыжниковая Ограда +Mossy Cobblestone Wall=Мшистая Булыжниковая Ограда +Desert Cobblestone Wall=Ограда Из Пустынного Булыжника diff --git a/mods/minetest_game/walls/locale/walls.se.tr b/mods/minetest_game/walls/locale/walls.se.tr new file mode 100644 index 0000000..3258946 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.se.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Kullerstens Vägg +Mossy Cobblestone Wall=Mossig Kullerstens Vägg +Desert Cobblestone Wall=Öken Kullerstens Vägg diff --git a/mods/minetest_game/walls/locale/walls.sk.tr b/mods/minetest_game/walls/locale/walls.sk.tr new file mode 100644 index 0000000..69cf3a9 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.sk.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=Múr z dlažbových kociek +Mossy Cobblestone Wall=Múr z dlažbových kociek obrastených machom +Desert Cobblestone Wall=Múr z púštnych dlažbových kociek diff --git a/mods/minetest_game/walls/locale/walls.zh_CN.tr b/mods/minetest_game/walls/locale/walls.zh_CN.tr new file mode 100644 index 0000000..f590e82 --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.zh_CN.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=鹅卵石墙 +Mossy Cobblestone Wall=苔藓覆盖的鹅卵石墙 +Desert Cobblestone Wall=沙漠鹅卵石墙 diff --git a/mods/minetest_game/walls/locale/walls.zh_TW.tr b/mods/minetest_game/walls/locale/walls.zh_TW.tr new file mode 100644 index 0000000..ba1285f --- /dev/null +++ b/mods/minetest_game/walls/locale/walls.zh_TW.tr @@ -0,0 +1,4 @@ +# textdomain: walls +Cobblestone Wall=鵝卵石牆 +Mossy Cobblestone Wall=苔蘚覆蓋的鵝卵石牆 +Desert Cobblestone Wall=沙漠鵝卵石牆 diff --git a/mods/minetest_game/walls/mod.conf b/mods/minetest_game/walls/mod.conf new file mode 100644 index 0000000..9b8bbe8 --- /dev/null +++ b/mods/minetest_game/walls/mod.conf @@ -0,0 +1,3 @@ +name = walls +description = Minetest Game mod: walls +depends = default diff --git a/mods/minetest_game/wool/README.txt b/mods/minetest_game/wool/README.txt new file mode 100644 index 0000000..a66677d --- /dev/null +++ b/mods/minetest_game/wool/README.txt @@ -0,0 +1,16 @@ +Minetest Game mod: wool +======================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by Perttu Ahola (celeron55) (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +Cisoun (CC BY-SA 3.0): + wool_black.png wool_brown.png wool_dark_green.png wool_green.png + wool_magenta.png wool_pink.png wool_violet.png wool_yellow.png + wool_blue.png wool_cyan.png wool_dark_grey.png wool_grey.png + wool_orange.png wool_red.png wool_white.png diff --git a/mods/minetest_game/wool/init.lua b/mods/minetest_game/wool/init.lua new file mode 100644 index 0000000..4cf7dc3 --- /dev/null +++ b/mods/minetest_game/wool/init.lua @@ -0,0 +1,52 @@ +-- wool/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("wool") + +local dyes = dye.dyes + +for i = 1, #dyes do + local name, desc = unpack(dyes[i]) + + minetest.register_node("wool:" .. name, { + description = S(desc .. " Wool"), + tiles = {"wool_" .. name .. ".png"}, + is_ground_content = false, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, + flammable = 3, wool = 1}, + sounds = default.node_sound_defaults(), + }) + + minetest.register_craft{ + type = "shapeless", + output = "wool:" .. name, + recipe = {"group:dye,color_" .. name, "group:wool"}, + } +end + +-- Legacy +-- Backwards compatibility with jordach's 16-color wool mod +minetest.register_alias("wool:dark_blue", "wool:blue") +minetest.register_alias("wool:gold", "wool:yellow") + +-- Dummy calls to S() to allow translation scripts to detect the strings. +-- To update this run: +-- for _,e in ipairs(dye.dyes) do print(("S(%q)"):format(e[2].." Wool")) end + +--[[ +S("White Wool") +S("Grey Wool") +S("Dark Grey Wool") +S("Black Wool") +S("Violet Wool") +S("Blue Wool") +S("Cyan Wool") +S("Dark Green Wool") +S("Green Wool") +S("Yellow Wool") +S("Brown Wool") +S("Orange Wool") +S("Red Wool") +S("Magenta Wool") +S("Pink Wool") +--]] diff --git a/mods/minetest_game/wool/license.txt b/mods/minetest_game/wool/license.txt new file mode 100644 index 0000000..9310163 --- /dev/null +++ b/mods/minetest_game/wool/license.txt @@ -0,0 +1,60 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2012-2016 Perttu Ahola (celeron55) +Copyright (C) 2012-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2012-2016 Cisoun + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/wool/locale/template.txt b/mods/minetest_game/wool/locale/template.txt new file mode 100644 index 0000000..316cd2c --- /dev/null +++ b/mods/minetest_game/wool/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool= +Grey Wool= +Dark Grey Wool= +Black Wool= +Violet Wool= +Blue Wool= +Cyan Wool= +Dark Green Wool= +Green Wool= +Yellow Wool= +Brown Wool= +Orange Wool= +Red Wool= +Magenta Wool= +Pink Wool= diff --git a/mods/minetest_game/wool/locale/wool.de.tr b/mods/minetest_game/wool/locale/wool.de.tr new file mode 100644 index 0000000..9b6b8ab --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.de.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Weiße Wolle +Grey Wool=Graue Wolle +Dark Grey Wool=Dunkelgraue Wolle +Black Wool=Schwarze Wolle +Violet Wool=Violette Wolle +Blue Wool=Blaue Wolle +Cyan Wool=Türkise Wolle +Dark Green Wool=Dunkelgrüne Wolle +Green Wool=Grüne Wolle +Yellow Wool=Gelbe Wolle +Brown Wool=Braune Wolle +Orange Wool=Orange Wolle +Red Wool=Rote Wolle +Magenta Wool=Magenta Wolle +Pink Wool=Rosa Wolle diff --git a/mods/minetest_game/wool/locale/wool.eo.tr b/mods/minetest_game/wool/locale/wool.eo.tr new file mode 100644 index 0000000..582ea2a --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.eo.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Blanka Lano +Grey Wool=Griza Lano +Dark Grey Wool=Malhela Griza Lano +Black Wool=Nigra Lano +Violet Wool=Viola Lano +Blue Wool=Blua Lano +Cyan Wool=Bluverda Lano +Dark Green Wool=Malhela Verda Lano +Green Wool=Verda Lano +Yellow Wool=Flava Lano +Brown Wool=Bruna Lano +Orange Wool=Oranĝa Lano +Red Wool=Ruĝa Lano +Magenta Wool=Fuksina Lano +Pink Wool=Roza Lano diff --git a/mods/minetest_game/wool/locale/wool.es.tr b/mods/minetest_game/wool/locale/wool.es.tr new file mode 100644 index 0000000..ac15592 --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.es.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Lana blanca +Grey Wool=Lana gris +Dark Grey Wool=Lana gris oscuro +Black Wool=Lana negra +Violet Wool=Lana violeta +Blue Wool=Lana azul +Cyan Wool=Lana cián +Dark Green Wool=Lana verde oscuro +Green Wool=Lana verde +Yellow Wool=Lana amarilla +Brown Wool=Lana marrón +Orange Wool=Lana naranja +Red Wool=Lana roja +Magenta Wool=Lana magenta +Pink Wool=Lana rosa diff --git a/mods/minetest_game/wool/locale/wool.fr.tr b/mods/minetest_game/wool/locale/wool.fr.tr new file mode 100644 index 0000000..48a60a7 --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.fr.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Laine blanche +Grey Wool=Laine grise +Dark Grey Wool=Laine grise foncée +Black Wool=Laine noire +Violet Wool=Laine violette +Blue Wool=Laine bleue +Cyan Wool=Laine cyan +Dark Green Wool=Laine verte foncée +Green Wool=Laine verte +Yellow Wool=Laine jaune +Brown Wool=Laine marron +Orange Wool=Laine orange +Red Wool=Laine rouge +Magenta Wool=Laine magenta +Pink Wool=Laine rose diff --git a/mods/minetest_game/wool/locale/wool.id.tr b/mods/minetest_game/wool/locale/wool.id.tr new file mode 100644 index 0000000..2448e43 --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.id.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Wol Putih +Grey Wool=Wol Abu +Dark Grey Wool=Wol Abu Tua +Black Wool=Wol Hitam +Violet Wool=Wol Ungu +Blue Wool=Wol Biru +Cyan Wool=Wol Sian +Dark Green Wool=Wol Hijau Tua +Green Wool=Wol Hijau +Yellow Wool=Wol Kuning +Brown Wool=Wol Cokelat +Orange Wool=Wol Oranye +Red Wool=Wol Merah +Magenta Wool=Wol Magenta +Pink Wool=Wol Merah Jambu diff --git a/mods/minetest_game/wool/locale/wool.it.tr b/mods/minetest_game/wool/locale/wool.it.tr new file mode 100644 index 0000000..8108f2f --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.it.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Lana bianca +Grey Wool=Lana grigia +Dark Grey Wool=Lana grigia scura +Black Wool=Lana nera +Violet Wool=Lana viola +Blue Wool=Lana blu +Cyan Wool=Lana ciano +Dark Green Wool=Lana verde scura +Green Wool=Lana verde +Yellow Wool=Lana gialla +Brown Wool=Lana marrone +Orange Wool=Lana arancione +Red Wool=Lana rossa +Magenta Wool=Lana magenta +Pink Wool=Lana rosa diff --git a/mods/minetest_game/wool/locale/wool.jbo.tr b/mods/minetest_game/wool/locale/wool.jbo.tr new file mode 100644 index 0000000..4bf44ec --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.jbo.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=lo blabi sunla +Grey Wool=lo grusi sunla +Dark Grey Wool=lo xekri grusi sunla +Black Wool=lo xekri sunla +Violet Wool=lo zirpu sunla +Blue Wool=lo blanu sunla +Cyan Wool=lo cicna sunla +Dark Green Wool=lo xekri crino sunla +Green Wool=lo crino sunla +Yellow Wool=lo pelxu sunla +Brown Wool=lo bunre sunla +Orange Wool=lo narju sunla +Red Wool=lo xunre sunla +Magenta Wool=lo nukni sunla +Pink Wool=lo xunblabi sunla diff --git a/mods/minetest_game/wool/locale/wool.ms.tr b/mods/minetest_game/wool/locale/wool.ms.tr new file mode 100644 index 0000000..18b5480 --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.ms.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Bulu Biri-Biri Putih +Grey Wool=Bulu Biri-Biri Kelabu +Dark Grey Wool=Bulu Biri-Biri Kelabu Gelap +Black Wool=Bulu Biri-Biri Hitam +Violet Wool=Bulu Biri-Biri Ungu +Blue Wool=Bulu Biri-Biri Biru +Cyan Wool=Bulu Biri-Biri Biru Kehijauan +Dark Green Wool=Bulu Biri-Biri Hijau Gelap +Green Wool=Bulu Biri-Biri Hijau +Yellow Wool=Bulu Biri-Biri Kuning +Brown Wool=Bulu Biri-Biri Perang +Orange Wool=Bulu Biri-Biri Jingga +Red Wool=Bulu Biri-Biri Merah +Magenta Wool=Bulu Biri-Biri Merah Lembayung +Pink Wool=Bulu Biri-Biri Merah Jambu diff --git a/mods/minetest_game/wool/locale/wool.pt_BR.tr b/mods/minetest_game/wool/locale/wool.pt_BR.tr new file mode 100644 index 0000000..7676191 --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.pt_BR.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Lã Branca +Grey Wool=Lã Cinza +Dark Grey Wool=Lã Cinza-escuro +Black Wool=Lã Preta +Violet Wool=Lã Violeta +Blue Wool=Lã Azul +Cyan Wool=Lã Ciano +Dark Green Wool=Lã Verde-escuro +Green Wool=Lã Verde +Yellow Wool=Lã Amarela +Brown Wool=Lã Marrom +Orange Wool=Lã Laranja +Red Wool=Lã Vermelha +Magenta Wool=Lã Magenta +Pink Wool=Lã Rosa diff --git a/mods/minetest_game/wool/locale/wool.ru.tr b/mods/minetest_game/wool/locale/wool.ru.tr new file mode 100644 index 0000000..f5a98aa --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.ru.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Белая Шерсть +Grey Wool=Серая Шерсть +Dark Grey Wool=Тёмно-Серая Шерсть +Black Wool=Чёрная Шерсть +Violet Wool=Фиолетовая Шерсть +Blue Wool=Синяя Шерсть +Cyan Wool=Голубая Шерсть +Dark Green Wool=Тёмно-Зелёная Шерсть +Green Wool=Зелёная Шерсть +Yellow Wool=Жёлтая Шерсть +Brown Wool=Коричневая Шерсть +Orange Wool=Оранжевая Шерсть +Red Wool=Красная Шерсть +Magenta Wool=Пурпурная Шерсть +Pink Wool=Розовая Шерсть diff --git a/mods/minetest_game/wool/locale/wool.se.tr b/mods/minetest_game/wool/locale/wool.se.tr new file mode 100644 index 0000000..e026ac4 --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.se.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Vit Ull +Grey Wool=Grå Ull +Dark Grey Wool=Mörk Grå Ull +Black Wool=Svart Ull +Violet Wool=Violett Ull +Blue Wool=Blå Ull +Cyan Wool=Cyan Ull +Dark Green Wool=Mörk Grön Ull +Green Wool=Grön Ull +Yellow Wool=Gul Ull +Brown Wool=Brun Ull +Orange Wool=Orange Ull +Red Wool=Röd Ull +Magenta Wool=Magenta Ull +Pink Wool=Rosa Ull diff --git a/mods/minetest_game/wool/locale/wool.sk.tr b/mods/minetest_game/wool/locale/wool.sk.tr new file mode 100644 index 0000000..755370e --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.sk.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=Biela vlna +Grey Wool=Šedá vlna +Dark Grey Wool=Tmavošedá vlna +Black Wool=Čierna vlna +Violet Wool=Fialová vlna +Blue Wool=Modrá vlna +Cyan Wool=Tyrkysová vlna +Dark Green Wool=Tmavozelená vlna +Green Wool=Zelená vlna +Yellow Wool=Žltá vlna +Brown Wool=Hnedá vlna +Orange Wool=Oranžová vlna +Red Wool=Červená vlna +Magenta Wool=Purpurová vlna +Pink Wool=Ružová vlna diff --git a/mods/minetest_game/wool/locale/wool.zh_CN.tr b/mods/minetest_game/wool/locale/wool.zh_CN.tr new file mode 100644 index 0000000..caac9ee --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.zh_CN.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=白羊毛 +Grey Wool=灰羊毛 +Dark Grey Wool=暗灰羊毛 +Black Wool=黑羊毛 +Violet Wool=紫羊毛 +Blue Wool=蓝羊毛 +Cyan Wool=青羊毛 +Dark Green Wool=暗绿羊毛 +Green Wool=绿羊毛 +Yellow Wool=黄羊毛 +Brown Wool=棕羊毛 +Orange Wool=橙羊毛 +Red Wool=红羊毛 +Magenta Wool=品红羊毛 +Pink Wool=粉红羊毛 diff --git a/mods/minetest_game/wool/locale/wool.zh_TW.tr b/mods/minetest_game/wool/locale/wool.zh_TW.tr new file mode 100644 index 0000000..290a1fe --- /dev/null +++ b/mods/minetest_game/wool/locale/wool.zh_TW.tr @@ -0,0 +1,16 @@ +# textdomain: wool +White Wool=白羊毛 +Grey Wool=灰羊毛 +Dark Grey Wool=暗灰羊毛 +Black Wool=黑羊毛 +Violet Wool=紫羊毛 +Blue Wool=藍羊毛 +Cyan Wool=青羊毛 +Dark Green Wool=暗綠羊毛 +Green Wool=綠羊毛 +Yellow Wool=黃羊毛 +Brown Wool=棕羊毛 +Orange Wool=橙羊毛 +Red Wool=紅羊毛 +Magenta Wool=品紅羊毛 +Pink Wool=粉紅羊毛 diff --git a/mods/minetest_game/wool/mod.conf b/mods/minetest_game/wool/mod.conf new file mode 100644 index 0000000..a0ca3f0 --- /dev/null +++ b/mods/minetest_game/wool/mod.conf @@ -0,0 +1,3 @@ +name = wool +description = Minetest Game mod: wool +depends = default, dye diff --git a/mods/minetest_game/wool/textures/wool_black.png b/mods/minetest_game/wool/textures/wool_black.png new file mode 100755 index 0000000..d61d34b Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_black.png differ diff --git a/mods/minetest_game/wool/textures/wool_blue.png b/mods/minetest_game/wool/textures/wool_blue.png new file mode 100755 index 0000000..957ed59 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_blue.png differ diff --git a/mods/minetest_game/wool/textures/wool_brown.png b/mods/minetest_game/wool/textures/wool_brown.png new file mode 100755 index 0000000..9eaa53b Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_brown.png differ diff --git a/mods/minetest_game/wool/textures/wool_cyan.png b/mods/minetest_game/wool/textures/wool_cyan.png new file mode 100755 index 0000000..2628cb6 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_cyan.png differ diff --git a/mods/minetest_game/wool/textures/wool_dark_green.png b/mods/minetest_game/wool/textures/wool_dark_green.png new file mode 100755 index 0000000..d712458 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_dark_green.png differ diff --git a/mods/minetest_game/wool/textures/wool_dark_grey.png b/mods/minetest_game/wool/textures/wool_dark_grey.png new file mode 100755 index 0000000..0e684d0 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_dark_grey.png differ diff --git a/mods/minetest_game/wool/textures/wool_green.png b/mods/minetest_game/wool/textures/wool_green.png new file mode 100755 index 0000000..cfe8eb0 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_green.png differ diff --git a/mods/minetest_game/wool/textures/wool_grey.png b/mods/minetest_game/wool/textures/wool_grey.png new file mode 100755 index 0000000..d03c5d4 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_grey.png differ diff --git a/mods/minetest_game/wool/textures/wool_light_blue.png b/mods/minetest_game/wool/textures/wool_light_blue.png new file mode 100755 index 0000000..810edfc Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_light_blue.png differ diff --git a/mods/minetest_game/wool/textures/wool_magenta.png b/mods/minetest_game/wool/textures/wool_magenta.png new file mode 100755 index 0000000..d451bb2 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_magenta.png differ diff --git a/mods/minetest_game/wool/textures/wool_orange.png b/mods/minetest_game/wool/textures/wool_orange.png new file mode 100755 index 0000000..885bdff Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_orange.png differ diff --git a/mods/minetest_game/wool/textures/wool_pink.png b/mods/minetest_game/wool/textures/wool_pink.png new file mode 100755 index 0000000..0548294 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_pink.png differ diff --git a/mods/minetest_game/wool/textures/wool_red.png b/mods/minetest_game/wool/textures/wool_red.png new file mode 100755 index 0000000..4300f33 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_red.png differ diff --git a/mods/minetest_game/wool/textures/wool_violet.png b/mods/minetest_game/wool/textures/wool_violet.png new file mode 100755 index 0000000..ba4e3c6 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_violet.png differ diff --git a/mods/minetest_game/wool/textures/wool_white.png b/mods/minetest_game/wool/textures/wool_white.png new file mode 100755 index 0000000..565b5e5 Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_white.png differ diff --git a/mods/minetest_game/wool/textures/wool_yellow.png b/mods/minetest_game/wool/textures/wool_yellow.png new file mode 100755 index 0000000..0eadd5a Binary files /dev/null and b/mods/minetest_game/wool/textures/wool_yellow.png differ diff --git a/mods/minetest_game/xpanes/README.txt b/mods/minetest_game/xpanes/README.txt new file mode 100644 index 0000000..0e34d23 --- /dev/null +++ b/mods/minetest_game/xpanes/README.txt @@ -0,0 +1,32 @@ +Minetest Game mod: xpanes +========================= +See license.txt for license information. + +Authors of source code +---------------------- +Originally by xyz (MIT) +BlockMen (MIT) +sofar (MIT) +Various Minetest developers and contributors (MIT) + +Authors of media (textures) +--------------------------- +xyz (CC BY-SA 3.0): + All textures not mentioned below. + +Gambit (CC BY-SA 3.0): + xpanes_bar.png + +paramat (CC BY-SA 3.0): + xpanes_bar_top.png + +Krock (CC0 1.0): + xpanes_edge.png + +TumeniNodes (CC BY-SA 3.0): + xpanes_door_steel_bar.png + xpanes_item_steel_bar.png + xpanes_trapdoor_steel_bar.png + xpanes_trapdoor_steel_bar_side.png + xpanes_steel_bar_door_close.ogg + xpanes_steel_bar_door_open.ogg diff --git a/mods/minetest_game/xpanes/init.lua b/mods/minetest_game/xpanes/init.lua new file mode 100644 index 0000000..a02dbfe --- /dev/null +++ b/mods/minetest_game/xpanes/init.lua @@ -0,0 +1,261 @@ +-- xpanes/init.lua + +-- Load support for MT game translation. +local S = minetest.get_translator("xpanes") + + +local function is_pane(pos) + return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0 +end + +local function connects_dir(pos, name, dir) + local aside = vector.add(pos, minetest.facedir_to_dir(dir)) + if is_pane(aside) then + return true + end + + local connects_to = minetest.registered_nodes[name].connects_to + if not connects_to then + return false + end + local list = minetest.find_nodes_in_area(aside, aside, connects_to) + + if #list > 0 then + return true + end + + return false +end + +local function swap(pos, node, name, param2) + if node.name == name and node.param2 == param2 then + return + end + + minetest.swap_node(pos, {name = name, param2 = param2}) +end + +local function update_pane(pos) + if not is_pane(pos) then + return + end + local node = minetest.get_node(pos) + local name = node.name + if name:sub(-5) == "_flat" then + name = name:sub(1, -6) + end + + local any = node.param2 + local c = {} + local count = 0 + for dir = 0, 3 do + c[dir] = connects_dir(pos, name, dir) + if c[dir] then + any = dir + count = count + 1 + end + end + + if count == 0 then + swap(pos, node, name .. "_flat", any) + elseif count == 1 then + swap(pos, node, name .. "_flat", (any + 1) % 4) + elseif count == 2 then + if (c[0] and c[2]) or (c[1] and c[3]) then + swap(pos, node, name .. "_flat", (any + 1) % 4) + else + swap(pos, node, name, 0) + end + else + swap(pos, node, name, 0) + end +end + +minetest.register_on_placenode(function(pos, node) + if minetest.get_item_group(node, "pane") then + update_pane(pos) + end + for i = 0, 3 do + local dir = minetest.facedir_to_dir(i) + update_pane(vector.add(pos, dir)) + end +end) + +minetest.register_on_dignode(function(pos) + for i = 0, 3 do + local dir = minetest.facedir_to_dir(i) + update_pane(vector.add(pos, dir)) + end +end) + +xpanes = {} +function xpanes.register_pane(name, def) + for i = 1, 15 do + minetest.register_alias("xpanes:" .. name .. "_" .. i, "xpanes:" .. name .. "_flat") + end + + local flatgroups = table.copy(def.groups) + flatgroups.pane = 1 + minetest.register_node(":xpanes:" .. name .. "_flat", { + description = def.description, + drawtype = "nodebox", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + inventory_image = def.inventory_image, + wield_image = def.wield_image, + paramtype2 = "facedir", + tiles = { + def.textures[3], + def.textures[3], + def.textures[3], + def.textures[3], + def.textures[1], + def.textures[1] + }, + groups = flatgroups, + drop = "xpanes:" .. name .. "_flat", + sounds = def.sounds, + use_texture_alpha = def.use_texture_alpha and "blend" or "clip", + node_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + selection_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + connect_sides = { "left", "right" }, + }) + + local groups = table.copy(def.groups) + groups.pane = 1 + groups.not_in_creative_inventory = 1 + minetest.register_node(":xpanes:" .. name, { + drawtype = "nodebox", + paramtype = "light", + is_ground_content = false, + sunlight_propagates = true, + description = def.description, + tiles = { + def.textures[3], + def.textures[3], + def.textures[1] + }, + groups = groups, + drop = "xpanes:" .. name .. "_flat", + sounds = def.sounds, + use_texture_alpha = def.use_texture_alpha and "blend" or "clip", + node_box = { + type = "connected", + fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}}, + connect_front = {{-1/32, -1/2, -1/2, 1/32, 1/2, -1/32}}, + connect_left = {{-1/2, -1/2, -1/32, -1/32, 1/2, 1/32}}, + connect_back = {{-1/32, -1/2, 1/32, 1/32, 1/2, 1/2}}, + connect_right = {{1/32, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + connects_to = {"group:pane", "group:stone", "group:glass", "group:wood", "group:tree"}, + }) + + minetest.register_craft({ + output = "xpanes:" .. name .. "_flat 16", + recipe = def.recipe + }) +end + +xpanes.register_pane("pane", { + description = S("Glass Pane"), + textures = {"default_glass.png", "", "xpanes_edge.png"}, + inventory_image = "default_glass.png", + wield_image = "default_glass.png", + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2, cracky=3, oddly_breakable_by_hand=3}, + recipe = { + {"default:glass", "default:glass", "default:glass"}, + {"default:glass", "default:glass", "default:glass"} + } +}) + +xpanes.register_pane("obsidian_pane", { + description = S("Obsidian Glass Pane"), + textures = {"default_obsidian_glass.png", "", "xpanes_edge_obsidian.png"}, + inventory_image = "default_obsidian_glass.png", + wield_image = "default_obsidian_glass.png", + sounds = default.node_sound_glass_defaults(), + groups = {snappy=2, cracky=3}, + recipe = { + {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"} + } +}) + +xpanes.register_pane("bar", { + description = S("Steel Bars"), + textures = {"xpanes_bar.png", "", "xpanes_bar_top.png"}, + inventory_image = "xpanes_bar.png", + wield_image = "xpanes_bar.png", + groups = {cracky=2}, + sounds = default.node_sound_metal_defaults(), + recipe = { + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, + {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"} + } +}) + +minetest.register_lbm({ + name = "xpanes:gen2", + nodenames = {"group:pane"}, + action = function(pos, node) + update_pane(pos) + for i = 0, 3 do + local dir = minetest.facedir_to_dir(i) + update_pane(vector.add(pos, dir)) + end + end +}) + +-- Register steel bar doors and trapdoors + +if minetest.get_modpath("doors") then + + doors.register("xpanes:door_steel_bar", { + tiles = {{name = "xpanes_door_steel_bar.png", backface_culling = true}}, + description = S("Steel Bar Door"), + inventory_image = "xpanes_item_steel_bar.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2}, + sounds = default.node_sound_metal_defaults(), + sound_open = "xpanes_steel_bar_door_open", + sound_close = "xpanes_steel_bar_door_close", + gain_open = 0.15, + gain_close = 0.13, + recipe = { + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + }, + }) + + doors.register_trapdoor("xpanes:trapdoor_steel_bar", { + description = S("Steel Bar Trapdoor"), + inventory_image = "xpanes_trapdoor_steel_bar.png", + wield_image = "xpanes_trapdoor_steel_bar.png", + tile_front = "xpanes_trapdoor_steel_bar.png", + tile_side = "xpanes_trapdoor_steel_bar_side.png", + protected = true, + groups = {node = 1, cracky = 1, level = 2, door = 1}, + sounds = default.node_sound_metal_defaults(), + sound_open = "xpanes_steel_bar_door_open", + sound_close = "xpanes_steel_bar_door_close", + gain_open = 0.15, + gain_close = 0.13, + }) + + minetest.register_craft({ + output = "xpanes:trapdoor_steel_bar", + recipe = { + {"xpanes:bar_flat", "xpanes:bar_flat"}, + {"xpanes:bar_flat", "xpanes:bar_flat"}, + } + }) +end diff --git a/mods/minetest_game/xpanes/license.txt b/mods/minetest_game/xpanes/license.txt new file mode 100644 index 0000000..7e922b9 --- /dev/null +++ b/mods/minetest_game/xpanes/license.txt @@ -0,0 +1,65 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2014-2016 xyz +Copyright (C) 2014-2016 BlockMen +Copyright (C) 2016 Auke Kok +Copyright (C) 2014-2016 Various Minetest developers and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +Licenses of media (textures) +---------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2014-2016 xyz +Copyright (C) 2013-2016 Gambit +Copyright (C) 2016 paramat +Copyright (C) 2019 TumeniNodes + +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. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/minetest_game/xpanes/locale/template.txt b/mods/minetest_game/xpanes/locale/template.txt new file mode 100644 index 0000000..08dfbba --- /dev/null +++ b/mods/minetest_game/xpanes/locale/template.txt @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane= +Obsidian Glass Pane= +Steel Bars= +Steel Bar Door= +Steel Bar Trapdoor= diff --git a/mods/minetest_game/xpanes/locale/xpanes.de.tr b/mods/minetest_game/xpanes/locale/xpanes.de.tr new file mode 100644 index 0000000..9852753 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.de.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Glasscheibe +Obsidian Glass Pane=Obsidianglasscheibe +Steel Bars=Stahlgitter +Steel Bar Door=Stahlgittertür +Steel Bar Trapdoor=Stahlgitterfalltür diff --git a/mods/minetest_game/xpanes/locale/xpanes.eo.tr b/mods/minetest_game/xpanes/locale/xpanes.eo.tr new file mode 100644 index 0000000..5acbb1b --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.eo.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Vitra Vitraĵo +Obsidian Glass Pane=Obsidiana Vitra Vitraĵo +Steel Bars=Ŝtala Baraĵoj +Steel Bar Door=Ŝtala Baraĵa Pordo +Steel Bar Trapdoor=Ŝtala Baraĵa Plankpordo diff --git a/mods/minetest_game/xpanes/locale/xpanes.es.tr b/mods/minetest_game/xpanes/locale/xpanes.es.tr new file mode 100644 index 0000000..9902be7 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.es.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Panel de vidrio +Obsidian Glass Pane=Panel de vidrio de obsidiana +Steel Bars=Barras de acero +Steel Bar Door=Puerta de barras de acero +Steel Bar Trapdoor=Trampilla de barras de acero diff --git a/mods/minetest_game/xpanes/locale/xpanes.fr.tr b/mods/minetest_game/xpanes/locale/xpanes.fr.tr new file mode 100644 index 0000000..c751799 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.fr.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Panneau de verre +Obsidian Glass Pane=Panneau de verre d'obsidienne +Steel Bars=Barreaux d'acier +Steel Bar Door=Porte en barreaux d'acier +Steel Bar Trapdoor=Trappe en barreaux d'acier diff --git a/mods/minetest_game/xpanes/locale/xpanes.id.tr b/mods/minetest_game/xpanes/locale/xpanes.id.tr new file mode 100644 index 0000000..906cc0f --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.id.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Panel Kaca +Obsidian Glass Pane=Panel Kaca Obsidian +Steel Bars=Batang Baja +Steel Bar Door=Pintu Batang Baja +Steel Bar Trapdoor=Pintu Kolong Batang Baja diff --git a/mods/minetest_game/xpanes/locale/xpanes.it.tr b/mods/minetest_game/xpanes/locale/xpanes.it.tr new file mode 100644 index 0000000..63c8b62 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.it.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Pannello di vetro +Obsidian Glass Pane=Pannello di vetro d'ossidiana +Steel Bars=Sbarre d'acciaio +Steel Bar Door=Porta con sbarre d'acciaio +Steel Bar Trapdoor=Botola con sbarre d'acciaio diff --git a/mods/minetest_game/xpanes/locale/xpanes.jbo.tr b/mods/minetest_game/xpanes/locale/xpanes.jbo.tr new file mode 100644 index 0000000..333b531 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.jbo.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=lo blaci plita +Obsidian Glass Pane=lo je'erma'ablaci blaci plita +Steel Bars=lo gasta garna +Steel Bar Door=lo gasta garna vrogai +Steel Bar Trapdoor=lo gasta garna lolvrogai diff --git a/mods/minetest_game/xpanes/locale/xpanes.ms.tr b/mods/minetest_game/xpanes/locale/xpanes.ms.tr new file mode 100644 index 0000000..dedfefa --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.ms.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Kaca Tingkap +Obsidian Glass Pane=Kaca Tingkap Obsidia +Steel Bars=Jeriji Keluli +Steel Bar Door=Pintu Jeriji Keluli +Steel Bar Trapdoor=Pintu Kolong Jeriji Keluli diff --git a/mods/minetest_game/xpanes/locale/xpanes.pt_BR.tr b/mods/minetest_game/xpanes/locale/xpanes.pt_BR.tr new file mode 100644 index 0000000..c1ca3b2 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.pt_BR.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Painel de Vidro +Obsidian Glass Pane=Painel de Vidro de Obsidiana +Steel Bars=Barras de Aço +Steel Bar Door=Porta de Barras de Aço +Steel Bar Trapdoor=Alçapão de Barras de Aço diff --git a/mods/minetest_game/xpanes/locale/xpanes.ru.tr b/mods/minetest_game/xpanes/locale/xpanes.ru.tr new file mode 100644 index 0000000..166c62d --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.ru.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Стеклянная Панель +Obsidian Glass Pane=Стеклянная Панель Из Обсидиана +Steel Bars=Стальная Решётка +Steel Bar Door=Стальная Решётчатая Дверь +Steel Bar Trapdoor=Стальной Решётчатый Люк diff --git a/mods/minetest_game/xpanes/locale/xpanes.se.tr b/mods/minetest_game/xpanes/locale/xpanes.se.tr new file mode 100644 index 0000000..ff01d2a --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.se.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Glasruta +Obsidian Glass Pane=Obsidian Glasruta +Steel Bars=Stålgaller +Steel Bar Door=Stålgallers Dörr +Steel Bar Trapdoor=Stålgallers Fallucka diff --git a/mods/minetest_game/xpanes/locale/xpanes.sk.tr b/mods/minetest_game/xpanes/locale/xpanes.sk.tr new file mode 100644 index 0000000..0d07e08 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.sk.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=Tabuľa skla +Obsidian Glass Pane=Tabuľa obsidiánového skla +Steel Bars=Oceľové mreže +Steel Bar Door=Dvere z oceľových mreží +Steel Bar Trapdoor=Padajúce dvere z oceľových mreží diff --git a/mods/minetest_game/xpanes/locale/xpanes.zh_CN.tr b/mods/minetest_game/xpanes/locale/xpanes.zh_CN.tr new file mode 100644 index 0000000..7b1871c --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.zh_CN.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=玻璃窗 +Obsidian Glass Pane=黑曜石玻璃窗 +Steel Bars=钢筋 +Steel Bar Door=钢筋门 +Steel Bar Trapdoor=钢筋活板门 diff --git a/mods/minetest_game/xpanes/locale/xpanes.zh_TW.tr b/mods/minetest_game/xpanes/locale/xpanes.zh_TW.tr new file mode 100644 index 0000000..97ee7a2 --- /dev/null +++ b/mods/minetest_game/xpanes/locale/xpanes.zh_TW.tr @@ -0,0 +1,6 @@ +# textdomain: xpanes +Glass Pane=玻璃窗 +Obsidian Glass Pane=黑曜石玻璃窗 +Steel Bars=鋼筋 +Steel Bar Door=鋼筋門 +Steel Bar Trapdoor=鋼筋活板門 diff --git a/mods/minetest_game/xpanes/mod.conf b/mods/minetest_game/xpanes/mod.conf new file mode 100644 index 0000000..dcb0716 --- /dev/null +++ b/mods/minetest_game/xpanes/mod.conf @@ -0,0 +1,4 @@ +name = xpanes +description = Minetest Game mod: xpanes +depends = default +optional_depends = doors diff --git a/mods/minetest_game/xpanes/sounds/xpanes_steel_bar_door_close.ogg b/mods/minetest_game/xpanes/sounds/xpanes_steel_bar_door_close.ogg new file mode 100644 index 0000000..0620bfb Binary files /dev/null and b/mods/minetest_game/xpanes/sounds/xpanes_steel_bar_door_close.ogg differ diff --git a/mods/minetest_game/xpanes/sounds/xpanes_steel_bar_door_open.ogg b/mods/minetest_game/xpanes/sounds/xpanes_steel_bar_door_open.ogg new file mode 100644 index 0000000..d159be9 Binary files /dev/null and b/mods/minetest_game/xpanes/sounds/xpanes_steel_bar_door_open.ogg differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_bar.png b/mods/minetest_game/xpanes/textures/xpanes_bar.png new file mode 100755 index 0000000..1a643d8 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_bar.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_bar_top.png b/mods/minetest_game/xpanes/textures/xpanes_bar_top.png new file mode 100644 index 0000000..2955d72 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_bar_top.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_door_steel_bar.png b/mods/minetest_game/xpanes/textures/xpanes_door_steel_bar.png new file mode 100644 index 0000000..0e35d12 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_door_steel_bar.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_edge.png b/mods/minetest_game/xpanes/textures/xpanes_edge.png new file mode 100644 index 0000000..5768d66 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_edge.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_edge_obsidian.png b/mods/minetest_game/xpanes/textures/xpanes_edge_obsidian.png new file mode 100644 index 0000000..abdd14e Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_edge_obsidian.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_item_steel_bar.png b/mods/minetest_game/xpanes/textures/xpanes_item_steel_bar.png new file mode 100644 index 0000000..e10a844 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_item_steel_bar.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_pane_half.png b/mods/minetest_game/xpanes/textures/xpanes_pane_half.png new file mode 100755 index 0000000..2986341 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_pane_half.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_trapdoor_steel_bar.png b/mods/minetest_game/xpanes/textures/xpanes_trapdoor_steel_bar.png new file mode 100644 index 0000000..dbea6a6 Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_trapdoor_steel_bar.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_trapdoor_steel_bar_side.png b/mods/minetest_game/xpanes/textures/xpanes_trapdoor_steel_bar_side.png new file mode 100644 index 0000000..d780add Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_trapdoor_steel_bar_side.png differ diff --git a/mods/minetest_game/xpanes/textures/xpanes_white.png b/mods/minetest_game/xpanes/textures/xpanes_white.png new file mode 100755 index 0000000..e7559ff Binary files /dev/null and b/mods/minetest_game/xpanes/textures/xpanes_white.png differ diff --git a/mods/minetest_schemedit/LICENSE b/mods/minetest_schemedit/LICENSE new file mode 100644 index 0000000..0b3ce07 --- /dev/null +++ b/mods/minetest_schemedit/LICENSE @@ -0,0 +1,16 @@ +MIT License +Copyright (c) 2017 Elijah Duffy +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/mods/minetest_schemedit/README.md b/mods/minetest_schemedit/README.md new file mode 100644 index 0000000..7357779 --- /dev/null +++ b/mods/minetest_schemedit/README.md @@ -0,0 +1,25 @@ +# Schematic Editor [`schemedit`] + +## Version +1.0.0 + +## Description +This is a mod which allows you to edit and export schematics (`.mts` files). + +It supports node porbabilities, forced node placement and slice probabilities. + +It adds 3 items: + +* Schematic Creator: Used to mark a region and export it as schematic +* Schematic Void: Marks a position in a schematic which should not replace anything when placed as a schematic +* Schematic Node Probability Tool: Set per-node probabilities and forced node placement + +It also adds the server command `placeschem` to place a schematic. + +## Usage help +Usage help can be found when you use the optional Help modpack (mods `doc` and `doc_items`). + +You should also refer to the Minetest Lua API documentation to understand more about schematics. + +## License of everything +MIT License diff --git a/mods/minetest_schemedit/depends.txt b/mods/minetest_schemedit/depends.txt new file mode 100644 index 0000000..02077c6 --- /dev/null +++ b/mods/minetest_schemedit/depends.txt @@ -0,0 +1 @@ +doc? diff --git a/mods/minetest_schemedit/description.txt b/mods/minetest_schemedit/description.txt new file mode 100644 index 0000000..e6fd502 --- /dev/null +++ b/mods/minetest_schemedit/description.txt @@ -0,0 +1 @@ +Advanced tool for modders and advanced users to create and edit schematics. diff --git a/mods/minetest_schemedit/init.lua b/mods/minetest_schemedit/init.lua new file mode 100644 index 0000000..5ec5d15 --- /dev/null +++ b/mods/minetest_schemedit/init.lua @@ -0,0 +1,1045 @@ +local schemedit = {} + +-- Directory delimeter fallback (normally comes from builtin) +if not DIR_DELIM then + DIR_DELIM = "/" +end +local export_path_full = table.concat({minetest.get_worldpath(), "schems"}, DIR_DELIM) + +local text_color = "#D79E9E" +local text_color_number = 0xD79E9E + +schemedit.markers = {} + +-- [local function] Renumber table +local function renumber(t) + local res = {} + for _, i in pairs(t) do + res[#res + 1] = i + end + return res +end + +--- +--- Formspec API +--- + +local contexts = {} +local form_data = {} +local tabs = {} +local forms = {} +local displayed_waypoints = {} + +-- Sadly, the probabilities presented in Lua (0-255) are not identical to the REAL probabilities in the +-- schematic file (0-127). There are two converter functions to convert from one probability type to another. +-- This mod tries to retain the “Lua probability” as long as possible and only switches to “schematic probability” +-- on an actual export to a schematic. + +function schemedit.lua_prob_to_schematic_prob(lua_prob) + return math.floor(lua_prob / 2) +end + +function schemedit.schematic_prob_to_lua_prob(schematic_prob) + return schematic_prob * 2 + +end + +-- [function] Add form +function schemedit.add_form(name, def) + def.name = name + forms[name] = def + + if def.tab then + tabs[#tabs + 1] = name + end +end + +-- [function] Generate tabs +function schemedit.generate_tabs(current) + local retval = "tabheader[0,0;tabs;" + for _, t in pairs(tabs) do + local f = forms[t] + if f.tab ~= false and f.caption then + retval = retval..f.caption.."," + + if type(current) ~= "number" and current == f.name then + current = _ + end + end + end + retval = retval:sub(1, -2) -- Strip last comma + retval = retval..";"..current.."]" -- Close tabheader + return retval +end + +-- [function] Handle tabs +function schemedit.handle_tabs(pos, name, fields) + local tab = tonumber(fields.tabs) + if tab and tabs[tab] and forms[tabs[tab]] then + schemedit.show_formspec(pos, name, forms[tabs[tab]].name) + return true + end +end + +-- [function] Show formspec +function schemedit.show_formspec(pos, player, tab, show, ...) + if forms[tab] then + if type(player) == "string" then + player = minetest.get_player_by_name(player) + end + local name = player:get_player_name() + + if show ~= false then + if not form_data[name] then + form_data[name] = {} + end + + local form = forms[tab].get(form_data[name], pos, name, ...) + if forms[tab].tab then + form = form..schemedit.generate_tabs(tab) + end + + minetest.show_formspec(name, "schemedit:"..tab, form) + contexts[name] = pos + + -- Update player attribute + if forms[tab].cache_name ~= false then + player:set_attribute("schemedit:tab", tab) + end + else + minetest.close_formspec(pname, "schemedit:"..tab) + end + end +end + +-- [event] On receive fields +minetest.register_on_player_receive_fields(function(player, formname, fields) + local formname = formname:split(":") + + if formname[1] == "schemedit" and forms[formname[2]] then + local handle = forms[formname[2]].handle + local name = player:get_player_name() + if contexts[name] then + if not form_data[name] then + form_data[name] = {} + end + + if not schemedit.handle_tabs(contexts[name], name, fields) and handle then + handle(form_data[name], contexts[name], name, fields) + end + end + end +end) + +-- Helper function. Scans probabilities of all nodes in the given area and returns a prob_list +schemedit.scan_metadata = function(pos1, pos2) + local prob_list = {} + + for x=pos1.x, pos2.x do + for y=pos1.y, pos2.y do + for z=pos1.z, pos2.z do + local scanpos = {x=x, y=y, z=z} + local node = minetest.get_node_or_nil(scanpos) + + local prob, force_place + if node == nil or node.name == "schemedit:void" then + prob = 0 + force_place = false + else + local meta = minetest.get_meta(scanpos) + + prob = tonumber(meta:get_string("schemedit_prob")) or 255 + local fp = meta:get_string("schemedit_force_place") + if fp == "true" then + force_place = true + else + force_place = false + end + end + + local hashpos = minetest.hash_node_position(scanpos) + prob_list[hashpos] = { + pos = scanpos, + prob = prob, + force_place = force_place, + } + end + end + end + + return prob_list +end + +-- Sets probability and force_place metadata of an item. +-- Also updates item description. +-- The itemstack is updated in-place. +local function set_item_metadata(itemstack, prob, force_place) + local smeta = itemstack:get_meta() + local prob_desc = "\nProbability: "..(prob) or + smeta:get_string("schemedit_prob") or "Not Set" + -- Update probability + if prob and prob >= 0 and prob < 255 then + smeta:set_string("schemedit_prob", tostring(prob)) + elseif prob and prob == 255 then + -- Clear prob metadata for default probability + prob_desc = "" + smeta:set_string("schemedit_prob", nil) + else + prob_desc = "\nProbability: "..(smeta:get_string("schemedit_prob") or + "Not Set") + end + + -- Update force place + if force_place == true then + smeta:set_string("schemedit_force_place", "true") + elseif force_place == false then + smeta:set_string("schemedit_force_place", nil) + end + + -- Update description + local desc = minetest.registered_items[itemstack:get_name()].description + local meta_desc = smeta:get_string("description") + if meta_desc and meta_desc ~= "" then + desc = meta_desc + end + + local original_desc = smeta:get_string("original_description") + if original_desc and original_desc ~= "" then + desc = original_desc + else + smeta:set_string("original_description", desc) + end + + local force_desc = "" + if smeta:get_string("schemedit_force_place") == "true" then + force_desc = "\n".."Force placement" + end + + desc = desc..minetest.colorize(text_color, prob_desc..force_desc) + + smeta:set_string("description", desc) + + return itemstack +end + +--- +--- Formspec Tabs +--- + +schemedit.add_form("main", { + tab = true, + caption = "Main", + get = function(self, pos, name) + local meta = minetest.get_meta(pos):to_table().fields + local strpos = minetest.pos_to_string(pos) + local hashpos = minetest.hash_node_position(pos) + + local border_button + if meta.schem_border == "true" and schemedit.markers[hashpos] then + border_button = "button[3.5,7.5;3,1;border;Hide border]" + else + border_button = "button[3.5,7.5;3,1;border;Show border]" + end + + -- TODO: Show information regarding volume, pos1, pos2, etc... in formspec + local form = [[ + size[7,8] + label[0.5,-0.1;Position: ]]..strpos..[[] + label[3,-0.1;Owner: ]]..name..[[] + + field[0.8,1;5,1;name;Schematic name:;]]..minetest.formspec_escape(meta.schem_name or "")..[[] + button[5.3,0.69;1.2,1;save_name;Save] + tooltip[save_name;Save schematic name] + field_close_on_enter[name;false] + + button[0.5,1.5;6,1;export;Export schematic] + textarea[0.8,2.5;6.2,5;;The schematic will be exported as a .mts file and stored in]].. + "\n" .. export_path_full .. DIR_DELIM .. [[.mts.;] + field[0.8,7;2,1;x;X size:;]]..meta.x_size..[[] + field[2.8,7;2,1;y;Y size:;]]..meta.y_size..[[] + field[4.8,7;2,1;z;Z size:;]]..meta.z_size..[[] + field_close_on_enter[x;false] + field_close_on_enter[y;false] + field_close_on_enter[z;false] + + button[0.5,7.5;3,1;save;Save size] + ]].. + border_button + if minetest.get_modpath("doc") then + form = form .. "image_button[6.4,-0.2;0.8,0.8;doc_button_icon_lores.png;doc;]" .. + "tooltip[doc;Help]" + end + return form + end, + handle = function(self, pos, name, fields) + local realmeta = minetest.get_meta(pos) + local meta = realmeta:to_table().fields + local hashpos = minetest.hash_node_position(pos) + + if fields.doc then + doc.show_entry(name, "nodes", "schemedit:creator", true) + return + end + + -- Toggle border + if fields.border then + if meta.schem_border == "true" and schemedit.markers[hashpos] then + schemedit.unmark(pos) + meta.schem_border = "false" + else + schemedit.mark(pos) + meta.schem_border = "true" + end + end + + -- Save size vector values + if (fields.save or fields.key_enter_field == "x" or + fields.key_enter_field == "y" or fields.key_enter_field == "z") + and (fields.x and fields.y and fields.z and fields.x ~= "" + and fields.y ~= "" and fields.z ~= "") then + local x, y, z = tonumber(fields.x), tonumber(fields.y), tonumber(fields.z) + + if x then + meta.x_size = math.max(x, 1) + end + if y then + meta.y_size = math.max(y, 1) + end + if z then + meta.z_size = math.max(z, 1) + end + end + + -- Save schematic name + if fields.save_name or fields.key_enter_field == "name" and fields.name and + fields.name ~= "" then + meta.schem_name = fields.name + end + + -- Export schematic + if fields.export and meta.schem_name and meta.schem_name ~= "" then + local pos1, pos2 = schemedit.size(pos) + pos1, pos2 = schemedit.sort_pos(pos1, pos2) + local path = export_path_full .. DIR_DELIM + minetest.mkdir(path) + + local plist = schemedit.scan_metadata(pos1, pos2) + local probability_list = {} + for hash, i in pairs(plist) do + local prob = schemedit.lua_prob_to_schematic_prob(i.prob) + if i.force_place == true then + prob = prob + 128 + end + + table.insert(probability_list, { + pos = minetest.get_position_from_hash(hash), + prob = prob, + }) + end + + local slist = minetest.deserialize(meta.slices) + local slice_list = {} + for _, i in pairs(slist) do + slice_list[#slice_list + 1] = { + ypos = pos.y + i.ypos, + prob = schemedit.lua_prob_to_schematic_prob(i.prob), + } + end + + local filepath = path..meta.schem_name..".mts" + local res = minetest.create_schematic(pos1, pos2, probability_list, filepath, slice_list) + + if res then + minetest.chat_send_player(name, minetest.colorize("#00ff00", + "Exported schematic to "..filepath)) + else + minetest.chat_send_player(name, minetest.colorize("red", + "Failed to export schematic to "..filepath)) + end + end + + -- Save meta before updating visuals + local inv = realmeta:get_inventory():get_lists() + realmeta:from_table({fields = meta, inventory = inv}) + + -- Update border + if not fields.border and meta.schem_border == "true" then + schemedit.mark(pos) + end + + -- Update formspec + if not fields.quit then + schemedit.show_formspec(pos, minetest.get_player_by_name(name), "main") + end + end, +}) + +schemedit.add_form("slice", { + caption = "Y Slices", + tab = true, + get = function(self, pos, name, visible_panel) + local meta = minetest.get_meta(pos):to_table().fields + + self.selected = self.selected or 1 + local selected = tostring(self.selected) + local slice_list = minetest.deserialize(meta.slices) + local slices = "" + for _, i in pairs(slice_list) do + local insert = "Y = "..tostring(i.ypos).."; Probability = "..tostring(i.prob) + slices = slices..minetest.formspec_escape(insert).."," + end + slices = slices:sub(1, -2) -- Remove final comma + + local form = [[ + size[7,8] + table[0,0;6.8,6;slices;]]..slices..[[;]]..selected..[[] + ]] + + if self.panel_add or self.panel_edit then + local ypos_default, prob_default = "", "" + local done_button = "button[5,7.18;2,1;done_add;Done]" + if self.panel_edit then + done_button = "button[5,7.18;2,1;done_edit;Done]" + if slice_list[self.selected] then + ypos_default = slice_list[self.selected].ypos + prob_default = slice_list[self.selected].prob + end + end + + form = form..[[ + field[0.3,7.5;2.5,1;ypos;Y position (max. ]]..(meta.y_size - 1)..[[):;]]..ypos_default..[[] + field[2.8,7.5;2.5,1;prob;Probability (0-255):;]]..prob_default..[[] + field_close_on_enter[ypos;false] + field_close_on_enter[prob;false] + ]]..done_button + end + + if not self.panel_edit then + form = form.."button[0,6;2,1;add;+ Add slice]" + end + + if slices ~= "" and self.selected and not self.panel_add then + if not self.panel_edit then + form = form..[[ + button[2,6;2,1;remove;- Remove slice] + button[4,6;2,1;edit;+/- Edit slice] + ]] + else + form = form..[[ + button[2,6;2,1;remove;- Remove slice] + button[4,6;2,1;edit;+/- Edit slice] + ]] + end + end + + return form + end, + handle = function(self, pos, name, fields) + local meta = minetest.get_meta(pos) + local player = minetest.get_player_by_name(name) + + if fields.slices then + local slices = fields.slices:split(":") + self.selected = tonumber(slices[2]) + end + + if fields.add then + if not self.panel_add then + self.panel_add = true + schemedit.show_formspec(pos, player, "slice") + else + self.panel_add = nil + schemedit.show_formspec(pos, player, "slice") + end + end + + local ypos, prob = tonumber(fields.ypos), tonumber(fields.prob) + if (fields.done_add or fields.done_edit) and fields.ypos and fields.prob and + fields.ypos ~= "" and fields.prob ~= "" and ypos and prob and + ypos <= (meta:get_int("y_size") - 1) and prob >= 0 and prob <= 255 then + local slice_list = minetest.deserialize(meta:get_string("slices")) + local index = #slice_list + 1 + if fields.done_edit then + index = self.selected + end + + slice_list[index] = {ypos = ypos, prob = prob} + + meta:set_string("slices", minetest.serialize(slice_list)) + + -- Update and show formspec + self.panel_add = nil + schemedit.show_formspec(pos, player, "slice") + end + + if fields.remove and self.selected then + local slice_list = minetest.deserialize(meta:get_string("slices")) + slice_list[self.selected] = nil + meta:set_string("slices", minetest.serialize(renumber(slice_list))) + + -- Update formspec + self.selected = 1 + self.panel_edit = nil + schemedit.show_formspec(pos, player, "slice") + end + + if fields.edit then + if not self.panel_edit then + self.panel_edit = true + schemedit.show_formspec(pos, player, "slice") + else + self.panel_edit = nil + schemedit.show_formspec(pos, player, "slice") + end + end + end, +}) + +schemedit.add_form("probtool", { + cache_name = false, + caption = "Schematic Node Probability Tool", + get = function(self, pos, name) + local player = minetest.get_player_by_name(name) + if not player then + return + end + local probtool = player:get_wielded_item() + if probtool:get_name() ~= "schemedit:probtool" then + return + end + + local meta = probtool:get_meta() + local prob = tonumber(meta:get_string("schemedit_prob")) + local force_place = meta:get_string("schemedit_force_place") + + if not prob then + prob = 255 + end + if force_place == nil or force_place == "" then + force_place = "false" + end + local form = "size[5,4]".. + "label[0,0;Schematic Node Probability Tool]".. + "field[0.75,1;4,1;prob;Probability (0-255);"..prob.."]".. + "checkbox[0.60,1.5;force_place;Force placement;" .. force_place .. "]" .. + "button_exit[0.25,3;2,1;cancel;Cancel]".. + "button_exit[2.75,3;2,1;submit;Apply]".. + "tooltip[prob;Probability that the node will be placed]".. + "tooltip[force_place;If enabled, the node will replace nodes other than air and ignore]".. + "field_close_on_enter[prob;false]" + return form + end, + handle = function(self, pos, name, fields) + if fields.submit then + local prob = tonumber(fields.prob) + if prob then + local player = minetest.get_player_by_name(name) + if not player then + return + end + local probtool = player:get_wielded_item() + if probtool:get_name() ~= "schemedit:probtool" then + return + end + + local force_place = self.force_place == true + + set_item_metadata(probtool, prob, force_place) + + player:set_wielded_item(probtool) + end + end + if fields.force_place == "true" then + self.force_place = true + elseif fields.force_place == "false" then + self.force_place = false + end + end, +}) + +--- +--- API +--- + +--- Copies and modifies positions `pos1` and `pos2` so that each component of +-- `pos1` is less than or equal to the corresponding component of `pos2`. +-- Returns the new positions. +function schemedit.sort_pos(pos1, pos2) + if not pos1 or not pos2 then + return + end + + pos1, pos2 = table.copy(pos1), table.copy(pos2) + if pos1.x > pos2.x then + pos2.x, pos1.x = pos1.x, pos2.x + end + if pos1.y > pos2.y then + pos2.y, pos1.y = pos1.y, pos2.y + end + if pos1.z > pos2.z then + pos2.z, pos1.z = pos1.z, pos2.z + end + return pos1, pos2 +end + +-- [function] Prepare size +function schemedit.size(pos) + local pos1 = vector.new(pos) + local meta = minetest.get_meta(pos) + local node = minetest.get_node(pos) + local param2 = node.param2 + local size = { + x = meta:get_int("x_size"), + y = math.max(meta:get_int("y_size") - 1, 0), + z = meta:get_int("z_size"), + } + + if param2 == 1 then + local new_pos = vector.add({x = size.z, y = size.y, z = -size.x}, pos) + pos1.x = pos1.x + 1 + new_pos.z = new_pos.z + 1 + return pos1, new_pos + elseif param2 == 2 then + local new_pos = vector.add({x = -size.x, y = size.y, z = -size.z}, pos) + pos1.z = pos1.z - 1 + new_pos.x = new_pos.x + 1 + return pos1, new_pos + elseif param2 == 3 then + local new_pos = vector.add({x = -size.z, y = size.y, z = size.x}, pos) + pos1.x = pos1.x - 1 + new_pos.z = new_pos.z - 1 + return pos1, new_pos + else + local new_pos = vector.add(size, pos) + pos1.z = pos1.z + 1 + new_pos.x = new_pos.x - 1 + return pos1, new_pos + end +end + +-- [function] Mark region +function schemedit.mark(pos) + schemedit.unmark(pos) + + local id = minetest.hash_node_position(pos) + local owner = minetest.get_meta(pos):get_string("owner") + local pos1, pos2 = schemedit.size(pos) + pos1, pos2 = schemedit.sort_pos(pos1, pos2) + + local thickness = 0.2 + local sizex, sizey, sizez = (1 + pos2.x - pos1.x) / 2, (1 + pos2.y - pos1.y) / 2, (1 + pos2.z - pos1.z) / 2 + local m = {} + local low = true + local offset + + -- XY plane markers + for _, z in ipairs({pos1.z - 0.5, pos2.z + 0.5}) do + if low then + offset = -0.01 + else + offset = 0.01 + end + local marker = minetest.add_entity({x = pos1.x + sizex - 0.5, y = pos1.y + sizey - 0.5, z = z + offset}, "schemedit:display") + if marker ~= nil then + marker:set_properties({ + visual_size={x=(sizex+0.01) * 2, y=sizey * 2}, + }) + marker:get_luaentity().id = id + marker:get_luaentity().owner = owner + table.insert(m, marker) + end + low = false + end + + low = true + -- YZ plane markers + for _, x in ipairs({pos1.x - 0.5, pos2.x + 0.5}) do + if low then + offset = -0.01 + else + offset = 0.01 + end + + local marker = minetest.add_entity({x = x + offset, y = pos1.y + sizey - 0.5, z = pos1.z + sizez - 0.5}, "schemedit:display") + if marker ~= nil then + marker:set_properties({ + visual_size={x=(sizez+0.01) * 2, y=sizey * 2}, + }) + marker:set_yaw(math.pi / 2) + marker:get_luaentity().id = id + marker:get_luaentity().owner = owner + table.insert(m, marker) + end + low = false + end + + schemedit.markers[id] = m + return true +end + +-- [function] Unmark region +function schemedit.unmark(pos) + local id = minetest.hash_node_position(pos) + if schemedit.markers[id] then + local retval + for _, entity in ipairs(schemedit.markers[id]) do + entity:remove() + retval = true + end + return retval + end +end + +--- +--- Mark node probability values near player +--- + +-- Show probability and force_place status of a particular position for player in HUD. +-- Probability is shown as a number followed by “[F]” if the node is force-placed. +-- The distance to the node is also displayed below that. This can't be avoided and is +-- and artifact of the waypoint HUD element. TODO: Hide displayed distance. +function schemedit.display_node_prob(player, pos, prob, force_place) + local wpstring + if prob and force_place == true then + wpstring = string.format("%d [F]", prob) + elseif prob then + wpstring = tostring(prob) + elseif force_place == true then + wpstring = "[F]" + end + if wpstring then + return player:hud_add({ + hud_elem_type = "waypoint", + name = wpstring, + text = "m", -- For the distance artifact + number = text_color_number, + world_pos = pos, + }) + end +end + +-- Display the node probabilities and force_place status of the nodes in a region. +-- By default, this is done for nodes near the player (distance: 5). +-- But the boundaries can optionally be set explicitly with pos1 and pos2. +function schemedit.display_node_probs_region(player, pos1, pos2) + local playername = player:get_player_name() + local pos = vector.round(player:getpos()) + + local dist = 5 + -- Default: 5 nodes away from player in any direction + if not pos1 then + pos1 = vector.subtract(pos, dist) + end + if not pos2 then + pos2 = vector.add(pos, dist) + end + for x=pos1.x, pos2.x do + for y=pos1.y, pos2.y do + for z=pos1.z, pos2.z do + local checkpos = {x=x, y=y, z=z} + local nodehash = minetest.hash_node_position(checkpos) + + -- If node is already displayed, remove it so it can re replaced later + if displayed_waypoints[playername][nodehash] then + player:hud_remove(displayed_waypoints[playername][nodehash]) + displayed_waypoints[playername][nodehash] = nil + end + + local prob, force_place + local meta = minetest.get_meta(checkpos) + prob = tonumber(meta:get_string("schemedit_prob")) + force_place = meta:get_string("schemedit_force_place") == "true" + local hud_id = schemedit.display_node_prob(player, checkpos, prob, force_place) + if hud_id then + displayed_waypoints[playername][nodehash] = hud_id + displayed_waypoints[playername].display_active = true + end + end + end + end +end + +-- Remove all active displayed node statuses. +function schemedit.clear_displayed_node_probs(player) + local playername = player:get_player_name() + for nodehash, hud_id in pairs(displayed_waypoints[playername]) do + player:hud_remove(hud_id) + displayed_waypoints[playername][nodehash] = nil + displayed_waypoints[playername].display_active = false + end +end + +minetest.register_on_joinplayer(function(player) + displayed_waypoints[player:get_player_name()] = { + display_active = false -- If true, there *might* be at least one active node prob HUD display + -- If false, no node probabilities are displayed for sure. + } +end) + +minetest.register_on_leaveplayer(function(player) + displayed_waypoints[player:get_player_name()] = nil +end) + +-- Regularily clear the displayed node probabilities and force_place +-- for all players who do not wield the probtool. +-- This makes sure the screen is not spammed with information when it +-- isn't needed. +local cleartimer = 0 +minetest.register_globalstep(function(dtime) + cleartimer = cleartimer + dtime + if cleartimer > 2 then + local players = minetest.get_connected_players() + for p = 1, #players do + local player = players[p] + local pname = player:get_player_name() + if displayed_waypoints[pname].display_active then + local item = player:get_wielded_item() + if item:get_name() ~= "schemedit:probtool" then + schemedit.clear_displayed_node_probs(player) + end + end + end + cleartimer = 0 + end +end) + +--- +--- Registrations +--- + +-- [priv] schematic_override +minetest.register_privilege("schematic_override", { + description = "Allows you to access schemedit nodes not owned by you", + give_to_singleplayer = false, +}) + +-- [node] Schematic creator +minetest.register_node("schemedit:creator", { + description = "Schematic Creator", + _doc_items_longdesc = "The schematic creator is used to save a region of the world into a schematic file (.mts).", + _doc_items_usagehelp = "To get started, place the block facing directly in front of any bottom left corner of the structure you want to save. This block can only be accessed by the placer or by anyone with the “schematic_override” privilege.".."\n".. +"To save a region, rightclick the block, enter the size, a schematic name and hit “Export schematic”. The file will always be saved in the world directory. Note you can use this name in the /placeschem command to place the schematic again.".."\n\n".. +"The other features of the schematic creator are optional and are used to allow to add randomness and fine-tuning.".."\n\n".. +"Y slices are used to remove entire slices based on chance. For each slice of the schematic region along the Y axis, you can specify that it occours only with a certain chance. In the Y slice tab, you have to specify the Y slice height (0 = bottom) and a probability from 0 to 255 (255 is for 100%). By default, all Y slices occour always.".."\n\n".. +"With a schematic node probability tool, you can set a probability for each node and enable them to overwrite all nodes when placed as schematic. This tool must be used prior to the file export.", + tiles = {"schemedit_creator_top.png", "schemedit_creator_bottom.png", + "schemedit_creator_sides.png"}, + groups = { dig_immediate = 2}, + paramtype2 = "facedir", + is_ground_content = false, + + after_place_node = function(pos, player) + local name = player:get_player_name() + local meta = minetest.get_meta(pos) + + meta:set_string("owner", name) + meta:set_string("infotext", "Schematic Creator\n(owned by "..name..")") + meta:set_string("prob_list", minetest.serialize({})) + meta:set_string("slices", minetest.serialize({})) + + local node = minetest.get_node(pos) + local dir = minetest.facedir_to_dir(node.param2) + + meta:set_int("x_size", 1) + meta:set_int("y_size", 1) + meta:set_int("z_size", 1) + + -- Don't take item from itemstack + return true + end, + can_dig = function(pos, player) + local name = player:get_player_name() + local meta = minetest.get_meta(pos) + if meta:get_string("owner") == name or + minetest.check_player_privs(player, "schematic_override") == true then + return true + end + + return false + end, + on_rightclick = function(pos, node, player) + local meta = minetest.get_meta(pos) + local name = player:get_player_name() + if meta:get_string("owner") == name or + minetest.check_player_privs(player, "schematic_override") == true then + -- Get player attribute + local tab = player:get_attribute("schemedit:tab") + if not forms[tab] or not tab then + tab = "main" + end + + schemedit.show_formspec(pos, player, tab, true) + end + end, + after_destruct = function(pos) + schemedit.unmark(pos) + end, +}) + +minetest.register_tool("schemedit:probtool", { + description = "Schematic Node Probability Tool", + _doc_items_longdesc = +"This is an advanced tool which only makes sense when used together with a schematic creator. It is used to finetune the way how nodes from a schematic are placed.".."\n".. +"It allows you to set two things:".."\n".. +"1) Set probability: Chance for any particular node to be actually placed (default: always placed)".."\n".. +"2) Enable force placement: These nodes replace node other than air and ignored when placed in a schematic (default: off)", + _doc_items_usagehelp = "\n".. +"BASIC USAGE:".."\n".. +"Punch to configure the tool. Select a probability (0-255; 255 is for 100%) and enable or disable force placement. Now place the tool on any node to apply these values to the node. This information is preserved in the node until it is destroyed or changed by the tool again. This tool has no effect on schematic voids.".."\n".. +"Now you can use a schematic creator to save a region as usual, the nodes will now be saved with the special node settings applied.".."\n\n".. +"NODE HUD:".."\n".. +"To help you remember the node values, the nodes with special values are labelled in the HUD. The first line shows probability and force placement (with “[F]”). The second line is the current distance to the node. Nodes with default settings and schematic voids are not labelled.".."\n".. +"To disable the node HUD, unselect the tool or hit “place” while not pointing anything.".."\n\n".. +"UPDATING THE NODE HUD:".."\n".. +"The node HUD is not updated automatically any may be outdated. The node HUD only updates the HUD for nodes close to you whenever you place the tool or press the punch and sneak keys simutanously. If you sneak-punch a schematic creator, then the node HUd is updated for all nodes within the schematic creator's region, even if this region is very big.", + wield_image = "schemedit_probtool.png", + inventory_image = "schemedit_probtool.png", + liquids_pointable = true, + on_use = function(itemstack, user, pointed_thing) + local ctrl = user:get_player_control() + -- Simple use + if not ctrl.sneak then + -- Open dialog to change the probability to apply to nodes + schemedit.show_formspec(user:getpos(), user, "probtool", true) + + -- Use + sneak + else + -- Display the probability and force_place values for nodes. + + -- If a schematic creator was punched, only enable display for all nodes + -- within the creator's region. + local use_creator_region = false + if pointed_thing and pointed_thing.type == "node" and pointed_thing.under then + punchpos = pointed_thing.under + local node = minetest.get_node(punchpos) + if node.name == "schemedit:creator" then + local pos1, pos2 = schemedit.size(punchpos) + pos1, pos2 = schemedit.sort_pos(pos1, pos2) + schemedit.display_node_probs_region(user, pos1, pos2) + return + end + end + + -- Otherwise, just display the region close to the player + schemedit.display_node_probs_region(user) + end + end, + on_secondary_use = function(itemstack, user, pointed_thing) + schemedit.clear_displayed_node_probs(user) + end, + -- Set note probability and force_place and enable node probability display + on_place = function(itemstack, placer, pointed_thing) + -- Use pointed node's on_rightclick function first, if present + local node = minetest.get_node(pointed_thing.under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + + -- This sets the node probability of pointed node to the + -- currently used probability stored in the tool. + local pos = pointed_thing.under + local node = minetest.get_node(pos) + -- Schematic void are ignored, they always have probability 0 + if node.name == "schemedit:void" then + return itemstack + end + local nmeta = minetest.get_meta(pos) + local imeta = itemstack:get_meta() + local prob = tonumber(imeta:get_string("schemedit_prob")) + local force_place = imeta:get_string("schemedit_force_place") + + if not prob or prob == 255 then + nmeta:set_string("schemedit_prob", nil) + else + nmeta:set_string("schemedit_prob", prob) + end + if force_place == "true" then + nmeta:set_string("schemedit_force_place", "true") + else + nmeta:set_string("schemedit_force_place", nil) + end + + -- Enable node probablity display + schemedit.display_node_probs_region(placer) + + return itemstack + end, +}) + +minetest.register_node("schemedit:void", { + description = "Schematic Void", + _doc_items_longdesc = "This is an utility block used in the creation of schematic files. It should be used together with a schematic creator. When saving a schematic, all nodes with a schematic void will be left unchanged when the schematic is placed again. Technically, this is equivalent to a block with the node probability set to 0.", + _doc_items_usagehelp = "Just place the schematic void like any other block and use the schematic creator to save a portion of the world.", + tiles = { "schemedit_void.png" }, + drawtype = "nodebox", + is_ground_content = false, + paramtype = "light", + walkable = false, + sunlight_propagates = true, + node_box = { + type = "fixed", + fixed = { + { -4/16, -4/16, -4/16, 4/16, 4/16, 4/16 }, + }, + }, + groups = { dig_immediate = 3}, +}) + +-- [entity] Visible schematic border +minetest.register_entity("schemedit:display", { + visual = "upright_sprite", + textures = {"schemedit_border.png"}, + visual_size = {x=10, y=10}, + collisionbox = {0,0,0,0,0,0}, + physical = false, + + on_step = function(self, dtime) + if not self.id then + self.object:remove() + elseif not schemedit.markers[self.id] then + self.object:remove() + end + end, + on_activate = function(self) + self.object:set_armor_groups({immortal = 1}) + end, +}) + +-- [chatcommand] Place schematic +minetest.register_chatcommand("placeschem", { + description = "Place schematic at the position specified or the current ".. + "player position (loaded from "..export_path_full..".", + privs = {debug = true}, + params = "[.mts] [ ]", + func = function(name, param) + local schem, p = string.match(param, "^([^ ]+) *(.*)$") + local pos = minetest.string_to_pos(p) + + if not schem then + return false, "No schematic file specified." + end + + if not pos then + pos = minetest.get_player_by_name(name):get_pos() + end + + -- Automatiically add file name suffix if omitted + local schem_full + if string.sub(schem, string.len(schem)-3, string.len(schem)) == ".mts" then + schem_full = schem + else + schem_full = schem .. ".mts" + end + + local success = minetest.place_schematic(pos, export_path_full .. DIR_DELIM .. schem_full, "random", nil, false) + + if success == nil then + return false, "Schematic file could not be loaded!" + else + return true + end + end, +}) + diff --git a/mods/minetest_schemedit/mod.conf b/mods/minetest_schemedit/mod.conf new file mode 100644 index 0000000..4b45b79 --- /dev/null +++ b/mods/minetest_schemedit/mod.conf @@ -0,0 +1 @@ +name = schemedit diff --git a/mods/minetest_schemedit/screenshot.png b/mods/minetest_schemedit/screenshot.png new file mode 100644 index 0000000..93ea0bd Binary files /dev/null and b/mods/minetest_schemedit/screenshot.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_border.png b/mods/minetest_schemedit/textures/schemedit_border.png new file mode 100644 index 0000000..2acb514 Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_border.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_creator.png b/mods/minetest_schemedit/textures/schemedit_creator.png new file mode 100644 index 0000000..fe6ea34 Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_creator.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_creator_bottom.png b/mods/minetest_schemedit/textures/schemedit_creator_bottom.png new file mode 100644 index 0000000..f0dc0a6 Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_creator_bottom.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_creator_sides.png b/mods/minetest_schemedit/textures/schemedit_creator_sides.png new file mode 100644 index 0000000..6d3c6e4 Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_creator_sides.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_creator_top.png b/mods/minetest_schemedit/textures/schemedit_creator_top.png new file mode 100644 index 0000000..5c26991 Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_creator_top.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_probtool.png b/mods/minetest_schemedit/textures/schemedit_probtool.png new file mode 100644 index 0000000..cdd6b2a Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_probtool.png differ diff --git a/mods/minetest_schemedit/textures/schemedit_void.png b/mods/minetest_schemedit/textures/schemedit_void.png new file mode 100644 index 0000000..9ae57f9 Binary files /dev/null and b/mods/minetest_schemedit/textures/schemedit_void.png differ diff --git a/mods/mobkit/.luacheckrc b/mods/mobkit/.luacheckrc new file mode 100644 index 0000000..f6c148c --- /dev/null +++ b/mods/mobkit/.luacheckrc @@ -0,0 +1,20 @@ +unused_args = false +allow_defined_top = true +max_line_length = false + +globals = { + "minetest", + "mobkit", +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/mobkit/LICENSE b/mods/mobkit/LICENSE new file mode 100644 index 0000000..664fc83 --- /dev/null +++ b/mods/mobkit/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 TheTermos + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/mobkit/README.md b/mods/mobkit/README.md new file mode 100644 index 0000000..26319f9 --- /dev/null +++ b/mods/mobkit/README.md @@ -0,0 +1,6 @@ +# mobkit +Entity API for Minetest + +This library is meant to be shared between mods
+Please do not write to the mobkit namespace ('mobkit' global table),
+nor include own copies of mobkit in your mods and modpacks. diff --git a/mods/mobkit/behaviors2override.lua b/mods/mobkit/behaviors2override.lua new file mode 100644 index 0000000..1ddd0fb --- /dev/null +++ b/mods/mobkit/behaviors2override.lua @@ -0,0 +1,830 @@ +local abs = math.abs +local pi = math.pi +local floor = math.floor +local ceil = math.ceil +local random = math.random +local sqrt = math.sqrt +local max = math.max +local min = math.min +local tan = math.tan +local pow = math.pow +local dbg = minetest.chat_send_all + +local abr = tonumber(minetest.get_mapgen_setting('active_block_range')) or 3 + +local neighbors ={ + {x=1,z=0}, + {x=1,z=1}, + {x=0,z=1}, + {x=-1,z=1}, + {x=-1,z=0}, + {x=-1,z=-1}, + {x=0,z=-1}, + {x=1,z=-1} + } + +function [yournamespace].dir2neighbor(dir) + dir.y=0 + dir=vector.round(vector.normalize(dir)) + for k,v in ipairs(neighbors) do + if v.x == dir.x and v.z == dir.z then return k end + end + return 1 +end + +function [yournamespace].neighbor_shift(neighbor,shift) -- int shift: minus is left, plus is right + return (8+neighbor+shift-1)%8+1 +end + +function [yournamespace].is_neighbor_node_reachable(self,neighbor) -- todo: take either number or pos + local offset = neighbors[neighbor] + local pos=mobkit.get_stand_pos(self) + local tpos = mobkit.get_node_pos(mobkit.pos_shift(pos,offset)) + local recursteps = ceil(self.jump_height)+1 + local height, liquidflag = mobkit.get_terrain_height(tpos,recursteps) + + if height and abs(height-pos.y) <= self.jump_height then + tpos.y = height + height = height - pos.y + + -- don't cut corners + if neighbor % 2 == 0 then -- diagonal neighbors are even + local n2 = neighbor-1 -- left neighbor never < 0 + offset = neighbors[n2] + local t2 = mobkit.get_node_pos(mobkit.pos_shift(pos,offset)) + local h2 = mobkit.get_terrain_height(t2,recursteps) + if h2 and h2 - pos.y > 0.02 then return end + n2 = (neighbor+1)%8 -- right neighbor + offset = neighbors[n2] + t2 = mobkit.get_node_pos(mobkit.pos_shift(pos,offset)) + h2 = mobkit.get_terrain_height(t2,recursteps) + if h2 and h2 - pos.y > 0.02 then return end + end + + -- check headroom + if tpos.y+self.height-pos.y > 1 then -- if head in next node above, else no point checking headroom + local snpos = mobkit.get_node_pos(pos) + local pos1 = {x=pos.x,y=snpos.y+1,z=pos.z} -- current pos plus node up + local pos2 = {x=tpos.x,y=tpos.y+self.height,z=tpos.z} -- target head pos + + local nodes = mobkit.get_nodes_in_area(pos1,pos2,true) + + for p,node in pairs(nodes) do + if snpos.x==p.x and snpos.z==p.z then + if node.name=='ignore' or node.walkable then return end + else + if node.name=='ignore' or + (node.walkable and mobkit.get_node_height(p)>tpos.y+0.001) then return end + end + end + end + + return height, tpos, liquidflag + else + return + end +end + +function [yournamespace].get_next_waypoint(self,tpos) + local pos = mobkit.get_stand_pos(self) + local dir=vector.direction(pos,tpos) + local neighbor = [yournamespace].dir2neighbor(dir) + local function update_pos_history(self,pos) + table.insert(self.pos_history,1,pos) + if #self.pos_history > 2 then table.remove(self.pos_history,#self.pos_history) end + end + local nogopos = self.pos_history[2] + + local height, pos2, liquidflag = [yournamespace].is_neighbor_node_reachable(self,neighbor) + if height and not liquidflag + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + + local heightl = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,-1)) + if heightl and abs(heightl-height)<0.001 then + local heightr = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,1)) + if heightr and abs(heightr-height)<0.001 then + dir.y = 0 + local dirn = vector.normalize(dir) + local npos = mobkit.get_node_pos(mobkit.pos_shift(pos,neighbors[neighbor])) + local factor = abs(dirn.x) > abs(dirn.z) and abs(npos.x-pos.x) or abs(npos.z-pos.z) + pos2=mobkit.pos_shift(pos,{x=dirn.x*factor,z=dirn.z*factor}) + end + end + update_pos_history(self,pos2) + return height, pos2 + else + + for i=1,3 do + -- scan left + local height, pos2, liq = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,-i*self.path_dir)) + if height and not liq + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + update_pos_history(self,pos2) + return height,pos2 + end + -- scan right + height, pos2, liq = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,i*self.path_dir)) + if height and not liq + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + update_pos_history(self,pos2) + return height,pos2 + end + end + --scan rear + height, pos2, liquidflag = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,4)) + if height and not liquidflag + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + update_pos_history(self,pos2) + return height,pos2 + end + end + -- stuck condition here + table.remove(self.pos_history,2) + self.path_dir = self.path_dir*-1 -- subtle change in pathfinding +end + +function [yournamespace].get_next_waypoint_fast(self,tpos,nogopos) + local pos = mobkit.get_stand_pos(self) + local dir=vector.direction(pos,tpos) + local neighbor = [yournamespace].dir2neighbor(dir) + local height, pos2, liquidflag = [yournamespace].is_neighbor_node_reachable(self,neighbor) + + if height and not liquidflag then + local fast = false + heightl = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,-1)) + if heightl and abs(heightl-height)<0.001 then + heightr = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,1)) + if heightr and abs(heightr-height)<0.001 then + fast = true + dir.y = 0 + local dirn = vector.normalize(dir) + local npos = mobkit.get_node_pos(mobkit.pos_shift(pos,neighbors[neighbor])) + local factor = abs(dirn.x) > abs(dirn.z) and abs(npos.x-pos.x) or abs(npos.z-pos.z) + pos2=mobkit.pos_shift(pos,{x=dirn.x*factor,z=dirn.z*factor}) + end + end + return height, pos2, fast + else + + for i=1,4 do + -- scan left + height, pos2, liq = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,-i)) + if height and not liq then return height,pos2 end + -- scan right + height, pos2, liq = [yournamespace].is_neighbor_node_reachable(self,[yournamespace].neighbor_shift(neighbor,i)) + if height and not liq then return height,pos2 end + end + end +end + +function [yournamespace].goto_next_waypoint(self,tpos) + local height, pos2 = [yournamespace].get_next_waypoint(self,tpos) + + if not height then return false end + + if height <= 0.01 then + local yaw = self.object:get_yaw() + local tyaw = minetest.dir_to_yaw(vector.direction(self.object:get_pos(),pos2)) + if abs(tyaw-yaw) > 1 then + [yournamespace].lq_turn2pos(self,pos2) + end + [yournamespace].lq_dumbwalk(self,pos2) + else + [yournamespace].lq_turn2pos(self,pos2) + [yournamespace].lq_dumbjump(self,height) + end + return true +end + +---------------------------- +-- BEHAVIORS +---------------------------- +-- LOW LEVEL QUEUE FUNCTIONS +---------------------------- + +function [yournamespace].lq_turn2pos(self,tpos) + local func=function(self) + local pos = self.object:get_pos() + return mobkit.turn2yaw(self, + minetest.dir_to_yaw(vector.direction(pos,tpos))) + end + mobkit.queue_low(self,func) +end + +function [yournamespace].lq_idle(self,duration,anim) + anim = anim or 'stand' + local init = true + local func=function(self) + if init then + mobkit.animate(self,anim) + init=false + end + duration = duration-self.dtime + if duration <= 0 then return true end + end + mobkit.queue_low(self,func) +end + +function [yournamespace].lq_dumbwalk(self,dest,speed_factor) + local timer = 3 -- failsafe + speed_factor = speed_factor or 1 + local func=function(self) + mobkit.animate(self,'walk') + timer = timer - self.dtime + if timer < 0 then return true end + + local pos = mobkit.get_stand_pos(self) + local y = self.object:get_velocity().y + + if mobkit.is_there_yet2d(pos,minetest.yaw_to_dir(self.object:get_yaw()),dest) then +-- if mobkit.isnear2d(pos,dest,0.25) then + if not self.isonground or abs(dest.y-pos.y) > 0.1 then -- prevent uncontrolled fall when velocity too high +-- if abs(dest.y-pos.y) > 0.1 then -- isonground too slow for speeds > 4 + self.object:set_velocity({x=0,y=y,z=0}) + end + return true + end + + if self.isonground then + local dir = vector.normalize(vector.direction({x=pos.x,y=0,z=pos.z}, + {x=dest.x,y=0,z=dest.z})) + dir = vector.multiply(dir,self.max_speed*speed_factor) +-- self.object:set_yaw(minetest.dir_to_yaw(dir)) + mobkit.turn2yaw(self,minetest.dir_to_yaw(dir)) + dir.y = y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +-- initial velocity for jump height h, v= a*sqrt(h*2/a) ,add 20% +function [yournamespace].lq_dumbjump(self,height,anim) + anim = anim or 'stand' + local jump = true + local func=function(self) + local yaw = self.object:get_yaw() + if self.isonground then + if jump then + mobkit.animate(self,anim) + local dir = minetest.yaw_to_dir(yaw) + dir.y = -mobkit.gravity*sqrt((height+0.35)*2/-mobkit.gravity) + self.object:set_velocity(dir) + jump = false + else -- the eagle has landed + return true + end + else + local dir = minetest.yaw_to_dir(yaw) + local vel = self.object:get_velocity() + if self.lastvelocity.y < 0.9 then + dir = vector.multiply(dir,3) + end + dir.y = vel.y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +function [yournamespace].lq_jumpout(self) + local phase = 1 + local func=function(self) + local vel=self.object:get_velocity() + if phase == 1 then + vel.y=vel.y+5 + self.object:set_velocity(vel) + phase = 2 + else + if vel.y < 0 then return true end + local dir = minetest.yaw_to_dir(self.object:get_yaw()) + dir.y=vel.y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +function [yournamespace].lq_freejump(self) + local phase = 1 + local func=function(self) + local vel=self.object:get_velocity() + if phase == 1 then + vel.y=vel.y+6 + self.object:set_velocity(vel) + phase = 2 + else + if vel.y <= 0.01 then return true end + local dir = minetest.yaw_to_dir(self.object:get_yaw()) + dir.y=vel.y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +function [yournamespace].lq_jumpattack(self,height,target) + local init=true + local timer=0.5 + local tgtbox = target:get_properties().collisionbox + local func=function(self) + if not mobkit.is_alive(target) then return true end + if self.isonground then + if init then -- collision bug workaround + local vel = self.object:get_velocity() + local dir = minetest.yaw_to_dir(self.object:get_yaw()) + dir=vector.multiply(dir,6) + dir.y = -mobkit.gravity*sqrt(height*2/-mobkit.gravity) + self.object:set_velocity(dir) + mobkit.make_sound(self,'charge') + init=false + else + [yournamespace].lq_idle(self,0.3) + return true + end + else + local tgtpos = target:get_pos() + local pos = self.object:get_pos() + -- calculate attack spot + local yaw = self.object:get_yaw() + local dir = minetest.yaw_to_dir(yaw) + local apos = mobkit.pos_translate2d(pos,yaw,self.attack.range) + + if mobkit.is_pos_in_box(apos,tgtpos,tgtbox) then --bite + target:punch(self.object,1,self.attack) + -- bounce off + local vy = self.object:get_velocity().y + self.object:set_velocity({x=dir.x*-3,y=vy,z=dir.z*-3}) + -- play attack sound if defined + mobkit.make_sound(self,'attack') + return true + end + end + end + mobkit.queue_low(self,func) +end + +function [yournamespace].lq_fallover(self) + local zrot = 0 + local init = true + local func=function(self) + if init then + local vel = self.object:get_velocity() + self.object:set_velocity(mobkit.pos_shift(vel,{y=1})) + mobkit.animate(self,'stand') + init = false + end + zrot=zrot+pi*0.05 + local rot = self.object:get_rotation() + self.object:set_rotation({x=rot.x,y=rot.y,z=zrot}) + if zrot >= pi*0.5 then return true end + end + mobkit.queue_low(self,func) +end +----------------------------- +-- HIGH LEVEL QUEUE FUNCTIONS +----------------------------- + +function [yournamespace].dumbstep(self,height,tpos,speed_factor,idle_duration) + if height <= 0.001 then + [yournamespace].lq_turn2pos(self,tpos) + [yournamespace].lq_dumbwalk(self,tpos,speed_factor) + else + [yournamespace].lq_turn2pos(self,tpos) + [yournamespace].lq_dumbjump(self,height) + end + idle_duration = idle_duration or 6 + [yournamespace].lq_idle(self,random(ceil(idle_duration*0.5),idle_duration)) +end + +function [yournamespace].hq_roam(self,prty) + local func=function(self) + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local neighbor = random(8) + + local height, tpos, liquidflag = [yournamespace].is_neighbor_node_reachable(self,neighbor) + if height and not liquidflag then [yournamespace].dumbstep(self,height,tpos,0.3) end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_follow0(self,tgtobj) -- probably delete this one + local func = function(self) + if not tgtobj then return true end + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + if vector.distance(pos,opos) > 3 then + local neighbor = [yournamespace].dir2neighbor(vector.direction(pos,opos)) +if not neighbor then return true end --temp debug + local height, tpos = [yournamespace].is_neighbor_node_reachable(self,neighbor) + if height then [yournamespace].dumbstep(self,height,tpos) + else + for i=1,4 do --scan left + height, tpos = [yournamespace].is_neighbor_node_reachable(self,(8+neighbor-i-1)%8+1) + if height then [yournamespace].dumbstep(self,height,tpos) + break + end --scan right + height, tpos = [yournamespace].is_neighbor_node_reachable(self,(neighbor+i-1)%8+1) + if height then [yournamespace].dumbstep(self,height,tpos) + break + end + end + end + else + [yournamespace].lq_idle(self,1) + end + end + end + mobkit.queue_high(self,func,0) +end + +function [yournamespace].hq_follow(self,prty,tgtobj) + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + if vector.distance(pos,opos) > 3 then + [yournamespace].goto_next_waypoint(self,opos) + else + [yournamespace].lq_idle(self,1) + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_goto(self,prty,tpos) + local func = function(self) + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + if vector.distance(pos,tpos) > 3 then + [yournamespace].goto_next_waypoint(self,tpos) + else + return true + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_runfrom(self,prty,tgtobj) + local init=true + local timer=6 + local func = function(self) + + if not mobkit.is_alive(tgtobj) then return true end + if init then + timer = timer-self.dtime + if timer <=0 or vector.distance(self.object:get_pos(),tgtobj:get_pos()) < 8 then + mobkit.make_sound(self,'scared') + init=false + end + return + end + + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + if vector.distance(pos,opos) < self.view_range*1.1 then + local tpos = {x=2*pos.x - opos.x, + y=opos.y, + z=2*pos.z - opos.z} + [yournamespace].goto_next_waypoint(self,tpos) + else + self.object:set_velocity({x=0,y=0,z=0}) + return true + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_hunt(self,prty,tgtobj) + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + local dist = vector.distance(pos,opos) + if dist > self.view_range then + return true + elseif dist > 3 then + [yournamespace].goto_next_waypoint(self,opos) + else + [yournamespace].hq_attack(self,prty+1,tgtobj) + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_warn(self,prty,tgtobj) + local timer=0 + local tgttime = 0 + local init = true + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if init then + mobkit.animate(self,'stand') + init = false + end + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + local dist = vector.distance(pos,opos) + + if dist > 11 then + return true + elseif dist < 4 or timer > 12 then -- too close man +-- mobkit.clear_queue_high(self) + mobkit.remember(self,'hate',tgtobj:get_player_name()) + [yournamespace].hq_hunt(self,prty+1,tgtobj) -- priority + else + timer = timer+self.dtime + if mobkit.is_queue_empty_low(self) then + [yournamespace].lq_turn2pos(self,opos) + end + -- make noise in random intervals + if timer > tgttime then + mobkit.make_sound(self,'warn') + -- if self.sounds and self.sounds.warn then + -- minetest.sound_play(self.sounds.warn, {object=self.object}) + -- end + tgttime = timer + 1.1 + random()*1.5 + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_die(self) + local timer = 5 + local start = true + local func = function(self) + if start then + [yournamespace].lq_fallover(self) + self.logic = function(self) end -- brain dead as well + start=false + end + timer = timer-self.dtime + if timer < 0 then self.object:remove() end + end + mobkit.queue_high(self,func,100) +end + +function [yournamespace].hq_attack(self,prty,tgtobj) + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if mobkit.is_queue_empty_low(self) then + local pos = mobkit.get_stand_pos(self) +-- local tpos = tgtobj:get_pos() + local tpos = mobkit.get_stand_pos(tgtobj) + local dist = vector.distance(pos,tpos) + if dist > 3 then + return true + else + [yournamespace].lq_turn2pos(self,tpos) + local height = tgtobj:is_player() and 0.35 or tgtobj:get_luaentity().height*0.6 + if tpos.y+height>pos.y then + [yournamespace].lq_jumpattack(self,tpos.y+height-pos.y,tgtobj) + else + [yournamespace].lq_dumbwalk(self,mobkit.pos_shift(tpos,{x=random()-0.5,z=random()-0.5})) + end + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_liquid_recovery(self,prty) -- scan for nearest land + local radius = 1 + local yaw = 0 + local func = function(self) + if not self.isinliquid then return true end + local pos=self.object:get_pos() + local vec = minetest.yaw_to_dir(yaw) + local pos2 = mobkit.pos_shift(pos,vector.multiply(vec,radius)) + local height, liquidflag = mobkit.get_terrain_height(pos2) + if height and not liquidflag then + [yournamespace].hq_swimto(self,prty,pos2) + return true + end + yaw=yaw+pi*0.25 + if yaw>2*pi then + yaw = 0 + radius=radius+1 + if radius > self.view_range then + self.hp = 0 + return true + end + end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_swimto(self,prty,tpos) + local box = self.object:get_properties().collisionbox + local cols = {} + local func = function(self) + if not self.isinliquid then + if self.isonground then return true end + return false + end + + local pos = mobkit.get_stand_pos(self) + local y=self.object:get_velocity().y + local pos2d = {x=pos.x,y=tpos.y,z=pos.z} + local dir=vector.normalize(vector.direction(pos2d,tpos)) + local yaw = minetest.dir_to_yaw(dir) + + if mobkit.timer(self,1) then + cols = mobkit.get_box_displace_cols(pos,box,dir,1) + for _,p in ipairs(cols[1]) do + p.y=pos.y + local h,l = mobkit.get_terrain_height(p) + if h and h>pos.y and self.isinliquid then + [yournamespace].lq_freejump(self) + break + end + end + elseif mobkit.turn2yaw(self,yaw) then + dir.y = y + self.object:set_velocity(dir) + end + end + mobkit.queue_high(self,func,prty) +end + +--------------------- +-- AQUATIC +--------------------- + +-- MACROS +local function aqua_radar_dumb(pos,yaw,range,reverse) + range = range or 4 + + local function okpos(p) + local node = mobkit.nodeatpos(p) + if node then + if node.drawtype == 'liquid' then + local nodeu = mobkit.nodeatpos(mobkit.pos_shift(p,{y=1})) + local noded = mobkit.nodeatpos(mobkit.pos_shift(p,{y=-1})) + if (nodeu and nodeu.drawtype == 'liquid') or (noded and noded.drawtype == 'liquid') then + return true + else + return false + end + else + local h,l = mobkit.get_terrain_height(p) + if h then + local node2 = mobkit.nodeatpos({x=p.x,y=h+1.99,z=p.z}) + if node2 and node2.drawtype == 'liquid' then return true, h end + else + return false + end + end + else + return false + end + end + + local fpos = mobkit.pos_translate2d(pos,yaw,range) + local ok,h = okpos(fpos) + if not ok then + local ffrom, fto, fstep + if reverse then + ffrom, fto, fstep = 3,1,-1 + else + ffrom, fto, fstep = 1,3,1 + end + for i=ffrom, fto, fstep do + local ok,h = okpos(mobkit.pos_translate2d(pos,yaw+i,range)) + if ok then return yaw+i,h end + ok,h = okpos(mobkit.pos_translate2d(pos,yaw-i,range)) + if ok then return yaw-i,h end + end + return yaw+pi,h + else + return yaw, h + end +end + +function [yournamespace].is_in_deep(target) + if not target then return false end + local nodepos = mobkit.get_stand_pos(target) + local node1 = mobkit.nodeatpos(nodepos) + nodepos.y=nodepos.y+1 + local node2 = mobkit.nodeatpos(nodepos) + nodepos.y=nodepos.y-2 + local node3 = mobkit.nodeatpos(nodepos) + if node1 and node2 and node3 and node1.drawtype=='liquid' and (node2.drawtype=='liquid' or node3.drawtype=='liquid') then + return true + end +end + +-- HQ behaviors + +function [yournamespace].hq_aqua_roam(self,prty,speed) + local tyaw = 0 + local init = true + local prvscanpos = {x=0,y=0,z=0} + local center = self.object:get_pos() + local func = function(self) + if init then + mobkit.animate(self,'def') + init = false + end + local pos = mobkit.get_stand_pos(self) + local yaw = self.object:get_yaw() + local scanpos = mobkit.get_node_pos(mobkit.pos_translate2d(pos,yaw,speed)) + if not vector.equals(prvscanpos,scanpos) then + prvscanpos=scanpos + local nyaw,height = aqua_radar_dumb(pos,yaw,speed,true) + if height and height > pos.y then + local vel = self.object:get_velocity() + vel.y = vel.y+1 + self.object:set_velocity(vel) + end + if yaw ~= nyaw then + tyaw=nyaw + [yournamespace].hq_aqua_turn(self,prty+1,tyaw,speed) + return + end + end + if mobkit.timer(self,1) then + if vector.distance(pos,center) > abr*16*0.5 then + tyaw = minetest.dir_to_yaw(vector.direction(pos,{x=center.x+random()*10-5,y=center.y,z=center.z+random()*10-5})) + else + if random(10)>=9 then tyaw=tyaw+random()*pi - pi*0.5 end + end + end + + mobkit.turn2yaw(self,tyaw,3) +-- local yaw = self.object:get_yaw() + mobkit.go_forward_horizontal(self,speed) + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_aqua_turn(self,prty,tyaw,speed) + local func = function(self) + local finished=mobkit.turn2yaw(self,tyaw) +-- local yaw = self.object:get_yaw() + mobkit.go_forward_horizontal(self,speed) + if finished then return true end + end + mobkit.queue_high(self,func,prty) +end + +function [yournamespace].hq_aqua_attack(self,prty,tgtobj,speed) + local tyaw = 0 + local prvscanpos = {x=0,y=0,z=0} + local init = true + local tgtbox = tgtobj:get_properties().collisionbox + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if init then + mobkit.animate(self,'fast') + mobkit.make_sound(self,'attack') + init = false + end + local pos = mobkit.get_stand_pos(self) + local yaw = self.object:get_yaw() + local scanpos = mobkit.get_node_pos(mobkit.pos_translate2d(pos,yaw,speed)) + if not vector.equals(prvscanpos,scanpos) then + prvscanpos=scanpos + local nyaw,height = aqua_radar_dumb(pos,yaw,speed*0.5) + if height and height > pos.y then + local vel = self.object:get_velocity() + vel.y = vel.y+1 + self.object:set_velocity(vel) + end + if yaw ~= nyaw then + tyaw=nyaw + [yournamespace].hq_aqua_turn(self,prty+1,tyaw,speed) + return + end + end + + local tpos = tgtobj:get_pos() + local tyaw=minetest.dir_to_yaw(vector.direction(pos,tpos)) + mobkit.turn2yaw(self,tyaw,3) + local yaw = self.object:get_yaw() + if mobkit.timer(self,1) then + if not [yournamespace].is_in_deep(tgtobj) then return true end + local vel = self.object:get_velocity() + if tpos.y>pos.y+0.5 then self.object:set_velocity({x=vel.x,y=vel.y+0.5,z=vel.z}) + elseif tpos.y 0.02 then return end + n2 = (neighbor+1)%8 -- right neighbor + offset = neighbors[n2] + t2 = mobkit.get_node_pos(mobkit.pos_shift(pos,offset)) + h2 = mobkit.get_terrain_height(t2,recursteps) + if h2 and h2 - pos.y > 0.02 then return end + end + + -- check headroom + if tpos.y+self.height-pos.y > 1 then -- if head in next node above, else no point checking headroom + local snpos = mobkit.get_node_pos(pos) + local pos1 = {x=pos.x,y=snpos.y+1,z=pos.z} -- current pos plus node up + local pos2 = {x=tpos.x,y=tpos.y+self.height,z=tpos.z} -- target head pos + + local nodes = mobkit.get_nodes_in_area(pos1,pos2,true) + + for p,node in pairs(nodes) do + if snpos.x==p.x and snpos.z==p.z then + if node.name=='ignore' or node.walkable then return end + else + if node.name=='ignore' or + (node.walkable and mobkit.get_node_height(p)>tpos.y+0.001) then return end + end + end + end + + return height, tpos, liquidflag + else + return + end +end + +function mobkit.get_next_waypoint(self,tpos) + local pos = mobkit.get_stand_pos(self) + local dir=vector.direction(pos,tpos) + local neighbor = mobkit.dir2neighbor(dir) + local function update_pos_history(self,pos) + table.insert(self.pos_history,1,pos) + if #self.pos_history > 2 then table.remove(self.pos_history,#self.pos_history) end + end + local nogopos = self.pos_history[2] + + local height, pos2, liquidflag = mobkit.is_neighbor_node_reachable(self,neighbor) + if height and not liquidflag + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + + local heightl = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,-1)) + if heightl and abs(heightl-height)<0.001 then + local heightr = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,1)) + if heightr and abs(heightr-height)<0.001 then + dir.y = 0 + local dirn = vector.normalize(dir) + local npos = mobkit.get_node_pos(mobkit.pos_shift(pos,neighbors[neighbor])) + local factor = abs(dirn.x) > abs(dirn.z) and abs(npos.x-pos.x) or abs(npos.z-pos.z) + pos2=mobkit.pos_shift(pos,{x=dirn.x*factor,z=dirn.z*factor}) + end + end + update_pos_history(self,pos2) + return height, pos2 + else + + for i=1,3 do + -- scan left + local height, pos2, liq = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,-i*self.path_dir)) + if height and not liq + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + update_pos_history(self,pos2) + return height,pos2 + end + -- scan right + height, pos2, liq = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,i*self.path_dir)) + if height and not liq + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + update_pos_history(self,pos2) + return height,pos2 + end + end + --scan rear + height, pos2, liquidflag = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,4)) + if height and not liquidflag + and not (nogopos and mobkit.isnear2d(pos2,nogopos,0.1)) then + update_pos_history(self,pos2) + return height,pos2 + end + end + -- stuck condition here + table.remove(self.pos_history,2) + self.path_dir = self.path_dir*-1 -- subtle change in pathfinding +end + +function mobkit.get_next_waypoint_fast(self,tpos,nogopos) + local pos = mobkit.get_stand_pos(self) + local dir=vector.direction(pos,tpos) + local neighbor = mobkit.dir2neighbor(dir) + local height, pos2, liquidflag = mobkit.is_neighbor_node_reachable(self,neighbor) + + if height and not liquidflag then + local fast = false + local heightl = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,-1)) + if heightl and abs(heightl-height)<0.001 then + local heightr = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,1)) + if heightr and abs(heightr-height)<0.001 then + fast = true + dir.y = 0 + local dirn = vector.normalize(dir) + local npos = mobkit.get_node_pos(mobkit.pos_shift(pos,neighbors[neighbor])) + local factor = abs(dirn.x) > abs(dirn.z) and abs(npos.x-pos.x) or abs(npos.z-pos.z) + pos2=mobkit.pos_shift(pos,{x=dirn.x*factor,z=dirn.z*factor}) + end + end + return height, pos2, fast + else + for i=1,4 do + -- scan left + height, pos2, liquidflag = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,-i)) + if height and not liq then return height,pos2 end + -- scan right + height, pos2, liquidflag = mobkit.is_neighbor_node_reachable(self,mobkit.neighbor_shift(neighbor,i)) + if height and not liquidflag then return height,pos2 end + end + end +end + +function mobkit.goto_next_waypoint(self,tpos) + local height, pos2 = mobkit.get_next_waypoint(self,tpos) + + if not height then return false end + + if height <= 0.01 then + local yaw = self.object:get_yaw() + local tyaw = minetest.dir_to_yaw(vector.direction(self.object:get_pos(),pos2)) + if abs(tyaw-yaw) > 1 then + mobkit.lq_turn2pos(self,pos2) + end + mobkit.lq_dumbwalk(self,pos2) + else + mobkit.lq_turn2pos(self,pos2) + mobkit.lq_dumbjump(self,height) + end + return true +end + +---------------------------- +-- BEHAVIORS +---------------------------- +-- LOW LEVEL QUEUE FUNCTIONS +---------------------------- + +function mobkit.lq_turn2pos(self,tpos) + local func=function(self) + local pos = self.object:get_pos() + return mobkit.turn2yaw(self, + minetest.dir_to_yaw(vector.direction(pos,tpos))) + end + mobkit.queue_low(self,func) +end + +function mobkit.lq_idle(self,duration,anim) + anim = anim or 'stand' + local init = true + local func=function(self) + if init then + mobkit.animate(self,anim) + init=false + end + duration = duration-self.dtime + if duration <= 0 then return true end + end + mobkit.queue_low(self,func) +end + +function mobkit.lq_dumbwalk(self,dest,speed_factor) + local timer = 3 -- failsafe + speed_factor = speed_factor or 1 + local func=function(self) + mobkit.animate(self,'walk') + timer = timer - self.dtime + if timer < 0 then return true end + + local pos = mobkit.get_stand_pos(self) + local y = self.object:get_velocity().y + + if mobkit.is_there_yet2d(pos,minetest.yaw_to_dir(self.object:get_yaw()),dest) then +-- if mobkit.isnear2d(pos,dest,0.25) then + if not self.isonground or abs(dest.y-pos.y) > 0.1 then -- prevent uncontrolled fall when velocity too high +-- if abs(dest.y-pos.y) > 0.1 then -- isonground too slow for speeds > 4 + self.object:set_velocity({x=0,y=y,z=0}) + end + return true + end + + if self.isonground then + local dir = vector.normalize(vector.direction({x=pos.x,y=0,z=pos.z}, + {x=dest.x,y=0,z=dest.z})) + dir = vector.multiply(dir,self.max_speed*speed_factor) +-- self.object:set_yaw(minetest.dir_to_yaw(dir)) + mobkit.turn2yaw(self,minetest.dir_to_yaw(dir)) + dir.y = y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +-- initial velocity for jump height h, v= a*sqrt(h*2/a) ,add 20% +function mobkit.lq_dumbjump(self,height,anim) + anim = anim or 'stand' + local jump = true + local func=function(self) + local yaw = self.object:get_yaw() + if self.isonground then + if jump then + mobkit.animate(self,anim) + local dir = minetest.yaw_to_dir(yaw) + dir.y = -mobkit.gravity*sqrt((height+0.35)*2/-mobkit.gravity) + self.object:set_velocity(dir) + jump = false + else -- the eagle has landed + return true + end + else + local dir = minetest.yaw_to_dir(yaw) + local vel = self.object:get_velocity() + if self.lastvelocity.y < 0.9 then + dir = vector.multiply(dir,3) + end + dir.y = vel.y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +function mobkit.lq_jumpout(self) + local phase = 1 + local func=function(self) + local vel=self.object:get_velocity() + if phase == 1 then + vel.y=vel.y+5 + self.object:set_velocity(vel) + phase = 2 + else + if vel.y < 0 then return true end + local dir = minetest.yaw_to_dir(self.object:get_yaw()) + dir.y=vel.y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +function mobkit.lq_freejump(self) + local phase = 1 + local func=function(self) + local vel=self.object:get_velocity() + if phase == 1 then + vel.y=vel.y+6 + self.object:set_velocity(vel) + phase = 2 + else + if vel.y <= 0.01 then return true end + local dir = minetest.yaw_to_dir(self.object:get_yaw()) + dir.y=vel.y + self.object:set_velocity(dir) + end + end + mobkit.queue_low(self,func) +end + +function mobkit.lq_jumpattack(self,height,target) + local init=true + local timer=0.5 + local tgtbox = target:get_properties().collisionbox + local func=function(self) + if not mobkit.is_alive(target) then return true end + if self.isonground then + if init then -- collision bug workaround + local vel = self.object:get_velocity() + local dir = minetest.yaw_to_dir(self.object:get_yaw()) + dir=vector.multiply(dir,6) + dir.y = -mobkit.gravity*sqrt(height*2/-mobkit.gravity) + self.object:set_velocity(dir) + mobkit.make_sound(self,'charge') + init=false + else + mobkit.lq_idle(self,0.3) + return true + end + else + local tgtpos = target:get_pos() + local pos = self.object:get_pos() + -- calculate attack spot + local yaw = self.object:get_yaw() + local dir = minetest.yaw_to_dir(yaw) + local apos = mobkit.pos_translate2d(pos,yaw,self.attack.range) + + if mobkit.is_pos_in_box(apos,tgtpos,tgtbox) then --bite + target:punch(self.object,1,self.attack) + -- bounce off + local vy = self.object:get_velocity().y + self.object:set_velocity({x=dir.x*-3,y=vy,z=dir.z*-3}) + -- play attack sound if defined + mobkit.make_sound(self,'attack') + return true + end + end + end + mobkit.queue_low(self,func) +end + +function mobkit.lq_fallover(self) + local zrot = 0 + local init = true + local func=function(self) + if init then + local vel = self.object:get_velocity() + self.object:set_velocity(mobkit.pos_shift(vel,{y=1})) + mobkit.animate(self,'stand') + init = false + end + zrot=zrot+pi*0.05 + local rot = self.object:get_rotation() + self.object:set_rotation({x=rot.x,y=rot.y,z=zrot}) + if zrot >= pi*0.5 then return true end + end + mobkit.queue_low(self,func) +end +----------------------------- +-- HIGH LEVEL QUEUE FUNCTIONS +----------------------------- + +function mobkit.dumbstep(self,height,tpos,speed_factor,idle_duration) + if height <= 0.001 then + mobkit.lq_turn2pos(self,tpos) + mobkit.lq_dumbwalk(self,tpos,speed_factor) + else + mobkit.lq_turn2pos(self,tpos) + mobkit.lq_dumbjump(self,height) + end + idle_duration = idle_duration or 6 + mobkit.lq_idle(self,random(ceil(idle_duration*0.5),idle_duration)) +end + +function mobkit.hq_roam(self,prty) + local func=function(self) + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local neighbor = random(8) + + local height, tpos, liquidflag = mobkit.is_neighbor_node_reachable(self,neighbor) + if height and not liquidflag then mobkit.dumbstep(self,height,tpos,0.3) end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_follow0(self,tgtobj) -- probably delete this one + local func = function(self) + if not tgtobj then return true end + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + if vector.distance(pos,opos) > 3 then + local neighbor = mobkit.dir2neighbor(vector.direction(pos,opos)) +if not neighbor then return true end --temp debug + local height, tpos = mobkit.is_neighbor_node_reachable(self,neighbor) + if height then mobkit.dumbstep(self,height,tpos) + else + for i=1,4 do --scan left + height, tpos = mobkit.is_neighbor_node_reachable(self,(8+neighbor-i-1)%8+1) + if height then mobkit.dumbstep(self,height,tpos) + break + end --scan right + height, tpos = mobkit.is_neighbor_node_reachable(self,(neighbor+i-1)%8+1) + if height then mobkit.dumbstep(self,height,tpos) + break + end + end + end + else + mobkit.lq_idle(self,1) + end + end + end + mobkit.queue_high(self,func,0) +end + +function mobkit.hq_follow(self,prty,tgtobj) + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + if vector.distance(pos,opos) > 3 then + mobkit.goto_next_waypoint(self,opos) + else + mobkit.lq_idle(self,1) + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_goto(self,prty,tpos) + local func = function(self) + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + if vector.distance(pos,tpos) > 3 then + mobkit.goto_next_waypoint(self,tpos) + else + return true + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_runfrom(self,prty,tgtobj) + local init=true + local timer=6 + local func = function(self) + + if not mobkit.is_alive(tgtobj) then return true end + if init then + timer = timer-self.dtime + if timer <=0 or vector.distance(self.object:get_pos(),tgtobj:get_pos()) < 8 then + mobkit.make_sound(self,'scared') + init=false + end + return + end + + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + if vector.distance(pos,opos) < self.view_range*1.1 then + local tpos = {x=2*pos.x - opos.x, + y=opos.y, + z=2*pos.z - opos.z} + mobkit.goto_next_waypoint(self,tpos) + else + self.object:set_velocity({x=0,y=0,z=0}) + return true + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_hunt(self,prty,tgtobj) + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if mobkit.is_queue_empty_low(self) and self.isonground then + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + local dist = vector.distance(pos,opos) + if dist > self.view_range then + return true + elseif dist > 3 then + mobkit.goto_next_waypoint(self,opos) + else + mobkit.hq_attack(self,prty+1,tgtobj) + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_warn(self,prty,tgtobj) + local timer=0 + local tgttime = 0 + local init = true + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if init then + mobkit.animate(self,'stand') + init = false + end + local pos = mobkit.get_stand_pos(self) + local opos = tgtobj:get_pos() + local dist = vector.distance(pos,opos) + + if dist > 11 then + return true + elseif dist < 4 or timer > 12 then -- too close man +-- mobkit.clear_queue_high(self) + mobkit.remember(self,'hate',tgtobj:get_player_name()) + mobkit.hq_hunt(self,prty+1,tgtobj) -- priority + else + timer = timer+self.dtime + if mobkit.is_queue_empty_low(self) then + mobkit.lq_turn2pos(self,opos) + end + -- make noise in random intervals + if timer > tgttime then + mobkit.make_sound(self,'warn') + -- if self.sounds and self.sounds.warn then + -- minetest.sound_play(self.sounds.warn, {object=self.object}) + -- end + tgttime = timer + 1.1 + random()*1.5 + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_die(self) + local timer = 5 + local start = true + local func = function(self) + if start then + mobkit.lq_fallover(self) + self.logic = function(self) end -- brain dead as well + start=false + end + timer = timer-self.dtime + if timer < 0 then self.object:remove() end + end + mobkit.queue_high(self,func,100) +end + +function mobkit.hq_attack(self,prty,tgtobj) + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if mobkit.is_queue_empty_low(self) then + local pos = mobkit.get_stand_pos(self) +-- local tpos = tgtobj:get_pos() + local tpos = mobkit.get_stand_pos(tgtobj) + local dist = vector.distance(pos,tpos) + if dist > 3 then + return true + else + mobkit.lq_turn2pos(self,tpos) + local height = tgtobj:is_player() and 0.35 or tgtobj:get_luaentity().height*0.6 + if tpos.y+height>pos.y then + mobkit.lq_jumpattack(self,tpos.y+height-pos.y,tgtobj) + else + mobkit.lq_dumbwalk(self,mobkit.pos_shift(tpos,{x=random()-0.5,z=random()-0.5})) + end + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_liquid_recovery(self,prty) -- scan for nearest land + local radius = 1 + local yaw = 0 + local func = function(self) + if not self.isinliquid then return true end + local pos=self.object:get_pos() + local vec = minetest.yaw_to_dir(yaw) + local pos2 = mobkit.pos_shift(pos,vector.multiply(vec,radius)) + local height, liquidflag = mobkit.get_terrain_height(pos2) + if height and not liquidflag then + mobkit.hq_swimto(self,prty,pos2) + return true + end + yaw=yaw+pi*0.25 + if yaw>2*pi then + yaw = 0 + radius=radius+1 + if radius > self.view_range then + self.hp = 0 + return true + end + end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_swimto(self,prty,tpos) + local box = self.object:get_properties().collisionbox + local cols = {} + local func = function(self) + if not self.isinliquid then + if self.isonground then return true end + return false + end + + local pos = mobkit.get_stand_pos(self) + local y=self.object:get_velocity().y + local pos2d = {x=pos.x,y=tpos.y,z=pos.z} + local dir=vector.normalize(vector.direction(pos2d,tpos)) + local yaw = minetest.dir_to_yaw(dir) + + if mobkit.timer(self,1) then + cols = mobkit.get_box_displace_cols(pos,box,dir,1) + for _,p in ipairs(cols[1]) do + p.y=pos.y + local h,l = mobkit.get_terrain_height(p) + if h and h>pos.y and self.isinliquid then + mobkit.lq_freejump(self) + break + end + end + elseif mobkit.turn2yaw(self,yaw) then + dir.y = y + self.object:set_velocity(dir) + end + end + mobkit.queue_high(self,func,prty) +end + +--------------------- +-- AQUATIC +--------------------- + +-- MACROS +local function aqua_radar_dumb(pos,yaw,range,reverse) + range = range or 4 + + local function okpos(p) + local node = mobkit.nodeatpos(p) + if node then + if node.drawtype == 'liquid' then + local nodeu = mobkit.nodeatpos(mobkit.pos_shift(p,{y=1})) + local noded = mobkit.nodeatpos(mobkit.pos_shift(p,{y=-1})) + if (nodeu and nodeu.drawtype == 'liquid') or (noded and noded.drawtype == 'liquid') then + return true + else + return false + end + else + local h,l = mobkit.get_terrain_height(p) + if h then + local node2 = mobkit.nodeatpos({x=p.x,y=h+1.99,z=p.z}) + if node2 and node2.drawtype == 'liquid' then return true, h end + else + return false + end + end + else + return false + end + end + + local fpos = mobkit.pos_translate2d(pos,yaw,range) + local ok,h = okpos(fpos) + if not ok then + local ffrom, fto, fstep + if reverse then + ffrom, fto, fstep = 3,1,-1 + else + ffrom, fto, fstep = 1,3,1 + end + for i=ffrom, fto, fstep do + local ok,h = okpos(mobkit.pos_translate2d(pos,yaw+i,range)) + if ok then return yaw+i,h end + ok,h = okpos(mobkit.pos_translate2d(pos,yaw-i,range)) + if ok then return yaw-i,h end + end + return yaw+pi,h + else + return yaw, h + end +end + +function mobkit.is_in_deep(target) + if not target then return false end + local nodepos = mobkit.get_stand_pos(target) + local node1 = mobkit.nodeatpos(nodepos) + nodepos.y=nodepos.y+1 + local node2 = mobkit.nodeatpos(nodepos) + nodepos.y=nodepos.y-2 + local node3 = mobkit.nodeatpos(nodepos) + if node1 and node2 and node3 and node1.drawtype=='liquid' and (node2.drawtype=='liquid' or node3.drawtype=='liquid') then + return true + end +end + +-- HQ behaviors + +function mobkit.hq_aqua_roam(self,prty,speed) + local tyaw = 0 + local init = true + local prvscanpos = {x=0,y=0,z=0} + local center = self.object:get_pos() + local func = function(self) + if init then + mobkit.animate(self,'def') + init = false + end + local pos = mobkit.get_stand_pos(self) + local yaw = self.object:get_yaw() + local scanpos = mobkit.get_node_pos(mobkit.pos_translate2d(pos,yaw,speed)) + if not vector.equals(prvscanpos,scanpos) then + prvscanpos=scanpos + local nyaw,height = aqua_radar_dumb(pos,yaw,speed,true) + if height and height > pos.y then + local vel = self.object:get_velocity() + vel.y = vel.y+1 + self.object:set_velocity(vel) + end + if yaw ~= nyaw then + tyaw=nyaw + mobkit.hq_aqua_turn(self,prty+1,tyaw,speed) + return + end + end + if mobkit.timer(self,1) then + if vector.distance(pos,center) > abr*16*0.5 then + tyaw = minetest.dir_to_yaw(vector.direction(pos,{x=center.x+random()*10-5,y=center.y,z=center.z+random()*10-5})) + else + if random(10)>=9 then tyaw=tyaw+random()*pi - pi*0.5 end + end + end + + mobkit.turn2yaw(self,tyaw,3) +-- local yaw = self.object:get_yaw() + mobkit.go_forward_horizontal(self,speed) + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_aqua_turn(self,prty,tyaw,speed) + local func = function(self) + local finished=mobkit.turn2yaw(self,tyaw) +-- local yaw = self.object:get_yaw() + mobkit.go_forward_horizontal(self,speed) + if finished then return true end + end + mobkit.queue_high(self,func,prty) +end + +function mobkit.hq_aqua_attack(self,prty,tgtobj,speed) + local tyaw = 0 + local prvscanpos = {x=0,y=0,z=0} + local init = true + local tgtbox = tgtobj:get_properties().collisionbox + local func = function(self) + if not mobkit.is_alive(tgtobj) then return true end + if init then + mobkit.animate(self,'fast') + mobkit.make_sound(self,'attack') + init = false + end + local pos = mobkit.get_stand_pos(self) + local yaw = self.object:get_yaw() + local scanpos = mobkit.get_node_pos(mobkit.pos_translate2d(pos,yaw,speed)) + if not vector.equals(prvscanpos,scanpos) then + prvscanpos=scanpos + local nyaw,height = aqua_radar_dumb(pos,yaw,speed*0.5) + if height and height > pos.y then + local vel = self.object:get_velocity() + vel.y = vel.y+1 + self.object:set_velocity(vel) + end + if yaw ~= nyaw then + tyaw=nyaw + mobkit.hq_aqua_turn(self,prty+1,tyaw,speed) + return + end + end + + local tpos = tgtobj:get_pos() + local tyaw=minetest.dir_to_yaw(vector.direction(pos,tpos)) + mobkit.turn2yaw(self,tyaw,3) + local yaw = self.object:get_yaw() + if mobkit.timer(self,1) then + if not mobkit.is_in_deep(tgtobj) then return true end + local vel = self.object:get_velocity() + if tpos.y>pos.y+0.5 then self.object:set_velocity({x=vel.x,y=vel.y+0.5,z=vel.z}) + elseif tpos.y bpos.x+box[1] and pos.x < bpos.x+box[4] and + pos.y > bpos.y+box[2] and pos.y < bpos.y+box[5] and + pos.z > bpos.z+box[3] and pos.z < bpos.z+box[6] +end + +-- call this instead if you want feet position. +--[[ +function mobkit.get_stand_pos(thing) -- thing can be luaentity or objectref. + if type(thing) == 'table' then + return mobkit.pos_shift(thing.object:get_pos(),{y=thing.collisionbox[2]+0.01}) + elseif type(thing) == 'userdata' then + local colbox = thing:get_properties().collisionbox + return mobkit.pos_shift(thing:get_pos(),{y=colbox[2]+0.01}) + end +end --]] + +function mobkit.get_stand_pos(thing) -- thing can be luaentity or objectref. + local pos = {} + local colbox = {} + if type(thing) == 'table' then + pos = thing.object:get_pos() + colbox = thing.object:get_properties().collisionbox + elseif type(thing) == 'userdata' then + pos = thing:get_pos() + colbox = thing:get_properties().collisionbox + else + return false + end + return mobkit.pos_shift(pos,{y=colbox[2]+0.01}), pos +end + +function mobkit.set_acceleration(thing,vec,limit) + limit = limit or 100 + if type(thing) == 'table' then thing=thing.object end + vec.x=mobkit.minmax(vec.x,limit) + vec.y=mobkit.minmax(vec.y,limit) + vec.z=mobkit.minmax(vec.z,limit) + + thing:set_acceleration(vec) +end + +function mobkit.nodeatpos(pos) + local node = minetest.get_node_or_nil(pos) + if node then return minetest.registered_nodes[node.name] end +end + +function mobkit.get_nodename_off(pos,vec) + return minetest.get_node(mobkit.pos_shift(pos,vec)).name +end + +function mobkit.get_node_pos(pos) + return { + x=floor(pos.x+0.5), + y=floor(pos.y+0.5), + z=floor(pos.z+0.5), + } +end + +function mobkit.get_nodes_in_area(pos1,pos2,full) + local npos1=mobkit.get_node_pos(pos1) + local npos2=mobkit.get_node_pos(pos2) + local result = {} + local cnt = 0 -- safety + + local sx = (pos2.x 125 then + minetest.chat_send_all('get_nodes_in_area: area too big ') + return result + end + + until y==npos2.y + until z==npos2.z + until x==npos2.x + + return result +end + +function mobkit.get_hitbox_bottom(self) + local y = self.collisionbox[2] + local pos = self.object:get_pos() + return { + {x=pos.x+self.collisionbox[1],y=pos.y+y,z=pos.z+self.collisionbox[3]}, + {x=pos.x+self.collisionbox[1],y=pos.y+y,z=pos.z+self.collisionbox[6]}, + {x=pos.x+self.collisionbox[4],y=pos.y+y,z=pos.z+self.collisionbox[3]}, + {x=pos.x+self.collisionbox[4],y=pos.y+y,z=pos.z+self.collisionbox[6]}, + } +end + +function mobkit.get_node_height(pos) + local npos = mobkit.get_node_pos(pos) + local node = mobkit.nodeatpos(npos) + if node == nil then return nil end + + if node.walkable then + if node.drawtype == 'nodebox' then + if node.node_box and node.node_box.type == 'fixed' then + if type(node.node_box.fixed[1]) == 'number' then + return npos.y + node.node_box.fixed[5] ,0, false + elseif type(node.node_box.fixed[1]) == 'table' then + return npos.y + node.node_box.fixed[1][5] ,0, false + else + return npos.y + 0.5,1, false -- todo handle table of boxes + end + elseif node.node_box and node.node_box.type == 'leveled' then + return minetest.get_node_level(pos)/64-0.5+mobkit.get_node_pos(pos).y, 0, false + else + return npos.y + 0.5,1, false -- the unforeseen + end + else + return npos.y+0.5,1, false -- full node + end + else + local liquidflag = false + if node.drawtype == 'liquid' then liquidflag = true end + return npos.y-0.5,-1,liquidflag + end +end + +-- get_terrain_height +-- steps(optional) number of recursion steps; default=3 +-- dir(optional) is 1=up, -1=down, 0=both; default=0 +-- liquidflag(forbidden) never provide this parameter. +function mobkit.get_terrain_height(pos,steps,dir,liquidflag) --dir is 1=up, -1=down, 0=both + steps = steps or 3 + dir = dir or 0 + + local h,f,l = mobkit.get_node_height(pos) + if h == nil then return nil end + if l then liquidflag = true end + + if f==0 then + return h, liquidflag + end + + if dir==0 or dir==f then + steps = steps - 1 + if steps <=0 then return nil end + return mobkit.get_terrain_height(mobkit.pos_shift(pos,{y=f}),steps,f,liquidflag) + else + return h, liquidflag + end +end + +function mobkit.get_spawn_pos_abr(dtime,intrvl,radius,chance,reduction) + dtime = min(dtime,0.1) + local plyrs = minetest.get_connected_players() + intrvl=1/intrvl + + if random() 1 then + -- spawn in the front arc + yaw = minetest.dir_to_yaw(vel) + random()*0.35 - 0.75 + else + -- random yaw + yaw = random()*pi*2 - pi + end + local pos = plyr:get_pos() + local dir = vector.multiply(minetest.yaw_to_dir(yaw),radius) + local pos2 = vector.add(pos,dir) + pos2.y=pos2.y-5 + local height, liquidflag = mobkit.get_terrain_height(pos2,32) + if height then + local objs = minetest.get_objects_inside_radius(pos,radius*1.1) + for _,obj in ipairs(objs) do -- count mobs in abrange + if not obj:is_player() then + local lua = obj:get_luaentity() + if lua and lua.name ~= '__builtin:item' then + chance=chance + (1-chance)*reduction -- chance reduced for every mob in range + end + end + end + if chance < random() then + pos2.y = height + objs = minetest.get_objects_inside_radius(pos2,radius*0.95) + for _,obj in ipairs(objs) do -- do not spawn if another player around + if obj:is_player() then return end + end + return pos2, liquidflag + end + end + end +end + +function mobkit.turn2yaw(self,tyaw,rate) + tyaw = tyaw or 0 --temp + rate = rate or 6 + local yaw = self.object:get_yaw() + yaw = yaw+pi + tyaw=(tyaw+pi)%(pi*2) + + local step=min(self.dtime*rate,abs(tyaw-yaw)%(pi*2)) + + local dir = abs(tyaw-yaw)>pi and -1 or 1 + dir = tyaw>yaw and dir*1 or dir * -1 + + local nyaw = (yaw+step*dir)%(pi*2) + self.object:set_yaw(nyaw-pi) + + if nyaw==tyaw then return true, nyaw-pi + else return false, nyaw-pi end +end + +function mobkit.dir_to_rot(v,rot) + rot = rot or {x=0,y=0,z=0} + return {x = (v.x==0 and v.y==0 and v.z==0) and rot.x or math.atan2(v.y,vector.length({x=v.x,y=0,z=v.z})), + y = (v.x==0 and v.z==0) and rot.y or minetest.dir_to_yaw(v), + z=rot.z} +end + +function mobkit.rot_to_dir(rot) -- keep rot within <-pi/2,pi/2> + local dir = minetest.yaw_to_dir(rot.y) + dir.y = dir.y+tan(rot.x)*vector.length(dir) + return vector.normalize(dir) +end + +function mobkit.isnear2d(p1,p2,thresh) + if abs(p2.x-p1.x) < thresh and abs(p2.z-p1.z) < thresh then + return true + else + return false + end +end + +-- object has reached the destination if dest is in the rear half plane. +function mobkit.is_there_yet2d(pos,dir,dest) -- obj positon; facing vector; destination position + + local c = -dir.x*pos.x-dir.z*pos.z -- the constant + + if dir.z > 0 then + return dest.z <= (-dir.x*dest.x - c)/dir.z -- line equation + elseif dir.z < 0 then + return dest.z >= (-dir.x*dest.x - c)/dir.z + elseif dir.x > 0 then + return dest.x <= (-dir.z*dest.z - c)/dir.x + elseif dir.x < 0 then + return dest.x >= (-dir.z*dest.z - c)/dir.x + else + return false + end + +end + +function mobkit.isnear3d(p1,p2,thresh) + if abs(p2.x-p1.x) < thresh and abs(p2.z-p1.z) < thresh and abs(p2.y-p1.y) < thresh then + return true + else + return false + end +end + +function mobkit.get_box_intersect_cols(pos,box) + local pmin = {x=floor(pos.x+box[1]+0.5),z=floor(pos.z+box[3]+0.5)} + local pmax = {x=floor(pos.x+box[4]+0.5),z=floor(pos.z+box[6]+0.5)} + + local result= {} + for x=pmin.x,pmax.x do + for z=pmin.z,pmax.z do + table.insert(result,{x=x,z=z}) + end + end + return result +end + +function mobkit.get_box_displace_cols(pos,box,vec,dist) + + local result = {{}} + -- front facing corner pos and neighbors + local fpos = {pos.y} + local xpos={pos.y} + local zpos={pos.y} + local xoff=nil + local zoff=nil + + if vec.x < 0 then + fpos.x = pos.x+box[1] -- frontmost corner's x + xoff = box[4]-box[1] -- edge offset along x + else + fpos.x = pos.x+box[4] + xoff = box[1]-box[4] + end + + if vec.z < 0 then + fpos.z = pos.z+box[3] -- frontmost corner's z + zoff = box[6]-box[3] -- edge offset along z + else + fpos.z = pos.z+box[6] + zoff = box[3]-box[6] + end + + -- displacement vector + if dist then vec = vector.multiply(vector.normalize(vec),dist) end + + -- traverse x + local xsgn = sign(vec.x) + local zsgn = sign(zoff) + local index=0 + for x = floor(fpos.x+0.5)+xsgn*0.5, fpos.x+vec.x, xsgn do + index=index+1 + if index > 50 then return result end + result[index] = result[index] or {} + local zcomp = vec.x == 0 and 0 or fpos.z + (x-fpos.x)*vec.z/vec.x -- z component at the intersection of x and node edge + for z = floor(zcomp+0.5), floor(zcomp+zoff+0.5), zsgn do + table.insert(result[index],{x=x+xsgn*0.5,z=z}) + end + end + + -- traverse z + local zsgn = sign(vec.z) + local xsgn = sign(xoff) + index=0 + for z = floor(fpos.z + 0.5)+zsgn*0.5, fpos.z+vec.z, zsgn do + index=index+1 + if index > 50 then return result end + result[index] = result[index] or {} + local xcomp = vec.z == 0 and 0 or fpos.x + (z-fpos.z)*vec.x/vec.z + for x = floor(xcomp+0.5), floor(xcomp+xoff+0.5), xsgn do + table.insert(result[index],{x=x,z=z+zsgn*0.5}) + end + end + + return result +end + +function mobkit.get_box_height(thing) + if type(thing) == 'table' then thing = thing.object end + local colbox = thing:get_properties().collisionbox + local height + if colbox then height = colbox[5]-colbox[2] + else height = 0.1 end + + return height > 0 and height or 0.1 +end + +function mobkit.is_alive(thing) -- thing can be luaentity or objectref. +-- if not thing then return false end + if not mobkit.exists(thing) then return false end + if type(thing) == 'table' then return thing.hp > 0 end + if thing:is_player() then return thing:get_hp() > 0 + else + local lua = thing:get_luaentity() + local hp = lua and lua.hp or nil + return hp and hp > 0 + end +end + +function mobkit.exists(thing) + if not thing then return false end + if type(thing) == 'table' then thing=thing.object end + if type(thing) == 'userdata' then + if thing:is_player() then + if thing:get_look_horizontal() then return true end + else + if thing:get_yaw() then return true end + end + end +end + +function mobkit.hurt(luaent,dmg) + if not luaent then return false end + if type(luaent) == 'table' then + luaent.hp = max((luaent.hp or 0) - dmg,0) + end +end + +function mobkit.heal(luaent,dmg) + if not luaent then return false end + if type(luaent) == 'table' then + luaent.hp = min(luaent.max_hp,(luaent.hp or 0) + dmg) + end +end + +function mobkit.animate(self,anim) + if self.animation and self.animation[anim] then + if self._anim == anim then return end + self._anim=anim + + local aparms = {} + if #self.animation[anim] > 0 then + aparms = self.animation[anim][random(#self.animation[anim])] + else + aparms = self.animation[anim] + end + + aparms.frame_blend = aparms.frame_blend or 0 + + self.object:set_animation(aparms.range,aparms.speed,aparms.frame_blend,aparms.loop) + else + self._anim = nil + end +end + +function mobkit.make_sound(self, sound) + local spec = self.sounds and self.sounds[sound] + local param_table = {object=self.object} + + if type(spec) == 'table' then + --pick random sound if it's a spec for random sounds + if #spec > 0 then spec = spec[random(#spec)] end + + --returns value or a random value within the range [value[1], value[2]) + local function in_range(value) + return type(value) == 'table' and value[1]+random()*(value[2]-value[1]) or value + end + + --pick random values within a range if they're a table + param_table.gain = in_range(spec.gain) + param_table.fade = in_range(spec.fade) + param_table.pitch = in_range(spec.pitch) + return minetest.sound_play(spec.name, param_table) + end + return minetest.sound_play(spec, param_table) +end + +function mobkit.go_forward_horizontal(self,speed) -- sets velocity in yaw direction, y component unaffected + local y = self.object:get_velocity().y + local yaw = self.object:get_yaw() + local vel = vector.multiply(minetest.yaw_to_dir(yaw),speed) + vel.y = y + self.object:set_velocity(vel) +end + +function mobkit.drive_to_pos(self,tpos,speed,turn_rate,dist) + local pos=self.object:get_pos() + dist = dist or 0.2 + if mobkit.isnear2d(pos,tpos,dist) then return true end + local tyaw = minetest.dir_to_yaw(vector.direction(pos,tpos)) + mobkit.turn2yaw(self,tyaw,turn_rate) + mobkit.go_forward_horizontal(self,speed) + return false +end + +function mobkit.timer(self,s) -- returns true approx every s seconds + local t1 = floor(self.time_total) + local t2 = floor(self.time_total+self.dtime) + if t2>t1 and t2%s==0 then return true end +end + +-- Memory functions. +-- Stuff in memory is serialized, never try to remember objectrefs. +function mobkit.remember(self,key,val) + self.memory[key]=val + return val +end + +function mobkit.forget(self,key) + self.memory[key] = nil +end + +function mobkit.recall(self,key) + return self.memory[key] +end + +-- Queue functions +function mobkit.queue_high(self,func,priority) + local maxprty = mobkit.get_queue_priority(self) + if priority > maxprty then + mobkit.clear_queue_low(self) + end + + for i,f in ipairs(self.hqueue) do + if priority > f.prty then + table.insert(self.hqueue,i,{func=func,prty=priority}) + return + end + end + table.insert(self.hqueue,{func=func,prty=priority}) +end + +function mobkit.queue_low(self,func) + table.insert(self.lqueue,func) +end + +function mobkit.is_queue_empty_low(self) + if #self.lqueue == 0 then return true + else return false end +end + +function mobkit.clear_queue_high(self) + self.hqueue = {} +end + +function mobkit.clear_queue_low(self) + self.lqueue = {} +end + +function mobkit.get_queue_priority(self) + if #self.hqueue > 0 then + return self.hqueue[1].prty + else return 0 end +end + +function mobkit.is_queue_empty_high(self) + if #self.hqueue == 0 then return true + else return false end +end + +function mobkit.get_nearby_player(self) -- returns random player if nearby or nil + for _,obj in ipairs(self.nearby_objects) do + if obj:is_player() and mobkit.is_alive(obj) then return obj end + end + return +end + +function mobkit.get_nearby_entity(self,name) -- returns random nearby entity of name or nil + for _,obj in ipairs(self.nearby_objects) do + if mobkit.is_alive(obj) and not obj:is_player() and obj:get_luaentity().name == name then return obj end + end + return +end + +function mobkit.get_closest_entity(self,name) -- returns closest entity of name or nil + local cobj = nil + local dist = abr*64 + local pos = self.object:get_pos() + for _,obj in ipairs(self.nearby_objects) do + local luaent = obj:get_luaentity() + if mobkit.is_alive(obj) and not obj:is_player() and luaent and luaent.name == name then + local opos = obj:get_pos() + local odist = abs(opos.x-pos.x) + abs(opos.z-pos.z) + if odist < dist then + dist=odist + cobj=obj + end + end + end + return cobj +end + +local function execute_queues(self) + --Execute hqueue + if #self.hqueue > 0 then + local func = self.hqueue[1].func + if func(self) then + table.remove(self.hqueue,1) + self.lqueue = {} + end + end + -- Execute lqueue + if #self.lqueue > 0 then + local func = self.lqueue[1] + if func(self) then + table.remove(self.lqueue,1) + end + end +end + +local function sensors() + local timer = 2 + local pulse = 1 + return function(self) + timer=timer-self.dtime + if timer < 0 then + + pulse = pulse + 1 -- do full range every third scan + local range = self.view_range + if pulse > 2 then + pulse = 1 + else + range = self.view_range*0.5 + end + + local pos = self.object:get_pos() +--local tim = minetest.get_us_time() + self.nearby_objects = minetest.get_objects_inside_radius(pos, range) +--minetest.chat_send_all(minetest.get_us_time()-tim) + for i,obj in ipairs(self.nearby_objects) do + if obj == self.object then + table.remove(self.nearby_objects,i) + break + end + end + timer=2 + end + end +end + +------------ +-- CALLBACKS +------------ + +function mobkit.default_brain(self) + if mobkit.is_queue_empty_high(self) then mobkit.hq_roam(self,0) end +end + +function mobkit.physics(self) + local vel=self.object:get_velocity() + local vnew = vector.new(vel) + -- dumb friction + + if self.isonground and not self.isinliquid then + vnew = {x= vel.x> 0.2 and vel.x*mobkit.friction or 0, + y=vel.y, + z=vel.z > 0.2 and vel.z*mobkit.friction or 0} + end + + -- bounciness + if self.springiness and self.springiness > 0 then + + if colinfo and colinfo.collides then + for _,c in ipairs(colinfo.collisions) do + if c.old_velocity[c.axis] > 0.1 then + vnew[c.axis] = vnew[c.axis] * self.springiness * -1 + end + end + elseif not colinfo then -- MT 5.2 and earlier + for _,k in ipairs({'y','z','x'}) do + if vel[k]==0 and abs(self.lastvelocity[k])> 0.1 then + vnew[k]=-self.lastvelocity[k]*self.springiness + end + end + end + end + + self.object:set_velocity(vnew) + + -- buoyancy + local surface = nil + local surfnodename = nil + local spos = mobkit.get_stand_pos(self) + spos.y = spos.y+0.01 + -- get surface height + local snodepos = mobkit.get_node_pos(spos) + local surfnode = mobkit.nodeatpos(spos) + while surfnode and surfnode.drawtype == 'liquid' do + surfnodename = surfnode.name + surface = snodepos.y+0.5 + if surface > spos.y+self.height then break end + snodepos.y = snodepos.y+1 + surfnode = mobkit.nodeatpos(snodepos) + end + self.isinliquid = surfnodename + if surface then -- standing in liquid +-- self.isinliquid = true + local submergence = min(surface-spos.y,self.height)/self.height +-- local balance = self.buoyancy*self.height + local buoyacc = mobkit.gravity*(self.buoyancy-submergence) + mobkit.set_acceleration(self.object, + {x=-vel.x*self.water_drag,y=buoyacc-vel.y*abs(vel.y)*0.4,z=-vel.z*self.water_drag}) + else +-- self.isinliquid = false + self.object:set_acceleration({x=0,y=mobkit.gravity,z=0}) + end + +end + +function mobkit.vitals(self) + -- vitals: fall damage + local vel = self.object:get_velocity() + local velocity_delta = abs(self.lastvelocity.y - vel.y) + if velocity_delta > mobkit.safe_velocity then + self.hp = self.hp - floor(self.max_hp * min(1, velocity_delta/mobkit.terminal_velocity)) + end + + -- vitals: oxygen + if self.lung_capacity then + local colbox = self.object:get_properties().collisionbox + local headnode = mobkit.nodeatpos(mobkit.pos_shift(self.object:get_pos(),{y=colbox[5]})) -- node at hitbox top + if headnode and headnode.drawtype == 'liquid' then + self.oxygen = self.oxygen - self.dtime + else + self.oxygen = self.lung_capacity + end + + if self.oxygen <= 0 then self.hp=0 end -- drown + end +end + +function mobkit.statfunc(self) + local tmptab={} + tmptab.memory = self.memory + tmptab.hp = self.hp + tmptab.texture_no = self.texture_no + return minetest.serialize(tmptab) +end + +function mobkit.actfunc(self, staticdata, dtime_s) + + self.logic = self.logic or self.brainfunc + self.physics = self.physics or mobkit.physics + + self.lqueue = {} + self.hqueue = {} + self.nearby_objects = {} + self.nearby_players = {} + self.pos_history = {} + self.path_dir = 1 + self.time_total = 0 + self.water_drag = self.water_drag or 1 + + local sdata = minetest.deserialize(staticdata) + if sdata then + for k,v in pairs(sdata) do + self[k] = v + end + end + + if self.textures==nil then + local prop_tex = self.object:get_properties().textures + if prop_tex then self.textures=prop_tex end + end + + if not self.memory then -- this is the initial activation + self.memory = {} + + -- texture variation + if #self.textures > 1 then self.texture_no = random(#self.textures) end + end + + if self.timeout and ((self.timeout>0 and dtime_s > self.timeout and next(self.memory)==nil) or + (self.timeout<0 and dtime_s > abs(self.timeout))) then + self.object:remove() + end + + -- apply texture + if self.textures and self.texture_no then + local props = {} + props.textures = {self.textures[self.texture_no]} + self.object:set_properties(props) + end + +--hp + self.max_hp = self.max_hp or 10 + self.hp = self.hp or self.max_hp +--armor + if type(self.armor_groups) ~= 'table' then + self.armor_groups={} + end + self.armor_groups.immortal = 1 + self.object:set_armor_groups(self.armor_groups) + + self.buoyancy = self.buoyancy or 0 + self.oxygen = self.oxygen or self.lung_capacity + self.lastvelocity = {x=0,y=0,z=0} + self.sensefunc=sensors() +end + +function mobkit.stepfunc(self,dtime,colinfo) -- not intended to be modified + self.dtime = min(dtime,0.2) + self.colinfo = colinfo + self.height = mobkit.get_box_height(self) + +-- physics comes first + local vel = self.object:get_velocity() + + if colinfo then + self.isonground = colinfo.touching_ground + else + if self.lastvelocity.y==0 and vel.y==0 then + self.isonground = true + else + self.isonground = false + end + end + + self:physics() + + if self.logic then + if self.view_range then self:sensefunc() end + self:logic() + execute_queues(self) + end + + self.lastvelocity = self.object:get_velocity() + self.time_total=self.time_total+self.dtime +end + +-- load example behaviors +dofile(minetest.get_modpath("mobkit") .. "/example_behaviors.lua") + +minetest.register_on_mods_loaded(function() + local mbkfuns = '' + for n,f in pairs(mobkit) do + if type(f) == 'function' then + mbkfuns = mbkfuns .. n .. string.split(minetest.serialize(f),'.lua')[2] or '' + end + end + local crc = minetest.sha1(mbkfuns) +-- dbg(crc) +-- if crc ~= 'a061770008fe9ecf8e1042a227dc3beabd10e481' then +-- minetest.log("error","Mobkit namespace inconsistent, has been modified by other mods.") +-- end +end) diff --git a/mods/mobkit/mobkit_api.txt b/mods/mobkit/mobkit_api.txt new file mode 100644 index 0000000..599711e --- /dev/null +++ b/mods/mobkit/mobkit_api.txt @@ -0,0 +1,560 @@ +Contents + +1 Concepts + 1.1 Behavior functions + 1.1.1 Low level functions + 1.1.2 High level functions + 1.1.2.1 Priority + 1.1.3 Modifying built in behaviors + 1.2 Logic function + 1.3 Processing diagram + 1.4 Entity definition + 1.5 Exposed luaentity members + +2 Reference + 2.1 Utility functions + 2.2 Built in behaviors + 2.2.1 High level behaviors + 2.2.2 Low level behaviors + 2.3 Constants and member variables + +----------- +1. Concepts +----------- + +1.1 Behavior functions + +These are the most fundamental units of code, every action entities can perform is a separate function. +There are two types of behaviors: +- low level, these govern physical actions and interactions (think moves) +- high level, these are logical structures governing low level behaviors in order to perform more complex tasks + +Behaviors run for considerable amount of time, this means the functions are being called repeatedly on consecutive engine steps. +Therefore a need for preserving state between calls, this is why they are implemented as closures, see defining conventions for details. + +Behavior functions are active until they finish the job, are removed from the queue or superseded by a higher priority behavior. +They signal finished state by returning true, therefore it's very important to carefully design the completion conditions + +For a behavior to begin executing it has to be put on a queue. There are two separate queues, one for low and one for high level behaviors. +Queuing is covered by behavour defining conventions + +Mobkit comes with some example behavior functions, which are located in /example_behaviors.lua +!!! In simplest scenarios there's no need to code behaviors, much can be achieved using only built-in stuff !!! +!!! To start using the api it's enough to learn defining mobs and writing brain functions !!! + + +1.1.1 Low level behavior functions + +These are physical actions and interactions: steps, jumps, turns etc. here you'll set velocity, yaw, kick off animations and sounds. + +Low level behavior definition: + +function mobkit.lq_bhv1(self,[optional additional persistent parameters]) -- enclosing function + ... -- optional definitions of additional persistent variables + local func=function(self) -- enclosed function, self is mandatory and the only allowed parameter + ... -- actual function definition, remember to return true eventually + end + mobkit.queue_low(self,func) -- this will queue the behavior at the time of lq_bhv1 call +end + + +1.1.2 High level behavior functions + +These are complex tasks like getting to a position, following other objects, hiding, patrolling an area etc. +Their job is tracking changes in the environment and managing low level behavior queue accordingly. + +High level behavior definition: + +function mobkit.hq_bhv1(self,priority,[optional additional persistent parameters]) -- enclosing function + ... -- optional definitions of additional persistent variables + local func=function(self) -- enclosed function, self is mandatory and the only allowed parameter + ... -- actual function definition, remember to return true eventually + end + mobkit.queue_high(self,func,priority) -- this will queue the behavior at the time of hq_bhv1 call +end + + +1.1.2.1 Priority + +Unlike low level behaviors which are executed in FIFO order, high level behaviors support prioritization. +This concept is essential for making sure the right behavior is active at the right time. +Prioritization is what makes it possible to interrupt a task in order to perform a more important one + +The currently executing behavior is always the first in the queue. +When a new behavior is placed onto the queue: +If the queue is not empty a new behavior is inserted before the first behavior of lower priority if such exists, or last. +If the new behavior supersedes the one currently executing, low level queue is purged immediately. + +Common idioms: + +hq_bhv1(self,prty): + ... + hq_bhv2(self,prty) -- bhv1 kicks off bhv2 with equal priority + return true -- and ends, + -- bhv2 becomes active on the next engine step. + +hq_bhv1(self,prty): + ... + hq_bhv2(self,prty+1) -- bhv1 kicks off bhv2 with higher priority + -- bhv2 takes over and when it ends, bhv1 resumes. + + +Particular prioritization scheme is to be designed by the user according to specific mod requirements. + +1.1.3 Modifying built in behaviors + +Do not modify example_behaviors.lua directly, because functions defined there are meant to be shared between mods. +Instead, copy the contents of /behaviors2override.lua into your mod/game, changing every occurence of the string '[yournamespace]' to the name of a lua table representing your namespace of choice. + +1.2 Logic function +------------------ +Every mob must have one. +Its job is managing high level behavior queue in response to events which are not intercepted by callbacks. +Contrary to what the name suggests, these functions needn't necessarily be too complex thanks to their limited responsibilities. + +Typical flow might look like this: + +if mobkit.timer(self,1) then -- returns true approx every second + local prty = mobkit.get_queue_priority(self) + + if prty < 20 + if ... then + hq_do_important_stuff(self,20) + return + end + end + + if prty < 10 then + if ... then + hq_do_something_else(self,10) + return + elseif ... then + hq_do_this_instead(self,10) + return + end + end + + if mobkit.is_queue_empty_high(self) then + hq_fool_around(self,0) + end +end + + +1.3 Processing diagram +---------------------- + + --------------------------------------- +| PHYSICS | +| | +| ----------------------- | +| | Logic Function | | +| ----------------------- | +| | | +| -----|----------------- | +| | V HL Queue| | +| | 1| 2| 3|... | | +| ----------------------- | +| | | +| -----|----------------- | +| | V LL Queue| | +| | 1| 2| 3|... | | +| ----------------------- | +| | + --------------------------------------- + + Order of execution during an engine step: + First comes physics: gravity, buoyancy, friction etc., then the logic function is called. + After that, the first behavior on the high level queue, if exists, + and the last, the first low level behavior if present. + +1.4 Entity definition +--------------------- + +minetest.register_entity("mod:name",{ + + -- required minetest api props + + initial_properties = { + physical = true, + collide_with_objects = true, + collisionbox = {...}, + visual = "mesh", + mesh = "...", + textures = {...}, + }, + + + -- required mobkit props + + timeout = [num], -- entities are removed after this many seconds inactive + -- 0 is never + -- mobs having memory entries are not affected + + buoyancy = [num], -- (0,1) - portion of collisionbox submerged + -- = 1 - controlled buoyancy (fish, submarine) + -- > 1 - drowns + -- < 0 - MC like water trampolining + + lung_capacity = [num], -- seconds + max_hp = [num], + on_step = mobkit.stepfunc, + on_activate = mobkit.actfunc, + get_staticdata = mobkit.statfunc, + logic = [function user defined], -- older 'brainfunc' name works as well. + + -- optional mobkit props + -- or used by built in behaviors + physics = [function user defined] -- optional, overrides built in physics + animation = { + [name]={range={x=[num],y=[num]},speed=[num],loop=[bool]}, -- single + + [name]={ -- variant, animations are chosen randomly. + {range={x=[num],y=[num]},speed=[num],loop=[bool]}, + {range={x=[num],y=[num]},speed=[num],loop=[bool]}, + ... + } + ... + } + sounds = { + [name] = [string filename], --single, simple, + + [name] = { --single, more powerful. All fields but 'name' are optional + name = [string filename], + gain=[num or range], --range is a table of the format {left_bound, right_bound} + fade=[num or range], + pitch=[num or range], + }, + + [name] = { --variant, sound is chosen randomly + { + name = [string filename], + gain=[num or range], + fade=[num or range], + pitch=[num or range], + }, + { + name = [string filename], + gain=[num or range], + fade=[num or range], + pitch=[num or range], + }, + ... + }, + ... + }, + max_speed = [num], -- m/s + jump_height = [num], -- nodes/meters + view_range = [num], -- nodes/meters + attack={range=[num], -- range is distance between attacker's collision box center + damage_groups={fleshy=[num]}}, -- and the tip of the murder weapon in nodes/meters + armor_groups = {fleshy=[num]} +}) + +1.5 Exposed luaentity members + +Some frequently used entity fields to be accessed directly for convenience + + self.dtime -- max(dtime as passed to on_step,0.5) - limit of 0.05 to prevent jerkines on long steps. + self.hp -- hitpoints + self.isonground -- true if in collision with negative Y + self.isinliquid -- true if the node at foot level is drawtype=='liquid' + +------------ +2. Reference +------------ + +2.1 Utility Functions + +function mobkit.minmax(v,m) + -- v,n: numbers + -- returns v trimmed to <-m,m> range + +function mobkit.get_terrain_height(pos,steps) + -- recursively search for walkable surface at pos. + -- steps (optional) is how far from pos it gives up, expressed in nodes, default 3 + -- Returns: + -- surface height at pos, or nil if not found + -- liquid flag: true if found surface is covered with liquid + +function mobkit.turn2yaw(self,tyaw,rate) + -- gradually turns towards yaw + -- self: luaentity + -- tyaw: target yaw in radians + -- rate: turn rate in rads/s + --returns: true if facing tyaw; current yaw + +function mobkit.timer(self,s) + -- returns true approx every s seconds + -- used to reduce execution of code that needn't necessarily be done on every engine step + +function mobkit.pos_shift(pos,vec) + -- convenience function + -- returns pos shifted by vec + -- vec needn't have all three components given, absent components are assumed zero. + -- e.g pos_shift(pos,{y=1}) is valid + +function mobkit.pos_translate2d(pos,yaw,dist) + -- returns pos translated in the yaw direction by dist + +function mobkit.get_stand_pos(thing) + -- returns object pos projected onto the bottom collisionbox face + -- thing can be luaentity or objectref. + +function mobkit.nodeatpos(pos) + -- convenience function + -- returns nodedef or nil if it's an ignore node + +function mobkit.get_node_pos(pos) + -- returns center of the node that pos is inside + +function mobkit.get_nodes_in_area(pos1,pos2,[full]) + -- in basic mode returns a table of unique nodes within area indexed by node + -- in full=true mode returns a table of nodes indexed by pos + -- works for up to 125 nodes. + +function mobkit.isnear2d(p1,p2,thresh) + -- returns true if pos p2 is within a square with center at pos p1 and radius thresh + -- y components are ignored + +function mobkit.is_there_yet2d(pos,dir,dest) -- obj positon; facing vector; destination position + -- returns true if a position dest is behind position pos according to facing vector dir + -- (checks if dest is in the rear half plane as defined by pos and dir) + -- y components are ignored + +function mobkit.isnear3d(p1,p2,thresh) + -- returns true if pos p2 is within a cube with center at pos p1 and radius thresh + +function mobkit.get_box_intersect_cols(pos,box) + -- returns an array of {x=,z=} columns that the box intersects with. + +function mobkit.get_box_displace_cols(pos,box,vec,dist) + -- returns an array of {x=,z=} columns that the box would pass by if moved by horizontal vector vec + -- if dist provided, vec gets normalized. + +function mobkit.dir_to_rot(v,rot) + -- converts a 3d vector v to rotation like in set_rotation() object method + -- rot (optional) is current object rotation + +function mobkit.rot_to_dir(rot) + -- converts minetest rotation vector (pitch,yaw,roll) to direction unit vector + +function mobkit.is_alive(thing) + -- non essential, checks if thing exists in the world and is alive + -- makes an assumption that luaentities are considered dead when their hp < 100 + -- thing can be luaentity or objectref. + -- used for stored luaentities and objectrefs + +function mobkit.exists(thing) + -- checks if thing exists in the world + -- thing can be luaentity or objectref. + -- used for stored luaentities and objectrefs + +function mobkit.hurt(luaent,dmg) + -- decrease luaent.hp by dmg + +function mobkit.heal(luaent,dmg) + -- increase luaent.hp by dmg + +function mobkit.get_spawn_pos_abr(dtime,intrvl,radius,chance,reduction) + -- returns a potential spawn position at random intervals + -- intrvl: avg spawn attempt interval for every player + -- radius: spawn distance in nodes, active_block_range*16 is recommended + -- chance: (0,1) chance to spawn a mob if there are no other objects in area + -- reduction: (0,1) spawn chance is reduced by this factor for every object in range. + --usage: + minetest.register_globalstep(function(dtime) + local spawnpos = mobkit.get_spawn_pos_abr(...) + if spawnpos then + ... -- mod/game specific logic + end + end) + +function mobkit.animate(self,anim) + -- makes an entity play an animation of name anim, or does nothing if not defined + -- anim is string, see entity definition + -- does nothing if the same animation is already running + +function mobkit.make_sound(self,sound) + -- sound is string, see entity definition + -- makes an entity play sound, or does nothing if not defined + --returns sound handle + +function mobkit.go_forward_horizontal(self,speed) + -- sets an entity's horizontal velocity in yaw direction. Vertical velocity unaffected. + +function mobkit.drive_to_pos(self,tpos,speed,turn_rate,dist) + -- moves in facing direction while gradually turning towards tpos, returns true if in dist distance from tpos + -- tpos: target position + -- speed: in m/s + -- turn_rate: in rad/s + -- dist: in m. + +-- Memory functions. + +This represents mob long term memory +Warning: Stuff in memory is serialized, never try to remember objectrefs or tables referencing them +or the engine will crash. + +function mobkit.remember(self,key,val) + -- premanently store a key, value pair +function mobkit.forget(self,key) + -- clears a memory entry +function mobkit.recall(self,key) + -- returns val associated with key + +-- Queue functions + +function mobkit.queue_high(self,func,priority) + -- only for use in behavior definitions, see 1.1.2 + +function mobkit.queue_low(self,func) + -- only for use in behavior definitions, see 1.1.1 + + +function mobkit.clear_queue_high(self) +function mobkit.clear_queue_low(self) + +function mobkit.is_queue_empty_high(self) +function mobkit.is_queue_empty_low(self) + +function mobkit.get_queue_priority(self) + -- returns the priority of currently running behavior + -- this is also the highest of all queued behaviors + + +-- Use these inside logic functions -- + +function mobkit.vitals(self) + -- default drowning and fall damage, call it before hp check +function mobkit.get_nearby_player(self) + -- returns random player if nearby or nil +function mobkit.get_nearby_entity(self,name) + -- returns random nearby entity of name or nil +function mobkit.get_closest_entity(self,name) + -- returns closest entity of name or nil + + +-- Misc + +Neighbors structure represents a node's horizontal neighbors +Not essential, used by some built in behaviors +Custom behaviors may not need it. + +Neighbor #1 is offset {x=1,z=0}, subsequent numbers go clockwise + +function mobkit.dir2neighbor(dir) + -- converts a 3d vector to neighbor number, y component ignored + +function mobkit.neighbor_shift(neighbor,shift) + -- get another neighbor number relative to the given, shift: plus is clockwise, minus the opposite + -- 1,1 = 2; 1,-2 = 7 + + +2.2 Built in behaviors + +function mobkit.goto_next_waypoint(self,tpos) + -- this functions groups common operations making mobs move in a specific direction + -- not a behavior itself, but is used by some built in HL behaviors + -- which use node by node movement algorithm + +2.2.1 High Level Behaviors -- + +function mobkit.hq_roam(self,prty) + -- slow random roaming + -- never returns + +function mobkit.hq_follow(self,prty,tgtobj) + -- follow the tgtobj + -- returns if tgtobj becomes inactive + +function mobkit.hq_goto(self,prty,tpos) + -- go to tpos position + -- returns on arrival + +function mobkit.hq_runfrom(self,prty,tgtobj) + -- run away from tgtobj object + -- returns when tgtobj far enough + +function mobkit.hq_hunt(self,prty,tgtobj) + -- follow tgtobj and when close enough, kick off hq_attack + -- returns when tgtobj too far + +function mobkit.hq_warn(self,prty,tgtobj) + -- when a tgtobj close by, turn towards them and make the 'warn' sound + -- kick off hq_hunt if tgtobj too close or timer expired + -- returns when tgtobj moves away + +function mobkit.hq_die(self) + -- default death, rotate and remove() after set time + +function mobkit.hq_attack(self,prty,tgtobj) + -- default attack, turns towards tgtobj and leaps + -- returns when tgtobj out of range + +function mobkit.hq_liquid_recovery(self,prty) + -- use when submerged in liquid, scan for nearest land + -- if land is found within view_range, kick off hq_swimto + -- otherwise die + +function mobkit.hq_swimto(self,prty,tpos) + -- swim towards the position tpos, jump if necessary + -- returns if standing firmly on dry land + + Aquatic behaviors: + + Macros: +function aqua_radar_dumb(pos,yaw,range,reverse) + -- assumes a mob will avoid shallows + -- checks if a pos in front of a moving entity swimmable + -- otherwise returns new position + +function mobkit.is_in_deep(target) + -- checks if an object is in water at least 2 nodes deep + + Hq Behaviors: +function mobkit.hq_aqua_roam(self,prty,speed) +function mobkit.hq_aqua_attack(self,prty,tgtobj,speed) +function mobkit.hq_aqua_turn(self,prty,tyaw,speed) + -- used by both previous bhv + +2.2.2 Low Level Behaviors -- + +function mobkit.lq_turn2pos(self,tpos) + -- gradually turn towards tpos position + -- returns when facing tpos + +function mobkit.lq_idle(self,duration) + -- do nothing for duration seconds + -- set 'stand' animation + +function mobkit.lq_dumbwalk(self,dest,speed_factor) + -- simply move towards dest + -- set 'walk' animation + +function mobkit.lq_dumbjump(self,height) + -- if standing on the ground, jump in the facing direction + -- height is relative to feet level + -- set 'stand' animation + +function mobkit.lq_freejump(self) + -- unconditional jump in the facing direction + -- useful e.g for getting out of water + -- returns when the apex has been reached + +function mobkit.lq_jumpattack(self,height,target) + -- jump towards the target, punch if a hit + -- returns after punch or on the ground + +function mobkit.lq_fallover(self) + -- gradually rotates Z = 0 to pi/2 + + +2.3 Constants and member variables -- + +mobkit.gravity = -9.8 +mobkit.friction = 0.4 -- inert entities will slow down when in contact with the ground + -- the smaller the number, the greater the effect + +self.dtime -- for convenience, dtime as passed to currently executing on_step() +self.isonground -- true if y velocity is 0 for at least two succesive steps +self.isinliquid -- true if feet submerged in liquid type=source diff --git a/mods/mobkit/mod.conf b/mods/mobkit/mod.conf new file mode 100644 index 0000000..d1b9d40 --- /dev/null +++ b/mods/mobkit/mod.conf @@ -0,0 +1,2 @@ +name = mobkit +description = Entity API diff --git a/mods/mobkit/screenshot.png b/mods/mobkit/screenshot.png new file mode 100644 index 0000000..9f50420 Binary files /dev/null and b/mods/mobkit/screenshot.png differ diff --git a/mods/more_armor/LICENSE.md b/mods/more_armor/LICENSE.md new file mode 100644 index 0000000..bf87b7c --- /dev/null +++ b/mods/more_armor/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2019 Napiophelios + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/mods/more_armor/depends.txt b/mods/more_armor/depends.txt new file mode 100644 index 0000000..019ebb2 --- /dev/null +++ b/mods/more_armor/depends.txt @@ -0,0 +1,2 @@ +3d_armor +mobs? diff --git a/mods/more_armor/description.txt b/mods/more_armor/description.txt new file mode 100644 index 0000000..d2c0b11 --- /dev/null +++ b/mods/more_armor/description.txt @@ -0,0 +1 @@ +Adds xtra armor items \ No newline at end of file diff --git a/mods/more_armor/init.lua b/mods/more_armor/init.lua new file mode 100644 index 0000000..e11fb87 --- /dev/null +++ b/mods/more_armor/init.lua @@ -0,0 +1,143 @@ +local modname = "more_armor" +local modpath = minetest.get_modpath(modname) +local S = dofile(modpath .. "/intllib.lua") + +-- Register Leather Helmet +minetest.register_tool("more_armor:helmet_leather", { + description = S("Leather Helmet"), + inventory_image = "more_armor_inv_helmet_leather.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}, +}) + +-- Register Leather Chestplates +minetest.register_tool("more_armor:chestplate_leather", { + description = S("Leather Chestplate"), + inventory_image = "more_armor_inv_chestplate_leather.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}, +}) + +minetest.register_tool("more_armor:chestplate_leather_padded", { + description = S("Padded Leather Chestplate"), + inventory_image = "more_armor_inv_chestplate_leather_padded.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}, +}) + +minetest.register_tool("more_armor:chestplate_leather_chain", { + description = "Chainmail & Leather Chestplate", + inventory_image = "more_armor_inv_chestplate_leather_chain.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}, +}) + +-- Register Leather Leggings +minetest.register_tool("more_armor:leggings_leather", { + description = S("Leather Leggings"), + inventory_image = "more_armor_inv_leggings_leather.png", + groups = {armor_legs=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, +}) + +minetest.register_tool("more_armor:leggings_leather_padded", { + description = S("Padded Leather Leggings"), + inventory_image = "more_armor_inv_leggings_leather_padded.png", + groups = {armor_legs=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, +}) + +minetest.register_tool("more_armor:leggings_leather_chain", { + description = S("Chainmail & Leather Leggings"), + inventory_image = "more_armor_inv_leggings_leather_chain.png", + groups = {armor_legs=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, +}) + +-- Register Leather Boots +minetest.register_tool("more_armor:boots_leather", { + description = S("Leather Boots"), + inventory_image = "more_armor_inv_boots_leather.png", + groups = {armor_feet=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}, + }) + +-- Register crafting recipes +minetest.register_craft({ + output = "more_armor:helmet_leather", + recipe = { + {"mobs:leather", "mobs:leather", "mobs:leather"}, + {"mobs:leather", "", "mobs:leather"}, + {"", "", ""}, + }, +}) + +minetest.register_craft({ + output = "more_armor:chestplate_leather", + recipe = { + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "mobs:leather", "mobs:leather"}, + {"mobs:leather", "mobs:leather", "mobs:leather"}, + }, +}) + +minetest.register_craft({ + output = "more_armor:chestplate_leather_padded", + recipe = { + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "group:wool", "mobs:leather"}, + {"mobs:leather", "group:wool", "mobs:leather"}, + }, +}) + +minetest.register_craft({ + output = "more_armor:chestplate_leather_chain", + recipe = { + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "default:steel_ingot", "mobs:leather"}, + {"mobs:leather", "default:steel_ingot", "mobs:leather"}, + }, +}) + +minetest.register_craft({ + output = "more_armor:leggings_leather", + recipe = { + {"mobs:leather", "mobs:leather", "mobs:leather"}, + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "", "mobs:leather"}, + }, +}) + +minetest.register_craft({ + output = "more_armor:leggings_leather_padded", + recipe = { + {"group:wool", "mobs:leather", "group:wool"}, + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "", "mobs:leather"}, + }, +}) + +minetest.register_craft({ + output = "more_armor:leggings_leather_chain", + recipe = { + {"default:steel_ingot", "mobs:leather", "default:steel_ingot"}, + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "", "mobs:leather"}, + }, +}) + +minetest.register_craft({ + output = "more_armor:boots_leather", + recipe = { + {"mobs:leather", "", "mobs:leather"}, + {"mobs:leather", "", "mobs:leather"}, + }, +}) diff --git a/mods/more_armor/intllib.lua b/mods/more_armor/intllib.lua new file mode 100755 index 0000000..6669d72 --- /dev/null +++ b/mods/more_armor/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/mods/more_armor/locale/es.po b/mods/more_armor/locale/es.po new file mode 100644 index 0000000..684ec2f --- /dev/null +++ b/mods/more_armor/locale/es.po @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-14 08:34+0200\n" +"PO-Revision-Date: 2018-12-11 23:40+0100\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: \n" +"Language-Team: \n" +"X-Generator: Poedit 1.8.11\n" + +#: init.lua +msgid "Leather Helmet" +msgstr "Casco de cuero" + +#: init.lua +msgid "Leather Chestplate" +msgstr "Peto de cuero" + +#: init.lua +msgid "Padded Leather Chestplate" +msgstr "Peto acolchado de cuero" + +#: init.lua +msgid "Chainmail & Leather Chestplate" +msgstr "Peto y cota de malla y de cuero" + +#: init.lua +msgid "Leather Leggings" +msgstr "Polainas de cuero" + +#: init.lua +msgid "Chainmail & Leather Leggings" +msgstr "Cota de malla y polainas de cuero" + +#: init.lua +msgid "Leather Boots" +msgstr "Botas de cuero" + diff --git a/mods/more_armor/mod.conf b/mods/more_armor/mod.conf new file mode 100644 index 0000000..9200820 --- /dev/null +++ b/mods/more_armor/mod.conf @@ -0,0 +1,4 @@ +name = more_armor +description = Adds xtra armor items +depends = 3d_armor +optional_depends = mobs diff --git a/mods/more_armor/screenshot.png b/mods/more_armor/screenshot.png new file mode 100644 index 0000000..fe2aa17 Binary files /dev/null and b/mods/more_armor/screenshot.png differ diff --git a/mods/more_armor/textures/LICENSE.txt b/mods/more_armor/textures/LICENSE.txt new file mode 100644 index 0000000..53f2dbb --- /dev/null +++ b/mods/more_armor/textures/LICENSE.txt @@ -0,0 +1,29 @@ + + +Textures by Napiophelios +LICENSE_CC-BY-SA-4.0.md + +more_armor_boots_leather.png +more_armor_boots_leather_preview.png +more_armor_chestplate_leather.png +more_armor_chestplate_leather_chain.png +more_armor_chestplate_leather_chain_preview.png +more_armor_chestplate_leather_padded.png +more_armor_chestplate_leather_padded_preview.png +more_armor_chestplate_leather_preview.png +more_armor_helmet_leather.png +more_armor_helmet_leather_preview.png +more_armor_inv_boots_leather.png +more_armor_inv_chestplate_leather.png +more_armor_inv_chestplate_leather_chain.png +more_armor_inv_chestplate_leather_padded.png +more_armor_inv_helmet_leather.png +more_armor_inv_leggings_leather.png +more_armor_inv_leggings_leather_chain.png +more_armor_inv_leggings_leather_padded.png +more_armor_leggings_leather.png +more_armor_leggings_leather_chain.png +more_armor_leggings_leather_chain_preview.png +more_armor_leggings_leather_padded.png +more_armor_leggings_leather_padded_preview.png +more_armor_leggings_leather_preview.png \ No newline at end of file diff --git a/mods/more_armor/textures/LICENSE_CC-BY-SA-4.0.md b/mods/more_armor/textures/LICENSE_CC-BY-SA-4.0.md new file mode 100644 index 0000000..18371dd --- /dev/null +++ b/mods/more_armor/textures/LICENSE_CC-BY-SA-4.0.md @@ -0,0 +1,427 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/mods/more_armor/textures/more_armor_boots_leather.png b/mods/more_armor/textures/more_armor_boots_leather.png new file mode 100644 index 0000000..77f4185 Binary files /dev/null and b/mods/more_armor/textures/more_armor_boots_leather.png differ diff --git a/mods/more_armor/textures/more_armor_boots_leather_preview.png b/mods/more_armor/textures/more_armor_boots_leather_preview.png new file mode 100644 index 0000000..9b1e4fc Binary files /dev/null and b/mods/more_armor/textures/more_armor_boots_leather_preview.png differ diff --git a/mods/more_armor/textures/more_armor_chestplate_leather.png b/mods/more_armor/textures/more_armor_chestplate_leather.png new file mode 100644 index 0000000..b4b9b1c Binary files /dev/null and b/mods/more_armor/textures/more_armor_chestplate_leather.png differ diff --git a/mods/more_armor/textures/more_armor_chestplate_leather_chain.png b/mods/more_armor/textures/more_armor_chestplate_leather_chain.png new file mode 100644 index 0000000..d08beab Binary files /dev/null and b/mods/more_armor/textures/more_armor_chestplate_leather_chain.png differ diff --git a/mods/more_armor/textures/more_armor_chestplate_leather_chain_preview.png b/mods/more_armor/textures/more_armor_chestplate_leather_chain_preview.png new file mode 100644 index 0000000..bd6b6a4 Binary files /dev/null and b/mods/more_armor/textures/more_armor_chestplate_leather_chain_preview.png differ diff --git a/mods/more_armor/textures/more_armor_chestplate_leather_padded.png b/mods/more_armor/textures/more_armor_chestplate_leather_padded.png new file mode 100644 index 0000000..4523003 Binary files /dev/null and b/mods/more_armor/textures/more_armor_chestplate_leather_padded.png differ diff --git a/mods/more_armor/textures/more_armor_chestplate_leather_padded_preview.png b/mods/more_armor/textures/more_armor_chestplate_leather_padded_preview.png new file mode 100644 index 0000000..e92d371 Binary files /dev/null and b/mods/more_armor/textures/more_armor_chestplate_leather_padded_preview.png differ diff --git a/mods/more_armor/textures/more_armor_chestplate_leather_preview.png b/mods/more_armor/textures/more_armor_chestplate_leather_preview.png new file mode 100644 index 0000000..d6e88a7 Binary files /dev/null and b/mods/more_armor/textures/more_armor_chestplate_leather_preview.png differ diff --git a/mods/more_armor/textures/more_armor_helmet_leather.png b/mods/more_armor/textures/more_armor_helmet_leather.png new file mode 100644 index 0000000..ccf1838 Binary files /dev/null and b/mods/more_armor/textures/more_armor_helmet_leather.png differ diff --git a/mods/more_armor/textures/more_armor_helmet_leather_preview.png b/mods/more_armor/textures/more_armor_helmet_leather_preview.png new file mode 100644 index 0000000..7169fbb Binary files /dev/null and b/mods/more_armor/textures/more_armor_helmet_leather_preview.png differ diff --git a/mods/more_armor/textures/more_armor_inv_boots_leather.png b/mods/more_armor/textures/more_armor_inv_boots_leather.png new file mode 100644 index 0000000..4281672 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_boots_leather.png differ diff --git a/mods/more_armor/textures/more_armor_inv_chestplate_leather.png b/mods/more_armor/textures/more_armor_inv_chestplate_leather.png new file mode 100644 index 0000000..e0cf997 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_chestplate_leather.png differ diff --git a/mods/more_armor/textures/more_armor_inv_chestplate_leather_chain.png b/mods/more_armor/textures/more_armor_inv_chestplate_leather_chain.png new file mode 100644 index 0000000..2685a86 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_chestplate_leather_chain.png differ diff --git a/mods/more_armor/textures/more_armor_inv_chestplate_leather_padded.png b/mods/more_armor/textures/more_armor_inv_chestplate_leather_padded.png new file mode 100644 index 0000000..2285144 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_chestplate_leather_padded.png differ diff --git a/mods/more_armor/textures/more_armor_inv_helmet_leather.png b/mods/more_armor/textures/more_armor_inv_helmet_leather.png new file mode 100644 index 0000000..aa9f276 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_helmet_leather.png differ diff --git a/mods/more_armor/textures/more_armor_inv_leggings_leather.png b/mods/more_armor/textures/more_armor_inv_leggings_leather.png new file mode 100644 index 0000000..70a5eaf Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_leggings_leather.png differ diff --git a/mods/more_armor/textures/more_armor_inv_leggings_leather_chain.png b/mods/more_armor/textures/more_armor_inv_leggings_leather_chain.png new file mode 100644 index 0000000..bc0ec50 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_leggings_leather_chain.png differ diff --git a/mods/more_armor/textures/more_armor_inv_leggings_leather_padded.png b/mods/more_armor/textures/more_armor_inv_leggings_leather_padded.png new file mode 100644 index 0000000..5d6c023 Binary files /dev/null and b/mods/more_armor/textures/more_armor_inv_leggings_leather_padded.png differ diff --git a/mods/more_armor/textures/more_armor_leggings_leather.png b/mods/more_armor/textures/more_armor_leggings_leather.png new file mode 100644 index 0000000..3be3ef7 Binary files /dev/null and b/mods/more_armor/textures/more_armor_leggings_leather.png differ diff --git a/mods/more_armor/textures/more_armor_leggings_leather_chain.png b/mods/more_armor/textures/more_armor_leggings_leather_chain.png new file mode 100644 index 0000000..37c321b Binary files /dev/null and b/mods/more_armor/textures/more_armor_leggings_leather_chain.png differ diff --git a/mods/more_armor/textures/more_armor_leggings_leather_chain_preview.png b/mods/more_armor/textures/more_armor_leggings_leather_chain_preview.png new file mode 100644 index 0000000..be7043a Binary files /dev/null and b/mods/more_armor/textures/more_armor_leggings_leather_chain_preview.png differ diff --git a/mods/more_armor/textures/more_armor_leggings_leather_padded.png b/mods/more_armor/textures/more_armor_leggings_leather_padded.png new file mode 100644 index 0000000..c9d46b0 Binary files /dev/null and b/mods/more_armor/textures/more_armor_leggings_leather_padded.png differ diff --git a/mods/more_armor/textures/more_armor_leggings_leather_padded_preview.png b/mods/more_armor/textures/more_armor_leggings_leather_padded_preview.png new file mode 100644 index 0000000..bee5f4d Binary files /dev/null and b/mods/more_armor/textures/more_armor_leggings_leather_padded_preview.png differ diff --git a/mods/more_armor/textures/more_armor_leggings_leather_preview.png b/mods/more_armor/textures/more_armor_leggings_leather_preview.png new file mode 100644 index 0000000..ac39c14 Binary files /dev/null and b/mods/more_armor/textures/more_armor_leggings_leather_preview.png differ diff --git a/mods/moreores/.gitignore b/mods/moreores/.gitignore new file mode 100755 index 0000000..8b38e58 --- /dev/null +++ b/mods/moreores/.gitignore @@ -0,0 +1,3 @@ +## Generic ignorable patterns and files +*~ +debug.txt diff --git a/mods/moreores/CHANGELOG.md b/mods/moreores/CHANGELOG.md new file mode 100644 index 0000000..e386b83 --- /dev/null +++ b/mods/moreores/CHANGELOG.md @@ -0,0 +1,44 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Polish translation. + +## [1.1.0] - 2019-03-23 + +### Added + +- Brazilian and Dutch translations. + +### Changed + +- Ores are now slower to mine and cannot be mined using wooden tools anymore. +- Updated intllib support to avoid using deprecated functions. + +### Deprecated + +- Deprecated hoes to follow Minetest Game's deprecation of hoes + made of "rare" materials. + - Hoes are still available in existing worlds, but they + cannot be crafted anymore. + +### Fixed + +- Hoes now use the `farming` mod's handling function and can no longer + turn desert sand into dirt. +- Handle tin which is now included in [Minetest Game](https://github.com/minetest/minetest_game). + If it is detected, then the tin nodes and items from More Ores won't be registered. + +## 1.0.0 - 2017-02-19 + +- Initial versioned release. + +[Unreleased]: https://github.com/minetest-mods/moreores/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/minetest-mods/moreores/compare/v1.0.0...v1.1.0 diff --git a/mods/moreores/CONTRIBUTING.md b/mods/moreores/CONTRIBUTING.md new file mode 100644 index 0000000..e2a55fa --- /dev/null +++ b/mods/moreores/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# Contributing to More Ores + +Thank you for your interest in More Ores! Before contributing, +be sure to know about these few guidelines: + +- Contributions have to be licensed under the zlib license (or compatible) + for code, and CC BY-SA 3.0 (or compatible) for assets. +- Make sure to update the changelog, keeping the + [changelog format](http://keepachangelog.com/en/1.0.0/) we use. +- Don't bump the version yourself. Maintainers will do this when necessary. diff --git a/mods/moreores/LICENSE.md b/mods/moreores/LICENSE.md new file mode 100644 index 0000000..d7470b4 --- /dev/null +++ b/mods/moreores/LICENSE.md @@ -0,0 +1,13 @@ +# zlib license + +Copyright © 2011-2019 Hugo Locurcio and contributors + +**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.** + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. diff --git a/mods/moreores/README.md b/mods/moreores/README.md new file mode 100644 index 0000000..255ca60 --- /dev/null +++ b/mods/moreores/README.md @@ -0,0 +1,74 @@ +# More Ores + +More Ores for [Minetest](https://www.minetest.net/), a free and open source infinite +world block sandbox game. + +[**Forum topic**](https://forum.minetest.net/viewtopic.php?f=11&t=549) + +## Installation + +### Download the mod + +To install More Ores, clone this Git repository into your Minetest's `mods/` +directory: + +```bash +git clone https://github.com/minetest-mods/moreores.git +``` + +You can also +[download a ZIP archive](https://github.com/minetest-mods/moreores/archive/master.zip) +of More Ores. If you do so, you will need to extract the archive then rename +the resulting folder from `moreores-master` to `moreores` – this is +**absolutely** required, as the mod won't work otherwise. + +### Enable the mod + +Once you have installed More Ores, you need to enable it in Minetest. +The procedure is as follows: + +#### Using the client's main menu + +This is the easiest way to enable More Ores when playing in singleplayer +(or on a server hosted from a client). + +1. Start Minetest and switch to the **Local Game** tab. +2. Select the world you want to enable More Ores in. +3. Click **Configure**, then enable `moreores` by double-clicking it + (or ticking the **Enabled** checkbox). +4. Save the changes, then start a game on the world you enabled More Ores on. +5. More Ores should now be running on your world. + +#### Using a text editor + +This is the recommended way to enable the mod on a server without using a GUI. + +1. Make sure Minetest is not currently running (otherwise, it will overwrite + the changes when exiting). +2. Open the world's `world.mt` file using a text editor. +3. Add the following line at the end of the file: + +```text +load_mod_moreores = true +``` + +If the line is already present in the file, then replace `false` with `true` +on that line. + +4. Save the file, then start a game on the world you enabled More Ores on. +5. More Ores should now be running on your world. + +## Version compatibility + +More Ores is currently primarily tested with Minetest 0.4.17. +It may or may not work with newer or older versions. Issues arising in older +versions than 0.4.17 will generally not be fixed. + +## License + +Copyright © 2011-2019 Hugo Locurcio and contributors + +- More Ores code is licensed under the zlib license, see + [`LICENSE.md`](LICENSE.md) for details. +- Unless otherwise specified, More Ores textures are licensed under + [CC BY-SA 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/). diff --git a/mods/moreores/_config.txt b/mods/moreores/_config.txt new file mode 100644 index 0000000..b575dc2 --- /dev/null +++ b/mods/moreores/_config.txt @@ -0,0 +1,27 @@ +------------------------------------------------------------------------------ +------------------------------ CONFIGURATION --------------------------------- +------------------------------------------------------------------------------ + +------------------------------------------------------------------------------ +-------- Change settings by changing the values after the "=". --------------- +------------------------------------------------------------------------------ + +-- Chunk sizes for ore generation (bigger = ore deposits are more scattered around) +moreores.tin_chunk_size = 7 +moreores.silver_chunk_size = 11 +moreores.mithril_chunk_size = 11 + +-- Amount of ore per chunk (higher = bigger ore deposits) +moreores.tin_ore_per_chunk = 3 +moreores.silver_ore_per_chunk = 4 +moreores.mithril_ore_per_chunk = 1 + +-- Minimal depths of ore generation (Y coordinate, 0 being sea level by default) +moreores.tin_min_depth = -513 +moreores.silver_min_depth = -513 +moreores.mithril_min_depth = -513 + +-- Maximal depths of ore generation (Y coordinate, 0 being sea level by default) +moreores.tin_max_depth = -8 +moreores.silver_max_depth = -32 +moreores.mithril_max_depth = -384 diff --git a/mods/moreores/depends.txt b/mods/moreores/depends.txt new file mode 100644 index 0000000..6c8d8d7 --- /dev/null +++ b/mods/moreores/depends.txt @@ -0,0 +1,4 @@ +default +farming? +intllib? +mg? diff --git a/mods/moreores/description.txt b/mods/moreores/description.txt new file mode 100644 index 0000000..6bd1c7c --- /dev/null +++ b/mods/moreores/description.txt @@ -0,0 +1 @@ +Adds new Ore types. diff --git a/mods/moreores/init.lua b/mods/moreores/init.lua new file mode 100644 index 0000000..0e4d3a1 --- /dev/null +++ b/mods/moreores/init.lua @@ -0,0 +1,382 @@ +--[[ +===================================================================== +** More Ores ** +By Calinou, with the help of Nore. + +Copyright © 2011-2019 Hugo Locurcio and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +===================================================================== +--]] + +moreores = {} + +local modpath = minetest.get_modpath("moreores") + +local S = minetest.get_translator(minetest.get_current_modname()) + +dofile(modpath .. "/_config.txt") + +-- `mg` mapgen support +if minetest.get_modpath("mg") then + dofile(modpath .. "/mg.lua") +end + +local default_stone_sounds = default.node_sound_stone_defaults() +local default_metal_sounds = default.node_sound_metal_defaults() + +-- Returns the crafting recipe table for a given material and item. +local function get_recipe(material, item) + if item == "sword" then + return { + {material}, + {material}, + {"group:stick"}, + } + end + if item == "shovel" then + return { + {material}, + {"group:stick"}, + {"group:stick"}, + } + end + if item == "axe" then + return { + {material, material}, + {material, "group:stick"}, + {"", "group:stick"}, + } + end + if item == "pick" then + return { + {material, material, material}, + {"", "group:stick", ""}, + {"", "group:stick", ""}, + } + end + if item == "block" then + return { + {material, material, material}, + {material, material, material}, + {material, material, material}, + } + end + if item == "lockedchest" then + return { + {"group:wood", "group:wood", "group:wood"}, + {"group:wood", material, "group:wood"}, + {"group:wood", "group:wood", "group:wood"}, + } + end +end + +local function add_ore(modname, description, mineral_name, oredef) + local img_base = modname .. "_" .. mineral_name + local toolimg_base = modname .. "_tool_"..mineral_name + local tool_base = modname .. ":" + local tool_post = "_" .. mineral_name + local item_base = tool_base .. mineral_name + local ingot = item_base .. "_ingot" + local lump_item = item_base .. "_lump" + + if oredef.makes.ore then + minetest.register_node(modname .. ":mineral_" .. mineral_name, { + description = S("@1 Ore", S(description)), + tiles = {"default_stone.png^" .. modname .. "_mineral_" .. mineral_name .. ".png"}, + groups = {cracky = 2}, + sounds = default_stone_sounds, + drop = lump_item, + }) + end + + if oredef.makes.block then + local block_item = item_base .. "_block" + minetest.register_node(block_item, { + description = S("@1 Block", S(description)), + tiles = {img_base .. "_block.png"}, + groups = {snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2}, + sounds = default_metal_sounds, + }) + minetest.register_alias(mineral_name.."_block", block_item) + if oredef.makes.ingot then + minetest.register_craft( { + output = block_item, + recipe = get_recipe(ingot, "block") + }) + minetest.register_craft( { + output = ingot .. " 9", + recipe = { + {block_item}, + } + }) + end + end + + if oredef.makes.lump then + minetest.register_craftitem(lump_item, { + description = S("@1 Lump", S(description)), + inventory_image = img_base .. "_lump.png", + }) + minetest.register_alias(mineral_name .. "_lump", lump_item) + if oredef.makes.ingot then + minetest.register_craft({ + type = "cooking", + output = ingot, + recipe = lump_item, + }) + end + end + + if oredef.makes.ingot then + minetest.register_craftitem(ingot, { + description = S("@1 Ingot", S(description)), + inventory_image = img_base .. "_ingot.png", + }) + minetest.register_alias(mineral_name .. "_ingot", ingot) + end + + if oredef.makes.chest then + minetest.register_craft( { + output = "default:chest_locked", + recipe = { + {ingot}, + {"default:chest"}, + } + }) + minetest.register_craft( { + output = "default:chest_locked", + recipe = get_recipe(ingot, "lockedchest") + }) + end + + oredef.oredef.ore_type = "scatter" + oredef.oredef.ore = modname .. ":mineral_" .. mineral_name + oredef.oredef.wherein = "default:stone" + + minetest.register_ore(oredef.oredef) + + for tool_name, tooldef in pairs(oredef.tools) do + local tdef = { + description = "", + inventory_image = toolimg_base .. tool_name .. ".png", + tool_capabilities = { + max_drop_level = 3, + groupcaps = tooldef, + }, + sound = {breaks = "default_tool_breaks"}, + } + + if tool_name == "sword" then + tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval + tdef.tool_capabilities.damage_groups = oredef.damage_groups + tdef.description = S("@1 Sword", S(description)) + end + + if tool_name == "pick" then + tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval + tdef.tool_capabilities.damage_groups = oredef.damage_groups + tdef.description = S("@1 Pickaxe", S(description)) + end + + if tool_name == "axe" then + tdef.tool_capabilities.full_punch_interval = oredef.full_punch_interval + tdef.tool_capabilities.damage_groups = oredef.damage_groups + tdef.description = S("@1 Axe", S(description)) + end + + if tool_name == "shovel" then + tdef.full_punch_interval = oredef.full_punch_interval + tdef.tool_capabilities.damage_groups = oredef.damage_groups + tdef.description = S("@1 Shovel", S(description)) + tdef.wield_image = toolimg_base .. tool_name .. ".png^[transformR90" + end + + local fulltool_name = tool_base .. tool_name .. tool_post + + if tool_name == "hoe" and minetest.get_modpath("farming") then + tdef.max_uses = tooldef.uses + tdef.description = S("@1 Hoe", S(description)) + farming.register_hoe(fulltool_name, tdef) + end + + -- Hoe registration is handled above. + -- There are no crafting recipes for hoes, as they have been + -- deprecated from Minetest Game: + -- https://github.com/minetest/minetest_game/commit/9c459e77a + if tool_name ~= "hoe" then + minetest.register_tool(fulltool_name, tdef) + + if oredef.makes.ingot then + minetest.register_craft({ + output = fulltool_name, + recipe = get_recipe(ingot, tool_name) + }) + end + end + + minetest.register_alias(tool_name .. tool_post, fulltool_name) + end +end + +local oredefs = { + silver = { + description = "Silver", + makes = {ore = true, block = true, lump = true, ingot = true, chest = true}, + oredef = { + clust_scarcity = moreores.silver_chunk_size ^ 3, + clust_num_ores = moreores.silver_ore_per_chunk, + clust_size = moreores.silver_chunk_size, + y_min = moreores.silver_min_depth, + y_max = moreores.silver_max_depth, + }, + tools = { + pick = { + cracky = {times = {[1] = 2.60, [2] = 1.00, [3] = 0.60}, uses = 100, maxlevel = 1}, + }, + hoe = { + uses = 300, + }, + shovel = { + crumbly = {times = {[1] = 1.10, [2] = 0.40, [3] = 0.25}, uses = 100, maxlevel = 1}, + }, + axe = { + choppy = {times = {[1] = 2.50, [2] = 0.80, [3] = 0.50}, uses = 100, maxlevel = 1}, + fleshy = {times = {[2] = 1.10, [3] = 0.60}, uses = 100, maxlevel = 1} + }, + sword = { + fleshy = {times = {[2] = 0.70, [3] = 0.30}, uses = 100, maxlevel = 1}, + snappy = {times = {[2] = 0.70, [3] = 0.30}, uses = 100, maxlevel = 1}, + choppy = {times = {[3] = 0.80}, uses = 100, maxlevel = 0}, + }, + }, + full_punch_interval = 1.0, + damage_groups = {fleshy = 6}, + }, + mithril = { + description = "Mithril", + makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, + oredef = { + clust_scarcity = moreores.mithril_chunk_size ^ 3, + clust_num_ores = moreores.mithril_ore_per_chunk, + clust_size = moreores.mithril_chunk_size, + y_min = moreores.mithril_min_depth, + y_max = moreores.mithril_max_depth, + }, + tools = { + pick = { + cracky = {times = {[1] = 2.25, [2] = 0.55, [3] = 0.35}, uses = 200, maxlevel = 2} + }, + hoe = { + uses = 1000, + }, + shovel = { + crumbly = {times = {[1] = 0.70, [2] = 0.35, [3] = 0.20}, uses = 200, maxlevel = 2}, + }, + axe = { + choppy = {times = {[1] = 1.75, [2] = 0.45, [3] = 0.45}, uses = 200, maxlevel = 2}, + fleshy = {times = {[2] = 0.95, [3] = 0.30}, uses = 200, maxlevel = 1} + }, + sword = { + fleshy = {times = {[2] = 0.65, [3] = 0.25}, uses = 200, maxlevel = 2}, + snappy = {times = {[2] = 0.70, [3] = 0.25}, uses = 200, maxlevel = 2}, + choppy = {times = {[3] = 0.65}, uses = 200, maxlevel = 0}, + }, + }, + full_punch_interval = 0.45, + damage_groups = {fleshy = 9}, + } +} + +-- If tin is available in the `default` mod, don't register More Ores' variant of tin +local default_tin +if minetest.registered_items["default:tin_ingot"] then + default_tin = true +else + default_tin = false +end + +if default_tin then + minetest.register_alias("moreores:mineral_tin", "default:stone_with_tin") + minetest.register_alias("moreores:tin_lump", "default:tin_lump") + minetest.register_alias("moreores:tin_ingot", "default:tin_ingot") + minetest.register_alias("moreores:tin_block", "default:tinblock") +else + oredefs.tin = { + description = "Tin", + makes = {ore = true, block = true, lump = true, ingot = true, chest = false}, + oredef = { + clust_scarcity = moreores.tin_chunk_size ^ 3, + clust_num_ores = moreores.tin_ore_per_chunk, + clust_size = moreores.tin_chunk_size, + y_min = moreores.tin_min_depth, + y_max = moreores.tin_max_depth, + }, + tools = {}, + } + + -- Bronze has some special cases, because it is made from copper and tin + minetest.register_craft({ + type = "shapeless", + output = "default:bronze_ingot 3", + recipe = { + "moreores:tin_ingot", + "default:copper_ingot", + "default:copper_ingot", + }, + }) +end + +-- Copper rail (unique node) +minetest.register_node("moreores:copper_rail", { + description = S("Copper Rail"), + drawtype = "raillike", + tiles = { + "moreores_copper_rail.png", + "moreores_copper_rail_curved.png", + "moreores_copper_rail_t_junction.png", + "moreores_copper_rail_crossing.png", + }, + inventory_image = "moreores_copper_rail.png", + wield_image = "moreores_copper_rail.png", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "fixed", + fixed = { + -1/2, + -1/2, + -1/2, + 1/2, + -1/2 + 1/16, + 1/2, + }, + }, + sounds = default_metal_sounds, + groups = {bendy = 2, snappy = 1, dig_immediate = 2, rail = 1, connect_to_raillike = 1}, + mesecons = { + effector = { + action_on = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "0.5") + end, + + action_off = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "0") + end, + }, + }, +}) + +minetest.register_craft({ + output = "moreores:copper_rail 24", + recipe = { + {"default:copper_ingot", "", "default:copper_ingot"}, + {"default:copper_ingot", "group:stick", "default:copper_ingot"}, + {"default:copper_ingot", "", "default:copper_ingot"}, + }, +}) + +for orename, def in pairs(oredefs) do + -- Register everything + add_ore("moreores", def.description, orename, def) +end diff --git a/mods/moreores/locale/moreores.es.tr b/mods/moreores/locale/moreores.es.tr new file mode 100755 index 0000000..ddc905b --- /dev/null +++ b/mods/moreores/locale/moreores.es.tr @@ -0,0 +1,17 @@ +# textdomain: moreores +[moreores] loaded.=[moreores] cargado. +@1 Ore=Mineral de @1 +@1 Lump=Pepita de @1 +@1 Ingot=Lingote de @1 +@1 Block=Bloque de @1 +@1 Pickaxe=Pico de @1 +@1 Shovel=Pala de @1 +@1 Axe=Hacha de @1 +@1 Sword=Espada de @1 +Copper=cobre +Tin=estaño +Bronze=bronce +Silver=plata +Gold=oro +Mithril=mitrilo +Copper Rail=Raíl de cobre diff --git a/mods/moreores/mg.lua b/mods/moreores/mg.lua new file mode 100644 index 0000000..30753ac --- /dev/null +++ b/mods/moreores/mg.lua @@ -0,0 +1,55 @@ +--[[ +More Ores: `mg` mod support + +Copyright © 2011-2019 Hugo Locurcio and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +--]] + +if not minetest.registered_items["default:tin_ingot"] then + mg.register_ore({ + name = "moreores:mineral_tin", + wherein = "default:stone", + seeddiff = 8, + maxvdistance = 10.5, + maxheight = 8, + seglenghtn = 15, + seglenghtdev = 6, + segincln = 0, + segincldev = 0.6, + turnangle = 57, + forkturnangle = 57, + numperblock = 2 + }) +end + +mg.register_ore({ + name = "moreores:mineral_silver", + wherein = "default:stone", + seeddiff = 9, + maxvdistance = 10.5, + maxheight = -2, + seglenghtn = 15, + seglenghtdev = 6, + sizen = 60, + sizedev = 30, + segincln = 0, + segincldev = 0.6, + turnangle = 57, + forkturnangle = 57, + numperblock = 2 +}) + +mg.register_ore({ + name = "moreores:mineral_mithril", + wherein = "default:stone", + seeddiff = 10, + maxvdistance = 10.5, + maxheight = -384, + seglenghtn = 2, + seglenghtdev = 4, + sizen = 12, + sizedev = 5, + segincln = 0, + segincldev = 0.6, + turnangle = 57, +}) diff --git a/mods/moreores/mod.conf b/mods/moreores/mod.conf new file mode 100644 index 0000000..5a9f1e2 --- /dev/null +++ b/mods/moreores/mod.conf @@ -0,0 +1 @@ +name = moreores diff --git a/mods/moreores/textures/moreores_copper_rail.png b/mods/moreores/textures/moreores_copper_rail.png new file mode 100755 index 0000000..31f2999 Binary files /dev/null and b/mods/moreores/textures/moreores_copper_rail.png differ diff --git a/mods/moreores/textures/moreores_copper_rail_crossing.png b/mods/moreores/textures/moreores_copper_rail_crossing.png new file mode 100755 index 0000000..bc78b47 Binary files /dev/null and b/mods/moreores/textures/moreores_copper_rail_crossing.png differ diff --git a/mods/moreores/textures/moreores_copper_rail_curved.png b/mods/moreores/textures/moreores_copper_rail_curved.png new file mode 100755 index 0000000..e766793 Binary files /dev/null and b/mods/moreores/textures/moreores_copper_rail_curved.png differ diff --git a/mods/moreores/textures/moreores_copper_rail_t_junction.png b/mods/moreores/textures/moreores_copper_rail_t_junction.png new file mode 100755 index 0000000..dd23aa7 Binary files /dev/null and b/mods/moreores/textures/moreores_copper_rail_t_junction.png differ diff --git a/mods/moreores/textures/moreores_mineral_mithril.png b/mods/moreores/textures/moreores_mineral_mithril.png new file mode 100755 index 0000000..481790f Binary files /dev/null and b/mods/moreores/textures/moreores_mineral_mithril.png differ diff --git a/mods/moreores/textures/moreores_mineral_silver.png b/mods/moreores/textures/moreores_mineral_silver.png new file mode 100755 index 0000000..e57ab13 Binary files /dev/null and b/mods/moreores/textures/moreores_mineral_silver.png differ diff --git a/mods/moreores/textures/moreores_mineral_tin.png b/mods/moreores/textures/moreores_mineral_tin.png new file mode 100755 index 0000000..232d4b5 Binary files /dev/null and b/mods/moreores/textures/moreores_mineral_tin.png differ diff --git a/mods/moreores/textures/moreores_mithril_block.png b/mods/moreores/textures/moreores_mithril_block.png new file mode 100755 index 0000000..72a6413 Binary files /dev/null and b/mods/moreores/textures/moreores_mithril_block.png differ diff --git a/mods/moreores/textures/moreores_mithril_ingot.png b/mods/moreores/textures/moreores_mithril_ingot.png new file mode 100755 index 0000000..ee500dc Binary files /dev/null and b/mods/moreores/textures/moreores_mithril_ingot.png differ diff --git a/mods/moreores/textures/moreores_mithril_lump.png b/mods/moreores/textures/moreores_mithril_lump.png new file mode 100755 index 0000000..e7ecf6e Binary files /dev/null and b/mods/moreores/textures/moreores_mithril_lump.png differ diff --git a/mods/moreores/textures/moreores_silver_block.png b/mods/moreores/textures/moreores_silver_block.png new file mode 100755 index 0000000..cc4f02b Binary files /dev/null and b/mods/moreores/textures/moreores_silver_block.png differ diff --git a/mods/moreores/textures/moreores_silver_ingot.png b/mods/moreores/textures/moreores_silver_ingot.png new file mode 100755 index 0000000..6eb0e1b Binary files /dev/null and b/mods/moreores/textures/moreores_silver_ingot.png differ diff --git a/mods/moreores/textures/moreores_silver_lump.png b/mods/moreores/textures/moreores_silver_lump.png new file mode 100755 index 0000000..b0fa647 Binary files /dev/null and b/mods/moreores/textures/moreores_silver_lump.png differ diff --git a/mods/moreores/textures/moreores_tin_block.png b/mods/moreores/textures/moreores_tin_block.png new file mode 100755 index 0000000..2f874c4 Binary files /dev/null and b/mods/moreores/textures/moreores_tin_block.png differ diff --git a/mods/moreores/textures/moreores_tin_ingot.png b/mods/moreores/textures/moreores_tin_ingot.png new file mode 100755 index 0000000..eed5361 Binary files /dev/null and b/mods/moreores/textures/moreores_tin_ingot.png differ diff --git a/mods/moreores/textures/moreores_tin_lump.png b/mods/moreores/textures/moreores_tin_lump.png new file mode 100755 index 0000000..72bd339 Binary files /dev/null and b/mods/moreores/textures/moreores_tin_lump.png differ diff --git a/mods/moreores/textures/moreores_tool_mithrilaxe.png b/mods/moreores/textures/moreores_tool_mithrilaxe.png new file mode 100755 index 0000000..6f213fb Binary files /dev/null and b/mods/moreores/textures/moreores_tool_mithrilaxe.png differ diff --git a/mods/moreores/textures/moreores_tool_mithrilhoe.png b/mods/moreores/textures/moreores_tool_mithrilhoe.png new file mode 100755 index 0000000..a1d1542 Binary files /dev/null and b/mods/moreores/textures/moreores_tool_mithrilhoe.png differ diff --git a/mods/moreores/textures/moreores_tool_mithrilpick.png b/mods/moreores/textures/moreores_tool_mithrilpick.png new file mode 100755 index 0000000..fb9a18f Binary files /dev/null and b/mods/moreores/textures/moreores_tool_mithrilpick.png differ diff --git a/mods/moreores/textures/moreores_tool_mithrilshovel.png b/mods/moreores/textures/moreores_tool_mithrilshovel.png new file mode 100755 index 0000000..d28060a Binary files /dev/null and b/mods/moreores/textures/moreores_tool_mithrilshovel.png differ diff --git a/mods/moreores/textures/moreores_tool_mithrilsword.png b/mods/moreores/textures/moreores_tool_mithrilsword.png new file mode 100755 index 0000000..b0a1290 Binary files /dev/null and b/mods/moreores/textures/moreores_tool_mithrilsword.png differ diff --git a/mods/moreores/textures/moreores_tool_silveraxe.png b/mods/moreores/textures/moreores_tool_silveraxe.png new file mode 100755 index 0000000..52b16a4 Binary files /dev/null and b/mods/moreores/textures/moreores_tool_silveraxe.png differ diff --git a/mods/moreores/textures/moreores_tool_silverhoe.png b/mods/moreores/textures/moreores_tool_silverhoe.png new file mode 100755 index 0000000..997ceb8 Binary files /dev/null and b/mods/moreores/textures/moreores_tool_silverhoe.png differ diff --git a/mods/moreores/textures/moreores_tool_silverpick.png b/mods/moreores/textures/moreores_tool_silverpick.png new file mode 100755 index 0000000..8aa9d47 Binary files /dev/null and b/mods/moreores/textures/moreores_tool_silverpick.png differ diff --git a/mods/moreores/textures/moreores_tool_silvershovel.png b/mods/moreores/textures/moreores_tool_silvershovel.png new file mode 100755 index 0000000..868f8c4 Binary files /dev/null and b/mods/moreores/textures/moreores_tool_silvershovel.png differ diff --git a/mods/moreores/textures/moreores_tool_silversword.png b/mods/moreores/textures/moreores_tool_silversword.png new file mode 100755 index 0000000..42d720b Binary files /dev/null and b/mods/moreores/textures/moreores_tool_silversword.png differ diff --git a/mods/mpd/init.lua b/mods/mpd/init.lua new file mode 100644 index 0000000..a6cf6e3 --- /dev/null +++ b/mods/mpd/init.lua @@ -0,0 +1,219 @@ + +mpd={} + + +mpd.pause_between_songs=minetest.settings:get("mpd.pause_between_songs") or 30 + +--end config + +mpd.modpath=minetest.get_modpath("mpd") +if not mpd.modpath then + error("mpd mod folder has to be named 'mpd'!") +end +--{name, length, gain~1} +mpd.songs = {} +local sfile, sfileerr=io.open(mpd.modpath..DIR_DELIM.."songs.txt") +if not sfile then error("Error opening songs.txt: "..sfileerr) end +for linent in sfile:lines() do + -- trim leading and trailing spaces away + local line = string.match(linent, "^%s*(.-)%s*$") + if line~="" and string.sub(line,1,1)~="#" then + local name, timeMinsStr, timeSecsStr, gainStr, title = string.match(line, "^(%S+)%s+(%d+):([%d%.]+)%s+([%d%.]+)%s*(.*)$") + local timeMins, timeSecs, gain = tonumber(timeMinsStr), tonumber(timeSecsStr), tonumber(gainStr) + if title=="" then title = name end + if name and timeMins and timeSecs and gain then + mpd.songs[#mpd.songs+1]={name=name, length=timeMins*60+timeSecs, lengthhr=timeMinsStr..":"..timeSecsStr, gain=gain, title=title} + else + minetest.log("warning", "[mpd] Misformatted song entry in songs.txt: "..line) + end + end +end +sfile:close() + +if #mpd.songs==0 then + print("[mpd]no songs registered, not doing anything") + return +end + +mpd.storage = minetest.get_mod_storage() + +mpd.handles={} + +mpd.playing=false +mpd.id_playing=nil +mpd.song_time_left=nil +mpd.time_next=10 --sekunden +mpd.id_last_played=nil + +minetest.register_globalstep(function(dtime) + if mpd.playing then + if mpd.song_time_left <= 0 then + mpd.stop_song() + mpd.time_next = mpd.pause_between_songs + else + mpd.song_time_left = mpd.song_time_left-dtime + end + elseif mpd.time_next then + if mpd.time_next <= 0 then + mpd.next_song() + else + mpd.time_next = mpd.time_next - dtime + end + end +end) + +mpd.play_song=function(id) + if mpd.playing then + mpd.stop_song() + end + local song = mpd.songs[id] + if not song then return end + for _,player in ipairs(minetest.get_connected_players()) do + local pname = player:get_player_name() + local pvolume = tonumber(mpd.storage:get_string("vol_"..pname)) + if not pvolume then pvolume=1 end + if pvolume>0 then + local handle = minetest.sound_play(song.name, {to_player=pname, gain=song.gain * pvolume}) + if handle then + mpd.handles[pname]=handle + end + end + end + mpd.playing = id + --adding 2 seconds as security + mpd.song_time_left = song.length + 2 +end + +mpd.stop_song=function() + for pname, handle in pairs(mpd.handles) do + minetest.sound_stop(handle) + end + mpd.id_last_played=mpd.playing + mpd.playing = nil + mpd.handles = {} + mpd.time_next = nil +end + +mpd.next_song=function() + local next + repeat + next=math.random(1,#mpd.songs) + until #mpd.songs==1 or next~=mpd.id_last_played + mpd.play_song(next) +end + +mpd.song_human_readable=function(id) + if not tonumber(id) then return "" end + local song = mpd.songs[id] + if not song then return "" end + return id..": "..song.title.." ["..song.lengthhr.."]" +end + +minetest.register_privilege("mpd", "may control the music player daemon (mpd) mod") + +minetest.register_chatcommand("mpd_stop", { + params = "", + description = "Stop the song currently playing", + privs = {mpd=true}, + func = function(name, param) + mpd.stop_song() + end, +}) +minetest.register_chatcommand("mpd_list", { + params = "", + description = "List all available songs and their IDs", + privs = {mpd=true}, + func = function(name, param) + for k,v in ipairs(mpd.songs) do + minetest.chat_send_player(name, mpd.song_human_readable(k)) + end + end, +}) +minetest.register_chatcommand("mpd_play", { + params = "", + description = "Play the songs with the given ID (see ids with /mpd_list)", + privs = {mpd=true}, + func = function(name, param) + if param=="" then + mpd.next_song() + return true,"Playing: "..mpd.song_human_readable(mpd.playing) + end + id=tonumber(param) + if id and id>0 and id<=#mpd.songs then + mpd.play_song(id) + return true,"Playing: "..mpd.song_human_readable(id) + end + return false, "Invalid song ID!" + end, +}) + +minetest.register_chatcommand("mpd_what", { + params = "", + description = "Display the currently played song.", + privs = {mpd=true}, + func = function(name, param) + if not mpd.playing then + if mpd.time_next and mpd.time_next~=0 then + return true,"Nothing playing, "..math.floor(mpd.time_next or 0).." sec. left until next song." + else + return true,"Nothing playing." + end + end + return true,"Playing: "..mpd.song_human_readable(mpd.playing).."\nTime Left: "..math.floor(mpd.song_time_left or 0).." sec." + end, +}) + +minetest.register_chatcommand("mpd_next", { + params = "[seconds]", + description = "Start the next song, either immediately (no parameters) or after n seconds.", + privs = {mpd=true}, + func = function(name, param) + mpd.stop_song() + if param and tonumber(param) then + mpd.time_next=tonumber(param) + return true,"Next song in "..param.." seconds!" + else + mpd.next_song() + return true,"Next song started!" + end + end, +}) + +minetest.register_chatcommand("mvolume", { + params = "[volume level (0-1)]", + description = "Set your background music volume. Use /mvolume 0 to turn off background music for you. Without parameters, show your current setting.", + privs = {}, + func = function(pname, param) + if not param or param=="" then + local pvolume=tonumber(mpd.storage:get_string("vol_"..pname)) + if not pvolume then pvolume=1 end + if pvolume>0 then + return true, "Your music volume is set to "..pvolume.."." + else + if mpd.handles[pname] then + minetest.sound_stop(mpd.handles[pname]) + end + return true, "Background music is disabled for you. Use '/mvolume 1' to enable it again." + end + end + local pvolume=tonumber(param) + if not pvolume then + return false, "Invalid usage: /mvolume [volume level (0-1)]" + end + pvolume = math.min(pvolume, 1) + pvolume = math.max(pvolume, 0) + mpd.storage:set_string("vol_"..pname, pvolume) + if pvolume>0 then + return true, "Music volume set to "..pvolume..". Change will take effect when the next song starts." + else + if mpd.handles[pname] then + minetest.sound_stop(mpd.handles[pname]) + end + return true, "Disabled background music for you. Use /mvolume to enable it again." + end + end, +}) + +if vote then + dofile(mpd.modpath..DIR_DELIM.."vote.lua") +end diff --git a/mods/mpd/mod.conf b/mods/mpd/mod.conf new file mode 100644 index 0000000..a9b5139 --- /dev/null +++ b/mods/mpd/mod.conf @@ -0,0 +1,2 @@ +name = mpd +optional_depends = vote diff --git a/mods/mpd/readme.txt b/mods/mpd/readme.txt new file mode 100644 index 0000000..5bd7f68 --- /dev/null +++ b/mods/mpd/readme.txt @@ -0,0 +1,44 @@ + +### mpd Mod for Minetest +(c) 2017 orwell96 +This mod is licensed under the LGPL 2.1 license. + +Adds an easy but powerful background music backend. + +## Usage: + +For all players: +/mvolume +Set your individual music volume or disable background music (/mvolume 0). Saved across server restarts. +/mpd_list: list available music + +With mpd privilege: +/mpd_play : play a song +/mpd_stop: stop the current song. Unless /mpd_play or /mpd_next are invoked, no more music is played +/mpd_next [time]: Play the next song after [time] seconds, immediately if omitted. + +## Votes: +This mod integrates with the [vote] mod by rubenwardy (https://github.com/minetest-mods/vote) +/vote_mpd_next - vote to start next song +/vote_mpd_play - Vote to play certain sing + +## Music credits: + +StrangelyBeautifulShort 3:01 0.7 +AvalonShort 2:58 1.4 +EtherealShort 3:04 0.7 +FarawayShort 3:05 0.7 +-> Music from [ambience] mod +-> Author is Amethystium . + +eastern_feeling 3:51 1.0 +-> created by Jordach. It can be found in the BFD subgame. License is GPLv3 (license of BFD). + +bensound_deepblue 4:48 1.0 +bensound_ofeliasdream 4:59 1.0 +bensound_slowmotion 3:26 1.0 +-> (c) bensound (AFAIK public domain) + +rainymemory 2:10 1.0 +anonnp4014 2:30 1.6 +-> (c) Deemo collection (game music collection) diff --git a/mods/mpd/settingtypes.txt b/mods/mpd/settingtypes.txt new file mode 100644 index 0000000..e711c02 --- /dev/null +++ b/mods/mpd/settingtypes.txt @@ -0,0 +1,3 @@ +# How many seconds MPD waits before starting the next song +mpd_pause_between_songs (Pause between songs) int 30 0 3600 + diff --git a/mods/mpd/songs.txt b/mods/mpd/songs.txt new file mode 100644 index 0000000..56ee99f --- /dev/null +++ b/mods/mpd/songs.txt @@ -0,0 +1,4 @@ +#File Name Time Gain Title +Another_Goodbye 1:01 0.35 Another Goodbye +Autumn_Changes 1:58 0.35 Autumn Changes +More_Tough_Choices 2:18 0.35 More Tough Choices diff --git a/mods/mpd/sounds/Another_Goodbye.ogg b/mods/mpd/sounds/Another_Goodbye.ogg new file mode 100755 index 0000000..9e9a192 Binary files /dev/null and b/mods/mpd/sounds/Another_Goodbye.ogg differ diff --git a/mods/mpd/sounds/Autumn_Changes.ogg b/mods/mpd/sounds/Autumn_Changes.ogg new file mode 100755 index 0000000..e346c68 Binary files /dev/null and b/mods/mpd/sounds/Autumn_Changes.ogg differ diff --git a/mods/mpd/sounds/More_Tough_Choices.ogg b/mods/mpd/sounds/More_Tough_Choices.ogg new file mode 100755 index 0000000..7616efd Binary files /dev/null and b/mods/mpd/sounds/More_Tough_Choices.ogg differ diff --git a/mods/mpd/vote.lua b/mods/mpd/vote.lua new file mode 100644 index 0000000..d1a2ff3 --- /dev/null +++ b/mods/mpd/vote.lua @@ -0,0 +1,68 @@ +--mpd +--vote.lua - vote module to change songs + +function mpd.vote_play(name, param) + id=tonumber(param) + if id and id>0 and id<=#mpd.songs then + vote.new_vote(name, { + description = "Play "..mpd.song_human_readable(id), + help = "/yes or /no", + duration = 20, + perc_needed = 0.4, + + on_result = function(self, result, results) + if result == "yes" then + minetest.chat_send_all("Vote to play " .. mpd.song_human_readable(id) .. " passed " .. + #results.yes .. " to " .. #results.no) + mpd.play_song(id) + else + minetest.chat_send_all("Vote to play " .. mpd.song_human_readable(id) .. " failed " .. + #results.yes .. " to " .. #results.no) + end + end, + + on_vote = function(self, name, value) + minetest.chat_send_all(name .. " voted " .. value .. " to '" .. + self.description .. "'") + end, + }) + return true + end + return false,"Invalid song ID! See available song IDs using /mpd_list" +end + +minetest.register_chatcommand("vote_mpd_play", { + func = mpd.vote_play +}) + +function mpd.vote_next(name, param) + vote.new_vote(name, { + description = "Play next song", + help = "/yes or /no", + duration = 20, + perc_needed = 0.4, + + on_result = function(self, result, results) + minetest.chat_send_all(result..dump(results)) + if result == "yes" then + minetest.chat_send_all("Vote to play next song passed " .. + #results.yes .. " to " .. #results.no) + mpd.next_song() + else + minetest.chat_send_all("Vote to play next song failed " .. + #results.yes .. " to " .. #results.no) + end + end, + + on_vote = function(self, name, value) + minetest.chat_send_all(name .. " voted " .. value .. " to '" .. + self.description .. "'") + end + }) + return true +end + +minetest.register_chatcommand("vote_mpd_next", { + func = mpd.vote_next +}) + diff --git a/mods/nuclearz/LICENSE.txt b/mods/nuclearz/LICENSE.txt new file mode 100644 index 0000000..0e259d4 --- /dev/null +++ b/mods/nuclearz/LICENSE.txt @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/mods/nuclearz/init.lua b/mods/nuclearz/init.lua new file mode 100644 index 0000000..9c56295 --- /dev/null +++ b/mods/nuclearz/init.lua @@ -0,0 +1,43 @@ +-- internationalization boilerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_node("nuclearz:stone_with_uranium", { + description = S("Uranium Ore"), + light_source = 5, + tiles = {"default_stone.png^nuclearz_mineral_uranium.png"}, + groups = {cracky = 2}, + drop = "nuclearz:uranium_lump 6", + sounds = default.node_sound_stone_defaults(), +}) + +function default.register_ores() + minetest.register_ore({ + ore_type = "scatter", + ore = "nuclearz:stone_with_uranium", + wherein = "default:stone", + clust_scarcity = 25 * 25 * 25, + clust_num_ores = 3, + clust_size = 3, + y_max = -384, + y_min = -512, + }) +end + +minetest.register_craftitem("nuclearz:uranium_lump", { + description = S("Uranium Lump"), + inventory_image = "nuclearz_uranium_lump.png" +}) + +minetest.register_craftitem("nuclearz:uranium_rod", { + description = S("Uranium Rod"), + inventory_image = "nuclearz_uranium_rod.png" +}) + +minetest.register_craft({ + output = "nuclearz:uranium_rod", + recipe = { + {"", "", ""}, + {"", "", ""}, + {"nuclearz:uranium_lump", "nuclearz:uranium_lump", "nuclearz:uranium_lump"}, + } +}) diff --git a/mods/nuclearz/locale/nuclearz.es.tr b/mods/nuclearz/locale/nuclearz.es.tr new file mode 100644 index 0000000..64551e8 --- /dev/null +++ b/mods/nuclearz/locale/nuclearz.es.tr @@ -0,0 +1,4 @@ +# textdomain: nuclearz +Uranium Ore=Mineral de uranio +Uranium Lump=Pepita de uranio +Uranium Rod=Barra de uranio diff --git a/mods/nuclearz/mod.conf b/mods/nuclearz/mod.conf new file mode 100644 index 0000000..c6db8bb --- /dev/null +++ b/mods/nuclearz/mod.conf @@ -0,0 +1,3 @@ +name = nuclearz +description = Nuclear Stuff +depends = default diff --git a/mods/nuclearz/textures/nuclearz_mineral_uranium.png b/mods/nuclearz/textures/nuclearz_mineral_uranium.png new file mode 100644 index 0000000..0f6a311 Binary files /dev/null and b/mods/nuclearz/textures/nuclearz_mineral_uranium.png differ diff --git a/mods/nuclearz/textures/nuclearz_uranium_lump.png b/mods/nuclearz/textures/nuclearz_uranium_lump.png new file mode 100644 index 0000000..471cb8a Binary files /dev/null and b/mods/nuclearz/textures/nuclearz_uranium_lump.png differ diff --git a/mods/nuclearz/textures/nuclearz_uranium_rod.png b/mods/nuclearz/textures/nuclearz_uranium_rod.png new file mode 100644 index 0000000..74adf68 Binary files /dev/null and b/mods/nuclearz/textures/nuclearz_uranium_rod.png differ diff --git a/mods/nyancat/README.txt b/mods/nyancat/README.txt new file mode 100644 index 0000000..5dc6c8c --- /dev/null +++ b/mods/nyancat/README.txt @@ -0,0 +1,18 @@ +Minetest mod: nyancat +===================== +Replacement for the now removed Minetest Game "nyancat" mod. +Note that the Nyancat (and thus the media files) might be subject to trademark claims. +It is strongly recommend to use this mod exclusively for non-commercial activity. + +Authors of source code +---------------------- +Originally by celeron55, Perttu Ahola (LGPL 2.1) +Various Minetest developers and contributors (LGPL 2.1) + +Authors of media files +---------------------- +VanessaE (CC BY-SA 3.0): + nyancat_front.png + nyancat_back.png + nyancat_side.png + nyancat_rainbow.png diff --git a/mods/nyancat/depends.txt b/mods/nyancat/depends.txt new file mode 100644 index 0000000..4ad96d5 --- /dev/null +++ b/mods/nyancat/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/nyancat/init.lua b/mods/nyancat/init.lua new file mode 100644 index 0000000..ecc500a --- /dev/null +++ b/mods/nyancat/init.lua @@ -0,0 +1,89 @@ +minetest.register_node("nyancat:nyancat", { + description = "Nyan Cat", + tiles = {"nyancat_side.png", "nyancat_side.png", "nyancat_side.png", + "nyancat_side.png", "nyancat_back.png", "nyancat_front.png"}, + paramtype = "light", + light_source = default.LIGHT_MAX, + paramtype2 = "facedir", + groups = {cracky = 2}, + is_ground_content = false, + sounds = default.node_sound_defaults(), +}) + +minetest.register_node("nyancat:nyancat_rainbow", { + description = "Nyan Cat Rainbow", + tiles = { + "nyancat_rainbow.png^[transformR90", + "nyancat_rainbow.png^[transformR90", + "nyancat_rainbow.png" + }, + paramtype = "light", + light_source = default.LIGHT_MAX, + paramtype2 = "facedir", + groups = {cracky = 2}, + is_ground_content = false, + sounds = default.node_sound_defaults(), +}) + + +minetest.register_craft({ + type = "fuel", + recipe = "nyancat:nyancat", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "nyancat:nyancat_rainbow", + burntime = 1, +}) + + +-- Mapgen +nyancat = {} + +function nyancat.place(pos, facedir, length) + if facedir > 3 then + facedir = 0 + end + local tailvec = minetest.facedir_to_dir(facedir) + local p = {x = pos.x, y = pos.y, z = pos.z} + minetest.set_node(p, {name = "nyancat:nyancat", param2 = facedir}) + for i = 1, length do + p.x = p.x + tailvec.x + p.z = p.z + tailvec.z + minetest.set_node(p, {name = "nyancat:nyancat_rainbow", param2 = facedir}) + end +end + +function nyancat.generate(minp, maxp, seed) + local height_min = -31000 + local height_max = -32 + if maxp.y < height_min or minp.y > height_max then + return + end + local y_min = math.max(minp.y, height_min) + local y_max = math.min(maxp.y, height_max) + local volume = (maxp.x - minp.x + 1) * (y_max - y_min + 1) * (maxp.z - minp.z + 1) + local pr = PseudoRandom(seed + 9324342) + local max_num_nyancats = math.floor(volume / (16 * 16 * 16)) + for i = 1, max_num_nyancats do + if pr:next(0, 1000) == 0 then + local x0 = pr:next(minp.x, maxp.x) + local y0 = pr:next(minp.y, maxp.y) + local z0 = pr:next(minp.z, maxp.z) + local p0 = {x = x0, y = y0, z = z0} + nyancat.place(p0, pr:next(0, 3), pr:next(3, 15)) + end + end +end + +minetest.register_on_generated(function(minp, maxp, seed) + nyancat.generate(minp, maxp, seed) +end) + +-- Legacy compat +minetest.register_alias("default:nyancat", "nyancat:nyancat") +minetest.register_alias("default:nyancat_rainbow", "nyancat:nyancat_rainbow") +default.make_nyancat = nyancat.place +default.generate_nyancats = nyancat.generate diff --git a/mods/nyancat/textures/nyancat_back.png b/mods/nyancat/textures/nyancat_back.png new file mode 100644 index 0000000..e479ace Binary files /dev/null and b/mods/nyancat/textures/nyancat_back.png differ diff --git a/mods/nyancat/textures/nyancat_front.png b/mods/nyancat/textures/nyancat_front.png new file mode 100644 index 0000000..e1300d8 Binary files /dev/null and b/mods/nyancat/textures/nyancat_front.png differ diff --git a/mods/nyancat/textures/nyancat_rainbow.png b/mods/nyancat/textures/nyancat_rainbow.png new file mode 100644 index 0000000..cb24366 Binary files /dev/null and b/mods/nyancat/textures/nyancat_rainbow.png differ diff --git a/mods/nyancat/textures/nyancat_side.png b/mods/nyancat/textures/nyancat_side.png new file mode 100644 index 0000000..65107b5 Binary files /dev/null and b/mods/nyancat/textures/nyancat_side.png differ diff --git a/mods/oleo/README.md b/mods/oleo/README.md new file mode 100644 index 0000000..cf2ae92 --- /dev/null +++ b/mods/oleo/README.md @@ -0,0 +1,13 @@ +# Crude Oil and Plastics + +Adds crude oil, and derived products such as plastic. + +Requires Minetest 5.0.0 +License: GPLv3 + +## Licenses + +rubenwardy (CC-BY-SA 4.0): + +* oil_crude* + diff --git a/mods/oleo/init.lua b/mods/oleo/init.lua new file mode 100644 index 0000000..ef517f0 --- /dev/null +++ b/mods/oleo/init.lua @@ -0,0 +1,3 @@ +dofile(minetest.get_modpath("oleo") .. "/products.lua") +dofile(minetest.get_modpath("oleo") .. "/liquids.lua") +dofile(minetest.get_modpath("oleo") .. "/nodes.lua") diff --git a/mods/oleo/liquids.lua b/mods/oleo/liquids.lua new file mode 100644 index 0000000..c1e022f --- /dev/null +++ b/mods/oleo/liquids.lua @@ -0,0 +1,157 @@ +-- internationalization boleoerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +local function register_liquid(name, desc, over1, over2) + local texture = name:gsub("%:", "_") + + local water_sounds = default and default.node_sound_water_defaults() + + minetest.register_node(name .. "_source", { + description = desc, + drawtype = "liquid", + tiles = { + { + name = texture .. "_source_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + { + name = texture .. "_source_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + alpha = 250, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = name .. "_flowing", + liquid_alternative_source = name .. "_source", + liquid_viscosity = 7, + liquid_range = 2, + post_effect_color = {a = 153, r = 30, g = 30, b = 30}, + groups = {liquid = 3, oil = 1}, + sounds = water_sounds, + }) + + minetest.register_node(name .. "_flowing", { + description = S("Flowing").." ".. desc, + drawtype = "flowingliquid", + tiles = {texture .. ".png"}, + special_tiles = { + { + name = texture .. "_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = texture .. "_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 250, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = name .. "_flowing", + liquid_alternative_source = name .. "_source", + liquid_viscosity = 7, + liquid_range = 2, + post_effect_color = {a = 250, r = 0, g = 0, b = 0}, + groups = {liquid = 3, not_in_creative_inventory = 1}, + sounds = water_sounds, + }) + + minetest.override_item(name .. "_source", table.copy(over1)) + minetest.override_item(name .. "_flowing", table.copy(over1)) + if over2 then + minetest.override_item(name .. "_flowing", table.copy(over2)) + end + + if minetest.get_modpath("bucket") then + bucket.register_liquid(name .. "_source", name .. "_flowing", + name .. "_bucket", texture .. "_bucket.png", desc .." ".. S("Bucket")) + end +end + +local oleo_sounds = {footstep = {name = "oleo_oleo_footstep", gain = 0.2}} + +register_liquid("oleo:crude", S("Crude Oil"), { + liquid_viscosity = 7, + liquid_range = 2, + post_effect_color = {a = 250, r = 0, g = 0, b = 0}, + sounds = oleo_sounds, +}) + +register_liquid("oleo:naphtha", S("Naphtha"), { + liquid_viscosity = 7, + liquid_range = 2, + post_effect_color = {a = 250, r = 0, g = 0, b = 0}, + sounds = oleo_sounds, +}) + +if minetest.get_modpath("default") then + minetest.register_ore({ + ore_type = "blob", + ore = "oleo:crude_source", + wherein = {"default:stone"}, + clust_scarcity = 64 * 64 * 64, + clust_size = 5, + y_max = -20, + y_min = -31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = 2316, + octaves = 1, + persist = 0.0 + }, + biomes = { + "taiga_ocean", + "snowy_grassland_ocean", + "grassland_ocean", + "coniferous_forest_ocean", + "deciduous_forest_ocean", + "sandstone_desert_ocean", + "cold_desert_ocean", + }, + }) +else + minetest.log("warning", "[ore] Unable to find biomes to spawn ore in!") +end diff --git a/mods/oleo/locale/oleo.es.tr b/mods/oleo/locale/oleo.es.tr new file mode 100644 index 0000000..62c86f7 --- /dev/null +++ b/mods/oleo/locale/oleo.es.tr @@ -0,0 +1,13 @@ +# textdomain: oleo +Asphalt=Asfalto +Bucket=Cubo +Crude Oil=Petróleo +Flowing=Fuente de +Naphtha=Nafta +Oil Drum=Bidón de petróleo +Petrol=Gasolina +Plastic Sheeting=Lámina de plástico +Plastic Strip=Tira de plástico +Paraffin Wax=Cera de parafina + + diff --git a/mods/oleo/mod.conf b/mods/oleo/mod.conf new file mode 100644 index 0000000..7c5ce9c --- /dev/null +++ b/mods/oleo/mod.conf @@ -0,0 +1,3 @@ +name = oleo +description = Adds crude oleo, and derived products such as plastic. +optional_depends = default, basic_materials, bucket diff --git a/mods/oleo/nodes.lua b/mods/oleo/nodes.lua new file mode 100644 index 0000000..6be08ed --- /dev/null +++ b/mods/oleo/nodes.lua @@ -0,0 +1,42 @@ +-- internationalization boleoerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_node("oleo:asphalt", { + description = S("Asphalt"), + tiles = {"oleo_asphalt.png"}, + is_ground_content = false, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + type = "shapeless", + output = "oleo:asphalt", + recipe = {"oleo:crude_bucket", "default:sand"}, + replacements = {{"oleo:crude_bucket", "bucket:bucket_empty"}}, +}) + +minetest.register_node("oleo:oil_drum", { + description = S("Oil Drum"), + tiles = { + "oleo_drum_top.png", + "oleo_drum_bottom.png", + "oleo_drum_side.png", + "oleo_drum_side.png", + "oleo_drum_side.png", + "oleo_drum_side.png", + }, + is_ground_content = false, + groups = {cracky = 2, oil = 1}, + sounds = default.node_sound_metal_defaults(), +}) + +minetest.register_craft({ + type = "shaped", + output = "oleo:oil_drum", + recipe = { + {"oleo:crude_bucket", "oleo:crude_bucket", "oleo:crude_bucket"}, + {"oleo:crude_bucket", "", "oleo:crude_bucket"}, + {"oleo:crude_bucket", "oleo:crude_bucket", "oleo:crude_bucket"} + }, +}) diff --git a/mods/oleo/products.lua b/mods/oleo/products.lua new file mode 100644 index 0000000..15eb22f --- /dev/null +++ b/mods/oleo/products.lua @@ -0,0 +1,54 @@ +-- internationalization boleoerplate +local S = minetest.get_translator(minetest.get_current_modname()) + +if minetest.get_modpath("basic_materials") then + minetest.register_alias("oleo:plastic_sheet", "basic_materials:plastic_sheet") + minetest.register_alias("oleo:plastic_strip", "basic_materials:plastic_strip") + + minetest.clear_craft({ output = "basic_materials:oleo_extract" }) + minetest.clear_craft({ output = "basic_materials:paraffin" }) + minetest.clear_craft({ output = "basic_materials:plastic_sheet" }) + minetest.register_alias_force("basic_materials:oleo_extract", "oleo:crude_source") + + minetest.override_item("basic_materials:paraffin", { + description = S("Paraffin Wax") + }) +else + minetest.register_craftitem("oleo:plastic_sheet", { + description = S("Plastic Sheeting"), + inventory_image = "oleo_plastic_sheet.png", + }) + + minetest.register_craftitem("oleo:plastic_strip", { + description = S("Plastic Strip"), + inventory_image = "oleo_plastic_strip.png", + }) + + minetest.register_alias("basic_materials:plastic_sheet", "oleo:plastic_sheet") + minetest.register_alias("basic_materials:plastic_strip", "oleo:plastic_strip") + minetest.register_alias("basic_materials:oleo_extract", "oleo:crude_source") +end + +minetest.register_craft({ + output = "oleo:plastic_strip 9", + type = "shapeless", + recipe = { "oleo:plastic_sheet 3" }, +}) + +minetest.register_craft({ + output = "oleo:plastic_sheet 9", + type = "cooking", + recipe = "oleo:naphtha_bucket", +}) + +minetest.register_craft({ + output = "oleo:naphtha_bucket", + type = "cooking", + recipe = "oleo:crude_bucket", +}) + +minetest.register_craft({ + type = "fuel", + recipe = "oleo:naphtha_bucket", + burntime = 30, +}) diff --git a/mods/oleo/textures/oleo_asphalt.png b/mods/oleo/textures/oleo_asphalt.png new file mode 100644 index 0000000..e432302 Binary files /dev/null and b/mods/oleo/textures/oleo_asphalt.png differ diff --git a/mods/oleo/textures/oleo_crude.png b/mods/oleo/textures/oleo_crude.png new file mode 100644 index 0000000..f94eb2b Binary files /dev/null and b/mods/oleo/textures/oleo_crude.png differ diff --git a/mods/oleo/textures/oleo_crude_bucket.png b/mods/oleo/textures/oleo_crude_bucket.png new file mode 100644 index 0000000..635eb35 Binary files /dev/null and b/mods/oleo/textures/oleo_crude_bucket.png differ diff --git a/mods/oleo/textures/oleo_crude_flowing_animated.png b/mods/oleo/textures/oleo_crude_flowing_animated.png new file mode 100644 index 0000000..a944c8e Binary files /dev/null and b/mods/oleo/textures/oleo_crude_flowing_animated.png differ diff --git a/mods/oleo/textures/oleo_crude_source_animated.png b/mods/oleo/textures/oleo_crude_source_animated.png new file mode 100644 index 0000000..7697ea6 Binary files /dev/null and b/mods/oleo/textures/oleo_crude_source_animated.png differ diff --git a/mods/oleo/textures/oleo_distillation_column.png b/mods/oleo/textures/oleo_distillation_column.png new file mode 100644 index 0000000..ae7a625 Binary files /dev/null and b/mods/oleo/textures/oleo_distillation_column.png differ diff --git a/mods/oleo/textures/oleo_drum_bottom.png b/mods/oleo/textures/oleo_drum_bottom.png new file mode 100644 index 0000000..c8aeae1 Binary files /dev/null and b/mods/oleo/textures/oleo_drum_bottom.png differ diff --git a/mods/oleo/textures/oleo_drum_side.png b/mods/oleo/textures/oleo_drum_side.png new file mode 100644 index 0000000..51d67e1 Binary files /dev/null and b/mods/oleo/textures/oleo_drum_side.png differ diff --git a/mods/oleo/textures/oleo_drum_top.png b/mods/oleo/textures/oleo_drum_top.png new file mode 100644 index 0000000..b8a22dd Binary files /dev/null and b/mods/oleo/textures/oleo_drum_top.png differ diff --git a/mods/oleo/textures/oleo_lamp.png b/mods/oleo/textures/oleo_lamp.png new file mode 100644 index 0000000..112cd75 Binary files /dev/null and b/mods/oleo/textures/oleo_lamp.png differ diff --git a/mods/oleo/textures/oleo_naphtha.png b/mods/oleo/textures/oleo_naphtha.png new file mode 100644 index 0000000..1beab58 Binary files /dev/null and b/mods/oleo/textures/oleo_naphtha.png differ diff --git a/mods/oleo/textures/oleo_naphtha_bucket.png b/mods/oleo/textures/oleo_naphtha_bucket.png new file mode 100644 index 0000000..f593f3d Binary files /dev/null and b/mods/oleo/textures/oleo_naphtha_bucket.png differ diff --git a/mods/oleo/textures/oleo_naphtha_flowing_animated.png b/mods/oleo/textures/oleo_naphtha_flowing_animated.png new file mode 100644 index 0000000..8be58fa Binary files /dev/null and b/mods/oleo/textures/oleo_naphtha_flowing_animated.png differ diff --git a/mods/oleo/textures/oleo_naphtha_source_animated.png b/mods/oleo/textures/oleo_naphtha_source_animated.png new file mode 100644 index 0000000..69d5fa2 Binary files /dev/null and b/mods/oleo/textures/oleo_naphtha_source_animated.png differ diff --git a/mods/oleo/textures/oleo_paraffin.png b/mods/oleo/textures/oleo_paraffin.png new file mode 100644 index 0000000..77d2bbd Binary files /dev/null and b/mods/oleo/textures/oleo_paraffin.png differ diff --git a/mods/oleo/textures/oleo_plastic_sheet.png b/mods/oleo/textures/oleo_plastic_sheet.png new file mode 100644 index 0000000..4987321 Binary files /dev/null and b/mods/oleo/textures/oleo_plastic_sheet.png differ diff --git a/mods/oleo/textures/oleo_plastic_strip.png b/mods/oleo/textures/oleo_plastic_strip.png new file mode 100644 index 0000000..4bd6d1d Binary files /dev/null and b/mods/oleo/textures/oleo_plastic_strip.png differ diff --git a/mods/oleo/textures/oleo_smoke.png b/mods/oleo/textures/oleo_smoke.png new file mode 100644 index 0000000..488b50f Binary files /dev/null and b/mods/oleo/textures/oleo_smoke.png differ diff --git a/mods/on_eat/init.lua b/mods/on_eat/init.lua new file mode 100644 index 0000000..0329bf3 --- /dev/null +++ b/mods/on_eat/init.lua @@ -0,0 +1,159 @@ +minetest.register_on_item_eat(function(hp_change, replace_with_item, itemstack, user, pointed_thing) + + local hp = user:get_hp() + --if hp >= 20 then return itemstack end + + + local pos = user:getpos() + pos.y = pos.y + 1.53 + local itemname = itemstack:get_name() + local texture = minetest.registered_items[itemname].inventory_image + local dir = user:get_look_dir() + + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + texture = "eat_particles.png^"..texture.."^eat_particles.png^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformR180)^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformR90)^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformR270)^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformFX)^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformFXR180)^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformFXR90)^[makealpha:255,126,126", + + }) + + minetest.add_particlespawner({ + amount = 1, + time = 0.1, + minpos = pos, + maxpos = pos, + minvel = {x = dir.x - 1, y = dir.y, z = dir.z - 1}, + maxvel = {x = dir.x + 1, y = dir.y, z = dir.z + 1}, + minacc = {x = 0, y = -5, z = 0}, + maxacc = {x = 0, y = -9, z = 0}, + minexptime = 0.3, + maxexptime = 0.5, + minsize = 1.5, + maxsize = 3, + + texture = "eat_particles.png^"..texture.."^(eat_particles.png^[transformFXR270)^[makealpha:255,126,126", + + }) + + + +end) diff --git a/mods/on_eat/textures/eat_particles.png b/mods/on_eat/textures/eat_particles.png new file mode 100644 index 0000000..bb35bbf Binary files /dev/null and b/mods/on_eat/textures/eat_particles.png differ diff --git a/mods/pathfinder/README.md b/mods/pathfinder/README.md new file mode 100644 index 0000000..a8a76da --- /dev/null +++ b/mods/pathfinder/README.md @@ -0,0 +1 @@ +# pathfinder \ No newline at end of file diff --git a/mods/pathfinder/depends.txt b/mods/pathfinder/depends.txt new file mode 100644 index 0000000..b869949 --- /dev/null +++ b/mods/pathfinder/depends.txt @@ -0,0 +1,13 @@ +default? +stairs? +doors? +farming? +beds? +bones? +carts? +fire? +tnt? +vessels? +walls? +wool? +xpanes? diff --git a/mods/pathfinder/init.lua b/mods/pathfinder/init.lua new file mode 100644 index 0000000..0e45f24 --- /dev/null +++ b/mods/pathfinder/init.lua @@ -0,0 +1,362 @@ + +pathfinder = {} + +--[[ +minetest.get_content_id(name) +minetest.registered_nodes +minetest.get_name_from_content_id(id) +local ivm = a:index(pos.x, pos.y, pos.z) +local ivm = a:indexp(pos) +minetest.hash_node_position({x=,y=,z=}) +minetest.get_position_from_hash(hash) + +start_index, target_index, current_index +^ Hash of position + +current_value +^ {int:hCost, int:gCost, int:fCost, hash:parent, vect:pos} +]]-- + +local openSet = {} +local closedSet = {} + +local function get_distance(start_pos, end_pos) + local distX = math.abs(start_pos.x - end_pos.x) + local distZ = math.abs(start_pos.z - end_pos.z) + + if distX > distZ then + return 14 * distZ + 10 * (distX - distZ) + else + return 14 * distX + 10 * (distZ - distX) + end +end + +local function get_distance_to_neighbor(start_pos, end_pos) + local distX = math.abs(start_pos.x - end_pos.x) + local distY = math.abs(start_pos.y - end_pos.y) + local distZ = math.abs(start_pos.z - end_pos.z) + + if distX > distZ then + return (14 * distZ + 10 * (distX - distZ)) * (distY + 1) + else + return (14 * distX + 10 * (distZ - distX)) * (distY + 1) + end +end + +local function walkable(node, pos, current_pos) + if string.find(node.name,"doors:door") then + if (node.param2 == 0 or + node.param2 == 2) and + math.abs(pos.z - current_pos.z) > 0 and + pos.x == current_pos.x then + return true + elseif (node.param2 == 1 or + node.param2 == 3) and + math.abs(pos.z - current_pos.z) > 0 and + pos.x == current_pos.x then + return false + elseif (node.param2 == 0 or + node.param2 == 2) and + math.abs(pos.x - current_pos.x) > 0 and + pos.z == current_pos.z then + return false + elseif (node.param2 == 1 or + node.param2 == 3) and + math.abs(pos.x - current_pos.x) > 0 and + pos.z == current_pos.z then + return true + end + elseif string.find(node.name,"doors:hidden") then + local node_door = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) + if (node_door.param2 == 0 or + node_door.param2 == 2) and + math.abs(pos.z - current_pos.z) > 0 and + pos.x == current_pos.x then + return true + elseif (node_door.param2 == 1 or + node_door.param2 == 3) and + math.abs(pos.z - current_pos.z) > 0 and + pos.x == current_pos.x then + return false + elseif (node_door.param2 == 0 or + node_door.param2 == 2) and + math.abs(pos.x - current_pos.x) > 0 and + pos.z == current_pos.z then + return false + elseif (node_door.param2 == 1 or + node_door.param2 == 3) and + math.abs(pos.x - current_pos.x) > 0 and + pos.z == current_pos.z then + return true + end + + end + return minetest.registered_nodes[node.name].walkable +end + +local function get_neighbor_ground_level(pos, jump_height, fall_height, current_pos) + local node = minetest.get_node(pos) + local height = 0 + if walkable(node, pos, current_pos) then + repeat + height = height + 1 + if height > jump_height then + return nil + end + pos.y = pos.y + 1 + node = minetest.get_node(pos) + until not walkable(node, pos, current_pos) + return pos + else + repeat + height = height + 1 + if height > fall_height then + return nil + end + pos.y = pos.y - 1 + node = minetest.get_node(pos) + until walkable(node, pos, current_pos) + return {x = pos.x, y = pos.y + 1, z = pos.z} + end +end + +-- local function dot(a, b) +-- return a.x * b.x + a.y * b.y + a.z * b.z +-- end +-- +-- local function len(a) +-- return math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z) +-- end +-- +-- local function lensq(a) +-- return a.x * a.x + a.y * a.y + a.z * a.z +-- end +-- +-- local function normalize(a) +-- local l = len(a) +-- a.x = a.x / l +-- a.y = a.y / l +-- a.z = a.z / l +-- return a +-- end + +function pathfinder.find_path(pos, endpos, entity, dtime) + -- if dtime > 0.1 then + -- return + -- end + -- round positions if not done by former functions + pos = { + x = math.floor(pos.x + 0.5), + y = math.floor(pos.y + 0.5), + z = math.floor(pos.z + 0.5) + } + + endpos = { + x = math.floor(endpos.x + 0.5), + y = math.floor(endpos.y + 0.5), + z = math.floor(endpos.z + 0.5) + } + + local target_node = minetest.get_node(endpos) + if walkable(target_node, endpos, endpos) then + endpos.y = endpos.y + 1 + end + + local start_node = minetest.get_node(pos) + if string.find(start_node.name,"doors:door") then + if start_node.param2 == 0 then + pos.z = pos.z + 1 + elseif start_node.param2 == 1 then + pos.x = pos.x + 1 + elseif start_node.param2 == 2 then + pos.z = pos.z - 1 + elseif start_node.param2 == 3 then + pos.x = pos.x - 1 + end + end + + local start_time = minetest.get_us_time() + local start_index = minetest.hash_node_position(pos) + local target_index = minetest.hash_node_position(endpos) + local count = 1 + + openSet = {} + closedSet = {} + -- minetest.set_node(pos, {name = "default:glass"}) + -- minetest.set_node(endpos, {name = "default:glass"}) + -- print(dump(pos)) + -- print(endpos) + + local h_start = get_distance(pos, endpos) + openSet[start_index] = {hCost = h_start, gCost = 0, fCost = h_start, parent = nil, pos = pos} + + -- Entity values + local entity_height = math.ceil(entity.collisionbox[5] - entity.collisionbox[2]) or 2 + local entity_fear_height = entity.fear_height or 3 + local entity_jump_height = entity.jump_height or 1 + local neighbors_cache = {} + + repeat + local current_index + local current_values + + -- Get one index as reference from openSet + for i, v in pairs(openSet) do + current_index = i + current_values = v + break + end + -- Search for lowest fCost + for i, v in pairs(openSet) do + if v.fCost < openSet[current_index].fCost or v.fCost == current_values.fCost and v.hCost < current_values.hCost then + current_index = i + current_values = v + end + end + + openSet[current_index] = nil + closedSet[current_index] = current_values + count = count - 1 + + if current_index == target_index then + --~ minetest.chat_send_all("Found path in " .. (minetest.get_us_time() - start_time) / 1000 .. "ms") + local path = {} + repeat + if not closedSet[current_index] then + return + end + table.insert(path, closedSet[current_index].pos) + current_index = closedSet[current_index].parent + until start_index == current_index + table.insert(path, closedSet[current_index].pos) + local reverse_path = {} + repeat + table.insert(reverse_path, table.remove(path)) + until #path == 0 + minetest.chat_send_all("Found path in " .. (minetest.get_us_time() - start_time) / 1000 .. "ms. " .. "Path length: " .. #reverse_path) + return reverse_path + end + + local current_pos = current_values.pos + + local neighbors = {} + local neighbors_index = 1 + for z = -1, 1 do + for x = -1, 1 do + local neighbor_pos = {x = current_pos.x + x, y = current_pos.y, z = current_pos.z + z} + local neighbor = minetest.get_node(neighbor_pos) + local neighbor_ground_level = get_neighbor_ground_level(neighbor_pos, entity_jump_height, entity_fear_height, current_pos) + local neighbor_clearance = false + if neighbor_ground_level then + local neighbor_hash = minetest.hash_node_position(neighbor_ground_level) + local pos_above_head = {x = current_pos.x, y = current_pos.y + entity_height, z = current_pos.z} + local node_above_head = minetest.get_node(pos_above_head) + if neighbor_ground_level.y - current_pos.y > 0 and not walkable(node_above_head, pos_above_head, current_pos) then + local height = -1 + repeat + height = height + 1 + local pos = { x = neighbor_ground_level.x, + y = neighbor_ground_level.y + height, + z = neighbor_ground_level.z} + local node = minetest.get_node(pos) + until walkable(node, pos, current_pos) or height > entity_height + if height >= entity_height then + neighbor_clearance = true + end + elseif neighbor_ground_level.y - current_pos.y > 0 and walkable(node_above_head, pos_above_head, current_pos) then + neighbors[neighbors_index] = { + hash = nil, + pos = nil, + clear = nil, + walkable = nil, + } + else + local height = -1 + repeat + height = height + 1 + local pos = { x = neighbor_ground_level.x, + y = current_pos.y + height, + z = neighbor_ground_level.z} + local node = minetest.get_node(pos) + until walkable(node, pos, current_pos) or height > entity_height + if height >= entity_height then + neighbor_clearance = true + end + end + + neighbors[neighbors_index] = { + hash = minetest.hash_node_position(neighbor_ground_level), + pos = neighbor_ground_level, + clear = neighbor_clearance, + walkable = walkable(neighbor, neighbor_pos, current_pos), + } + else + neighbors[neighbors_index] = { + hash = nil, + pos = nil, + clear = nil, + walkable = nil, + } + end + + neighbors_index = neighbors_index + 1 + end + end + + for id, neighbor in pairs(neighbors) do + -- don't cut corners + local cut_corner = false + if id == 1 then + if not neighbors[id + 1].clear or not neighbors[id + 3].clear + or neighbors[id + 1].walkable or neighbors[id + 3].walkable then + cut_corner = true + end + elseif id == 3 then + if not neighbors[id - 1].clear or not neighbors[id + 3].clear + or neighbors[id - 1].walkable or neighbors[id + 3].walkable then + cut_corner = true + end + elseif id == 7 then + if not neighbors[id + 1].clear or not neighbors[id - 3].clear + or neighbors[id + 1].walkable or neighbors[id - 3].walkable then + cut_corner = true + end + elseif id == 9 then + if not neighbors[id - 1].clear or not neighbors[id - 3].clear + or neighbors[id - 1].walkable or neighbors[id - 3].walkable then + cut_corner = true + end + end + if neighbor.hash ~= current_index and not closedSet[neighbor.hash] and neighbor.clear and not cut_corner then + local move_cost_to_neighbor = current_values.gCost + get_distance_to_neighbor(current_values.pos, neighbor.pos) + local gCost = 0 + if openSet[neighbor.hash] then + gCost = openSet[neighbor.hash].gCost + end + if move_cost_to_neighbor < gCost or not openSet[neighbor.hash] then + if not openSet[neighbor.hash] then + count = count + 1 + end + local hCost = get_distance(neighbor.pos, endpos) + openSet[neighbor.hash] = { + gCost = move_cost_to_neighbor, + hCost = hCost, + fCost = move_cost_to_neighbor + hCost, + parent = current_index, + pos = neighbor.pos + } + end + end + end + if count > 300 then + minetest.chat_send_all("Path fail") + return + end + if (minetest.get_us_time() - start_time) / 1000 > 30 - dtime * 50 then + minetest.chat_send_all("Path timeout") + return + end + until count < 1 + minetest.chat_send_all("count < 1") + return {pos} +end diff --git a/mods/petz/.gitignore b/mods/petz/.gitignore new file mode 100644 index 0000000..aed8939 --- /dev/null +++ b/mods/petz/.gitignore @@ -0,0 +1,4 @@ +## Generic ignorable patterns and files +*.obj +*.blend1 +user.conf \ No newline at end of file diff --git a/mods/petz/.luacheckrc b/mods/petz/.luacheckrc new file mode 100644 index 0000000..133b1e7 --- /dev/null +++ b/mods/petz/.luacheckrc @@ -0,0 +1,31 @@ +unused_args = false +allow_defined_top = true +max_line_length = false + +globals = { + "minetest", + "mobkit", + "mokapi", + "petz", + "stairs", + "farming", + "player_api", + "hunger_ng", + "dye", + "armor", + "playerphysics", + "player_monoids", + "awards" +} + +read_globals = { + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Builtin + "vector", "ItemStack", + "dump", "DIR_DELIM", "VoxelArea", "Settings", + + -- MTG + "default", "sfinv", "creative", +} diff --git a/mods/petz/LICENSE.md b/mods/petz/LICENSE.md new file mode 100644 index 0000000..eddab14 --- /dev/null +++ b/mods/petz/LICENSE.md @@ -0,0 +1,5 @@ +# Licenses + +- Source code: GPLv3. +- Textures: CC BY-SA 4.0 +- Sounds: They have different licenses, see the 'sounds/LICENSE.MD' file. diff --git a/mods/petz/README.md b/mods/petz/README.md new file mode 100644 index 0000000..d0bb794 --- /dev/null +++ b/mods/petz/README.md @@ -0,0 +1,15 @@ +# Petz [petz] + +Cute kawaii mobs for Minetest. + +## Licenses + +- Code: GPL v3.0 +- Textures: CC BY-SA 4.0 +- Sounds: They have different licenses, see the 'sounds/LICENSE.MD' file. + +## The original RAW Blender Models + +There are in a separate github repository: + +[Petz RAW](https://github.com/runsy/petz_raw) diff --git a/mods/petz/bale/init.lua b/mods/petz/bale/init.lua new file mode 100644 index 0000000..4810a8a --- /dev/null +++ b/mods/petz/bale/init.lua @@ -0,0 +1,19 @@ +S = minetest.get_translator(minetest.get_current_modname()) + +minetest.register_node("bale:bale", { + description = S("Bale"), + tiles = {"bale_bale.png"}, + is_ground_content = false, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, + flammable = 3, feeder = 1}, + sounds = default.node_sound_defaults(), +}) + +minetest.register_craft({ + output = 'bale:bale', + recipe = { + {'farming:wheat', 'farming:wheat', 'farming:wheat'}, + {'farming:wheat', 'farming:wheat', 'farming:wheat'}, + {'farming:wheat', 'farming:wheat', 'farming:wheat'}, + } +}) diff --git a/mods/petz/bale/locale/bale.br.tr b/mods/petz/bale/locale/bale.br.tr new file mode 100644 index 0000000..0dc9a7c --- /dev/null +++ b/mods/petz/bale/locale/bale.br.tr @@ -0,0 +1,2 @@ +# textdomain: bale +Bale=Fardo de feno diff --git a/mods/petz/bale/locale/bale.de.tr b/mods/petz/bale/locale/bale.de.tr new file mode 100644 index 0000000..9215d21 --- /dev/null +++ b/mods/petz/bale/locale/bale.de.tr @@ -0,0 +1,2 @@ +# textdomain: bale +Bale=Heuballen diff --git a/mods/petz/bale/locale/bale.es.tr b/mods/petz/bale/locale/bale.es.tr new file mode 100644 index 0000000..bb6a1ba --- /dev/null +++ b/mods/petz/bale/locale/bale.es.tr @@ -0,0 +1,2 @@ +# textdomain: bale +Bale=Paca de heno diff --git a/mods/petz/bale/locale/bale.fr.tr b/mods/petz/bale/locale/bale.fr.tr new file mode 100644 index 0000000..df05b73 --- /dev/null +++ b/mods/petz/bale/locale/bale.fr.tr @@ -0,0 +1,2 @@ +# textdomain: bale +Bale=Botte de foin diff --git a/mods/petz/bale/locale/bale.ru.tr b/mods/petz/bale/locale/bale.ru.tr new file mode 100644 index 0000000..bbcb897 --- /dev/null +++ b/mods/petz/bale/locale/bale.ru.tr @@ -0,0 +1,2 @@ +# textdomain: bale +Bale=тюк сена diff --git a/mods/petz/bale/mod.conf b/mods/petz/bale/mod.conf new file mode 100644 index 0000000..32f82f9 --- /dev/null +++ b/mods/petz/bale/mod.conf @@ -0,0 +1,3 @@ +name = bale +description = A bale of hay (wheat) +depends = farming diff --git a/mods/petz/bale/textures/bale_bale.png b/mods/petz/bale/textures/bale_bale.png new file mode 100644 index 0000000..dbd13f3 Binary files /dev/null and b/mods/petz/bale/textures/bale_bale.png differ diff --git a/mods/petz/modpack.txt b/mods/petz/modpack.txt new file mode 100644 index 0000000..e69de29 diff --git a/mods/petz/mokapi/README.md b/mods/petz/mokapi/README.md new file mode 100644 index 0000000..11fbe43 --- /dev/null +++ b/mods/petz/mokapi/README.md @@ -0,0 +1,113 @@ +# Drop Functions + +## mokapi.drop_item(self, item, num) +Mob drops only one item. + +## mokapi.drop_items(self, killed_by_player) + +Mob drops a table list of items defined in the entity. + +Example of the 'drops' definition: +``` +drops = { + {name = "petz:mini_lamb_chop", chance = 1, min = 1, max = 1,}, + {name = "petz:bone", chance = 5, min = 1, max = 1,}, +}, +``` +## mokapi.node_drop_items(pos) + +Node drops the "drops" list saved in the node metadata. + +# Sound Functions + +## mokapi.make_misc_sound(self, chance, max_hear_distance) +Make a random sound from the "misc" sound definition. +The misc definition can be a single sound or a table of sounds. +Example of the 'misc' definition: +``` +sounds = { + misc = {"petz_kitty_meow", "petz_kitty_meow2", "petz_kitty_meow3"}, +}, +``` +## mokapi.make_sound(dest_type, dest, soundfile, max_hear_distance) +Make a sound on dest accordingly dest_type. + +dest_type can be "object, "player" or "pos". + +# Replace Function + +## mokapi.replace(self, sound_name, max_hear_distance) +Replace a node to another. Useful for eating grass. + +'sound_name' & 'max_hear_distance' are optionals. + +Example of the 'replace_what' definition: +``` +replace_rate = 10, +replace_offset = 0, +replace_what = { + {"group:grass", "air", -1}, + {"default:dirt_with_grass", "default:dirt", -2} +}, +``` +3 parameters for 'replace_what': replace_what, replace_with and y_offset + +# Feed & Tame Functions + +## function mokapi.feed(self, clicker, feed_rate, msg_full_health, sound_type) + +It returns true if fed. + +It checks against a string, a stringlist separated by commas or a table of 'self.follow' items or groups. +``` +self.follow = "farming:wheat" +self.follow = "group:food_meat_raw, mobs:raw_chicken" +self.follow = {"group:food_meat_raw", "mobs:raw_chicken"} +``` +'feed_rate' (from 0.0 to 1.0) is the percentage to heal referenced to self.max_hp + +msg_full_health is optional + +sound_type is the self.sound type + +## function mokapi.tame(self, feed_count, owner_name, msg_tamed, limit) +It returns true if tamed. + +'feed_count' is the amount of food to get the mob tamed. + +'limit' is an optional table with the following data: + +1. max = The limit of the tamed mobs by player +2. count = The current number of tamed mobs of the specific player that wants to tame +3. msg = Message when the limit of tamed mobs is reached + +if 'max > count + 1' then the taming process is aborted. + +## function mokapi.set_owner(self, owner_name) +Put 'self.tamed' to true and the 'self.owner' name. + +## function mokapi.remove_owner(self) +Put 'self.tamed' to false and the 'self.owner' to nil. + +## function mokapi.set_health(self, rate) +'rate' (from 0.0 to 1.0) is the percentage of self.max_hp + +rate can be positive or negative + +# Helper Functions + +## function mokapi.remove_mob(self) +It clears the mob HQ and LQ behaviours and then remove it from the world. + +# Commands + +## clear_mobs modname +It clears all the mobkit non-tamed mobs in the closest range of the player. + +Modname is the mod of the mobs to clear. + +# Server +## function mokapi.cron_clear(cron_time, modname) +It creates a cron task to clearing all the 'modname' non-tamed mobs in the closest range of all the server's players (or game) from time to time. + +If cron_time <= 0 then the cron task does not run. diff --git a/mods/petz/mokapi/api/api_clear_mobs.lua b/mods/petz/mokapi/api/api_clear_mobs.lua new file mode 100644 index 0000000..8eece05 --- /dev/null +++ b/mods/petz/mokapi/api/api_clear_mobs.lua @@ -0,0 +1,13 @@ +function mokapi.clear_mobs(pos, modname) + for _, obj in ipairs(minetest.get_objects_inside_radius(pos, 100)) do + local ent_name = obj:get_entity_name() + if not(obj:is_player()) and minetest.registered_entities[ent_name] then + local colon_pos = string.find(ent_name, ':') + local ent_modname = string.sub(ent_name, 1, colon_pos-1) + local ent = obj:get_luaentity() + if ent_modname == modname and ent.type and not(ent.tamed) then + mokapi.remove_mob(ent) + end + end + end +end diff --git a/mods/petz/mokapi/api/api_commands.lua b/mods/petz/mokapi/api/api_commands.lua new file mode 100644 index 0000000..1ca8037 --- /dev/null +++ b/mods/petz/mokapi/api/api_commands.lua @@ -0,0 +1,17 @@ +minetest.register_chatcommand("clear_mobs", { + description = "Clear all non-tamed mobs", + privs = { + server = true, + }, + func = function(name, param) + local modname = string.match(param, "([%a%d_-]+)") + if not modname then + return true, "Error: You have to specifiy a namespace (mod name)" + end + local player_pos = minetest.get_player_by_name(name):get_pos() + if not player_pos then + return + end + mokapi.clear_mobs(player_pos, modname) + end, +}) diff --git a/mods/petz/mokapi/api/api_consts.lua b/mods/petz/mokapi/api/api_consts.lua new file mode 100644 index 0000000..43f11d4 --- /dev/null +++ b/mods/petz/mokapi/api/api_consts.lua @@ -0,0 +1,4 @@ +mokapi.consts = {} +mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE = 5 +mokapi.consts.DEFAULT_FEED_RATE = 0.3 +mokapi.consts.DEFAULT_FEED_COUNT = 5 diff --git a/mods/petz/mokapi/api/api_cron.lua b/mods/petz/mokapi/api/api_cron.lua new file mode 100644 index 0000000..763568a --- /dev/null +++ b/mods/petz/mokapi/api/api_cron.lua @@ -0,0 +1,15 @@ +function mokapi.cron_clear(cron_time, modname) + if cron_time > 0 then + minetest.after(cron_time, function() + mokapi.cron_clear_mobs(cron_time, modname) + end, cron_time, modname) + end +end + +function mokapi.cron_clear_mobs(cron_time, modname) + for _, player in ipairs(minetest.get_connected_players()) do + local player_pos = player:get_pos() + mokapi.clear_mobs(player_pos, modname) + end + mokapi.cron_clear(cron_time, modname) +end diff --git a/mods/petz/mokapi/api/api_drops.lua b/mods/petz/mokapi/api/api_drops.lua new file mode 100644 index 0000000..574844b --- /dev/null +++ b/mods/petz/mokapi/api/api_drops.lua @@ -0,0 +1,84 @@ +-- +--Helper funtions +-- +function mokapi.drop_velocity(obj) + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 6, + z = math.random(-10, 10) / 9, + }) +end + +function mokapi.drop_object(obj) + if obj and obj:get_luaentity() then + mokapi.drop_velocity(obj) + elseif obj then + obj:remove() -- item does not exist + end +end + +-- +--Functions +-- +function mokapi.drop_item(self, item, num) + if not item then + return + end + if not num then + num = 1 + end + local pos + if type(self) == 'table' then --entity + pos = self.object:get_pos() + else --player + pos = self:get_pos() + end + local obj = minetest.add_item(pos, ItemStack(item .. " " .. num)) + mokapi.drop_object(obj) +end + +function mokapi.drop_items(self, killed_by_player) + if not self.drops or #self.drops == 0 then -- check for nil or no drops + return + end + if self.child then -- no drops for child mobs + return + end + local obj, item, num + local pos = self.object:get_pos() + for n = 1, #self.drops do + if math.random(1, self.drops[n].chance) == 1 then + num = math.random(self.drops[n].min or 0, self.drops[n].max or 1) + item = self.drops[n].name + if killed_by_player then -- only drop rare items (drops.min=0) if killed by player + obj = minetest.add_item(pos, ItemStack(item .. " " .. num)) + elseif self.drops[n].min ~= 0 then + obj = minetest.add_item(pos, ItemStack(item .. " " .. num)) + end + mokapi.drop_object(obj) + end + end + self.drops = {} +end + +function mokapi.node_drop_items(pos) + local meta = minetest.get_meta(pos) + if not meta then + return + end + local drops= minetest.deserialize(meta:get_string("drops")) + if not drops or #drops == 0 then -- check for nil or no drops + return + end + local obj, item, num + for n = 1, #drops do + if math.random(1, drops[n].chance) == 1 then + num = math.random(drops[n].min or 0, drops[n].max or 1) + item = drops[n].name + if drops[n].min ~= 0 then + obj = minetest.add_item(pos, ItemStack(item .. " " .. num)) + end + mokapi.drop_object(obj) + end + end +end diff --git a/mods/petz/mokapi/api/api_feed_tame.lua b/mods/petz/mokapi/api/api_feed_tame.lua new file mode 100644 index 0000000..b146070 --- /dev/null +++ b/mods/petz/mokapi/api/api_feed_tame.lua @@ -0,0 +1,76 @@ +function mokapi.feed(self, clicker, feed_rate, msg_full_health, sound_type) + local fed = false + local wielded_item = clicker:get_wielded_item() + local wielded_item_name = wielded_item:get_name() + if mokapi.item_in_itemlist(wielded_item_name, self.follow) then -- Can eat/tame with item in hand + fed = true + local creative_mode = minetest.settings:get_bool("creative_mode") + if creative_mode == false then -- if not in creative, take item + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) + end + --Feed--> + mokapi.set_health(self, feed_rate or mokapi.consts.DEFAULT_FEED_RATE) + if self.hp >= self.max_hp then + self.hp = self.max_hp + if msg_full_health then + minetest.chat_send_player(clicker:get_player_name(), msg_full_health) + end + end + self.food_count = mobkit.remember(self, "food_count", self.food_count + 1) --increase the food count + if sound_type then + mobkit.make_sound(self, sound_type) + end + end + return fed +end + +function mokapi.tame(self, feed_count, owner_name, msg_tamed, limit) + local tamed = false + if self.food_count >= (feed_count or mokapi.consts.DEFAULT_FEED_COUNT) then + self.food_count = mobkit.remember(self, "food_count", 0) --reset + if self.tamed == false then --if not tamed + local limit_reached = false + if limit and (limit.max >= 0) then + --minetest.chat_send_player(owner_name, "limit.max="..tostring(limit.max)..", limit.count="..tostring(limit.count)) + if (limit.count +1) > limit.max then + minetest.chat_send_player(owner_name, limit.msg) + limit_reached = true + end + end + if not limit_reached then + tamed = true + mokapi.set_owner(self, owner_name) + if msg_tamed then + minetest.chat_send_player(owner_name, msg_tamed) + end + mobkit.clear_queue_high(self) -- clear behaviour (i.e. it was running away) + end + end + end + return tamed +end + +function mokapi.set_owner(self, owner_name) + self.tamed = mobkit.remember(self, "tamed", true) + self.owner = mobkit.remember(self, "owner", owner_name) +end + +function mokapi.remove_owner(self) + self.tamed = mobkit.remember(self, "tamed", false) + self.owner = mobkit.remember(self, "owner", nil) +end + +--Calculate heal/hurt hunger + +function mokapi.set_health(self, rate) + if rate > 1.0 then + rate = 1.0 + end + local hp_amount = math.abs(self.max_hp * rate) + if rate >= 0 then + mobkit.heal(self, hp_amount) + else + mobkit.hurt(self, hp_amount) + end +end diff --git a/mods/petz/mokapi/api/api_helper_functions.lua b/mods/petz/mokapi/api/api_helper_functions.lua new file mode 100644 index 0000000..104fd83 --- /dev/null +++ b/mods/petz/mokapi/api/api_helper_functions.lua @@ -0,0 +1,40 @@ +function mokapi.item_in_itemlist(item_name, itemlist) + local match = false + local table = false + if type(itemlist) == "table" then + table = true + end + if item_name and itemlist then + local items + if not table then + items = string.split(itemlist, ',') + else + items = itemlist + end + for i = 1, #items do --loop thru all items + --minetest.chat_send_player("singleplayer", "itemlist item="..items[i]) + --minetest.chat_send_player("singleplayer", "item name="..item_name) + local item = petz.str_remove_spaces(items[i]) --remove spaces + if string.sub(item, 1, 5) == "group" then + local item_group = minetest.get_item_group(item_name, string.sub(item, 7)) + if item_group > 0 then + match = true + break + end + else + if item == item_name then --if node name matches + match = true + break + end + end + end + return match + end +end + +function mokapi.remove_mob(self) + --IMPORTANT: Firstly: Delete Behaviours + mobkit.clear_queue_high(self) + mobkit.clear_queue_low(self) + self.object:remove() +end diff --git a/mods/petz/mokapi/api/api_math.lua b/mods/petz/mokapi/api/api_math.lua new file mode 100644 index 0000000..ce6ea15 --- /dev/null +++ b/mods/petz/mokapi/api/api_math.lua @@ -0,0 +1,43 @@ +function mokapi.delimit_number(number, range) + if not tonumber(number) then + return nil + end + if number < range.min then + number = range.min + elseif number > range.max then + number = range.max + end + return number +end + +function mokapi.round(x) + return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5) +end + +--Trigonometric Functions + +--converts yaw to degrees +function mokapi.degrees(yaw) + return(yaw * 180.0 / math.pi) +end + +function mokapi.degrees_to_radians(degrees) + return(degrees/180.0*math.pi) +end + +--converts yaw to degrees +function mokapi.yaw_to_degrees(yaw) + return(yaw*180.0/math.pi) +end + +--rounds it up to an integer +function mokapi.degree_round(degree) + return(degree + 0.5 - (degree + 0.5) % 1) +end + +--turns radians into degrees - not redundant +--doesn't add math.pi +function mokapi.radians_to_degrees(radians) + return(radians*180.0/math.pi) +end + diff --git a/mods/petz/mokapi/api/api_replace.lua b/mods/petz/mokapi/api/api_replace.lua new file mode 100644 index 0000000..23c5b83 --- /dev/null +++ b/mods/petz/mokapi/api/api_replace.lua @@ -0,0 +1,31 @@ +-- +--Replace Engine +-- + +function mokapi.replace(self, sound_name, max_hear_distance) + if not self.replace_rate or not self.replace_what or self.child == true or self.object:get_velocity().y ~= 0 or math.random(1, self.replace_rate) > 1 then + return false + end + local pos = self.object:get_pos() + local what, with, y_offset + if type(self.replace_what[1]) == "table" then + local num = math.random(#self.replace_what) + what = self.replace_what[num][1] or "" + with = self.replace_what[num][2] or "" + y_offset = self.replace_what[num][3] or 0 + else + what = self.replace_what + with = self.replace_with or "" + y_offset = self.replace_offset or 0 + end + pos.y = pos.y + y_offset + if #minetest.find_nodes_in_area(pos, pos, what) > 0 then + minetest.set_node(pos, {name = with}) + if sound_name then + mokapi.make_sound("object", self.object, sound_name, max_hear_distance or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE) + end + return true + else + return false + end +end diff --git a/mods/petz/mokapi/api/api_sound.lua b/mods/petz/mokapi/api/api_sound.lua new file mode 100644 index 0000000..9a5be8f --- /dev/null +++ b/mods/petz/mokapi/api/api_sound.lua @@ -0,0 +1,33 @@ +-- +--Sound System +-- + +function mokapi.make_misc_sound(self, chance, max_hear_distance) + if self.muted == true then + return + end + local random_number = math.random(1, chance) + if random_number == 1 then + if self.sounds and self.sounds['misc'] then + local misc_sound + if (type(self.sounds['misc']) == "table") then + misc_sound = self.sounds['misc'][math.random(1, #self.sounds['misc'])] + else + misc_sound = self.sounds['misc'] + end + mokapi.make_sound("object", self.object, misc_sound, max_hear_distance or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE) + end + end +end + +function mokapi.make_sound(dest_type, dest, soundfile, max_hear_distance) + if dest_type == "object" then + minetest.sound_play(soundfile, {object = dest, gain = 0.5, max_hear_distance = max_hear_distance or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE,}) + elseif dest_type == "player" then + local player_name = dest:get_player_name() + --minetest.chat_send_player("singleplayer", player_name..tostring(max_hear_distance)) + minetest.sound_play(soundfile, {to_player = player_name, gain = 0.5, max_hear_distance = max_hear_distance or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE,}) + elseif dest_type == "pos" then + minetest.sound_play(soundfile, {pos = dest, gain = 0.5, max_hear_distance = max_hear_distance or mokapi.consts.DEFAULT_MAX_HEAR_DISTANCE,}) + end +end diff --git a/mods/petz/mokapi/init.lua b/mods/petz/mokapi/init.lua new file mode 100644 index 0000000..ba7dd97 --- /dev/null +++ b/mods/petz/mokapi/init.lua @@ -0,0 +1,14 @@ +mokapi = {} --the global variable +local modname = "mokapi" --the modname +local modpath = minetest.get_modpath(modname) --the modpath +--load the apis: +assert(loadfile(modpath.."/api/api_consts.lua"))() +assert(loadfile(modpath.."/api/api_cron.lua"))() +assert(loadfile(modpath.."/api/api_clear_mobs.lua"))() +assert(loadfile(modpath.."/api/api_drops.lua"))() +assert(loadfile(modpath.."/api/api_sound.lua"))() +assert(loadfile(modpath.."/api/api_replace.lua"))() +assert(loadfile(modpath.."/api/api_feed_tame.lua"))() +assert(loadfile(modpath.."/api/api_helper_functions.lua"))() +assert(loadfile(modpath.."/api/api_commands.lua"))() +assert(loadfile(modpath.."/api/api_math.lua"))() diff --git a/mods/petz/mokapi/mod.conf b/mods/petz/mokapi/mod.conf new file mode 100644 index 0000000..34a51c4 --- /dev/null +++ b/mods/petz/mokapi/mod.conf @@ -0,0 +1,3 @@ +name = mokapi +description = A high level API for mobkit +depends = mobkit diff --git a/mods/petz/petz/CHANGELOG.md b/mods/petz/petz/CHANGELOG.md new file mode 100644 index 0000000..139597f --- /dev/null +++ b/mods/petz/petz/CHANGELOG.md @@ -0,0 +1,2 @@ + + diff --git a/mods/petz/petz/README.md b/mods/petz/petz/README.md new file mode 100644 index 0000000..42d2986 --- /dev/null +++ b/mods/petz/petz/README.md @@ -0,0 +1,13 @@ +# Petz [petz] + +Cute kawaii mobs for Minetest. + +## Licenses + +- Code: GPL v3.0 +- Textures: CC BY-SA 4.0 +- Sounds: They have different licenses, see the 'sounds/LICENSE.MD' file. + +## Blender Files + +The original Blender Files are in another repository. diff --git a/mods/petz/petz/api/api.lua b/mods/petz/petz/api/api.lua new file mode 100644 index 0000000..76dfd8b --- /dev/null +++ b/mods/petz/petz/api/api.lua @@ -0,0 +1,45 @@ +local modpath, S = ... + +assert(loadfile(modpath .. "/api/api_helper_functions.lua"))() +assert(loadfile(modpath .. "/api/api_datetime.lua"))() +assert(loadfile(modpath .. "/api/api_spawn.lua"))() +assert(loadfile(modpath .. "/api/api_orders.lua"))() +assert(loadfile(modpath .. "/api/api_init_prop.lua"))() --Load the init the properties for the entities +assert(loadfile(modpath .. "/api/api_forms.lua"))(S) +assert(loadfile(modpath .. "/api/api_on_rightclick.lua"))(S) +assert(loadfile(modpath .. "/api/api_on_die.lua"))() +assert(loadfile(modpath .. "/api/api_on_punch.lua"))() +assert(loadfile(modpath .. "/api/api_feed_tame.lua"))(S) +assert(loadfile(modpath .. "/api/api_capture.lua"))(S) +assert(loadfile(modpath .. "/api/api_tamagochi.lua"))(S) +assert(loadfile(modpath .. "/api/api_breed.lua"))(S) +assert(loadfile(modpath .. "/api/api_wool_milk.lua"))(S) +assert(loadfile(modpath .. "/api/api_mount.lua"))() +assert(loadfile(modpath .. "/api/api_dreamcatcher.lua"))(S) +assert(loadfile(modpath .. "/api/api_eggs.lua"))() +assert(loadfile(modpath .. "/api/api_squareball.lua"))(S) +assert(loadfile(modpath .. "/api/api_convert.lua"))(S) +assert(loadfile(modpath .. "/api/api_nametag.lua"))() +assert(loadfile(modpath .. "/api/api_dam_beaver.lua"))(modpath) +assert(loadfile(modpath .. "/api/api_particles.lua"))() +assert(loadfile(modpath .. "/api/api_whistle.lua"))(S) +assert(loadfile(modpath .. "/api/api_silk.lua"))(S) +assert(loadfile(modpath .. "/api/api_on_step.lua"))() +assert(loadfile(modpath .. "/api/api_sleep.lua"))() +assert(loadfile(modpath .. "/api/api_env_damage.lua"))() +assert(loadfile(modpath .. "/api/api_bees.lua"))(S) +assert(loadfile(modpath .. "/api/api_throw.lua"))() +assert(loadfile(modpath .. "/api/api_collisionbox.lua"))() +assert(loadfile(modpath .. "/api/api_colorize.lua"))() +assert(loadfile(modpath .. "/api/api_horseshoes.lua"))(S) +assert(loadfile(modpath .. "/api/api_blood.lua"))() +assert(loadfile(modpath .. "/api/api_poop.lua"))() +assert(loadfile(modpath .. "/api/api_brush.lua"))(S) +assert(loadfile(modpath .. "/api/api_bottled.lua"))(modpath, S) +assert(loadfile(modpath .. "/api/api_colors.lua"))() +assert(loadfile(modpath .. "/api/api_sell_buy.lua"))(S) +assert(loadfile(modpath .. "/api/api_lifetime.lua"))() +assert(loadfile(modpath .. "/api/api_back_home.lua"))() +assert(loadfile(modpath .. "/api/api_on_deactivate.lua"))() +assert(loadfile(modpath .. "/api/api_wagon.lua"))() + diff --git a/mods/petz/petz/api/api_back_home.lua b/mods/petz/petz/api/api_back_home.lua new file mode 100644 index 0000000..3435c5c --- /dev/null +++ b/mods/petz/petz/api/api_back_home.lua @@ -0,0 +1,40 @@ +function petz.back_home(self) + local pos = self.object:get_pos() + local home_pos = self.home_pos + if not home_pos then + return + end + local distance = vector.distance(pos, home_pos) + if distance <= petz.settings["back_home_distance"] then + return + end + local node = minetest.get_node_or_nil(home_pos) + local map_loaded + if not node then + -- Load the map at pos and try again + --minetest.chat_send_all("manip") + minetest.get_voxel_manip():read_from_map(home_pos, home_pos) + node = minetest.get_node(pos) + map_loaded = true + end + if not node then + return + end + if node.name == "air" then + --minetest.chat_send_all("test") + local forceload + if map_loaded then + forceload = minetest.forceload_block(home_pos) + --minetest.chat_send_all("FORCELOAD") + if not forceload then + --minetest.chat_send_all("NO FORCELOAD") + return + end + end + --minetest.chat_send_all("test2") + self.object:set_pos(home_pos) + if map_loaded then + minetest.forceload_free_block(pos) + end + end +end diff --git a/mods/petz/petz/api/api_bees.lua b/mods/petz/petz/api/api_bees.lua new file mode 100644 index 0000000..c369c8f --- /dev/null +++ b/mods/petz/petz/api/api_bees.lua @@ -0,0 +1,62 @@ +local S = ... + +petz.set_infotext_behive = function(meta, honey_count, bee_count) + local total_bees = meta:get_int("total_bees") or petz.settings.max_bees_behive + meta:set_string("infotext", S("Honey")..": "..tostring(honey_count) .." | "..S("Bees Inside")..": "..tostring(bee_count).." | "..S("Total Bees")..": "..tostring(total_bees)) +end + +petz.decrease_total_bee_count = function(pos) + local meta = minetest.get_meta(pos) + local total_bees = meta:get_int("total_bees") or petz.settings.max_bees_behive + total_bees = total_bees - 1 + meta:set_int("total_bees", total_bees) +end + +petz.behive_exists = function(self) + local behive_exists + if self.behive then + local node = minetest.get_node_or_nil(self.behive) + if node and node.name == "petz:beehive" then + behive_exists = true + else + behive_exists = false + end + else + behive_exists = false + end + if behive_exists then + return true + else + self.behive = nil + return false + end +end + +petz.get_behive_stats = function(pos) + if not(pos) then + return + end + local meta = minetest.get_meta(pos) + local honey_count = meta:get_int("honey_count") or 0 + local bee_count = meta:get_int("bee_count") or 0 + return meta, honey_count, bee_count +end + +petz.spawn_bee_pos = function(pos) --Check a pos close to a behive to spawn a bee + local pos_1 = { + x = pos.x - 1, + y = pos.y - 1, + z = pos.z - 1, + } + local pos_2 = { + x = pos.x + 1, + y = pos.y + 1, + z = pos.z + 1, + } + local spawn_pos_list = minetest.find_nodes_in_area(pos_1, pos_2, {"air"}) + if #spawn_pos_list > 0 then + return spawn_pos_list[math.random(1, #spawn_pos_list)] + else + return nil + end +end diff --git a/mods/petz/petz/api/api_blood.lua b/mods/petz/petz/api/api_blood.lua new file mode 100644 index 0000000..2884ea2 --- /dev/null +++ b/mods/petz/petz/api/api_blood.lua @@ -0,0 +1,29 @@ +function petz.blood(self) + if not(petz.settings.blood) or self.no_blood then + return + end + local pos = self.object:get_pos() + local texture + if self.blood_texture then + texture = self.blood_texture + else + texture = "petz_blood.png" + end + local gravity = -9.8 + minetest.add_particlespawner({ + amount = 5, + time = 0.25, + minpos = pos, + maxpos = pos, + minvel = {x = -1, y = -1, z = -1}, + maxvel = {x = 1, y = 1, z = 1}, + minacc = {x = 0, y = gravity, z = 0}, + maxacc = {x = 0, y = gravity, z = 0}, + minexptime = 0.1, + maxexptime = 1, + minsize = 0.5, + maxsize = 1, + texture = texture, + glow = 0 + }) +end diff --git a/mods/petz/petz/api/api_bottled.lua b/mods/petz/petz/api/api_bottled.lua new file mode 100644 index 0000000..54cd339 --- /dev/null +++ b/mods/petz/petz/api/api_bottled.lua @@ -0,0 +1,16 @@ + +petz.bottled = function(self, clicker) + --capture the petz with the 'bottled' property in the bottle + local new_stack = ItemStack(self.bottled) -- add special mob egg with all mob information + local stack_meta = new_stack:get_meta() + local itemstack_meta = petz.capture(self, clicker, false) + stack_meta:set_int("petz:texture_no", itemstack_meta:get_int("texture_no")) + --minetest.chat_send_all("texture= "..itemstack_meta:get_int("texture_no")) + local inv = clicker:get_inventory() + if inv:room_for_item("main", new_stack) then + inv:add_item("main", new_stack) + inv:remove_item("main", "vessels:glass_bottle") + else + minetest.add_item(clicker:get_pos(), new_stack) + end +end diff --git a/mods/petz/petz/api/api_breed.lua b/mods/petz/petz/api/api_breed.lua new file mode 100644 index 0000000..87806ef --- /dev/null +++ b/mods/petz/petz/api/api_breed.lua @@ -0,0 +1,166 @@ +local S = ... + +petz.breed = function(self, clicker, wielded_item, wielded_item_name) + if not(self.is_rut) and not(self.is_pregnant) then + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) + self.is_rut = true + mobkit.remember(self, "is_rut", self.is_rut) + petz.do_particles_effect(self.object, self.object:get_pos(), "heart") + mokapi.make_sound("object", self.object, "petz_"..self.type.."_moaning", petz.settings.max_hear_distance) + else + if self.is_rut then + minetest.chat_send_player(clicker:get_player_name(), S("This animal is already rut.")) + else + minetest.chat_send_player(clicker:get_player_name(), S("This animal is already pregnant.")) + end + end +end + +petz.pony_breed = function(self, clicker, wielded_item, wielded_item_name) + if wielded_item_name == "petz:glass_syringe" and self.is_male then + local new_wielded_item = ItemStack("petz:glass_syringe_sperm") + local meta = new_wielded_item:get_meta() + local speedup = (self.horseshoes or 0) * petz.settings.horseshoe_speedup + meta:set_string("petz_type", self.type) + meta:set_int("max_speed_forward", (self.max_speed_forward - speedup)) + meta:set_int("max_speed_reverse", (self.max_speed_reverse - speedup)) + meta:set_int("accel", (self.accel - speedup)) + if wielded_item:get_count() > 1 then + local inv = clicker:get_inventory() + if not inv:room_for_item("main", new_wielded_item) then + minetest.chat_send_player(clicker:get_player_name(), S("No room in your inventory for a Glass Syringe with seed.")) + return + end + wielded_item:take_item(1) + clicker:set_wielded_item(wielded_item) + inv:add_item("main", new_wielded_item) + else + clicker:set_wielded_item(new_wielded_item) + end + elseif wielded_item_name == "petz:glass_syringe_sperm" and not(self.is_male) then + local meta = wielded_item:get_meta() + local petz_type = meta:get_string("petz_type") + if not(self.is_pregnant) and self.pregnant_count > 0 and self.type == petz_type then + self.is_pregnant = mobkit.remember(self, "is_pregnant", true) + local pregnant_count = self.pregnant_count - 1 + mobkit.remember(self, "pregnant_count", pregnant_count) + local max_speed_forward = meta:get_int("max_speed_forward") + local max_speed_reverse = meta:get_int("max_speed_reverse") + local accel = meta:get_int("accel") + local father_veloc_stats = {} + father_veloc_stats["max_speed_forward"] = max_speed_forward + father_veloc_stats["max_speed_reverse"] = max_speed_reverse + father_veloc_stats["accel"] = accel + self.father_veloc_stats = mobkit.remember(self, "father_veloc_stats", father_veloc_stats) + petz.do_particles_effect(self.object, self.object:get_pos(), "pregnant".."_"..self.type) + clicker:set_wielded_item("petz:glass_syringe") + end + end +end + +petz.childbirth = function(self) + local pos = self.object:get_pos() + self.is_pregnant = mobkit.remember(self, "is_pregnant", false) + self.pregnant_time = mobkit.remember(self, "pregnant_time", 0.0) + local baby_properties = {} + baby_properties["baby_born"] = true + if self.father_genes then + baby_properties["gen1_father"] = self.father_genes["gen1"] + baby_properties["gen2_father"] = self.father_genes["gen2"] + else + baby_properties["gen1_father"] = math.random(1, #self.skin_colors-1) + baby_properties["gen2_father"] = math.random(1, #self.skin_colors-1) + end + if self and self.genes then + baby_properties["gen1_mother"] = self.genes["gen1"] + baby_properties["gen2_mother"] = self.genes["gen2"] + else + baby_properties["gen1_mother"] = math.random(1, #self.skin_colors-1) + baby_properties["gen2_mother"] = math.random(1, #self.skin_colors-1) + end + local baby_type = "petz:"..self.type + if self.type == "elephant" then -- female elephants have "elephant" as type + if math.random(1, 2) == 1 then + baby_type = "petz:elephant_female" --could be a female baby elephant + end + end + pos.y = pos.y + 1.01 -- birth a litte up + local baby = minetest.add_entity(pos, baby_type, minetest.serialize(baby_properties)) + mokapi.make_sound("object", baby, "petz_pop_sound", petz.settings.max_hear_distance) + local baby_entity = baby:get_luaentity() + baby_entity.is_baby = true + mobkit.remember(baby_entity, "is_baby", baby_entity.is_baby) + if not(self.owner== nil) and not(self.owner== "") then + baby_entity.tamed = true + mobkit.remember(baby_entity, "tamed", baby_entity.tamed) + baby_entity.owner = self.owner + mobkit.remember(baby_entity, "owner", baby_entity.owner) + end + return baby_entity +end + +petz.pregnant_timer = function(self, dtime) + self.pregnant_time = mobkit.remember(self, "pregnant_time", self.pregnant_time + dtime) + if self.pregnant_time >= petz.settings.pregnancy_time then + local baby_entity = petz.childbirth(self) + if self.is_mountable then + --Set the genetics accordingly the father and the mother + local speedup = (self.horseshoes or 0) * petz.settings.horseshoe_speedup + local random_number = math.random(-1, 1) + local new_max_speed_forward = petz.round(((self.father_veloc_stats["max_speed_forward"] or 1) + (self.max_speed_forward-speedup))/2) + random_number + if new_max_speed_forward <= 0 then + new_max_speed_forward = 0 + elseif new_max_speed_forward > 10 then + new_max_speed_forward = 10 + end + random_number = math.random(-1, 1) + local new_max_speed_reverse = petz.round(((self.father_veloc_stats["max_speed_reverse"] or 1) + (self.max_speed_reverse-speedup))/2) + random_number + if new_max_speed_reverse <= 0 then + new_max_speed_reverse = 0 + elseif new_max_speed_reverse > 10 then + new_max_speed_reverse = 10 + end + random_number = math.random(-1, 1) + local new_accel = petz.round(((self.father_veloc_stats["accel"] or 1) + (self.accel-speedup))/2) + random_number + if new_accel <= 0 then + new_accel = 0 + elseif new_accel > 10 then + new_accel = 10 + end + baby_entity.max_speed_forward = new_max_speed_forward + mobkit.remember(baby_entity, "max_speed_forward", baby_entity.max_speed_forward) + baby_entity.max_speed_reverse = new_max_speed_reverse + mobkit.remember(baby_entity, "max_speed_reverse", baby_entity.max_speed_reverse) + baby_entity.accel = new_accel + mobkit.remember(baby_entity, "accel", baby_entity.accel) + end + end +end + +petz.growth_timer = function(self, dtime) + self.growth_time = mobkit.remember(self, "growth_time", (self.growth_time or 0) + dtime) + if self.growth_time >= petz.settings.growth_time then + self.is_baby = mobkit.remember(self, "is_baby", false) + local pos = self.object:get_pos() + pos.y = pos.y + 1.01 -- grows a litte up + self.object:set_pos(pos) + local obj + if self.parents then -- for chicken only + mokapi.remove_mob(self) + obj = minetest.add_entity(pos, self.parents[math.random(1, #self.parents)]) + else + obj = self.object + petz.set_properties(self, { + jump = false, + is_baby = false, + visual_size = self.visual_size, + collisionbox = self.collisionbox + }) + end + local vel = obj:get_velocity() + vel.y=vel.y + 4.0 + obj:set_velocity(vel) + mokapi.make_sound("object", obj, "petz_pop_sound", petz.settings.max_hear_distance) + end +end diff --git a/mods/petz/petz/api/api_brush.lua b/mods/petz/petz/api/api_brush.lua new file mode 100644 index 0000000..46518d5 --- /dev/null +++ b/mods/petz/petz/api/api_brush.lua @@ -0,0 +1,25 @@ +local S = ... + +petz.brush = function(self, wielded_item_name, pet_name) + if petz.settings.tamagochi_mode then + if wielded_item_name == "petz:hairbrush" then + if not self.brushed then + petz.set_affinity(self, petz.settings.tamagochi_brush_rate) + self.brushed = true + mobkit.remember(self, "brushed", self.brushed) + else + minetest.chat_send_player(self.owner, S("Your").." "..S(pet_name).." "..S("had already been brushed.")) + end + else --it's beaver_oil + if not self.beaver_oil_applied then + petz.set_affinity(self, petz.settings.tamagochi_beaver_oil_rate) + self.beaver_oil_applied = true + mobkit.remember(self, "beaver_oil_applied", self.beaver_oil_applied) + else + minetest.chat_send_player(self.owner, S("Your").." "..S(pet_name).." "..S("had already been spreaded with beaver oil.")) + end + end + end + mokapi.make_sound("object", self.object, "petz_brushing", petz.settings.max_hear_distance) + petz.do_particles_effect(self.object, self.object:get_pos(), "star") +end diff --git a/mods/petz/petz/api/api_capture.lua b/mods/petz/petz/api/api_capture.lua new file mode 100644 index 0000000..b24cc6f --- /dev/null +++ b/mods/petz/petz/api/api_capture.lua @@ -0,0 +1,138 @@ +local S = ... + +-- +-- Register Egg +-- + +petz.create_pet = function(placer, itemstack, pet_name, pos) + local meta = itemstack:get_meta() + local staticdata = meta:get_string("staticdata") + local mob = minetest.add_entity(pos, pet_name, staticdata) + local self = mob:get_luaentity() + if not(self.is_wild) and not(self.owner) then --not monster and not owner + mokapi.set_owner(self, placer:get_player_name()) --set owner + petz.after_tame(self) + end + itemstack:take_item() -- since mob is unique we remove egg once spawned + return self +end + +function petz:register_egg(pet_name, desc, inv_img, tamed) + local description = S("@1", desc) + if tamed then + description = description .." ("..S("Tamed")..")" + end + minetest.register_craftitem(pet_name .. "_set", { -- register new spawn egg containing mob information + description = description, + inventory_image = inv_img, + groups = {spawn_egg = 2}, + stack_max = 1, + on_place = function(itemstack, placer, pointed_thing) + local spawn_pos = pointed_thing.above + -- am I clicking on something with existing on_rightclick function? + local under = minetest.get_node(pointed_thing.under) + local def = minetest.registered_nodes[under.name] + if def and def.on_rightclick then + return def.on_rightclick(pointed_thing.under, under, placer, itemstack) + end + if spawn_pos and not minetest.is_protected(spawn_pos, placer:get_player_name()) then + if not minetest.registered_entities[pet_name] then + return + end + spawn_pos = petz.pos_to_spawn(pet_name, spawn_pos) + petz.create_pet(placer, itemstack, pet_name, spawn_pos) + end + return itemstack + end, + }) +end + +petz.check_capture_items = function(self, wielded_item_name, clicker, check_inv_room) + if self.driver then + return + end + local capture_item_type + if wielded_item_name == petz.settings.lasso then + capture_item_type = "lasso" + elseif (wielded_item_name == "mobs:net") or (wielded_item_name == "fireflies:bug_net") then + capture_item_type = "net" + else + return false + end + if capture_item_type == self.capture_item then + if check_inv_room then + --check for room in inventory + local inv = clicker:get_inventory() + if inv:room_for_item("main", ItemStack("air")) then + return true + else + minetest.chat_send_player(clicker:get_player_name(), S("No room in your inventory to capture it.")) + return false + end + else + return true + end + else + return false + end +end + +petz.capture = function(self, clicker, put_in_inventory) + + self.captured = mobkit.remember(self, "captured", true) --IMPORTANT! mark as captured + + local new_stack = ItemStack(self.name .. "_set") -- add special mob egg with all mob information + + --Save the staticdata into the ItemStack--> + local stack_meta = new_stack:get_meta() + local ent = self.object:get_luaentity() + local staticdata = ent:get_staticdata(self) + stack_meta:set_string("staticdata", staticdata) + + --Info text stuff for the ItemStack + local info_text = "" + if not(petz.str_is_empty(self.tag)) then + info_text = info_text.."\n"..S("Name")..": "..self.tag + end + if self.breed then + local genre + if self.is_male then + genre = "Male" + else + genre = "Female" + end + info_text = info_text.."\n"..S("Gender")..": "..S(genre) + end + if self.skin_colors then + info_text = info_text.."\n"..S("Color")..": "..S(petz.first_to_upper(self.skin_colors[self.texture_no])) + end + if self.is_mountable then + info_text = info_text.."\n"..S("Speed Stats")..": " ..self.max_speed_forward.."/"..self.max_speed_reverse.."/"..self.accel + end + if self.is_pregnant then + info_text = info_text.."\n"..S("It is pregnant") + end + local description + if self.description then + description = self.description + else + description = self.type + end + stack_meta:set_string("description", S(petz.first_to_upper(description)).." ("..S("Tamed")..")"..info_text) + if put_in_inventory then + local inv = clicker:get_inventory() + if inv:room_for_item("main", new_stack) then + inv:add_item("main", new_stack) + else + minetest.add_item(clicker:get_pos(), new_stack) + end + end + if self.type == "bee" and self.behive then + petz.decrease_total_bee_count(self.behive) + local meta, honey_count, bee_count = petz.get_behive_stats(self.behive) + petz.set_infotext_behive(meta, honey_count, bee_count) + end + petz.remove_tamed_by_owner(self, false) + mokapi.remove_mob(self) + return stack_meta +end diff --git a/mods/petz/petz/api/api_collisionbox.lua b/mods/petz/petz/api/api_collisionbox.lua new file mode 100644 index 0000000..d47a6dc --- /dev/null +++ b/mods/petz/petz/api/api_collisionbox.lua @@ -0,0 +1,12 @@ +petz.get_collisionbox = function(p1, p2, scale_model, scale_baby) + p1 = vector.multiply(p1, scale_model) + p2 = vector.multiply(p2, scale_model) + local collisionbox = {p1.x, p1.y, p1.z, p2.x, p2.y, p2.z} + local collisionbox_baby + if scale_baby then + local p1b = vector.multiply(p1, scale_baby) + local p2b = vector.multiply(p2, scale_baby) + collisionbox_baby = {p1b.x, p1b.y, p1b.z, p2b.x, p2b.y, p2b.z} + end + return collisionbox, collisionbox_baby +end diff --git a/mods/petz/petz/api/api_colorize.lua b/mods/petz/petz/api/api_colorize.lua new file mode 100644 index 0000000..cff626c --- /dev/null +++ b/mods/petz/petz/api/api_colorize.lua @@ -0,0 +1,21 @@ +petz.get_color_group = function(item_name) + local color_name + local name + for _, row in ipairs(dye.dyes) do + name = row[1] + color_name = "color_" .. name + if minetest.get_item_group(item_name, color_name) > 0 then + break + end + end + name = name:gsub("%_", "") + return name +end + +petz.colorize = function(self, color) + local background_texture = "petz_"..self.type.."_background.png" + local overlay_texture = "(petz_"..self.type.."_overlay.png^[colorize:"..color..":125)" + local colorized_texture = background_texture .."^"..overlay_texture + petz.set_properties(self, {textures = {colorized_texture}}) + self.colorized = mobkit.remember(self, "colorized", color) +end diff --git a/mods/petz/petz/api/api_colors.lua b/mods/petz/petz/api/api_colors.lua new file mode 100644 index 0000000..0c3564d --- /dev/null +++ b/mods/petz/petz/api/api_colors.lua @@ -0,0 +1,3 @@ +petz.colors = {} +petz.colors["green"] = "#3ADF00" +petz.colors["red"] = "#DF013A" diff --git a/mods/petz/petz/api/api_convert.lua b/mods/petz/petz/api/api_convert.lua new file mode 100644 index 0000000..6e111ac --- /dev/null +++ b/mods/petz/petz/api/api_convert.lua @@ -0,0 +1,24 @@ +local S = ... + +petz.convert = function(self, player_name) + local old_pet_name = petz.first_to_upper(self.type) + self.convert_count = self.convert_count - 1 + mobkit.remember(self, "convert_count", self.convert_count) + if self.convert_count <= 0 then + local pos = self.object:get_pos() + local converted_pet = minetest.add_entity(pos, petz.settings[self.type.."_convert_to"]) + mokapi.make_sound("object", converted_pet, "petz_pop_sound", petz.settings.max_hear_distance) + local converted_entity = converted_pet:get_luaentity() + converted_entity.tamed = true + mobkit.remember(converted_entity, "tamed", converted_entity.tamed) + converted_entity.owner = player_name + mobkit.remember(converted_entity, "owner", converted_entity.owner) + mokapi.remove_mob(self) + local new_pet_name = petz.first_to_upper(converted_entity.type) + minetest.chat_send_player(player_name , S("The").." "..S(old_pet_name).." "..S("turn into").." "..S(new_pet_name)) + else + minetest.chat_send_player(player_name , S("The").." "..S(old_pet_name).." "..S("is turning into another animal")..".") + mokapi.make_sound("object", self.object, "petz_"..self.type.."_moaning", petz.settings.max_hear_distance) + petz.do_particles_effect(self.object, self.object:get_pos(), "heart") + end +end diff --git a/mods/petz/petz/api/api_dam_beaver.lua b/mods/petz/petz/api/api_dam_beaver.lua new file mode 100644 index 0000000..1a075d2 --- /dev/null +++ b/mods/petz/petz/api/api_dam_beaver.lua @@ -0,0 +1,29 @@ +local modpath = ... + +-- +--Create Dam Beaver Mechanics +-- + +petz.create_dam = function(self, pos) + if petz.settings.beaver_create_dam and not(self.dam_created) then --a beaver can create only one dam + if math.random(1, 60000) > 1 then --chance of the dam to be created + return false + end + local pos_underwater = { --check if water below (when the beaver is still terrestrial but float in the surface of the water) + x = pos.x, + y = pos.y - 4.5, + z = pos.z, + } + if minetest.get_node(pos_underwater).name == "default:sand" then + local pos_dam = { --check if water below (when the beaver is still terrestrial but float in the surface of the water) + x = pos.x, + y = pos.y - 2.0, + z = pos.z, + } + minetest.place_schematic(pos_dam, modpath..'/schematics/beaver_dam.mts', 0, nil, true) + self.dam_created = true + return true + end + end + return false +end diff --git a/mods/petz/petz/api/api_datetime.lua b/mods/petz/petz/api/api_datetime.lua new file mode 100644 index 0000000..c69e969 --- /dev/null +++ b/mods/petz/petz/api/api_datetime.lua @@ -0,0 +1,4 @@ +petz.get_os_month = function() + local nowTable= os.date('*t') + return nowTable.month +end diff --git a/mods/petz/petz/api/api_dreamcatcher.lua b/mods/petz/petz/api/api_dreamcatcher.lua new file mode 100644 index 0000000..da80de9 --- /dev/null +++ b/mods/petz/petz/api/api_dreamcatcher.lua @@ -0,0 +1,121 @@ +local S = ... + +-- +-- Dreamcatcher (protector for Petz) +-- + +-- Dreamcatcher + +minetest.register_craftitem("petz:dreamcatcher", { + description = S("Pet Dreamcatcher"), + inventory_image = "petz_dreamcatcher.png", + groups = {}, + on_use = function (itemstack, user, pointed_thing) + local user_name = user:get_player_name() + local user_pos = user:get_pos() + minetest.show_formspec(user_name, "petz:form_dreamcatcher", petz.create_form_list_by_owner_dreamcatcher(user_name, user_pos)) + end, +}) + +minetest.register_craft({ + type = "shaped", + output = "petz:dreamcatcher", + recipe = { + {"", "group:wood", ""}, + {"farming:string", "farming:string", "farming:string"}, + {"petz:ducky_feather", "petz:ducky_feather", "petz:ducky_feather"}, + } +}) + +petz.put_dreamcatcher = function(self, clicker, wielded_item, wielded_item_name) + if self.dreamcatcher then + minetest.chat_send_player(clicker:get_player_name(), S("This pet already has a Dreamcatcher.")) + return + end + wielded_item:take_item() --quit one from player's inventory + clicker:set_wielded_item(wielded_item) + self.dreamcatcher = true + mobkit.remember(self, "dreamcatcher", self.dreamcatcher) + mokapi.make_sound("object", self.object, "petz_magical_chime", petz.settings.max_hear_distance) + petz.do_particles_effect(self.object, self.object:get_pos(), "dreamcatcher") +end + +petz.drop_dreamcatcher = function(self) + if self.dreamcatcher then --drop the dreamcatcher + minetest.add_item(self.object:get_pos(), "petz:dreamcatcher") + mokapi.make_sound("object", self.object, "petz_pop_sound", petz.settings.max_hear_distance) + self.dreamcatcher = false + mobkit.remember(self, "dreamcatcher", self.dreamcatcher) + end +end + +petz.dreamcatcher_save_metadata = function(self) + if not(self.dreamcatcher) or self.tag == "" or not(self.owner) then + return + end + local item_list_table = petz.tamed_by_owner[self.owner] + if not(item_list_table) then + return + end + for i = 1, #item_list_table do + if item_list_table[i].pet == self then + item_list_table[i]["metadata"].tag = self.tag + item_list_table[i]["metadata"].type = self.type + item_list_table[i]["metadata"].dreamcatcher = self.dreamcatcher + item_list_table[i]["metadata"].last_pos = self.object:get_pos() + break + end + end +end + +petz.create_form_list_by_owner_dreamcatcher = function(user_name, user_pos) + --Get the values of the list + local item_list_table = petz.tamed_by_owner[user_name] + if item_list_table then + if #item_list_table <= 0 then + minetest.chat_send_player(user_name, "You have no pets with a name and a dreamcatcher to list.") + return '' + end + local item_list = "" + --local text_color + for key, pet_table in ipairs(item_list_table) do + local pet = pet_table.pet + local pet_type + local pet_pos + local pet_tag + local list_pet = false + if mobkit.is_alive(pet) and pet.dreamcatcher then -- check if alive and has a dreamcatcher + pet_tag = pet.tag + pet_type = pet.type + pet_pos = pet.object:get_pos() + --text_color = petz.colors["green"] + list_pet = true + elseif pet_table.metadata.dreamcatcher then + pet_tag = pet_table.metadata.tag + pet_type = pet_table.metadata.type + pet_pos = pet_table.metadata.last_pos + --text_color = petz.colors["red"] + list_pet = true + end + if list_pet and pet_pos then + pet_type = pet_type:gsub("^%l", string.upper) + local distance, pet_pos_x, pet_pos_y, pet_pos_z + distance = tostring(petz.round(vector.distance(user_pos, pet_pos))) + pet_pos_x = tostring(math.floor(pet_pos.x+0.5)) + pet_pos_y = tostring(math.floor(pet_pos.y+0.5)) + pet_pos_z = tostring(math.floor(pet_pos.z+0.5)) + item_list = item_list .. pet_tag.." | " .. S(pet_type) .. " | ".. "Pos = (".. pet_pos_x .. "/" + .. pet_pos_y .. "/".. pet_pos_z ..") | Dist= "..distance.."," + end + end + local form_list_by_owner = + "size[6,8;]".. + --"style_type[textlist;textcolor="..text_color.."]".. + "image[2,0;1,1;petz_dreamcatcher.png]".. + "textlist[0,1;5,6;petz_list;"..item_list..";selected idx]".. + "button_exit[2,7;1,1;btn_exit;"..S("Close").."]" + return form_list_by_owner + else + return '' + end +end diff --git a/mods/petz/petz/api/api_eggs.lua b/mods/petz/petz/api/api_eggs.lua new file mode 100644 index 0000000..f763229 --- /dev/null +++ b/mods/petz/petz/api/api_eggs.lua @@ -0,0 +1,50 @@ +petz.increase_egg_count = function(self) + self.eggs_count = mobkit.remember(self, "eggs_count", self.eggs_count+1) +end + +--Lay Egg +petz.lay_egg = function(self) + if self.eggs_count >= petz.settings.max_laid_eggs then + return + end + if petz.isinliquid(self) then --do not put eggs when in liquid + return + end + local pos = self.object:get_pos() + if self.type_of_egg == "item" then + local lay_egg_timing = petz.settings.lay_egg_timing + if mobkit.timer(self, math.random(lay_egg_timing - (lay_egg_timing*0.2), lay_egg_timing+ (lay_egg_timing*0.2))) then + minetest.add_item(pos, "petz:"..self.type.."_egg") --chicken/duck/penguin egg! + petz.increase_egg_count(self) + end + end + if self.lay_eggs_in_nest then + local lay_range = 1 + local nearby_nodes = minetest.find_nodes_in_area( + {x = pos.x - lay_range, y = pos.y - 1, z = pos.z - lay_range}, + {x = pos.x + lay_range, y = pos.y + 1, z = pos.z + lay_range}, + "petz:ducky_nest") + if #nearby_nodes > 1 then + local nest_type + if self.type == "hen" then + nest_type = "chicken" + else + nest_type = "ducky" + end + local nest_to_lay = nearby_nodes[math.random(1, #nearby_nodes)] + minetest.set_node(nest_to_lay, {name= "petz:"..nest_type.."_nest_egg"}) + petz.increase_egg_count(self) + end + end +end + +--Extract Egg from a Nest +petz.extract_egg_from_nest = function(pos, player, egg_type) + local inv = player:get_inventory() + if inv:room_for_item("main", egg_type) then + inv:add_item("main", egg_type) --add the egg to the player's inventory + minetest.set_node(pos, {name= "petz:ducky_nest"}) --Replace the node to a empty nest + else + minetest.chat_send_player(player:get_player_name(), "No room in your inventory for the egg.") + end +end diff --git a/mods/petz/petz/api/api_env_damage.lua b/mods/petz/petz/api/api_env_damage.lua new file mode 100644 index 0000000..1096c18 --- /dev/null +++ b/mods/petz/petz/api/api_env_damage.lua @@ -0,0 +1,37 @@ +-- +-- Enviromental Damage +-- + +function petz.env_damage(self, pos, prty) + local stand_pos= mobkit.get_stand_pos(self) + local stand_node_pos = mobkit.get_node_pos(stand_pos) + local stand_node = mobkit.nodeatpos(stand_node_pos) + if stand_node and stand_node.groups.igniter then --if lava or fire + mobkit.hurt(self, petz.settings.igniter_damage) + local air_pos = minetest.find_node_near(stand_pos, self.view_range, "air", false) + if air_pos then + mobkit.hq_goto(self, prty, air_pos) + end + end + if self.noxious_nodes then + for i = 1, #self.noxious_nodes do + local noxious_node = self.noxious_nodes[i] + local node_pos + if noxious_node.where then + if noxious_node.where == "stand" then + node_pos = stand_pos + elseif noxious_node.where == "entity" then + node_pos = pos + else + node_pos = pos + end + else + node_pos = pos + end + local node = minetest.get_node_or_nil(node_pos) + if node and node.name == noxious_node.name then + mobkit.hurt(self, noxious_node.damage or 1) + end + end + end +end diff --git a/mods/petz/petz/api/api_feed_tame.lua b/mods/petz/petz/api/api_feed_tame.lua new file mode 100644 index 0000000..203736b --- /dev/null +++ b/mods/petz/petz/api/api_feed_tame.lua @@ -0,0 +1,103 @@ +local S= ... + +petz.insert_tamed_by_owner = function(self) + if not self.owner then + return + end + if (petz.tamed_by_owner[self.owner] == nil) then + petz.tamed_by_owner[self.owner] = {} + end + local insert = true + for i = 1, #petz.tamed_by_owner[self.owner] do + if petz.tamed_by_owner[self.owner][i].pet == self then + insert = false + break + end + end + if insert then --if not yet + table.insert(petz.tamed_by_owner[self.owner], {["pet"] = self, metadata = {["tag"] = self.tag, ["type"] = self.type, ["last_pos"] = nil}}) + end +end + +petz.remove_tamed_by_owner = function(self, force) + if self.tag ~= "" or force then + if petz.tamed_by_owner[self.owner] then + local temp_table = {} + for key, pet_table in ipairs(petz.tamed_by_owner[self.owner]) do + if pet_table.pet ~= self then + table.insert(temp_table, pet_table) + --minetest.chat_send_player("singleplayer", self.tag) + end + end + petz.tamed_by_owner[self.owner] = temp_table + end + end +end + +petz.count_tamed_by_owner = function(owner_name) + local count + if petz.tamed_by_owner[owner_name] then + count = #petz.tamed_by_owner[owner_name] + else + count = 0 + end + return count +end + +petz.do_feed = function(self) + petz.set_affinity(self, petz.settings.tamagochi_feed_hunger_rate) + self.fed = mobkit.remember(self, "fed", true) +end + +petz.after_tame = function(self) + petz.insert_tamed_by_owner(self) + if petz.settings.tamagochi_mode then + self.init_tamagochi_timer = true + end +end + +-- +--Tame with a whip mechanic +-- + +-- Whip/lashing behaviour + +petz.do_lashing = function(self) + if not self.lashed then + self.lashed = mobkit.remember(self, "lashed", true) + end + mokapi.make_sound("object", self.object, "petz_"..self.type.."_moaning", petz.settings.max_hear_distance) +end + +petz.tame_whip= function(self, hitter) + local wielded_item_name= hitter:get_wielded_item():get_name() + if (wielded_item_name == "petz:whip") then + if not self.tamed then + --The mob can be tamed lashed with a whip + self.lashing_count = self.lashing_count + 1 + if self.lashing_count >= petz.settings.lashing_tame_count then + self.lashing_count = mobkit.remember(self, "lashing_count", 0) --reset to 0 + mokapi.set_owner(self, hitter:get_player_name()) + petz.after_tame(self) + minetest.chat_send_player(self.owner, S("The").." "..S(petz.first_to_upper(self.type)).." "..S("has been tamed.")) + mobkit.clear_queue_high(self) -- do not attack + end + else + if (petz.settings.tamagochi_mode) and (self.owner == hitter:get_player_name()) then + petz.do_lashing(self) + end + end + mokapi.make_sound("object", hitter, "petz_whip", petz.settings.max_hear_distance) + end +end + +--Ants +petz_feed_queen_ant= function(self, clicker, player_name, wielded_item) + local creative_mode = minetest.settings:get_bool("creative_mode") + if not creative_mode then -- if not in creative, take item + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) + end + self.eggs_count = mobkit.remember(self, "eggs_count", 0) + minetest.chat_send_player(player_name, S("The Queen Ant will produce more eggs.")) +end diff --git a/mods/petz/petz/api/api_forms.lua b/mods/petz/petz/api/api_forms.lua new file mode 100644 index 0000000..7620f0b --- /dev/null +++ b/mods/petz/petz/api/api_forms.lua @@ -0,0 +1,564 @@ +local S = ... + +local _context = {} + +minetest.register_on_leaveplayer(function(player) + _context[player:get_player_name()] = nil +end) + +local function create_context(player_name, tab_id) + _context[player_name] = {} + _context[player_name].tab_id = tab_id +end + +petz.create_form = function(player_name, buy) + local pet = petz.pet[player_name] + local form_size = {w = 4, h = 3} + local buttonexit_pos = {x = 1, y = 6} + local hungrystuff_pos + local form_title + local tamagochi_form_stuff + local affinity_stuff = '' + local form_orders = '' + local more_form_orders = '' + local tab_form = '' + if not _context[player_name] then + create_context(player_name, 1) + end + local tab_id = _context[player_name].tab_id + local pet_icon = "petz_spawnegg_"..pet.type..".png" + if tab_id == 1 and not(buy) then + local pet_image_icon = "image[0.375,0.375;1,1;"..pet_icon.."]" + if pet.affinity == nil then + pet.affinity = 0 + end + if petz.settings.tamagochi_mode then + form_size.w= form_size.w + 1 + if pet.has_affinity then + form_title = S("Orders") + hungrystuff_pos = {x= 3, y = 2} + affinity_stuff = + "image_button[3.5,3.5;1,1;petz_affinity_heart.png;btn_affinity;]".. + "label[4.5,4;".. tostring(pet.affinity).."%]" + else + form_size.w= form_size.w + form_size.h= form_size.h + 1 + form_title = S("Status") + hungrystuff_pos = {x= 1, y = 3} + end + tamagochi_form_stuff = + pet_image_icon .. + "label[1.375,3;".. form_title .."]".. + "image_button[".. (hungrystuff_pos.x+0.5) ..",".. (hungrystuff_pos.y +0.5)..";1,1;petz_pet_bowl_inv.png;btn_bowl;]".. + affinity_stuff + local health_label = S("Health").." = "..tostring(pet.hp) + local hungry_label + if not pet.fed then + hungry_label = S("Hungry") + else + hungry_label = S("Satiated") + end + hungry_label = hungry_label.."\n"..health_label + tamagochi_form_stuff = tamagochi_form_stuff .. "label[".. hungrystuff_pos.x +1.5 ..",".. (hungrystuff_pos.y+0.75) ..";"..hungry_label.."]" + else + if pet.has_saddlebag and pet.saddlebag then + form_size.w= form_size.w + 1 + end + tamagochi_form_stuff = pet_image_icon + if pet.has_affinity then + tamagochi_form_stuff = tamagochi_form_stuff .. "label[1,2;".. S("Orders") .."]" + end + end + if pet.is_pet and pet.tamed then + if not(pet.tag) then + pet.tag = "" + end + if pet.dreamcatcher then + tamagochi_form_stuff = tamagochi_form_stuff.. + "image_button_exit[4,0.375;1,1;petz_dreamcatcher.png;btn_dreamcatcher;]" + end + tamagochi_form_stuff = tamagochi_form_stuff.. + "field[0.375,2;3,0.5;ipt_name;"..S("Name")..":"..";"..pet.tag.."]".. + "checkbox[3.5,1.75;btn_muted;"..S("Muted")..";"..petz.vartostring(pet.muted).."]".. + "checkbox[3.5,2.25;btn_show_tag;"..S("Show tag")..";"..petz.vartostring(pet.show_tag).."]" + end + local gender + if pet.is_male then + gender = S("Male") + else + gender = S("Female") + end + tamagochi_form_stuff = tamagochi_form_stuff.. + "label[3,0.875;"..gender.."]" + if pet.breed then --Show the Gender + local pregnant_icon_x + local pregnant_icon_y + local pregnant_text_x + local pregnant_text_y + local infertile_text_x + local infertile_text_y + if pet.is_mountable or pet.give_orders then + pregnant_icon_x = 3 + pregnant_icon_y = 5 + pregnant_text_x = 4 + pregnant_text_y = 5 + infertile_text_x = 3 + infertile_text_y = 5 + else + pregnant_icon_x = 3 + pregnant_icon_y = 2 + pregnant_text_x = 4 + pregnant_text_y = 2 + infertile_text_x = 3 + infertile_text_y = 3 + end + if not(pet.is_male) and pet.is_pregnant then + local pregnant_remain_time = petz.round(petz.settings.pregnancy_time - pet.pregnant_time) + tamagochi_form_stuff = tamagochi_form_stuff.. + "image["..(pregnant_icon_x+0.375)..","..(pregnant_icon_y+0.5)..";1,1;petz_"..pet.type.."_pregnant_icon.png]".. + "label["..(pregnant_text_x+0.375)..","..(pregnant_text_y+1)..";"..S("Pregnant").." ("..tostring(pregnant_remain_time).."s)]" + elseif not(pet.is_male) and pet.pregnant_count and pet.pregnant_count <= 0 then + tamagochi_form_stuff = tamagochi_form_stuff.. + "label["..(infertile_text_x+0.5)..","..(infertile_text_y+1)..";"..S("Infertile").."]" + end + if pet.is_baby then + local growth_remain_time = petz.round(petz.settings.growth_time - pet.growth_time) + tamagochi_form_stuff = tamagochi_form_stuff.. + "label["..(pregnant_text_x-0.5)..","..(pregnant_text_y+1)..";"..S("To adult").." ("..tostring(growth_remain_time).."s)]" + end + end + if pet.type == "pony" then + local horseshoes = pet.horseshoes or 0 + more_form_orders = more_form_orders.. + "image_button_exit[5,0.375;1,1;petz_horseshoe.png;btn_horseshoes;"..tostring(horseshoes).."]" + end + if pet.can_perch then + form_size.h = form_size.h + 1 + buttonexit_pos.y = buttonexit_pos.y + 1 + more_form_orders = more_form_orders.. + "button_exit[0.375,6.5;1,1;btn_alight;"..S("Alight").."]" .. + "button_exit[1.375,6.5;1,1;btn_fly;"..S("Fly").."]".. + "button_exit[2.375,6.5;2,1;btn_perch_shoulder;"..S("Perch on shoulder").."]" + elseif pet.is_mountable then + more_form_orders = more_form_orders.. + "image[3.5,4.5;1,1;petz_"..pet.type.."_velocity_icon.png]".. + "label[4.5,5;".. tostring(pet.max_speed_forward).."/"..tostring(pet.max_speed_reverse)..'/'..tostring(pet.accel).."]" + if pet.has_saddlebag and pet.saddlebag then + more_form_orders = more_form_orders.. + "image_button[5,0.375;1,1;petz_saddlebag.png;btn_saddlebag;]" + end + end + if pet.give_orders then + form_size.h= form_size.h + 4 + form_size.w= form_size.w + 1 + form_orders = + "button_exit[0.375,3.5;3,1;btn_followme;"..S("Follow me").."]".. + "button_exit[0.375,4.5;3,1;btn_standhere;"..S("Stand here").."]".. + "button_exit[0.375,5.5;3,1;btn_ownthing;"..S("Do your own thing").."]".. + more_form_orders + else + if petz.settings.tamagochi_mode then + buttonexit_pos.y = buttonexit_pos.y - 2 + form_size.h= form_size.h + 1 + else + buttonexit_pos.y = buttonexit_pos.y - 4 + form_size.w= form_size.w + 1 + end + end + if pet.is_wild then + form_orders = form_orders .. "button_exit[3.375,5.5;2,1;btn_guard;"..S("Guard").."]" + end + tab_form = tamagochi_form_stuff.. form_orders + elseif tab_id == 1 and buy then + form_size.w = form_size.w + 1 + form_size.h = form_size.h + 2 + buttonexit_pos.x = buttonexit_pos.x + 1 + buttonexit_pos.y = buttonexit_pos.y - 2 + local item_description + local item_inventory_image + if petz.settings.selling_exchange_items_list[pet.exchange_item_index] then + item_description = petz.settings.selling_exchange_items_list[pet.exchange_item_index].description or "" + item_inventory_image = petz.settings.selling_exchange_items_list[pet.exchange_item_index].inventory_image or "" + else + item_description = "" + item_inventory_image = "" + end + local item_amount = pet.exchange_item_amount or 1 + tab_form = tab_form .. + "label[0.375,1.85;"..S("Cost")..": ]".. + "label[2,1.85;"..item_description.."]".. + "image[2.5,0.375;1,1;"..item_inventory_image.."]".. + "label[0.375,2.5;"..S("Amount")..":]".. + "label[2,2.5;"..tostring(item_amount).."]".. + "style_type[button_exit;bgcolor=#333600;textcolor=white]".. + "button_exit[2,3.25;2,1;btn_buy;"..S("Buy").."]" + elseif tab_id == 2 and not(buy) then + form_size.w = form_size.w + 1 + form_size.h = form_size.h + 2 + buttonexit_pos.y = buttonexit_pos.y - 2 + if pet.owner then + tab_form = "image_button[0.375,0.375;1,1;"..pet_icon.."^petz_abandon_icon.png;btn_abandon;]" + if pet.herd then + tab_form = tab_form .. "checkbox[0.375,1.75;btn_herding;"..S("Herding")..";"..petz.vartostring(pet.herding).."]" + end + if petz.check_lifetime(pet) then + tab_form = tab_form .. "image[2,0.375;1,1;petz_lifetime.png]" .. "label[3,0.75;"..S("Lifetime").."]".."label[3,1;"..tostring(pet.lifetime).."]" + end + end + elseif (tab_id == 3 and not(buy) and pet.dreamcatcher) then + form_size.w = form_size.w + 2 + form_size.h = form_size.h + 1 + buttonexit_pos.y = buttonexit_pos.y - 3 + tab_form = tab_form .. + "checkbox[0.25,1.5;btn_back_home;"..S("Automatic Go back home")..";"..petz.vartostring(pet.back_home).."]".. + "label[1.3,0.75;<< "..S("Click to set the home").."]".. + "image_button_exit[0.25,0.25;1,1;petz_kennel.png;btn_set_home;"..S("Set").."\n"..S("Home").."]" + if pet.home_pos then + tab_form = tab_form .. + "label[0.25,2.0;"..S("Home Pos")..": x="..tostring(petz.truncate(pet.home_pos.x,1)) + ..", y="..petz.truncate(pet.home_pos.y,1)..", z="..petz.truncate(pet.home_pos.z,1).."]" + end + elseif (tab_id ==3 or tab_id ==4) and petz.settings.selling and not(buy) then + form_size.w = form_size.w + 1 + form_size.h = form_size.h + 2 + buttonexit_pos.y = buttonexit_pos.y - 2 + local exchange_items = '' + local dropdown_index = 1 + for i = 1, #petz.settings.selling_exchange_items_list do + local description = petz.settings.selling_exchange_items_list[i].description + if description then + if i > 1 then + exchange_items = exchange_items .. "," + end + exchange_items = exchange_items .. description + if i == pet.exchange_item_index then + dropdown_index = i + end + end + end + tab_form = tab_form .. + "checkbox[0.375,0.5;chk_for_sale;"..S("For Sale")..";"..petz.vartostring(pet.for_sale).."]".. + "label[0.375,1.0;"..S("Item").."]".. + "textlist[0.375,1.25;3,3;txtlst_exchange_items;"..exchange_items..";"..tostring(dropdown_index).."]".. + "label[4,1;"..S("Amount").."]".. + "field[4,1.25;1,0.45;fld_exchange_item_amount;;"..tostring(pet.exchange_item_amount).."]" + --"scrollbaroptions[min=1;max=99;arrows=show;smallstep=1;largestep=1]".. + --"scrollbar[4,1.0;0.45,0.45;vertical;scrbar_exchange_item_amount;10]" + end + --Tab Header + local tab_main = S("Main") + local tab_other = S("Other") + local tab_shop = S("Shop") + local tab_home = S("Home") + local tab_header + if buy then + tab_header = tab_shop + else + tab_header = tab_main..","..tab_other + if pet.dreamcatcher then + tab_header = tab_header..","..tab_home + end + if not(minetest.is_singleplayer()) then + tab_header = tab_header..","..tab_shop + end + end + --minetest.chat_send_player("singleplayer", tab_header) + local final_form = + "size["..(form_size.w+0.875)..","..(form_size.h+1)..";]".. + "real_coordinates[true]".. + "tabheader[0,0;tabheader;"..tab_header..";"..tostring(tab_id)..";true;false]".. + tab_form.. + "style_type[button_exit;bgcolor=#006699;textcolor=white]".. + "button_exit["..(buttonexit_pos.x+0.5)..","..(buttonexit_pos.y+0.75)..";1,1;btn_close;"..S("Close").."]" + return final_form +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if (formname ~= "petz:form_orders") then + return false + end + local player_name = player:get_player_name() + -- Was a tab selected? + if fields.tabheader then + local tab_id = tonumber(fields.tabheader) + if tab_id > 0 then + create_context(player_name, tab_id) + minetest.show_formspec(player_name, "petz:form_orders", petz.create_form(player_name, false)) + end + return + end + local pet = petz.pet[player_name] + if pet and pet.object then + if fields.btn_followme then + petz.follow(pet, player) + elseif fields.btn_standhere then + petz.standhere(pet) + elseif fields.btn_guard then + petz.guard(pet) + elseif fields.btn_ownthing then + mobkit.clear_queue_low(pet) + petz.ownthing(pet) + elseif fields.btn_alight then + petz.alight(pet, 0, "stand") + elseif fields.btn_fly then + mobkit.clear_queue_low(pet) + mobkit.clear_queue_high(pet) + pet.status = nil + petz.hq_fly(pet, 0) + minetest.after(2.5, function() + if mobkit.is_alive(pet) then + mobkit.clear_queue_low(pet) + pet.object:set_acceleration({ x = 0, y = 0, z = 0 }) + pet.object:set_velocity({ x = 0, y = 0, z = 0 }) + end + end, pet) + elseif fields.btn_perch_shoulder then + petz.standhere(pet) + mobkit.animate(pet, "stand") + local shoulder_pos + if pet.type == "parrot" then + shoulder_pos = {x= 0.5, y= -6.25, z=0} + else + shoulder_pos = {x= 0.5, y= -6.0, z=0} + end + pet.object:set_attach(player, "Arm_Left", shoulder_pos, {x=0, y=0, z=180}) + pet.object:set_properties({physical = false,}) + minetest.after(120.0, function() + if mobkit.is_alive(pet) then + pet.object:set_detach() + pet.object:set_properties({physical = true,}) + end + end, pet) + elseif fields.btn_muted then + pet.muted= mobkit.remember(pet, "muted", minetest.is_yes(fields.btn_muted)) + elseif fields.btn_show_tag then + pet.show_tag = mobkit.remember(pet, "show_tag", minetest.is_yes(fields.btn_show_tag)) + elseif fields.btn_dreamcatcher then + petz.drop_dreamcatcher(pet) + elseif fields.btn_saddlebag then + --Load the inventory from the petz + local inv = minetest.get_inventory({ type="detached", name="saddlebag_inventory" }) + inv:set_list("saddlebag", {}) + if pet.saddlebag_inventory then + for key, value in pairs(pet.saddlebag_inventory) do + inv:set_stack("saddlebag", key, value) + end + end + --Show the inventory: + local formspec = "size[8,8;]".. + "image[3,0;1,1;petz_saddlebag.png]".. + "label[4,0;"..S("Saddlebag").."]".. + "list[detached:saddlebag_inventory;saddlebag;0,1;8,2;]".. + "list[current_player;main;0,4;8,4;]" + minetest.show_formspec(player_name, "petz:saddlebag_inventory", formspec) + elseif fields.btn_bowl then + minetest.show_formspec(player_name, "petz:food_form", petz.create_food_form(pet)) + elseif fields.btn_affinity then + minetest.show_formspec(player_name, "petz:affinity_form", petz.create_affinity_form(pet)) + elseif fields.btn_horseshoes then + petz.horseshoes_reset(pet) + elseif fields.btn_abandon then + minetest.show_formspec(player_name, "petz:abandon_form", petz.get_abandon_confirmation()) + elseif fields.btn_herding then + pet.herding = mobkit.remember(pet, "herding", minetest.is_yes(fields.btn_herding)) + elseif fields.chk_for_sale then + pet.for_sale = mobkit.remember(pet, "for_sale", minetest.is_yes(fields.chk_for_sale)) + elseif fields.fld_exchange_item_amount or fields.txtlst_exchange_items then + local event = minetest.explode_textlist_event(fields.txtlst_exchange_items) + if event.type == "CHG" then + --minetest.chat_send_all(event.index) + pet.exchange_item_index = mobkit.remember(pet, "exchange_item_index", event.index) + end + pet.exchange_item_amount = mobkit.remember(pet, "exchange_item_amount", mokapi.delimit_number( tonumber(fields.fld_exchange_item_amount), {min=1, max=99}) or 1) + elseif fields.btn_buy then + petz.buy(pet, player) + elseif fields.btn_back_home then + pet.back_home= mobkit.remember(pet, "back_home", minetest.is_yes(fields.btn_back_home)) + elseif fields.btn_set_home then + pet.home_pos= mobkit.remember(pet, "home_pos", pet.object:get_pos()) + create_context(player_name, 3) + minetest.show_formspec(player_name, "petz:form_orders", petz.create_form(player_name, false)) + end + if fields.ipt_name then + pet.tag = minetest.formspec_escape(string.sub(fields.ipt_name, 1 , 12)) + mobkit.remember(pet, "tag", pet.tag) + if not(pet.tag == "") then + petz.insert_tamed_by_owner(pet) + else + petz.remove_tamed_by_owner(pet, true) + end + end + petz.update_nametag(pet) + _context[player_name] = nil + return true + else + _context[player_name] = nil + return false + end +end) + +--On receive fields +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "petz:saddlebag_inventory" then + return false + end + --Save the saddlebag content + local player_name = player:get_player_name() + local ent = petz.pet[player_name] + if ent and ent.object then + local inv = minetest.get_inventory({ type="detached", name="saddlebag_inventory" }) + local itemstacks_table = {} + local inv_size = inv:get_size("saddlebag") + if inv_size > 0 then + for i = 1, inv_size do + itemstacks_table[i] = inv:get_stack("saddlebag", i):to_table() + end + ent.saddlebag_inventory = itemstacks_table + mobkit.remember(ent, "saddlebag_inventory", itemstacks_table) + end + end + return true +end) + +--Saddlebag detached inventory + +local function allow_put(pos, listname, index, stack, player) + return stack:get_count() +end + +petz.create_detached_saddlebag_inventory = function(name) + local saddlebag_inventory = minetest.create_detached_inventory(name, { + allow_move = function(inv, from_list, from_index, to_list, to_index, count, player) + local stack = inv:get_stack(from_list, from_index) + return allow_put(inv, from_list, from_index, stack, player) + end, + allow_put = function(inv, listname, index, stack, player) + return stack:get_count() + end, + allow_take = function(inv, listname, index, stack, player) + return stack:get_count() + end, + }) + -- Size and width of saddlebag inventory + saddlebag_inventory:set_size("saddlebag", 16) + saddlebag_inventory:set_width("saddlebag", 8) +end + +petz.create_detached_saddlebag_inventory("saddlebag_inventory") + +petz.create_food_form = function(self) + local items = string.split(petz.settings[self.type.."_follow"], ',') + local items_desc = "" + for i = 1, #items do --loop thru all items + local item = petz.str_remove_spaces(items[i]) --remove spaces + if string.sub(item, 1, 5) == "group" then + items_desc = items_desc .. string.sub(item, 7) + else + items_desc = items_desc .. (minetest.registered_items[item].description or "unknown") + end + if i < #items then + items_desc = items_desc .. ", " + end + end + local form_size = {w= 3, h= 3} + local button_exit = {x= 1, y= 2} + if self.breed then + form_size.h = form_size.h + 1 + button_exit.y = button_exit.y + 1 + end + local formspec = + "size["..form_size.w..","..form_size.h.."]".. + "image[0,0;1,1;petz_spawnegg_"..self.type..".png]".. + "label[1,0;"..S("Food").."]".. + "label[0,1;"..S("It likes")..": ".. items_desc .."]".. + "button_exit["..button_exit.x..","..button_exit.y..";1,1;btn_exit;"..S("Close").."]" + if self.breed then + local breed_item = minetest.registered_items[petz.settings[self.type.."_breed"]] + local breed_item_desc + if not(breed_item) then + if self.is_mountable then + breed_item_desc = minetest.registered_items["petz:glass_syringe"].description + else + breed_item_desc = "unknown" + end + else + breed_item_desc = breed_item.description + end + formspec = formspec .. "label[0,2;"..S("It breeds with")..": ".. breed_item_desc .."]" + end + return formspec +end + +petz.create_affinity_form = function(self) + local form_size = {w= 3, h= 4} + local button_exit = {x= 1, y= 3} + local feed_status, feed_status_color + if self.fed then + feed_status = S("Fed") + feed_status_color = petz.colors["green"] + else + feed_status = S("Hungry")..": " .. tostring(petz.calculate_affinity_change(-petz.settings.tamagochi_feed_hunger_rate)) + feed_status_color = petz.colors["red"] + end + local brushing_status, brushing_status_color + if self.brushed then + brushing_status = S("Brushed") + brushing_status_color = petz.colors["green"] + else + brushing_status = S("Not brushed")..": " .. tostring(petz.calculate_affinity_change(-petz.settings.tamagochi_brush_rate)) + brushing_status_color = petz.colors["red"] + end + local formspec = + "size["..form_size.w..","..form_size.h.."]".. + "image[0,0;1,1;petz_affinity_heart.png]".. + "label[1,0;"..S("Affinity").."]".. + "label[0,1;".. minetest.colorize(feed_status_color, feed_status).."]".. + "label[0,2;".. minetest.colorize(brushing_status_color, brushing_status).."]".. + "button_exit["..button_exit.x..","..button_exit.y..";1,2;btn_exit;"..S("Close").."]" + return formspec +end + +--On receive fields +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "petz:food_form" and formname ~= "petz:affinity_form" then + return false + end + local player_name = player:get_player_name() + local pet = petz.pet[player_name] + if pet and (mobkit.is_alive(pet)) then + create_context(player_name, 1) + minetest.show_formspec(player_name, "petz:form_orders", petz.create_form(player_name, false)) + end + return true +end) + +function petz.get_abandon_confirmation() + local text = S("Do you want to ABANDON your pet?!") + local formspec = { + "size[6,2.476]", + "real_coordinates[true]", + "label[0.375,0.5;", minetest.formspec_escape(text), "]", + "style_type[button_exit;bgcolor=#006699;textcolor=white]", + "button_exit[1.2,1.3;1,0.8;btn_yes;"..S("Yes").."]".. + "button_exit[3.2,1.3;1.5,0.8;btn_cancel;"..S("Cancel").."]" + } + return table.concat(formspec, "") +end + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "petz:abandon_form" then + return false + end + local player_name = player:get_player_name() + if fields.btn_yes then + local pet = petz.pet[player_name] + if pet and (mobkit.is_alive(pet)) then + local msg = S("You've abandoned your").." "..pet.type + petz.abandon_pet(pet, msg) + end + else + create_context(player_name, 2) + minetest.show_formspec(player_name, "petz:form_orders", petz.create_form(player_name, false)) + end + return true +end) diff --git a/mods/petz/petz/api/api_helper_functions.lua b/mods/petz/petz/api/api_helper_functions.lua new file mode 100644 index 0000000..4c760ed --- /dev/null +++ b/mods/petz/petz/api/api_helper_functions.lua @@ -0,0 +1,93 @@ +-- +--Helper Functions +-- + +petz.set_properties = function(self, properties) + if type(self) == 'table' then + self = self.object + end + self:set_properties(properties) +end + +function petz.is_night() + local timeofday = minetest.get_timeofday() + if timeofday == nil then --can be nil if world not loaded!!! + return nil + end + timeofday = timeofday * 24000 + if (timeofday < 4500) or (timeofday > 19500) then + return true + else + return false + end +end + +function petz.isinliquid(self) + local pos = self.object:get_pos() + pos.y = pos.y - 0.5 + local node = mobkit.nodeatpos(pos) + if node and node.drawtype == 'liquid' then + return true + else + return false + end +end + +function petz.round(x) + return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5) +end + +function petz.truncate(number, decimals) + local power = 10^decimals + return math.floor(number * power) / power +end + +function petz.vartostring(var) + if var or var == 1 or var == "true" then + return "true" + elseif not(var) or var == nil or var == 0 or var == "false" then + return "false" + else + return "false" + end +end + +function petz.set_list(list) + local set = {} + for _, l in ipairs(list) do set[l] = true end + return set +end + +petz.pos_front_player = function(player) + local pos = player:get_pos() + local yaw = player:get_look_horizontal() + local dir_x = -math.sin(yaw) + 0.5 + local dir_z = math.cos(yaw) + 0.5 + local pos_front_player = { -- what is in front of mob? + x = pos.x + dir_x, + y = pos.y + 0.5, + z = pos.z + dir_z + } + return pos_front_player +end + +petz.first_to_upper = function(str) + return (str:gsub("^%l", string.upper)) +end + +petz.str_is_empty = function(str) + return str == nil or str == '' +end + +petz.is_pos_nan = function(pos) + if minetest.is_nan(pos.x) or minetest.is_nan(pos.y) or minetest.is_nan(pos.z) then + return true + else + return false + end +end + +petz.str_remove_spaces = function(str) + str = str:gsub("%s+", "") + return str +end diff --git a/mods/petz/petz/api/api_horseshoes.lua b/mods/petz/petz/api/api_horseshoes.lua new file mode 100644 index 0000000..fd8473d --- /dev/null +++ b/mods/petz/petz/api/api_horseshoes.lua @@ -0,0 +1,56 @@ +local S = ... + +petz.put_horseshoe = function(self, clicker) + if self.horseshoes >= 4 then + minetest.chat_send_player(clicker:get_player_name(), S("This pony has already four horseshoes.")) + return + end + local wielded_item = clicker:get_wielded_item() + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) + petz.horseshoes_inc_speed(self) + mokapi.make_sound("object", self.object, "petz_put_sound", petz.settings.max_hear_distance) + mokapi.make_sound("object", self.object, "petz_"..self.type.."_moaning", petz.settings.max_hear_distance) +end + +petz.speedup_change = function(self, speedup) + self.max_speed_forward = self.max_speed_forward + speedup + self.max_speed_reverse = self.max_speed_reverse + speedup + self.accel= self.accel + speedup +end + +petz.horseshoes_speedup = function(self) + if self.horseshoes == 0 then + return + end + local speedup = self.horseshoes * petz.settings.horseshoe_speedup + petz.speedup_change(self, speedup) +end + +petz.horseshoes_inc_speed = function(self) + local speedup + if self.horseshoes > 0 then --first reset old speed up + speedup = self.horseshoes * petz.settings.horseshoe_speedup + petz.speedup_change(self, -speedup) + end + self.horseshoes = mobkit.remember(self, "horseshoes", (self.horseshoes+1)) --now inc the horseshoes + speedup = self.horseshoes * petz.settings.horseshoe_speedup --new speedup + petz.speedup_change(self, speedup) +end + +petz.horseshoes_reset = function(self) + if self.horseshoes == 0 then + return + end + local speedup = self.horseshoes * petz.settings.horseshoe_speedup + petz.speedup_change(self, -speedup) + local obj + local pos = self.object:get_pos() + for i = 1, self.horseshoes do + obj = minetest.add_item(pos, "petz:horseshoe") + mokapi.drop_velocity(obj) + end + self.horseshoes = mobkit.remember(self, "horseshoes", 0) + mokapi.make_sound("object", self.object, "petz_pop_sound", petz.settings.max_hear_distance) +end + diff --git a/mods/petz/petz/api/api_init_prop.lua b/mods/petz/petz/api/api_init_prop.lua new file mode 100644 index 0000000..ab68f7b --- /dev/null +++ b/mods/petz/petz/api/api_init_prop.lua @@ -0,0 +1,362 @@ +-- +--'set_initial_properties' is call by 'on_activate' for each pet +-- + +petz.dyn_prop = { + accel = {type= "int", default = 1}, + affinity = {type= "int", default = 100}, + anthill_founded = {type= "boolean", default = false}, + back_home = {type= "boolean", default = false}, + beaver_oil_applied = {type= "boolean", default = false}, + behive = {type= "pos", default = nil}, + brushed = {type= "boolean", default = false}, + captured = {type= "boolean", default = false}, + child = {type= "boolean", default = false}, + colorized = {type= "string", default = nil}, + convert = {type= "string", default = nil}, + convert_to = {type= "string", default = nil}, + convert_count = {type= "int", default = 5}, + dreamcatcher = {type= "boolean", default = false}, + dead = {type= "boolean", default = false}, + driver = {type= "player", default = nil}, + eggs_count = {type= "int", default = 0}, + exchange_item_index = {type= "int", default = 1}, + exchange_item_amount = {type= "int", default = 1}, + father_genes = {type= "table", default = {}}, + father_veloc_stats = {type= "table", default = {}}, + fed = {type= "boolean", default = true}, + food_count = {type= "int", default = 0}, + food_count_wool = {type= "int", default = 0}, + for_sale = {type= "boolean", default = false}, + gallop = {type= "boolean", default = false}, + gallop_time = {type= "int", default = 0}, + gallop_exhausted = {type= "boolean", default = false}, + gallop_recover_time = {type= "int", default = petz.settings.gallop_recover_time}, + genes = {type= "table", default = {}}, + growth_time = {type= "int", default = 0}, + herding = {type= "boolean", default = false}, + home_pos = {type= "table", default = nil}, + horseshoes = {type= "int", default = 0}, + is_baby = {type= "boolean", default = false}, + is_male = {type= "boolean", default = false}, + is_pregnant = {type= "boolean", default = false}, + is_rut = {type= "boolean", default = false}, + lashed = {type= "boolean", default = false}, + lashing_count = {type= "int", default = 0}, + lifetime = {type= "int", default = nil}, + max_speed_forward = {type= "int", default = 1}, + max_speed_reverse = {type= "int", default = 1}, + milked = {type= "boolean", default = false}, + muted = {type= "boolean", default = false}, + owner = {type= "string", default = nil}, + pregnant_count = {type= "int", default = petz.settings.pregnant_count}, + pregnant_time = {type= "int", default = 0}, + saddle = {type= "boolean", default = false}, + saddlebag = {type= "boolean", default = false}, + saddlebag_inventory = {type= "table", default = {}}, + shaved = {type= "boolean", default = false}, + show_tag = {type= "boolean", default = false}, + sleep_start_time = {type= "int", default = nil}, + sleep_end_time = {type= "int", default = nil}, + square_ball_attached = {type= "boolean", default = false}, + status = {type= "string", default = nil}, + tag = {type= "string", default = ""}, + tamed = {type= "boolean", default = false}, + --texture_no = {type= "int", default = 1}, --do not use!!! OR MISSING TEXTURE + warn_attack = {type= "boolean", default = false}, + was_killed_by_player = {type= "boolean", default = false}, +} + +petz.compose_texture= function(self) + local texture + if self.type == "lamb" then + local shaved_string = "" + if self.shaved then + shaved_string = "_shaved" + end + texture = "petz_lamb".. shaved_string .."_"..self.skin_colors[self.texture_no]..".png" + elseif self.is_mountable then + if self.saddle then + texture = "petz_"..self.type.."_"..self.skin_colors[self.texture_no]..".png" .. "^petz_"..self.type.."_saddle.png" + else + texture = "petz_"..self.type.."_"..self.skin_colors[self.texture_no]..".png" + end + if self.saddlebag then + texture = texture .. "^petz_"..self.type.."_saddlebag.png" + end + else + texture = self.textures[self.texture_no] + end + return texture +end + +petz.cleanup_prop= function(self) + self.warn_attack = false --reset the warn attack + self.driver = nil --no driver + self.was_killed_by_player = false --reset the warn attack +end + +petz.genetics_random_texture = function(self, textures_count) + local array = {} + for row=1, textures_count do + array[row] = {} + for col=1, textures_count do + array[row][col] = math.min(row, col) + end + end + return array[math.random(1, textures_count)][math.random(1, textures_count)] + -- Accessing the array to calculate the rates + --local rates = {} + --for row=1, textures_count do + --for col=1, textures_count do + --rates[array[row][col]] = (rates[array[row][col]] or 0) + 1 + --end + --end + + --for row=1, textures_count do + --minetest.chat_send_player("singleplayer", tostring(rates[row])) + --end +end + +petz.set_random_gender = function() + if math.random(1, 2) == 1 then + return true + else + return false + end +end + +petz.get_gen = function(self) + local textures_count + if self.mutation and (self.mutation > 0) then + textures_count = #self.skin_colors - self.mutation + else + textures_count = #self.skin_colors + end + return math.random(1, textures_count) +end + +petz.genetics_texture = function(self, textures_count) + for i = 1, textures_count do + if self.genes["gen1"] == i or self.genes["gen2"] == i then + return i + end + end +end + +petz.load_vars = function(self) + for key, value in pairs(petz.dyn_prop) do + self[key] = mobkit.recall(self, key) or value["default"] + end + if not(self.sleep_start_time) or not(self.sleep_end_time) then + petz.calculate_sleep_times(self) + end + petz.insert_tamed_by_owner(self) + petz.cleanup_prop(self) --Reset some vars +end + +function petz.set_initial_properties(self, staticdata, dtime_s) + --minetest.chat_send_all(staticdata) + local static_data_table = minetest.deserialize(staticdata) + local captured_mob = false + local baby_born = false + --TO DELETE IN FUTURE VERSIONS--> + local static_table_name + if static_data_table and static_data_table["memory"] then + static_table_name = "memory" + else + static_table_name = "fields" + end + --< + if static_data_table and static_data_table[static_table_name] and static_data_table[static_table_name]["captured"] then + captured_mob = true + elseif static_data_table and static_data_table["baby_born"] then + baby_born = true + end + -- + --1. NEW MOBS + -- + --dtime_s == 0 differenciates between loaded and new created mobs + if dtime_s == 0 and not captured_mob then --set some vars + --Load default settings -> + for key, value in pairs(petz.dyn_prop) do + self[key] = value["default"] + end + --Define some settings -> + --Set a random gender for all the mobs (not defined in the entity definition) + self.is_male = mobkit.remember(self, "is_male", petz.set_random_gender()) + if self.is_mountable then + if not(baby_born) then + self.max_speed_forward= mobkit.remember(self, "max_speed_forward", math.random(2, 4)) --set a random velocity for walk and run + self.max_speed_reverse= mobkit.remember(self, "max_speed_reverse", math.random(1, 2)) + self.accel= mobkit.remember(self, "accel", math.random(2, 4)) + end + end + if self.parents then --for chicken only + self.is_baby = mobkit.remember(self, "is_baby", true) + end + --Mobs that can have babies + if self.breed then + --Genetics + local genes_mutation = false + if self.mutation and (self.mutation > 0) and math.random(1, 200) == 1 then + genes_mutation = true + end + if not genes_mutation then + if not baby_born then + self.genes["gen1"] = petz.get_gen(self) + self.genes["gen2"] = petz.get_gen(self) + --minetest.chat_send_player("singleplayer", tostring(self.genes["gen1"])) + --minetest.chat_send_player("singleplayer", tostring(self.genes["gen2"])) + else + if math.random(1, 2) == 1 then + self.genes["gen1"] = static_data_table["gen1_father"] + else + self.genes["gen1"] = static_data_table["gen2_father"] + end + if math.random(1, 2) == 1 then + self.genes["gen2"] = static_data_table["gen1_mother"] + else + self.genes["gen2"] = static_data_table["gen2_mother"] + end + end + local textures_count + if self.mutation and (self.mutation > 0) then + textures_count = #self.skin_colors - self.mutation + else + textures_count = #self.skin_colors + end + self.texture_no = petz.genetics_texture(self, textures_count) + else -- mutation + local mutation_gen = math.random((#self.skin_colors-self.mutation+1), #self.skin_colors) --select the mutation in the last skins + self.genes["gen1"] = mutation_gen + self.genes["gen2"] = mutation_gen + self.texture_no = mutation_gen + end + mobkit.remember(self, "genes", self.genes) + end + --ALL the mobs + --Get a texture + if not self.texture_no then + if self.skin_colors then + local textures_count + if self.mutation and (self.mutation > 0) then + textures_count = #self.skin_colors - self.mutation + else + textures_count = #self.skin_colors + end + self.texture_no = petz.genetics_random_texture(self, textures_count) + else + self.texture_no = 1 + end + end + if petz.settings[self.type.."_convert_count"] then + self.convert_count = mobkit.remember(self, "convert_count", petz.settings[self.type.."_convert_count"]) + end + if self.init_tamagochi_timer then + petz.init_tamagochi_timer(self) + end + petz.calculate_sleep_times(self) --Sleep behaviour + -- + --2. ALREADY EXISTING MOBS + -- + elseif not captured_mob then + --Check if the petz was removed from the petz list in the settings + local remove_petz = true + for key, value in pairs(petz.settings["petz_list"]) do + if value == self.type then + remove_petz = false + break + end + end + if remove_petz then + self.object:remove() + return + end + petz.load_vars(self) --Load memory variables + -- + --3. CAPTURED MOBS + -- + else + self.captured = mobkit.remember(self, "captured", false) --IMPORTANT! mark as not captured + for key, value in pairs(petz.dyn_prop) do + local prop_value + if value["type"] == "string" then + prop_value = static_data_table[static_table_name][key] + elseif value["type"] == "int" then + prop_value = tonumber(static_data_table[static_table_name][key]) + elseif value["type"] == "boolean" then + prop_value = minetest.is_yes(static_data_table[static_table_name][key]) + elseif value["type"] == "table" then + prop_value = minetest.deserialize(static_data_table[static_table_name][key]) + elseif value["type"] == "player" then + prop_value = nil + end + self[key] = mobkit.remember(self, key, prop_value) or value["default"] + end + end + + --Custom textures + if captured_mob or self.breed then + local texture= petz.compose_texture(self) --compose the texture + mobkit.remember(self, "texture_no", self.texture_no) + petz.set_properties(self, {textures = {texture}}) + end + if self.type == "bee" and self.queen then --delay to create beehive + minetest.after(math.random(120, 150), function() + if mobkit.is_alive(self.object) then + self.create_beehive = mobkit.remember(self, "create_beehive", true) + end + end, self) + elseif self.type == "ant" and self.ant_type == "queen" then + minetest.after(math.random(120, 150), function() + if mobkit.is_alive(self.object) then + self.create_anthill = mobkit.remember(self, "create_anthill", true) + end + end, self) + end + if self.colorized then + if not self.shaved then + petz.colorize(self, self.colorized) + end + end + --DELETE THIS BLOCK IN THE NEXT UPDATE -- FOR COMPATIBIITY PURPOSES FOR OLD CHICKENS ONLY>>> + if self.type == "chicken" then + self.is_baby = mobkit.remember(self, "is_baby", true) + self.texture_no = mobkit.remember(self, "texture_no", 1) + petz.set_properties(self, {textures = {self.textures[1]}}) + end + --<<< + if self.horseshoes and not captured_mob then + petz.horseshoes_speedup(self) + end + if self.breed then + if baby_born then + self.is_baby = mobkit.remember(self, "is_baby", true) + end + if self.is_baby then + petz.set_properties(self, { + visual_size = self.visual_size_baby, + collisionbox = self.collisionbox_baby + }) + end + end + --self.head_rotation = {x= -90, y= 90, z= 0} + --self.whead_position = self.object:get_bone_position("parent") + --self.head_position.y = self.head_position.y + 0.25 + --ALL the mobs + if self.is_pet and self.tamed then + petz.update_nametag(self) + end + if self.status then + if self.status == "stand" then + petz.standhere(self) + elseif self.status == "guard" then + petz.guard(self) + elseif self.status == "sleep" then + self.status = nil --reset + else + self.status = nil + end + end +end diff --git a/mods/petz/petz/api/api_lifetime.lua b/mods/petz/petz/api/api_lifetime.lua new file mode 100644 index 0000000..c27fef1 --- /dev/null +++ b/mods/petz/petz/api/api_lifetime.lua @@ -0,0 +1,33 @@ +petz.check_lifetime = function(self) + local pet_lifetime = petz.settings[self.type.."_lifetime"] + --minetest.chat_send_all("test") + if self.dreamcatcher or (petz.settings.lifetime_only_non_tamed and self.tamed) or (petz.settings.lifetime_avoid_non_breedable and self.breed) then + return false + elseif petz.settings.lifetime > 0 and not(pet_lifetime and pet_lifetime < 0) then + --minetest.chat_send_all("test1") + return petz.settings.lifetime + elseif pet_lifetime and pet_lifetime > 0 then + --minetest.chat_send_all("test2") + return pet_lifetime + else + --minetest.chat_send_all("test3") + return false + end +end + +petz.lifetime_timer = function(self, lifetime, on_step_time) + if not(self.lifetime) then + --Firstly apply the variability + local variability = lifetime * (math.random(0, petz.settings.lifetime_variability*100) / 100) + if math.random(1, 2) == 1 then + variability = -variability + end + lifetime = mokapi.round(lifetime - variability) + self.lifetime = mobkit.remember(self, "lifetime", lifetime) + end + --minetest.chat_send_all(tostring(self.lifetime)) + self.lifetime = mobkit.remember(self, "lifetime", self.lifetime - on_step_time) + if self.lifetime <= 0 then + petz.on_die(self) + end +end diff --git a/mods/petz/petz/api/api_mount.lua b/mods/petz/petz/api/api_mount.lua new file mode 100644 index 0000000..897b991 --- /dev/null +++ b/mods/petz/petz/api/api_mount.lua @@ -0,0 +1,90 @@ +-- +-- Mount Engine +-- + +petz.mount = function(self, clicker, wielded_item, wielded_item_name) + if clicker:is_player() then + local player_pressed_keys = clicker:get_player_control() + if player_pressed_keys["sneak"] then + return true + end + end + if self.tamed and self.owner == clicker:get_player_name() then + if self.driver and clicker == self.driver then -- detatch player already riding horse + petz.detach(clicker, {x = 1, y = 0, z = 1}) + if self.wagon then + petz.animate_wagon(self, "stand") + end + mobkit.clear_queue_low(self) + mobkit.clear_queue_high(self) + mobkit.animate(self, "still") + return false + elseif (self.saddle or self.saddlebag or self.wagon) and wielded_item_name == petz.settings.shears then + if self.wagon then + self.wagon:remove() + mokapi.drop_item(self, "petz:wagon", 1) + self.wagon = nil + end + if self.saddle then + minetest.add_item(self.object:get_pos(), "petz:saddle") + mokapi.make_sound("object", self.object, "petz_pop_sound", petz.settings.max_hear_distance) + self.saddle = false + mobkit.remember(self, "saddle", self.saddle) + end + if self.saddlebag then + minetest.add_item(self.object:get_pos(), "petz:saddlebag") + mokapi.make_sound("object", self.object, "petz_pop_sound", petz.settings.max_hear_distance) + self.saddlebag = false + mobkit.remember(self, "saddlebag", self.saddlebag) + end + petz.set_properties(self, {textures = {"petz_"..self.type.."_"..self.skin_colors[self.texture_no]..".png"}}) + return false + elseif (not(self.driver) and not(self.is_baby)) and ((wielded_item_name == "petz:saddle") or (wielded_item_name == "petz:saddlebag")) then -- Put on saddle if tamed + local put_saddle = false + if wielded_item_name == "petz:saddle" and not(self.saddle) then + put_saddle = true + elseif wielded_item_name == "petz:saddlebag" and not(self.saddlebag) and not(self.type == "pony") then + put_saddle = true + end + if put_saddle then + petz.put_saddle(self, clicker, wielded_item, wielded_item_name) + return false + end + elseif not(self.driver) and (self.saddle or self.wagon) then -- Mount petz + petz.set_properties(self, {stepheight = 1.1}) + petz.attach(self, clicker) + return false + else + return true + end + else + return true + end +end + +petz.put_saddle = function(self, clicker, wielded_item, wielded_item_name) + local saddle_type + local another_saddle = "" + if wielded_item_name == "petz:saddle" then + saddle_type = "saddle" + self.saddle = true + mobkit.remember(self, "saddle", self.saddle) + if self.saddlebag then + another_saddle = "^petz_"..self.type.."_saddlebag.png" + end + else + saddle_type = "saddlebag" + self.saddlebag = true + mobkit.remember(self, "saddlebag", self.saddlebag) + if self.saddle then + another_saddle = "^petz_"..self.type.."_saddle.png" + end + end + local texture = "petz_"..self.type.."_"..self.skin_colors[self.texture_no]..".png" .. "^petz_"..self.type.."_"..saddle_type..".png"..another_saddle + petz.set_properties(self, {textures = {texture}}) + if not minetest.settings:get_bool("creative_mode") then + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) + end + mokapi.make_sound("object", self.object, "petz_put_sound", petz.settings.max_hear_distance) +end diff --git a/mods/petz/petz/api/api_nametag.lua b/mods/petz/petz/api/api_nametag.lua new file mode 100644 index 0000000..0bf884a --- /dev/null +++ b/mods/petz/petz/api/api_nametag.lua @@ -0,0 +1,24 @@ +petz.update_nametag = function(self) + local name_tag + if self.show_tag and self.tag and not(self.tag == "") then + name_tag = self.tag + local _bgcolor + if not petz.settings["tag_background"] then + _bgcolor = "#FFFFFF00" + else + _bgcolor = false + end + self.object:set_nametag_attributes({ + text = name_tag .." ♥ "..tostring(self.hp).."/"..tostring(self.max_hp), + bgcolor = _bgcolor, + }) + else + self.object:set_nametag_attributes({ + text = "", + }) + end +end + +petz.delete_nametag = function(self) + self.object:set_nametag_attributes({text = nil,}) +end diff --git a/mods/petz/petz/api/api_on_deactivate.lua b/mods/petz/petz/api/api_on_deactivate.lua new file mode 100644 index 0000000..e45f4fe --- /dev/null +++ b/mods/petz/petz/api/api_on_deactivate.lua @@ -0,0 +1,3 @@ +function petz.on_deactivate(self) + petz.dreamcatcher_save_metadata(self) +end diff --git a/mods/petz/petz/api/api_on_die.lua b/mods/petz/petz/api/api_on_die.lua new file mode 100644 index 0000000..6208476 --- /dev/null +++ b/mods/petz/petz/api/api_on_die.lua @@ -0,0 +1,112 @@ +-- +--on_die event for all the mobs +-- + +petz.on_die = function(self) + self.dead = mobkit.remember(self, "dead", true) --a variable, useful to avoid functions + if self.object:get_hp() > 0 then --you can call this function directally + self.object:set_hp(0) + end + local pos = self.object:get_pos() + --Specific of each mob--> + if self.is_mountable then + if self.saddle then -- drop saddle when petz is killed while riding + minetest.add_item(pos, "petz:saddle") + end + if self.saddlebag then -- drop saddlebag + minetest.add_item(pos, "petz:saddlebag") + end + --Drop the items from petz inventory + local inv = minetest.get_inventory({ type="detached", name="saddlebag_inventory" }) + inv:set_list("saddlebag", {}) + if self.saddlebag_inventory then + for key, value in pairs(self.saddlebag_inventory) do + inv:set_stack("saddlebag", key, value) + end + for i = 1, inv:get_size("saddlebag") do + local stack = inv:get_stack("saddlebag", i) + if stack:get_count() > 0 then + minetest.item_drop(stack, self.object, pos) + end + end + end + --Drop horseshoes--> + if self.horseshoes and self.horseshoes > 0 then + mokapi.drop_item(self, "petz:horseshoe", self.horseshoes) + end + --If mounted, force unmount--> + if self.driver then + petz.force_detach(self.driver) + end + --If wagon, detach--> + if self.wagon then + self.wagon:set_detach() + end + elseif self.type == "puppy" then + if self.square_ball_attached and self.attached_squared_ball then + self.attached_squared_ball.object:set_detach() + end + end + --Make it not pointable--> + self.object:set_properties({ + pointable = false, + }) + --Check if Dreamctacher to drop it--> + petz.drop_dreamcatcher(self) + --Flying mobs fall down--> + if self.can_fly then + self.can_fly = false + end + --For all the mobs--> + local props = self.object:get_properties() + props.collisionbox[2] = props.collisionbox[1] - 0.0625 + self.object:set_properties({collisionbox=props.collisionbox}) + --Drop Items--> + mokapi.drop_items(self, self.was_killed_by_player or nil) + mobkit.clear_queue_high(self) + --Remove the owner entry for right_click formspec and close the formspec (it could be opened)--> + if petz.pet[self.owner] then + petz.pet[self.owner]= nil + minetest.close_formspec(self.owner, "petz:form_orders") + end + --Remove this petz from the list of the player pets--> + if self.tamed then + petz.remove_tamed_by_owner(self, false) + end + --Make Sound--> + mobkit.make_sound(self, 'die') + --Particles Effect + if petz.settings.death_effect then + minetest.add_particlespawner({ + amount = 20, + time = 0.001, + minpos = pos, + maxpos = pos, + minvel = vector.new(-2,-2,-2), + maxvel = vector.new(2,2,2), + minacc = {x=0, y=0, z=0}, + maxacc = {x=0, y=0, z=0}, + minexptime = 1.1, + maxexptime = 1.5, + minsize = 1, + maxsize = 2, + collisiondetection = false, + vertical = false, + texture = "petz_smoke.png", + }) + end + --To finish, the Mobkit Die Function--> + mobkit.hq_die(self) +end + +petz.was_killed_by_player = function(self, puncher) + if self.hp <= 0 then + if puncher:is_player() then + return true + else + return false + end + else + return false + end +end diff --git a/mods/petz/petz/api/api_on_punch.lua b/mods/petz/petz/api/api_on_punch.lua new file mode 100644 index 0000000..5c1752e --- /dev/null +++ b/mods/petz/petz/api/api_on_punch.lua @@ -0,0 +1,123 @@ +petz.puncher_is_player = function(puncher) + if type(puncher) == 'userdata' and puncher:is_player() then + return true + else + return false + end +end + +petz.calculate_damage = function(self, time_from_last_punch, tool_capabilities) + local tool_damage = tool_capabilities.damage_groups.fleshy or 1 + --minetest.chat_send_all(tostring("damage= "..tool_damage)) + local time_bonus = (1 / time_from_last_punch) + if time_bonus > 1 then -- the second punch in less than 1 second + time_bonus= petz.round(time_bonus^0.33) --cubic root + else + time_bonus = 0 + end + --minetest.chat_send_all(tostring(time_bonus)) + local health_bonus = petz.round((self.max_hp / self.hp)^0.33) + --minetest.chat_send_all(tostring(health_bonus)) + local luck_bonus = math.random(-1, 1) + --minetest.chat_send_all(tostring(luck_bonus)) + local damage = tool_damage + time_bonus + health_bonus + luck_bonus + --minetest.chat_send_all(tostring(damage)) + return damage +end + +petz.kick_back= function(self, dir) + local hvel = vector.multiply(vector.normalize({x=dir.x, y=0, z=dir.z}), 4) + self.object:set_velocity({x=hvel.x, y=2, z=hvel.z}) +end + +petz.punch_tamagochi = function (self, puncher) + if self.affinity == nil then + return + end + if petz.settings.tamagochi_mode then + if self.owner == puncher:get_player_name() then + petz.set_affinity(self, -petz.settings.tamagochi_punch_rate) + end + end +end + +-- +--on_punch event for all the Mobs +-- + +function petz.on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir) + local pos = self.object:get_pos() --pos of the petz + if not mobkit.is_alive(self) then --is petz alive + return + end + --Do not punch when you are mounted on it!!!--> + if self.is_mountable and puncher == self.driver then + return + end + --Check Dreamcatcher Protection + local puncher_is_player = petz.puncher_is_player(puncher) + if puncher_is_player then --player + if self.dreamcatcher and self.owner ~= puncher:get_player_name() then --The dreamcatcher protects the petz + return + end + else --no player + if self.dreamcatcher then + return + end + end + --Colorize Punch Effect--> + if petz.settings.colorize_punch then + local punch_texture = self.textures[self.texture_no].."^[colorize:"..petz.settings.punch_color..":125" + self.object:set_properties(self, {textures = {punch_texture}}) + minetest.after(0.1, function() + if self then + self.object:set_properties(self, {textures = { petz.compose_texture(self) }}) + end + end) + end + --Do Hurt--> + local damage = petz.calculate_damage(self, time_from_last_punch, tool_capabilities) + mobkit.hurt(self, damage) + --Tamagochi Mode?--> + petz.punch_tamagochi(self, puncher) --decrease affinity when in Tamagochi mode + --Check if killed by player and save it--> + self.was_killed_by_player = petz.was_killed_by_player(self, puncher) + --Update Nametag--> + petz.update_nametag(self) + --Kickback--> + petz.kick_back(self, dir) + --Sound--> + mokapi.make_sound("object", self.object, "petz_default_punch", petz.settings.max_hear_distance) + --Blood--> + petz.blood(self) + --Unmount?--> + if self.is_mountable and self.hp <= 0 and self.driver then --important for mountable petz! + petz.force_detach(self.driver) + end + --Lashing?--> + if self.is_wild then + petz.tame_whip(self, puncher) + end + --Warn Attack?--> + if self.is_wild and not(self.tamed) and not(self.attack_player) then --if you hit it, will attack player + self.warn_attack = true + mobkit.clear_queue_high(self) + end + --Monster Specific--> + if self.type == "mr_pumpkin" then --teleport to player's back + if math.random(1, 3) == 1 then + --petz.lookat(self, puncher:get_pos()) + if (self.hp <= self.max_hp / 2) then + petz.bh_teleport(self, pos, puncher, puncher:get_pos()) + else + mokapi.make_sound("object", self.object, "petz_fireball", petz.settings.max_hear_distance) + petz.spawn_throw_object(self.object, 20, "petz:ent_jack_o_lantern_grenade") + end + end + elseif self.type == "tarantula" then + if math.random(1, 5) == 1 then + --petz.lookat(self, puncher:get_pos()) + petz.spawn_throw_object(self.object, 20, "petz:ent_cobweb") + end + end +end diff --git a/mods/petz/petz/api/api_on_rightclick.lua b/mods/petz/petz/api/api_on_rightclick.lua new file mode 100644 index 0000000..0bd2f11 --- /dev/null +++ b/mods/petz/petz/api/api_on_rightclick.lua @@ -0,0 +1,124 @@ +local S = ... + +--Context +--In this temporary table is saved the reference to an entity by its owner +--to show the when on_rightclick form is shown +petz.pet = {} -- A table of pet["owner_name"]= entity_ref + +minetest.register_on_leaveplayer(function(player) + petz.pet[player:get_player_name()] = nil +end) + +-- +--on_rightclick event for all the Mobs +-- + +petz.on_rightclick = function(self, clicker) + if not(clicker:is_player()) then + return false + end + local pet_name = petz.first_to_upper(self.type) + local player_name = clicker:get_player_name() + local is_owner + if self.owner == player_name then + is_owner = true + else + is_owner = false + end + local privs = minetest.get_player_privs(player_name) + local wielded_item = clicker:get_wielded_item() + local wielded_item_name = wielded_item:get_name() + local show_form = false + local buy + + if ((self.is_pet) and is_owner and (self.can_be_brushed)) -- If brushing or spread beaver oil + and ((wielded_item_name == "petz:hairbrush") or (wielded_item_name == "petz:beaver_oil")) then + petz.brush(self, wielded_item_name, pet_name) + --If feeded + elseif mokapi.feed(self, clicker, petz.settings.tamagochi_feed_hunger_rate, S("@1 at full health (@2)", S(petz.first_to_upper(self.type)), tostring(self.hp)), "moaning") then + if mokapi.tame(self, 5, player_name, S("@1 has been tamed!", S(petz.first_to_upper(self.type))), {max = petz.settings.max_tamed_by_owner, count= petz.count_tamed_by_owner(player_name), msg = S("You cannot tame more petz! (@1 max.)", tostring(petz.settings.max_tamed_by_owner))}) then + petz.after_tame(self) + end + if self.tamed then + petz.update_nametag(self) + end + if petz.settings.tamagochi_mode and not(self.fed) then + petz.do_feed(self) + end + petz.refill(self) --Refill wool, milk or nothing + --convert to + elseif not(petz.str_is_empty(petz.settings[self.type.."_convert"])) and not(petz.str_is_empty(petz.settings[self.type.."_convert_to"])) + and mokapi.item_in_itemlist(wielded_item_name, petz.settings[self.type.."_convert"]) then + petz.convert(self, player_name) + elseif petz.check_capture_items(self, wielded_item_name, clicker, true) then + if self.is_pet and (not(privs.server) and (not(petz.settings.rob_mobs) and (not(self.tamed) or (self.owner and self.owner ~= player_name)))) then + minetest.chat_send_player(player_name, S("You are not the owner of the").." "..S(pet_name)..".") + return + end + if self.owner== nil or self.owner== "" or (not(is_owner) and petz.settings.rob_mobs) then + mokapi.set_owner(self, player_name) + petz.after_tame(self) + end + petz.capture(self, clicker, true) + minetest.chat_send_player("singleplayer", S("Your").." "..S(pet_name).." "..S("has been captured")..".") + elseif self.breed and wielded_item_name == petz.settings[self.type.."_breed"] and not(self.is_baby) then + --minetest.chat_send_all("test="..petz.settings[self.type.."_breed"]) + petz.breed(self, clicker, wielded_item, wielded_item_name) + elseif (wielded_item_name == "petz:dreamcatcher") and (self.tamed) and (self.is_pet) and is_owner then + petz.put_dreamcatcher(self, clicker, wielded_item, wielded_item_name) + elseif petz.settings[self.type.."_colorized"] and minetest.get_item_group(wielded_item_name, "dye") > 0 then --Colorize textures + local color_group = petz.get_color_group(wielded_item_name) + if color_group and not(self.shaved) then + petz.colorize(self, color_group) + end + -- + --Pet Specifics + --below here + elseif self.type == "lamb" and is_owner then + if wielded_item_name == petz.settings.shears and clicker:get_inventory() and not self.shaved then + petz.lamb_wool_shave(self, clicker) --shear it! + else + show_form = true + end + elseif self.type == "ant" and self.ant_type == "queen" then + if wielded_item_name == "farming:seed_wheat" then + petz_feed_queen_ant(self, clicker, player_name, wielded_item) + end + elseif self.milkable and wielded_item_name == "bucket:bucket_empty" and clicker:get_inventory() then + if not(self.milked) then + petz.milk_milk(self, clicker) + else + minetest.chat_send_player(clicker:get_player_name(), S("This animal has already been milked.")) + end + elseif (self.is_mountable) and (wielded_item_name == "petz:glass_syringe" or wielded_item_name == "petz:glass_syringe_sperm") then + if not(self.is_baby) then + petz.pony_breed(self, clicker, wielded_item, wielded_item_name) + end + elseif self.bottled and (wielded_item_name == "vessels:glass_bottle") then + petz.bottled(self, clicker) + elseif (self.type == "pony") and (wielded_item_name == "petz:horseshoe") and (self.owner == player_name) then + petz.put_horseshoe(self, clicker) + elseif (self.type == "pony") and (wielded_item_name == "petz:wagon") and (self.owner == player_name) then + petz.put_wagon(self, clicker) + elseif self.is_mountable and is_owner then + show_form = petz.mount(self, clicker, wielded_item, wielded_item_name) + elseif self.feathered and is_owner then + if wielded_item_name == petz.settings.shears and clicker:get_inventory() then + petz.cut_feather(self, clicker) --cut a feather + else + show_form = true + end + elseif petz.settings.selling and not(minetest.is_singleplayer()) and self.for_sale and self.owner and not(self.owner == player_name) then --Buy Form + buy = true + show_form = true + else --Else open the Form + if (self.is_pet) and ((self.tamed) and (self.owner == player_name)) then + buy = false + show_form = true + end + end + if show_form then + petz.pet[player_name]= self + minetest.show_formspec(player_name, "petz:form_orders", petz.create_form(player_name, buy)) + end +end diff --git a/mods/petz/petz/api/api_on_step.lua b/mods/petz/petz/api/api_on_step.lua new file mode 100644 index 0000000..cb781a4 --- /dev/null +++ b/mods/petz/petz/api/api_on_step.lua @@ -0,0 +1,43 @@ +petz.on_step = function(self, dtime) + local on_step_time = 1 + if mobkit.timer(self, on_step_time) and not(self.dead) then --Only check every 1 sec, not every step! + if self.init_tamagochi_timer then + petz.init_tamagochi_timer(self) + end + if self.is_pregnant then + petz.pregnant_timer(self, on_step_time) + elseif self.is_baby then + petz.growth_timer(self, on_step_time) + end + if self.gallop then + petz.gallop(self, on_step_time) + end + local lifetime = petz.check_lifetime(self) + if lifetime then + petz.lifetime_timer(self, lifetime, on_step_time) + end + if self.dreamcatcher and self.back_home then + petz.back_home(self) + end + --Tamagochi + --Check the hungry + if petz.settings.tamagochi_mode and self.owner and self.is_pet and petz.settings.tamagochi_hungry_warning > 0 and not(self.status=="sleep") and petz.settings[self.type.."_follow"] then + if not(self.tmp_follow_texture) then + local items = string.split(petz.settings[self.type.."_follow"], ',') + local item = petz.str_remove_spaces(items[1]) --the first one + local follow_texture + if string.sub(item, 1, 5) == "group" then + follow_texture = "petz_pet_bowl_inv.png" + else + follow_texture = minetest.registered_items[item].inventory_image + end + self.tmp_follow_texture = follow_texture --temporary property + end + if mobkit.timer(self, 2) then + if (self.hp / self.max_hp) <= petz.settings.tamagochi_hungry_warning then + petz.do_particles_effect(self.object, self.object:get_pos(), "hungry", self.tmp_follow_texture) + end + end + end + end +end diff --git a/mods/petz/petz/api/api_orders.lua b/mods/petz/petz/api/api_orders.lua new file mode 100644 index 0000000..5874f2c --- /dev/null +++ b/mods/petz/petz/api/api_orders.lua @@ -0,0 +1,70 @@ +petz.ownthing = function(self) + self.status = mobkit.remember(self, "status", nil) + if self.can_fly then + petz.hq_wanderfly(self, 0) + elseif self.can_swin and self.isinliquid then + mobkit.hq_aqua_roam(self, 0, self.max_speed) + else + mobkit.hq_roam(self, 0) + end + mobkit.clear_queue_low(self) + mobkit.clear_queue_high(self) +end + +petz.stand = function(self) + self.object:set_velocity({ x = 0, y = 0, z = 0 }) + self.object:set_acceleration({ x = 0, y = 0, z = 0 }) +end + +petz.standhere = function(self) + mobkit.clear_queue_high(self) + mobkit.clear_queue_low(self) + if self.can_fly then + if petz.node_name_in(self, "below") == "air" then + mobkit.animate(self, "fly") + else + mobkit.animate(self, "stand") + end + elseif self.can_swin and petz.isinliquid(self) then + mobkit.animate(self, "def") + else + if self.animation["sit"] and not(petz.isinliquid(self)) then + mobkit.animate(self, "sit") + else + mobkit.animate(self, "stand") + end + end + self.status = mobkit.remember(self, "status", "stand") + --mobkit.lq_idle(self, 2400) + petz.stand(self) +end + +petz.guard = function(self) + self.status = mobkit.remember(self, "status", "guard") + mobkit.clear_queue_high(self) + petz.stand(self) +end + +petz.follow = function(self, player) + mobkit.clear_queue_low(self) + mobkit.clear_queue_high(self) + self.status = mobkit.remember(self, "status", "follow") + if self.can_fly then + mobkit.animate(self, "fly") + petz.hq_followliquidair(self, 100, player) + elseif self.can_swin and self.isinliquid then + mobkit.animate(self, "def") + petz.hq_followliquidair(self, 100, player) + else + mobkit.hq_follow(self, 100, player) + end +end + +petz.alight = function(self, prty, end_status) + mobkit.clear_queue_low(self) + mobkit.clear_queue_high(self) + if not(petz.node_name_in(self, "below") == "air") then + mobkit.animate(self, "fly") + end + petz.hq_alight(self, prty, end_status) +end diff --git a/mods/petz/petz/api/api_particles.lua b/mods/petz/petz/api/api_particles.lua new file mode 100644 index 0000000..b79e271 --- /dev/null +++ b/mods/petz/petz/api/api_particles.lua @@ -0,0 +1,108 @@ +-- +--Particle Effects +-- + +petz.do_particles_effect = function(obj, pos, particle_type, texture_name) + local minpos + minpos = { + x = pos.x, + y = pos.y, + z = pos.z + } + local maxpos + maxpos = { + x = minpos.x + 0.4, + y = minpos.y - 0.5, + z = minpos.z + 0.4 + } + local time + local particles_amount + local min_size + local max_size + if particle_type == "star" then + texture_name = "petz_star_particle.png" + time = 1.5 + particles_amount = 20 + min_size = 1.0 + max_size = 1.5 + elseif particle_type == "heart" then + texture_name = "petz_affinity_heart.png" + time = 1.5 + particles_amount = 10 + min_size = 1.0 + max_size = 1.5 + elseif particle_type == "pregnant_pony" then + texture_name = "petz_pony_pregnant_icon.png" + time = 1.5 + particles_amount = 10 + min_size = 5.0 + max_size = 6.0 + elseif particle_type == "pregnant_lamb" then + texture_name = "petz_lamb_pregnant_icon.png" + time = 1.5 + particles_amount = 10 + min_size = 5.0 + max_size = 6.0 + elseif particle_type == "pregnant_camel" then + texture_name = "petz_camel_pregnant_icon.png" + time = 1.5 + particles_amount = 10 + min_size = 5.0 + max_size = 6.0 + elseif particle_type == "dreamcatcher" then + texture_name = "petz_dreamcatcher_particle.png" + time = 1.5 + particles_amount = 15 + min_size = 1.0 + max_size = 2.0 + elseif particle_type == "pollen" then + texture_name = "petz_pollen.png" + time = 1.5 + particles_amount = 15 + min_size = 0.5 + max_size = 1.0 + elseif particle_type == "pumpkin" then + texture_name = "petz_pumpkin_particle.png" + time = 1.5 + particles_amount = 10 + min_size = 2.0 + max_size = 4.0 + elseif particle_type == "fire" then + texture_name = "petz_fire_particle.png" + time = 1.5 + particles_amount = 50 + min_size = 2.0 + max_size = 4.0 + elseif particle_type == "sleep" then + texture_name = "petz_sleep_particle.png" + time = 1.5 + particles_amount = 3 + min_size = 1.0 + max_size = 2.0 + elseif particle_type == "hungry" then + time = 1.5 + particles_amount = 3 + min_size = 1.0 + max_size = 2.0 + end + + minetest.add_particlespawner({ + --attached = objw, + amount = particles_amount, + time = time, + minpos = minpos, + maxpos = maxpos, + --minvel = {x=1, y=0, z=1}, + --maxvel = {x=1, y=0, z=1}, + --minacc = {x=1, y=0, z=1}, + --maxacc = {x=1, y=0, z=1}, + minexptime = 1, + maxexptime = 1, + minsize = min_size, + maxsize =max_size, + collisiondetection = false, + vertical = false, + texture = texture_name, + glow = 14 + }) +end diff --git a/mods/petz/petz/api/api_poop.lua b/mods/petz/petz/api/api_poop.lua new file mode 100644 index 0000000..eff39af --- /dev/null +++ b/mods/petz/petz/api/api_poop.lua @@ -0,0 +1,16 @@ +-- +--Poop Engine +-- + +petz.poop = function(self, pos) + if not(petz.settings.poop) or not(self.tamed) or not(self.poop) or self.child or petz.is_jumping(self) or not(petz.is_standing(self)) or math.random(1, petz.settings.poop_rate) > 1 then + return + end + local node_name_below = petz.node_name_in(self, "below") + local node_name = petz.node_name_in(self, "self") + --minetest.chat_send_player("singleplayer", node_name) + if node_name == "air" and node_name_below ~= "air" then + pos.y = pos.y - 0.75 + minetest.set_node(pos, {name = "petz:poop"}) + end +end diff --git a/mods/petz/petz/api/api_sell_buy.lua b/mods/petz/petz/api/api_sell_buy.lua new file mode 100644 index 0000000..f805be2 --- /dev/null +++ b/mods/petz/petz/api/api_sell_buy.lua @@ -0,0 +1,36 @@ +local S = ... + +petz.buy = function(self, buyer) + local buyer_name= buyer:get_player_name() + local inv_buyer= buyer:get_inventory() + local seller_name = self.owner + if not seller_name then + return + end + local seller = minetest.get_player_by_name(seller_name) + local item_index = self.exchange_item_index + local item_amount = self.exchange_item_amount + local item_name = petz.settings.selling_exchange_items_list[item_index].name + --minetest.chat_send_all(item_name) + local item_description = petz.settings.selling_exchange_items_list[item_index].description + local item_stack = ItemStack({name = item_name, count = item_amount}) + if not seller then + minetest.chat_send_player(buyer_name, S("The seller is not online.")) + return + elseif not(inv_buyer:contains_item("main", item_stack)) then + minetest.chat_send_player(buyer_name, S("You have not").." "..item_description.." ("..tostring(item_amount)..")") + return + end + -- Do buy + inv_buyer:remove_item("main", item_stack) + local inv_seller = seller:get_inventory() + if inv_seller:room_for_item("main", item_stack) then + inv_seller:add_item("main", item_stack) + else + local seller_pos = seller:get_pos() + minetest.item_drop(item_stack, seller, seller_pos) + end + petz.abandon_pet(self, S("You have sold your").." "..self.type.." "..S("to").." "..buyer_name..".") + mokapi.set_owner(self, buyer_name) + minetest.chat_send_player(buyer_name, S("Congratulations, you've bought a").." "..self.type) +end diff --git a/mods/petz/petz/api/api_silk.lua b/mods/petz/petz/api/api_silk.lua new file mode 100644 index 0000000..365d04e --- /dev/null +++ b/mods/petz/petz/api/api_silk.lua @@ -0,0 +1,234 @@ +local S = ... + +--Coocon +minetest.register_node("petz:cocoon", { + description = S("Silkworm Cocoon"), + inventory_image = "petz_cocoon_inv.png", + groups = {snappy=1, bendy=2, cracky=1}, + sounds = default.node_sound_wood_defaults(), + paramtype = "light", + drawtype = "mesh", + mesh = 'petz_cocoon.b3d', + visual_scale = 1.0, + tiles = {"petz_cocoon.png"}, + collision_box = { + type = "fixed", + fixed = {-0.125, -0.5, -0.375, 0.0625, -0.25, 0.3125}, + }, + selection_box = { + type = "fixed", + fixed = {-0.125, -0.5, -0.375, 0.0625, -0.25, 0.3125}, + }, + on_construct = function(pos) + local timer = minetest.get_node_timer(pos) + timer:start(math.random(400, 600)) + end, + on_timer = function(pos) + if not minetest.registered_entities["petz:moth"] then + return + end + if pos and petz.is_night() then --only spawn at night, to it does not die + minetest.add_entity(pos, "petz:moth") + minetest.set_node(pos, {name= "air"}) + return false + end + return true + end +}) + +--Silkworm Egg +minetest.register_node("petz:silkworm_eggs", { + description = S("Silkworm Eggs"), + inventory_image = "petz_silkworm_eggs_inv.png", + groups = {snappy=1, bendy=2, cracky=1, falling_node = 1}, + sounds = default.node_sound_wood_defaults(), + paramtype = "light", + drawtype = "mesh", + mesh = 'petz_silkworm_eggs.b3d', + visual_scale = 1.0, + tiles = {"petz_silkworm_eggs.png"}, + collision_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.062500, 0.1875, -0.4375, 0.1875}, + }, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.062500, 0.1875, -0.4375, 0.1875}, + }, + on_construct = function(pos) + local timer = minetest.get_node_timer(pos) + timer:start(math.random(200, 300)) + end, + on_timer = function(pos) + if not minetest.registered_entities["petz:silkworm"] then + return + end + minetest.set_node(pos, {name= "air"}) + minetest.add_entity(pos, "petz:silkworm") + local pos2 = { + x = pos.x + 1, + y = pos.y, + z = pos.z + 1, + } + if minetest.get_node(pos2) and minetest.get_node(pos2).name == "air" then + minetest.add_entity(pos2, "petz:silkworm") + end + local pos3 = { + x = pos.x - 1, + y = pos.y, + z = pos.z -1, + } + if minetest.get_node(pos3) and minetest.get_node(pos3).name == "air" then + minetest.add_entity(pos3, "petz:silkworm") + end + return false + end +}) + +--Spinning Wheel +minetest.register_node("petz:spinning_wheel", { + description = S("Spinning Wheel"), + groups = {snappy=1, bendy=2, cracky=1}, + sounds = default.node_sound_wood_defaults(), + paramtype = "light", + drawtype = "mesh", + mesh = 'petz_spinning_wheel.b3d', + tiles = {"petz_spinning_wheel_loaded.png"}, + collision_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.25, 0.5, 0.3125, 0.1875}, + }, + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.25, 0.5, 0.3125, 0.1875}, + }, + after_place_node = function(pos, placer, itemstack, pointed_thing) + local meta = minetest.get_meta(pos) + meta:set_int("silk_count", 1) + meta:set_string("infotext", S("Silk Count").." = "..meta:get_int("silk_count")) + end, + on_rightclick = function(pos, node, player, itemstack, pointed_thing) + local player_name = player:get_player_name() + --minetest.chat_send_player(player_name, "name="..itemstack:get_name()) + local meta = minetest.get_meta(pos) + local silk_count = meta:get_int("silk_count") + if itemstack:get_name() == "petz:cocoon" then + if silk_count == 3 then + minetest.chat_send_player(player_name, S("First, extract the silk bobbin from the spinning wheel.")) + elseif silk_count == 2 then + silk_count = silk_count + 1 + meta:set_int("silk_count", silk_count) + meta:set_string("infotext", S("Silk Count").." = "..tostring(silk_count)) + itemstack:take_item() + minetest.chat_send_player(player_name, S("A silk bobbin has been created!")) + return itemstack + else + silk_count = silk_count + 1 + meta:set_int("silk_count", silk_count) + meta:set_string("infotext", S("Silk Count").." = "..tostring(silk_count)) + itemstack:take_item() + minetest.chat_send_player(player_name, S("There are still").." ".. tostring(3-silk_count).." "..S("more to create the bobbin.")) + return itemstack + end + elseif silk_count == 3 then --get the bobbin + local inv = player:get_inventory() + if inv:room_for_item("main", "petz:silk_bobbin") then --firstly check for room in the inventory + local itemstack_name = itemstack:get_name() + local stack = ItemStack("petz:silk_bobbin 1") + if (itemstack_name == "petz:silk_bobbin" or itemstack_name == "") and (itemstack:get_count() < itemstack:get_stack_max()) then + itemstack:add_item(stack) + else + inv:add_item("main", stack) + end + meta:set_int("silk_count", 0) --reset the silk count + meta:set_string("infotext", S("Silk Count").." = 0") + minetest.chat_send_player(player_name, S("You got the bobbin!")) + return itemstack + else + minetest.chat_send_player(player_name, S("No room in your inventory for the silk bobbin.")) + end + end + end, +}) + +minetest.register_craft({ + type = "shaped", + output = "petz:spinning_wheel", + recipe = { + {'', 'group:wood', ''}, + {'group:wood', 'petz:silk_bobbin', 'group:wood'}, + {'', 'group:wood', ''}, + } +}) + +petz.init_convert_to_chrysalis = function(self) + minetest.after(math.random(1200, 1500), function() + if not(mobkit.is_alive(self)) then + return + end + local pos = self.object:get_pos() + if minetest.get_node(pos) and minetest.get_node(pos).name ~= "air" then + return + end + minetest.set_node(pos, {name= "petz:cocoon"}) + mokapi.remove_mob(self) + end, self) +end + +petz.init_lay_eggs = function(self) + minetest.after(math.random(150, 240), function() + if not(mobkit.is_alive(self)) then + return + end + if self.eggs_count > 0 then + return + end + petz.alight(self, 0, "stand") + minetest.after(10.0, function() + if not(mobkit.is_alive(self)) then + return + end + local pos = self.object:get_pos() + if minetest.get_node(pos) and minetest.get_node(pos).name ~= "air" then + return + end + local node_name = petz.node_name_in(self, "below") + local spawn_egg = false + if string.sub(petz.settings.silkworm_lay_egg_on_node, 1, 5) == "group" then + local node_group = minetest.get_item_group(node_name, string.sub(petz.settings.silkworm_lay_egg_on_node, 7)) + if node_group > 0 then + spawn_egg = true + end + else + if node_name == petz.settings.silkworm_lay_egg_on_node then + spawn_egg = true + end + end + if spawn_egg then + minetest.set_node(pos, {name= "petz:silkworm_eggs"}) + self.eggs_count = mobkit.remember(self, "eggs_count", (self.eggs_count+1)) --increase the count of eggs + else + petz.init_lay_eggs(self) --reinit the timer, to try to lay eggs later + end + petz.ownthing(self) + end, self) + end, self) +end + +--Silk + +minetest.register_craftitem("petz:silk_bobbin", { + description = S("Silk Bobbin"), + inventory_image = "petz_silk_bobbin.png", + stack_max = 25, +}) + +minetest.register_craft({ + type = "shaped", + output = 'petz:silk_bobbin', + recipe = { + {'petz:cocoon', 'default:stick', 'petz:cocoon'}, + {'petz:cocoon', 'default:stick', 'petz:cocoon'}, + {'petz:cocoon', 'default:stick', 'petz:cocoon'}, + } +}) diff --git a/mods/petz/petz/api/api_sleep.lua b/mods/petz/petz/api/api_sleep.lua new file mode 100644 index 0000000..9a0a79f --- /dev/null +++ b/mods/petz/petz/api/api_sleep.lua @@ -0,0 +1,105 @@ +petz.calculate_sleep_times = function(self) + if not petz.settings.sleeping then + return + end + if (self.sleep_at_night or self.sleep_at_day) then + local sleep_time + local sleep_start_time + local sleep_end_time + local sleep_end_time_limit + if self.sleep_at_night then + local night_start = 19500 + local night_duration = 9000 + sleep_time = night_duration * (self.sleep_ratio or 1) + sleep_end_time_limit = 23999 + 4500 + sleep_start_time = math.random(night_start, sleep_end_time_limit - sleep_time) + sleep_end_time = sleep_start_time + sleep_time + if sleep_start_time > 23999 then + sleep_start_time = sleep_end_time_limit - sleep_start_time + end + if sleep_end_time > 23999 then + sleep_end_time = sleep_end_time - 23999 + end + else + local day_start = 4500 + local day_duration = 15000 + sleep_time = day_duration * (self.sleep_ratio or 1) + sleep_end_time_limit = 19500 + sleep_start_time = math.random(day_start, sleep_end_time_limit - sleep_time) + sleep_end_time = sleep_start_time + sleep_time + end + self.sleep_start_time = mobkit.remember(self, "sleep_start_time", sleep_start_time) + self.sleep_end_time = mobkit.remember(self, "sleep_end_time", sleep_end_time) + --minetest.chat_send_player("singleplayer", "sleep_time="..tostring(sleep_time).."/sleep_start_time="..tostring(sleep_start_time).."/sleep_end_time="..tostring(sleep_end_time)) + end +end + +petz.bh_sleep = function(self, prty) + if(not petz.settings.sleeping) or petz.isinliquid(self) then + return + end + --minetest.chat_send_player("singleplayer", "ana") + if (self.sleep_at_night and petz.is_night()) or (self.sleep_at_day and not(petz.is_night())) then + --minetest.chat_send_player("singleplayer", "lucas") + local timeofday = minetest.get_timeofday() * 24000 + --minetest.chat_send_player("singleplayer", tostring(timeofday)) + local sleep_start_time = self.sleep_start_time + local sleep_end_time = self.sleep_end_time + if self.sleep_at_night then + if timeofday > 19500 then + sleep_end_time = 23999 + elseif timeofday < 4500 then + sleep_start_time = 0 + end + end + --minetest.chat_send_player("singleplayer", "time of day="..tostring(timeofday).."/sleep_start_time="..tostring(self.sleep_start_time).."/sleep_end_time="..tostring(self.sleep_end_time)) + if (self.status ~= "sleep") and (timeofday > sleep_start_time and timeofday < sleep_end_time) then + --minetest.chat_send_player("singleplayer", "prueba") + petz.sleep(self, prty, false) + end + end +end + +petz.sleep = function(self, prty, force) + self.status = mobkit.remember(self, "status", "sleep") + mobkit.animate(self, 'sleep') + local texture = self.textures[self.texture_no] + self.object:set_properties(self, {textures = {texture.."^petz_"..self.type.."_sleep.png"}}) --sleeping eyes + petz.hq_sleep(self, prty, force) +end + +function petz.hq_sleep(self, prty, force) + local timer = 2 + local func=function() + timer = timer - self.dtime + if timer < 0 then + if not(force) then + local timeofday = minetest.get_timeofday() * 24000 + local sleep_start_time = self.sleep_start_time + local sleep_end_time = self.sleep_end_time + if self.sleep_at_night then + if timeofday > 19500 then + sleep_end_time = 23999 + elseif timeofday < 4500 then + sleep_start_time = 0 + end + end + if (self.status == "sleep") and timer < 0 --check if status did not change + and (self.sleep_at_night and not(petz.is_night())) or (self.sleep_at_day and petz.is_night()) + or (timeofday < sleep_start_time) or (timeofday > sleep_end_time) then + mobkit.clear_queue_high(self) --awake + local texture = self.textures[self.texture_no] + self.object:set_properties(self, {textures = {texture}}) --quit sleeping eyes + self.status = mobkit.remember(self, "status", nil) + return true + else + petz.do_particles_effect(self.object, self.object:get_pos(), "sleep") + end + else + petz.do_particles_effect(self.object, self.object:get_pos(), "sleep") + end + timer = 2 + end + end + mobkit.queue_high(self,func,prty) +end diff --git a/mods/petz/petz/api/api_spawn.lua b/mods/petz/petz/api/api_spawn.lua new file mode 100644 index 0000000..d54524d --- /dev/null +++ b/mods/petz/petz/api/api_spawn.lua @@ -0,0 +1,271 @@ +petz.get_node_below = function(pos) + local pos_below = { + x = pos.x, + y = pos.y - 1.0, + z = pos.z, + } + local node = minetest.get_node(pos_below) + return node +end + +function petz.spawn_is_in_deep(nodepos) + if not nodepos then + return false + end + nodepos.y = nodepos.y + 1.1 + local node_1_above = mobkit.nodeatpos(nodepos) + nodepos.y= nodepos.y + 1 + local node_2_above = mobkit.nodeatpos(nodepos) + if (node_1_above and node_1_above.drawtype == 'liquid') and (node_2_above and node_2_above.drawtype == 'liquid') then + return true + else + return false + end +end + +petz.spawn_mob = function(spawn_pos, limit_max_mobs, abr, liquidflag) + if petz.settings.no_spawn_in_protected and minetest.is_protected(spawn_pos, "") then + return + end + local node + if not(liquidflag) then + node = petz.get_node_below(spawn_pos) --the node below the spawn pos + else --liquid + if not(petz.spawn_is_in_deep(spawn_pos)) then --spawn only in deep + return + else + node = minetest.get_node(spawn_pos) + end + end + + --Spawn Peaceful or monsters? + local peaceful_monsters_random + if not(petz.settings.disable_monsters) then + peaceful_monsters_random = math.random() + else + peaceful_monsters_random = 0.0 + end + --minetest.chat_send_player("singleplayer", tostring(peaceful_monsters_random)) + local peaceful + if peaceful_monsters_random <= petz.settings.spawn_peaceful_monsters_ratio then + peaceful = true + else + peaceful = false + end + + local candidates_list = {} --Create a sublist of the petz with the same node to spawnand between max_height and min_height + for i = 1, #petz.settings["petz_list"] do + local pet_name + local can_spawn = true + pet_name = petz.settings["petz_list"][i] + local mob_ent_name = "petz:"..pet_name + --minetest.chat_send_player("singleplayer", mob_ent_name) + local ent = minetest.registered_entities[mob_ent_name] + -- Note: using a function that just returns false on the first condition that is not met + -- might be easier to read than this current implementation + if ent then --do several checks to know if the mob can be included in the list or not + if can_spawn and petz.settings[pet_name.."_disable_spawn"] then + can_spawn = false + end + if can_spawn and ((ent.is_monster and peaceful) or (not(ent.is_monster) and not(peaceful))) then + can_spawn = false + end + if can_spawn and ent.spawn_max_height then --check max_height + if spawn_pos.y > ent.spawn_max_height then + can_spawn = false + end + end + if can_spawn and ent.spawn_min_height then --check min_height + if spawn_pos.y < ent.spawn_min_height then + can_spawn = false + end + end + if can_spawn and ent.min_daylight_level then --check min_light + local daylight_level = minetest.get_node_light(spawn_pos, 0.5) + if not(daylight_level) or (daylight_level < ent.min_daylight_level) then + can_spawn = false + end + end + if can_spawn and ent.max_daylight_level then --check max_light + local daylight_level = minetest.get_node_light(spawn_pos, 0.5) + if not(daylight_level) or (daylight_level > ent.max_daylight_level) then + can_spawn = false + end + end + --Check if this mob spawns at night + if can_spawn and ent.spawn_at_night then + if not(petz.is_night()) then --if not at night + can_spawn = false + end + end + --Check if monsters are disabled + if can_spawn and ent.is_monster then + if petz.settings.disable_monsters then + can_spawn = false + end + end + --Check if seasonal mobs + local season = petz.settings[pet_name.."_seasonal"] + if can_spawn and season then + local now_month = petz.get_os_month() + if season == "halloween" then + if now_month ~= 10 then + can_spawn = false + end + elseif season == "christmas" then + if now_month ~= 12 then + can_spawn = false + end + end + end + end + if can_spawn and mokapi.item_in_itemlist(node.name, petz.settings[pet_name.."_spawn_nodes"]) then + table.insert(candidates_list, pet_name) + end + end --end for + + --minetest.chat_send_player("singleplayer", minetest.serialize(candidates_list)) + + if #candidates_list < 1 then --if no candidates, then return + return + end + + local random_mob = candidates_list[math.random(1, #candidates_list)] --Get a random mob from the list of candidates + local random_mob_name = "petz:" .. random_mob + --minetest.chat_send_player("singleplayer", random_mob) + local spawn_chance = petz.settings[random_mob.."_spawn_chance"] + if spawn_chance < 0 then + spawn_chance = 0 + elseif spawn_chance > 1 then + spawn_chance = 1 + end + spawn_chance = math.floor((1 / spawn_chance)+0.5) + --minetest.chat_send_player("singleplayer", tostring(spawn_chance)) + local random_chance = math.random(1, spawn_chance) + --minetest.chat_send_player("singleplayer", tostring(random_chance)) + if random_chance == 1 then + local random_mob_biome = petz.settings[random_mob.."_spawn_biome"] + --minetest.chat_send_player("singleplayer", "biome="..random_mob_biome) + if random_mob_biome ~= "default" then --specific biome to spawn for this mob + local biome_name = minetest.get_biome_name(minetest.get_biome_data(spawn_pos).biome) --biome of the spawn pos + --minetest.chat_send_player("singleplayer", "biome="..biome_name) + if biome_name ~= random_mob_biome then + return + end + end + local mob_count = 0 + local same_species_count = 0 + if limit_max_mobs then + local objs = minetest.get_objects_inside_radius(spawn_pos, abr*16 + 5) + for _, obj in ipairs(objs) do -- count mobs in abrange + if not obj:is_player() then + local luaent = obj:get_luaentity() + if luaent then + for i = 1, #petz.settings["petz_list"] do + if luaent.type and luaent.type == petz.settings["petz_list"][i] then + mob_count = mob_count + 1 + end + end + if luaent.type and luaent.type == random_mob then + same_species_count = same_species_count + 1 + end + end + end + end + --minetest.chat_send_all(tostring("mob count="..mob_count)) + --minetest.chat_send_all(tostring("same species count="..same_species_count)) + end + if not(limit_max_mobs) or ((mob_count < petz.settings.max_mobs) and (same_species_count < petz.settings.max_per_species)) then --check for bigger mobs: + local spawn_herd = petz.settings[random_mob.."_spawn_herd"] + if spawn_herd then + --minetest.chat_send_player("singleplayer", tonumber(spawn_herd)) + if spawn_herd == 0 then + spawn_herd = 1 + elseif spawn_herd > 5 then + spawn_herd = 5 + end + else + spawn_herd = 1 + end + for i = 1, math.random(1, spawn_herd) do + local spawn = true + if i == 2 then + spawn_pos.x = spawn_pos.x + 1 + elseif i == 3 then + spawn_pos.x = spawn_pos.x - 2 + elseif i == 4 then + spawn_pos.x = spawn_pos.x + 1 + spawn_pos.z = spawn_pos.z + 1 + else + spawn_pos.z = spawn_pos.z - 2 + end + --[[ + if i > 1 then + local height, liquidflag2 = mobkit.get_terrain_height(spawn_pos, 32) + if height or (liquidflag2 and ent.can_swin) then + local node_below = petz.get_node_below(spawn_pos) + if not(mokapi.item_in_itemlist(node_below.name, petz.settings[random_mob.."_spawn_nodes"])) then + spawn = false + end + end + end + ]] + if spawn then + spawn_pos = petz.pos_to_spawn(random_mob_name, spawn_pos) --recalculate pos.y for bigger mobs + minetest.add_entity(spawn_pos, random_mob_name) + --minetest.chat_send_player("singleplayer", random_mob.. " spawned!!!") + end + --minetest.chat_send_player("singleplayer", "cave="..tostring(cave)) + end + end + end +end + +minetest.register_globalstep(function(dtime) + local abr = tonumber(minetest.get_mapgen_setting('active_block_range')) or 3 + local radius = abr * 16 --recommended + local interval = petz.settings.spawn_interval + local spawn_pos, liquidflag = mobkit.get_spawn_pos_abr(dtime, interval, radius, petz.settings.spawn_chance, 0.2) + if spawn_pos then + petz.spawn_mob(spawn_pos, true, abr, liquidflag) + end +end) + +-- Spawn some mobs when area loaded +--minetest.register_on_generated(function(minp, maxp, seed) + --if not(petz.settings.generated_area_create_mobs) then + --return + --end + --local debug = "minp="..(minetest.pos_to_string(minp))..", maxp="..(minetest.pos_to_string(maxp))..", seed="..seed + --minetest.chat_send_all(debug) + --local max_mobs = petz.settings.max_mobs * (petz.settings.generated_area_mob_ratio or 1) + --Get a random pos + --for i = 1, max_mobs do + --local spawn_pos = { x= math.random(minp.x, maxp.x), y = math.random(minp.y, maxp.y)+32, z = math.random(minp.z, maxp.z)} + --local height, liquidflag = mobkit.get_terrain_height(spawn_pos, 32) + --local debug = "spawn pos=".. minetest.pos_to_string(spawn_pos) + --minetest.chat_send_all(debug) + --if height then + --minetest.chat_send_all("test") + --petz.spawn_mob(spawn_pos, false) + --end + --end +--end) + +petz.pos_to_spawn = function(pet_name, pos) + local x = pos.x + local y = pos.y + local z = pos.z + if minetest.registered_entities[pet_name] and minetest.registered_entities[pet_name].visual_size.x then + if minetest.registered_entities[pet_name].visual_size.x >= 32 and + minetest.registered_entities[pet_name].visual_size.x <= 48 then + y = y + 2 + elseif minetest.registered_entities[pet_name].visual_size.x > 48 then + y = y + 5 + else + y = y + 1 + end + end + local spawn_pos = { x = x, y = y, z = z} + return spawn_pos +end diff --git a/mods/petz/petz/api/api_squareball.lua b/mods/petz/petz/api/api_squareball.lua new file mode 100644 index 0000000..66d28a9 --- /dev/null +++ b/mods/petz/petz/api/api_squareball.lua @@ -0,0 +1,161 @@ +local S = ... + +-- +--Square Ball Game for the Puppy +-- + +function petz.spawn_square_ball(user, strength) + local pos = user:get_pos() + pos.y = pos.y + 1.5 -- camera offset + local dir = user:get_look_dir() + local yaw = user:get_look_horizontal() + + local obj = minetest.add_entity(pos, "petz:ent_square_ball") + if not obj then + return + end + obj:get_luaentity().shooter_name = user:get_player_name() + obj:set_yaw(yaw - 0.5 * math.pi) + obj:set_velocity(vector.multiply(dir, strength)) + return true +end + +minetest.register_node("petz:square_ball", { + description = S("Square Ball (use to throw)"), + --inventory_image = "petz_square_ball.png", + tiles = {"petz_square_ball.png", "petz_square_ball.png", "petz_square_ball.png", "petz_square_ball.png", + "petz_square_ball.png", "petz_square_ball.png"}, + visual_scale = 0.35, + is_ground_content = false, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + on_use = function(itemstack, user, pointed_thing) + local strength = 20 + if not petz.spawn_square_ball(user, strength) then + return -- something failed + end + itemstack:take_item() + return itemstack + end, +}) + +minetest.register_craft({ + type = "shaped", + output = 'petz:square_ball', + recipe = { + {'wool:blue', 'wool:white', 'wool:red'}, + {'wool:white', 'farming:string', 'wool:white'}, + {'wool:yellow', 'wool:white', 'wool:white'}, + } +}) + +petz.attach_squareball = function(self, thing_ent, thing_ref, shooter_name) + self.object:set_properties({visual = "cube", physical = true, visual_size = {x = 0.045, y = 0.045}, + textures = {"petz_square_ball.png", "petz_square_ball.png", "petz_square_ball.png", "petz_square_ball.png", + "petz_square_ball.png", "petz_square_ball.png"}, groups = {immortal = 1}, collisionbox = {-0.15, -0.15, -0.15, 0.15, 0.15, 0.15},}) + self.object:set_attach(thing_ref, "head", {x=-0.0, y=0.5, z=-0.45}, {x=0, y=0, z=0}) + thing_ent.square_ball_attached = true + thing_ent.attached_squared_ball = self + mobkit.remember(thing_ent, "square_ball_attached", thing_ent.square_ball_attached) + mobkit.make_sound(thing_ent, "moaning") + if shooter_name then + local player = minetest.get_player_by_name(shooter_name) + if player then + mobkit.clear_queue_low(thing_ent) + mobkit.hq_follow(thing_ent, 15, player) + self.shooter_name = "" --disable de 'on_step' event + end + end +end + +minetest.register_entity("petz:ent_square_ball", { + hp_max = 4, -- possible to catch the arrow (pro skills) + physical = false, -- use Raycast + collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + visual = "wielditem", + textures = {"petz:square_ball"}, + visual_size = {x = 0.2, y = 0.15}, + old_pos = nil, + shooter_name = "", + parent_entity = nil, + waiting_for_removal = false, + + on_activate = function(self) + self.object:set_acceleration({x = 0, y = -9.81, z = 0}) + end, + + on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir) + return false + end, + + on_rightclick = function(self, clicker) + if self.object:get_attach() then --if attached + local attach = self.object:get_attach() + local inv = clicker:get_inventory() + local new_stack = "petz:square_ball" + if inv:room_for_item("main", new_stack) then + inv:add_item("main", new_stack) + else + local parent_pos = attach:get_pos() + minetest.add_item(parent_pos, new_stack) + end + self.object:set_detach() + local parent_ent = attach:get_luaentity() + parent_ent.square_ball_attached = false + parent_ent.attached_squared_ball = nil + mobkit.clear_queue_low(parent_ent) + petz.ownthing(parent_ent) + self.object:remove() --remove the square ball + mobkit.clear_queue_low(parent_ent) + petz.ownthing(parent_ent) + end + end, + + on_step = function(self, dtime) + if self.shooter_name == "" then + if self.object:get_attach() == nil then + self.object:remove() + end + return + end + if self.waiting_for_removal then + self.object:remove() + return + end + local pos = self.object:get_pos() + self.old_pos = self.old_pos or pos + + local cast = minetest.raycast(self.old_pos, pos, true, false) + local thing = cast:next() + while thing do + if thing.type == "object" and thing.ref ~= self.object then + --minetest.chat_send_player("singleplayer", thing.type) + if not(thing.ref:is_player()) and not(thing.ref:get_player_name() == self.shooter_name) then + local thing_ent = thing.ref:get_luaentity() + if thing_ent then + --minetest.chat_send_player("singleplayer", thing_ent.type) + if (thing_ent.type == "puppy") and not(thing.ref.square_ball_attached) then + --minetest.chat_send_player("singleplayer", "test") + petz.attach_squareball(self, thing_ent, thing.ref, self.shooter_name) + return + end + end + end + elseif thing.type == "node" then + local name = minetest.get_node(thing.under).name + if minetest.registered_items[name].walkable then + local itemstack_squareball = ItemStack("petz:square_ball") + --local meta = itemstack_squareball:get_meta() + --meta:set_string("shooter_name", self.shooter_name) + minetest.item_drop(itemstack_squareball, + nil, vector.round(self.old_pos)) + self.waiting_for_removal = true + self.object:remove() + return + end + end + thing = cast:next() + end + self.old_pos = pos + end, +}) diff --git a/mods/petz/petz/api/api_tamagochi.lua b/mods/petz/petz/api/api_tamagochi.lua new file mode 100644 index 0000000..be21217 --- /dev/null +++ b/mods/petz/petz/api/api_tamagochi.lua @@ -0,0 +1,130 @@ +local S = ... + +-- +--The Tamagochi Mode +-- + +-- Increase/Descrease the pet affinity + +petz.calculate_affinity_change = function(rate) + if rate < 0 then --negative rates have a reduction factor + rate = rate - (rate * petz.settings.tamagochi_reduction_factor) + end + local max_affinity = 100 + local affinity_change = max_affinity * rate + return affinity_change +end + +petz.set_affinity = function(self, rate) + local new_affinity = petz.round(self.affinity + petz.calculate_affinity_change(rate)) + --minetest.chat_send_player(self.owner, tostring(new_affinity)) + if new_affinity > 100 then + new_affinity = 100 + elseif new_affinity < 0 then + new_affinity = 0 + end + self.affinity = mobkit.remember(self, "affinity", new_affinity) +end + +--The Tamagochi Timer + +petz.init_tamagochi_timer = function(self) + if petz.settings.tamagochi_mode and self.tamed and self.init_tamagochi_timer then + petz.timer(self) + return true + else + return false + end +end + +-- +--Tamagochi Mode Timer +-- + +petz.timer = function(self) + minetest.after(petz.settings.tamagochi_check_time, function() + if mobkit.is_alive(self) then + if (not(minetest.is_singleplayer())) and (petz.settings.tamagochi_check_if_player_online) then + if not minetest.player_exists(self.owner) then --if pet owner is not online + return + end + end + local pos = self.object:get_pos() + if not(pos == nil) then --important for if the pet dies + local pos_below = { + x = pos.x, + y = pos.y - 1.5, + z = pos.z, + } + local node = minetest.get_node_or_nil(pos_below) + --minetest.chat_send_player(self.owner, petz.settings.tamagochi_safe_node) + for i = 1, #petz.settings.tamagochi_safe_nodes do --loop thru all safe nodes + if node and (node.name == petz.settings.tamagochi_safe_nodes[i]) then + self.init_tamagochi_timer = true + mobkit.remember(self, "init_tamagochi_timer", self.init_tamagochi_timer) + return + end + end + else --if the pos is nil, it means that the pet died before 'minetest.after_effect' + self.init_tamagochi_timer = false + mobkit.remember(self, "init_tamagochi_timer", self.init_tamagochi_timer) --so no more timer + return + end + --Decrease health if pet has not fed + if not self.fed then + mokapi.set_health(self, -petz.settings.tamagochi_feed_hunger_rate) + petz.update_nametag(self) + if (self.hp > 0) and self.has_affinity then + petz.set_affinity(self, -petz.settings.tamagochi_feed_hunger_rate) + end + else + self.fed = false + mobkit.remember(self, "fed", self.fed) --Reset the variable + end + --If the pet has not brushed + if self.can_be_brushed then + if not(self.brushed) then + if self.has_affinity then + petz.set_affinity(self, -petz.settings.tamagochi_brush_rate) + end + else + self.brushed = false + mobkit.remember(self, "brushed", self.brushed) --Reset the variable + end + end + --If the petz is a lion had to been lashed + if self.type== "lion" then + if not self.lashed then + petz.set_affinity(self, -petz.settings.tamagochi_lashing_rate) + else + self.lashed = false + mobkit.remember(self, "lashed", self.lashed) + end + end + --If the pet starves to death + if self.hp <= 0 then + minetest.chat_send_player(self.owner, S("Your").. " "..self.type.." "..S("has starved to death!!!")) + self.init_tamagochi_timer = false -- no more timing + --If the pet get bored of you + elseif self.has_affinity and (self.affinity == 0) then + local msg = S("Your").." "..self.type.." "..S("has abandoned you!!!") + petz.abandon_pet(self, msg) + else --else reinit the timer, to check again in the future + self.init_tamagochi_timer = true + end + end + end, self) + self.init_tamagochi_timer = false --the timer is reinited in the minetest.after function +end + +petz.abandon_pet = function(self, msg) + if msg then + minetest.chat_send_player(self.owner, msg) + end + petz.delete_nametag(self) + mokapi.remove_owner(self) --the pet abandon you + petz.remove_tamed_by_owner(self, true) + petz.drop_dreamcatcher(self) + self.init_tamagochi_timer = false -- no more timing + self.for_sale = false -- not for sale +end diff --git a/mods/petz/petz/api/api_throw.lua b/mods/petz/petz/api/api_throw.lua new file mode 100644 index 0000000..bc48c2e --- /dev/null +++ b/mods/petz/petz/api/api_throw.lua @@ -0,0 +1,150 @@ +--effects can be: fire + +function petz.throw(self, dtime, damage, effect, particles, sound) + if self.shooter_name == "" then + if self.object:get_attach() == nil then + self.object:remove() + end + return + end + if self.waiting_for_removal then + self.object:remove() + return + end + local pos = self.object:get_pos() + self.old_pos = self.old_pos or pos + + local cast = minetest.raycast(self.old_pos, pos, true, false) + local thing = cast:next() + while thing do + if thing.type == "object" and thing.ref ~= self.object then + --minetest.chat_send_player("singleplayer", thing.type) + local thing_ent = thing.ref:get_luaentity() + if not(thing.ref:is_player()) or (thing.ref:is_player() and not(thing.ref:get_player_name() == self.shooter_name)) then + local ent_pos + if thing.ref:is_player() then + thing.ref:punch(thing.ref, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy=damage}}, nil) + ent_pos = thing.ref:get_pos() + if sound then + mokapi.make_sound("player", thing.ref, sound, petz.settings.max_hear_distance) + end + else + mobkit.hurt(thing_ent, damage) + ent_pos = thing.ref:get_pos() + if sound then + mokapi.make_sound("object", thing.ref, sound, petz.settings.max_hear_distance) + end + end + if effect then + if effect == "cobweb" then + minetest.set_node(ent_pos, {name = "petz:cobweb"}) + end + end + if particles then + petz.do_particles_effect(nil, pos, particles) + end + self.waiting_for_removal = true + self.object:remove() + return + end + elseif thing.type == "node" then + local node_pos = thing.above + local node = minetest.get_node(node_pos) + local node_name = node.name + --minetest.chat_send_player("singleplayer", node.name) + if minetest.registered_items[node_name].walkable and minetest.registered_items[node_name] ~= "air" then + if effect then + if effect == "fire" then + local pos_above = { + x = node_pos.x, + y = node_pos.y +1, + z = node_pos.z, + } + local node_above = minetest.get_node(pos_above) + if minetest.get_item_group(node_name, "flammable") > 1 + and not minetest.is_protected(node_pos, "") then + minetest.set_node(node_pos, {name = "fire:basic_flame"}) + end + if node_above.name == "air" then + --if minetest.get_node(pos_above).name == "air" then + petz.do_particles_effect(nil, pos_above, "fire") + --end + end + mokapi.make_sound("pos", node_pos, "petz_firecracker", petz.settings.max_hear_distance) + elseif effect == "cobweb" then + local pos_above = { + x = node_pos.x, + y = node_pos.y +1, + z = node_pos.z, + } + local node_above = minetest.get_node(pos_above) + if node_above.name == "air" then + minetest.set_node(pos_above, {name = "petz:cobweb"}) + end + end + end + self.waiting_for_removal = true + self.object:remove() + return + end + end + thing = cast:next() + end + self.old_pos = pos +end + +function petz.spawn_throw_object(user, strength, entity) + local pos = user:get_pos() + if user:is_player() then + pos.y = pos.y + 1.5 -- camera offset + end + --minetest.chat_send_player("singleplayer", tostring(pos)) + local obj = minetest.add_entity(pos, entity) + if not obj then + return + end + local dir + local yaw + local user_name + if user:is_player() then + yaw = user:get_look_horizontal() + dir = user:get_look_dir() + user_name = user:get_player_name() + else + yaw = user:get_yaw() + dir = minetest.yaw_to_dir(yaw) + user_name = user:get_luaentity().type + end + --minetest.chat_send_player("singleplayer", "test") + obj:get_luaentity().shooter_name = user_name + obj:set_yaw(yaw - 0.5 * math.pi) + obj:set_velocity(vector.multiply(dir, strength)) + return true +end + +function petz.register_throw_entity(name, textures, damage, effect, particles, sound) + minetest.register_entity(name, { + hp_max = 4, -- possible to catch the arrow (pro skills) + physical = false, -- use Raycast + collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1}, + visual = "wielditem", + textures = {textures}, + visual_size = {x = 1.0, y = 1.0}, + old_pos = nil, + shooter_name = "", + parent_entity = nil, + waiting_for_removal = false, + + on_activate = function(self) + self.object:set_acceleration({x = 0, y = -9.81, z = 0}) + end, + + on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir) + return false + end, + + on_step = function(self, dtime) + petz.throw(self, dtime, damage, effect, particles, sound) + end, + }) +end diff --git a/mods/petz/petz/api/api_wagon.lua b/mods/petz/petz/api/api_wagon.lua new file mode 100644 index 0000000..f2e2ace --- /dev/null +++ b/mods/petz/petz/api/api_wagon.lua @@ -0,0 +1,24 @@ +-- +--Wagon API +-- + +petz.put_wagon = function(self, clicker) + if self.wagon then --already a put wagon + return + end + local pos = self.object:get_pos() + local rotation = self.object:get_rotation() + local wagon_obj = minetest.add_entity(pos, "petz:wagon", nil) + wagon_obj:set_attach(self.object, "", {x = 0, y = 0.0, z = 0}, rotation) + mokapi.make_sound("object", self.object, "petz_pop_sound", petz.settings.max_hear_distance) + wagon_obj:set_properties({ + visual_size = { + x =1, + y = 1, + }, + }) + self.wagon = wagon_obj + local wielded_item = clicker:get_wielded_item() + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) +end diff --git a/mods/petz/petz/api/api_whistle.lua b/mods/petz/petz/api/api_whistle.lua new file mode 100644 index 0000000..d88187b --- /dev/null +++ b/mods/petz/petz/api/api_whistle.lua @@ -0,0 +1,95 @@ +local S = ... + +-- Whistle Item + +minetest.register_craftitem("petz:whistle", { + description = S("Pet Whistle"), + inventory_image = "petz_whistle.png", + groups = {}, + on_use = function (itemstack, user, pointed_thing) + local user_name = user:get_player_name() + local user_pos = user:get_pos() + minetest.show_formspec(user_name, "petz:form_whistle", petz.create_form_list_by_owner(user_name, user_pos)) + end, +}) + +minetest.register_craft({ + type = "shaped", + output = 'petz:whistle', + recipe = { + {'', '', ''}, + {'', 'petz:ducky_feather', ''}, + {'', 'default:steel_ingot', ''}, + } +}) + +petz.create_form_list_by_owner = function(user_name, user_pos) + --Get the values of the list + local item_list_table = petz.tamed_by_owner[user_name] + if item_list_table then + if #item_list_table <= 0 then + minetest.chat_send_player(user_name, "You have no pets with a name to call.") + return '' + end + local item_list = "" + for key, pet_table in ipairs(item_list_table) do + local pet = pet_table.pet + if mobkit.is_alive(pet) and not(petz.str_is_empty(pet.tag)) then -- check if alive + local pet_type = pet.type:gsub("^%l", string.upper) + local pet_pos = pet.object:get_pos() + local distance, pet_pos_x, pet_pos_y, pet_pos_z + if pet_pos then + distance = tostring(petz.round(vector.distance(user_pos, pet_pos))) + pet_pos_x = tostring(math.floor(pet_pos.x+0.5)) + pet_pos_y = tostring(math.floor(pet_pos.y+0.5)) + pet_pos_z = tostring(math.floor(pet_pos.z+0.5)) + else + pet_pos_x = "X" + pet_pos_y = "Y" + pet_pos_z = "Z" + distance = "too far away" + end + item_list = item_list .. minetest.colorize("#EE0", pet.tag).." | " .. S(pet_type) .. " | ".. "Pos = (".. pet_pos_x .. "/" + .. pet_pos_y .. "/".. pet_pos_z ..") | Dist= "..distance.."," + end + end + local form_list_by_owner = + "size[6,8;]".. + "image[2,0;1,1;petz_whistle.png]".. + "textlist[0,1;5,6;petz_list;"..item_list..";selected idx]".. + "button_exit[2,7;1,1;btn_exit;"..S("Close").."]" + return form_list_by_owner + else + return '' + end +end + +--On receive fields +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "petz:form_whistle" then + return false + end + if fields.petz_list then + local player_name = player:get_player_name() + local event = minetest.explode_textlist_event(fields.petz_list) + local pet_index = event.index + if not petz.tamed_by_owner[player_name][pet_index] then + return + end + local pet = petz.tamed_by_owner[player_name][pet_index].pet + --minetest.chat_send_player("singleplayer", "test1") + if pet then + --minetest.chat_send_player("singleplayer", "test2") + local pos_front_player = petz.pos_front_player(player) + local pet_pos = { + x = pos_front_player.x, + y = pos_front_player.y + 1, + z = pos_front_player.z, + } + pet.object:set_pos(pet_pos) + minetest.close_formspec(player_name, "petz:form_whistle") + mokapi.make_sound("player", player, "petz_whistle", petz.settings.max_hear_distance) + end + end + return true +end) diff --git a/mods/petz/petz/api/api_wool_milk.lua b/mods/petz/petz/api/api_wool_milk.lua new file mode 100644 index 0000000..f7d8d43 --- /dev/null +++ b/mods/petz/petz/api/api_wool_milk.lua @@ -0,0 +1,101 @@ +--- +---Refill lamb or milk +--- + +local S = ... + +petz.refill = function(self) + if self.type == "lamb" then + petz.lamb_wool_regrow(self) + elseif self.milkable then + petz.milk_refill(self) + end +end + +-- +--Lamb Wool +-- + +petz.lamb_wool_regrow = function(self) + if not self.shaved then --only count if the lamb is shaved + return + end + local food_count_wool = self.food_count_wool + 1 + self.food_count_wool = mobkit.remember(self, "food_count_wool", food_count_wool) + if self.food_count_wool >= 5 then -- if lamb replaces 5x grass then it regrows wool + self.food_count_wool = mobkit.remember(self, "food_count_wool", 0) + self.shaved = mobkit.remember(self, "shaved", false) + local lamb_texture = "petz_lamb_"..self.skin_colors[self.texture_no]..".png" + petz.set_properties(self, {textures = {lamb_texture}}) + end +end + +petz.lamb_wool_shave = function(self, clicker) + local inv = clicker:get_inventory() + local color + if not(self.colorized) then + color = self.skin_colors[self.texture_no] + else + color = self.colorized + self.colorized = mobkit.remember(self, "colorized", nil) --reset the color + end + local new_stack = "wool:".. color + if inv:room_for_item("main", new_stack) then + inv:add_item("main", new_stack) + else + minetest.add_item(self.object:get_pos(), new_stack) + end + mokapi.make_sound("object", self.object, "petz_lamb_moaning", petz.settings.max_hear_distance) + local lamb_texture = "petz_lamb_shaved_"..self.skin_colors[self.texture_no]..".png" + petz.set_properties(self, {textures = {lamb_texture}}) + self.shaved = mobkit.remember(self, "shaved", true) + self.food_count_wool = mobkit.remember(self, "food_count_wool", 0) + petz.bh_afraid(self, clicker:get_pos()) + mokapi.make_sound("object", self.object, "petz_pop_sound", petz.settings.max_hear_distance) +end + +--- +--Calf Milk +--- + +petz.milk_refill = function(self) + self.food_count = self.food_count + 1 + mobkit.remember(self, "food_count", self.food_count) + if self.food_count >= 5 then -- if calf replaces 5x grass then it refill milk + self.food_count = mobkit.remember(self, "food_count", self.food_count) + self.milked = mobkit.remember(self, "milked", false) + end +end + +petz.milk_milk = function(self, clicker) + if self.is_male then + minetest.chat_send_player(clicker:get_player_name(), S("Milk only female animals!")) + return + end + local inv = clicker:get_inventory() + local wielded_item = clicker:get_wielded_item() + wielded_item:take_item() + clicker:set_wielded_item(wielded_item) + if inv:room_for_item("main", "petz:bucket_milk") then + inv:add_item("main","petz:bucket_milk") + mokapi.make_sound("object", self.object, "petz_"..self.type.."_moaning", petz.settings.max_hear_distance) + else + minetest.add_item(self.object:get_pos(), "petz:bucket_milk") + end + self.milked = mobkit.remember(self, "milked", true) +end + +--- +--Cut a feather +--- +petz.cut_feather = function(self, clicker) + local inv = clicker:get_inventory() + local item_stack= "petz:ducky_feather" + if inv:room_for_item("main", item_stack) then + inv:add_item("main", item_stack) + else + minetest.add_item(self.object:get_pos(), item_stack) + end + mokapi.make_sound("object", self.object, "petz_"..self.type.."_moaning", petz.settings.max_hear_distance) + petz.bh_afraid(self, clicker:get_pos()) +end diff --git a/mods/petz/petz/awards.lua b/mods/petz/petz/awards.lua new file mode 100644 index 0000000..3f46729 --- /dev/null +++ b/mods/petz/petz/awards.lua @@ -0,0 +1,15 @@ +awards.register_trigger("milk", { + type = "custom", + progress = "@1/@2 buckets of milk", + auto_description = { "Do a foo", "Foo @1 times" }, +}) + +--minetest.register_on_milk(function() + --for _, trigger in pairs(awards.on.milk) do + + + --if condition then + --awards.unlock(trigger) + --end + --end +--end) diff --git a/mods/petz/petz/docs/.gitignore b/mods/petz/petz/docs/.gitignore new file mode 100644 index 0000000..ca35be0 --- /dev/null +++ b/mods/petz/petz/docs/.gitignore @@ -0,0 +1 @@ +_site diff --git a/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 b/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 new file mode 100644 index 0000000..7abda10 --- /dev/null +++ b/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 @@ -0,0 +1 @@ +I"{"source"=>"/opt/minetest/games/bogart/mods/petz/petz/docs", "destination"=>"/opt/minetest/games/bogart/mods/petz/petz/docs/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>["README.md", ".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>"1..6", "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"Bogart Game", "tag_text"=>"Bogart Game", "description"=>"A responsive template for publishing single-page websites, articles that are easy on the eyes", "url"=>"http://localhost:4000", "font-awesome-include"=>true, "livereload_port"=>35729, "serving"=>true, "watch"=>true}:ET \ No newline at end of file diff --git a/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/18/fdf3ecdd6210f00b42be9367b1472cce6d2e3834bd2c1ece96011ee0063f5a b/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/18/fdf3ecdd6210f00b42be9367b1472cce6d2e3834bd2c1ece96011ee0063f5a new file mode 100644 index 0000000..1eaab2c --- /dev/null +++ b/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/18/fdf3ecdd6210f00b42be9367b1472cce6d2e3834bd2c1ece96011ee0063f5a @@ -0,0 +1,543 @@ +I"b

Logo

+ +

Items

+ +

Are you tired of ugly mobs? Do you like the kawaii world and taste? +The PetZ are here now for you!

+ +

Mobs

+

Kitty

+

Kitty

+
    +
  • It avaliable in 6 colors.
  • +
+ +

Puppy

+

Puppy

+
    +
  • 3 colors.
  • +
+ +

Duckies

+

Ducky

+
    +
  • Three types: Yellow, Black and Mallard.
  • +
  • Peaceful and dumb animal.
  • +
  • They can put duck eggs from time to time.You can tame it but not give it any order.
  • +
  • You can breed ducks creating a nest with an egg inside, optionally you can leave an empty nest near a ducky so it lay an egg.
  • +
  • It drops feathers when killed.
  • +
  • You can fry the eggs.
  • +
  • Fried egg and bacon: A fried egg plus a porkchop.
  • +
+ +

Beaver

+

Beaver +Behaviour:

+
    +
  • It lives near water (in rivers in the case of valleys mapgen).
  • +
  • It can be tamed.
  • +
  • It can walk, swim and dive underwater.
  • +
  • It drops Beaver Fur to create Beaver Oil when killed.
  • +
  • It got a chance of create an unique dam on the coast or river.
  • +
  • You can spread beaver oil on your pet skin. In tamagochi mode your pet will be happy, but the fact of not do it it is not mandatory for it to be sad.
  • +
+ +

Lamb

+

Lamb +In 3 colors: White (common), grey & dark gray (rare) and brown (very rare).

+
    +
  • Lambs eat grass.
  • +
  • You can get Wool with the Shears (right click).
  • +
  • To wool to regrow feed your lamb or let it eats grass.
  • +
  • Lambs runaway from player, tame them with some wheat.
  • +
  • Predators: Wolf & Lion.
  • +
+ +

Lion

+

Lion

+
    +
  • It lives in the Savanna. Wild animal. Dangerous.
  • +
  • It likes raw meat.
  • +
  • Can be tamed and give it orders with meat or a Whip (3 lashings to tame) +In Tamagochi Mode:
  • +
  • You have to lash your lion in 48h or it lost affinitty with you.
  • +
  • Be careful, if you lost your lion as pet, it will attack you!
  • +
  • Preys: Lambs, piggies and ponies.
  • +
+ +

Calf

+

Calf

+
    +
  • Available in three skins.
  • +
  • It eats grass from time to time, like the lambs.
  • +
  • It drops Leather when killed.
  • +
  • It can be milked with an empty bucket.
  • +
  • In order the calf to have more milk, you have to feed it or let it to eat some grass.
  • +
  • Milk is drinkable.
  • +
  • Put a bucket of milk in the oven to get Cheese.
  • +
  • Predators: Calf.
  • +
+ +

Panda

+

Panda

+
    +
  • Panda is tamable and loves papyrus.
  • +
+ +

Frog

+

Frog

+
    +
  • Frog is a semiaquatic animal. It loves fireflies to eat’em. It drops a leg that you can cook in order to get a Roasted Frog Leg (food).
  • +
+ +

Grizzly

+

Grizzly

+
    +
  • Not a Teddy Bear, but a wild one. It lives in woods. It’s tamable like the lion.
  • +
  • Preys: Lamb.
  • +
+ +

Pony

+

Pony

+
    +
  • You can mount it with a Saddle and get a ride.
  • +
  • You can give it orders.
  • +
  • The Saddle can be cut with the Shears.
  • +
  • Ponies are slow where you ride them. You can breeding them to get stronger and fastest ones.
  • +
  • Predators: Lion.
  • +
+ +

Parrot

+

Parrot

+
    +
  • Five species.
  • +
  • Tamable and you can give it orders.
  • +
  • It loves wheat seeds.
  • +
  • It lives naturally in the jungle.
  • +
  • You can order it to alight and to fly again.
  • +
  • It can drop Raw Parrot meat which it can be cooked.
  • +
  • You can put your parrot on your shoulder (2 minutes max.).
  • +
  • You can put your parrot on a Bird Stand.
  • +
+ +

Chicken

+

Chicken

+
    +
  • Farm Animal.
  • +
  • It can lay Chicken Eggs like the duckies.
  • +
  • It drops Raw Chicken to cook it as food.
  • +
  • Get Chicken Legs with Raw Chichen.
  • +
  • Put a lot of Roasted Chicken Legs into a bucket, to get a super-delicious bucket of Chicken Legs.
  • +
+ +

Pigeon

+

Pigeon

+
    +
  • Flying bird.
  • +
+ +

Chimp

+

Chimp

+
    +
  • Agile monkey.
  • +
  • Arboreal mob: It can climb trees, wood and leaves.
  • +
  • It loves blueberries.
  • +
+ +

Piggy

+

Piggy

+
    +
  • It’s a source of meat.
  • +
  • It drops Porkchop to being cooked.
  • +
  • Predators: Lion.
  • +
+ +

Turtle

+

Turtle

+
    +
  • Semiaquatic mob.
  • +
  • It eats kelps.
  • +
  • It has a chance of drop its shell.
  • +
+ +

Fishes

+

Clownfish +Tropical Fish +Clownfish & Tropical Fish

+
    +
  • It lives close to a coral reef.
  • +
  • It loves orange coral (clownfish) or brown coral (tropical fish).
  • +
  • It can be captured and put into a fish tank.
  • +
  • It suffocates when outside water.
  • +
  • In tamagochi mode you have only to feed it, but no if it is in a fish tank.
  • +
+ +

Wolf

+

Wolf

+
    +
  • Wild animal.
  • +
  • Run away from players til players attack them, then agressive.
  • +
  • Tamable in the same way as lion.
  • +
  • Preys: Lambs.
  • +
  • Wolves can be turned into puppies: Tame the wolf with a whip, then feed it with bones (until 5, configurable in petz.conf).
  • +
+ +

Moth

+

Moth

+
    +
  • It spawns only at night in the coniferous forest.
  • +
  • It dies when daylight comes, unless it would be in a dark place for protection, i.e. a cave or a closed box. It needs some obscurity, not a totally dark place.
  • +
  • A moth can be captured with an empty glass bottle. Deco item. If you break the bottle, the moth liberates.
  • +
+ +

Silkworm

+

Silkworm

+
    +
  • It spawn naturally on coniferous forests.
  • +
  • It eats all kind of leaves.
  • +
  • You can produce Silk (see below).
  • +
+ +

Camel

+

Camel

+
    +
  • It lives in deserts.
  • +
  • It eats dry shrub.
  • +
  • Predator: Lion
  • +
  • Milkable.
  • +
  • You can breed them. Baby camels. Genetics. Mutation: White Camel.
  • +
  • Mountable with a saddle; Get a ride in the desert!
  • +
  • You can put a Saddlebag on it (right click): You gain access to the Saddlebag Inventory (16 items máx.), in the form -> click on the icon of the Saddlebag.
  • +
  • Each camel has its own separated saddlebag inventory.
  • +
  • The inventory of the saddlebag is permanent. You got it even after server restarts.
  • +
  • If the camel died, the inventory of the saddlebag will drop.
  • +
  • If you captured a camel, the saddlebag with the inventory too.
  • +
  • You can put together the saddle and the saddlebag. But on right click you will mount it. To access to the inventory of the saddlebag use the shears to quit both items. Then put a saddlebag only.
  • +
+ +

Bat

+

Bat

+
    +
  • Spawn in interiors (caves)
  • +
  • If spawned outside, only at night, and when sunrise dies.
  • +
  • It eats and follows fireflies.
  • +
+ +

Hamster

+

Hamster

+
    +
  • It lives in deserts.
  • +
  • 6 colors.
  • +
  • Breed them.
  • +
  • Mutation: Pink Hamster.
  • +
+ +

Dolphin

+

Dolphin

+
    +
  • It lives in oceans.
  • +
+ +

Toucan

+

Toucan +-It lives in the jungle. +-It eats apples. +-Tamable. You can put it in a bird stand.

+ +

Bee

+

Bee

+
    +
  • Flying insect.
  • +
  • It lives in behives and stays close to them.
  • +
  • It produces honey. It searches for flowers to get the pollen and then return to the behive.
  • +
  • Two types: Queen and workers (normal).
  • +
  • All the bees return to their behive at night and go out at the morning, except the Queen Bee that can fly 24 hours.
  • +
  • All the bees need belong to a behive. If their behive is destroyed, all the bees will die. Only the Queen Bees do not need a behive to survive.
  • +
  • Worker Bees do not spawn naturally.
  • +
  • Queen Bees can spawn and create one colony (behive) in wood or leaves.
  • +
  • Bees can drop pollen and/or a sting.
  • +
+ +

Things you can with Petz

+
    +
  • Configure the models as “mesh” (by default) or “cubic” (nodebox, no animated, no too laggy) via the ‘petz.conf’
  • +
  • Configure the mob API: Only “mobs_redo” by now via ‘petz.conf’.
  • +
  • Configure the following food (aka food to health) it via ‘petz.conf’. Use right click.
  • +
  • Give it orders: follow you or stand: Right click if you are the owner.
  • +
  • Configure if they spawn in the map via ‘petz.conf’.
  • +
  • Your pet can be tamed and captured.
  • +
  • Internationalization support.
  • +
  • Spawn Eggs.
  • +
+ +

NodeboxEditor (.nbe) and Blender (.blend) models included.

+ +

Licenses

+
    +
  • Models, icons and textures by runs. GPL3 Feel free to use it.
  • +
  • Sounds: Check the ‘license.md’ file inside the ‘sounds’ folder.
  • +
+ +

Depends

+

default, mobs, stairs, dye, vessels, wool

+ +

Optional

+

bonemeal

+ +

Tamagochi Mode

+

If this mode is activated (true by default) you have to take care of your pet. The pet will have two stats: Love and Hunger. If those stats go down to 0, your pet abandon you or will starve.

+ +

In multiplayer games (servers) the Tamagochi Mode is paused if the pet owner is offline.

+ +

Feed it!

+

-You have to feed your pet once each 2 days at least (Minetest time) (right click wielding its food) (the food is configurable via petz.conf). Your pet then would be happy. Check your pet status (right click), if “Hungry” feed it, but if ‘Satiated’ then don’t bother. If you do not feed your pet every 48 hours, its health would damaged and it would be sad. +This does not apply if your pet is inside its kennel.

+ +

Brush it!

+

Brush +You have to brush your pet once each 2 days at least, or it will be sad. Firstly create a hairbrush with two wood sticks and one string. +This does not apply if your pet is inside its kennel.

+ +

Lash it!

+

Lash +In the case of a lion or grizzly, you have to lash it with a whip once each 2 days at least in order to control it. +Do not use the whip with another petz!

+ +

Polish it!

+

Beaver Oil +You can spread beaver oil on your pet skin. In tamagochi mode your pet will be happy, but the fact of not do it it is not mandatory for it to be sad.

+ +

Also keep in mind that:

+
    +
  • If you don’t feed your pet in 8 days will die (configurable).
  • +
  • If you punch your pet, it gets unhappy.
  • +
  • If your pet is unhappy, it could abandon you.
  • +
  • If your pet is inside its kennel, it’ll be well cared for and happy and won’t starve. But close the door!
  • +
+ +

Notes

+
    +
  • You can configure the time when your pet is checked in ‘pet.conf’. 2400 by default (2 days).
  • +
  • In a singleplayer game the pet stats remain intact between restarts.
  • +
  • You can configure the node over where your pet is safe (no hunger) in ‘pet.conf’. So you can do your our kennels.
  • +
  • The Tamagochi Mode is paused for pet owners in multiplayer games (servers) when they are offline.
  • +
+ +

Pet Bowl

+

Pet Bowl +Make a house to your pet and put a Pet Bowl. The pet will stand near it.

+ +

Kennel

+

Kennel +A schematic. Simply make a hole and punch inside it. You can put your pet inside after capture it. For creative mode only. +In there your dog will be well cared for and you won’t have to worry about its health.

+ +

Ducks/Chicken Farm

+

Ducks/Chicken Farm +You can breed ducks or chickens via its eggs:

+
    +
  • Create a empty nest and put an egg inside (right click), optionally you can create a nest with an already egg inside. Await for the egg to hatch into a new ducky or chicken.
  • +
  • Also if a ducky or chicken has an empty nest near, it can lay an egg on it.
  • +
  • You can extract the egg from a nest (right-click on the nest).
  • +
+ +

Capture Petz

+

Use the followig items to capture a petz:

+
    +
  • MobsRedo Net and Default Bug Net for Frog, Chicken, Kitty, Parrot, Pigeon, Ducky, Beaver, Clownfish, Monkey and Turtle.
  • +
  • MobsRedo Lasso for Calf, Lion, Puppy, Piggy, Lamb, Panda, Grizzly and Pony.
  • +
+ +

Capture Mechanics:

+
    +
  • To capture a pet (i.e. kitty) you have to own it. But to to capture a no pet (i.e. frog) you can capture it directely.
  • +
  • To own a pet you have to tame it.
  • +
  • To tame a pet you have to feed it with its favourite food 5 times. Or lash it in the case of the lion and grizzly.
  • +
  • You cannot capture the pets of other players by default. To allow to rob pets change the setting ‘rob_mobs’ in ‘petz.conf” file.
  • +
+ +

Beaver Dam

+

Beaver Dam +The beaver’s home

+ +

Fish Tank

+

Fish Tank

+
    +
  • Put your fish inside (right-click)
  • +
  • Recover your fish with the Bug Net (right click) or breaking it.
  • +
  • You can connect several fish tank nodes to build bigger tanks and add more fishes (one by node).
  • +
+ +

Pony/camel Breeding

+

Baby PonyPony Breeding

+
    +
  • Ponies/camels can be male or female. Check its gender right clicking on them.
  • +
  • Each animal has its own velocity forward, velocity backward and acceleration. You can read its characteristics with the format “1/1/1” where the numbers represent these 3 characteristics.
  • +
  • Create a Glass Syringe.
  • +
  • Use (right-click) the syringe on a male animal to get its germ.
  • +
  • Use (right-click) the syringe with germ on a female animal. The animal will be pregnant.
  • +
  • Right click on a pregnant female animal to check its pregnancy status.
  • +
  • After 2 days (configurable) a little baby will born with a mixture of gens, from its father and its mother.
  • +
  • Baby ponies/camels cannot be ridered.
  • +
  • After 2 days (configurable) the baby will get to adult.
  • +
  • You should select the best parent ponies to get better descendency (fastest ponies/camels) when breeding.
  • +
  • You can breed any animal even if you do not own it. But the owner of the babies will be the mother’s owner.
  • +
  • The male germ is unlimited but a female pony/camel only can give birth 5 babies máx. After those 5 babies, the mommy turn into infertile.
  • +
+ +

The method of breeding

+
    +
  • 1/2/3 means a velocity of 1 for forward, 2 for backward and 3 is the acceleration. So the first number of the triad is the most important.
  • +
  • Naturally spawned ponies/camels have speed statistics from 1/1/1 to 4/4/4. This means that spawned ponies/camels are slow animals (40% of the speed limit in the best case).
  • +
  • The hypothetical faster pony would be a 10/10/10. You have to breed the natural ponies/camels to achieve faster ones.
  • +
  • Keep in mind that even fast parents can procreate a slow child. So you’ll have to breed several times to get an optimal child.
  • +
  • The method is to breed parents with high speed statistics to get the best descendants, then select the fastest descendants to continue breeding them. This is a very slow process. Be patient.
  • +
+ +

Square Ball

+

Square Ball

+
    +
  • Make a Square Ball.
  • +
  • Throw it to your puppy. You have to hit the target.
  • +
  • Your puppy bring back the square ball to you.
  • +
  • To get the ball, right click on it.
  • +
+ +

Recipes

+

Recipes

+
    +
  • Blueberry Cheese Cake = Blueberries, wheat, cheese and egg.
  • +
  • Blueberry Ice Cream: Blueberries, wheat, milk, 2 eggs and 2 snows = 3 ice creams.
  • +
  • Blueberry Muffin: Blueberries, 2 wheat, milk, 2 eggs and paper = 8 muffins.
  • +
+ +

Lamb, Hamster, Panda and Elephant Breed

+

You can get baby lambs, hamsters and elefants. +1) Those petz could be male/female. Right-click on them to check its gender. +2) Get blueberries. (configurable in petz.conf) +3) Use (right-click) blueberries with the petz to heat them. +4) When a rut male petz found a oestrus female (close), she get pregnant. +5) Affer one day a baby will born. +6) Genetics: The baby will inherit the color from its parents. From dominant to recessive genes: white, gray, dark gray and brown in the case of lambs. This means: white color is the most common, parents both white could have a child of any color, if both brown all their descendants will be brown, etc. +6) The little petz will grown in one day.

+ +

Mutation! Vanilla lamb | White Elephant!

+

Mutation +Also petz can suffer from a very rare mutation in its genes when spawn or breed, in a 1:200 ratio.

+
    +
  • You can get a Vanilla Lamb and ‘vanilla wool’ new item.
  • +
  • You can get a white elephant.
  • +
+ +

Dreamcatcher

+

Dreamcatcher +Dreamcatcher amulet for your petz! Protect them!

+
    +
  • Craftable with: wood, strings and ducky feathers.
  • +
  • To put it: Right click with it on a pet you own.
  • +
  • Now your pet will be protected against other players attacks. But you can still hurt it.
  • +
  • To remove the Dreamcatcher from your pet: Right click on your pet and click on the Dreamcatcher image. Another option is to kill your pet, it will drop the dreamcatcher.
  • +
+ +

Whistle

+

Whistle +Call your petz anywhere it is.

+
    +
  • Put names to pets you want to call.
  • +
  • Use a Whistle: A list of pets with name and of your own will appear.
  • +
  • Click on the pet to call it.
  • +
+ +

Orders

+

You can give orders to tamed petz.

+
    +
  • Stand here: It stands fixed at the current pos.
  • +
  • Follow: It will follow you.
  • +
  • Guard: Wild animals (lion & grizzly) will attack any player close them, but not you.
  • +
  • Fly, Alight: For birds.
  • +
+ +

Bird Stand

+

Birstand Item +Birstand

+
    +
  • Capture your parrot with the Bug Net.
  • +
  • Put it on the bird stand (right-click)
  • +
+ +

Barn

+

Barn +Do create livestocks with the aid of fences.

+ +

Silk Farm

+

Silk Stuff

+
    +
  • You can get cocoons. A cocoon is silk indeed.
  • +
  • Also you can capture or breed moths/silkworns to make a Silk Farm.
  • +
  • Create a closed facility. Create a bed of leaves. Put inside some moths and/or silkworms. The moths will lay eggs and silkworms will turn into cocoons (be care: they will eat the leaves too).
  • +
+ +

Spinning Wheel

+

Spinning Wheel

+
    +
  • Create a Spinning Wheel to get Silk Bobbins. Its a one node size item, so put on a node-table.
  • +
+ +

Instructions to craft a Spinnig Wheel:

+
    +
  • A previous bobbin has to be created by hand (3 sticks and 6 silkworm coccons)
  • +
  • You have to note that making bobbins by hand is more expensive (the double) than in the spinning wheel.
  • +
  • The first time your place a Spinning Wheel, that bobbin is already incorporated, only you have to add two more.
  • +
+ +

Instructions to use:

+
    +
  • You need to put in the Spinning Wheel (right-click) 3 Silkworns Cocoons. Then a Silk Bobbin will be created. Right-click again to get the bobbin.
  • +
+ +

Prince Armor

+

Prince Armor Stuff +Prince Armor

+
    +
  • It requires the 3D Armor mod!
  • +
  • You can create a super expensive and exquisite Prince Armor thanks to silk.
  • +
+ +

Honey Farm

+

Honey Stuff

+
    +
  • The limit of honey by behive is 10 (max_honey_behive setting in petz.conf).
  • +
  • You can collect honey from a behive with an empty bottle (right click).
  • +
  • You can eat the honey. Honey is very powerful in order to recover your health.
  • +
  • Each behive contains three bees (max_bees_behive in petz.conf). A artificially created behive only one.
  • +
  • Bees go out the behive to get pollen, but only if the honey in their behive is below 10. Then they return to their behive to create honey.
  • +
  • If you destroy a behive all their bees will die. Six honeycomb will be dropped.
  • +
  • You can create a behive with 6 honeycombs and one captured worker bee.
  • +
  • Player created behives only will have one bee when placed. But you can add more captured bees to a behive (right click) till the limit. Be care: If you put manually a new bee on a behive and the limit is reached, a bee that would be out when come back will die when entering the behive, in order the limit being respected.
  • +
  • If you put an igniter or a torch below a behive (til 4 nodes), the bees inside will go out.
  • +
  • You can get Beeswax cooking Honeycombs.
  • +
  • You can get Beeswax Candles crafting Beewax with a string.
  • +
  • Trick: Put some flowers surrounding the behive to start the production of honey.
  • +
  • Trick: Point to a behive to known its statistics about the honey and bees (currently inside).
  • +
+ +

Note: Take into account that if there are flowers close the behive a bee will go to them to collect pollen and inmediatelly will return back to the behive. If you want to see bees flying surrounding the behive, the behive should be full of honey so the bees can go for a walk far away. Also bees remain inside the behive at night.

+ +

Settings

+
    +
  • Max honey by behive. +max_honey_behive = 10 (by default)
  • +
  • Max bees in a behive. +max_bees_behive = 3 (by default)
  • +
  • Outing rate: A “bee_outing_ratio=1” means that a bee inmediatelly go out the behive for pollen +bee_outing_ratio = 20 (by default) +Note: Take into account that if there are flowers close the behive a bee will go to them to collect pollen and inmediatelly will return back to the behive. If you want to see bees flying surrounding the behive, the behive should be full of honey so the bees can go for a walk far away. Also bees remain inside the behive at night.
  • +
  • Initial honey behive: It indicates the initial honey amount on a created behive. +initial_honey_behive = 3 (by default)
  • +
+ +

Bonemeal

+
    +
  • Install the bonemeal mod and convert your petz bones into fertilizer to grown plants faster.
  • +
+:ET \ No newline at end of file diff --git a/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/56/860857807bf37a1ed332e5232478b8680b1630697121d4dba0d27a045eebf1 b/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/56/860857807bf37a1ed332e5232478b8680b1630697121d4dba0d27a045eebf1 new file mode 100644 index 0000000..f60f711 --- /dev/null +++ b/mods/petz/petz/docs/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/56/860857807bf37a1ed332e5232478b8680b1630697121d4dba0d27a045eebf1 @@ -0,0 +1,25 @@ +I"3

A Minecraft style game. Do construct with blocks. Play online. Fun!

+ +
    +
  • An open world to interact to.
  • +
  • Game modes: Creative & Survival.
  • +
  • Make your dreamed constructions.
  • +
  • Farming.
  • +
  • Animals to tame & monsters to kill.
  • +
  • Play online through servers around the whole world.
  • +
  • License: LGPL 2.1+. Share the game with your friends/family and do not care about licenses!
  • +
  • Engine: Minetest
  • +
  • Languages: English/Spanish/Plus other.
  • +
  • Platforms: Windows/Linux/Android
  • +
+ +

Download

+ +
    +
  • +
+ +

Mods

+ +

Petz

+:ET \ No newline at end of file diff --git a/mods/petz/petz/docs/404.html b/mods/petz/petz/docs/404.html new file mode 100644 index 0000000..c295e9c --- /dev/null +++ b/mods/petz/petz/docs/404.html @@ -0,0 +1,7 @@ +--- +layout: default +--- + +## No such thing as that, sorry + +Page Not Found. diff --git a/mods/petz/petz/docs/LICENSE b/mods/petz/petz/docs/LICENSE new file mode 100644 index 0000000..09f44a1 --- /dev/null +++ b/mods/petz/petz/docs/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Shu Uesugi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/mods/petz/petz/docs/README.md b/mods/petz/petz/docs/README.md new file mode 100644 index 0000000..e885603 --- /dev/null +++ b/mods/petz/petz/docs/README.md @@ -0,0 +1,5 @@ +This is as Jekyll theme built to make single page websites, articles, or literary masterpieces readable anywhere. + +### [Demo and Documentation](https://adueck.github.io/good-clean-read) + +Built on top of Solo, by [Shu Uesugi](https://github.com/chibicode) diff --git a/mods/petz/petz/docs/_config.yml b/mods/petz/petz/docs/_config.yml new file mode 100644 index 0000000..f4b325c --- /dev/null +++ b/mods/petz/petz/docs/_config.yml @@ -0,0 +1,13 @@ +# Site settings +title: Bogart Game +tag_text: Bogart Game +description: A responsive template for publishing single-page websites, articles that are easy on the eyes +url: "http://127.0.0.1:4000" +baseurl: "" + +font-awesome-include: true # make this false if you don't need font-awesome + +# Build settings +markdown: kramdown + +exclude: ["README.md"] diff --git a/mods/petz/petz/docs/_includes/sharing.html b/mods/petz/petz/docs/_includes/sharing.html new file mode 100644 index 0000000..2a9f642 --- /dev/null +++ b/mods/petz/petz/docs/_includes/sharing.html @@ -0,0 +1,49 @@ + diff --git a/mods/petz/petz/docs/_layouts/default.html b/mods/petz/petz/docs/_layouts/default.html new file mode 100644 index 0000000..69ec8f9 --- /dev/null +++ b/mods/petz/petz/docs/_layouts/default.html @@ -0,0 +1,27 @@ + + + + + + + + {{ site.title }} + + + + {% if site.font-awesome-include %}{% endif %} + + + + + + + + + + diff --git a/mods/petz/petz/docs/_layouts/page.html b/mods/petz/petz/docs/_layouts/page.html new file mode 100644 index 0000000..218c725 --- /dev/null +++ b/mods/petz/petz/docs/_layouts/page.html @@ -0,0 +1,22 @@ + + + + + + + {{ site.title }} + + + + + +
+
+

{{ page.title }}

+ + {{ content }} +
+
+ + + diff --git a/mods/petz/petz/docs/add_petz.md b/mods/petz/petz/docs/add_petz.md new file mode 100644 index 0000000..a56f9f8 --- /dev/null +++ b/mods/petz/petz/docs/add_petz.md @@ -0,0 +1,107 @@ +An example to add a petz: mouse + +1. Edit the 'petz.conf' file + +- Open petz.conf and add your petz to the end of the 'petz_list'. +You have to add a comma and 'mouse'. +Warning: Do not put blank spaces. + +- In the 'Spawn Mobs?' section: +Add the following line at the end: +mouse_spawn = true + +- In the 'Specific Settings for Mobs' section: +Add at the end the following: + +##Mouse Specific +#To follow/tame and breed: +mouse_follow = petz:cheese +mouse_spawn_chance = 0.6 +mouse_spawn_nodes = default:dirt_with_grass +mouse_predators = petz:kitty +#change here if you want it to spawn only at a one biome +#or leave 'default' for all the biomes: +mouse_spawn_biome = default + +- If you want to spawn a herd of mouses, i.e. 4, add: + +mouse_spawn_herd = 4 + +- As you defined kitty as the mouse predator, now you have to define mouse as prey in its settings. +Add (or edit if existed) the following line to "Kitty Specific": + +kitty_preys = petz:mouse + +2. Create a petz file where the petz will be defined. + +But it is better to take an old already created one as template. +The better for mouse is piggy: no tamagochi, no orders. +Open 'piggy_mobkit.lua' and save as 'mouse_mobkit.lua' + +3. Edit the 'mouse_mobkit.lua'. + +- Firstly you have to replace all the 'piggy' coincidences to 'mouse' +With the aid of you text editor replace: +piggy -> mouse +Piggy -> Mouse +PIGGY -> MOUSE + +- Edit the petz charateristics as you like: + +- scale_model, mesh, textures, collisionbox, etc. + +4. Save the 'mouse_mobkit.lua' + +5. ¡DONE! + +###Extra + +####If you have to create a bird use 'parrot_mobkit.lua' as template. +####If you want to create a domestic pet use 'kitty_mobkit.lua' as template. +####If you want to create a wild animal use 'lion_mobkit.lua' as template. + +###Tamagochi mode + +If you can your mouse with this mode add/edit: + +init_tamagochi_timer = false, + +####Bloody Mode + +In petz.conf set: + +blood = true + +You can set a custom texture in the hardcoded petz definition: + +blood_texture = "" + +You can disable the blood individually in the hardcoded petz definition: + +no_blood = true + +####Spawn + +There is a set of spawn settings you could kie to add to the 'minetest.register_entity' definition: + +spawn_at_night = true, --only spawns at night +die_at_daylight = false, --it dies at dawn +min_height = 0, --min height to spawn (0= sea level) +max_height = 30, --max height to spawn (0= sea level) +min_daylight_level = 0, --min light to spawn (min 0) +max_daylight_level = 8, --max light to spawn (max 15) + +####Noxious Nodes + +If mob in node, then damage it per second. + +In example: + +noxious_nodes = { + {name = "air", where ="entity", damage = 1}, +}, + +name = name of the node +where = "stand" or "entity" (by default "entity") +damage = damage points (by default 1) +Note: Lava already makes damage so it is not necessary being defined. diff --git a/mods/petz/petz/docs/css/normalize.css b/mods/petz/petz/docs/css/normalize.css new file mode 100644 index 0000000..562891a --- /dev/null +++ b/mods/petz/petz/docs/css/normalize.css @@ -0,0 +1,406 @@ +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * Correct `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/mods/petz/petz/docs/css/rrssb.css b/mods/petz/petz/docs/css/rrssb.css new file mode 100644 index 0000000..f9e09a4 --- /dev/null +++ b/mods/petz/petz/docs/css/rrssb.css @@ -0,0 +1 @@ +.rrssb-buttons{box-sizing:border-box;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;height:36px;margin:0;padding:0;width:100%}.rrssb-buttons:after{clear:both}.rrssb-buttons:after,.rrssb-buttons:before{content:' ';display:table}.rrssb-buttons li{box-sizing:border-box;float:left;height:100%;line-height:13px;list-style:none;margin:0;padding:0 2px}.rrssb-buttons li.rrssb-email a{background-color:#0a88ff}.rrssb-buttons li.rrssb-email a:hover{background-color:#006ed6}.rrssb-buttons li.rrssb-facebook a{background-color:#306199}.rrssb-buttons li.rrssb-facebook a:hover{background-color:#244872}.rrssb-buttons li.rrssb-tumblr a{background-color:#32506d}.rrssb-buttons li.rrssb-tumblr a:hover{background-color:#22364a}.rrssb-buttons li.rrssb-linkedin a{background-color:#007bb6}.rrssb-buttons li.rrssb-linkedin a:hover{background-color:#005983}.rrssb-buttons li.rrssb-twitter a{background-color:#26c4f1}.rrssb-buttons li.rrssb-twitter a:hover{background-color:#0eaad6}.rrssb-buttons li.rrssb-googleplus a{background-color:#e93f2e}.rrssb-buttons li.rrssb-googleplus a:hover{background-color:#ce2616}.rrssb-buttons li.rrssb-youtube a{background-color:#df1c31}.rrssb-buttons li.rrssb-youtube a:hover{background-color:#b21627}.rrssb-buttons li.rrssb-reddit a{background-color:#8bbbe3}.rrssb-buttons li.rrssb-reddit a:hover{background-color:#62a3d9}.rrssb-buttons li.rrssb-pinterest a{background-color:#b81621}.rrssb-buttons li.rrssb-pinterest a:hover{background-color:#8a1119}.rrssb-buttons li.rrssb-pocket a{background-color:#ed4054}.rrssb-buttons li.rrssb-pocket a:hover{background-color:#e4162d}.rrssb-buttons li.rrssb-github a{background-color:#444}.rrssb-buttons li.rrssb-github a:hover{background-color:#2b2b2b}.rrssb-buttons li.rrssb-instagram a{background-color:#125688}.rrssb-buttons li.rrssb-instagram a:hover{background-color:#0c3a5b}.rrssb-buttons li.rrssb-delicious a{background-color:#0b79e5}.rrssb-buttons li.rrssb-delicious a:hover{background-color:#095fb4}.rrssb-buttons li.rrssb-vk a{background-color:#4d71a9}.rrssb-buttons li.rrssb-vk a:hover{background-color:#3d5a86}.rrssb-buttons li.rrssb-hackernews a{background-color:#f60}.rrssb-buttons li.rrssb-hackernews a:hover{background-color:#cc5200}.rrssb-buttons li a{background-color:#ccc;border-radius:2px;box-sizing:border-box;display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-weight:700;height:100%;padding:11px 7px 12px 27px;position:relative;text-align:center;text-decoration:none;text-transform:uppercase;-webkit-transition:background-color .2s ease-in-out;transition:background-color .2s ease-in-out;width:100%}.rrssb-buttons li a .rrssb-icon{display:block;left:10px;padding-top:9px;position:absolute;top:0;width:10%}.rrssb-buttons li a .rrssb-icon svg{height:17px;width:17px}.rrssb-buttons li a .rrssb-icon svg path{fill:#fff}.rrssb-buttons li a .rrssb-text{color:#fff}.rrssb-buttons li a:active{box-shadow:inset 1px 3px 15px 0 rgba(22,0,0,.25)}.rrssb-buttons li.small a{padding:0}.rrssb-buttons li.small a .rrssb-icon{left:auto;margin:0 auto;overflow:hidden;position:relative;top:auto;width:100%}.rrssb-buttons li.small a .rrssb-text{visibility:hidden}.rrssb-buttons.large-format,.rrssb-buttons.large-format li{height:auto}.rrssb-buttons.large-format li a{-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:.2em;padding:8.5% 0 8.5% 12%}.rrssb-buttons.large-format li a .rrssb-icon{height:100%;left:7%;padding-top:0;width:12%}.rrssb-buttons.large-format li a .rrssb-icon svg{height:100%;position:absolute;top:0;width:100%}.rrssb-buttons.large-format li a .rrssb-text{-webkit-backface-visibility:hidden;backface-visibility:hidden}.rrssb-buttons.small-format{padding-top:5px}.rrssb-buttons.small-format li{height:80%;padding:0 1px}.rrssb-buttons.small-format li a .rrssb-icon{height:100%;padding-top:0}.rrssb-buttons.small-format li a .rrssb-icon svg{height:48%;position:relative;top:6px;width:80%}.rrssb-buttons.tiny-format{height:22px;position:relative}.rrssb-buttons.tiny-format li{padding-right:7px}.rrssb-buttons.tiny-format li a{background-color:transparent;padding:0}.rrssb-buttons.tiny-format li a .rrssb-icon svg{height:70%;width:100%}.rrssb-buttons.tiny-format li a:active,.rrssb-buttons.tiny-format li a:hover{background-color:transparent}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon svg path{fill:#0a88ff}.rrssb-buttons.tiny-format li.rrssb-email a .rrssb-icon:hover .rrssb-icon svg path{fill:#0054a3}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon svg path{fill:#306199}.rrssb-buttons.tiny-format li.rrssb-facebook a .rrssb-icon:hover .rrssb-icon svg path{fill:#18304b}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon svg path{fill:#32506d}.rrssb-buttons.tiny-format li.rrssb-tumblr a .rrssb-icon:hover .rrssb-icon svg path{fill:#121d27}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon svg path{fill:#007bb6}.rrssb-buttons.tiny-format li.rrssb-linkedin a .rrssb-icon:hover .rrssb-icon svg path{fill:#003650}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon svg path{fill:#26c4f1}.rrssb-buttons.tiny-format li.rrssb-twitter a .rrssb-icon:hover .rrssb-icon svg path{fill:#0b84a6}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon svg path{fill:#e93f2e}.rrssb-buttons.tiny-format li.rrssb-googleplus a .rrssb-icon:hover .rrssb-icon svg path{fill:#a01e11}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon svg path{fill:#df1c31}.rrssb-buttons.tiny-format li.rrssb-youtube a .rrssb-icon:hover .rrssb-icon svg path{fill:#84111d}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon svg path{fill:#8bbbe3}.rrssb-buttons.tiny-format li.rrssb-reddit a .rrssb-icon:hover .rrssb-icon svg path{fill:#398bcf}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon svg path{fill:#b81621}.rrssb-buttons.tiny-format li.rrssb-pinterest a .rrssb-icon:hover .rrssb-icon svg path{fill:#5d0b11}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon svg path{fill:#ed4054}.rrssb-buttons.tiny-format li.rrssb-pocket a .rrssb-icon:hover .rrssb-icon svg path{fill:#b61124}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon svg path{fill:#444}.rrssb-buttons.tiny-format li.rrssb-github a .rrssb-icon:hover .rrssb-icon svg path{fill:#111}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon svg path{fill:#125688}.rrssb-buttons.tiny-format li.rrssb-instagram a .rrssb-icon:hover .rrssb-icon svg path{fill:#061d2e}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon svg path{fill:#0b79e5}.rrssb-buttons.tiny-format li.rrssb-delicious a .rrssb-icon:hover .rrssb-icon svg path{fill:#064684}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon svg path{fill:#4d71a9}.rrssb-buttons.tiny-format li.rrssb-vk a .rrssb-icon:hover .rrssb-icon svg path{fill:#2d4263}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon svg path{fill:#f60}.rrssb-buttons.tiny-format li.rrssb-hackernews a .rrssb-icon:hover .rrssb-icon svg path{fill:#993d00} \ No newline at end of file diff --git a/mods/petz/petz/docs/css/solo.css b/mods/petz/petz/docs/css/solo.css new file mode 100644 index 0000000..062e203 --- /dev/null +++ b/mods/petz/petz/docs/css/solo.css @@ -0,0 +1,269 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,300italc,400,400italic,500,700); + +html { + font: 18px/1.6 'Open Sans', sans-serif; +} + + +@media (max-width: 325px) { + html { font: 17px/1.6 'Open Sans', sans-serif; } +} + +body { + margin: 2rem 0 5rem; + color: #222; +} + +@media (min-width: 30rem) { + body { + margin-top: 5rem; + } +} + +a { + color: #0074d9; /* From http://clrs.cc */ + text-decoration: none; +} + +a:hover, a:focus { + text-decoration: underline; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0 0 0.5rem -0.1rem /* align left edge */; + color: #111; + text-rendering: optimizeLegibility; + font-family: 'Open Sans', serif; + line-height: 1.2 +} + +@media (max-width: 750px) { +h1, h2, h3, h4, h5, h6 { + margin-left: 0 !important; + margin-right: 0 !important; + } +} + +h1 { + font-size: 2.5rem; + margin-bottom: 7rem; + font-weight: 700; + margin-left: -2rem; + margin-right: -2rem; +} + +@media (min-width: 30rem) { + h1 { + font-size: 4rem; + margin-bottom: 10rem; + } +} + +h1 a { + color: inherit; +} + +h2 { + margin-top: 2rem; + font-size: 1.75rem; + font-weight: 500; + margin-bottom: 5rem; + color: #555; + text-align: right; + margin-right: -4rem; +} + +@media (min-width: 30rem) { + h2 { + margin-top: 2.5rem; + font-size: 1.75rem; + margin-bottom: 8rem; + margin-right: -4rem; + } +} + +h3 { + margin: 2rem -2rem 1.75rem -2rem; + margin-top: 2rem; + font-size: 1.75rem; +} + +@media (min-width: 30rem) { + h3 { + margin-top: 2.5rem; + font-size: 2rem; + margin-bottom: 1.5rem; + } +} + +h4, h5, h6 { + margin: 1.5rem -1rem 1.5rem -1rem; + font-size: 1.5rem; +} + +p, ul, ol, dl, table, pre, blockquote { + margin-top: 0; + margin-bottom: 1.5rem; +} + +ul, ol { + padding-left: 1.5rem; +} + +dd { + margin-left: 1.5rem; +} + +blockquote { + margin-left: 0.75rem; + margin-right: 0; + padding: 0rem 0.8rem; + border-left: .3rem solid #ccc; + color: #555; +} + +blockquote p:last-child { + margin-bottom: 0; +} + +.footnote { + color: #444; +} + +.center { + display:inline-block; + margin: 0 auto; +} + +hr { + border: none; + margin: 1.5rem 0; + border-bottom: 1px solid #ccc; + position: relative; + top: -1px; +} + +.img, .container iframe { + max-width: 100%; +} + +a { +word-wrap: break-word; +} + +.container img { + margin: 2em auto 2em auto; + display: block; + max-width: 75%; +} + +@media (max-width: 635px) { +.container img { + max-width: 100% + } +} + +table { + width: 100%; + border: 1px solid #ccc; + border-collapse: collapse; +} + +td, th { + padding: .25rem .5rem; + border: 1px solid #ccc; +} + +pre, code { + font-family: monospace; + background-color: #eee; +} + +pre { + padding: .5rem 1rem; + font-size: 0.8rem; +} + +code { + padding: .1rem .25rem; +} + +pre > code { + padding: 0; +} + +.container { + max-width: 625px; + margin: 0 auto; + padding: 0 0.75rem; +} + +.sharing { + text-align: center; +} + +.date { + text-align: right; + font-size: 75%; + font-style: italic; +} + +@media (max-width: 635px) { +.sharing { + font-size: 85%; + } +} + +/* This gets Google to fall into place */ +.social { + text-align: right; +} + +.topsocial { + margin-bottom: 5em; +} + +/* This gets Facebook to fall into place */ +.social iframe { + vertical-align: middle; +} + +/* Set an optional width for your button wrappers */ +.social span { + display: inline-block; + width: 110px; +} + +/* Adjust the widths individually if you like */ +.social .google { + width: 75px; +} + +.button { + margin-top: 2em; + margin-left: 1em; + display: inline-block; + border: 2px solid #111; + border-radius: 0.4em; + padding: 0.1em 0.75em; + font-size: 17px; + color: #111; + text-align: center; +} + +.button:hover { + color: white; + background-color: #111; + cursor: pointer; + text-decoration: none; + transition: 0.5s; +} + +.Facebook { + transform: scale(1.25); +} + +.sharing-buttons { + width: 100%; +} +} diff --git a/mods/petz/petz/docs/css/syntax.css b/mods/petz/petz/docs/css/syntax.css new file mode 100644 index 0000000..33f7f97 --- /dev/null +++ b/mods/petz/petz/docs/css/syntax.css @@ -0,0 +1,66 @@ +.hll { background-color: #ffffcc } + /*{ background: #f0f3f3; }*/ +.c { color: #999; } /* Comment */ +.err { color: #AA0000; background-color: #FFAAAA } /* Error */ +.k { color: #006699; } /* Keyword */ +.o { color: #555555 } /* Operator */ +.cm { color: #0099FF; font-style: italic } /* Comment.Multiline */ +.cp { color: #009999 } /* Comment.Preproc */ +.c1 { color: #999; } /* Comment.Single */ +.cs { color: #999; } /* Comment.Special */ +.gd { background-color: #FFCCCC; border: 1px solid #CC0000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.gr { color: #FF0000 } /* Generic.Error */ +.gh { color: #003300; } /* Generic.Heading */ +.gi { background-color: #CCFFCC; border: 1px solid #00CC00 } /* Generic.Inserted */ +.go { color: #AAAAAA } /* Generic.Output */ +.gp { color: #000099; } /* Generic.Prompt */ +.gs { } /* Generic.Strong */ +.gu { color: #003300; } /* Generic.Subheading */ +.gt { color: #99CC66 } /* Generic.Traceback */ +.kc { color: #006699; } /* Keyword.Constant */ +.kd { color: #006699; } /* Keyword.Declaration */ +.kn { color: #006699; } /* Keyword.Namespace */ +.kp { color: #006699 } /* Keyword.Pseudo */ +.kr { color: #006699; } /* Keyword.Reserved */ +.kt { color: #007788; } /* Keyword.Type */ +.m { color: #FF6600 } /* Literal.Number */ +.s { color: #d44950 } /* Literal.String */ +.na { color: #4f9fcf } /* Name.Attribute */ +.nb { color: #336666 } /* Name.Builtin */ +.nc { color: #00AA88; } /* Name.Class */ +.no { color: #336600 } /* Name.Constant */ +.nd { color: #9999FF } /* Name.Decorator */ +.ni { color: #999999; } /* Name.Entity */ +.ne { color: #CC0000; } /* Name.Exception */ +.nf { color: #CC00FF } /* Name.Function */ +.nl { color: #9999FF } /* Name.Label */ +.nn { color: #00CCFF; } /* Name.Namespace */ +.nt { color: #2f6f9f; } /* Name.Tag */ +.nv { color: #003333 } /* Name.Variable */ +.ow { color: #000000; } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mf { color: #FF6600 } /* Literal.Number.Float */ +.mh { color: #FF6600 } /* Literal.Number.Hex */ +.mi { color: #FF6600 } /* Literal.Number.Integer */ +.mo { color: #FF6600 } /* Literal.Number.Oct */ +.sb { color: #CC3300 } /* Literal.String.Backtick */ +.sc { color: #CC3300 } /* Literal.String.Char */ +.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #CC3300 } /* Literal.String.Double */ +.se { color: #CC3300; } /* Literal.String.Escape */ +.sh { color: #CC3300 } /* Literal.String.Heredoc */ +.si { color: #AA0000 } /* Literal.String.Interpol */ +.sx { color: #CC3300 } /* Literal.String.Other */ +.sr { color: #33AAAA } /* Literal.String.Regex */ +.s1 { color: #CC3300 } /* Literal.String.Single */ +.ss { color: #FFCC33 } /* Literal.String.Symbol */ +.bp { color: #336666 } /* Name.Builtin.Pseudo */ +.vc { color: #003333 } /* Name.Variable.Class */ +.vg { color: #003333 } /* Name.Variable.Global */ +.vi { color: #003333 } /* Name.Variable.Instance */ +.il { color: #FF6600 } /* Literal.Number.Integer.Long */ + +.css .o, +.css .o + .nt, +.css .nt + .nt { color: #999; } \ No newline at end of file diff --git a/mods/petz/petz/docs/images/baby_pony.png b/mods/petz/petz/docs/images/baby_pony.png new file mode 100644 index 0000000..6f33a67 Binary files /dev/null and b/mods/petz/petz/docs/images/baby_pony.png differ diff --git a/mods/petz/petz/docs/images/beaver.png b/mods/petz/petz/docs/images/beaver.png new file mode 100644 index 0000000..ac99481 Binary files /dev/null and b/mods/petz/petz/docs/images/beaver.png differ diff --git a/mods/petz/petz/docs/images/beaver_dam.png b/mods/petz/petz/docs/images/beaver_dam.png new file mode 100644 index 0000000..761c08c Binary files /dev/null and b/mods/petz/petz/docs/images/beaver_dam.png differ diff --git a/mods/petz/petz/docs/images/beaver_oil.png b/mods/petz/petz/docs/images/beaver_oil.png new file mode 100644 index 0000000..ffb1154 Binary files /dev/null and b/mods/petz/petz/docs/images/beaver_oil.png differ diff --git a/mods/petz/petz/docs/images/brush.png b/mods/petz/petz/docs/images/brush.png new file mode 100644 index 0000000..0a8c398 Binary files /dev/null and b/mods/petz/petz/docs/images/brush.png differ diff --git a/mods/petz/petz/docs/images/calf.png b/mods/petz/petz/docs/images/calf.png new file mode 100644 index 0000000..1844624 Binary files /dev/null and b/mods/petz/petz/docs/images/calf.png differ diff --git a/mods/petz/petz/docs/images/chicken.png b/mods/petz/petz/docs/images/chicken.png new file mode 100644 index 0000000..f63383c Binary files /dev/null and b/mods/petz/petz/docs/images/chicken.png differ diff --git a/mods/petz/petz/docs/images/chimp.png b/mods/petz/petz/docs/images/chimp.png new file mode 100644 index 0000000..9177bdf Binary files /dev/null and b/mods/petz/petz/docs/images/chimp.png differ diff --git a/mods/petz/petz/docs/images/clownfish.png b/mods/petz/petz/docs/images/clownfish.png new file mode 100644 index 0000000..f2ff746 Binary files /dev/null and b/mods/petz/petz/docs/images/clownfish.png differ diff --git a/mods/petz/petz/docs/images/duck_chicken_farm.png b/mods/petz/petz/docs/images/duck_chicken_farm.png new file mode 100644 index 0000000..a529b9a Binary files /dev/null and b/mods/petz/petz/docs/images/duck_chicken_farm.png differ diff --git a/mods/petz/petz/docs/images/ducky.png b/mods/petz/petz/docs/images/ducky.png new file mode 100644 index 0000000..4f901d7 Binary files /dev/null and b/mods/petz/petz/docs/images/ducky.png differ diff --git a/mods/petz/petz/docs/images/fish_tank.png b/mods/petz/petz/docs/images/fish_tank.png new file mode 100644 index 0000000..6409967 Binary files /dev/null and b/mods/petz/petz/docs/images/fish_tank.png differ diff --git a/mods/petz/petz/docs/images/frog.png b/mods/petz/petz/docs/images/frog.png new file mode 100644 index 0000000..2e8b01b Binary files /dev/null and b/mods/petz/petz/docs/images/frog.png differ diff --git a/mods/petz/petz/docs/images/grizzly.png b/mods/petz/petz/docs/images/grizzly.png new file mode 100644 index 0000000..0af4257 Binary files /dev/null and b/mods/petz/petz/docs/images/grizzly.png differ diff --git a/mods/petz/petz/docs/images/hello.svg b/mods/petz/petz/docs/images/hello.svg new file mode 100644 index 0000000..554f628 --- /dev/null +++ b/mods/petz/petz/docs/images/hello.svg @@ -0,0 +1 @@ + diff --git a/mods/petz/petz/docs/images/kennel.png b/mods/petz/petz/docs/images/kennel.png new file mode 100644 index 0000000..6e958ac Binary files /dev/null and b/mods/petz/petz/docs/images/kennel.png differ diff --git a/mods/petz/petz/docs/images/kitty.png b/mods/petz/petz/docs/images/kitty.png new file mode 100644 index 0000000..93d670f Binary files /dev/null and b/mods/petz/petz/docs/images/kitty.png differ diff --git a/mods/petz/petz/docs/images/lamb.png b/mods/petz/petz/docs/images/lamb.png new file mode 100644 index 0000000..8450e47 Binary files /dev/null and b/mods/petz/petz/docs/images/lamb.png differ diff --git a/mods/petz/petz/docs/images/lash.png b/mods/petz/petz/docs/images/lash.png new file mode 100644 index 0000000..8ed48ef Binary files /dev/null and b/mods/petz/petz/docs/images/lash.png differ diff --git a/mods/petz/petz/docs/images/lion.png b/mods/petz/petz/docs/images/lion.png new file mode 100644 index 0000000..fad2ebc Binary files /dev/null and b/mods/petz/petz/docs/images/lion.png differ diff --git a/mods/petz/petz/docs/images/panda.png b/mods/petz/petz/docs/images/panda.png new file mode 100644 index 0000000..634bf21 Binary files /dev/null and b/mods/petz/petz/docs/images/panda.png differ diff --git a/mods/petz/petz/docs/images/parrot.png b/mods/petz/petz/docs/images/parrot.png new file mode 100644 index 0000000..1afd265 Binary files /dev/null and b/mods/petz/petz/docs/images/parrot.png differ diff --git a/mods/petz/petz/docs/images/pet_bowl.png b/mods/petz/petz/docs/images/pet_bowl.png new file mode 100644 index 0000000..10ba77c Binary files /dev/null and b/mods/petz/petz/docs/images/pet_bowl.png differ diff --git a/mods/petz/petz/docs/images/petz_items.png b/mods/petz/petz/docs/images/petz_items.png new file mode 100644 index 0000000..b2a54a7 Binary files /dev/null and b/mods/petz/petz/docs/images/petz_items.png differ diff --git a/mods/petz/petz/docs/images/petz_logo.png b/mods/petz/petz/docs/images/petz_logo.png new file mode 100644 index 0000000..8e7657d Binary files /dev/null and b/mods/petz/petz/docs/images/petz_logo.png differ diff --git a/mods/petz/petz/docs/images/pigeon.png b/mods/petz/petz/docs/images/pigeon.png new file mode 100644 index 0000000..948faf4 Binary files /dev/null and b/mods/petz/petz/docs/images/pigeon.png differ diff --git a/mods/petz/petz/docs/images/piggy.png b/mods/petz/petz/docs/images/piggy.png new file mode 100644 index 0000000..d7cdc8a Binary files /dev/null and b/mods/petz/petz/docs/images/piggy.png differ diff --git a/mods/petz/petz/docs/images/pony.png b/mods/petz/petz/docs/images/pony.png new file mode 100644 index 0000000..28e09ab Binary files /dev/null and b/mods/petz/petz/docs/images/pony.png differ diff --git a/mods/petz/petz/docs/images/pony_breeding.png b/mods/petz/petz/docs/images/pony_breeding.png new file mode 100644 index 0000000..086fdc7 Binary files /dev/null and b/mods/petz/petz/docs/images/pony_breeding.png differ diff --git a/mods/petz/petz/docs/images/puppy.png b/mods/petz/petz/docs/images/puppy.png new file mode 100644 index 0000000..a825879 Binary files /dev/null and b/mods/petz/petz/docs/images/puppy.png differ diff --git a/mods/petz/petz/docs/images/tropicalfish.png b/mods/petz/petz/docs/images/tropicalfish.png new file mode 100644 index 0000000..53ba127 Binary files /dev/null and b/mods/petz/petz/docs/images/tropicalfish.png differ diff --git a/mods/petz/petz/docs/images/turtle.png b/mods/petz/petz/docs/images/turtle.png new file mode 100644 index 0000000..3db939b Binary files /dev/null and b/mods/petz/petz/docs/images/turtle.png differ diff --git a/mods/petz/petz/docs/index.md b/mods/petz/petz/docs/index.md new file mode 100644 index 0000000..747e93c --- /dev/null +++ b/mods/petz/petz/docs/index.md @@ -0,0 +1,27 @@ +--- +layout: default +--- + +## A Minecraft style game. Do construct with blocks. Play online. Fun! + +- An open world to interact to. +- Game modes: Creative & Survival. +- Make your dreamed constructions. +- Farming. +- Animals to tame & monsters to kill. +- Play online through servers around the whole world. +- License: LGPL 2.1+. Share the game with your friends/family and do not care about licenses! +- Engine: Minetest +- Languages: English/Spanish/Plus other. +- Platforms: Windows/Linux/Android + +### Download + +
    +
  • +
+ + +### Mods + +[Petz](petz.html) diff --git a/mods/petz/petz/docs/petz.md b/mods/petz/petz/docs/petz.md new file mode 100644 index 0000000..936fe17 --- /dev/null +++ b/mods/petz/petz/docs/petz.md @@ -0,0 +1,444 @@ +--- +layout: default +--- + +![Logo](/images/petz_logo.png) + +![Items](/images/petz_items.png) + +Are you tired of ugly mobs? Do you like the kawaii world and taste? +The PetZ are here now for you! + +### Mobs +#### Kitty +![Kitty](/images/kitty.png) +- It avaliable in 6 colors. + +#### Puppy +![Puppy](/images/puppy.png) +- 3 colors. + +#### Duckies +![Ducky](/images/ducky.png) +- Three types: Yellow, Black and Mallard. +- Peaceful and dumb animal. +- They can put duck eggs from time to time.You can tame it but not give it any order. +- You can breed ducks creating a nest with an egg inside, optionally you can leave an empty nest near a ducky so it lay an egg. +- It drops feathers when killed. +- You can fry the eggs. +- Fried egg and bacon: A fried egg plus a porkchop. + +#### Beaver +![Beaver](/images/beaver.png) +Behaviour: +- It lives near water (in rivers in the case of valleys mapgen). +- It can be tamed. +- It can walk, swim and dive underwater. +- It drops Beaver Fur to create Beaver Oil when killed. +- It got a chance of create an unique dam on the coast or river. +- You can spread beaver oil on your pet skin. In tamagochi mode your pet will be happy, but the fact of not do it it is not mandatory for it to be sad. + +#### Lamb +![Lamb](/images/lamb.png) +In 3 colors: White (common), grey & dark gray (rare) and brown (very rare). +- Lambs eat grass. +- You can get Wool with the Shears (right click). +- To wool to regrow feed your lamb or let it eats grass. +- Lambs runaway from player, tame them with some wheat. +- Predators: Wolf & Lion. + +#### Lion +![Lion](/images/lion.png) +- It lives in the Savanna. Wild animal. Dangerous. +- It likes raw meat. +- Can be tamed and give it orders with meat or a Whip (3 lashings to tame) +In Tamagochi Mode: +- You have to lash your lion in 48h or it lost affinitty with you. +- Be careful, if you lost your lion as pet, it will attack you! +- Preys: Lambs, piggies and ponies. + +#### Calf +![Calf](/images/calf.png) +- Available in three skins. +- It eats grass from time to time, like the lambs. +- It drops Leather when killed. +- It can be milked with an empty bucket. +- In order the calf to have more milk, you have to feed it or let it to eat some grass. +- Milk is drinkable. +- Put a bucket of milk in the oven to get Cheese. +- Predators: Calf. + +#### Panda +![Panda](/images/panda.png) +- Panda is tamable and loves papyrus. + +#### Frog +![Frog](/images/frog.png) +- Frog is a semiaquatic animal. It loves fireflies to eat'em. It drops a leg that you can cook in order to get a Roasted Frog Leg (food). + +#### Grizzly +![Grizzly](/images/grizzly.png) +- Not a Teddy Bear, but a wild one. It lives in woods. It's tamable like the lion. +- Preys: Lamb. + +#### Pony +![Pony](/images/pony.png) +- You can mount it with a Saddle and get a ride. +- You can give it orders. +- The Saddle can be cut with the Shears. +- Ponies are slow where you ride them. You can breeding them to get stronger and fastest ones. +- Predators: Lion. + +#### Parrot +![Parrot](/images/parrot.png) +- Five species. +- Tamable and you can give it orders. +- It loves wheat seeds. +- It lives naturally in the jungle. +- You can order it to alight and to fly again. +- It can drop Raw Parrot meat which it can be cooked. +- You can put your parrot on your shoulder (2 minutes max.). +- You can put your parrot on a Bird Stand. + +#### Chicken +![Chicken](/images/chicken.png) +- Farm Animal. +- It can lay Chicken Eggs like the duckies. +- It drops Raw Chicken to cook it as food. +- Get Chicken Legs with Raw Chichen. +- Put a lot of Roasted Chicken Legs into a bucket, to get a super-delicious bucket of Chicken Legs. + +#### Pigeon +![Pigeon](/images/pigeon.png) +- Flying bird. + +#### Chimp +![Chimp](/images/chimp.png) +- Agile monkey. +- Arboreal mob: It can climb trees, wood and leaves. +- It loves blueberries. + +#### Piggy +![Piggy](/images/piggy.png) +- It's a source of meat. +- It drops Porkchop to being cooked. +- Predators: Lion. + +#### Turtle +![Turtle](/images/turtle.png) +- Semiaquatic mob. +- It eats kelps. +- It has a chance of drop its shell. + +#### Fishes +![Clownfish](/images/clownfish.png) +![Tropical Fish](/images/tropicalfish.png) +Clownfish & Tropical Fish +- It lives close to a coral reef. +- It loves orange coral (clownfish) or brown coral (tropical fish). +- It can be captured and put into a fish tank. +- It suffocates when outside water. +- In tamagochi mode you have only to feed it, but no if it is in a fish tank. + +#### Wolf +![Wolf](/images/wolf.png) +- Wild animal. +- Run away from players til players attack them, then agressive. +- Tamable in the same way as lion. +- Preys: Lambs. +- Wolves can be turned into puppies: Tame the wolf with a whip, then feed it with bones (until 5, configurable in petz.conf). + +#### Moth +![Moth](/images/chimp.png) +- It spawns only at night in the coniferous forest. +- It dies when daylight comes, unless it would be in a dark place for protection, i.e. a cave or a closed box. It needs some obscurity, not a totally dark place. +- A moth can be captured with an empty glass bottle. Deco item. If you break the bottle, the moth liberates. + +#### Silkworm +![Silkworm](/images/silkworm.png) +- It spawn naturally on coniferous forests. +- It eats all kind of leaves. +- You can produce Silk (see below). + +#### Camel +![Camel](/images/camel.png) +- It lives in deserts. +- It eats dry shrub. +- Predator: Lion +- Milkable. +- You can breed them. Baby camels. Genetics. Mutation: White Camel. +- Mountable with a saddle; Get a ride in the desert! +- You can put a Saddlebag on it (right click): You gain access to the Saddlebag Inventory (16 items máx.), in the form -> click on the icon of the Saddlebag. +- Each camel has its own separated saddlebag inventory. +- The inventory of the saddlebag is permanent. You got it even after server restarts. +- If the camel died, the inventory of the saddlebag will drop. +- If you captured a camel, the saddlebag with the inventory too. +- You can put together the saddle and the saddlebag. But on right click you will mount it. To access to the inventory of the saddlebag use the shears to quit both items. Then put a saddlebag only. + +#### Bat +![Bat](/images/bat.png) +- Spawn in interiors (caves) +- If spawned outside, only at night, and when sunrise dies. +- It eats and follows fireflies. + +#### Hamster +![Hamster](/images/hamster.png) +- It lives in deserts. +- 6 colors. +- Breed them. +- Mutation: Pink Hamster. + +#### Dolphin +![Dolphin](/images/dolphin.png) +- It lives in oceans. + +#### Toucan +![Toucan](/images/toucan.png) +-It lives in the jungle. +-It eats apples. +-Tamable. You can put it in a bird stand. + +#### Bee +![Bee](/images/bee.png) +- Flying insect. +- It lives in behives and stays close to them. +- It produces honey. It searches for flowers to get the pollen and then return to the behive. +- Two types: Queen and workers (normal). +- All the bees return to their behive at night and go out at the morning, except the Queen Bee that can fly 24 hours. +- All the bees need belong to a behive. If their behive is destroyed, all the bees will die. Only the Queen Bees do not need a behive to survive. +- Worker Bees do not spawn naturally. +- Queen Bees can spawn and create one colony (behive) in wood or leaves. +- Bees can drop pollen and/or a sting. + +### Things you can with Petz +- Configure the models as "mesh" (by default) or "cubic" (nodebox, no animated, no too laggy) via the 'petz.conf' +- Configure the mob API: Only "mobs_redo" by now via 'petz.conf'. +- Configure the following food (aka food to health) it via 'petz.conf'. Use right click. +- Give it orders: follow you or stand: Right click if you are the owner. +- Configure if they spawn in the map via 'petz.conf'. +- Your pet can be tamed and captured. +- Internationalization support. +- Spawn Eggs. + +NodeboxEditor (.nbe) and Blender (.blend) models included. + +### Licenses +- Models, icons and textures by runs. GPL3 Feel free to use it. +- Sounds: Check the 'license.md' file inside the 'sounds' folder. + +### Depends +default, mobs, stairs, dye, vessels, wool + +### Optional +bonemeal + +### Tamagochi Mode +If this mode is activated (true by default) you have to take care of your pet. The pet will have two stats: Love and Hunger. If those stats go down to 0, your pet abandon you or will starve. + +In multiplayer games (servers) the Tamagochi Mode is paused if the pet owner is offline. + +#### Feed it! +-You have to feed your pet once each 2 days at least (Minetest time) (right click wielding its food) (the food is configurable via petz.conf). Your pet then would be happy. Check your pet status (right click), if "Hungry" feed it, but if 'Satiated' then don't bother. If you do not feed your pet every 48 hours, its health would damaged and it would be sad. +This does not apply if your pet is inside its kennel. + +#### Brush it! +![Brush](/images/brush.png) +You have to brush your pet once each 2 days at least, or it will be sad. Firstly create a hairbrush with two wood sticks and one string. +This does not apply if your pet is inside its kennel. + +#### Lash it! +![Lash](/images/lash.png) +In the case of a lion or grizzly, you have to lash it with a whip once each 2 days at least in order to control it. +Do not use the whip with another petz! + +#### Polish it! +![Beaver Oil](/images/beaver_oil.png) +You can spread beaver oil on your pet skin. In tamagochi mode your pet will be happy, but the fact of not do it it is not mandatory for it to be sad. + +Also keep in mind that: +- If you don't feed your pet in 8 days will die (configurable). +- If you punch your pet, it gets unhappy. +- If your pet is unhappy, it could abandon you. +- If your pet is inside its kennel, it'll be well cared for and happy and won't starve. But close the door! + +Notes +- You can configure the time when your pet is checked in 'pet.conf'. 2400 by default (2 days). +- In a singleplayer game the pet stats remain intact between restarts. +- You can configure the node over where your pet is safe (no hunger) in 'pet.conf'. So you can do your our kennels. +- The Tamagochi Mode is paused for pet owners in multiplayer games (servers) when they are offline. + +### Pet Bowl +![Pet Bowl](/images/pet_bowl.png) +Make a house to your pet and put a Pet Bowl. The pet will stand near it. + +### Kennel +![Kennel](/images/kennel.png) +A schematic. Simply make a hole and punch inside it. You can put your pet inside after capture it. For creative mode only. +In there your dog will be well cared for and you won't have to worry about its health. + +### Ducks/Chicken Farm +![Ducks/Chicken Farm](/images/duck_chicken_farm.png) +You can breed ducks or chickens via its eggs: +- Create a empty nest and put an egg inside (right click), optionally you can create a nest with an already egg inside. Await for the egg to hatch into a new ducky or chicken. +- Also if a ducky or chicken has an empty nest near, it can lay an egg on it. +- You can extract the egg from a nest (right-click on the nest). + +### Capture Petz +Use the followig items to capture a petz: +- MobsRedo Net and Default Bug Net for Frog, Chicken, Kitty, Parrot, Pigeon, Ducky, Beaver, Clownfish, Monkey and Turtle. +- MobsRedo Lasso for Calf, Lion, Puppy, Piggy, Lamb, Panda, Grizzly and Pony. + +### Capture Mechanics: +- To capture a pet (i.e. kitty) you have to own it. But to to capture a no pet (i.e. frog) you can capture it directely. +- To own a pet you have to tame it. +- To tame a pet you have to feed it with its favourite food 5 times. Or lash it in the case of the lion and grizzly. +- You cannot capture the pets of other players by default. To allow to rob pets change the setting 'rob_mobs' in 'petz.conf" file. + +### Beaver Dam +![Beaver Dam](/images/beaver_dam.png) +The beaver's home + +### Fish Tank +![Fish Tank](/images/fish_tank.png) +- Put your fish inside (right-click) +- Recover your fish with the Bug Net (right click) or breaking it. +- You can connect several fish tank nodes to build bigger tanks and add more fishes (one by node). + +### Pony/camel Breeding +![Baby Pony](/images/baby_pony.png)![Pony Breeding](/images/pony_breeding.png) +- Ponies/camels can be male or female. Check its gender right clicking on them. +- Each animal has its own velocity forward, velocity backward and acceleration. You can read its characteristics with the format "1/1/1" where the numbers represent these 3 characteristics. +- Create a Glass Syringe. +- Use (right-click) the syringe on a male animal to get its germ. +- Use (right-click) the syringe with germ on a female animal. The animal will be pregnant. +- Right click on a pregnant female animal to check its pregnancy status. +- After 2 days (configurable) a little baby will born with a mixture of gens, from its father and its mother. +- Baby ponies/camels cannot be ridered. +- After 2 days (configurable) the baby will get to adult. +- You should select the best parent ponies to get better descendency (fastest ponies/camels) when breeding. +- You can breed any animal even if you do not own it. But the owner of the babies will be the mother's owner. +- The male germ is unlimited but a female pony/camel only can give birth 5 babies máx. After those 5 babies, the mommy turn into infertile. + +#### The method of breeding +- 1/2/3 means a velocity of 1 for forward, 2 for backward and 3 is the acceleration. So the first number of the triad is the most important. +- Naturally spawned ponies/camels have speed statistics from 1/1/1 to 4/4/4. This means that spawned ponies/camels are slow animals (40% of the speed limit in the best case). +- The hypothetical faster pony would be a 10/10/10. You have to breed the natural ponies/camels to achieve faster ones. +- Keep in mind that even fast parents can procreate a slow child. So you'll have to breed several times to get an optimal child. +- The method is to breed parents with high speed statistics to get the best descendants, then select the fastest descendants to continue breeding them. This is a very slow process. Be patient. + +### Square Ball +![Square Ball](/images/squareball.png) +- Make a Square Ball. +- Throw it to your puppy. You have to hit the target. +- Your puppy bring back the square ball to you. +- To get the ball, right click on it. + +### Recipes +![Recipes](/images/recipes.png) +- Blueberry Cheese Cake = Blueberries, wheat, cheese and egg. +- Blueberry Ice Cream: Blueberries, wheat, milk, 2 eggs and 2 snows = 3 ice creams. +- Blueberry Muffin: Blueberries, 2 wheat, milk, 2 eggs and paper = 8 muffins. + +### Lamb, Hamster, Panda and Elephant Breed +You can get baby lambs, hamsters and elefants. +1) Those petz could be male/female. Right-click on them to check its gender. +2) Get blueberries. (configurable in petz.conf) +3) Use (right-click) blueberries with the petz to heat them. +4) When a rut male petz found a oestrus female (close), she get pregnant. +5) Affer one day a baby will born. +6) Genetics: The baby will inherit the color from its parents. From dominant to recessive genes: white, gray, dark gray and brown in the case of lambs. This means: white color is the most common, parents both white could have a child of any color, if both brown all their descendants will be brown, etc. +6) The little petz will grown in one day. + +#### Mutation! Vanilla lamb | White Elephant! +![Mutation](/images/mutation.png) +Also petz can suffer from a very rare mutation in its genes when spawn or breed, in a 1:200 ratio. +- You can get a Vanilla Lamb and 'vanilla wool' new item. +- You can get a white elephant. + +### Dreamcatcher +![Dreamcatcher](/images/dreamcatcher.png) +Dreamcatcher amulet for your petz! Protect them! +- Craftable with: wood, strings and ducky feathers. +- To put it: Right click with it on a pet you own. +- Now your pet will be protected against other players attacks. But you can still hurt it. +- To remove the Dreamcatcher from your pet: Right click on your pet and click on the Dreamcatcher image. Another option is to kill your pet, it will drop the dreamcatcher. + +### Whistle +![Whistle](/images/whistle.png) +Call your petz anywhere it is. +- Put names to pets you want to call. +- Use a Whistle: A list of pets with name and of your own will appear. +- Click on the pet to call it. + +### Orders +You can give orders to tamed petz. +- Stand here: It stands fixed at the current pos. +- Follow: It will follow you. +- Guard: Wild animals (lion & grizzly) will attack any player close them, but not you. +- Fly, Alight: For birds. + +### Bird Stand +![Birstand Item](/images/birdstand_item.png) +![Birstand](/images/birdstand.png) +- Capture your parrot with the Bug Net. +- Put it on the bird stand (right-click) + +### Barn +![Barn](/images/barn.png) +Do create livestocks with the aid of fences. + +### Silk Farm +![Silk Stuff](/images/silk_stuff.png) +- You can get cocoons. A cocoon is silk indeed. +- Also you can capture or breed moths/silkworns to make a Silk Farm. +- Create a closed facility. Create a bed of leaves. Put inside some moths and/or silkworms. The moths will lay eggs and silkworms will turn into cocoons (be care: they will eat the leaves too). + +#### Spinning Wheel +![Spinning Wheel](/images/spiniing_wheel.png) +- Create a Spinning Wheel to get Silk Bobbins. Its a one node size item, so put on a node-table. + +Instructions to craft a Spinnig Wheel: +- A previous bobbin has to be created by hand (3 sticks and 6 silkworm coccons) +- You have to note that making bobbins by hand is more expensive (the double) than in the spinning wheel. +- The first time your place a Spinning Wheel, that bobbin is already incorporated, only you have to add two more. + +Instructions to use: +- You need to put in the Spinning Wheel (right-click) 3 Silkworns Cocoons. Then a Silk Bobbin will be created. Right-click again to get the bobbin. + +#### Prince Armor +![Prince Armor Stuff](/images/prince_armor_stuff.png) +![Prince Armor](/images/prince_armor.png) +- It requires the 3D Armor mod! +- You can create a super expensive and exquisite Prince Armor thanks to silk. + +### Honey Farm +![Honey Stuff](/images/honey_stuff.png) +- The limit of honey by behive is 10 (max_honey_behive setting in petz.conf). +- You can collect honey from a behive with an empty bottle (right click). +- You can eat the honey. Honey is very powerful in order to recover your health. +- Each behive contains three bees (max_bees_behive in petz.conf). A artificially created behive only one. +- Bees go out the behive to get pollen, but only if the honey in their behive is below 10. Then they return to their behive to create honey. +- If you destroy a behive all their bees will die. Six honeycomb will be dropped. +- You can create a behive with 6 honeycombs and one captured worker bee. +- Player created behives only will have one bee when placed. But you can add more captured bees to a behive (right click) till the limit. Be care: If you put manually a new bee on a behive and the limit is reached, a bee that would be out when come back will die when entering the behive, in order the limit being respected. +- If you put an igniter or a torch below a behive (til 4 nodes), the bees inside will go out. +- You can get Beeswax cooking Honeycombs. +- You can get Beeswax Candles crafting Beewax with a string. +- Trick: Put some flowers surrounding the behive to start the production of honey. +- Trick: Point to a behive to known its statistics about the honey and bees (currently inside). + +Note: Take into account that if there are flowers close the behive a bee will go to them to collect pollen and inmediatelly will return back to the behive. If you want to see bees flying surrounding the behive, the behive should be full of honey so the bees can go for a walk far away. Also bees remain inside the behive at night. + +#### Settings +- Max honey by behive. +max_honey_behive = 10 (by default) +- Max bees in a behive. +max_bees_behive = 3 (by default) +- Outing rate: A "bee_outing_ratio=1" means that a bee inmediatelly go out the behive for pollen +bee_outing_ratio = 20 (by default) +Note: Take into account that if there are flowers close the behive a bee will go to them to collect pollen and inmediatelly will return back to the behive. If you want to see bees flying surrounding the behive, the behive should be full of honey so the bees can go for a walk far away. Also bees remain inside the behive at night. +- Initial honey behive: It indicates the initial honey amount on a created behive. +initial_honey_behive = 3 (by default) + +### Bonemeal +- Install the bonemeal mod and convert your petz bones into fertilizer to grown plants faster. diff --git a/mods/petz/petz/docs/scripts/jquery.js b/mods/petz/petz/docs/scripts/jquery.js new file mode 100644 index 0000000..d1608e3 --- /dev/null +++ b/mods/petz/petz/docs/scripts/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("