fixes
|
@ -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 = <filename>
|
||||
preview = <filename>
|
||||
armor_groups = <table>
|
||||
damage_groups = <table>
|
||||
reciprocate_damage = <bool>
|
||||
on_equip = <function>
|
||||
on_unequip = <function>
|
||||
on_destroy = <function>
|
||||
on_damage = <function>
|
||||
on_punched = <function>
|
||||
|
||||
***Reciprocal tool*** damage will apply damage back onto the attacking tool/weapon, however this will only be done by the first armor inventory item with `reciprocate_damage = true`, damage does not stack.
|
||||
|
||||
**Example Simple:**
|
||||
|
||||
armor:register_armor("mod_name:chestplate_leather", {
|
||||
description = "Leather Chestplate",
|
||||
inventory_image = "mod_name_inv_chestplate_leather.png",
|
||||
texture = "mod_name_leather_chestplate.png",
|
||||
preview = "mod_name_leather_chestplate_preview.png",
|
||||
groups = {armor_torso=1, armor_heal=0, armor_use=2000, flammable=1},
|
||||
armor_groups = {fleshy=10},
|
||||
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}
|
||||
})
|
||||
*See ***armor.lua*** under **3d_armor>>3d_armor** for further examples*
|
||||
|
||||
**Extended functionality**
|
||||
The values for ***texture*** and ***preview*** do not need to be included when registering armor if they follow the naming convention in the textures mod folder of:
|
||||
***texture:*** *mod_name_leather_chestplate.png*
|
||||
***preview:*** *mod_name_leather_chestplate_preview.png*
|
||||
|
||||
## Registering Armor Groups
|
||||
3d armor has a built in armor group which is ***fleshy*** all players base vulnerability to being fleshy is ***100***.
|
||||
3d armour allows for the easy registration/addition of new armor groups::
|
||||
|
||||
armor:register_armor_group(group, base)
|
||||
|
||||
***group:*** Is the name of the new armor group
|
||||
***base*** Is the starting vulnerability that all players have to that new group. This dosent need to be 100.
|
||||
|
||||
**Example**
|
||||
|
||||
armor:register_armor_group("radiation", 100)
|
||||
|
||||
New armor group is registered called *radiation* and all players start off with a base vulnerability of *100* to radiation.
|
||||
|
||||
**Example** *Showing armor reg, new group usage and custom function*
|
||||
|
||||
armor:register_armor("mod_name:speed_boots", {
|
||||
description = "Speed Boots",
|
||||
inventory_image = "mod_name_speed_boots_inv.png",
|
||||
texture = "mod_name_speed_boots.png",
|
||||
preview = "mod_name_speed_boots_preview.png",
|
||||
groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1},
|
||||
armor_groups = {fleshy=10, radiation=10},
|
||||
damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1},
|
||||
reciprocate_damage = true,
|
||||
on_destroy = function(player, index, stack)
|
||||
local pos = player:get_pos()
|
||||
if pos then
|
||||
minetest.sound_play({
|
||||
name = "mod_name_break_sound",
|
||||
pos = pos,
|
||||
gain = 0.5,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
### Tools/weapons and new armor groups
|
||||
The above allows armor to block/prevent new damage types but you also need to assign the new damage group to a tool/weapon or even a node (see technic mod) to make wearing the armor item meaningful. Simply add the ***armor_groups*** name to the tool items ***damage_groups***.
|
||||
|
||||
**Example**
|
||||
|
||||
minetest.register_tool("mod_name:glowing_sword", {
|
||||
description = "Glowing Sword",
|
||||
inventory_image = "mod_name_tool_glowingsword.png",
|
||||
tool_capabilities = {full_punch_interval = 1.2,max_drop_level=0,
|
||||
groupcaps={
|
||||
cracky = {times={[3]=1.60}, uses=10, maxlevel=1},},
|
||||
damage_groups = {fleshy=10,radiation=20},
|
||||
},
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
groups = {pickaxe = 1, flammable = 2}
|
||||
})
|
||||
|
||||
## Groups used by 3d_Armor
|
||||
3d_armor has many default groups already registered, these are categorized under 4 main headings
|
||||
- **Elements:** armor_head, armor_torso, armor_legs, armor_feet
|
||||
- **Attributes:** armor_heal, armor_fire, armor_water
|
||||
- **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*
|
|
@ -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 = <filename>
|
||||
preview = <filename>
|
||||
armor_groups = <table>
|
||||
damage_groups = <table>
|
||||
reciprocate_damage = <bool>
|
||||
on_equip = <function>
|
||||
on_unequip = <function>
|
||||
on_destroy = <function>
|
||||
on_damage = <function>
|
||||
on_punched = <function>
|
||||
|
||||
armor:register_armor_group(group, base)
|
||||
|
||||
Example:
|
||||
|
||||
armor:register_armor_group("radiation", 100)
|
||||
|
||||
armor:register_armor("mod_name:speed_boots", {
|
||||
description = "Speed Boots",
|
||||
inventory_image = "mod_name_speed_boots_inv.png",
|
||||
texture = "mod_name_speed_boots.png",
|
||||
preview = "mod_name_speed_boots_preview.png",
|
||||
groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1},
|
||||
armor_groups = {fleshy=10, radiation=10},
|
||||
damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1},
|
||||
reciprocate_damage = true,
|
||||
on_destroy = function(player, index, stack)
|
||||
local pos = player: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.
|
|
@ -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
|
||||
|
|
|
@ -5,3 +5,4 @@ pova?
|
|||
fire?
|
||||
ethereal?
|
||||
bakedclay?
|
||||
moreores?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 117 KiB |
|
@ -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
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
default
|
||||
explosions
|
|
@ -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"},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
name = bazm
|
||||
description = Explosive Weapons
|
||||
depends = default, explosions, nuclearz
|
||||
optional_depends =
|
|
@ -4,7 +4,8 @@ allow_defined_top = true
|
|||
globals = {
|
||||
"minetest",
|
||||
"player_api",
|
||||
"armor"
|
||||
"armor",
|
||||
"dye"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
|
|
|
@ -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
|
||||
|
|
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 4.5 KiB |
|
@ -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"},
|
||||
{"", "", ""},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
name = binoculars
|
||||
description = Minetest Game mod: binoculars
|
||||
depends = default
|
||||
optional_depends = creative
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# textdomain: carts
|
||||
Cart=Вагонетка
|
||||
(Sneak+Click to pick up)=(Пригнитесь и кликните по вагонетке, чтобы забрать)
|
||||
Rail=Рельса
|
||||
Powered Rail=Механизированная Рельса
|
||||
Brake Rail=Рельса с тормозом
|
||||
Rail=Рельсы
|
||||
Powered Rail=Запитанные рельсы
|
||||
Brake Rail=Тормозящие рельсы
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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=粉红染料
|
||||
|
|
|
@ -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=粉紅染料
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# textdomain: fire
|
||||
Fire=Api
|
||||
Permanent Fire=Api Abadi
|
||||
Flint and Steel=Pemantik
|
||||
Flint and Steel=Pemantik Api
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
name = map
|
||||
description = Minetest Game mod: map
|
||||
depends = default, dye
|
||||
optional_depends = creative
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
# textdomain: mtg_craftguide
|
||||
# This Translation by IFRFSX<IFRFSX@protonmail.com>
|
||||
|
||||
### 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个
|
|
@ -0,0 +1,57 @@
|
|||
# textdomain: mtg_craftguide
|
||||
# This Translation by IFRFSX<IFRFSX@protonmail.com>
|
||||
|
||||
### 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個
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 371 B |
After Width: | Height: | Size: 2.9 KiB |
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# textdomain: walls
|
||||
Cobblestone Wall=Kopfsteinpflastermauer
|
||||
Mossy Cobblestone Wall=Mosige Kopfsteinpflastermauer
|
||||
Mossy Cobblestone Wall=Moosige Kopfsteinpflastermauer
|
||||
Desert Cobblestone Wall=Wüstenkopfsteinpflastermauer
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
|
@ -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"},
|
||||
}
|
||||
})
|
|
@ -0,0 +1,4 @@
|
|||
# textdomain: nuclearz
|
||||
Uranium Ore=Mineral de uranio
|
||||
Uranium Lump=Pepita de uranio
|
||||
Uranium Rod=Barra de uranio
|
|
@ -0,0 +1,4 @@
|
|||
name = nuclearz
|
||||
description = Nuclear Stuff
|
||||
depends = default
|
||||
optional_depends =
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1005 B |
After Width: | Height: | Size: 650 B |
|
@ -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",
|
||||
}
|
||||
|
|
|
@ -11,7 +11,10 @@ globals = {
|
|||
"farming",
|
||||
"player_api",
|
||||
"hunger_ng",
|
||||
"dye"
|
||||
"dye",
|
||||
"armor",
|
||||
"player_physics",
|
||||
"player_monoids"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
|
|
|
@ -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"))()
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local modpath, S = ...
|
||||
local modpath = ...
|
||||
|
||||
--
|
||||
--Create Dam Beaver Mechanics
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
petz.get_os_month = function()
|
||||
local nowTable= os.date('*t')
|
||||
return nowTable.month
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
--
|
||||
-- Enviromental Damage
|
||||
--
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local modpath, S, creative_mode = ...
|
||||
local S= ...
|
||||
|
||||
petz.insert_tamed_by_owner = function(self)
|
||||
if not self.owner then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local modpath, S = ...
|
||||
local S = ...
|
||||
|
||||
petz.create_form = function(player_name, context)
|
||||
local pet = petz.pet[player_name]
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
--
|
||||
--Helper Functions
|
||||
--
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local modpath, S = ...
|
||||
local S = ...
|
||||
|
||||
petz.put_horseshoe = function(self, clicker)
|
||||
if self.horseshoes >= 4 then
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
--
|
||||
--'set_initial_properties' is call by 'on_activate' for each pet
|
||||
--
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
--
|
||||
-- Mount Engine
|
||||
--
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
--
|
||||
--on_die event for all the mobs
|
||||
--
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
petz.puncher_is_player = function(puncher)
|
||||
if type(puncher) == 'userdata' and puncher:is_player() then
|
||||
return true
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local modpath, S = ...
|
||||
local S = ...
|
||||
|
||||
--Context
|
||||
--In this temporary table is saved the reference to an entity by its owner
|
||||
|
|
|
@ -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!
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
petz.ownthing = function(self)
|
||||
self.status = mobkit.remember(self, "status", nil)
|
||||
if self.can_fly then
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
local modpath, S = ...
|
||||
|
||||
--
|
||||
--Particle Effects
|
||||
--
|
||||
|
|