diff --git a/mods/3d_armor/3d_armor/README.md b/mods/3d_armor/3d_armor/README.md new file mode 100644 index 0000000..5e9e3b9 --- /dev/null +++ b/mods/3d_armor/3d_armor/README.md @@ -0,0 +1,482 @@ +# [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) |||- - [Armour Functions](#armour-functions) +|- - [armor_heal_multiplier](#armor-healing-multiplyer) |||- - - [armor:set_player_armor](#armor-set_player_armor) +|- - [armor_water_protect](#enable-water-protection) |||- - - [armor:punch](#armor-punch) +|- - [armor_fire_protect](#enable-fire-protection) |||- - - [armor:damage](#armor-damage) +|- - [armor_punch_damage](#enable-punch-damage-effects) |||- - - [armor:remove_all](#armor-remove_all) +|- - [armor_migrate_old_inventory](#migration-of-old-armor-inventories) |||- - - [armor:equip](#armor-equip) +|- - [wieldview_update_time](#how-often-player-wield-items-are-updated) |||- - - [armor:unequip](#armor-unequip) +| - [Credits](#credits) |||- - - [armor:update_skin](#armor-update_skin) +| |||- - [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 + +Override the following default settings by adding them to your ***minetest.conf*** file. + +### 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 + +### 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") + local mult = armor.config.level_multiplier or 1 + armor.config.level_multiplier = mult * 0.5 + 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" +**3rd line** in this case will be set to one ***note: need more detail here*** +**4th line** simply sets the multiplier, by setting 0.5 smaller armor becomes less effective and larger more effective. good values are between 0.1 and 1 in increments of 0.1. + +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 Functions + +### 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/README.txt b/mods/3d_armor/3d_armor/README.txt deleted file mode 100644 index b8980b5..0000000 --- a/mods/3d_armor/3d_armor/README.txt +++ /dev/null @@ -1,212 +0,0 @@ -[mod] Visible Player Armor [3d_armor] -===================================== - -Depends: default - -Recommends: sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts) - -Supports: player_monoids and armor_monoid - -Adds craftable armor that is visible to other players. Each armor item worn contributes to -a player's armor group level making them less vulnerable to weapons. - -Armor takes damage when a player is hurt but also offers a percentage chance of healing. -Overall level is boosted by 10% when wearing a full matching set. - -Fire protection added by TenPlus1 when using crystal armor if Ethereal mod active, level 1 -protects against torches, level 2 for crystal spike, level 3 for fire, level 5 for lava. - -Armor Configuration -------------------- - -Override the following default settings by adding them to your minetest.conf file. - --- Set false to disable individual armor materials. -armor_material_wood = true -armor_material_cactus = true -armor_material_steel = true -armor_material_bronze = true -armor_material_diamond = true -armor_material_gold = true -armor_material_mithril = true -armor_material_crystal = true - --- Increase this if you get initialization glitches when a player first joins. -armor_init_delay = 2 - --- Number of initialization attempts. --- Use in conjunction with armor_init_delay if initialization problems persist. -armor_init_times = 10 - --- Increase this if armor is not getting into bones due to server lag. -armor_bones_delay = 1 - --- How often player armor items are updated. -armor_update_time = 1 - --- Drop armor when a player dies. --- Uses bones mod if present, otherwise items are dropped around the player. -armor_drop = true - --- Pulverise armor when a player dies, overrides armor_drop. -armor_destroy = false - --- You can use this to increase or decrease overall armor effectiveness, --- eg: level_multiplier = 0.5 will reduce armor level by half. -armor_level_multiplier = 1 - --- You can use this to increase or decrease overall armor healing, --- eg: armor_heal_multiplier = 0 will disable healing altogether. -armor_heal_multiplier = 1 - --- Enable water protection (periodically restores breath when activated) -armor_water_protect = true - --- Enable fire protection (defaults true if using ethereal mod) -armor_fire_protect = false - --- Enable punch damage effects. -armor_punch_damage = true - --- Enable migration of old armor inventories -armor_migrate_old_inventory = true - -API ---- - -Armor Registration: - -armor:register_armor(name, def) - -Wrapper function for `minetest.register_tool`, while registering armor as -a tool item is still supported, this may be deprecated in future so new code -should use this method. - -Additional fields supported by 3d_armor: - - texture = - preview = - armor_groups =
- damage_groups =
- reciprocate_damage = - on_equip = - on_unequip = - on_destroy = - on_damage = - on_punched = - -armor:register_armor_group(group, base) - -Example: - -armor:register_armor_group("radiation", 100) - -armor:register_armor("mod_name:speed_boots", { - description = "Speed Boots", - inventory_image = "mod_name_speed_boots_inv.png", - texture = "mod_name_speed_boots.png", - preview = "mod_name_speed_boots_preview.png", - groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1}, - armor_groups = {fleshy=10, radiation=10}, - damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1}, - reciprocate_damage = true, - on_destroy = function(player, index, stack) - local pos = player:get_pos() - if pos then - minetest.sound_play({ - name = "mod_name_break_sound", - pos = pos, - gain = 0.5, - }) - end - end, -}) - -See armor.lua, technic_armor and shields mods for more examples. - -Default groups: - -Elements: armor_head, armor_torso, armor_legs, armor_feet -Attributes: armor_heal, armor_fire, armor_water -Physics: physics_jump, physics_speed, physics_gravity -Durability: armor_use, flammable - -Notes: - -Elements may be modified by dependent mods, eg shields adds armor_shield. -Attributes and physics values are 'stackable', durability is determined -by the level of armor_use, total uses == approx (65535/armor_use), non-fleshy -damage groups need to be defined in the tool/weapon used against the player. - -Reciprocal tool damage will be done only by the first armor inventory item - with `reciprocate_damage = true` - -Armor Functions: - -armor:set_player_armor(player) - -Primarily an internal function but can be called externally to apply any -changes that might not otherwise get handled. - -armor:punch(player, hitter, time_from_last_punch, tool_capabilities) - -Used to apply damage to all equipped armor based on the damage groups of -each individual item.`hitter`, `time_from_last_punch` and `tool_capabilities` -are optional but should be valid if included. - -armor:damage(player, index, stack, use) - -Adds wear to a single armor itemstack, triggers `on_damage` callbacks and -updates the necessary inventories. Also handles item destruction callbacks -and so should NOT be called from `on_unequip` to avoid an infinite loop. - -armor:remove_all(player) - -Removes all armors from the player's inventory without triggering any callback. - -armor:equip(player, armor_name) - -Equip the armor, removing the itemstack from the main inventory if there's one. - -armor:unequip(player, armor_name) - -Unequip the armor, adding the itemstack to the main inventory. - -armor:update_skin(player_name) - -Triggers a skin update with the same action as if a field with `skins_set` was submitted. - -Item Callbacks: - -on_equip = func(player, index, stack) -on_unequip = func(player, index, stack) -on_destroy = func(player, index, stack) -on_damage = func(player, index, stack) -on_punched = func(player, hitter, time_from_last_punch, tool_capabilities) - -Notes: - -`on_punched` is called every time a player is punched or takes damage, `hitter`, -`time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the -case of fall damage, etc. When fire protection is enabled, hitter == "fire" -in the event of fire damage. Return `false` to override armor damage effects. -When armor is destroyed `stack` will contain a copy of the previous stack. - -Global Callbacks: - -armor:register_on_update(func(player)) -armor:register_on_equip(func(player, index, stack)) -armor:register_on_unequip(func(player, index, stack)) -armor:register_on_destroy(func(player, index, stack)) - -Global Callback Example: - -armor:register_on_update(function(player) - print(player:get_player_name().." armor updated!") -end) - - -Note: - -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. diff --git a/mods/3d_armor/3d_armor/api.lua b/mods/3d_armor/3d_armor/api.lua index 808c623..5611989 100644 --- a/mods/3d_armor/3d_armor/api.lua +++ b/mods/3d_armor/3d_armor/api.lua @@ -98,6 +98,7 @@ armor.config = { material_crystal = true, water_protect = true, fire_protect = minetest.get_modpath("ethereal") ~= nil, + fire_protect_torch = minetest.get_modpath("ethereal") ~= nil, punch_damage = true, } @@ -365,6 +366,9 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili 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 diff --git a/mods/3d_armor/3d_armor/depends.txt b/mods/3d_armor/3d_armor/depends.txt index 855baa9..f101e69 100644 --- a/mods/3d_armor/3d_armor/depends.txt +++ b/mods/3d_armor/3d_armor/depends.txt @@ -5,3 +5,4 @@ pova? fire? ethereal? bakedclay? +moreores? diff --git a/mods/3d_armor/3d_armor/init.lua b/mods/3d_armor/3d_armor/init.lua index b6c3458..44f845b 100644 --- a/mods/3d_armor/3d_armor/init.lua +++ b/mods/3d_armor/3d_armor/init.lua @@ -61,6 +61,17 @@ for material, _ in pairs(armor.materials) do end end +-- 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 @@ -292,6 +303,10 @@ default.player_register_model("3d_armor_character.b3d", { 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}, }, }) @@ -309,6 +324,10 @@ default.player_register_model("3d_armor_female.b3d", { 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}, }, }) @@ -394,13 +413,20 @@ if armor.config.drop == true or armor.config.destroy == true then 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() - if name then + 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 diff --git a/mods/3d_armor/3d_armor/mod.conf b/mods/3d_armor/3d_armor/mod.conf index 311adb5..ddf6e66 100644 --- a/mods/3d_armor/3d_armor/mod.conf +++ b/mods/3d_armor/3d_armor/mod.conf @@ -1,4 +1,4 @@ name = 3d_armor depends = default -optional_depends = player_monoids, armor_monoid, pova, fire, ethereal, bakedclay +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 index c4d45b5..d3e54a8 100644 Binary files a/mods/3d_armor/3d_armor/models/3d_armor_character.b3d 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 index 44f7e27..2ea7864 100644 Binary files a/mods/3d_armor/3d_armor/models/3d_armor_character.blend and b/mods/3d_armor/3d_armor/models/3d_armor_character.blend differ diff --git a/mods/3d_armor/3d_armor/models/3d_armor_character.blend1 b/mods/3d_armor/3d_armor/models/3d_armor_character.blend1 new file mode 100644 index 0000000..106e17f Binary files /dev/null and b/mods/3d_armor/3d_armor/models/3d_armor_character.blend1 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 index 6da2959..36ae692 100644 Binary files a/mods/3d_armor/3d_armor/models/3d_armor_female.b3d 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 index e6ff982..66d93ab 100644 Binary files a/mods/3d_armor/3d_armor/models/3d_armor_female.blend and b/mods/3d_armor/3d_armor/models/3d_armor_female.blend differ diff --git a/mods/3d_armor/3d_armor/models/3d_armor_female.blend.b3d b/mods/3d_armor/3d_armor/models/3d_armor_female.blend.b3d deleted file mode 100644 index 0003ffd..0000000 Binary files a/mods/3d_armor/3d_armor/models/3d_armor_female.blend.b3d and /dev/null differ diff --git a/mods/3d_armor/3d_armor/models/3d_armor_female.blend1 b/mods/3d_armor/3d_armor/models/3d_armor_female.blend1 index 6bb7e31..7d53572 100644 Binary files a/mods/3d_armor/3d_armor/models/3d_armor_female.blend1 and b/mods/3d_armor/3d_armor/models/3d_armor_female.blend1 differ diff --git a/mods/3d_armor/README.md b/mods/3d_armor/README.md index 7bfefc0..57bcf62 100644 --- a/mods/3d_armor/README.md +++ b/mods/3d_armor/README.md @@ -1,5 +1,7 @@ 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) diff --git a/mods/3d_armor/screenshot.png b/mods/3d_armor/screenshot.png index c1f9e58..637944a 100644 Binary files a/mods/3d_armor/screenshot.png 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 index c6c90de..69a1b93 100644 --- a/mods/3d_armor/settingtypes.txt +++ b/mods/3d_armor/settingtypes.txt @@ -44,6 +44,9 @@ 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 diff --git a/mods/bazm/depends.txt b/mods/bazm/depends.txt deleted file mode 100644 index d413ba5..0000000 --- a/mods/bazm/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -explosions diff --git a/mods/bazm/init.lua b/mods/bazm/init.lua index 907d163..83f8fea 100644 --- a/mods/bazm/init.lua +++ b/mods/bazm/init.lua @@ -3,7 +3,7 @@ local S = minetest.get_translator(minetest.get_current_modname()) local function register_tnt(name, def) local primed_name = "bazm:primed_" .. name - local name = "bazm:" .. name + name = "bazm:" .. name local explode_hear_dist = 4 * math.sqrt(def.strength) local function on_blast_break(pos) @@ -125,8 +125,8 @@ minetest.register_craft({ type = "shaped", output = "bazm:nuke", recipe = { - {"basic_materials:energy_crystal_simple", "basic_materials:energy_crystal_simple", "basic_materials:energy_crystal_simple"}, - {"basic_materials:energy_crystal_simple", "basic_materials:ic", "basic_materials:energy_crystal_simple"}, - {"basic_materials:energy_crystal_simple", "basic_materials:energy_crystal_simple", "basic_materials:energy_crystal_simple"}, + {"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/mod.conf b/mods/bazm/mod.conf new file mode 100644 index 0000000..23e6026 --- /dev/null +++ b/mods/bazm/mod.conf @@ -0,0 +1,4 @@ +name = bazm +description = Explosive Weapons +depends = default, explosions, nuclearz +optional_depends = diff --git a/mods/beauty_pack/.luacheckrc b/mods/beauty_pack/.luacheckrc index 63dec44..6e774c9 100644 --- a/mods/beauty_pack/.luacheckrc +++ b/mods/beauty_pack/.luacheckrc @@ -4,7 +4,8 @@ allow_defined_top = true globals = { "minetest", "player_api", - "armor" + "armor", + "dye" } read_globals = { diff --git a/mods/beauty_pack/closet/api/api_container.lua b/mods/beauty_pack/closet/api/api_container.lua index 2f145df..4083c2d 100644 --- a/mods/beauty_pack/closet/api/api_container.lua +++ b/mods/beauty_pack/closet/api/api_container.lua @@ -16,7 +16,7 @@ end) function closet.compose_preview(clicker, gender) local inv = clicker:get_inventory() local inv_list = inv:get_list("cloths") - local head, upper, lower, underwear + 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") @@ -27,6 +27,8 @@ function closet.compose_preview(clicker, gender) 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 @@ -48,6 +50,9 @@ function closet.compose_preview(clicker, gender) if lower then preview= preview .. ":8,40="..lower end + if footwear then + preview= preview .. ":8,40="..footwear + end return preview end @@ -62,17 +67,30 @@ end --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) - local model = player_api.get_gender_model(gender) + --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;3,0.25;1,4]" .. + "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) @@ -82,15 +100,19 @@ end -- Allow only "cloth" groups to put/move minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info) - local stack + local stack, from_inv, to_index 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 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 @@ -102,10 +124,28 @@ minetest.register_allow_player_inventory_action(function(player, action, invento return 0 end --search for another cloth of the same type - local cloth_list = player:get_inventory():get_list("cloths") + local player_inv = player:get_inventory() + local cloth_list = player_inv:get_list("cloths") for i = 1, #cloth_list do - local cloth_type = minetest.get_item_group(cloth_list[i]:get_name(), "cloth") + 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 @@ -120,8 +160,9 @@ minetest.register_on_player_inventory_action(function(player, action, inventory, --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 - update_cloths = true 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 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/default_clothes/init.lua b/mods/beauty_pack/default_clothes/init.lua index af5a9f7..5ea01c5 100644 --- a/mods/beauty_pack/default_clothes/init.lua +++ b/mods/beauty_pack/default_clothes/init.lua @@ -56,3 +56,13 @@ minetest.register_craft({ {"", "", ""}, } }) + +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/minetest_game/beds/api.lua b/mods/minetest_game/beds/api.lua index d049440..9743ebc 100644 --- a/mods/minetest_game/beds/api.lua +++ b/mods/minetest_game/beds/api.lua @@ -95,8 +95,7 @@ function beds.register_bed(name, def) minetest.set_node(pos, {name = name .. "_bottom", param2 = dir}) minetest.set_node(botpos, {name = name .. "_top", param2 = dir}) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end return itemstack diff --git a/mods/minetest_game/beds/locale/beds.id.tr b/mods/minetest_game/beds/locale/beds.id.tr index 401a162..d6e40f7 100644 --- a/mods/minetest_game/beds/locale/beds.id.tr +++ b/mods/minetest_game/beds/locale/beds.id.tr @@ -1,8 +1,8 @@ # textdomain: beds -Leave Bed=Tinggalkan Dipan +Leave Bed=Tinggalkan Ranjang 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 boleh tidur pada waktu malam. -Fancy Bed=Dipan Mewah -Simple Bed=Dipan Sederhana +You can only sleep at night.=Anda hanya dapat tidur pada waktu malam. +Fancy Bed=Ranjang Mewah +Simple Bed=Ranjang Sederhana diff --git a/mods/minetest_game/binoculars/init.lua b/mods/minetest_game/binoculars/init.lua index 7685897..152bf3d 100644 --- a/mods/minetest_game/binoculars/init.lua +++ b/mods/minetest_game/binoculars/init.lua @@ -8,25 +8,16 @@ binoculars = {} local S = minetest.get_translator("binoculars") --- Detect creative mod -local creative_mod = minetest.get_modpath("creative") --- Cache creative mode setting as fallback if creative mod not present -local creative_mode_cache = minetest.settings:get_bool("creative_mode") - - -- Update player property -- Global to allow overriding function binoculars.update_player_property(player) - local creative_enabled = - (creative_mod and creative.is_enabled_for(player:get_player_name())) or - creative_mode_cache local new_zoom_fov = 0 if player:get_inventory():contains_item( "main", "binoculars:binoculars") then new_zoom_fov = 10 - elseif creative_enabled then + elseif minetest.is_creative_enabled(player:get_player_name()) then new_zoom_fov = 15 end diff --git a/mods/minetest_game/binoculars/locale/binoculars.id.tr b/mods/minetest_game/binoculars/locale/binoculars.id.tr index b1eb6d5..9a34044 100644 --- a/mods/minetest_game/binoculars/locale/binoculars.id.tr +++ b/mods/minetest_game/binoculars/locale/binoculars.id.tr @@ -1,3 +1,3 @@ # textdomain: binoculars -Binoculars=Binokular -Use with 'Zoom' key=Pakai dengan tombol 'Zum' +Binoculars=Teropong +Use with 'Zoom' key=Pakai dengan tombol 'Zoom' diff --git a/mods/minetest_game/binoculars/mod.conf b/mods/minetest_game/binoculars/mod.conf index 7d73741..4a64ce5 100644 --- a/mods/minetest_game/binoculars/mod.conf +++ b/mods/minetest_game/binoculars/mod.conf @@ -1,4 +1,3 @@ name = binoculars description = Minetest Game mod: binoculars depends = default -optional_depends = creative diff --git a/mods/minetest_game/boats/init.lua b/mods/minetest_game/boats/init.lua index f9ae8e0..cb89e91 100644 --- a/mods/minetest_game/boats/init.lua +++ b/mods/minetest_game/boats/init.lua @@ -119,8 +119,7 @@ function boat.on_punch(self, puncher) if not self.driver then self.removed = true local inv = puncher:get_inventory() - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(name)) + 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 @@ -268,8 +267,7 @@ minetest.register_craftitem("boats:boat", { boat: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 + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end end diff --git a/mods/minetest_game/bones/init.lua b/mods/minetest_game/bones/init.lua index 5e54259..54d3f14 100644 --- a/mods/minetest_game/bones/init.lua +++ b/mods/minetest_game/bones/init.lua @@ -141,8 +141,18 @@ local function may_replace(pos, player) return false end - -- allow replacing air and liquids - if node_name == "air" or node_definition.liquidtype ~= "none" then + -- 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 @@ -154,8 +164,7 @@ local function may_replace(pos, player) -- 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 - -- exception are of course any protected buildable_to - return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name()) + return node_definition.buildable_to end local drop = function(pos, itemstack) @@ -182,7 +191,6 @@ local function is_all_empty(player_inv) 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" @@ -194,8 +202,7 @@ minetest.register_on_dieplayer(function(player) local pos_string = minetest.pos_to_string(pos) -- return if keep inventory set or in creative mode - if bones_mode == "keep" or (creative and creative.is_enabled_for - and creative.is_enabled_for(player:get_player_name())) then + 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 diff --git a/mods/minetest_game/carts/cart_entity.lua b/mods/minetest_game/carts/cart_entity.lua index 4ff87d2..c06f0a3 100644 --- a/mods/minetest_game/carts/cart_entity.lua +++ b/mods/minetest_game/carts/cart_entity.lua @@ -108,8 +108,7 @@ function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, end -- Pick up cart local inv = puncher:get_inventory() - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(puncher:get_player_name())) + 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 @@ -416,8 +415,7 @@ minetest.register_craftitem("carts:cart", { minetest.sound_play({name = "default_place_node_metal", gain = 0.5}, {pos = pointed_thing.above}, true) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(placer:get_player_name())) then + if not minetest.is_creative_enabled(placer:get_player_name()) then itemstack:take_item() end return itemstack diff --git a/mods/minetest_game/carts/locale/carts.id.tr b/mods/minetest_game/carts/locale/carts.id.tr index 17edc80..ea53ba1 100644 --- a/mods/minetest_game/carts/locale/carts.id.tr +++ b/mods/minetest_game/carts/locale/carts.id.tr @@ -3,4 +3,4 @@ Rail=Rel Powered Rail=Rel Bertenaga Brake Rail=Rel Rem Cart=Kereta -(Sneak+Click to pick up)=(selinap + klik untuk ambil) +(Sneak+Click to pick up)=(Menyelinap + Klik untuk ambil) diff --git a/mods/minetest_game/carts/locale/carts.ru.tr b/mods/minetest_game/carts/locale/carts.ru.tr index 6ff5be6..9fc60ce 100644 --- a/mods/minetest_game/carts/locale/carts.ru.tr +++ b/mods/minetest_game/carts/locale/carts.ru.tr @@ -1,6 +1,6 @@ # textdomain: carts Cart=Вагонетка (Sneak+Click to pick up)=(Пригнитесь и кликните по вагонетке, чтобы забрать) -Rail=Рельса -Powered Rail=Механизированная Рельса -Brake Rail=Рельса с тормозом +Rail=Рельсы +Powered Rail=Запитанные рельсы +Brake Rail=Тормозящие рельсы diff --git a/mods/minetest_game/creative/init.lua b/mods/minetest_game/creative/init.lua index 31af37c..f313485 100644 --- a/mods/minetest_game/creative/init.lua +++ b/mods/minetest_game/creative/init.lua @@ -79,7 +79,7 @@ end -- Unlimited node placement minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) if placer and placer:is_player() then - return creative.is_enabled_for(placer:get_player_name()) + return minetest.is_creative_enabled(placer:get_player_name()) end end) @@ -87,7 +87,7 @@ end) 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 creative.is_enabled_for(digger:get_player_name()) then + not minetest.is_creative_enabled(digger:get_player_name()) then return old_handle_node_drops(pos, drops, digger) end local inv = digger:get_inventory() diff --git a/mods/minetest_game/creative/inventory.lua b/mods/minetest_game/creative/inventory.lua index e22cfc1..46da80a 100644 --- a/mods/minetest_game/creative/inventory.lua +++ b/mods/minetest_game/creative/inventory.lua @@ -33,7 +33,7 @@ function creative.init_creative_inventory(player) 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 creative.is_enabled_for(name) or + if not minetest.is_creative_enabled(name) or to_list == "main" then return 0 end @@ -44,7 +44,7 @@ function creative.init_creative_inventory(player) end, allow_take = function(inv, listname, index, stack, player2) local name = player2 and player2:get_player_name() or "" - if not creative.is_enabled_for(name) then + if not minetest.is_creative_enabled(name) then return 0 end return -1 @@ -143,7 +143,7 @@ function creative.register_tab(name, title, items) sfinv.register_page("creative:" .. name, { title = title, is_in_nav = function(self, player, context) - return creative.is_enabled_for(player:get_player_name()) + return minetest.is_creative_enabled(player:get_player_name()) end, get = function(self, player, context) local player_name = player:get_player_name() @@ -248,7 +248,7 @@ creative.register_tab("craftitems", S("Items"), registered_craftitems) local old_homepage_name = sfinv.get_homepage_name function sfinv.get_homepage_name(player) - if creative.is_enabled_for(player:get_player_name()) then + if minetest.is_creative_enabled(player:get_player_name()) then return "creative:all" else return old_homepage_name(player) diff --git a/mods/minetest_game/default/locale/default.de.tr b/mods/minetest_game/default/locale/default.de.tr index 9a3b8bd..3104a28 100644 --- a/mods/minetest_game/default/locale/default.de.tr +++ b/mods/minetest_game/default/locale/default.de.tr @@ -42,7 +42,7 @@ Stone=Stein Cobblestone=Kopfsteinpflaster Stone Brick=Steinziegel Stone Block=Steinblock -Mossy Cobblestone=Mosiges Kopfsteinpflaster +Mossy Cobblestone=Moosiges Kopfsteinpflaster Desert Stone=Wüstenstein Desert Cobblestone=Wüstenkopfsteinpflaster Desert Stone Brick=Wüstensteinziegel diff --git a/mods/minetest_game/default/locale/default.id.tr b/mods/minetest_game/default/locale/default.id.tr index 7a0406c..9d9a3f6 100644 --- a/mods/minetest_game/default/locale/default.id.tr +++ b/mods/minetest_game/default/locale/default.id.tr @@ -22,7 +22,7 @@ Obsidian Brick=Tembok Obsidian Obsidian Block=Balok Obsidian Dirt=Tanah Dirt with Grass=Tanah Berumput -Dirt with Grass and Footsteps=Tanah Berumput dan Tapak Kaki +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 @@ -36,37 +36,37 @@ Sand=Pasir Desert Sand=Pasir Gurun Silver Sand=Pasir Perak Gravel=Kerikil -Clay=Semen +Clay=Tanah Liat Snow=Salju Snow Block=Balok Salju Ice=Es -Cave Ice=Es Gua +Cave Ice=Gua Es Apple Tree=Pohon Apel Apple Wood Planks=Papan Kayu Pohon Apel -Apple Tree Sapling=Bibit 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=Bibit Pohon Rimba -Emergent Jungle Tree Sapling=Bibit Bertumbuh 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=Bibit 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=Bibit 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=Bibit Aspen +Aspen Tree Sapling=Anak Pohon Aspen Coal Ore=Bijih Batu Bara Coal Block=Balok Batu Bara -Iron Ore=Biji Besi +Iron Ore=Bijih Besi Steel Block=Balok Baja Copper Ore=Bijih Tembaga Copper Block=Balok Tembaga @@ -87,13 +87,13 @@ Jungle Grass=Rumput Rimba Grass=Rumput Savanna Grass=Rumput Sabana Fern=Pakis -Marram Grass=Rumput Pantai +Marram Grass=Rumput Maram Bush Stem=Batang Semak Bush Leaves=Daun Semak -Bush Sapling=Bibit Semak -Blueberry Bush Leaves with Berries=Daun Bluberi Berbuah -Blueberry Bush Leaves=Daun Bluberi -Blueberry Bush Sapling=Bibit Bluberi +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 @@ -139,12 +139,12 @@ Mese Post Light=Lampu Taman Mese Cloud=Awan @1 will intersect protection on growth.=@1 akan memotong perlindungan ketika tumbuh. Torch=Obor -Wooden Pickaxe=Beliung Kayu -Stone Pickaxe=Beliung Batu -Bronze Pickaxe=Beliung Perunggu -Steel Pickaxe=Beliung Baja -Mese Pickaxe=Beliung Mese -Diamond Pickaxe=Beliung Berlian +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 @@ -167,7 +167,7 @@ Key=Kunci Furnace is empty=Tungku kosong 100% (output full)=100% (keluaran penuh) @1%=@1% -Not cookable=Tidak bisa dimasak +Not cookable=Tidak dapat dimasak Empty=Kosong Furnace active=Tungku nyala Furnace inactive=Tungku mati @@ -182,12 +182,12 @@ 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=Bluberi +Blueberries=Blueberry Book=Buku Book with Text=Buku Tertulis Bronze Ingot=Perunggu Batangan Clay Brick=Bata -Clay Lump=Bongkahan Semen +Clay Lump=Bongkahan Tanah Liat Coal Lump=Bongkahan Batu Bara Copper Ingot=Tembaga Batangan Copper Lump=Bongkahan Tembaga @@ -207,5 +207,5 @@ Tin Lump=Bongkahan Timah 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=suatu peti terkunci +a locked chest=peti terkunci Chest=Peti diff --git a/mods/minetest_game/default/nodes.lua b/mods/minetest_game/default/nodes.lua index 2646fcf..3629ad1 100644 --- a/mods/minetest_game/default/nodes.lua +++ b/mods/minetest_game/default/nodes.lua @@ -2036,8 +2036,7 @@ minetest.register_node("default:sand_with_kelp", { not minetest.is_protected(pos_top, player_name) then minetest.set_node(pos, {name = "default:sand_with_kelp", param2 = height * 16}) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end else @@ -2092,7 +2091,7 @@ local function coral_on_place(itemstack, placer, pointed_thing) node_under.name = itemstack:get_name() minetest.set_node(pos_under, node_under) - if not (creative and creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end diff --git a/mods/minetest_game/default/trees.lua b/mods/minetest_game/default/trees.lua index a850644..569beee 100644 --- a/mods/minetest_game/default/trees.lua +++ b/mods/minetest_game/default/trees.lua @@ -575,8 +575,7 @@ function default.sapling_on_place(itemstack, placer, pointed_thing, minetest.log("action", player_name .. " places node " .. sapling_name .. " at " .. minetest.pos_to_string(pos)) - local take_item = not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) + 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) diff --git a/mods/minetest_game/doors/init.lua b/mods/minetest_game/doors/init.lua index 498d24f..2beb568 100644 --- a/mods/minetest_game/doors/init.lua +++ b/mods/minetest_game/doors/init.lua @@ -330,7 +330,7 @@ function doors.register(name, def) meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) end - if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then + if not minetest.is_creative_enabled(pn) then itemstack:take_item() end @@ -591,7 +591,7 @@ function doors.register_trapdoor(name, def) meta:set_string("owner", pn) meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn)) - return (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) + return minetest.is_creative_enabled(pn) end def.on_blast = function() end diff --git a/mods/minetest_game/dye/locale/dye.id.tr b/mods/minetest_game/dye/locale/dye.id.tr index 1614345..4122875 100644 --- a/mods/minetest_game/dye/locale/dye.id.tr +++ b/mods/minetest_game/dye/locale/dye.id.tr @@ -13,4 +13,4 @@ Brown Dye=Pewarna Cokelat Orange Dye=Pewarna Oranye Red Dye=Pewarna Merah Magenta Dye=Pewarna Magenta -Pink Dye=Pewarna Jambon +Pink Dye=Pewarna Merah Jambu diff --git a/mods/minetest_game/dye/locale/dye.zh_CN.tr b/mods/minetest_game/dye/locale/dye.zh_CN.tr index 8dcf311..11bf9cb 100644 --- a/mods/minetest_game/dye/locale/dye.zh_CN.tr +++ b/mods/minetest_game/dye/locale/dye.zh_CN.tr @@ -1,16 +1,16 @@ # textdomain: dye -White Dye=白染料 -Grey Dye=灰染料 +White Dye=白色染料 +Grey Dye=灰色染料 Dark Grey Dye=暗灰染料 -Black Dye=黑染料 -Violet Dye=紫染料 -Blue Dye=蓝染料 -Cyan Dye=青染料 +Black Dye=黑色染料 +Violet Dye=紫色染料 +Blue Dye=蓝色染料 +Cyan Dye=青色染料 Dark Green Dye=暗绿染料 -Green Dye=绿染料 -Yellow Dye=黄染料 -Brown Dye=棕染料 -Orange Dye=橙染料 -Red 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 index cc60a21..b84d07e 100644 --- a/mods/minetest_game/dye/locale/dye.zh_TW.tr +++ b/mods/minetest_game/dye/locale/dye.zh_TW.tr @@ -1,16 +1,16 @@ # textdomain: dye -White Dye=白染料 -Grey Dye=灰染料 +White Dye=白色染料 +Grey Dye=灰色染料 Dark Grey Dye=暗灰染料 -Black Dye=黑染料 -Violet Dye=紫染料 -Blue Dye=藍染料 -Cyan Dye=青染料 +Black Dye=黑色染料 +Violet Dye=紫色染料 +Blue Dye=藍色染料 +Cyan Dye=青色染料 Dark Green Dye=暗綠染料 -Green Dye=綠染料 -Yellow Dye=黃染料 -Brown Dye=棕染料 -Orange Dye=橙染料 -Red Dye=紅染料 +Green Dye=綠色染料 +Yellow Dye=黃色染料 +Brown Dye=棕色染料 +Orange Dye=橙色染料 +Red Dye=紅色染料 Magenta Dye=品紅染料 Pink Dye=粉紅染料 diff --git a/mods/minetest_game/farming/api.lua b/mods/minetest_game/farming/api.lua index 91d557c..17a5fa7 100644 --- a/mods/minetest_game/farming/api.lua +++ b/mods/minetest_game/farming/api.lua @@ -45,12 +45,14 @@ farming.hoe_on_use = function(itemstack, user, pointed_thing, uses) return end - if minetest.is_protected(pt.under, user:get_player_name()) then - minetest.record_protection_violation(pt.under, user:get_player_name()) + 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, user:get_player_name()) then - minetest.record_protection_violation(pt.above, user:get_player_name()) + if minetest.is_protected(pt.above, player_name) then + minetest.record_protection_violation(pt.above, player_name) return end @@ -61,8 +63,7 @@ farming.hoe_on_use = function(itemstack, user, pointed_thing, uses) gain = 0.5, }, true) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(user:get_player_name())) then + if not minetest.is_creative_enabled(player_name) then -- wear tool local wdef = itemstack:get_definition() itemstack:add_wear(65535/(uses-1)) @@ -181,8 +182,7 @@ farming.place_seed = function(itemstack, placer, pointed_thing, plantname) minetest.pos_to_string(pt.above)) minetest.add_node(pt.above, {name = plantname, param2 = 1}) tick(pt.above) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end return itemstack diff --git a/mods/minetest_game/fire/init.lua b/mods/minetest_game/fire/init.lua index b69a731..621e00e 100644 --- a/mods/minetest_game/fire/init.lua +++ b/mods/minetest_game/fire/init.lua @@ -111,8 +111,7 @@ minetest.register_tool("fire:flint_and_steel", { minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"}) end end - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then -- Wear tool local wdef = itemstack:get_definition() itemstack:add_wear(1000) diff --git a/mods/minetest_game/fire/locale/fire.id.tr b/mods/minetest_game/fire/locale/fire.id.tr index 60c1c01..a6d2da5 100644 --- a/mods/minetest_game/fire/locale/fire.id.tr +++ b/mods/minetest_game/fire/locale/fire.id.tr @@ -1,4 +1,4 @@ # textdomain: fire Fire=Api Permanent Fire=Api Abadi -Flint and Steel=Pemantik +Flint and Steel=Pemantik Api diff --git a/mods/minetest_game/fireflies/init.lua b/mods/minetest_game/fireflies/init.lua index 0d70630..59a40c5 100644 --- a/mods/minetest_game/fireflies/init.lua +++ b/mods/minetest_game/fireflies/init.lua @@ -92,8 +92,9 @@ 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:get_player_name()) then + minetest.is_protected(pointed_thing.under, player_name) then return end local node_name = minetest.get_node(pointed_thing.under).name @@ -106,7 +107,7 @@ minetest.register_tool("fireflies:bug_net", { minetest.add_item(pointed_thing.under, node_name.." 1") end end - if not (creative and creative.is_enabled_for(player:get_player_name())) then + if not minetest.is_creative_enabled(player_name) then itemstack:add_wear(256) return itemstack end diff --git a/mods/minetest_game/flowers/init.lua b/mods/minetest_game/flowers/init.lua index 4fc3512..b670e4d 100644 --- a/mods/minetest_game/flowers/init.lua +++ b/mods/minetest_game/flowers/init.lua @@ -342,8 +342,7 @@ local waterlily_def = { minetest.set_node(pos, {name = "flowers:waterlily" .. (def.waving == 3 and "_waving" or ""), param2 = math.random(0, 3)}) - if not (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end else diff --git a/mods/minetest_game/map/init.lua b/mods/minetest_game/map/init.lua index 7c1e36f..227d65a 100644 --- a/mods/minetest_game/map/init.lua +++ b/mods/minetest_game/map/init.lua @@ -9,18 +9,11 @@ map = {} local S = minetest.get_translator("map") --- Cache creative mode setting - -local creative_mode_cache = minetest.settings:get_bool("creative_mode") - - -- Update HUD flags -- Global to allow overriding function map.update_hud_flags(player) - local creative_enabled = - (creative and creative.is_enabled_for(player:get_player_name())) or - creative_mode_cache + 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") diff --git a/mods/minetest_game/map/mod.conf b/mods/minetest_game/map/mod.conf index 2099c19..bb045c7 100644 --- a/mods/minetest_game/map/mod.conf +++ b/mods/minetest_game/map/mod.conf @@ -1,4 +1,3 @@ name = map description = Minetest Game mod: map depends = default, dye -optional_depends = creative 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..eae1cfb --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_CN.tr @@ -0,0 +1,57 @@ +# textdomain: mtg_craftguide +# This Translation by IFRFSX + +### init.lua ### + +Any black dye=任何黑色染料 +Any black flower=任何黑色花朵 +Any blue dye=任何蓝色染料 +Any blue flower=任何蓝色花朵 +Any brown dye=任何棕色染料 +Any coal=任何煤炭 +Any cyan dye=任何青色染料 +Any dark green dye=任何暗绿染料 +Any dark grey dye=任何暗灰染料 +Any green dye=任何绿色染料 +Any green flower=任何绿色花朵 +Any grey dye=任何灰色染料 +Any item belonging to the group(s): @1=属于该组的任何项目:@1 +Any kind of stone block=任何种类的石块 +Any magenta dye=任何品红染料 +Any orange dye=任何橙色染料 +Any orange flower=任何橙色花朵 +Any pink dye=任何粉色染料 +Any red dye=任何红色染料 +Any red flower=任何红色花朵 +Any sand=任何沙子 +Any stick=任何棒 +Any vessel=任何容器 +Any violet dye=任何紫色染料 +Any violet flower=任何紫色花朵 +Any white dye=任何白色染料 +Any white flower=任何白色花朵 +Any wood planks=任何木板 +Any wool=任何羊毛 +Any yellow dye=任何黄色染料 +Any yellow flower=任何黄色花朵 +Click again to show recipes.=再次单击以显示配方。 +Click again to show usages.=再次单击以显示用法 +Cooking time: @1=烹饪时间:@1 +Fuel=燃料 +# Label for group ingredients +G=组 +Next page=下一页 +Next recipe=下一配方 +No items to show.=没有项目可以显示。 +No recipes.=没有配方。 +No usages.=没有用法 +Previous page=上一页 +Previous recipe=上一配方 +Recipe @1 of @2=配方@1,共@2个 +Recipe is too big to be displayed.=配方太大,无法显示 +Recipes=配方 +Reset=重置 +Search=搜索 +Shapeless=没有形状 +Unknown Item=未知项目 +Usage @1 of @2=用法@1,共@2个 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..2f01511 --- /dev/null +++ b/mods/minetest_game/mtg_craftguide/locale/mtg_craftguide.zh_TW.tr @@ -0,0 +1,57 @@ +# textdomain: mtg_craftguide +# This Translation by IFRFSX + +### init.lua ### + +Any black dye=任何黑色染料 +Any black flower=任何黑色花朵 +Any blue dye=任何藍色染料 +Any blue flower=任何藍色花朵 +Any brown dye=任何棕色染料 +Any coal=任何煤炭 +Any cyan dye=任何青色染料 +Any dark green dye=任何暗綠染料 +Any dark grey dye=任何暗灰染料 +Any green dye=任何綠色染料 +Any green flower=任何綠色花朵 +Any grey dye=任何灰色染料 +Any item belonging to the group(s): @1=屬於該組的任何項目:@1 +Any kind of stone block=任何種類的石塊 +Any magenta dye=任何品紅染料 +Any orange dye=任何橙色染料 +Any orange flower=任何橙色花朵 +Any pink dye=任何粉色染料 +Any red dye=任何紅色染料 +Any red flower=任何紅色花朵 +Any sand=任何沙子 +Any stick=任何棒 +Any vessel=任何容器 +Any violet dye=任何紫色染料 +Any violet flower=任何紫色花朵 +Any white dye=任何白色染料 +Any white flower=任何白色花朵 +Any wood planks=任何木板 +Any wool=任何羊毛 +Any yellow dye=任何黃色染料 +Any yellow flower=任何黃色花朵 +Click again to show recipes.=再次單擊以顯示配方。 +Click again to show usages.=再次單擊以顯示用法 +Cooking time: @1=烹飪時間:@1 +Fuel=燃料 +# Label for group ingredients +G=組 +Next page=下一頁 +Next recipe=下一配方 +No items to show.=沒有項目可以顯示。 +No recipes.=沒有配方。 +No usages.=沒有用法 +Previous page=上一頁 +Previous recipe=上一配方 +Recipe @1 of @2=配方@1,共@2個 +Recipe is too big to be displayed.=配方太大,無法顯示 +Recipes=配方 +Reset=重置 +Search=搜索 +Shapeless=沒有形狀 +Unknown Item=未知項目 +Usage @1 of @2=用法@1,共@2個 diff --git a/mods/minetest_game/player_api/api.lua b/mods/minetest_game/player_api/api.lua index c9de740..db32719 100644 --- a/mods/minetest_game/player_api/api.lua +++ b/mods/minetest_game/player_api/api.lua @@ -172,7 +172,8 @@ function minetest.calculate_knockback(player, ...) end -- Check each player and apply animations -minetest.register_globalstep(function() +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] @@ -186,6 +187,52 @@ minetest.register_globalstep(function() 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 + -- Apply animations based on what the player is doing if player:get_hp() == 0 then player_set_animation(player, "lay") @@ -196,14 +243,54 @@ minetest.register_globalstep(function() player_sneak[name] = controls.sneak end if controls.LMB or controls.RMB then - player_set_animation(player, "walk_mine", animation_speed_mod) + 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 - player_set_animation(player, "walk", animation_speed_mod) + 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 - player_set_animation(player, "mine", animation_speed_mod) + 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 - player_set_animation(player, "stand", animation_speed_mod) + 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 diff --git a/mods/minetest_game/player_api/cloths.lua b/mods/minetest_game/player_api/cloths.lua index e99cafd..bbb4c77 100644 --- a/mods/minetest_game/player_api/cloths.lua +++ b/mods/minetest_game/player_api/cloths.lua @@ -21,8 +21,10 @@ function player_api.register_cloth(name, def) tooltip = S("Head") elseif def.groups["cloth"] == 2 then tooltip = S("Upper") - else + elseif def.groups["cloth"] == 3 then tooltip = S("Lower") + else + tooltip = S("Footwear") end tooltip = "(" .. tooltip .. ")" local gender, gender_color @@ -69,6 +71,16 @@ player_api.register_cloth("player_api:cloth_female_lower_default", { 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", @@ -113,6 +125,7 @@ function player_api.set_cloths(player) 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 function player_api.compose_cloth(player) @@ -120,9 +133,7 @@ function player_api.compose_cloth(player) local gender = meta:get_string("gender") local inv = player:get_inventory() local inv_list = inv:get_list("cloths") - local upper_ItemStack - local lower_ItemStack - local head_ItemStack + local upper_ItemStack, lower_ItemStack, footwear_ItemStack, head_ItemStack local underwear = false for i = 1, #inv_list do local item_name = inv_list[i]:get_name() @@ -136,6 +147,8 @@ function player_api.compose_cloth(player) elseif cloth_type == 3 then lower_ItemStack = minetest.registered_items[item_name]._cloth_texture underwear = true + elseif cloth_type == 4 then + footwear_ItemStack = minetest.registered_items[item_name]._cloth_texture end end if not(underwear) then @@ -154,6 +167,9 @@ function player_api.compose_cloth(player) if lower_ItemStack then cloth = cloth .. ":0,32="..lower_ItemStack end + if footwear_ItemStack then + cloth = cloth .. ":0,32="..footwear_ItemStack + end if head_ItemStack then cloth = cloth .. ":48,0="..head_ItemStack end diff --git a/mods/minetest_game/player_api/init.lua b/mods/minetest_game/player_api/init.lua index 4412906..d41475a 100644 --- a/mods/minetest_game/player_api/init.lua +++ b/mods/minetest_game/player_api/init.lua @@ -9,12 +9,16 @@ player_api.register_model("character.b3d", { 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}, + 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}, + 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}, }, collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, stepheight = 0.6, @@ -36,6 +40,10 @@ player_api.register_model("female.b3d", { 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}, }, collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3}, stepheight = 0.6, @@ -54,11 +62,4 @@ minetest.register_on_joinplayer(function(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 - player:set_local_animation( - {x = 0, y = 79}, - {x = 168, y = 187}, - {x = 189, y = 198}, - {x = 200, y = 219}, - 30 - ) end) diff --git a/mods/minetest_game/player_api/locale/player_api.es.tr b/mods/minetest_game/player_api/locale/player_api.es.tr index f982faf..c8a500c 100644 --- a/mods/minetest_game/player_api/locale/player_api.es.tr +++ b/mods/minetest_game/player_api/locale/player_api.es.tr @@ -8,8 +8,10 @@ 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/textures/cloth_female_lower_default.png b/mods/minetest_game/player_api/textures/cloth_female_lower_default.png index 6430fab..ace59f1 100644 Binary files a/mods/minetest_game/player_api/textures/cloth_female_lower_default.png 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_preview.png b/mods/minetest_game/player_api/textures/cloth_female_lower_preview.png index 9d63aca..7e8291e 100644 Binary files a/mods/minetest_game/player_api/textures/cloth_female_lower_preview.png and b/mods/minetest_game/player_api/textures/cloth_female_lower_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 index 514b179..5786525 100644 Binary files a/mods/minetest_game/player_api/textures/cloth_male_lower_default.png 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_preview.png b/mods/minetest_game/player_api/textures/cloth_male_lower_preview.png index 6b74213..d841b7a 100644 Binary files a/mods/minetest_game/player_api/textures/cloth_male_lower_preview.png and b/mods/minetest_game/player_api/textures/cloth_male_lower_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..82359f7 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/screwdriver/init.lua b/mods/minetest_game/screwdriver/init.lua index 82fbaab..98548f0 100644 --- a/mods/minetest_game/screwdriver/init.lua +++ b/mods/minetest_game/screwdriver/init.lua @@ -140,8 +140,7 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses) minetest.check_for_falling(pos) end - if not (creative and creative.is_enabled_for and - creative.is_enabled_for(player_name)) then + if not minetest.is_creative_enabled(player_name) then itemstack:add_wear(65535 / ((uses or 200) - 1)) end diff --git a/mods/minetest_game/stairs/init.lua b/mods/minetest_game/stairs/init.lua index 317ee4c..68395bb 100644 --- a/mods/minetest_game/stairs/init.lua +++ b/mods/minetest_game/stairs/init.lua @@ -197,8 +197,6 @@ function stairs.register_slab(subname, recipeitem, groups, images, description, local under = minetest.get_node(pointed_thing.under) local wield_item = itemstack:get_name() local player_name = placer and placer:get_player_name() or "" - local creative_enabled = (creative and creative.is_enabled_for - and creative.is_enabled_for(player_name)) if under and under.name:find("^stairs:slab_") then -- place slab using under node orientation @@ -217,7 +215,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description, -- else attempt to place node with proper param2 minetest.item_place_node(ItemStack(wield_item), placer, pointed_thing, p2) - if not creative_enabled then + if not minetest.is_creative_enabled(player_name) then itemstack:take_item() end return itemstack diff --git a/mods/minetest_game/stairs/locale/stairs.de.tr b/mods/minetest_game/stairs/locale/stairs.de.tr index 41c055b..beb4579 100644 --- a/mods/minetest_game/stairs/locale/stairs.de.tr +++ b/mods/minetest_game/stairs/locale/stairs.de.tr @@ -35,10 +35,10 @@ Cobblestone Stair=Kopfsteinpflastertreppe Inner Cobblestone Stair=Innere Kopfsteinpflastertreppe Outer Cobblestone Stair=Äußere Kopfsteinpflastertreppe Cobblestone Slab=Kopfsteinpflasterplatte -Mossy Cobblestone Stair=Mosige Kopfsteinpflastertreppe -Inner Mossy Cobblestone Stair=Innere mosige Kopfsteinpflastertreppe -Outer Mossy Cobblestone Stair=Äußere mosige Kopfsteinpflastertreppe -Mossy Cobblestone Slab=Mosige 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 diff --git a/mods/minetest_game/walls/locale/walls.de.tr b/mods/minetest_game/walls/locale/walls.de.tr index 76449f6..c31d4f6 100644 --- a/mods/minetest_game/walls/locale/walls.de.tr +++ b/mods/minetest_game/walls/locale/walls.de.tr @@ -1,4 +1,4 @@ # textdomain: walls Cobblestone Wall=Kopfsteinpflastermauer -Mossy Cobblestone Wall=Mosige Kopfsteinpflastermauer +Mossy Cobblestone Wall=Moosige Kopfsteinpflastermauer Desert Cobblestone Wall=Wüstenkopfsteinpflastermauer diff --git a/mods/minetest_game/wool/locale/wool.id.tr b/mods/minetest_game/wool/locale/wool.id.tr index 60e917c..2448e43 100644 --- a/mods/minetest_game/wool/locale/wool.id.tr +++ b/mods/minetest_game/wool/locale/wool.id.tr @@ -13,4 +13,4 @@ Brown Wool=Wol Cokelat Orange Wool=Wol Oranye Red Wool=Wol Merah Magenta Wool=Wol Magenta -Pink Wool=Wol Jambon +Pink Wool=Wol Merah Jambu 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..3c74d27 --- /dev/null +++ b/mods/nuclearz/mod.conf @@ -0,0 +1,4 @@ +name = nuclearz +description = Nuclear Stuff +depends = default +optional_depends = 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/petz/.gitignore b/mods/petz/.gitignore index 70fcf5c..b2f2d79 100644 --- a/mods/petz/.gitignore +++ b/mods/petz/.gitignore @@ -2,3 +2,24 @@ *.obj *.blend1 user.conf + +globals = { + "minetest", + "mobkit", + "stairs", + "bucket", + "armors", + "bonemeal" +} + +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/.luacheckrc b/mods/petz/.luacheckrc index 00ab14c..73cb5d1 100644 --- a/mods/petz/.luacheckrc +++ b/mods/petz/.luacheckrc @@ -11,7 +11,10 @@ globals = { "farming", "player_api", "hunger_ng", - "dye" + "dye", + "armor", + "player_physics", + "player_monoids" } read_globals = { diff --git a/mods/petz/petz/api/api.lua b/mods/petz/petz/api/api.lua index 9308799..722ee4d 100644 --- a/mods/petz/petz/api/api.lua +++ b/mods/petz/petz/api/api.lua @@ -1,43 +1,41 @@ local modpath, S = ... -local creative_mode = minetest.settings:get_bool("creative_mode") - -assert(loadfile(modpath .. "/api/api_helper_functions.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_datetime.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_spawn.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_orders.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_init_prop.lua"))(modpath, S) --Load the init the properties for the entities -assert(loadfile(modpath .. "/api/api_forms.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_on_rightclick.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_on_die.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_on_punch.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_feed_tame.lua"))(modpath, S, creative_mode) +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"))(modpath, 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"))(modpath, S) -assert(loadfile(modpath .. "/api/api_mount.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_dreamcatcher.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_eggs.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_squareball.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_convert.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_nametag.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_dam_beaver.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_particles.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_whistle.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_silk.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_on_step.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_sleep.lua"))(modpath, S) -assert(loadfile(modpath .. "/api/api_env_damage.lua"))(modpath, S) +assert(loadfile(modpath .. "/api/api_wool_milk.lua"))() +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"))(modpath, 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"))(modpath, S) +assert(loadfile(modpath .. "/api/api_horseshoes.lua"))(S) assert(loadfile(modpath .. "/api/api_blood.lua"))() -assert(loadfile(modpath .. "/api/api_poop.lua"))(modpath, S) +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"))(S) +assert(loadfile(modpath .. "/api/api_lifetime.lua"))() diff --git a/mods/petz/petz/api/api_convert.lua b/mods/petz/petz/api/api_convert.lua index 88b4e1b..6e111ac 100644 --- a/mods/petz/petz/api/api_convert.lua +++ b/mods/petz/petz/api/api_convert.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... petz.convert = function(self, player_name) local old_pet_name = petz.first_to_upper(self.type) diff --git a/mods/petz/petz/api/api_dam_beaver.lua b/mods/petz/petz/api/api_dam_beaver.lua index 9353858..3300473 100644 --- a/mods/petz/petz/api/api_dam_beaver.lua +++ b/mods/petz/petz/api/api_dam_beaver.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local modpath = ... -- --Create Dam Beaver Mechanics diff --git a/mods/petz/petz/api/api_datetime.lua b/mods/petz/petz/api/api_datetime.lua index 682901f..c69e969 100644 --- a/mods/petz/petz/api/api_datetime.lua +++ b/mods/petz/petz/api/api_datetime.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.get_os_month = function() local nowTable= os.date('*t') return nowTable.month diff --git a/mods/petz/petz/api/api_dreamcatcher.lua b/mods/petz/petz/api/api_dreamcatcher.lua index 2620203..b5af77c 100644 --- a/mods/petz/petz/api/api_dreamcatcher.lua +++ b/mods/petz/petz/api/api_dreamcatcher.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... -- -- Dreamcatcher (protector for Petz) @@ -77,7 +77,7 @@ petz.create_form_list_by_owner_dreamcatcher = function(user_name, user_pos) return '' end local item_list = "" - local text_color + --local text_color for key, pet_table in ipairs(item_list_table) do local pet = pet_table.pet local pet_type @@ -88,17 +88,17 @@ petz.create_form_list_by_owner_dreamcatcher = function(user_name, user_pos) pet_tag = pet.tag pet_type = pet.type pet_pos = pet.object:get_pos() - text_color = petz.colors["green"] + --text_color = petz.colors["green"] list_pet = true elseif pet_table.metadata.dreamcatcher == true 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"] + --text_color = petz.colors["red"] list_pet = true end if list_pet and pet_pos then - local pet_type = pet.type:gsub("^%l", string.upper) + 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)) diff --git a/mods/petz/petz/api/api_eggs.lua b/mods/petz/petz/api/api_eggs.lua index 2653736..2d9e085 100644 --- a/mods/petz/petz/api/api_eggs.lua +++ b/mods/petz/petz/api/api_eggs.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.increase_egg_count = function(self) self.eggs_count = mobkit.remember(self, "eggs_count", self.eggs_count+1) end diff --git a/mods/petz/petz/api/api_env_damage.lua b/mods/petz/petz/api/api_env_damage.lua index 06818c5..1096c18 100644 --- a/mods/petz/petz/api/api_env_damage.lua +++ b/mods/petz/petz/api/api_env_damage.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- -- Enviromental Damage -- diff --git a/mods/petz/petz/api/api_feed_tame.lua b/mods/petz/petz/api/api_feed_tame.lua index fe85e37..3adf04f 100644 --- a/mods/petz/petz/api/api_feed_tame.lua +++ b/mods/petz/petz/api/api_feed_tame.lua @@ -1,4 +1,4 @@ -local modpath, S, creative_mode = ... +local S= ... petz.insert_tamed_by_owner = function(self) if not self.owner then diff --git a/mods/petz/petz/api/api_forms.lua b/mods/petz/petz/api/api_forms.lua index d4caa2d..eae0e38 100644 --- a/mods/petz/petz/api/api_forms.lua +++ b/mods/petz/petz/api/api_forms.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... petz.create_form = function(player_name, context) local pet = petz.pet[player_name] diff --git a/mods/petz/petz/api/api_helper_functions.lua b/mods/petz/petz/api/api_helper_functions.lua index 31d2841..e164d27 100644 --- a/mods/petz/petz/api/api_helper_functions.lua +++ b/mods/petz/petz/api/api_helper_functions.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- --Helper Functions -- diff --git a/mods/petz/petz/api/api_horseshoes.lua b/mods/petz/petz/api/api_horseshoes.lua index 251c497..fd8473d 100644 --- a/mods/petz/petz/api/api_horseshoes.lua +++ b/mods/petz/petz/api/api_horseshoes.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... petz.put_horseshoe = function(self, clicker) if self.horseshoes >= 4 then diff --git a/mods/petz/petz/api/api_init_prop.lua b/mods/petz/petz/api/api_init_prop.lua index 2330fce..995c51e 100644 --- a/mods/petz/petz/api/api_init_prop.lua +++ b/mods/petz/petz/api/api_init_prop.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- --'set_initial_properties' is call by 'on_activate' for each pet -- diff --git a/mods/petz/petz/api/api_lifetime.lua b/mods/petz/petz/api/api_lifetime.lua index a097f04..c27fef1 100644 --- a/mods/petz/petz/api/api_lifetime.lua +++ b/mods/petz/petz/api/api_lifetime.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.check_lifetime = function(self) local pet_lifetime = petz.settings[self.type.."_lifetime"] --minetest.chat_send_all("test") diff --git a/mods/petz/petz/api/api_mount.lua b/mods/petz/petz/api/api_mount.lua index c651330..6d97818 100644 --- a/mods/petz/petz/api/api_mount.lua +++ b/mods/petz/petz/api/api_mount.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- -- Mount Engine -- diff --git a/mods/petz/petz/api/api_nametag.lua b/mods/petz/petz/api/api_nametag.lua index a908ff1..523c332 100644 --- a/mods/petz/petz/api/api_nametag.lua +++ b/mods/petz/petz/api/api_nametag.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.update_nametag = function(self) local name_tag if self.show_tag == true and self.tag and not(self.tag == "") then diff --git a/mods/petz/petz/api/api_on_die.lua b/mods/petz/petz/api/api_on_die.lua index 0f62729..c17b892 100644 --- a/mods/petz/petz/api/api_on_die.lua +++ b/mods/petz/petz/api/api_on_die.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- --on_die event for all the mobs -- diff --git a/mods/petz/petz/api/api_on_punch.lua b/mods/petz/petz/api/api_on_punch.lua index 917b9ee..b5b5970 100644 --- a/mods/petz/petz/api/api_on_punch.lua +++ b/mods/petz/petz/api/api_on_punch.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.puncher_is_player = function(puncher) if type(puncher) == 'userdata' and puncher:is_player() then return true diff --git a/mods/petz/petz/api/api_on_rightclick.lua b/mods/petz/petz/api/api_on_rightclick.lua index db9627b..8a1ffa8 100644 --- a/mods/petz/petz/api/api_on_rightclick.lua +++ b/mods/petz/petz/api/api_on_rightclick.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... --Context --In this temporary table is saved the reference to an entity by its owner diff --git a/mods/petz/petz/api/api_on_step.lua b/mods/petz/petz/api/api_on_step.lua index 2a169ae..2f0847f 100644 --- a/mods/petz/petz/api/api_on_step.lua +++ b/mods/petz/petz/api/api_on_step.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - 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! diff --git a/mods/petz/petz/api/api_orders.lua b/mods/petz/petz/api/api_orders.lua index 7addff8..267a3ab 100644 --- a/mods/petz/petz/api/api_orders.lua +++ b/mods/petz/petz/api/api_orders.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.ownthing = function(self) self.status = mobkit.remember(self, "status", nil) if self.can_fly then diff --git a/mods/petz/petz/api/api_particles.lua b/mods/petz/petz/api/api_particles.lua index dcdf143..b79e271 100644 --- a/mods/petz/petz/api/api_particles.lua +++ b/mods/petz/petz/api/api_particles.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- --Particle Effects -- diff --git a/mods/petz/petz/api/api_poop.lua b/mods/petz/petz/api/api_poop.lua index bb8ad0e..6232b84 100644 --- a/mods/petz/petz/api/api_poop.lua +++ b/mods/petz/petz/api/api_poop.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - -- --Poop Engine -- diff --git a/mods/petz/petz/api/api_silk.lua b/mods/petz/petz/api/api_silk.lua index 8c332cb..2c809de 100644 --- a/mods/petz/petz/api/api_silk.lua +++ b/mods/petz/petz/api/api_silk.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... --Coocon minetest.register_node("petz:cocoon", { @@ -28,8 +28,7 @@ minetest.register_node("petz:cocoon", { return end if pos and petz.is_night() == true then --only spawn at night, to it does not die - local mob = minetest.add_entity(pos, "petz:moth") - local ent = mob:get_luaentity() + minetest.add_entity(pos, "petz:moth") minetest.set_node(pos, {name= "air"}) return false end diff --git a/mods/petz/petz/api/api_sleep.lua b/mods/petz/petz/api/api_sleep.lua index d6d7692..d072270 100644 --- a/mods/petz/petz/api/api_sleep.lua +++ b/mods/petz/petz/api/api_sleep.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.calculate_sleep_times = function(self) if not petz.settings.sleeping then return diff --git a/mods/petz/petz/api/api_spawn.lua b/mods/petz/petz/api/api_spawn.lua index 36c0b25..abd4d8d 100644 --- a/mods/petz/petz/api/api_spawn.lua +++ b/mods/petz/petz/api/api_spawn.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - petz.get_node_below = function(pos) local pos_below = { x = pos.x, diff --git a/mods/petz/petz/api/api_squareball.lua b/mods/petz/petz/api/api_squareball.lua index 52e381f..66d28a9 100644 --- a/mods/petz/petz/api/api_squareball.lua +++ b/mods/petz/petz/api/api_squareball.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... -- --Square Ball Game for the Puppy diff --git a/mods/petz/petz/api/api_tamagochi.lua b/mods/petz/petz/api/api_tamagochi.lua index 68567bb..0c2fbc4 100644 --- a/mods/petz/petz/api/api_tamagochi.lua +++ b/mods/petz/petz/api/api_tamagochi.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... -- --The Tamagochi Mode diff --git a/mods/petz/petz/api/api_throw.lua b/mods/petz/petz/api/api_throw.lua index 1fc0af3..1ab1fef 100644 --- a/mods/petz/petz/api/api_throw.lua +++ b/mods/petz/petz/api/api_throw.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - --effects can be: fire function petz.throw(self, dtime, damage, effect, particles, sound) diff --git a/mods/petz/petz/api/api_whistle.lua b/mods/petz/petz/api/api_whistle.lua index 2685b4e..d88187b 100644 --- a/mods/petz/petz/api/api_whistle.lua +++ b/mods/petz/petz/api/api_whistle.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... -- Whistle Item diff --git a/mods/petz/petz/api/api_wool_milk.lua b/mods/petz/petz/api/api_wool_milk.lua index 391ace8..c47e4f7 100644 --- a/mods/petz/petz/api/api_wool_milk.lua +++ b/mods/petz/petz/api/api_wool_milk.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - --- ---Refill lamb or milk --- diff --git a/mods/petz/petz/init.lua b/mods/petz/petz/init.lua index 9bd6eeb..1f2d3eb 100644 --- a/mods/petz/petz/init.lua +++ b/mods/petz/petz/init.lua @@ -29,7 +29,7 @@ assert(loadfile(modpath .. "/settings.lua"))(modpath) --Load the settings petz.tamed_by_owner = {} --a list of tamed petz with owner assert(loadfile(modpath .. "/api/api.lua"))(modpath, S) -assert(loadfile(modpath .. "/mobkit/mobkit.lua"))(modpath, S) +assert(loadfile(modpath .. "/mobkit/mobkit.lua"))(modpath) assert(loadfile(modpath .. "/misc/misc.lua"))(modpath, S) assert(loadfile(modpath .. "/server/cron.lua"))(modname) diff --git a/mods/petz/petz/misc/armors.lua b/mods/petz/petz/misc/armors.lua index 82d2089..e2d2233 100644 --- a/mods/petz/petz/misc/armors.lua +++ b/mods/petz/petz/misc/armors.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... petz.armor_destroy = function(name, player) local pos = player:getpos() diff --git a/mods/petz/petz/misc/bonemeal.lua b/mods/petz/petz/misc/bonemeal.lua index de15d94..a8eab28 100644 --- a/mods/petz/petz/misc/bonemeal.lua +++ b/mods/petz/petz/misc/bonemeal.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - --Bonemeal support minetest.register_craft({ diff --git a/mods/petz/petz/misc/chests.lua b/mods/petz/petz/misc/chests.lua index 7ebb328..d9bb69b 100644 --- a/mods/petz/petz/misc/chests.lua +++ b/mods/petz/petz/misc/chests.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... petz.chest = {} petz.chest.open_chests = {} diff --git a/mods/petz/petz/misc/food.lua b/mods/petz/petz/misc/food.lua index e0db695..7a9db0d 100644 --- a/mods/petz/petz/misc/food.lua +++ b/mods/petz/petz/misc/food.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... --Ducky/Chicken Eggs diff --git a/mods/petz/petz/misc/items.lua b/mods/petz/petz/misc/items.lua index c90ebc5..55d6f96 100644 --- a/mods/petz/petz/misc/items.lua +++ b/mods/petz/petz/misc/items.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... --Pet Hairbrush minetest.register_craftitem("petz:hairbrush", { diff --git a/mods/petz/petz/misc/lycanthropy.lua b/mods/petz/petz/misc/lycanthropy.lua index 9a4cdbe..67894b1 100644 --- a/mods/petz/petz/misc/lycanthropy.lua +++ b/mods/petz/petz/misc/lycanthropy.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... local lycanthropy = {} lycanthropy.werewolf = {} diff --git a/mods/petz/petz/misc/misc.lua b/mods/petz/petz/misc/misc.lua index bb82d9f..5856d61 100644 --- a/mods/petz/petz/misc/misc.lua +++ b/mods/petz/petz/misc/misc.lua @@ -1,23 +1,23 @@ local modpath, S = ... -assert(loadfile(modpath .. "/misc/mount.lua"))(modpath, S) --Load the mount engine +assert(loadfile(modpath .. "/misc/mount.lua"))() --Load the mount engine assert(loadfile(modpath .. "/misc/nodes.lua"))(modpath, S) --Load the nodes -assert(loadfile(modpath .. "/misc/items.lua"))(modpath, S) --Load the items -assert(loadfile(modpath .. "/misc/chests.lua"))(modpath, S) --Load the chests -assert(loadfile(modpath .. "/misc/food.lua"))(modpath, S) --Load the food items +assert(loadfile(modpath .. "/misc/items.lua"))(S) --Load the items +assert(loadfile(modpath .. "/misc/chests.lua"))(S) --Load the chests +assert(loadfile(modpath .. "/misc/food.lua"))(S) --Load the food items assert(loadfile(modpath .. "/misc/hunger.lua"))(modpath, S) --Load the food items -assert(loadfile(modpath .. "/misc/tools.lua"))(modpath, S) --Load the food items ---assert(loadfile(modpath .. "/misc/parchment.lua"))(modpath, S) --Load the food items +assert(loadfile(modpath .. "/misc/tools.lua"))(S) --Load the food items +--assert(loadfile(modpath .. "/misc/parchment.lua"))(S) --Load the food items if petz.settings["lycanthropy"] then - assert(loadfile(modpath .. "/misc/lycanthropy.lua"))(modpath, S) --Load the food items + assert(loadfile(modpath .. "/misc/lycanthropy.lua"))(S) --Load the food items end if minetest.get_modpath("3d_armor") ~= nil then --Armors (optional) - assert(loadfile(modpath .. "/misc/armors.lua"))(modpath, S) + assert(loadfile(modpath .. "/misc/armors.lua"))(S) end -assert(loadfile(modpath .. "/misc/weapons.lua"))(modpath, S) --Load the spawn engine +assert(loadfile(modpath .. "/misc/weapons.lua"))(S) --Load the spawn engine --Bonemeal support if minetest.get_modpath("bonemeal") ~= nil then - assert(loadfile(modpath .. "/misc/bonemeal.lua"))(modpath, S) --Bonemeal support + assert(loadfile(modpath .. "/misc/bonemeal.lua"))() --Bonemeal support end --if minetest.get_modpath("awards") ~= nil then --assert(loadfile(modpath .. "/misc/awards.lua"))(modpath, S) --Load the awards diff --git a/mods/petz/petz/misc/mount.lua b/mods/petz/petz/misc/mount.lua index 8653a44..efd1362 100644 --- a/mods/petz/petz/misc/mount.lua +++ b/mods/petz/petz/misc/mount.lua @@ -1,5 +1,3 @@ -local modpath, S = ... - minetest.register_on_leaveplayer(function(player) petz.force_detach(player) end) diff --git a/mods/petz/petz/misc/nodes.lua b/mods/petz/petz/misc/nodes.lua index f4d7566..b351740 100644 --- a/mods/petz/petz/misc/nodes.lua +++ b/mods/petz/petz/misc/nodes.lua @@ -760,7 +760,7 @@ minetest.register_node("petz:anthill_entrance", { end, on_timer = function(pos) --check the entrance to defend it - pos_top = { + local pos_top = { x = pos.x, y = pos.y + 0.5, z = pos.z, diff --git a/mods/petz/petz/misc/parchment.lua b/mods/petz/petz/misc/parchment.lua index 54fd230..bedbf91 100644 --- a/mods/petz/petz/misc/parchment.lua +++ b/mods/petz/petz/misc/parchment.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... minetest.register_node("petz:parchment", { description = S("Parchment"), diff --git a/mods/petz/petz/misc/tools.lua b/mods/petz/petz/misc/tools.lua index ec88cce..66c858d 100644 --- a/mods/petz/petz/misc/tools.lua +++ b/mods/petz/petz/misc/tools.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... minetest.register_tool("petz:shepherd_crook", { description = S("Shepherd's Crook"), diff --git a/mods/petz/petz/misc/weapons.lua b/mods/petz/petz/misc/weapons.lua index 96ec8bf..b9f7a9f 100644 --- a/mods/petz/petz/misc/weapons.lua +++ b/mods/petz/petz/misc/weapons.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local S = ... minetest.register_node("petz:jack_o_lantern_grenade", { description = S("Jack-o'-lantern Grenade").. " ("..S("use to throw")..")", diff --git a/mods/petz/petz/mobkit/mobkit.lua b/mods/petz/petz/mobkit/mobkit.lua index 21fc056..6a97fb2 100644 --- a/mods/petz/petz/mobkit/mobkit.lua +++ b/mods/petz/petz/mobkit/mobkit.lua @@ -1,4 +1,4 @@ -local modpath, S = ... +local modpath= ... assert(loadfile(modpath .. "/mobkit/bh_ant.lua"))(modpath) assert(loadfile(modpath .. "/mobkit/bh_aquatic.lua"))() diff --git a/mods/petz/petz/models/petz_bunny.blend b/mods/petz/petz/models/petz_bunny.blend new file mode 100644 index 0000000..3513ba6 Binary files /dev/null and b/mods/petz/petz/models/petz_bunny.blend differ diff --git a/mods/petz/petz/models/petz_bunny.dae b/mods/petz/petz/models/petz_bunny.dae new file mode 100644 index 0000000..dad271b --- /dev/null +++ b/mods/petz/petz/models/petz_bunny.dae @@ -0,0 +1,1334 @@ + + + +VoxelShop User +VoxelShop V1.8.26 + + +2020-12-22T12:15:46 +2020-12-22T12:15:46 + +Z_UP + + + +file://petz_bunny_texture0.png + + + + + + + +petz_bunny_texture0-image + + + + +petz_bunny_texture0-surface +WRAP +WRAP +NEAREST +NEAREST + + + + + +0 0 0 1 + + +0 0 0 1 + + + + + + + + + + + + + + + + + + +-4 -6 -14 -4 -4 -16 -4 -6 -16 -4 -4 -14 -2 -6 -14 -2 -4 -16 -2 -6 -16 -2 -4 -14 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-4 -8 -12 -4 -2 -14 -4 -8 -14 -4 -2 -12 -2 -8 -12 -2 -2 -14 -2 -8 -14 -2 -2 -12 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-4 -8 -10 -4 -6 -12 -4 -8 -12 -4 -6 -10 -2 -8 -10 -2 -6 -12 -2 -8 -12 -2 -6 -10 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-4 -6 -6 -4 0 -12 -4 -6 -12 -4 0 -6 -2 -6 -6 -2 0 -12 -2 -6 -12 -2 0 -6 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-6 -4 -14 -6 0 -16 -6 -4 -16 -6 0 -14 -2 -4 -14 -2 0 -16 -2 -4 -16 -2 0 -14 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 2 -2 -2 6 -8 -2 2 -8 -2 6 -2 4 2 -2 4 6 -8 4 2 -8 4 6 -2 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +0 6 -2 0 8 -6 0 6 -6 0 8 -2 2 6 -2 2 8 -6 2 6 -6 2 8 -2 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 6 -6 -2 8 -8 -2 6 -8 -2 8 -6 4 6 -6 4 8 -8 4 6 -8 4 8 -6 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +0 8 -4 0 10 -8 0 8 -8 0 10 -4 2 8 -4 2 10 -8 2 8 -8 2 10 -4 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 -4 4 -2 0 2 -2 -4 2 -2 0 4 0 -4 4 0 0 2 0 -4 2 0 0 4 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 -2 2 -2 2 0 -2 -2 0 -2 2 2 0 -2 2 0 2 0 0 -2 0 0 2 2 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 0 0 -2 4 -2 -2 0 -2 -2 4 0 0 0 0 0 4 -2 0 0 -2 0 4 0 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +2 -4 4 2 0 2 2 -4 2 2 0 4 4 -4 4 4 0 2 4 -4 2 4 0 4 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +2 -2 2 2 2 0 2 -2 0 2 2 2 4 -2 2 4 2 0 4 -2 0 4 2 2 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +2 0 0 2 4 -2 2 0 -2 2 4 0 4 0 0 4 4 -2 4 0 -2 4 4 0 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 2 -8 -2 4 -10 -2 2 -10 -2 4 -8 4 2 -8 4 4 -10 4 2 -10 4 4 -8 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 -8 -6 -2 -6 -10 -2 -8 -10 -2 -6 -6 4 -8 -6 4 -6 -10 4 -8 -10 4 -6 -6 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +4 -6 -14 4 -4 -16 4 -6 -16 4 -4 -14 6 -6 -14 6 -4 -16 6 -6 -16 6 -4 -14 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +0 6 -8 0 8 -10 0 6 -10 0 8 -8 2 6 -8 2 8 -10 2 6 -10 2 8 -8 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +4 -4 -14 4 0 -16 4 -4 -16 4 0 -14 8 -4 -14 8 0 -16 8 -4 -16 8 0 -14 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +4 -8 -12 4 -2 -14 4 -8 -14 4 -2 -12 6 -8 -12 6 -2 -14 6 -8 -14 6 -2 -12 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +4 -8 -10 4 -6 -12 4 -8 -12 4 -6 -10 6 -8 -10 6 -6 -12 6 -8 -12 6 -6 -10 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +4 -6 -6 4 0 -12 4 -6 -12 4 0 -6 6 -6 -6 6 0 -12 6 -6 -12 6 0 -6 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 0 -10 -2 2 -14 -2 0 -14 -2 2 -10 -2 4 -16 -2 2 -16 -2 4 -14 0 0 -10 0 2 -14 0 0 -14 0 2 -10 0 4 -16 0 2 -16 0 4 -14 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 1 0 4 1 5 2 1 0 6 1 4 2 8 1 7 0 9 2 10 1 7 0 8 2 11 1 8 0 12 2 13 1 8 0 11 2 4 1 12 0 5 2 11 1 12 0 4 2 1 1 9 0 2 2 8 1 9 0 1 2 8 0 6 1 1 2 8 0 13 1 6 2 7 0 3 1 0 2 7 0 10 1 3 2 9 0 0 1 2 2 9 0 7 1 0 2 12 0 1 1 5 2 12 0 8 1 1 2 3 1 8 0 1 2 10 1 8 0 3 2 6 1 11 0 4 2 13 1 11 0 6 2

+
+
+
+ + + +2 0 -10 2 2 -14 2 0 -14 2 2 -10 2 4 -16 2 2 -16 2 4 -14 4 0 -10 4 2 -14 4 0 -14 4 2 -10 4 4 -16 4 2 -16 4 4 -14 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 1 0 4 1 5 2 1 0 6 1 4 2 8 1 7 0 9 2 10 1 7 0 8 2 11 1 8 0 12 2 13 1 8 0 11 2 4 1 12 0 5 2 11 1 12 0 4 2 1 1 9 0 2 2 8 1 9 0 1 2 8 0 6 1 1 2 8 0 13 1 6 2 7 0 3 1 0 2 7 0 10 1 3 2 9 0 0 1 2 2 9 0 7 1 0 2 12 0 1 1 5 2 12 0 8 1 1 2 3 1 8 0 1 2 10 1 8 0 3 2 6 1 11 0 4 2 13 1 11 0 6 2

+
+
+
+ + + +0 -10 -4 0 -8 -8 0 -10 -8 0 -8 -4 2 -10 -4 2 -8 -8 2 -10 -8 2 -8 -4 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+ + + +-2 -6 -4 -2 2 -10 -2 -6 -10 -2 2 -4 4 -6 -4 4 2 -10 4 -6 -10 4 2 -4 + + + + + + + + + +0.33356905 0.66643095 0.6661953 0.66643095 0.33356905 0.33380473 + + + + + + + + + + + + + +

0 0 1 1 2 2 0 0 3 1 1 2 5 1 4 0 6 2 7 1 4 0 5 2 1 1 6 0 2 2 5 1 6 0 1 2 4 0 3 1 0 2 4 0 7 1 3 2 6 0 0 1 2 2 6 0 4 1 0 2 3 1 5 0 1 2 7 1 5 0 3 2

+
+
+
+
+ + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + +-0.0 -0.0 -0.0 +0 0 1 0 +0 1 0 0 +1 0 0 0 +0.03125 0.03125 0.03125 + + + + + + + + + + + + + + + +
diff --git a/mods/petz/petz/models/petz_bunny_texture0.png b/mods/petz/petz/models/petz_bunny_texture0.png new file mode 100644 index 0000000..52f82a8 Binary files /dev/null and b/mods/petz/petz/models/petz_bunny_texture0.png differ diff --git a/mods/petz/petz/settings.lua b/mods/petz/petz/settings.lua index 01b6157..e780a91 100644 --- a/mods/petz/petz/settings.lua +++ b/mods/petz/petz/settings.lua @@ -418,6 +418,11 @@ local settings_def = { }, } +--General Hardcoded Settings--> +petz.settings.visual = "mesh" +petz.settings.visual_size = {x=10, y=10} +petz.settings.rotate = 0 + for key, value in ipairs(settings_def) do if value.type == "string" then if not(value.default) then @@ -501,7 +506,3 @@ for i = 1, #petz.settings["petz_list"] do --load the settings petz.settings[petz_type.."_lay_egg_on_node"] = user:get(petz_type.."_lay_egg_on_node") or settings:get(petz_type.."_lay_egg_on_node") or "" end end - -petz.settings.visual = "mesh" -petz.settings.visual_size = {x=10, y=10} -petz.settings.rotate = 0 diff --git a/mods/sponge/README.md b/mods/sponge/README.md index 99063eb..bf7c4cd 100644 --- a/mods/sponge/README.md +++ b/mods/sponge/README.md @@ -2,15 +2,17 @@ ## Water-removing sponges for Minetest. made by Benjie/Fiftysix - 27/8/18 +updated 22/12/20 [Forum topic](https://forum.minetest.net/viewtopic.php?f=9&t=20729) -Soggy sponges are quite rare, found deep in the sea where it is dark (below -11). -These can be cooked into dry sponges, and then placed near a liquid to remove an area of it. They will hold the water away until they are removed. -They turn in to soggy sponges when used, so to use them again, they have to be cooked. +Soggy sponges can rarely be found deep in the sea where the darkness begins. +These can be cooked into dry sponges, and then placed near a liquid to remove an area of it +They will hold the water away until they are removed. +This will cause them to become soggy, so to use them again they have to be cooked. ### How it works: -* sponges create a 9x9 area of air-like nodes that water can't flow through (checks for protection) -* if sponges have cleared more than 3 nodes of liquid, they become soggy sponges -* removing a sponge or soggy sponge will turn a 9x9 area of air-like nodes back into air. +* Sponges create a 9x9 area of air-like nodes that water can't flow through (checks for protection). +* If sponges have cleared more than 3 nodes of liquid, they become soggy sponges. +* Removing a sponge or soggy sponge will turn a 9x9 area of air-like nodes back into air, as long as they are not in the area of another sponge. *(Air-like nodes can be removed in protection by removing a sponge outside the protection, they are not meant to be permanent)* diff --git a/mods/sponge/depends.txt b/mods/sponge/depends.txt deleted file mode 100644 index 1810f69..0000000 --- a/mods/sponge/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mods/sponge/init.lua b/mods/sponge/init.lua index 39f39bf..8544f8e 100644 --- a/mods/sponge/init.lua +++ b/mods/sponge/init.lua @@ -3,105 +3,142 @@ - water removal for survival made by Benjie/Fiftysix - 27/8/18 +updated 22/12/20 -soggy sponges can be found quite rare, deep in the sea where it is dark -these can be cooked into dry sponges, and then placed near a liquid to remove an area of it -they will hold the water away until they are removed. -to use them again, they have to be cooked. +Soggy sponges can rarely be found deep in the sea where the darkness begins. +These can be cooked into dry sponges, and then placed near a liquid to remove an area of it +They will hold the water away until they are removed. +This will cause them to become soggy, so to use them again they have to be cooked. -sponges create a 9x9 area of air-like nodes that water can't flow through (checks for protection) -if sponges have cleared more than 3 nodes of liquid, they become soggy sponges +Sponges create a 9x9 area of air-like nodes that water can't flow through (checks for protection) +If sponges have cleared more than 3 nodes of liquid, they become soggy sponges removing a sponge or soggy sponge will turn a 9x9 area of air-like nodes back into air (air-like nodes can be removed in protection by removing a sponge outside the protection, they are not meant to be permanent) ]]-- -local area = 4 +local area = 4 -- The "radius" (of the cube) to clear water +local keep_dry = 3 -- The maximum amount of water cleared where the sponge doesn't turn soggy +local modname = minetest.get_current_modname() +-- internationalization boilerplate +local S = minetest.get_translator(modname) + +-- called by after_destruct() local destruct = function(pos) -- removing the air-like nodes + + -- find all sponges that intersect with this sponge's area + local sponge_info = minetest.find_nodes_in_area( + {x=pos.x-area*2, y=pos.y-area*2, z=pos.z-area*2}, {x=pos.x+area*2, y=pos.y+area*2, z=pos.z+area*2}, + {modname..":soggy_sponge", modname..":sponge"}, true + ) + local sponges = {} + for _, p in pairs(sponge_info) do + local node = minetest.get_node(p) + if node.param1 == 1 or node.name == modname..":sponge" then + table.insert(sponges, p) + end + end + for x = pos.x-area, pos.x+area do for y = pos.y-area, pos.y+area do for z = pos.z-area, pos.z+area do local n = minetest.get_node({x=x, y=y, z=z}).name - if n == "sponge:liquid_stop" then - minetest.remove_node({x=x, y=y, z=z}) + if n == modname..":liquid_stop" then + + -- check if position intersects with another sponge + local intersect = false + for _, s_pos in pairs(sponges) do + if math.abs(s_pos.x-x) <= area and math.abs(s_pos.y-y) <= area and math.abs(s_pos.z-z) <= area then + intersect = true + break + end + end + + if not intersect then + minetest.remove_node({x=x, y=y, z=z}) + end end end end end end +-- called by after_place_node() +local construct = function(pos, placer, itemstack, pointed_thing) + local playername = placer:get_player_name() -minetest.register_node("sponge:liquid_stop", { -- air-like node - description = "liquid blocker for sponges", + if not minetest.is_protected(pos, playername) then + local count = 0 + + for x = pos.x-area, pos.x+area do + for y = pos.y-area, pos.y+area do + for z = pos.z-area, pos.z+area do + + local n = minetest.get_node({x=x, y=y, z=z}).name + local def = minetest.registered_nodes[n] + if def ~= nil and (n == "air" or def["drawtype"] == "liquid" or def["drawtype"] == "flowingliquid") then + local p = {x=x, y=y, z=z} + if not minetest.is_protected(p, playername) then + if n ~= "air" then + count = count + 1 -- counting liquids + end + minetest.set_node(p, {name=modname..":liquid_stop"}) + end + end + end + end + end + + if count > keep_dry then -- turns soggy if it removed more than `keep_dry` nodes + minetest.swap_node(pos, {name=modname..":soggy_sponge", param1=1}) + end + end +end + +minetest.register_node(modname..":liquid_stop", { -- air-like node + description = S("liquid blocker for sponges"), drawtype = "airlike", drop = {max_items=0, items={}}, groups = {not_in_creative_inventory=1}, pointable = false, walkable = false, + floodable = false, sunlight_propagates = true, paramtype = "light", buildable_to = true, }) - -minetest.register_node("sponge:sponge", { -- dry sponge - description = "Esponja", +minetest.register_node(modname..":sponge", { -- dry sponge + description = S("Sponge"), tiles = {"sponge_sponge.png"}, groups = {crumbly=3}, sounds = default.node_sound_dirt_defaults(), - - after_place_node = function(pos, placer, itemstack, pointed_thing) - local name = placer:get_player_name() - - if not minetest.is_protected(pos, name) then - local count = 0 - for x = pos.x-area, pos.x+area do - for y = pos.y-area, pos.y+area do - for z = pos.z-area, pos.z+area do - local n = minetest.get_node({x=x, y=y, z=z}).name - local d = minetest.registered_nodes[n] - if d ~= nil and (n == "air" or d["drawtype"] == "liquid" or d["drawtype"] == "flowingliquid") then - local p = {x=x, y=y, z=z} - if not minetest.is_protected(p, name) then - if n ~= "air" then - count = count + 1 -- counting liquids - end - minetest.set_node(p, {name="sponge:liquid_stop"}) - end - end - end - end - end - if count > 3 then -- turns soggy if it removed more than 3 nodes - minetest.set_node(pos, {name="sponge:soggy_sponge"}) - end - end - end, - - after_dig_node = destruct + after_place_node = construct, + + after_destruct = destruct, }) -minetest.register_node("sponge:soggy_sponge", { -- soggy sponge - description = "Esponja empapada", +minetest.register_node(modname..":soggy_sponge", { -- soggy sponge + description = S("Soggy sponge"), tiles = {"sponge_soggy_sponge.png"}, groups = {crumbly=3}, sounds = default.node_sound_dirt_defaults(), - - on_destruct = destruct + + after_destruct = destruct, }) minetest.register_craft({ -- cooking soggy sponge back into dry sponge type = "cooking", - recipe = "sponge:soggy_sponge", - output = "sponge:sponge", + recipe = modname..":soggy_sponge", + output = modname..":sponge", cooktime = 2, }) minetest.register_decoration({ -- sponges are found deep in the sea - name = "sponge:sponges", + name = modname..":sponges", deco_type = "simple", place_on = {"default:sand"}, spawn_by = "default:water_source", @@ -109,5 +146,5 @@ minetest.register_decoration({ -- sponges are found deep in the sea fill_ratio = 0.0003, y_max = -12, flags = "force_placement", - decoration = "sponge:soggy_sponge", + decoration = modname..":soggy_sponge", }) diff --git a/mods/sponge/locale/sponge.es.tr b/mods/sponge/locale/sponge.es.tr new file mode 100644 index 0000000..07a9ed9 --- /dev/null +++ b/mods/sponge/locale/sponge.es.tr @@ -0,0 +1,4 @@ +# textdomain: sponge +Sponge=Esponja +Soggy sponge=Esponja empapada +liquid blocker for sponges=Bloqueador líquido de esponjas diff --git a/mods/sponge/mod.conf b/mods/sponge/mod.conf new file mode 100644 index 0000000..f185b3d --- /dev/null +++ b/mods/sponge/mod.conf @@ -0,0 +1,4 @@ +name = sponge +description = Sponges that remove water in an area around them. +depends = default +optional_depends = diff --git a/mods/sponge/textures/sponge_sponge.xcf b/mods/sponge/textures/sponge_sponge.xcf index bd0eb68..f10b85a 100644 Binary files a/mods/sponge/textures/sponge_sponge.xcf and b/mods/sponge/textures/sponge_sponge.xcf differ diff --git a/mods/swaz/.luacheckrc b/mods/swaz/.luacheckrc index 2d64d46..cc81e1b 100644 --- a/mods/swaz/.luacheckrc +++ b/mods/swaz/.luacheckrc @@ -4,7 +4,8 @@ allow_defined_top = true globals = { "minetest", "mobkit", - "stairs" + "stairs", + "bucket" } read_globals = { diff --git a/mods/swaz/init.lua b/mods/swaz/init.lua index 7b6d529..8fd7a2e 100644 --- a/mods/swaz/init.lua +++ b/mods/swaz/init.lua @@ -371,6 +371,109 @@ minetest.register_node("swaz:barberry_bush_sapling", { end, }) +--Iris Flower + +minetest.register_node("swaz:iris_top", { + description = S("Iris").. " ("..S("flower")..")", + drawtype = "plantlike", + visual_scale = 0.8, + tiles = {"swaz_iris_top.png"}, + inventory_image = "swaz_iris_flower.png", + paramtype = "light", + walkable = false, + waving = 1, + groups = {snappy = 3, flammable = 3, flower =1, flora=1, not_in_creative_inventory = 1}, + sounds = default.node_sound_leaves_defaults(), + drop = "swaz:iris", + selection_box = { + type = "fixed", + fixed = {-0.1875, -0.5, -0.1875, 0.1875, 0.1875, 0.1875} + }, + after_destruct = function(pos, oldnode) + pos.y = pos.y - 2 + local node = minetest.get_node_or_nil(pos) + if node and node.name == "swaz:iris" then + minetest.swap_node(pos, {name = "swaz:mud"}) + end + end +}) + +minetest.register_node("swaz:iris", { + description = S("Iris"), + drawtype = "plantlike_rooted", + visual_scale = 1.0, + tiles = {"swaz_mud.png"}, + special_tiles = { + nil, + nil, + "swaz_iris_base.png", + "swaz_iris_base.png", + "swaz_iris_base.png", + "swaz_iris_base.png", + }, + inventory_image = "swaz_iris_top_inv.png", + wield_image = "swaz_iris_top_inv.png", + paramtype = "light", + walkable = false, + 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.5, -0.5, -0.5, 0.5, 0.5, 0.5} + }, + + on_construct = function(pos) + pos.y = pos.y + 2 + minetest.swap_node(pos, {name = "swaz:iris_top"}) + end, + + after_destruct = function(pos, oldnode) + pos.y = pos.y + 2 + local node = minetest.get_node_or_nil(pos) + if node and node.name == "swaz:iris_top" then + minetest.remove_node(pos) + end + end, + + 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 ~= "swaz:mud" or pos.y < 0 then + return itemstack + end + local height = 1 + local pos_top = {x = pos.x, y = pos.y + 1, 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 not minetest.is_protected(pos, player_name) and + not minetest.is_protected(pos_top, player_name) then + minetest.set_node(pos, {name= "swaz:iris", + 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, +}) + -- Register Decoration -- IMPORTANT! -- THE ORDER OF THE DECORATION MATTERS! @@ -666,13 +769,12 @@ if mg_name ~= "v6" and mg_name ~= "singlenode" then decoration = "swaz:barberry_bush_leaves_with_berries", deco_type = "simple", place_on = "swaz:silt_with_grass", - sidelen = 16, biomes = {"swampz"}, noise_params = { offset = 0.0008, scale = 0.008, spread = {x = 250, y = 250, z = 250}, - seed = 2, + seed = 2678, octaves = 3, persist = 0.66 }, @@ -680,6 +782,35 @@ if mg_name ~= "v6" and mg_name ~= "singlenode" then y_max = 80, }) + --Iris Flower + + minetest.register_decoration({ + name = "swaz:iris", + decoration = "swaz:iris", + deco_type = "schematic", + schematic = { + size = {x = 1, y = 3, z = 1}, + data = { + {name = "swaz:iris"}, {name = "air"}, {name = "swaz:iris_top"}, + } + }, + place_on = {"swaz:mud"}, + biomes = "swampz_shore", + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + place_offset_y = 0, + y_min = 0, + y_max = 0, + flags = "place_center_x, place_center_z, force_placement", + }) + end -- Construction Materials @@ -888,3 +1019,16 @@ if minetest.get_modpath("farming")~=nil then } }) end + + +if minetest.get_modpath("bucket")~=nil then + bucket.register_liquid( + "swaz:water_source", + "swaz:water_flowing", + "swaz:bucket_swampy_water", + "swaz_swampy_water.png", + S("Swampy Water Bucket"), + {tool = 1, water_bucket = 1}, + true + ) +end diff --git a/mods/swaz/locale/swaz.es.tr b/mods/swaz/locale/swaz.es.tr index bf09b47..7c82169 100644 --- a/mods/swaz/locale/swaz.es.tr +++ b/mods/swaz/locale/swaz.es.tr @@ -31,3 +31,6 @@ Barberries=Bayas de agracejo Barberry Bush Leaves with Berries=Hojas de agracejo con bayas Barberry Bush Leaves=Hojas de agracejo Barberry Bush Sapling=Retoño de agracejo +Iris=Iris +flower=flor +Swampy Water Bucket=Cubo de agua fangosa diff --git a/mods/swaz/mod.conf b/mods/swaz/mod.conf index 932ff38..d4ddd2a 100644 --- a/mods/swaz/mod.conf +++ b/mods/swaz/mod.conf @@ -1,3 +1,3 @@ name = swaz depends = default, flowers, baldcypress, willow, farming, dye -optional_depends = stairs, basic_materials, farming +optional_depends = stairs, basic_materials, farming, bucket diff --git a/mods/swaz/textures/bucket_swampy_water.png b/mods/swaz/textures/bucket_swampy_water.png new file mode 100644 index 0000000..b1d9c04 Binary files /dev/null and b/mods/swaz/textures/bucket_swampy_water.png differ diff --git a/mods/swaz/textures/swaz_iris_base.png b/mods/swaz/textures/swaz_iris_base.png new file mode 100644 index 0000000..ebb7daa Binary files /dev/null and b/mods/swaz/textures/swaz_iris_base.png differ diff --git a/mods/swaz/textures/swaz_iris_flower.png b/mods/swaz/textures/swaz_iris_flower.png new file mode 100644 index 0000000..4abfb58 Binary files /dev/null and b/mods/swaz/textures/swaz_iris_flower.png differ diff --git a/mods/swaz/textures/swaz_iris_top.png b/mods/swaz/textures/swaz_iris_top.png new file mode 100644 index 0000000..05b12ae Binary files /dev/null and b/mods/swaz/textures/swaz_iris_top.png differ diff --git a/mods/swaz/textures/swaz_iris_top_inv.png b/mods/swaz/textures/swaz_iris_top_inv.png new file mode 100644 index 0000000..1b91a3a Binary files /dev/null and b/mods/swaz/textures/swaz_iris_top_inv.png differ diff --git a/mods/swaz/textures/swaz_swampy_water.png b/mods/swaz/textures/swaz_swampy_water.png new file mode 100644 index 0000000..d634b85 Binary files /dev/null and b/mods/swaz/textures/swaz_swampy_water.png differ