diff --git a/3d_armor/.github/workflows/integration-test.yml b/3d_armor/.github/workflows/integration-test.yml new file mode 100644 index 0000000..4bea2fa --- /dev/null +++ b/3d_armor/.github/workflows/integration-test.yml @@ -0,0 +1,14 @@ +name: integration-test + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: integration-test + run: ./integration-test.sh diff --git a/3d_armor/.github/workflows/luacheck.yml b/3d_armor/.github/workflows/luacheck.yml new file mode 100644 index 0000000..d00f53a --- /dev/null +++ b/3d_armor/.github/workflows/luacheck.yml @@ -0,0 +1,17 @@ +name: luacheck + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: apt + run: sudo apt-get install -y luarocks + - name: luacheck install + run: luarocks install --local luacheck + - name: luacheck run + run: $HOME/.luarocks/bin/luacheck ./ diff --git a/3d_armor/.gitignore b/3d_armor/.gitignore new file mode 100644 index 0000000..ba96b08 --- /dev/null +++ b/3d_armor/.gitignore @@ -0,0 +1,11 @@ +## Generic ignorable patterns and files +*~ +.*.swp +*bak* +tags +*.vim +armor.conf + +## Eclipse project files & directories +.project +.settings diff --git a/3d_armor/.luacheckrc b/3d_armor/.luacheckrc new file mode 100644 index 0000000..88349af --- /dev/null +++ b/3d_armor/.luacheckrc @@ -0,0 +1,32 @@ + +unused_args = false + +globals = { + "wieldview", + "armor", + "inventory_plus" +} + +read_globals = { + -- Stdlib + string = {fields = {"split"}}, + table = {fields = {"copy", "getn"}}, + + -- Minetest + "vector", "ItemStack", + "dump", "VoxelArea", + + -- deps + "default", + "minetest", + "unified_inventory", + "wardrobe", + "player_monoids", + "armor_monoid", + "sfinv", + "ARMOR_MATERIALS", + "ARMOR_FIRE_NODES", + "pova", + "skins", + "u_skins" +} diff --git a/3d_armor/3d_armor/LICENSE.txt b/3d_armor/3d_armor/LICENSE.txt index e1949c0..f253f29 100644 --- a/3d_armor/3d_armor/LICENSE.txt +++ b/3d_armor/3d_armor/LICENSE.txt @@ -1,9 +1,26 @@ [mod] 3d Armor [3d_armor] ========================= -License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1 +License Source Code +------------------- -License Textures: Copyright (C) 2017 davidthecreator - CC-BY-SA 3.0 +Copyright (C) 2012-2019 stujones11, Stuart Jones -https://github.com/daviddoesminetest/3d-armors-new-textures +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License Textures +---------------- + +Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0 diff --git a/3d_armor/3d_armor/README.md b/3d_armor/3d_armor/README.md new file mode 100644 index 0000000..050eb61 --- /dev/null +++ b/3d_armor/3d_armor/README.md @@ -0,0 +1,524 @@ +# [mod] Visible Player Armor [3d_armor] + +| | | | | +|--|--|--|--| +|-[Overview](#overview) |||-[API](#api) +|-[Armor Configuration](#armor-configuration) |||- - [3d_Armor Item Storage](#3d_armor-item-storage) +|- - [disable_specific_materials](#to-disable-individual-armor-materials) |||- - [Armor Registration](#armor-registration) +|- - [armor_init_delay](#initialization-glitches-when-a-player-first-joins) |||- - [Registering Armor Groups](#registering-armor-groups) +|- - [armor_init_times](#number-of-initialization-attempts) |||- - [Groups used by 3d_Armor](#groups-used-by-3d_armor) +|- - [armor_bones_delay](#armor-not-in-bones-due-to-server-lag) |||- - - [Elements](#elements) +|- - [armor_update_time](#how-often-player-armor-items-are-updated) |||- - - [Attributes](#attributes) +|- - [armor_drop](#drop-armor-when-a-player-dies) |||- - - [Physics](#physics) +|- - [armor_destroy](#destroy-armor-when-a-player-dies) |||- - - [Durability](#durability) +|- - [armor_level_multiplier](#armor-level-multiplyer) |||- - - [Armor Material](#armor-material) +|- - [armor_heal_multiplier](#armor-healing-multiplyer) |||- - [Armour Functions](#armor-functions) +|- - [armor_set_elements](#allows-the-customisation-of-armor-set) |||- - - [armor:set_player_armor](#armor-set_player_armor) +|- - [armor_set_bonus](#armor-set-bonus-multiplier) |||- - - [armor:punch](#armor-punch) +|- - [armor_water_protect](#enable-water-protection) |||- - - [armor:damage](#armor-damage) +|- - [armor_fire_protect](#enable-fire-protection) |||- - - [armor:remove_all](#armor-remove_all) +|- - [armor_punch_damage](#enable-punch-damage-effects) |||- - - [armor:equip](#armor-equip) +|- - [armor_migrate_old_inventory](#migration-of-old-armor-inventories) |||- - - [armor:unequip](#armor-unequip) +|- - [wieldview_update_time](#how-often-player-wield-items-are-updated) |||- - - [armor:update_skin](#armor-update_skin) +|-[Credits](#credits) |||- - [Callbacks](#Callbacks) +| |||- - - [Item callbacks](#item-callbacks) +| |||- - - [Global callbacks](#global-callbacks) + +# Overview + +**Depends:** default + +**Recommends:** sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts) + +**Supports:** player_monoids, armor_monoid and POVA + +Adds craftable armor that is visible to other players. Each armor item worn contributes to +a player's armor group level making them less vulnerable to weapons. + +Armor takes damage when a player is hurt but also offers a percentage chance of healing. +Overall level is boosted by 10% when wearing a full matching set. + +# Armor Configuration + +Change the following default settings by going to Main Menu>>Settings(Tab)>>All Settings(Button)>>Mods>>minetest-3d_Armor>>3d_Armor + +### To disable individual armor materials + **set the below to false** + + armor_material_wood = true + armor_material_cactus = true + armor_material_steel = true + armor_material_bronze = true + armor_material_diamond = true + armor_material_gold = true + armor_material_mithril = true + armor_material_crystal = true + +### Initialization glitches when a player first joins + **Increase to prevent glitches** + + armor_init_delay = 2 + +### Number of initialization attempts + **Increase to prevent glitches - Use in conjunction with armor_init_delay if initialization problems persist.** + + armor_init_times = 10 + +### Armor not in bones due to server lag + **Increase to help resolve** + + armor_bones_delay = 1 + +### How often player armor items are updated +**Number represents how often per second update is performed, higher value means less performance hit for servers but armor items maybe delayed in updating when switching.Fractional seconds also supported eg 0.1** + + armor_update_time = 1 + +### Drop armor when a player dies + **Uses bones mod if present, otherwise items are dropped around the player when false.** + + armor_drop = true + +### Destroy armor when a player dies + **overrides armor_drop.** + + armor_destroy = false + +### Armor level multiplyer + **Increase to make armor more effective and decrease to make armor less effective** + **eg: level_multiplier = 0.5 will reduce armor level by half.** + + armor_level_multiplier = 1 + +### Armor healing multiplyer + **Increase to make armor healing more effective and decrease to make healing less effective** + **eg: armor_heal_multiplier = 0 will disable healing altogether.** + + armor_heal_multiplier = 1 + +### Allows the customisation of armor set + **Shields already configured as need to be worn to complete an armor set** + **These names come from [Element names](#groups-used-by-3d_armor), the second half of the element name only is used eg armor_head is head** + + armor_set_elements = head torso legs feet shield + +### Armor set bonus multiplier + **Set to 1 to disable set bonus** + + armor_set_multiplier = 1.1 + +### Enable water protection + **periodically restores breath when activated** + + armor_water_protect = true + +### Enable fire protection +**defaults to true if using ethereal mod** + + armor_fire_protect = false + +### Fire protection enabled, disable torch fire damage +**when fire protection is enabled allows you to disable fire damage from torches** +**defaults to true if using ethereal mod** + + armor_fire_protect_torch = false + +### Enable punch damage effects + + armor_punch_damage = true + +### Migration of old armor inventories + + armor_migrate_old_inventory = true + +### How often player wield items are updated +**Number represents how often per second update is performed, higher value means less performance hit for servers but wield items maybe delayed in updating when switching. Fractional seconds also supported eg 0.1** +***Note this is MT engine functionality but included for completness*** + + wieldview_update_time = 1 + +# API + +## 3d_Armor item storage +3d_Armor stores each armor piece a player currently has equiped in a ***detached*** inventory. The easiest way to access this inventory if needed is using this line of code + + local _, armor_inv = armor:get_valid_player(player, "3d_armor") + +**Example** + + armor:register_on_equip(function(player, index, stack) + local _, armor_inv = armor:get_valid_player(player, "3d_armor") + for i = 1, 6 do + local stack = armor_inv:get_stack("armor", i) + if stack:get_name() == "3d_armor:chestplate_gold" then + minetest.chat_send_player(player:get_player_name(),"Got to love the Bling!!!") + end + end + end) + +## Armor Registration + + armor:register_armor(name, def) + +Wrapper function for `minetest.register_tool`, which enables the easy registration of new armor items. While registering armor as a tool item is still supported, this may be deprecated in future so all armor items should be registered using *armor:register_armor(name,def)*. + +### Additional fields supported by 3d_armor + + texture = + preview = + armor_groups = + damage_groups =
+ reciprocate_damage = + on_equip = + on_unequip = + on_destroy = + on_damage = + on_punched = + +***Reciprocal tool*** damage will apply damage back onto the attacking tool/weapon, however this will only be done by the first armor inventory item with `reciprocate_damage = true`, damage does not stack. + +**Example Simple:** + + armor:register_armor("mod_name:chestplate_leather", { + description = "Leather Chestplate", + inventory_image = "mod_name_inv_chestplate_leather.png", + texture = "mod_name_leather_chestplate.png", + preview = "mod_name_leather_chestplate_preview.png", + groups = {armor_torso=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1} + }) +*See ***armor.lua*** under **3d_armor>>3d_armor** for further examples* + +**Extended functionality** +The values for ***texture*** and ***preview*** do not need to be included when registering armor if they follow the naming convention in the textures mod folder of: +***texture:*** *mod_name_leather_chestplate.png* +***preview:*** *mod_name_leather_chestplate_preview.png* + +## Registering Armor Groups +3d armor has a built in armor group which is ***fleshy*** all players base vulnerability to being fleshy is ***100***. + 3d armour allows for the easy registration/addition of new armor groups:: + + armor:register_armor_group(group, base) + +***group:*** Is the name of the new armor group +***base*** Is the starting vulnerability that all players have to that new group. This dosent need to be 100. + +**Example** + + armor:register_armor_group("radiation", 100) + +New armor group is registered called *radiation* and all players start off with a base vulnerability of *100* to radiation. + +**Example** *Showing armor reg, new group usage and custom function* + + armor:register_armor("mod_name:speed_boots", { + description = "Speed Boots", + inventory_image = "mod_name_speed_boots_inv.png", + texture = "mod_name_speed_boots.png", + preview = "mod_name_speed_boots_preview.png", + groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1}, + armor_groups = {fleshy=10, radiation=10}, + damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1}, + reciprocate_damage = true, + on_destroy = function(player, index, stack) + local pos = player:get_pos() + if pos then + minetest.sound_play({ + name = "mod_name_break_sound", + pos = pos, + gain = 0.5, + }) + end + end, + }) + +### Tools/weapons and new armor groups +The above allows armor to block/prevent new damage types but you also need to assign the new damage group to a tool/weapon or even a node (see technic mod) to make wearing the armor item meaningful. Simply add the ***armor_groups*** name to the tool items ***damage_groups***. + +**Example** + + minetest.register_tool("mod_name:glowing_sword", { + description = "Glowing Sword", + inventory_image = "mod_name_tool_glowingsword.png", + tool_capabilities = {full_punch_interval = 1.2,max_drop_level=0, + groupcaps={ + cracky = {times={[3]=1.60}, uses=10, maxlevel=1},}, + damage_groups = {fleshy=10,radiation=20}, + }, + sound = {breaks = "default_tool_breaks"}, + groups = {pickaxe = 1, flammable = 2} + }) + +## Groups used by 3d_Armor +3d_armor has many default groups already registered, these are categorized under 4 main headings + - **Elements:** armor_head, armor_torso, armor_legs, armor_feet + - **Attributes:** armor_heal, armor_fire, armor_water + - **Physics:** physics_jump, physics_speed, physics_gravity + - **Durability:** armor_use, flammable + +***Note: for calculation purposes "Attributes" and "Physics" values stack*** + +### Elements +Additional armor elements can be added by dependant mods, for example shields adds the group armor_shield which has by default a limit that only 1 shield can be worn at a time. + +Adding Elements is more complex but the below code can be used to add new elements; + + if minetest.global_exists("armor") and armor.elements then + table.insert(armor.elements, "hands") + end +**1st line** not strictly needed but checks that the global table "armor" and subtable "elements" exists +**2nd line** adds a new value to the armor.elements table called "hands" + +See ***init.lua*** under **3d_armor>>shields** for a further example + +The new armor item can now be registered using the new element +**Example** + + armor:register_armor("mod_name:gloves_wood", { + description = "Wood Gauntlets", + inventory_image = "mod_name_inv_gloves_wood.png", + texture = "mod_name_gloves_wood.png", + preview = "mod_name_gloves_wood_preview.png", + groups = {armor_hands=1, armor_heal=0, armor_use=2000, flammable=1}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, + }) + +### Attributes +Three attributes are avaliable in 3d_armor these are armor_heal, armor_fire and armor_water. Although possible to add additional attributes they would do nothing as code needs to be provide to specifiy the behaviour this could be done in a dependant mod + +#### Armor_heal +This isn't how much the armor will heal but relates to the chance the armor will completely block the damage. For each point of ***armor_heal*** there is a 1% chance that damage will be completely blocked, this value will stack between all armor pieces + +**Example** +The below Diamond chestplate has a 12% chance to completely block all damage (armor_heal=12), however so do boots, helmet and trousers so if the player was wearing all 4 pieces they would have a 48% chance of blocking all damage each attack. + + armor:register_armor("3d_armor:chestplate_diamond", { + description = S("Diamond Chestplate"), + inventory_image = "3d_armor_inv_chestplate_diamond.png", + groups = {armor_torso=1, armor_heal=12, armor_use=200}, + armor_groups = {fleshy=20}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + +#### Armor_fire +***"Armor_fire"*** provides 5 levels of fire protection + - level 1 protects against torches + - level 2 protects against crystal spike (Ethereal mod) + - level 3 protects against fire + - level 4 unused + - level 5 protects against lava + +**Example** + + armor:register_armor("mod_name:fire_proof_jacket", { + description = "Fire Proof Jacket", + inventory_image = "mod_name_inv_fire_proof_jacket.png", + groups = {armor_torso=1, armor_fire=3, armor_use=1000}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + +#### Armor_water +***"Armor_water"*** will periodically restore a players breath when underwater. This only has one level or state, which is armor_water=1 + +**Example** + + armor:register_armor("mod_name:helmet_underwater_breath", { + description = "Helmet of Underwater Breathing", + inventory_image = "mod_name_inv_helmet_underwater_breath.png", + groups = {armor_head=1, armor_water=1, armor_use=1000}, + armor_groups = {fleshy=5}, + damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, + }) + +### Physics +The physics attributes supported by 3d_armor are ***physics_jump, physics_speed and physics_gravity***. Although 3d_armor supports the use of this with no other mods it is recommended that the mod [player_monoids](https://forum.minetest.net/viewtopic.php?t=14895) is used to help with intermod compatability. + +***physics_jump*** - Will increase/decrease the jump strength of the player so they can jump more/less. The base number is "1" and any value is added or subtracted, supports fractional so "physics_jump=1" will increase jump strength by 100%. "physics_jump= -0.5" will decrease jump by 50%. + +***physics_speed*** - Will increase/decrease the walk speed of the player so they walk faster/slower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_speed=1.5" will increase speed by 150%, "physics_speed= -0.5" will decrease speed by 50%. + +***physics_gravity*** - Will increase/decrease gravity the player experiences so it's higher/lower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_gravity=2" will increase gravity by 200%, "physics_gravity= -1" will decrease gravity by 100%. + +*Note: The player physics modifications won't be applied via `set_physics_override` if `player_physics_locked` is set to 1 in the respective player's meta.* + +### Durability +Durability is determined by the value assigned to the group ***armor_use***. The higher the ***armor_use*** value the faster/more quickly it is damaged/degrades. This is calculated using the formula: + + Total uses = approx(65535/armor_use) + + **Example** + All wood armor items have an ***armor_use=2000***; + + 65535/2000 = 32.76 (32) + After 32 uses(hits) the armor item will break. + + All diamond armor items have an ***armor_use=200***; + + 65535/2000 = 327.6 (327) + After 327 uses(hits) the armor item will break. + +### Armor Material +The material the armor is made from is defined by adding the material to the end of registered armor item name. It is very important the material is the last item in the registered item name and it is preceeded by an "_" eg "_materialname". +The material name is what 3d_armor uses to determine if a player is wearing a set of armor. To recieve the set bonus all items worn must be made of the same material. +So to get a set bonus under the default set settings the players armor items listed below must be made of the same material: +* head - Helmet +* torso - Chestplate +* legs - Leggings +* feet - Boots +* shield - Shields + +If all of the above were made of material "wood" the player would recieve an ***armor_set_bonus*** of armor_level * 1.1, essentially +10% + + **Example One** + + armor:register_armor("3d_armor:helmet_bronze", { + description = S("Bronze Helmet"), + inventory_image = "3d_armor_inv_helmet_bronze.png", + groups = {armor_head=1, armor_heal=6, armor_use=400, physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=10}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + + **Example Two** + + armor:register_armor("new_mod:helmet_spartan_bronze", { + description = S("Spartan Helmet"), + inventory_image = "new_mod_inv_helmet_spartan_bronze.png", + groups = {armor_head=1, armor_heal=6, armor_use=350, physics_speed=-0.01, physics_gravity=0.01}, + armor_groups = {fleshy=12}, + damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2}, + }) + +***Note: At the moment an armor item can only be made of one material*** + +## Armor Functions + +### armor set_player_armor + + armor:set_player_armor(player) + +Primarily an internal function but can be called externally to apply any +changes that might not otherwise get handled. + +### armor punch + + armor:punch(player, hitter, time_from_last_punch, tool_capabilities) + +Used to apply damage to all equipped armor based on the damage groups of +each individual item.`hitter`, `time_from_last_punch` and `tool_capabilities` +are optional but should be valid if included. + +### armor damage + + armor:damage(player, index, stack, use) + +Adds wear to a single armor itemstack, triggers `on_damage` callbacks and +updates the necessary inventories. Also handles item destruction callbacks +and so should NOT be called from `on_unequip` to avoid an infinite loop. + +### armor remove_all + + armor:remove_all(player) + +Removes all armors from the player's inventory without triggering any callback. + +### armor equip + + armor:equip(player, armor_name) + +Equip the armor, removing the itemstack from the main inventory if there's one. + +### armor unequip + + armor:unequip(player, armor_name) + +Unequip the armor, adding the itemstack to the main inventory. + +### armor update_skin + + armor:update_skin(player_name) + +Triggers a skin update with the same action as if a field with `skins_set` was submitted. + +## Callbacks + +### Item Callbacks + +In all of the below when armor is destroyed `stack` will contain a copy of the previous stack. + +*unsure what this note means may apply to all item callbacks or just on_punched* +Return `false` to override armor damage effects. + +#### on_equip + + on_equip = func(player, index, stack) + +#### on_unequip + + on_unequip = func(player, index, stack) + +#### on_destroy + + on_destroy = func(player, index, stack) + +#### on_damage + + on_damage = func(player, index, stack) + +#### on_punched + + on_punched = func(player, hitter, time_from_last_punch, tool_capabilities) + +`on_punched` is called every time a player is punched or takes damage, `hitter`, `time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the case of fall damage. +When fire protection is enabled, hitter == "fire" in the event of fire damage. + + +### Global Callbacks + +#### armor register_on_update + + armor:register_on_update(function(player)) + +#### armor register_on_equip + + armor:register_on_equip(function(player, index, stack)) + +#### armor register_on_unequip + + armor:register_on_unequip(function(player, index, stack)) + +#### armor register_on_destroy +armor:register_on_destroy(function(player, index, stack)) + + **Example** + + armor:register_on_update(function(player) + print(player:get_player_name().." armor updated!") + end) + + +# Credits + +### The below have added too, tested or in other ways contributed to the development and ongoing support of 3d_Armor + +|Stu |Stujones11 |Stu |Github Ghosts | +|:---------------:|:---------------:|:---------------:|:---------------:| +|Pavel_S |BlockMen |Tenplus1 |donat-b | +|JPRuehmann |BrandonReese |Megaf |Zeg9 | +|poet.nohit |Echoes91 |Adimgar |Khonkhortisan | +|VanessaE |CraigyDavi |proller |Thomasrudin | +|Byakuren |kilbith (jp) |afflatus |G1ov4 | +|Thomas-S |Dragonop |Napiophelios |Emojigit | +|rubenwardy |daviddoesminetest|bell07 |OgelGames | +|tobyplowy |crazyginger72 |fireglow |bhree | +|Lone_Wolf(HT) |Wuzzy(2) |numberZero |Monte48 | +|AntumDeluge |Terumoc |runsy |Dacmot | +|codexp |davidthecreator |SmallJoker |orbea | +|BuckarooBanzay |daret |Exeterdad |Calinou | +|Pilcrow182 |indriApollo |HybridDog |CraigyDavi | +|Paly-2 |Diogogomes | | | + +*Note: Names gathered from 3d_armor forum thread and github, I may have missed some people, apologises if I have - S01* diff --git a/3d_armor/3d_armor/README.txt b/3d_armor/3d_armor/README.txt deleted file mode 100644 index a0cb3b1..0000000 --- a/3d_armor/3d_armor/README.txt +++ /dev/null @@ -1,191 +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 = 1 - --- Number of initialization attempts. --- Use in conjunction with armor_init_delay if initialization problems persist. -armor_init_times = 1 - --- Increase this if armor is not getting into bones due to server lag. -armor_bones_delay = 1 - --- How often player armor items are updated. -armor_update_time = 1 - --- Drop armor when a player dies. --- Uses bones mod if present, otherwise items are dropped around the player. -armor_drop = true - --- Pulverise armor when a player dies, overrides armor_drop. -armor_destroy = false - --- You can use this to increase or decrease overall armor effectiveness, --- eg: level_multiplier = 0.5 will reduce armor level by half. -armor_level_multiplier = 1 - --- You can use this to increase or decrease overall armor healing, --- eg: armor_heal_multiplier = 0 will disable healing altogether. -armor_heal_multiplier = 1 - --- Enable water protection (periodically restores breath when activated) -armor_water_protect = true - --- Enable fire protection (defaults true if using ethereal mod) -armor_fire_protect = false - --- Enable punch damage effects. -armor_punch_damage = true - --- Enable migration of old armor inventories -armor_migrate_old_inventory = true - -API ---- - -Armor Registration: - -armor:register_armor(name, def) - -Wrapper function for `minetest.register_tool`, while registering armor as -a tool item is still supported, this may be deprecated in future so new code -should use this method. - -Additional fields supported by 3d_armor: - - texture = - preview = - armor_groups =
- damage_groups =
- reciprocate_damage = - on_equip = - on_unequip = - on_destroy = - on_damage = - on_punched = - -armor:register_armor_group(group, base) - -Example: - -armor:register_armor_group("radiation", 100) - -armor:register_armor("mod_name:speed_boots", { - description = "Speed Boots", - inventory_image = "mod_name_speed_boots_inv.png", - texture = "mod_name_speed_boots.png", - preview = "mod_name_speed_boots_preview.png", - groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1}, - armor_groups = {fleshy=10, radiation=10}, - damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1}, - reciprocate_damage = true, - on_destroy = function(player, index, stack) - local pos = player:getpos() - if pos then - minetest.sound_play({ - name = "mod_name_break_sound", - pos = pos, - gain = 0.5, - }) - end - end, -}) - -See armor.lua, technic_armor and shields mods for more examples. - -Default groups: - -Elements: armor_head, armor_torso, armor_legs, armor_feet -Attributes: armor_heal, armor_fire, armor_water -Physics: physics_jump, physics_speed, physics_gravity -Durability: armor_use, flammable - -Notes: - -Elements may be modified by dependent mods, eg shields adds armor_shield. -Attributes and physics values are 'stackable', durability is determined -by the level of armor_use, total uses == approx (65535/armor_use), non-fleshy -damage groups need to be defined in the tool/weapon used against the player. - -Reciprocal tool damage will be done only by the first armor inventory item - with `reciprocate_damage = true` - -Armor Functions: - -armor:set_player_armor(player) - -Primarily an internal function but can be called externally to apply any -changes that might not otherwise get handled. - -armor:punch(player, hitter, time_from_last_punch, tool_capabilities) - -Used to apply damage to all equipped armor based on the damage groups of -each individual item.`hitter`, `time_from_last_punch` and `tool_capabilities` -are optional but should be valid if included. - -armor:damage(player, index, stack, use) - -Adds wear to a single armor itemstack, triggers `on_damage` callbacks and -updates the necessary inventories. Also handles item destruction callbacks -and so should NOT be called from `on_unequip` to avoid an infinite loop. - -Item Callbacks: - -on_equip = func(player, index, stack) -on_unequip = func(player, index, stack) -on_destroy = func(player, index, stack) -on_damage = func(player, index, stack) -on_punched = func(player, hitter, time_from_last_punch, tool_capabilities) - -Notes: - -`on_punched` is called every time a player is punched or takes damage, `hitter`, -`time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the -case of fall damage, etc. When fire protection is enabled, hitter == "fire" -in the event of fire damage. Return `false` to override armor damage effects. -When armor is destroyed `stack` will contain a copy of the previous stack. - -Global Callbacks: - -armor:register_on_update(func(player)) -armor:register_on_equip(func(player, index, stack)) -armor:register_on_unequip(func(player, index, stack)) -armor:register_on_destroy(func(player, index, stack)) - -Global Callback Example: - -armor:register_on_update(function(player) - print(player:get_player_name().." armor updated!") -end) - diff --git a/3d_armor/3d_armor/api.lua b/3d_armor/3d_armor/api.lua index 9a456cb..dbca4f9 100644 --- a/3d_armor/3d_armor/api.lua +++ b/3d_armor/3d_armor/api.lua @@ -1,5 +1,5 @@ -- support for i18n -local S = armor_i18n.gettext +local S = minetest.get_translator(minetest.get_current_modname()) local skin_previews = {} local use_player_monoids = minetest.global_exists("player_monoids") @@ -74,7 +74,8 @@ armor = { on_destroy = {}, }, migrate_old_inventory = true, - version = "0.4.12", + version = "0.4.13", + get_translator = S } armor.config = { @@ -94,14 +95,38 @@ armor.config = { material_gold = true, material_mithril = true, material_crystal = true, + set_elements = "head torso legs feet shield", + set_multiplier = 1.1, water_protect = true, fire_protect = minetest.get_modpath("ethereal") ~= nil, + fire_protect_torch = minetest.get_modpath("ethereal") ~= nil, punch_damage = true, } -- Armor Registration armor.register_armor = function(self, name, def) + def.on_secondary_use = function(itemstack, player) + return armor:equip(player, itemstack) + end + def.on_place = function(itemstack, player, pointed_thing) + if pointed_thing.type == "node" and player and not player:get_player_control().sneak then + local node = minetest.get_node(pointed_thing.under) + local ndef = minetest.registered_nodes[node.name] + if ndef and ndef.on_rightclick then + return ndef.on_rightclick(pointed_thing.under, node, player, itemstack, pointed_thing) + end + end + return armor:equip(player, itemstack) + end + -- The below is a very basic check to try and see if a material name exists as part + -- of the item name. However this check is very simple and just checks theres "_something" + -- at the end of the item name and logging an error to debug if not. + local check_mat_exists = string.match(name, "%:.+_(.+)$") + if check_mat_exists == nil then + minetest.log("warning:[3d_armor] Registered armor "..name.. + " does not have \"_material\" specified at the end of the item registration name") + end minetest.register_tool(name, def) end @@ -182,15 +207,16 @@ armor.set_player_armor = function(self, player) end local state = 0 local count = 0 - local material = {count=1} local preview = armor:get_preview(name) local texture = "3d_armor_trans.png" - local textures = {} local physics = {} local attributes = {} local levels = {} local groups = {} local change = {} + local set_worn = {} + local armor_multi = 0 + local worn_armor = armor:get_weared_armor_elements(player) for _, phys in pairs(self.physics) do physics[phys] = 1 end @@ -244,21 +270,38 @@ armor.set_player_armor = function(self, player) local value = def.groups["armor_"..attr] or 0 attributes[attr] = attributes[attr] + value end - local mat = string.match(item, "%:.+_(.+)$") - if material.name then - if material.name == mat then - material.count = material.count + 1 + end + end + -- The following code compares player worn armor items against requirements + -- of which armor pieces are needed to be worn to meet set bonus requirements + for loc,item in pairs(worn_armor) do + local item_mat = string.match(item, "%:.+_(.+)$") + local worn_key = item_mat or "unknown" + + -- Perform location checks to ensure the armor is worn correctly + for k,set_loc in pairs(armor.config.set_elements)do + if set_loc == loc then + if set_worn[worn_key] == nil then + set_worn[worn_key] = 0 + set_worn[worn_key] = set_worn[worn_key] + 1 + else + set_worn[worn_key] = set_worn[worn_key] + 1 end - else - material.name = mat end end end + + -- Apply the armor multiplier only if the player is wearing a full set of armor + for mat_name,arm_piece_num in pairs(set_worn) do + if arm_piece_num == #armor.config.set_elements then + armor_multi = armor.config.set_multiplier + end + end for group, level in pairs(levels) do if level > 0 then level = level * armor.config.level_multiplier - if material.name and material.count == #self.elements then - level = level * 1.1 + if armor_multi ~= 0 then + level = level * armor.config.set_multiplier end end local base = self.registered_groups[group] @@ -279,6 +322,11 @@ armor.set_player_armor = function(self, player) if use_armor_monoid then armor_monoid.monoid:add_change(player, change, "3d_armor:armor") else + -- Preserve immortal group (damage disabled for player) + local immortal = player:get_armor_groups().immortal + if immortal and immortal ~= 0 then + groups.immortal = 1 + end player:set_armor_groups(groups) end if use_player_monoids then @@ -297,7 +345,10 @@ armor.set_player_armor = function(self, player) }) pova.do_override(player) else - player:set_physics_override(physics) + local player_physics_locked = player:get_meta():get_int("player_physics_locked") + if player_physics_locked == nil or player_physics_locked == 0 then + player:set_physics_override(physics) + end end self.textures[name].armor = texture self.textures[name].preview = preview @@ -312,6 +363,8 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili if not name then return end + local set_state + local set_count local state = 0 local count = 0 local recip = true @@ -319,8 +372,8 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili local list = armor_inv:get_list("armor") for i, stack in pairs(list) do if stack:get_count() == 1 then - local name = stack:get_name() - local use = minetest.get_item_group(name, "armor_use") or 0 + local itemname = stack:get_name() + local use = minetest.get_item_group(itemname, "armor_use") or 0 local damage = use > 0 local def = stack:get_definition() or {} if type(def.on_punched) == "function" then @@ -333,6 +386,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 @@ -368,21 +424,33 @@ armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabili end end if damage == true and hitter == "fire" then - damage = minetest.get_item_group(name, "flammable") > 0 + damage = minetest.get_item_group(itemname, "flammable") > 0 end if damage == true then self:damage(player, i, stack, use) + set_state = self.def[name].state + set_count = self.def[name].count end state = state + stack:get_wear() count = count + 1 end end + if set_count and set_count ~= count then + state = set_state or state + count = set_count or count + end self.def[name].state = state self.def[name].count = count end armor.damage = function(self, player, index, stack, use) local old_stack = ItemStack(stack) + local worn_armor = armor:get_weared_armor_elements(player) + local armor_worn_cnt = 0 + for k,v in pairs(worn_armor) do + armor_worn_cnt = armor_worn_cnt + 1 + end + use = math.ceil(use/armor_worn_cnt) stack:add_wear(use) self:run_callbacks("on_damage", player, index, stack) self:set_inventory_stack(player, index, stack) @@ -393,6 +461,66 @@ armor.damage = function(self, player, index, stack, use) end end +armor.get_weared_armor_elements = function(self, player) + local name, inv = self:get_valid_player(player, "[get_weared_armor]") + local weared_armor = {} + if not name then + return + end + for i=1, inv:get_size("armor") do + local item_name = inv:get_stack("armor", i):get_name() + local element = self:get_element(item_name) + if element ~= nil then + weared_armor[element] = item_name + end + end + return weared_armor +end + +armor.equip = function(self, player, itemstack) + local name, armor_inv = self:get_valid_player(player, "[equip]") + local weared_armor = self:get_weared_armor_elements(player) + local armor_element = self:get_element(itemstack:get_name()) + if name and armor_element then + if weared_armor[armor_element] ~= nil then + self:unequip(player, armor_element) + end + armor_inv:add_item("armor", itemstack:take_item()) + self:set_player_armor(player) + self:save_armor_inventory(player) + end + return itemstack +end + +armor.unequip = function(self, player, armor_element) + local name, armor_inv = self:get_valid_player(player, "[unequip]") + local weared_armor = self:get_weared_armor_elements(player) + if not name or not weared_armor[armor_element] then + return + end + local itemstack = armor_inv:remove_item("armor", ItemStack(weared_armor[armor_element])) + minetest.after(0, function() + local inv = player:get_inventory() + if inv:room_for_item("main", itemstack) then + inv:add_item("main", itemstack) + else + minetest.add_item(player:get_pos(), itemstack) + end + end) + self:set_player_armor(player) + self:save_armor_inventory(player) +end + +armor.remove_all = function(self, player) + local name, inv = self:get_valid_player(player, "[remove_all]") + if not name then + return + end + inv:set_list("armor", {}) + self:set_player_armor(player) + self:save_armor_inventory(player) +end + armor.get_player_skin = function(self, name) if (self.skin_mod == "skins" or self.skin_mod == "simple_skins") and skins.skins[name] then return skins.skins[name]..".png" @@ -404,6 +532,16 @@ armor.get_player_skin = function(self, name) return armor.default_skin..".png" end +armor.update_skin = function(self, name) + minetest.after(0, function() + local pplayer = minetest.get_player_by_name(name) + if pplayer then + self.textures[name].skin = self:get_player_skin(name) + self:set_player_armor(pplayer) + end + end) +end + armor.add_preview = function(self, preview) skin_previews[preview] = true end @@ -466,7 +604,8 @@ end armor.load_armor_inventory = function(self, player) local _, inv = self:get_valid_player(player, "[load_armor_inventory]") if inv then - local armor_list_string = player:get_attribute("3d_armor_inventory") + local meta = player:get_meta() + local armor_list_string = meta:get_string("3d_armor_inventory") if armor_list_string then inv:set_list("armor", self:deserialize_inventory_list(armor_list_string)) @@ -478,7 +617,8 @@ end armor.save_armor_inventory = function(self, player) local _, inv = self:get_valid_player(player, "[save_armor_inventory]") if inv then - player:set_attribute("3d_armor_inventory", + local meta = player:get_meta() + meta:set_string("3d_armor_inventory", self:serialize_inventory_list(inv:get_list("armor"))) end end @@ -498,17 +638,19 @@ end armor.get_valid_player = function(self, player, msg) msg = msg or "" if not player then - minetest.log("warning", S("3d_armor: Player reference is nil @1", msg)) + minetest.log("warning", ("3d_armor%s: Player reference is nil"):format(msg)) return end local name = player:get_player_name() if not name then - minetest.log("warning", S("3d_armor: Player name is nil @1", msg)) + minetest.log("warning", ("3d_armor%s: Player name is nil"):format(msg)) return end local inv = minetest.get_inventory({type="detached", name=name.."_armor"}) if not inv then - minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg)) + -- This check may fail when called inside `on_joinplayer` + -- in that case, the armor will be initialized/updated later on + minetest.log("warning", ("3d_armor%s: Detached armor inventory is nil"):format(msg)) return end return name, inv @@ -519,7 +661,7 @@ armor.drop_armor = function(pos, stack) if node then local obj = minetest.add_item(pos, stack) if obj then - obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)}) + obj:set_velocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)}) end end end diff --git a/3d_armor/3d_armor/armor.lua b/3d_armor/3d_armor/armor.lua index 85d120a..f791239 100644 --- a/3d_armor/3d_armor/armor.lua +++ b/3d_armor/3d_armor/armor.lua @@ -1,5 +1,5 @@ -- support for i18n -local S = armor_i18n.gettext +local S = armor.get_translator armor:register_armor("3d_armor:helmet_admin", { description = S("Admin Helmet"), @@ -79,6 +79,19 @@ if armor.materials.wood then damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1}, groups = {armor_feet=1, armor_heal=0, armor_use=2000, flammable=1}, }) + local wood_armor_fuel = { + helmet = 6, + chestplate = 8, + leggings = 7, + boots = 5 + } + for armor, burn in pairs(wood_armor_fuel) do + minetest.register_craft({ + type = "fuel", + recipe = "3d_armor:" .. armor .. "_wood", + burntime = burn, + }) + end end if armor.materials.cactus then @@ -110,6 +123,19 @@ if armor.materials.cactus then armor_groups = {fleshy=5}, damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, }) + local cactus_armor_fuel = { + helmet = 14, + chestplate = 16, + leggings = 15, + boots = 13 + } + for armor, burn in pairs(cactus_armor_fuel) do + minetest.register_craft({ + type = "fuel", + recipe = "3d_armor:" .. armor .. "_cactus", + burntime = burn, + }) + end end if armor.materials.steel then diff --git a/3d_armor/3d_armor/depends.txt b/3d_armor/3d_armor/depends.txt index a33755d..f101e69 100644 --- a/3d_armor/3d_armor/depends.txt +++ b/3d_armor/3d_armor/depends.txt @@ -5,4 +5,4 @@ pova? fire? ethereal? bakedclay? -intllib? +moreores? diff --git a/3d_armor/3d_armor/init.lua b/3d_armor/3d_armor/init.lua index f208081..bb84364 100644 --- a/3d_armor/3d_armor/init.lua +++ b/3d_armor/3d_armor/init.lua @@ -5,15 +5,17 @@ local last_punch_time = {} local pending_players = {} local timer = 0 --- support for i18n -armor_i18n = { } -armor_i18n.gettext, armor_i18n.ngettext = dofile(modpath.."/intllib.lua") +dofile(modpath.."/api.lua") -- local functions -local S = armor_i18n.gettext local F = minetest.formspec_escape +local S = armor.get_translator + +-- integration test +if minetest.settings:get_bool("enable_3d_armor_integration_test") then + dofile(modpath.."/integration_test.lua") +end -dofile(modpath.."/api.lua") -- Legacy Config Support @@ -21,13 +23,11 @@ local input = io.open(modpath.."/armor.conf", "r") if input then dofile(modpath.."/armor.conf") input:close() - input = nil end input = io.open(worldpath.."/armor.conf", "r") if input then dofile(worldpath.."/armor.conf") input:close() - input = nil end for name, _ in pairs(armor.config) do local global = "ARMOR_"..name:upper() @@ -48,6 +48,8 @@ for name, config in pairs(armor.config) do local setting = minetest.settings:get("armor_"..name) if type(config) == "number" then setting = tonumber(setting) + elseif type(config) == "string" then + setting = tostring(setting) elseif type(config) == "boolean" then setting = minetest.settings:get_bool("armor_"..name) end @@ -62,11 +64,26 @@ for material, _ in pairs(armor.materials) do end end +-- Convert set_elements to a Lua table splitting on blank spaces +local t_set_elements = armor.config.set_elements +armor.config.set_elements = string.split(t_set_elements, " ") + +-- Remove torch damage if fire_protect_torch == false +if armor.config.fire_protect_torch == false and armor.config.fire_protect == true then + for k,v in pairs(armor.fire_nodes) do + for k2,v2 in pairs(v) do + if string.find (v2,"torch") then + armor.fire_nodes[k] = nil + end + end + end +end + -- Mod Compatibility if minetest.get_modpath("technic") then armor.formspec = armor.formspec.. - "label[5,2.5;"..F(S("Radiation"))..": armor_group_radiation]" + "label[5,2.5;"..F(S("Radiation"))..": armor_group_radiation]" armor:register_armor_group("radiation") end local skin_mods = {"skins", "u_skins", "simple_skins", "wardrobe"} @@ -95,26 +112,37 @@ dofile(modpath.."/armor.lua") armor.formspec = armor.formspec.. "label[5,1;"..F(S("Level"))..": armor_level]".. - "label[5,1.5;"..F(S("Heal"))..": armor_attr_heal]" + "label[5,1.5;"..F(S("Heal"))..": armor_attr_heal]" if armor.config.fire_protect then - armor.formspec = armor.formspec.."label[5,2;"..F(S("Fire"))..": armor_attr_fire]" + armor.formspec = armor.formspec.."label[5,2;"..F(S("Fire"))..": armor_attr_fire]" end +armor:register_on_damage(function(player, index, stack) + local name = player:get_player_name() + local def = stack:get_definition() + if name and def and def.description and stack:get_wear() > 60100 then + minetest.chat_send_player(name, S("Your @1 is almost broken!", def.description)) + minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0}) + end +end) armor:register_on_destroy(function(player, index, stack) local name = player:get_player_name() local def = stack:get_definition() if name and def and def.description then minetest.chat_send_player(name, S("Your @1 got destroyed!", def.description)) + minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0}) end end) local function validate_armor_inventory(player) -- Workaround for detached inventory swap exploit local _, inv = armor:get_valid_player(player, "[validate_armor_inventory]") + local pos = player:get_pos() if not inv then return end local armor_prev = {} - local armor_list_string = player:get_attribute("3d_armor_inventory") + local attribute_meta = player:get_meta() -- I know, the function's name is weird but let it be like that. ;) + local armor_list_string = attribute_meta:get_string("3d_armor_inventory") if armor_list_string then local armor_list = armor:deserialize_inventory_list(armor_list_string) for i, stack in ipairs(armor_list) do @@ -140,6 +168,7 @@ local function validate_armor_inventory(player) elements[element] = true; else inv:remove_item("armor", stack) + minetest.item_drop(stack, player, pos) -- The following code returns invalid items to the player's main -- inventory but could open up the possibity for a hacked client -- to receive items back they never really had. I am not certain @@ -158,9 +187,9 @@ local function validate_armor_inventory(player) end end -local function init_player_armor(player) - local name = player:get_player_name() - local pos = player:getpos() +local function init_player_armor(initplayer) + local name = initplayer:get_player_name() + local pos = initplayer:get_pos() if not name or not pos then return false end @@ -181,6 +210,9 @@ local function init_player_armor(player) armor:set_player_armor(player) end, allow_put = function(inv, listname, index, put_stack, player) + if player:get_player_name() ~= name then + return 0 + end local element = armor:get_element(put_stack:get_name()) if not element then return 0 @@ -196,27 +228,33 @@ local function init_player_armor(player) return 1 end, allow_take = function(inv, listname, index, stack, player) + if player:get_player_name() ~= name then + return 0 + end return stack:get_count() end, allow_move = function(inv, from_list, from_index, to_list, to_index, count, player) + if player:get_player_name() ~= name then + return 0 + end return count end, }, name) armor_inv:set_size("armor", 6) - if not armor:load_armor_inventory(player) and armor.migrate_old_inventory then - local player_inv = player:get_inventory() + if not armor:load_armor_inventory(initplayer) and armor.migrate_old_inventory then + local player_inv = initplayer:get_inventory() player_inv:set_size("armor", 6) for i=1, 6 do local stack = player_inv:get_stack("armor", i) armor_inv:set_stack("armor", i, stack) end - armor:save_armor_inventory(player) + armor:save_armor_inventory(initplayer) player_inv:set_size("armor", 0) end for i=1, 6 do local stack = armor_inv:get_stack("armor", i) if stack:get_count() > 0 then - armor:run_callbacks("on_equip", player, i, stack) + armor:run_callbacks("on_equip", initplayer, i, stack) end end armor.def[name] = { @@ -252,7 +290,7 @@ local function init_player_armor(player) end end end - armor:set_player_armor(player) + armor:set_player_armor(initplayer) return true end @@ -280,24 +318,25 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if not name then return end + local player_name = player:get_player_name() for field, _ in pairs(fields) do if string.find(field, "skins_set") then - minetest.after(0, function(player) - local skin = armor:get_player_skin(name) - armor.textures[name].skin = skin - armor:set_player_armor(player) - end, player) + armor:update_skin(player_name) end end end) minetest.register_on_joinplayer(function(player) default.player_set_model(player, "3d_armor_character.b3d") - minetest.after(0, function(player) - if init_player_armor(player) == false then - pending_players[player] = 0 + local player_name = player:get_player_name() + + minetest.after(0, function() + -- TODO: Added in 7566ecc - What's the prupose? + local pplayer = minetest.get_player_by_name(player_name) + if pplayer and init_player_armor(pplayer) == false then + pending_players[pplayer] = 0 end - end, player) + end) end) minetest.register_on_leaveplayer(function(player) @@ -326,12 +365,12 @@ if armor.config.drop == true or armor.config.destroy == true then end armor:save_armor_inventory(player) armor:set_player_armor(player) - local pos = player:getpos() + local pos = player:get_pos() if pos and armor.config.destroy == false then minetest.after(armor.config.bones_delay, function() local meta = nil - local maxp = vector.add(pos, 8) - local minp = vector.subtract(pos, 8) + local maxp = vector.add(pos, 16) + local minp = vector.subtract(pos, 16) local bones = minetest.find_nodes_in_area(minp, maxp, {"bones:bones"}) for _, p in pairs(bones) do local m = minetest.get_meta(p) @@ -357,21 +396,29 @@ 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 end) end -minetest.register_on_player_hpchange(function(player, hp_change) - if player and hp_change < 0 then +minetest.register_on_player_hpchange(function(player, hp_change, reason) + if player and reason.type ~= "drown" and reason.hunger == nil + and hp_change < 0 then local name = player:get_player_name() if name then local heal = armor.def[name].heal @@ -390,80 +437,68 @@ end, true) minetest.register_globalstep(function(dtime) timer = timer + dtime - if timer > armor.config.init_delay then - for player, count in pairs(pending_players) do - local remove = init_player_armor(player) == true - pending_players[player] = count + 1 - if remove == false and count > armor.config.init_times then - minetest.log("warning", S("3d_armor: Failed to initialize player")) - remove = true - end - if remove == true then - pending_players[player] = nil + if timer <= armor.config.init_delay then + return + end + timer = 0 + + for player, count in pairs(pending_players) do + local remove = init_player_armor(player) == true + pending_players[player] = count + 1 + if remove == false and count > armor.config.init_times then + minetest.log("warning", S("3d_armor: Failed to initialize player")) + remove = true + end + if remove == true then + pending_players[player] = nil + end + end + + -- water breathing protection, added by TenPlus1 + if armor.config.water_protect == true then + for _,player in pairs(minetest.get_connected_players()) do + local name = player:get_player_name() + if armor.def[name].water > 0 and + player:get_breath() < 10 then + player:set_breath(10) end end - timer = 0 end end) --- Fire Protection and water breating, added by TenPlus1 - +-- Fire Protection, added by TenPlus1. if armor.config.fire_protect == true then - -- override hot nodes so they do not hurt player anywhere but mod + -- override any hot nodes that do not already deal damage for _, row in pairs(armor.fire_nodes) do if minetest.registered_nodes[row[1]] then - minetest.override_item(row[1], {damage_per_second = 0}) + local damage = minetest.registered_nodes[row[1]].damage_per_second + if not damage or damage == 0 then + minetest.override_item(row[1], {damage_per_second = row[3]}) + end end end else - print (S("[3d_armor] Fire Nodes disabled")) + print ("[3d_armor] Fire Nodes disabled") end -if armor.config.water_protect == true or armor.config.fire_protect == true then - minetest.register_globalstep(function(dtime) - armor.timer = armor.timer + dtime - if armor.timer < armor.config.update_time then - return - end - for _,player in pairs(minetest.get_connected_players()) do - local name = player:get_player_name() - local pos = player:getpos() - local hp = player:get_hp() - if not name or not pos or not hp then - return - end - -- water breathing - if armor.config.water_protect == true then - if armor.def[name].water > 0 and - player:get_breath() < 10 then - player:set_breath(10) - end - end +if armor.config.fire_protect == true then + minetest.register_on_player_hpchange(function(player, hp_change, reason) + + if reason.type == "node_damage" and reason.node then -- fire protection - if armor.config.fire_protect == true then - local fire_damage = true - pos.y = pos.y + 1.4 -- head level - local node_head = minetest.get_node(pos).name - pos.y = pos.y - 1.2 -- feet level - local node_feet = minetest.get_node(pos).name - -- is player inside a hot node? - for _, row in pairs(armor.fire_nodes) do - -- check fire protection, if not enough then get hurt - if row[1] == node_head or row[1] == node_feet then - if fire_damage == true then + if armor.config.fire_protect == true and hp_change < 0 then + local name = player:get_player_name() + for _,igniter in pairs(armor.fire_nodes) do + if reason.node == igniter[1] then + if armor.def[name].fire < igniter[2] then armor:punch(player, "fire") - last_punch_time[name] = minetest.get_gametime() - fire_damage = false - end - if hp > 0 and armor.def[name].fire < row[2] then - hp = hp - row[3] * armor.config.update_time - player:set_hp(hp) - break + else + hp_change = 0 end end end end end - armor.timer = 0 - end) + return hp_change + end, true) end diff --git a/3d_armor/3d_armor/integration_test.lua b/3d_armor/3d_armor/integration_test.lua new file mode 100644 index 0000000..65e9dfd --- /dev/null +++ b/3d_armor/3d_armor/integration_test.lua @@ -0,0 +1,25 @@ + +minetest.log("warning", "[TEST] integration-test enabled!") + +minetest.register_on_mods_loaded(function() + minetest.after(1, function() + + local data = minetest.write_json({ success = true }, true); + local file = io.open(minetest.get_worldpath().."/integration_test.json", "w" ); + if file then + file:write(data) + file:close() + end + + file = io.open(minetest.get_worldpath().."/registered_nodes.txt", "w" ); + if file then + for name in pairs(minetest.registered_nodes) do + file:write(name .. '\n') + end + file:close() + end + + minetest.log("warning", "[TEST] integration tests done!") + minetest.request_shutdown("success") + end) +end) diff --git a/3d_armor/3d_armor/intllib.lua b/3d_armor/3d_armor/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/3d_armor/3d_armor/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/3d_armor/3d_armor/locale/3d_armor.es.tr b/3d_armor/3d_armor/locale/3d_armor.es.tr new file mode 100644 index 0000000..86a44db --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.es.tr @@ -0,0 +1,58 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: La armadura desconectada es nula @1 +3d_armor: Player name is nil @1=3d_armor: El nombre del jugador es nulo @1 +3d_armor: Player reference is nil @1=3d_armor: La referencia del jugador es nula @1 + +### armor.lua ### + +Admin Boots=Botas de admin +Admin Chestplate=Peto de admin +Admin Helmet=Casco de admin +Admin Leggings=Grebas de admin +Bronze Boots=Botas de bronce +Bronze Chestplate=Peto de bronce +Bronze Helmet=Casco de bronce +Bronze Leggings=Grebas de bronce +Cactus Boots=Botas de cactus +Cactus Chestplate=Peto de cactus +Cactus Helmet=Casco de cactus +Cactus Leggings=Grebas de cactus +Crystal Boots=Botas de cristal +Crystal Chestplate=Peto de cristal +Crystal Helmet=Casco de cristal +Crystal Leggings=Grebas de cristal +Diamond Boots=Botas de diamante +Diamond Chestplate=Peto de diamante +Diamond Helmet=Casco de diamante +Diamond Leggings=Grebas de diamante +Gold Boots=Botas de oro +Gold Chestplate=Peto de oro +Gold Helmet=Casco de oro +Gold Leggings=Grebas de oro +Mithril Boots=Botas de mitrilo +Mithril Chestplate=Peto de mitrilo +Mithril Helmet=Casco de mitrilo +Mithril Leggings=Grebas de mitrilo +Steel Boots=Botas de acero +Steel Chestplate=Peto de acero +Steel Helmet=Casco de acero +Steel Leggings=Grebas de acero +Wood Boots=Botas de madera +Wood Chestplate=Peto de madera +Wood Helmet=Casco de madera +Wood Leggings=Grebas de madera + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Fallo en la inicialización del jugador +Fire=Fuego +Heal=Salud +Level=Nivel +Radiation=Radiación +Your @1 got destroyed!=¡Tu @1 fue destruído! +Your @1 is almost broken!=¡Tu @1 esta a punto de romperse! +[3d_armor] Fire Nodes disabled=[3d_armor] Nodos de fuego desabilitados diff --git a/3d_armor/3d_armor/locale/3d_armor.fr.tr b/3d_armor/3d_armor/locale/3d_armor.fr.tr new file mode 100644 index 0000000..849a0f1 --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.fr.tr @@ -0,0 +1,58 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor : Inventaire détaché pour l'armure non trouvé @1 +3d_armor: Player name is nil @1=3d_armor : Nom du joueur non trouvé @1 +3d_armor: Player reference is nil @1=3d_armor : Référence au joueur non trouvée @1 + +### armor.lua ### + +Admin Boots=Bottes d'admin +Admin Chestplate=Cuirasse d'admin +Admin Helmet=Casque d'admin +Admin Leggings=Jambières d'admin +Bronze Boots=Bottes en bronze +Bronze Chestplate=Cuirasse en bronze +Bronze Helmet=Casque en bronze +Bronze Leggings=Jambières en bronze +Cactus Boots=Bottes en cactus +Cactus Chestplate=Cuirasse en cactus +Cactus Helmet=Casque en cactus +Cactus Leggings=Jambières en cactus +Crystal Boots=Bottes en cristal +Crystal Chestplate=Cuirasse en cristal +Crystal Helmet=Casque en cristal +Crystal Leggings=Jambières en cristal +Diamond Boots=Bottes en diamant +Diamond Chestplate=Cuirasse en diamant +Diamond Helmet=Casque en diamant +Diamond Leggings=Jambières en diamant +Gold Boots=Bottes en or +Gold Chestplate=Cuirasse en or +Gold Helmet=Casque en or +Gold Leggings=Jambières en or +Mithril Boots=Bottes en mithril +Mithril Chestplate=Cuirasse en mithril +Mithril Helmet=Casque en mithril +Mithril Leggings=Jambières en mithril +Steel Boots=Bottes en acier +Steel Chestplate=Cuirasse en acier +Steel Helmet=Casque en acier +Steel Leggings=Jambières en acier +Wood Boots=Bottes en bois +Wood Chestplate=Cuirasse en bois +Wood Helmet=Casque en bois +Wood Leggings=Jambières en bois + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor : Impossible d'initialiser le joueur +Fire=Fire +Heal=Soins +Level=Niveau +Radiation=Radiation +Your @1 got destroyed!=Une partie de votre armure a été détruite : @1 ! +Your @1 is almost broken!=Une partie de votre armure est presque détruite : @1 ! +[3d_armor] Fire Nodes disabled=[3d_armor] Nœuds de type feu désactivés diff --git a/3d_armor/3d_armor/locale/3d_armor.it.tr b/3d_armor/3d_armor/locale/3d_armor.it.tr new file mode 100644 index 0000000..d8be62e --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.it.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: L'inventario separato dell'armatura è nullo @1 +3d_armor: Player name is nil @1=3d_armor: Il nome dell'utente è nullo @1 +3d_armor: Player reference is nil @1=3d_armor: Il riferimento all'utente è nullo @1 + +### armor.lua ### + +Admin Boots=Stivali dell'amministratrice/tore +Admin Chestplate=Corazza dell'amministratrice/tore +Admin Helmet=Elmo dell'amministratrice/tore +Admin Leggings=Gambali dell'amministratrice/tore +Bronze Boots=Stivali di bronzo +Bronze Chestplate=Corazza di bronzo +Bronze Helmet=Elmo di bronzo +Bronze Leggings=Gambali di bronzo +Cactus Boots=Stivali di cactus +Cactus Chestplate=Corazza di cactus +Cactus Helmet=Elmo di cactus +Cactus Leggings=Gambali di cactus +Crystal Boots=Stivali di cristallo +Crystal Chestplate=Corazza di cristallo +Crystal Helmet=Elmo di cristallo +Crystal Leggings=Gambali di cristallo +Diamond Boots=Stivali di diamante +Diamond Chestplate=Corazza di diamante +Diamond Helmet=Elmo di diamante +Diamond Leggings=Gambali di diamante +Gold Boots=Stivali d'oro +Gold Chestplate=Corazza d'oro +Gold Helmet=Elmo d'oro +Gold Leggings=Gambali d'oro +Mithril Boots=Stivali di mithril +Mithril Chestplate=Corazza di mithril +Mithril Helmet=Elmo di mithril +Mithril Leggings=Gambali di mithril +Steel Boots=Stivali d'acciaio +Steel Chestplate=Corazza d'acciaio +Steel Helmet=Elmo d'acciaio +Steel Leggings=Gambali d'acciaio +Wood Boots=Stivali di legno +Wood Chestplate=Corazza di legno +Wood Helmet=Elmo di legno +Wood Leggings=Gambali di legno + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Inizializzazione dell'utente fallita +Fire=Fuoco +Heal=Guarigione +Level=Livello +Radiation=Radiazione +Your @1 got destroyed!=@1 in frantumi! +Your @1 is almost broken!=@1 quasi in frantumi! +[3d_armor] Fire Nodes disabled=[3d_armor] Nodi fuoco disabilitati + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod caricata ma inutilizzata. +Back=Indietro +Armor=Armatura +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod caricata ma inutilizzata. +Armor stand top=Parte superiore del supporto per armatura +Armor stand=Supporto per armatura +Armor Stand=Supporto per armatura +Locked Armor stand=Supporto per armatura chiuso a chiave +Armor Stand (owned by @1)=Supporto per armatura (di proprietà di @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod caricata ma inutilizzata. +3d Armor=Armatura 3D +Armor not initialized!=Armatura non inizializzata! +Admin Shield=Scudo dell'amministratrice/tore +Wooden Shield=Scudo di legno +Enhanced Wood Shield=Scudo di legno migliorato +Cactus Shield=Scudo di cactus +Enhanced Cactus Shield=Scudo di cactus migliorato +Steel Shield=Scudo d'acciaio +Bronze Shield=Scudo di bronzo +Diamond Shield=Scudo di diamante +Gold Shield=Scudo d'oro +Mithril Shield=Scudo di mithril +Crystal Shield=Scudo di cristallo diff --git a/3d_armor/3d_armor/locale/3d_armor.ms.tr b/3d_armor/3d_armor/locale/3d_armor.ms.tr new file mode 100644 index 0000000..b76dd61 --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.ms.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Inventori perisai terpisah tiada nilai @1 +3d_armor: Player name is nil @1=3d_armor: Nama pemain tiada nilai @1 +3d_armor: Player reference is nil @1=3d_armor: Rujukan pemain tiada nilai @1 + +### armor.lua ### + +Admin Boots=But Pentadbir +Admin Chestplate=Perisai Dada Pentadbir +Admin Helmet=Helmet Pentadbir +Admin Leggings=Perisai Kaki Pentadbir +Bronze Boots=But Gangsa +Bronze Chestplate=Perisai Dada Gangsa +Bronze Helmet=Helmet Gangsa +Bronze Leggings=Perisai Kaki Gangsa +Cactus Boots=But Kaktus +Cactus Chestplate=Perisai Dada Kaktus +Cactus Helmet=Helmet Kaktus +Cactus Leggings=Perisai Kaki Kaktus +Crystal Boots=But Kristal +Crystal Chestplate=Perisai Dada Kristal +Crystal Helmet=Helmet Kristal +Crystal Leggings=Perisai Kaki Kristal +Diamond Boots=But Intan +Diamond Chestplate=Perisai Dada Intan +Diamond Helmet=Helmet Intan +Diamond Leggings=Perisai Kaki Intan +Gold Boots=But Emas +Gold Chestplate=Perisai Dada Emas +Gold Helmet=Helmet Emas +Gold Leggings=Perisai Kaki Emas +Mithril Boots=But Mithril +Mithril Chestplate=Perisai Dada Mithril +Mithril Helmet=Helmet Mithril +Mithril Leggings=Perisai Kaki Mithril +Steel Boots=But Keluli +Steel Chestplate=Perisai Dada Keluli +Steel Helmet=Helmet Keluli +Steel Leggings=Perisai Kaki Keluli +Wood Boots=But Kayu +Wood Chestplate=Perisai Dada Kayu +Wood Helmet=Helmet Kayu +Wood Leggings=Perisai Kaki Kayu + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Gagal mengasalkan pemain +Fire=Api +Heal=Pulih +Level=Tahap +Radiation=Radiasi +Your @1 got destroyed!=@1 anda telah musnah! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] Nod-nod Api dilumpuhkan + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mods dimuatkan tetapi tidak digunakan. +Back=Kembali +Armor=Perisai +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan. +Armor stand top=Bhg atas dirian perisai +Armor stand=Dirian perisai +Armor Stand=Dirian Perisai +Locked Armor stand=Dirian perisai Berkunci +Armor Stand (owned by @1)=Dirian Perisai (milik @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mods dimuatkan tetapi tidak digunakan. +3d Armor=Perisai 3d +Armor not initialized!=Perisai tidak diasalkan! +Admin Shield=Perisai Pegang Pentadbir +Wooden Shield=Perisai Pegang Kayu +Enhanced Wood Shield=Perisai Pegang Kayu Kukuh +Cactus Shield=Perisai Pegang Kaktus +Enhanced Cactus Shield=Perisai Pegang Kaktus Kukuh +Steel Shield=Perisai Pegang Keluli +Bronze Shield=Perisai Pegang Gangsa +Diamond Shield=Perisai Pegang Intan +Gold Shield=Perisai Pegang Emas +Mithril Shield=Perisai Pegang Mithril +Crystal Shield=Perisai Pegang Kristal diff --git a/3d_armor/3d_armor/locale/3d_armor.pt.tr b/3d_armor/3d_armor/locale/3d_armor.pt.tr new file mode 100644 index 0000000..8fc689d --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.pt.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Inventario avulso de armadura é nulo @1 +3d_armor: Player name is nil @1=3d_armor: Nome de jogador é nulo @1 +3d_armor: Player reference is nil @1=3d_armor: Referência Jogador é nula @1 + +### armor.lua ### + +Admin Boots=Botas de Administrador +Admin Chestplate=Peitoral de Administrador +Admin Helmet=Capacete de Administrador +Admin Leggings=Calças de Administrador +Bronze Boots=Botas de Bronze +Bronze Chestplate=Peitoral de Bronze +Bronze Helmet=Capacete de Bronze +Bronze Leggings=Calças de Bronze +Cactus Boots=Botas de Madeira +Cactus Chestplate=Peitoral de Cacto +Cactus Helmet=Capacete de Cacto +Cactus Leggings=Calças de Cacto +Crystal Boots=Botas de Cristal +Crystal Chestplate=Peitoral de Cristal +Crystal Helmet=Capacete de Cristal +Crystal Leggings=Calças de Cristal +Diamond Boots=Botas de Diamante +Diamond Chestplate=Peitoral de Diamante +Diamond Helmet=Capacete de Diamante +Diamond Leggings=Calças de Diamante +Gold Boots=Botas de Ouro +Gold Chestplate=Peitoral de Ouro +Gold Helmet=Capacete de Ouro +Gold Leggings=Calças de Ouro +Mithril Boots=Botas de Mithril +Mithril Chestplate=Peitoral de Mithril +Mithril Helmet=Capacete de Mithril +Mithril Leggings=Calças de Mithril +Steel Boots=Botas de Aço +Steel Chestplate=Peitoral de Aço +Steel Helmet=Capacete de Aço +Steel Leggings=Calças de Aço +Wood Boots=Botas de Madeira +Wood Chestplate=Peitoral de Madeira +Wood Helmet=Capacete de Madeira +Wood Leggings=Calças de Madeira + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Falha ao inicializar jogador +Fire=Fogo +Heal=Saúde +Level=Nível +Radiation=Radiação +Your @1 got destroyed!=@1 foi destruído(a)! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] Nodes de gofo desabilitados + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod carregado mas inoperante. +Back=Voltar +Armor=Armadura +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod carregado mas inoperante. +Armor stand top=Topo de estande de armadura +Armor stand=Estande de armadura +Armor Stand=Estande de Armadura +Locked Armor stand=Estande de Armadura Trancada +Armor Stand (owned by @1)=Estande de Armadura (pertente a @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod carregado mas inoperante. +3d Armor=3d Armor +Armor not initialized!=Armadura não inicializada! +Admin Shield=Escudo de Administrador +Wooden Shield=Escudo de Madeira +Enhanced Wood Shield=Escudo de Madeira Melhorado +Cactus Shield=Escudo de Cacto +Enhanced Cactus Shield=Escudo de Cacto Melhorado +Steel Shield=Escudo de Aço +Bronze Shield=Escudo de Bronze +Diamond Shield=Escudo de Diamante +Gold Shield=Escudo de Ouro +Mithril Shield=Escudo de Mithril +Crystal Shield=Escudo de Cristal diff --git a/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr b/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr new file mode 100644 index 0000000..8fc689d --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.pt_BR.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Inventario avulso de armadura é nulo @1 +3d_armor: Player name is nil @1=3d_armor: Nome de jogador é nulo @1 +3d_armor: Player reference is nil @1=3d_armor: Referência Jogador é nula @1 + +### armor.lua ### + +Admin Boots=Botas de Administrador +Admin Chestplate=Peitoral de Administrador +Admin Helmet=Capacete de Administrador +Admin Leggings=Calças de Administrador +Bronze Boots=Botas de Bronze +Bronze Chestplate=Peitoral de Bronze +Bronze Helmet=Capacete de Bronze +Bronze Leggings=Calças de Bronze +Cactus Boots=Botas de Madeira +Cactus Chestplate=Peitoral de Cacto +Cactus Helmet=Capacete de Cacto +Cactus Leggings=Calças de Cacto +Crystal Boots=Botas de Cristal +Crystal Chestplate=Peitoral de Cristal +Crystal Helmet=Capacete de Cristal +Crystal Leggings=Calças de Cristal +Diamond Boots=Botas de Diamante +Diamond Chestplate=Peitoral de Diamante +Diamond Helmet=Capacete de Diamante +Diamond Leggings=Calças de Diamante +Gold Boots=Botas de Ouro +Gold Chestplate=Peitoral de Ouro +Gold Helmet=Capacete de Ouro +Gold Leggings=Calças de Ouro +Mithril Boots=Botas de Mithril +Mithril Chestplate=Peitoral de Mithril +Mithril Helmet=Capacete de Mithril +Mithril Leggings=Calças de Mithril +Steel Boots=Botas de Aço +Steel Chestplate=Peitoral de Aço +Steel Helmet=Capacete de Aço +Steel Leggings=Calças de Aço +Wood Boots=Botas de Madeira +Wood Chestplate=Peitoral de Madeira +Wood Helmet=Capacete de Madeira +Wood Leggings=Calças de Madeira + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: Falha ao inicializar jogador +Fire=Fogo +Heal=Saúde +Level=Nível +Radiation=Radiação +Your @1 got destroyed!=@1 foi destruído(a)! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] Nodes de gofo desabilitados + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod carregado mas inoperante. +Back=Voltar +Armor=Armadura +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod carregado mas inoperante. +Armor stand top=Topo de estande de armadura +Armor stand=Estande de armadura +Armor Stand=Estande de Armadura +Locked Armor stand=Estande de Armadura Trancada +Armor Stand (owned by @1)=Estande de Armadura (pertente a @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod carregado mas inoperante. +3d Armor=3d Armor +Armor not initialized!=Armadura não inicializada! +Admin Shield=Escudo de Administrador +Wooden Shield=Escudo de Madeira +Enhanced Wood Shield=Escudo de Madeira Melhorado +Cactus Shield=Escudo de Cacto +Enhanced Cactus Shield=Escudo de Cacto Melhorado +Steel Shield=Escudo de Aço +Bronze Shield=Escudo de Bronze +Diamond Shield=Escudo de Diamante +Gold Shield=Escudo de Ouro +Mithril Shield=Escudo de Mithril +Crystal Shield=Escudo de Cristal diff --git a/3d_armor/3d_armor/locale/3d_armor.ru.tr b/3d_armor/3d_armor/locale/3d_armor.ru.tr new file mode 100644 index 0000000..b817c79 --- /dev/null +++ b/3d_armor/3d_armor/locale/3d_armor.ru.tr @@ -0,0 +1,85 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1=3d_armor: Отдельный инвентарь брони является nil @1 +3d_armor: Player name is nil @1=3d_armor: Имя игрока является nil @1 +3d_armor: Player reference is nil @1=3d_armor: Ссылка игрока является nil @1 + +### armor.lua ### + +Admin Boots=ботинки админа +Admin Chestplate=бронежилет админа +Admin Helmet=шлем админа +Admin Leggings=гамаши админа +Bronze Boots=бронзовые ботинки +Bronze Chestplate=бронзовый бронежилет +Bronze Helmet=бронзовый шлем +Bronze Leggings=бронзовые гамаши +Cactus Boots=кактусовые ботинки +Cactus Chestplate=кактусовый бронежилет +Cactus Helmet=кактусовый шлем +Cactus Leggings=кактусовые гамаши +Crystal Boots=кристалловые ботинки +Crystal Chestplate=кристалловый бронежилет +Crystal Helmet=кристалловый шлем +Crystal Leggings=кристалловые гамаши +Diamond Boots=алмазные ботинки +Diamond Chestplate=алмазный бронежилет +Diamond Helmet=алмазный шлем +Diamond Leggings=алмазные гамаши +Gold Boots=золотые ботинки +Gold Chestplate=золотой бронежилет +Gold Helmet=золотой шлем +Gold Leggings=золотые гамаши +Mithril Boots=мифриловые ботинки +Mithril Chestplate=мифриловый бронежилет +Mithril Helmet=мифриловый шлем +Mithril Leggings=мифриловые гамаши +Steel Boots=стальные ботинки +Steel Chestplate=стальной бронежилет +Steel Helmet=стальной шлем +Steel Leggings=стальные гамаши +Wood Boots=деревянные ботинки +Wood Chestplate=деревянный бронежилет +Wood Helmet=деревянный шлем +Wood Leggings=деревянные гамаши + +### init.lua ### + +3d_armor: Failed to initialize player=3d_armor: не смог подготовить игрока +Fire=огонь +Heal=исцеление +Level=уровень +Radiation=излучение +Your @1 got destroyed!=твой(и) @1 был(и) разрушен(ы)! +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled=[3d_armor] блоки огня отключены + + +##### not used anymore ##### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip: мод загружен но не используется. +Back=назад +Armor=бронь +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: мод загружен но не используется. +Armor stand top=стойка для брони (верх) +Armor stand=стойка для брони +Armor Stand=стойка для брони +Locked Armor stand=защищенная стойка для брони +Armor Stand (owned by @1)=стойка для брони (принадлежит @1) +3d_armor_ui: Mod loaded but unused.=3d_armor_ui: мод загружен но не используется. +3d Armor=3D бронь +Armor not initialized!=бронь не подготовлена! +Admin Shield=щит админа +Wooden Shield=деревянный щит +Enhanced Wood Shield=улучшенный деревянный щит +Cactus Shield=кактусный щит +Enhanced Cactus Shield=улучшенный кактусный щит +Steel Shield=стальной щит +Bronze Shield=бронзовый щит +Diamond Shield=алмазный щит +Gold Shield=золотой щит +Mithril Shield=мифриловый щит +Crystal Shield=кристалловый щит diff --git a/3d_armor/3d_armor/locale/es.po b/3d_armor/3d_armor/locale/es.po deleted file mode 100644 index 8eeaf6e..0000000 --- a/3d_armor/3d_armor/locale/es.po +++ /dev/null @@ -1,384 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-06 18:20+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor: El nombre del jugador es nulo @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player inventory is nil @1" -msgstr "3d_armor: El inventario del jugador es nulo @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor: La armadura desconectada es nula @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor: La referencia del jugador es nula @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "Casco de admin" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "Peto de admin" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "Polainas de admin" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "Botas de admin" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "Casco de madera" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "Peto de madera" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "Polainas de madera" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "Botas de madera" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "Casco de cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "Peto de cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "Polainas de cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "Botas de cactus" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "Casco de acero" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "Peto de acero" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "Polainas de acero" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "Botas de acero" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "Casco de bronce" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "Peto de bronce" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "Polainas de bronce" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "Botas de bronce" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "Casco de diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "Peto de diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "Polainas de diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "Botas de diamante" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "Casco de oro" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "Peto de oro" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "Polainas de oro" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "Botas de oro" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "Casco de mitrilo" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "Peto de mitrilo" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "Polainas de mitrilo" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "Botas de mitrilo" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "Casco de cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "Peto de cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "Polainas de cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "Botas de cristal" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "Radiación" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "Nivel" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "Salud" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "Fuego" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "¡Tu @1 fue destruído!" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor: Fallo en la inicialización del jugador" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] Nodos de fuego desabilitados" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip: Mod cargado, pero sin ser usado." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "Volver" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "Armadura" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv: Mod cargado, pero sin ser usado." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "Parte arriba maniquí armadura" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "Maniquí para armadura" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "Maniquí para armadura" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "Maniquí para armadura (bloqueado)" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "Maniquí para armadura (propiedad de @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui: Mod cargado, pero sin ser usado." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "Armadura 3d" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "¡Armadura no inicializada!" - -#: ../hazmat_suit/init.lua -msgid "hazmat_suit: Mod loaded but unused." -msgstr "hazmat_suit: Mod cargado, pero sin ser usado." - -#: ../hazmat_suit/init.lua -msgid "Hazmat Helmet" -msgstr "Casco de hazmat" - -#: ../hazmat_suit/init.lua -msgid "Hazmat Chestplate" -msgstr "Peto de hazmat" - -#: ../hazmat_suit/init.lua -msgid "Hazmat Sleeve" -msgstr "Manga de hazmat" - -#: ../hazmat_suit/init.lua -msgid "Hazmat Leggins" -msgstr "Polainas de hazmat" - -#: ../hazmat_suit/init.lua -msgid "Hazmat Boots" -msgstr "Botas de hazmat" - -#: ../hazmat_suit/init.lua -msgid "Hazmat Suit" -msgstr "Traje de hazmat" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "Escudo de admin" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "Escudo de madera" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "Escudo de madera mejorado" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "Escudo de cactus" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "Escudo de cactus mejorado" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "Escudo de acero" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "Escudo de bronce" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "Escudo de diamante" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "Escudo de oro" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "Escudo de mitrilo" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "Escudo de cristal" - -#: ../technic_armor/init.lua -msgid "technic_armor: Mod loaded but unused." -msgstr "technic_armor: Mod cargado, pero no usado." - -#: ../technic_armor/init.lua -msgid "Lead" -msgstr "Plomo" - -#: ../technic_armor/init.lua -msgid "Brass" -msgstr "Latón" - -#: ../technic_armor/init.lua -msgid "Cast Iron" -msgstr "Hierro fundido" - -#: ../technic_armor/init.lua -msgid "Carbon Steel" -msgstr "Acero carbono" - -#: ../technic_armor/init.lua -msgid "Stainless Steel" -msgstr "Acero inoxidable" - -#: ../technic_armor/init.lua -msgid "Tin" -msgstr "Estaño" - -#: ../technic_armor/init.lua -msgid "Silver" -msgstr "Plata" - -#: ../technic_armor/init.lua -msgid "Helmet" -msgstr "Casco" - -#: ../technic_armor/init.lua -msgid "Chestplate" -msgstr "Peto" - -#: ../technic_armor/init.lua -msgid "Leggins" -msgstr "Polainas" - -#: ../technic_armor/init.lua -msgid "Boots" -msgstr "Botas" - -#: ../technic_armor/init.lua -msgid "Shield" -msgstr "Escudo" - -#. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string) -#: ../technic_armor/init.lua -msgid "@1 @2" -msgstr "@2 de @1" diff --git a/3d_armor/3d_armor/locale/fr.po b/3d_armor/3d_armor/locale/fr.po deleted file mode 100644 index f2d258f..0000000 --- a/3d_armor/3d_armor/locale/fr.po +++ /dev/null @@ -1,295 +0,0 @@ -# French translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# fat115 , 2017. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:24+0200\n" -"PO-Revision-Date: 2018-07-23 21:30+0200\n" -"Last-Translator: fat115 \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor : Référence au joueur non trouvée @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor : Nom du joueur non trouvé @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor : Inventaire détaché pour l'armure non trouvé @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "Casque d'admin" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "Cuirasse d'admin" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "Jambières d'admin" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "Bottes d'admin" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "Casque en bois" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "Cuirasse en bois" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "Jambières en bois" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "Bottes en bois" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "Casque en cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "Cuirasse en cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "Jambières en cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "Bottes en cactus" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "Casque en acier" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr " = Cuirasse en acier" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "Jambières en acier" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "Bottes en acier" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "Casque en bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "Cuirasse en bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "Jambières en bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "Bottes en bronze" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "Casque en diamant" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "Cuirasse en diamant" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "Jambières en diamant" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "Bottes en diamant" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "Casque en or" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "Cuirasse en or" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "Jambières en or" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "Bottes en or" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "Casque en mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "Cuirasse en mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "Jambières en mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "Bottes en mithril" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "Casque en cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "Cuirasse en cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "Jambières en cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "Bottes en cristal" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "Radiation" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "Niveau" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "Soins" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "Fire" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "Une partie de votre armure a été détruite : @1 !" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor : Impossible d'initialiser le joueur" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] Noeuds de type feu désactivés" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip : Mod chargé mais inutilisé." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "Retour" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "Armure" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv : Mod chargé mais inutilisé." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "Haut de support d'armure" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "Support d'armure" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "Support d'armure" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "Support d'armure verrouillé" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "Support d'armure (propriété de @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui : Mod chargé mais inutilisé." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "Armure 3d" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "Armure non initialisée !" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "Bouclier d'admin" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "Bouclier en bois" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "Bouclier en bois amélioré" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "Bouclier en cactus" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "Bouclier en cactus amélioré" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "Bouclier en acier" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "Bouclier en bronze" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "Bouclier en diamant" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "Bouclier en or" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "Bouclier en mithril" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "Bouclier en cristal" diff --git a/3d_armor/3d_armor/locale/it.po b/3d_armor/3d_armor/locale/it.po deleted file mode 100644 index 5d6f46b..0000000 --- a/3d_armor/3d_armor/locale/it.po +++ /dev/null @@ -1,295 +0,0 @@ -# Italian translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# Hamlet , 2017. -# -msgid "" -msgstr "" -"Project-Id-Version: Italian localization file for the 3D Armor module\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:24+0200\n" -"PO-Revision-Date: 2018-07-23 21:30+0200\n" -"Last-Translator: H4mlet \n" -"Language-Team: ITALIANO\n" -"Language: it\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 1.6.10\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor: Il riferimento alla/al giocatrice/tore è nullo @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor: Il nome della/del gicatrice/tore è nullo @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor: L'inventario staccato dell'armatura è nullo @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "Elmo dell'amministratrice/tore" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "Corazza dell'amministratrice/tore" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "Gambali dell'amministratrice/tore" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "Stivali dell'amministratrice/tore" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "Elmo di legno" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "Corazza di legno" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "Gambali di legno" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "Stivali di legno" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "Elmo di cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "Corazza di cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "Gambali di cactus" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "Stivali di cactus" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "Elmo di acciaio" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "Corazza di acciaio" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "Gambali di acciaio" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "Stivali di acciaio" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "Elmo di bronzo" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "Corazza di bronzo" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "Gambali di bronzo" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "Stivali di bronzo" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "Elmo di diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "Corazza di diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "Gambali di diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "Stivali di diamante" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "Elmo d'oro" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "Corazza d'oro" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "Gambali d'oro" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "Stivali d'oro" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "Elmo di mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "Corazza di mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "Gambali di mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "Stivali di mithril" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "Elmo di cristallo" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "Corazza di cristallo" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "Gambali di cristallo" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "Stivali di cristallo" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "Radiazione" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "Livello" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "Guarigione" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "Fuoco" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "Il/i vostro/i @1 è/sono stato/i distrutto/i!" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor: Inizializzazione della/del giocatrice/tore fallita" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] Nodi fuoco disabilitati" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip: Mod caricato ma inutilizzato." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "Indietro" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "Armatura" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv: Mod caricato ma inutilizzato." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "Parte superiore del supporto per armatura" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "Supporto per armatura" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "Supporto per armatura" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "Supporto per armatura chiuso a chiave" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "Supporto per armatura (di proprietà di @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui: Mod caricato ma inutilizzato." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "Armatura 3D" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "Armatura non inizializzata!" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "Scudo dell'amministratrice/tore" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "Scudo di legno" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "Scudo di legno migliorato" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "Scudo di cactus" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "Scudo di cactus migliorato" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "Scudo di acciaio" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "Scudo di bronzo" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "Scudo di diamante" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "Scudo d'oro" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "Scudo di mithril" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "Scudo di cristallo" diff --git a/3d_armor/3d_armor/locale/ms.po b/3d_armor/3d_armor/locale/ms.po deleted file mode 100644 index 518e438..0000000 --- a/3d_armor/3d_armor/locale/ms.po +++ /dev/null @@ -1,296 +0,0 @@ -# Malay translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# MuhdNurHidayat (MNH48) , 2018. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:21+0200\n" -"PO-Revision-Date: 2018-07-23 21:30+0200\n" -"Last-Translator: MuhdNurHidayat (MNH48) \n" -"Language-Team: \n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor: Rujukan pemain tiada nilai @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor: Nama pemain tiada nilai @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor: Inventori perisai terpisah tiada nilai @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "Helmet Pentadbir" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "Perisai Dada Pentadbir" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "Perisai Kaki Pentadbir" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "But Pentadbir" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "Helmet Kayu" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "Perisai Dada Kayu" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "Perisai Kaki Kayu" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "But Kayu" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "Helmet Kaktus" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "Perisai Dada Kaktus" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "Perisai Kaki Kaktus" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "But Kaktus" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "Helmet Keluli" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "Perisai Dada Keluli" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "Perisai Kaki Keluli" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "But Keluli" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "Helmet Gangsa" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "Perisai Dada Gangsa" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "Perisai Kaki Gangsa" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "But Gangsa" - -# 'Diamond' should be translated as 'intan' because the more common word 'berlian' is only specifically used for the gemstone diamond. -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "Helmet Intan" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "Perisai Dada Intan" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "Perisai Kaki Intan" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "But Intan" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "Helmet Emas" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "Perisai Dada Emas" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "Perisai Kaki Emas" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "But Emas" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "Helmet Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "Perisai Dada Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "Perisai Kaki Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "But Mithril" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "Helmet Kristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "Perisai Dada Kristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "Perisai Kaki Kristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "But Kristal" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "Radiasi" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "Tahap" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "Pulih" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "Api" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "@1 anda telah musnah!" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor: Gagal mengasalkan pemain" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] Nod-nod Api dilumpuhkan" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip: Mods dimuatkan tetapi tidak digunakan." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "Kembali" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "Perisai" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "Bhg atas dirian perisai" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "Dirian perisai" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "Dirian Perisai" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "Dirian perisai Berkunci" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "Dirian Perisai (milik @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui: Mods dimuatkan tetapi tidak digunakan." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "Perisai 3d" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "Perisai tidak diasalkan!" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "Perisai Pegang Pentadbir" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "Perisai Pegang Kayu" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "Perisai Pegang Kayu Kukuh" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "Perisai Pegang Kaktus" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "Perisai Pegang Kaktus Kukuh" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "Perisai Pegang Keluli" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "Perisai Pegang Gangsa" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "Perisai Pegang Intan" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "Perisai Pegang Emas" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "Perisai Pegang Mithril" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "Perisai Pegang Kristal" diff --git a/3d_armor/3d_armor/locale/pt.po b/3d_armor/3d_armor/locale/pt.po deleted file mode 100644 index 0166637..0000000 --- a/3d_armor/3d_armor/locale/pt.po +++ /dev/null @@ -1,295 +0,0 @@ -# LANGUAGE translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# BrunoMine , 2018. -# -msgid "" -msgstr "" -"Project-Id-Version: 3d_armor\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:24+0200\n" -"PO-Revision-Date: 2018-11-08 13:12-0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" -"Last-Translator: BrunoMine \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: pt\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor: Referência Jogador é nula @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor: Nome de jogador é nulo @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor: Inventario avulso de armadura é nulo @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "Capacete de Administrador" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "Peitoral de Administrador" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "Calças de Administrador" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "Botas de Administrador" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "Capacete de Madeira" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "Peitoral de Madeira" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "Calças de Madeira" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "Botas de Madeira" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "Capacete de Cacto" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "Peitoral de Cacto" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "Calças de Cacto" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "Botas de Madeira" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "Capacete de Aço" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "Peitoral de Aço" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "Calças de Aço" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "Botas de Aço" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "Capacete de Bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "Peitoral de Bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "Calças de Bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "Botas de Bronze" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "Capacete de Diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "Peitoral de Diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "Calças de Diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "Botas de Diamante" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "Capacete de Ouro" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "Peitoral de Ouro" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "Calças de Ouro" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "Botas de Ouro" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "Capacete de Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "Peitoral de Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "Calças de Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "Botas de Mithril" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "Capacete de Cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "Peitoral de Cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "Calças de Cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "Botas de Cristal" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "Radiação" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "Nível" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "Saúde" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "Fogo" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "@1 foi destruído(a)!" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor: Falha ao inicializar jogador" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] Nodes de gofo desabilitados" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip: Mod carregado mas inoperante." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "Voltar" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "Armadura" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv: Mod carregado mas inoperante." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "Topo de estande de armadura" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "Estande de armadura" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "Estande de Armadura" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "Estande de Armadura Trancada" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "Estande de Armadura (pertente a @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui: Mod carregado mas inoperante." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "3d Armor" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "Armadura não inicializada!" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "Escudo de Administrador" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "Escudo de Madeira" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "Escudo de Madeira Melhorado" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "Escudo de Cacto" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "Escudo de Cacto Melhorado" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "Escudo de Aço" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "Escudo de Bronze" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "Escudo de Diamante" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "Escudo de Ouro" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "Escudo de Mithril" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "Escudo de Cristal" diff --git a/3d_armor/3d_armor/locale/pt_BR.po b/3d_armor/3d_armor/locale/pt_BR.po deleted file mode 100644 index b429d11..0000000 --- a/3d_armor/3d_armor/locale/pt_BR.po +++ /dev/null @@ -1,295 +0,0 @@ -# LANGUAGE translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# BrunoMine , 2018. -# -msgid "" -msgstr "" -"Project-Id-Version: 3d_armor\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:24+0200\n" -"PO-Revision-Date: 2018-11-08 13:12-0200\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" -"Last-Translator: BrunoMine \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Language: pt_BR\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor: Referência Jogador é nula @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor: Nome de jogador é nulo @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor: Inventario avulso de armadura é nulo @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "Capacete de Administrador" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "Peitoral de Administrador" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "Calças de Administrador" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "Botas de Administrador" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "Capacete de Madeira" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "Peitoral de Madeira" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "Calças de Madeira" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "Botas de Madeira" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "Capacete de Cacto" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "Peitoral de Cacto" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "Calças de Cacto" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "Botas de Madeira" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "Capacete de Aço" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "Peitoral de Aço" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "Calças de Aço" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "Botas de Aço" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "Capacete de Bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "Peitoral de Bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "Calças de Bronze" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "Botas de Bronze" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "Capacete de Diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "Peitoral de Diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "Calças de Diamante" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "Botas de Diamante" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "Capacete de Ouro" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "Peitoral de Ouro" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "Calças de Ouro" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "Botas de Ouro" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "Capacete de Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "Peitoral de Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "Calças de Mithril" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "Botas de Mithril" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "Capacete de Cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "Peitoral de Cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "Calças de Cristal" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "Botas de Cristal" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "Radiação" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "Nível" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "Saúde" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "Fogo" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "@1 foi destruído(a)!" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor: Falha ao inicializar jogador" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] Nodes de gofo desabilitados" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip: Mod carregado mas inoperante." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "Voltar" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "Armadura" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv: Mod carregado mas inoperante." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "Topo de estande de armadura" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "Estande de armadura" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "Estande de Armadura" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "Estande de Armadura Trancada" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "Estande de Armadura (pertente a @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui: Mod carregado mas inoperante." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "3d Armor" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "Armadura não inicializada!" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "Escudo de Administrador" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "Escudo de Madeira" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "Escudo de Madeira Melhorado" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "Escudo de Cacto" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "Escudo de Cacto Melhorado" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "Escudo de Aço" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "Escudo de Bronze" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "Escudo de Diamante" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "Escudo de Ouro" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "Escudo de Mithril" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "Escudo de Cristal" diff --git a/3d_armor/3d_armor/locale/ru.po b/3d_armor/3d_armor/locale/ru.po deleted file mode 100644 index 4beee8a..0000000 --- a/3d_armor/3d_armor/locale/ru.po +++ /dev/null @@ -1,294 +0,0 @@ -# Russian translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: 3d_armor\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:21+0200\n" -"PO-Revision-Date: 2018-07-23 21:30+0200\n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "3d_armor: Ссылка игрока является nil @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "3d_armor: Имя игрока является nil @1" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "3d_armor: Отдельный инвентарь брони является nil @1" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "шлем админа" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "бронежилет админа" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "гамаши админа" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "ботинки админа" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "деревянный шлем" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "деревянный бронежилет" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "деревянные гамаши" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "деревянные ботинки" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "кактусовый шлем" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "кактусовый бронежилет" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "кактусовые гамаши" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "кактусовые ботинки" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "стальной шлем" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "стальной бронежилет" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "стальные гамаши" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "стальные ботинки" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "бронзовый шлем" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "бронзовый бронежилет" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "бронзовые гамаши" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "бронзовые ботинки" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "алмазный шлем" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "алмазный бронежилет" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "алмазные гамаши" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "алмазные ботинки" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "золотой шлем" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "золотой бронежилет" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "золотые гамаши" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "золотые ботинки" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "мифриловый шлем" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "мифриловый бронежилет" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "мифриловые гамаши" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "мифриловые ботинки" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "кристалловый шлем" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "кристалловый бронежилет" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "кристалловые гамаши" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "кристалловые ботинки" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "излучение" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "уровень" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "исцеление" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "огонь" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "твой(и) @1 был(и) разрушен(ы)!" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "3d_armor: не смог подготовить игрока" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "[3d_armor] блоки огня отключены" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "3d_armor_ip: мод загружен но не используется." - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "назад" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "бронь" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "3d_armor_sfinv: мод загружен но не используется." - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "стойка для брони (верх)" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "стойка для брони" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "стойка для брони" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "защищенная стойка для брони" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "стойка для брони (принадлежит @1)" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "3d_armor_ui: мод загружен но не используется." - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "3D бронь" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "бронь не подготовлена!" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "щит админа" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "деревянный щит" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "улучшенный деревянный щит" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "кактусный щит" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "улучшенный кактусный щит" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "стальной щит" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "бронзовый щит" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "алмазный щит" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "золотой щит" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "мифриловый щит" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "кристалловый щит" diff --git a/3d_armor/3d_armor/locale/template.pot b/3d_armor/3d_armor/locale/template.pot deleted file mode 100644 index 0b0222c..0000000 --- a/3d_armor/3d_armor/locale/template.pot +++ /dev/null @@ -1,294 +0,0 @@ -# LANGUAGE translation for 3D ARMOR MOD -# Copyright (C) 2018 by Stuart Jones -# This file is distributed under the same license as the 3D ARMOR MOD package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-23 21:24+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player reference is nil @1" -msgstr "" - -#: ../3d_armor/api.lua -msgid "3d_armor: Player name is nil @1" -msgstr "" - -#: ../3d_armor/api.lua -msgid "3d_armor: Detached armor inventory is nil @1" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Admin Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Admin Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Admin Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Admin Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Wood Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Wood Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Wood Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Wood Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Cactus Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Cactus Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Cactus Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Cactus Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Steel Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Steel Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Steel Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Steel Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Bronze Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Bronze Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Bronze Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Bronze Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Diamond Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Diamond Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Diamond Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Diamond Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Gold Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Gold Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Gold Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Gold Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Mithril Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Mithril Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Mithril Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Mithril Boots" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Crystal Helmet" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Crystal Chestplate" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Crystal Leggings" -msgstr "" - -#: ../3d_armor/armor.lua -msgid "Crystal Boots" -msgstr "" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Radiation" -msgstr "" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Level" -msgstr "" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Heal" -msgstr "" - -#: ../3d_armor/init.lua ../3d_armor_ui/init.lua -msgid "Fire" -msgstr "" - -#: ../3d_armor/init.lua -msgid "Your @1 got destroyed!" -msgstr "" - -#: ../3d_armor/init.lua -msgid "3d_armor: Failed to initialize player" -msgstr "" - -#: ../3d_armor/init.lua -msgid "[3d_armor] Fire Nodes disabled" -msgstr "" - -#: ../3d_armor_ip/init.lua -msgid "3d_armor_ip: Mod loaded but unused." -msgstr "" - -#: ../3d_armor_ip/init.lua -msgid "Back" -msgstr "" - -#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua -msgid "Armor" -msgstr "" - -#: ../3d_armor_sfinv/init.lua -msgid "3d_armor_sfinv: Mod loaded but unused." -msgstr "" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand top" -msgstr "" - -#: ../3d_armor_stand/init.lua -msgid "Armor stand" -msgstr "" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand" -msgstr "" - -#: ../3d_armor_stand/init.lua -msgid "Locked Armor stand" -msgstr "" - -#: ../3d_armor_stand/init.lua -msgid "Armor Stand (owned by @1)" -msgstr "" - -#: ../3d_armor_ui/init.lua -msgid "3d_armor_ui: Mod loaded but unused." -msgstr "" - -#: ../3d_armor_ui/init.lua -msgid "3d Armor" -msgstr "" - -#: ../3d_armor_ui/init.lua -msgid "Armor not initialized!" -msgstr "" - -#: ../shields/init.lua -msgid "Admin Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Wooden Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Enhanced Wood Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Cactus Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Enhanced Cactus Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Steel Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Bronze Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Diamond Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Gold Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Mithril Shield" -msgstr "" - -#: ../shields/init.lua -msgid "Crystal Shield" -msgstr "" diff --git a/3d_armor/3d_armor/locale/template.txt b/3d_armor/3d_armor/locale/template.txt new file mode 100644 index 0000000..cedd538 --- /dev/null +++ b/3d_armor/3d_armor/locale/template.txt @@ -0,0 +1,58 @@ +# textdomain: 3d_armor + + +### api.lua ### + +3d_armor: Detached armor inventory is nil @1= +3d_armor: Player name is nil @1= +3d_armor: Player reference is nil @1= + +### armor.lua ### + +Admin Boots= +Admin Chestplate= +Admin Helmet= +Admin Leggings= +Bronze Boots= +Bronze Chestplate= +Bronze Helmet= +Bronze Leggings= +Cactus Boots= +Cactus Chestplate= +Cactus Helmet= +Cactus Leggings= +Crystal Boots= +Crystal Chestplate= +Crystal Helmet= +Crystal Leggings= +Diamond Boots= +Diamond Chestplate= +Diamond Helmet= +Diamond Leggings= +Gold Boots= +Gold Chestplate= +Gold Helmet= +Gold Leggings= +Mithril Boots= +Mithril Chestplate= +Mithril Helmet= +Mithril Leggings= +Steel Boots= +Steel Chestplate= +Steel Helmet= +Steel Leggings= +Wood Boots= +Wood Chestplate= +Wood Helmet= +Wood Leggings= + +### init.lua ### + +3d_armor: Failed to initialize player= +Fire= +Heal= +Level= +Radiation= +Your @1 got destroyed!= +Your @1 is almost broken!= +[3d_armor] Fire Nodes disabled= diff --git a/3d_armor/3d_armor/mod.conf b/3d_armor/3d_armor/mod.conf new file mode 100644 index 0000000..ddf6e66 --- /dev/null +++ b/3d_armor/3d_armor/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor +depends = default +optional_depends = player_monoids, armor_monoid, pova, fire, ethereal, bakedclay, moreores +description = Adds craftable armor that is visible to other players. diff --git a/3d_armor/3d_armor/models/3d_armor_character.b3d b/3d_armor/3d_armor/models/3d_armor_character.b3d index 7c27cae..c4d45b5 100644 Binary files a/3d_armor/3d_armor/models/3d_armor_character.b3d and b/3d_armor/3d_armor/models/3d_armor_character.b3d differ diff --git a/3d_armor/3d_armor/models/3d_armor_character.blend b/3d_armor/3d_armor/models/3d_armor_character.blend index f61e222..44f7e27 100644 Binary files a/3d_armor/3d_armor/models/3d_armor_character.blend and b/3d_armor/3d_armor/models/3d_armor_character.blend differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_admin.png b/3d_armor/3d_armor/textures/3d_armor_boots_admin.png index 23be004..833f6b7 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_admin.png and b/3d_armor/3d_armor/textures/3d_armor_boots_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png index 77acce6..2487a7e 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png b/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png index 2f4fd83..2b187e5 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_boots_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png index 1f83af3..78badbb 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png b/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png index f370644..350b065 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png index e4cbf13..08e76c6 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png b/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png index 3ca8899..31c06b5 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_boots_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png index 0c6b3e4..01a6bfa 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png b/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png index ef40206..1870359 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_boots_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png index 7575fbd..2e4f5d3 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_gold.png b/3d_armor/3d_armor/textures/3d_armor_boots_gold.png index f431d9b..cd339b6 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_gold.png and b/3d_armor/3d_armor/textures/3d_armor_boots_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png index 9daae14..f70f30f 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png b/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png index b6c65d6..af7b943 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_boots_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png index 21de8c1..1ebf92a 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_steel.png b/3d_armor/3d_armor/textures/3d_armor_boots_steel.png index 72ec88b..ff8e8f8 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_steel.png and b/3d_armor/3d_armor/textures/3d_armor_boots_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png index 170d094..968ffc5 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_wood.png b/3d_armor/3d_armor/textures/3d_armor_boots_wood.png index 411ce9c..e62bdc5 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_wood.png and b/3d_armor/3d_armor/textures/3d_armor_boots_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png index d9f192c..de841b0 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png and b/3d_armor/3d_armor/textures/3d_armor_boots_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png index a17d0a4..d8df83d 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png index 5395810..1bb10fd 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png index ac43ddb..b8e6d85 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png index ab1d1ce..8c78716 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png index 0dd7eb0..afcd557 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png index 9523ef7..b166c7c 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png index e4981b1..4a268f4 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png index 801dc2a..63304f6 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png index 3538496..f61e28f 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png index 92909b3..9ec9971 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png index cc3e910..4c67491 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png index df47bf0..01d8d5c 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png index b06b2a8..aa06d18 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png index 4859295..2754290 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png index bccb99d..cc6d570 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png index 804e785..162ce4b 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png index bae4817..2db95ce 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png index 8f75f26..a1431e3 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png and b/3d_armor/3d_armor/textures/3d_armor_chestplate_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png b/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png index 0a04251..862956a 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png index 9f44921..0f344d0 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png index 7ef5595..17b87c9 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png index 9a62f82..c711745 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png index e48ec34..f616e1e 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png index c8be84a..7e750cc 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png index e63a63f..1405a42 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png index dddbbc0..7bb01ff 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png index 611dc9f..9196681 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png index ed52aed..936fa66 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png b/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png index 24da53b..3a51908 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png index d4d9d0c..fb3ba0e 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png index 57e579e..2e9caef 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png index be50523..91e7c18 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png b/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png index 8d21e8a..f3c4a39 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png index 774d284..fb939c4 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png b/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png index 01e243a..8bda21c 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png index 0e0c3b1..903a018 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png and b/3d_armor/3d_armor/textures/3d_armor_helmet_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png index 69fc00a..71fd410 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png index 448f41d..e704d50 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png index 3f57f22..1b01395 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png index e311893..f663470 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png index 0a866e7..e4394b8 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png index 55d78b7..1102ea0 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png index 00c26f9..43e6b14 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png index 82fc591..170f0d9 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png index 53bb557..a5e7863 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png and b/3d_armor/3d_armor/textures/3d_armor_inv_boots_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png index dafef2c..c65c606 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png index 8fc2f17..f0753ee 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png index 7f5bc70..ca315df 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png index b9593bf..46742a1 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png index f5ca3aa..1fd75ae 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png index efe76ca..bdbea82 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png index 6ca9231..d2b1bd0 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png index 47ef4f2..434f1bc 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png index dac3b06..fa1b24e 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png and b/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png index 494cc84..abb43a7 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png index c0028dd..4297d9b 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png index 10a2b39..7f44463 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png index 565383e..baf6bdf 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png index 6df57bd..424e970 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png index 6820d8f..f5f2fa6 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png index ce4e910..850991c 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png index 1c8bfe8..5414f9a 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png index fbb3e3f..8fbe6a8 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png and b/3d_armor/3d_armor/textures/3d_armor_inv_helmet_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png index e652ef1..1247304 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png index f194f9f..7252662 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png index f7c1a28..3f05b16 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png index d466b20..8197b01 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png index c4cd85c..9dac33b 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png index 2e4b244..5aeccb5 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png index ffe972c..3825a23 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png index 1ca9975..b4d083e 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png index 9e73b72..c46cdd9 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png and b/3d_armor/3d_armor/textures/3d_armor_inv_leggings_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png b/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png index bedfbc1..1f7207d 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png index 1d32265..95c973a 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png index bcba372..26d05f0 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png index c378148..12952ff 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_bronze_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png index 88aa32d..537adcb 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png index 9dab482..09f848e 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png index 754bd0f..6bf702f 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png index 7808496..96a11bf 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_crystal_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png index a57cf07..df3cf16 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png index 84976c4..1bb3295 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_diamond_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png b/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png index dfdd094..8ee0bc4 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_gold.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png index ff2e3d0..a7cf310 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_gold_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png index 2143572..9fc78fb 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png index 178054a..dde7b3d 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_mithril_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png b/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png index cca4e31..974cb5d 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_steel.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png index dbcfcf2..99034ca 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_steel_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png b/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png index eb61034..9608144 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_wood.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png b/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png index 1545b4b..7e43ea5 100644 Binary files a/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png and b/3d_armor/3d_armor/textures/3d_armor_leggings_wood_preview.png differ diff --git a/3d_armor/3d_armor/textures/3d_armor_ui_form.png b/3d_armor/3d_armor/textures/3d_armor_ui_form.png deleted file mode 100644 index 993809f..0000000 Binary files a/3d_armor/3d_armor/textures/3d_armor_ui_form.png and /dev/null differ diff --git a/3d_armor/3d_armor/textures/inventory_plus_armor.png b/3d_armor/3d_armor/textures/inventory_plus_armor.png index f317c70..7f7d63e 100644 Binary files a/3d_armor/3d_armor/textures/inventory_plus_armor.png and b/3d_armor/3d_armor/textures/inventory_plus_armor.png differ diff --git a/3d_armor/3d_armor_ip/LICENSE.txt b/3d_armor/3d_armor_ip/LICENSE.txt index 96ff8c3..b924ac0 100644 --- a/3d_armor/3d_armor_ip/LICENSE.txt +++ b/3d_armor/3d_armor_ip/LICENSE.txt @@ -1,5 +1,18 @@ [mod] 3d Armor integration to inventory plus [3d_armor_ip] ========================================================== -License Source Code: (C) 2012-2018 Stuart Jones - LGPL v2.1 +Copyright (C) 2012-2019 stujones11, Stuart Jones +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/3d_armor_ip/description.txt b/3d_armor/3d_armor_ip/description.txt index 01e1b54..58b700e 100644 --- a/3d_armor/3d_armor_ip/description.txt +++ b/3d_armor/3d_armor_ip/description.txt @@ -1 +1 @@ -Adds 3d_armor page to the inventory plus +Adds 3d_armor page to the inventory plus. diff --git a/3d_armor/3d_armor_ip/init.lua b/3d_armor/3d_armor_ip/init.lua index 7701a70..f061200 100644 --- a/3d_armor/3d_armor_ip/init.lua +++ b/3d_armor/3d_armor_ip/init.lua @@ -1,5 +1,5 @@ -- support for i18n -local S = armor_i18n.gettext +local S = minetest.get_translator(minetest.get_current_modname()) local F = minetest.formspec_escape if not minetest.global_exists("inventory_plus") then diff --git a/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr b/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr new file mode 100644 index 0000000..5f540b1 --- /dev/null +++ b/3d_armor/3d_armor_ip/locale/3d_armor_ip.fr.tr @@ -0,0 +1,8 @@ +# textdomain: 3d_armor_ip + + +### init.lua ### + +3d_armor_ip: Mod loaded but unused.=3d_armor_ip : Mod chargé mais inutilisé. +Armor=Armure +Back=Retour diff --git a/3d_armor/3d_armor_ip/locale/template.txt b/3d_armor/3d_armor_ip/locale/template.txt new file mode 100644 index 0000000..133bce8 --- /dev/null +++ b/3d_armor/3d_armor_ip/locale/template.txt @@ -0,0 +1,8 @@ +# textdomain: 3d_armor_ip + + +### init.lua ### + +3d_armor_ip: Mod loaded but unused.= +Armor= +Back= diff --git a/3d_armor/3d_armor_ip/mod.conf b/3d_armor/3d_armor_ip/mod.conf new file mode 100644 index 0000000..0fe7f4e --- /dev/null +++ b/3d_armor/3d_armor_ip/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_ip +depends = 3d_armor +optional_depends = inventory_plus +description = Adds 3d_armor page to the inventory plus. diff --git a/3d_armor/3d_armor_sfinv/LICENSE.txt b/3d_armor/3d_armor_sfinv/LICENSE.txt index 5b4d955..2b2a9f6 100644 --- a/3d_armor/3d_armor_sfinv/LICENSE.txt +++ b/3d_armor/3d_armor_sfinv/LICENSE.txt @@ -1,5 +1,18 @@ [mod] 3d Armor sfinv integration [3d_armor_sfinv] ================================================= -License Source Code: (C) 2012-2018 Stuart Jones - LGPL v2.1 +Copyright (C) 2012-2019 stujones11, Stuart Jones +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/3d_armor_sfinv/description.txt b/3d_armor/3d_armor_sfinv/description.txt index 0ef2ae9..15f4e96 100644 --- a/3d_armor/3d_armor_sfinv/description.txt +++ b/3d_armor/3d_armor_sfinv/description.txt @@ -1 +1 @@ -Adds 3d_armor page to the sfinv inventory +Adds 3d_armor page to the sfinv inventory. diff --git a/3d_armor/3d_armor_sfinv/init.lua b/3d_armor/3d_armor_sfinv/init.lua index a937127..830ebbc 100644 --- a/3d_armor/3d_armor_sfinv/init.lua +++ b/3d_armor/3d_armor_sfinv/init.lua @@ -1,5 +1,5 @@ -- support for i18n -local S = armor_i18n.gettext +local S = minetest.get_translator(minetest.get_current_modname()) if not minetest.global_exists("sfinv") then minetest.log("warning", S("3d_armor_sfinv: Mod loaded but unused.")) diff --git a/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr b/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr new file mode 100644 index 0000000..ee72e52 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.es.tr @@ -0,0 +1,7 @@ +# textdomain: 3d_armor_sfinv + + +### init.lua ### + +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv : Mod cargado pero no activado. +Armor=Armadura diff --git a/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr b/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr new file mode 100644 index 0000000..f25bd11 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/locale/3d_armor_sfinv.fr.tr @@ -0,0 +1,7 @@ +# textdomain: 3d_armor_sfinv + + +### init.lua ### + +3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv : Mod chargé mais inutilisé. +Armor=Armure diff --git a/3d_armor/3d_armor_sfinv/locale/template.txt b/3d_armor/3d_armor_sfinv/locale/template.txt new file mode 100644 index 0000000..a3f01b5 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/locale/template.txt @@ -0,0 +1,7 @@ +# textdomain: 3d_armor_sfinv + + +### init.lua ### + +3d_armor_sfinv: Mod loaded but unused.= +Armor= diff --git a/3d_armor/3d_armor_sfinv/mod.conf b/3d_armor/3d_armor_sfinv/mod.conf new file mode 100644 index 0000000..bc0eb89 --- /dev/null +++ b/3d_armor/3d_armor_sfinv/mod.conf @@ -0,0 +1,4 @@ +name = 3d_armor_sfinv +depends = 3d_armor +optional_depends = sfinv +description = Adds 3d_armor page to the sfinv inventory. diff --git a/3d_armor/3d_armor_stand/LICENSE.txt b/3d_armor/3d_armor_stand/LICENSE.txt index 82e5de6..e3cb55d 100644 --- a/3d_armor/3d_armor_stand/LICENSE.txt +++ b/3d_armor/3d_armor_stand/LICENSE.txt @@ -1,22 +1,43 @@ [mod] 3d Armor Stand [3d_armor_stand] ===================================== -License Source Code: (C) 2016-2018 Stuart Jones - LGPL v2.1 +License Source Code +------------------- -Lecense Models: (C) 2016-2018 Stuart Jones - CC BY-SA 3.0 +Copyright (C) 2012-2019 stujones11, Stuart Jones + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Lecense Models +-------------- + +Copyright (C) 2016-2019 Stuart Jones - CC BY-SA 3.0 UV model mapping by tobyplowy(aka toby109tt) -License Textures: +License Textures +---------------- 3d_armor_stand.png 3d_armor_stand_locked.png -(C) 2017 tobyplowy - CC BY-SA 3.0 +Copyright (C) 2017-2019 tobyplowy - CC BY-SA 3.0 3d_armor_stand_feet.png 3d_armor_stand_head.png 3d_armor_stand_legs.png 3d_armor_stand_torso.png -(C) 2016-2017 Stuart Jones - CC BY-SA 3.0 +Copyright (C) 2016-2019 Stuart Jones - CC BY-SA 3.0 diff --git a/3d_armor/3d_armor_stand/init.lua b/3d_armor/3d_armor_stand/init.lua index d578174..612345b 100644 --- a/3d_armor/3d_armor_stand/init.lua +++ b/3d_armor/3d_armor_stand/init.lua @@ -1,5 +1,5 @@ -- support for i18n -local S = armor_i18n.gettext +local S = minetest.get_translator(minetest.get_current_modname()) local armor_stand_formspec = "size[8,7]" .. default.gui_bg .. @@ -97,7 +97,7 @@ local function update_entity(pos) yaw = math.pi / 2 end end - object:setyaw(yaw) + object:set_yaw(yaw) object:set_properties({textures={texture}}) end end @@ -153,6 +153,7 @@ minetest.register_node("3d_armor_stand:armor_stand", { drawtype = "mesh", mesh = "3d_armor_stand.obj", tiles = {"3d_armor_stand.png"}, + use_texture_alpha = "clip", paramtype = "light", paramtype2 = "facedir", walkable = false, @@ -221,6 +222,7 @@ minetest.register_node("3d_armor_stand:locked_armor_stand", { drawtype = "mesh", mesh = "3d_armor_stand.obj", tiles = {"3d_armor_stand_locked.png"}, + use_texture_alpha = "clip", paramtype = "light", paramtype2 = "facedir", walkable = false, @@ -307,7 +309,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", { pos = nil, timer = 0, on_activate = function(self) - local pos = self.object:getpos() + local pos = self.object:get_pos() if pos then self.pos = vector.round(pos) update_entity(pos) diff --git a/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr b/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr new file mode 100644 index 0000000..7d4cd38 --- /dev/null +++ b/3d_armor/3d_armor_stand/locale/3d_armor_stand.fr.tr @@ -0,0 +1,10 @@ +# textdomain: 3d_armor_stand + + +### init.lua ### + +Armor Stand=Support d'armure +Armor Stand (owned by @1)=Support d'armure (propriété de @1) +Armor stand=Support d'armure +Armor stand top=Haut de support d'armure +Locked Armor stand=Support d'armure verrouillé diff --git a/3d_armor/3d_armor_stand/locale/template.txt b/3d_armor/3d_armor_stand/locale/template.txt new file mode 100644 index 0000000..25befcb --- /dev/null +++ b/3d_armor/3d_armor_stand/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: 3d_armor_stand + + +### init.lua ### + +Armor Stand= +Armor Stand (owned by @1)= +Armor stand= +Armor stand top= +Locked Armor stand= diff --git a/3d_armor/3d_armor_stand/mod.conf b/3d_armor/3d_armor_stand/mod.conf new file mode 100644 index 0000000..d1f1a4e --- /dev/null +++ b/3d_armor/3d_armor_stand/mod.conf @@ -0,0 +1,2 @@ +name = 3d_armor_stand +depends = 3d_armor diff --git a/3d_armor/3d_armor_ui/LICENSE.txt b/3d_armor/3d_armor_ui/LICENSE.txt index 5dd82c8..6ae23a6 100644 --- a/3d_armor/3d_armor_ui/LICENSE.txt +++ b/3d_armor/3d_armor_ui/LICENSE.txt @@ -1,5 +1,18 @@ [mod] 3d Armor integration to unified inventory [3d_armor_ui] ============================================================= -License Source Code: (C) 2012-2018 Stuart Jones - LGPL v2.1 +Copyright (C) 2012-2019 stujones11, Stuart Jones +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/3d_armor_ui/description.txt b/3d_armor/3d_armor_ui/description.txt index 873f876..e6bf11c 100644 --- a/3d_armor/3d_armor_ui/description.txt +++ b/3d_armor/3d_armor_ui/description.txt @@ -1 +1 @@ -Adds 3d_armor page to the unified inventory +Adds 3d_armor page to the unified inventory. diff --git a/3d_armor/3d_armor_ui/init.lua b/3d_armor/3d_armor_ui/init.lua index 41eec7b..397a631 100644 --- a/3d_armor/3d_armor_ui/init.lua +++ b/3d_armor/3d_armor_ui/init.lua @@ -1,14 +1,15 @@ -- support for i18n -local S = armor_i18n.gettext +local S = minetest.get_translator(minetest.get_current_modname()) local F = minetest.formspec_escape local has_technic = minetest.get_modpath("technic") ~= nil if not minetest.global_exists("unified_inventory") then - minetest.log("warning", S("3d_armor_ui: Mod loaded but unused.")) + minetest.log("warning", "3d_armor_ui: Mod loaded but unused.") return end -if unified_inventory.sfinv_compat_layer then +local ui = unified_inventory +if ui.sfinv_compat_layer then return end @@ -27,17 +28,24 @@ unified_inventory.register_button("armor", { unified_inventory.register_page("armor", { get_formspec = function(player, perplayer_formspec) - local fy = perplayer_formspec.formspec_y + local fy = perplayer_formspec.form_header_y + 0.5 + local gridx = perplayer_formspec.std_inv_x + local gridy = 0.6 + local name = player:get_player_name() if armor.def[name].init_time == 0 then return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"} end - local formspec = "background[0.06,"..fy..";7.92,7.52;3d_armor_ui_form.png]".. - "label[0,0;"..F(S("Armor")).."]".. - "list[detached:"..name.."_armor;armor;0,"..fy..";2,3;]".. - "image[2.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]".. - "label[5.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]".. - "label[5.0,"..(fy + 0.5)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]".. + local formspec = perplayer_formspec.standard_inv_bg.. + perplayer_formspec.standard_inv.. + ui.make_inv_img_grid(gridx, gridy, 2, 3).. + string.format("label[%f,%f;%s]", + perplayer_formspec.form_header_x, perplayer_formspec.form_header_y, F(S("Armor"))).. + string.format("list[detached:%s_armor;armor;%f,%f;2,3;]", + name, gridx + ui.list_img_offset, gridy + ui.list_img_offset) .. + "image[3.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]".. + "label[6.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]".. + "label[6.0,"..(fy + 0.5)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]".. "listring[current_player;main]".. "listring[detached:"..name.."_armor;armor]" if armor.config.fire_protect then @@ -45,7 +53,7 @@ unified_inventory.register_page("armor", { F(S("Fire"))..": "..armor.def[name].fire.."]" end if has_technic then - formspec = formspec.."label[5.0,"..(fy + 1.5)..";".. + formspec = formspec.."label[6.0,"..(fy + 1.5)..";".. F(S("Radiation"))..": "..armor.def[name].groups["radiation"].."]" end return {formspec=formspec} diff --git a/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr b/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr new file mode 100644 index 0000000..38e0f05 --- /dev/null +++ b/3d_armor/3d_armor_ui/locale/3d_armor_ui.fr.tr @@ -0,0 +1,12 @@ +# textdomain: 3d_armor_ui + + +### init.lua ### + +3d Armor=Armure 3d +Armor=Armure +Armor not initialized!=Armure non initialisée ! +Fire=Feu +Heal=Soins +Level=Niveau +Radiation=Radiation diff --git a/3d_armor/3d_armor_ui/locale/template.txt b/3d_armor/3d_armor_ui/locale/template.txt new file mode 100644 index 0000000..0f7a8cb --- /dev/null +++ b/3d_armor/3d_armor_ui/locale/template.txt @@ -0,0 +1,12 @@ +# textdomain: 3d_armor_ui + + +### init.lua ### + +3d Armor= +Armor= +Armor not initialized!= +Fire= +Heal= +Level= +Radiation= diff --git a/3d_armor/3d_armor_ui/mod.conf b/3d_armor/3d_armor_ui/mod.conf new file mode 100644 index 0000000..331627e --- /dev/null +++ b/3d_armor/3d_armor_ui/mod.conf @@ -0,0 +1,5 @@ +name = 3d_armor_ui +depends = 3d_armor +optional_depends = unified_inventory +description = Adds 3d_armor page to the unified inventory. +min_minetest_version = 5.4.0 diff --git a/3d_armor/LICENSE.md b/3d_armor/LICENSE.md index 56c93cd..f7793ff 100644 --- a/3d_armor/LICENSE.md +++ b/3d_armor/LICENSE.md @@ -7,3 +7,4 @@ Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0 Special credit to Jordach and MirceaKitsune for providing the default 3d character model. +New armor/shield textures CC-BY-SA 3.0 / davidthecreator / https://forum.minetest.net/viewtopic.php?f=11&t=4654&start=800#p356448 diff --git a/3d_armor/README.md b/3d_armor/README.md index 088ed22..57bcf62 100644 --- a/3d_armor/README.md +++ b/3d_armor/README.md @@ -1,5 +1,10 @@ -Modpack - 3d Armor [0.4.12] +Modpack - 3d Armor [0.4.13] =========================== +![3d_armor screenshot](https://github.com/minetest-mods/3d_armor/blob/master/screenshot.png) + + +![](https://github.com/minetest-mods/3d_armor/workflows/luacheck/badge.svg) +![](https://github.com/minetest-mods/3d_armor/workflows/integration-test/badge.svg) ### Table of Contents @@ -17,7 +22,7 @@ Modpack - 3d Armor [0.4.12] [mod] Visible Player Armor [3d_armor] ------------------------------------- -Minetest Version: 0.4.16 - 0.4.17.1 +Minetest Version: 5.0.0 Game: minetest_game and many derivatives diff --git a/3d_armor/integration-test.sh b/3d_armor/integration-test.sh new file mode 100644 index 0000000..9169144 --- /dev/null +++ b/3d_armor/integration-test.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# simple integration test + +CFG=/tmp/minetest.conf +MTDIR=/tmp/mt +WORLDDIR=${MTDIR}/worlds/world + +cat < ${CFG} + enable_3d_armor_integration_test = true +EOF + +mkdir -p ${WORLDDIR} +chmod 777 ${MTDIR} -R +docker run --rm -i \ + -v ${CFG}:/etc/minetest/minetest.conf:ro \ + -v ${MTDIR}:/var/lib/minetest/.minetest \ + -v $(pwd):/var/lib/minetest/.minetest/worlds/world/worldmods/3d_armor \ + registry.gitlab.com/minetest/minetest/server:5.2.0 + +test -f ${WORLDDIR}/integration_test.json && exit 0 || exit 1 diff --git a/3d_armor/modpack.conf b/3d_armor/modpack.conf new file mode 100644 index 0000000..4e64251 --- /dev/null +++ b/3d_armor/modpack.conf @@ -0,0 +1,2 @@ +name = minetest-3d_armor +description = Visible player armor & wielded items. diff --git a/3d_armor/modpack.txt b/3d_armor/modpack.txt deleted file mode 100644 index e69de29..0000000 diff --git a/3d_armor/screenshot.png b/3d_armor/screenshot.png index c1f9e58..637944a 100644 Binary files a/3d_armor/screenshot.png and b/3d_armor/screenshot.png differ diff --git a/3d_armor/screenshot.xcf b/3d_armor/screenshot.xcf new file mode 100644 index 0000000..17ea7c9 Binary files /dev/null and b/3d_armor/screenshot.xcf differ diff --git a/3d_armor/settingtypes.txt b/3d_armor/settingtypes.txt new file mode 100644 index 0000000..fdc2857 --- /dev/null +++ b/3d_armor/settingtypes.txt @@ -0,0 +1,73 @@ +[3d_armor] + +armor_material_wood (Enable wood armor) bool true +armor_material_cactus (Enable cactus armor) bool true +armor_material_steel (Enable steel armor) bool true +armor_material_bronze (Enable bronze armor) bool true +armor_material_diamond (Enable diamond armor) bool true +armor_material_gold (Enable gold armor) bool true +armor_material_mithril (Enable mithril armor) bool true +armor_material_crystal (Enable crystal armor) bool true + +# Increase this if you get initialization glitches when a player first joins. +armor_init_delay (Initialization delay) int 2 + +# Number of initialization attempts. +# Use in conjunction with armor_init_delay if initialization problems persist. +armor_init_times (Initialization attempts) int 10 + +# Increase this if armor is not getting into bones due to server lag. +armor_bones_delay (Delay for bones) int 1 + +# How often player armor items are updated. +armor_update_time (Armor refresh rate [seconds]) int 1 + +# Drop armor when a player dies. +# Uses bones mod if present, otherwise items are dropped around the player. +armor_drop (Drop armor on death) bool true + +# Pulverize armor when a player dies, overrides armor_drop. +armor_destroy (Pulverize armor on death) bool false + +# You can use this to increase or decrease overall armor effectiveness, +# eg: level_multiplier = 0.5 will reduce armor level by half. +armor_level_multiplier (Armor effectiveness multiplier) float 1 + +# You can use this to increase or decrease overall armor healing, +# eg: armor_heal_multiplier = 0 will disable healing altogether. +armor_heal_multiplier (Armor healing multiplier) float 1 + +# Armor set item names, remove or add items to include them or remove them from whats considered an Armor set. +armor_set_elements (Armor set items) string head torso legs feet shield + +# Bonus multiplier when wearing armor set, set to the same as armor_level_multiplier to disable +armor_set_multiplier (Armor Set Bonus multiplier) float 1.1 + +# Enable water protection (periodically restores breath when activated). +armor_water_protect (Enable water protection) bool true + +# Enable fire protection (defaults true if using ethereal mod). +armor_fire_protect (Enable fire protection) bool false + +# Enable fire damage from torches (defaults true if using ethereal mod). +armor_fire_protect_torch (Enable fire protection torch damage) bool false + +# Enable punch damage effects. +armor_punch_damage (Enable damage effects) bool true + +# Enable migration of old armor inventories. +armor_migrate_old_inventory (Migrate old armor inventories) bool true + + +[shields] + +shields_disable_sounds (Disable shield sounds) bool false + + +[wieldview] + +# Set number of seconds between visible wielded item updates. +wieldview_update_time (Wieldview refresh rate [seconds]) int 2 + +# Show nodes as tiles, disabled by default. +wieldview_node_tiles (Show nodes as tiles) bool false diff --git a/3d_armor/shields/LICENSE.txt b/3d_armor/shields/LICENSE.txt index 15e2345..1f84859 100644 --- a/3d_armor/shields/LICENSE.txt +++ b/3d_armor/shields/LICENSE.txt @@ -1,8 +1,26 @@ [mod] Shields [shields] ======================= -License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 +License Source Code +------------------- -License Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0 +Copyright (C) 2012-2019 stujones11, Stuart Jones -https://github.com/daviddoesminetest/3d-armors-new-textures +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +License Textures +---------------- + +Copyright (C) 2017-2019 davidthecreator - CC-BY-SA 3.0 diff --git a/3d_armor/shields/init.lua b/3d_armor/shields/init.lua index d311a1b..6c7ac5a 100644 --- a/3d_armor/shields/init.lua +++ b/3d_armor/shields/init.lua @@ -1,11 +1,10 @@ -- support for i18n -local S = armor_i18n.gettext +local S = minetest.get_translator(minetest.get_current_modname()) local disable_sounds = minetest.settings:get_bool("shields_disable_sounds") -local use_moreores = minetest.get_modpath("moreores") local function play_sound_effect(player, name) if not disable_sounds and player then - local pos = player:getpos() + local pos = player:get_pos() if pos then minetest.sound_play(name, { pos = pos, @@ -18,8 +17,6 @@ end if minetest.global_exists("armor") and armor.elements then table.insert(armor.elements, "shield") - local mult = armor.config.level_multiplier or 1 - armor.config.level_multiplier = mult * 0.9 end -- Regisiter Shields @@ -69,6 +66,11 @@ if armor.materials.wood then {"default:steel_ingot"}, }, }) + minetest.register_craft({ + type = "fuel", + recipe = "shields:shield_wood", + burntime = 8, + }) end if armor.materials.cactus then @@ -108,6 +110,11 @@ if armor.materials.cactus then {"default:steel_ingot"}, }, }) + minetest.register_craft({ + type = "fuel", + recipe = "shields:shield_cactus", + burntime = 16, + }) end if armor.materials.steel then diff --git a/3d_armor/shields/locale/shields.fr.tr b/3d_armor/shields/locale/shields.fr.tr new file mode 100644 index 0000000..730c9bf --- /dev/null +++ b/3d_armor/shields/locale/shields.fr.tr @@ -0,0 +1,16 @@ +# textdomain: shields + + +### init.lua ### + +Admin Shield=Bouclier d'admin +Bronze Shield=Bouclier en bronze +Cactus Shield=Bouclier en cactus +Crystal Shield=Bouclier en cristal +Diamond Shield=Bouclier en diamant +Enhanced Cactus Shield=Bouclier en cactus amélioré +Enhanced Wood Shield=Bouclier en bois amélioré +Gold Shield=Bouclier en or +Mithril Shield=Bouclier en mithril +Steel Shield=Bouclier en acier +Wooden Shield=Bouclier en bois diff --git a/3d_armor/shields/locale/template.txt b/3d_armor/shields/locale/template.txt new file mode 100644 index 0000000..ecaffd7 --- /dev/null +++ b/3d_armor/shields/locale/template.txt @@ -0,0 +1,16 @@ +# textdomain: shields + + +### init.lua ### + +Admin Shield= +Bronze Shield= +Cactus Shield= +Crystal Shield= +Diamond Shield= +Enhanced Cactus Shield= +Enhanced Wood Shield= +Gold Shield= +Mithril Shield= +Steel Shield= +Wooden Shield= diff --git a/3d_armor/shields/mod.conf b/3d_armor/shields/mod.conf new file mode 100644 index 0000000..9a95629 --- /dev/null +++ b/3d_armor/shields/mod.conf @@ -0,0 +1,3 @@ +name = shields +depends = default, 3d_armor +description = Adds visible shields to 3d armor. diff --git a/3d_armor/shields/textures/shields_inv_shield_admin.png b/3d_armor/shields/textures/shields_inv_shield_admin.png index 0b0637e..7ec86c4 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_admin.png and b/3d_armor/shields/textures/shields_inv_shield_admin.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_bronze.png b/3d_armor/shields/textures/shields_inv_shield_bronze.png index af47896..0e5c072 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_bronze.png and b/3d_armor/shields/textures/shields_inv_shield_bronze.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_cactus.png b/3d_armor/shields/textures/shields_inv_shield_cactus.png index d5c9ae4..4fd5cf2 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_cactus.png and b/3d_armor/shields/textures/shields_inv_shield_cactus.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_crystal.png b/3d_armor/shields/textures/shields_inv_shield_crystal.png index ebb73db..18e90f5 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_crystal.png and b/3d_armor/shields/textures/shields_inv_shield_crystal.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_diamond.png b/3d_armor/shields/textures/shields_inv_shield_diamond.png index 0e79d97..e172397 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_diamond.png and b/3d_armor/shields/textures/shields_inv_shield_diamond.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png b/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png index c5dc4d0..45cf71f 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png and b/3d_armor/shields/textures/shields_inv_shield_enhanced_cactus.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png b/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png index 13baede..945f84f 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png and b/3d_armor/shields/textures/shields_inv_shield_enhanced_wood.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_gold.png b/3d_armor/shields/textures/shields_inv_shield_gold.png index d0bd027..d8e9d6b 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_gold.png and b/3d_armor/shields/textures/shields_inv_shield_gold.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_mithril.png b/3d_armor/shields/textures/shields_inv_shield_mithril.png index a55fb00..a9dfa06 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_mithril.png and b/3d_armor/shields/textures/shields_inv_shield_mithril.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_steel.png b/3d_armor/shields/textures/shields_inv_shield_steel.png index 5417632..76e0035 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_steel.png and b/3d_armor/shields/textures/shields_inv_shield_steel.png differ diff --git a/3d_armor/shields/textures/shields_inv_shield_wood.png b/3d_armor/shields/textures/shields_inv_shield_wood.png index 407533f..2365086 100644 Binary files a/3d_armor/shields/textures/shields_inv_shield_wood.png and b/3d_armor/shields/textures/shields_inv_shield_wood.png differ diff --git a/3d_armor/shields/textures/shields_shield_admin.png b/3d_armor/shields/textures/shields_shield_admin.png index 764c3bb..1259272 100644 Binary files a/3d_armor/shields/textures/shields_shield_admin.png and b/3d_armor/shields/textures/shields_shield_admin.png differ diff --git a/3d_armor/shields/textures/shields_shield_admin_preview.png b/3d_armor/shields/textures/shields_shield_admin_preview.png index 1d64766..f37efd5 100644 Binary files a/3d_armor/shields/textures/shields_shield_admin_preview.png and b/3d_armor/shields/textures/shields_shield_admin_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_bronze.png b/3d_armor/shields/textures/shields_shield_bronze.png index d2a3561..e3a7ad4 100644 Binary files a/3d_armor/shields/textures/shields_shield_bronze.png and b/3d_armor/shields/textures/shields_shield_bronze.png differ diff --git a/3d_armor/shields/textures/shields_shield_bronze_preview.png b/3d_armor/shields/textures/shields_shield_bronze_preview.png index 3942471..8450130 100644 Binary files a/3d_armor/shields/textures/shields_shield_bronze_preview.png and b/3d_armor/shields/textures/shields_shield_bronze_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_cactus.png b/3d_armor/shields/textures/shields_shield_cactus.png index 889ac94..8c69d76 100644 Binary files a/3d_armor/shields/textures/shields_shield_cactus.png and b/3d_armor/shields/textures/shields_shield_cactus.png differ diff --git a/3d_armor/shields/textures/shields_shield_cactus_preview.png b/3d_armor/shields/textures/shields_shield_cactus_preview.png index 1b46f1e..ab2a531 100644 Binary files a/3d_armor/shields/textures/shields_shield_cactus_preview.png and b/3d_armor/shields/textures/shields_shield_cactus_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_crystal.png b/3d_armor/shields/textures/shields_shield_crystal.png index 03882e8..1ee039d 100644 Binary files a/3d_armor/shields/textures/shields_shield_crystal.png and b/3d_armor/shields/textures/shields_shield_crystal.png differ diff --git a/3d_armor/shields/textures/shields_shield_crystal_preview.png b/3d_armor/shields/textures/shields_shield_crystal_preview.png index 8dc632e..8a32c8b 100644 Binary files a/3d_armor/shields/textures/shields_shield_crystal_preview.png and b/3d_armor/shields/textures/shields_shield_crystal_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_diamond.png b/3d_armor/shields/textures/shields_shield_diamond.png index d1641b7..5bbb4fc 100644 Binary files a/3d_armor/shields/textures/shields_shield_diamond.png and b/3d_armor/shields/textures/shields_shield_diamond.png differ diff --git a/3d_armor/shields/textures/shields_shield_diamond_preview.png b/3d_armor/shields/textures/shields_shield_diamond_preview.png index 87fd958..78e69e6 100644 Binary files a/3d_armor/shields/textures/shields_shield_diamond_preview.png and b/3d_armor/shields/textures/shields_shield_diamond_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_cactus.png b/3d_armor/shields/textures/shields_shield_enhanced_cactus.png index 13884ff..980c4f1 100644 Binary files a/3d_armor/shields/textures/shields_shield_enhanced_cactus.png and b/3d_armor/shields/textures/shields_shield_enhanced_cactus.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png b/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png index d8227a8..4b85f48 100644 Binary files a/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png and b/3d_armor/shields/textures/shields_shield_enhanced_cactus_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_wood.png b/3d_armor/shields/textures/shields_shield_enhanced_wood.png index 64f5331..f87cf65 100644 Binary files a/3d_armor/shields/textures/shields_shield_enhanced_wood.png and b/3d_armor/shields/textures/shields_shield_enhanced_wood.png differ diff --git a/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png b/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png index 97ca378..52ba7eb 100644 Binary files a/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png and b/3d_armor/shields/textures/shields_shield_enhanced_wood_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_gold.png b/3d_armor/shields/textures/shields_shield_gold.png index e1aecfd..09fa339 100644 Binary files a/3d_armor/shields/textures/shields_shield_gold.png and b/3d_armor/shields/textures/shields_shield_gold.png differ diff --git a/3d_armor/shields/textures/shields_shield_gold_preview.png b/3d_armor/shields/textures/shields_shield_gold_preview.png index 103e0bc..4337544 100644 Binary files a/3d_armor/shields/textures/shields_shield_gold_preview.png and b/3d_armor/shields/textures/shields_shield_gold_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_mithril.png b/3d_armor/shields/textures/shields_shield_mithril.png index 2e14503..38558c4 100644 Binary files a/3d_armor/shields/textures/shields_shield_mithril.png and b/3d_armor/shields/textures/shields_shield_mithril.png differ diff --git a/3d_armor/shields/textures/shields_shield_mithril_preview.png b/3d_armor/shields/textures/shields_shield_mithril_preview.png index 8adb978..e5ca987 100644 Binary files a/3d_armor/shields/textures/shields_shield_mithril_preview.png and b/3d_armor/shields/textures/shields_shield_mithril_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_steel.png b/3d_armor/shields/textures/shields_shield_steel.png index 22ddb07..108dffe 100644 Binary files a/3d_armor/shields/textures/shields_shield_steel.png and b/3d_armor/shields/textures/shields_shield_steel.png differ diff --git a/3d_armor/shields/textures/shields_shield_steel_preview.png b/3d_armor/shields/textures/shields_shield_steel_preview.png index 96fbf9a..301a149 100644 Binary files a/3d_armor/shields/textures/shields_shield_steel_preview.png and b/3d_armor/shields/textures/shields_shield_steel_preview.png differ diff --git a/3d_armor/shields/textures/shields_shield_wood.png b/3d_armor/shields/textures/shields_shield_wood.png index 129f9f0..8cc5b85 100644 Binary files a/3d_armor/shields/textures/shields_shield_wood.png and b/3d_armor/shields/textures/shields_shield_wood.png differ diff --git a/3d_armor/shields/textures/shields_shield_wood_preview.png b/3d_armor/shields/textures/shields_shield_wood_preview.png index d167738..c22465e 100644 Binary files a/3d_armor/shields/textures/shields_shield_wood_preview.png and b/3d_armor/shields/textures/shields_shield_wood_preview.png differ diff --git a/3d_armor/wieldview/LICENSE.txt b/3d_armor/wieldview/LICENSE.txt index fff42d8..e1552c0 100644 --- a/3d_armor/wieldview/LICENSE.txt +++ b/3d_armor/wieldview/LICENSE.txt @@ -1,5 +1,18 @@ [mod] visible wielded items [wieldview] ======================================= -License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 +Copyright (C) 2012-2019 stujones11, Stuart Jones +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along +with this program; if not, write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. diff --git a/3d_armor/wieldview/README.txt b/3d_armor/wieldview/README.txt index ffa5ef0..3a8b640 100644 --- a/3d_armor/wieldview/README.txt +++ b/3d_armor/wieldview/README.txt @@ -21,3 +21,7 @@ Wield image transformation: To apply a simple transformation to the item in hand, add the group “wieldview_transform” to the item definition. The group rating equals one of the numbers used for the [transform texture modifier of the Lua API. + +Disabling the feature in-game: If you want to hide the wielded item +you can add an INT metadata to the player called "show_wielded_item" and set +it to 2 (any other value will show the wielded item again). diff --git a/3d_armor/wieldview/init.lua b/3d_armor/wieldview/init.lua index 45f9fca..f0edeac 100644 --- a/3d_armor/wieldview/init.lua +++ b/3d_armor/wieldview/init.lua @@ -54,6 +54,9 @@ wieldview.update_wielded_item = function(self, player) return end if self.wielded_item[name] then + if player:get_meta():get_int("show_wielded_item") == 2 then + item = "" + end if self.wielded_item[name] == item then return end @@ -66,9 +69,12 @@ end minetest.register_on_joinplayer(function(player) local name = player:get_player_name() wieldview.wielded_item[name] = "" - minetest.after(0, function(player) - wieldview:update_wielded_item(player) - end, player) + minetest.after(0, function() + local pplayer = minetest.get_player_by_name(name) + if player then + wieldview:update_wielded_item(pplayer) + end + end) end) minetest.register_globalstep(function(dtime) @@ -80,4 +86,3 @@ minetest.register_globalstep(function(dtime) time = 0 end end) - diff --git a/3d_armor/wieldview/mod.conf b/3d_armor/wieldview/mod.conf new file mode 100644 index 0000000..c5f4812 --- /dev/null +++ b/3d_armor/wieldview/mod.conf @@ -0,0 +1,3 @@ +name = wieldview +depends = 3d_armor +description = Makes hand wielded items visible to other players. diff --git a/digilines/.luacheckrc b/digilines/.luacheckrc deleted file mode 100644 index 6d89a3f..0000000 --- a/digilines/.luacheckrc +++ /dev/null @@ -1,12 +0,0 @@ - -read_globals = { - "minetest", - "default", - "pipeworks", - "dump", - "VoxelArea", -} - -globals = { - "digilines", -} diff --git a/digilines/LICENSE.txt b/digilines/LICENSE.txt deleted file mode 100644 index 9569df7..0000000 --- a/digilines/LICENSE.txt +++ /dev/null @@ -1,188 +0,0 @@ -The LGPLv3 applies to all code in this project. -The WTFPL applies to textures and any other content in this project which is not source code. - -============================================================= - -GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - - -============================================================= - - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/digilines/README.inventory b/digilines/README.inventory deleted file mode 100644 index a88115f..0000000 --- a/digilines/README.inventory +++ /dev/null @@ -1,62 +0,0 @@ -Basic idea: place this chest down at the end of a pipeline. Feed stuff into it. Attach a luacontroller to it with a digiline in between. Program the luacontroller to turn on a wire to stop the pipeline when the chest is full. Don't put more than one kind of item down the pipeline into the chest, unless you want weird tricksy behavior. - -...[F]===[C]--{L} - |__________| - [B] -F: filter -B: blinky plant -C: digiline chest -L: luacontroller -==: pipe -__: mesecons ---: digiline - -Make sure you use mem in the luacontroller to keep the mesecon wire on indefinitely after the chest signals full. When it signals "take" someone took an item out and you can start the pipeline up again. -This may be a bad idea if they only take half a stack or something. Oh well. - -When you put something in, you get a "put" to indicate it's OK (sort of (still buggy)) and can fit inside the chest. When you get a "lost", that means it won't fit inside the chest, and will bounce, possibly popping out. When you get a "overflow" that means you tried to add something to a chest that just filled up, and the stack will bounce. When you get a "full" that means the chest just filled up. - -"Filled up" for all intents and purposes, means taking the type of whatever just went into the chest, and seeing if at least 1 of that type can be added to the chest. If it cannot, then it's filled up. That means a chest full of stacks of 30 copper and one spot of 98 gold, and you add one gold to that, it will say it's full. Add 30 copper to it, and it won't. - -Generally you'll be working with full stacks in pipeworks. Even the non-mese filters will accumulate items in a chest, and not spread them out into multiple stacks. And generally your destination chests will each have one of any kind of item. So all you have to worry about is when you've got 99 everywhere, and one space possibly free. A mese filter can fail on that in fact, for instance if you have room for 45 gold, and it tries to push a stack of 50 gold. All 50 will bounce! The code for chests isn't smart enough to add the 45 and bounce the leftover 5. So only use mese filters when you're sure a full stack has accumulated for the filter to push, and there are no partial stacks at the destination. - -For some reason when an "overflow" happens, when it checks if the stack can fit inside the chest, the answer is yes it can fit! Then it doesn't. Sort of buggy. - -itemstack - the qualified name, a space, then the amount. If the space and amount are ommitted, that represents just 1. - -examples: "default:chest 33" "default:coal" "default:axe_diamond" - -bounce - - when an item cannot enter the destination container it will travel back up the tube it came from, going along alternate routes if they exist, but otherwise popping out of the tube. - -popping out - - the little thingy travelling through the tube disappears, and an entity of the item appears, as if it was just dropped. This entity can expire, losing your items permanently! - - -The messages are: - - -put - - this means that the inventory claimed it could fit that stack of items inside it. Inventories lie. But with the above caveats this is quite usable. -lost - - the stack couldn't fit in the chest and bounces. -full - - the chest has been filled. The itemstack is what filled it. count is what's leftover. - until chests can suck up part of a stack and not bounce the whole stack, that count will - always be 0 -overflow - - generally this is the same as lost, except that the "put" event happened, meaning that the - itemstack was allowed in the chest. - - this will happen with two stacks in rapid succession, the first filling the chest, and the - second bouncing. the in this case will be the amount of the second. - - overflow can't happen with two different kinds of items, you'll get a put, maybe full, then lost for the second kind - -Tricky situation: -if you have a blank spot and put say 82 torches down your pipeline, followed by 99 coal, the 82 torches will go in the chest, and the chest will see that 1 more torch can fit since that would only go to 83. Since 1 more torch can fit, no "full" message will fire off. Then when the coal hits the chest, the "fail" message will fire and the coal will bounce out. The chest couldn't predict that coal would be coming next, so it couldn't know that the chest is full, for coal, while not full for torches. - -TODO: - - make chest.lua a mixin that gets both default and locked chests - - digiline aware furnaces - - digiline aware technic machines, grinders, alloy furnaces, etc - - the pipes going into the chests don't snap to the pipe holes in the digiline chests. They still act fine as pipeworks destinations though. - - digiline chests seem to be immune to filters. But it's late and I'm shipping this. Someone else can figure out why the chests aren't acting like pipeworks chests, despite cloning the pipeworks chest's object. Oh who am I kidding. I'll do it myself I guess, once I've lost hope of aid again. diff --git a/digilines/README.md b/digilines/README.md deleted file mode 100644 index 3d57f52..0000000 --- a/digilines/README.md +++ /dev/null @@ -1,14 +0,0 @@ -Digilines -========== -- The minetest counterpart for bus systems like i2c, SPI, RS232, USB - - - -This mod adds digiline wires, an RTC (Real Time Clock), a light sensor as well as an LCD Screen. -Can be used together with the luacontroller from mesecons. See the luacontroller manual for more information. - -Send "GET" to RTC or light sensor to retrieve Data, send any text to LCD to display it. -Select channel by right-clicking items. - -License: - Code: LGPL - Textures: WTFPL diff --git a/digilines/characters b/digilines/characters deleted file mode 100644 index b36eea4..0000000 --- a/digilines/characters +++ /dev/null @@ -1,282 +0,0 @@ -A -_a_ -7 -B -_b_ -5 -C -_c_ -6 -D -_d_ -6 -E -_e_ -5 -F -_f_ -5 -G -_g_ -6 -H -_h_ -6 -I -_i_ -1 -J -_j_ -4 -K -_k_ -5 -L -_l_ -4 -M -_m_ -7 -N -_n_ -6 -O -_o_ -6 -P -_p_ -5 -Q -_q_ -7 -R -_r_ -5 -S -_s_ -5 -T -_t_ -5 -U -_u_ -6 -V -_v_ -7 -W -_w_ -9 -X -_x_ -5 -Y -_y_ -7 -Z -_z_ -5 -a -_a -5 -b -_b -5 -c -_c -4 -d -_d -5 -e -_e -4 -f -_f -4 -g -_g -5 -h -_h -5 -i -_i -1 -j -_j -1 -k -_k -4 -l -_l -1 -m -_m -7 -n -_n -5 -o -_o -5 -p -_p -5 -q -_q -5 -r -_r -3 -s -_s -4 -t -_t -3 -u -_u -4 -v -_v -5 -w -_w -7 -x -_x -5 -y -_y -4 -z -_z -4 - -_sp -2 -0 -_0 -4 -1 -_1 -2 -2 -_2 -4 -3 -_3 -4 -4 -_4 -4 -5 -_5 -4 -6 -_6 -4 -7 -_7 -4 -8 -_8 -4 -9 -_9 -4 -( -_bl -2 -) -_br -2 -{ -_cl -3 -} -_cr -3 -[ -_sl -2 -] -_sr -2 -' -_ap -1 -! -_ex -1 -? -_qu -4 -@ -_at -5 -# -_hs -5 -$ -_dl -4 -% -_pr -5 -^ -_ca -3 -& -_am -5 -* -_as -3 -_ -_un -3 -+ -_ps -3 -- -_mn -3 -= -_eq -3 -; -_sm -1 -: -_co -1 -, -_cm -2 -" -_qo -3 -/ -_dv -5 -~ -_tl -4 -< -_lt -3 -> -_gt -3 -\ -_re -5 -| -_vb -1 -. -_dt -1 diff --git a/digilines/depends.txt b/digilines/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/digilines/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/digilines/description.txt b/digilines/description.txt deleted file mode 100644 index 078bc92..0000000 --- a/digilines/description.txt +++ /dev/null @@ -1 +0,0 @@ -This mod adds digiline wires, an RTC (Real Time Clock), a light sensor as well as an LCD Screen. Can be used together with the luacontroller from mesecons. diff --git a/digilines/init.lua b/digilines/init.lua deleted file mode 100644 index 21c1c8e..0000000 --- a/digilines/init.lua +++ /dev/null @@ -1,82 +0,0 @@ - -digilines = {} - --- Backwards compatibility code. --- We define a proxy table whose methods can be called with the --- `foo:bar` notation, and it will redirect the call to the --- real function, dropping the first implicit argument. -local digiline; digiline = setmetatable({}, { - __index = function(_, k) - -- Get method from real table. - local v = digilines[k] - if type(v) == "function" then - -- We need to wrap functions in order to ignore - -- the implicit `self` argument. - local f = v - return function(self, ...) - -- Trap invalid calls of the form `digiline.foo(...)`. - assert(self == digiline) - return f(...) - end - end - return v - end, -}) -rawset(_G, "digiline", digiline) - --- Let's test our proxy table. -function digilines._testproxy(x) - return x -end - --- Test using old `digiline:foobar` form. -assert(digiline:_testproxy("foobar") == "foobar") - --- Test using new `digilines.foobar` form. -assert(digilines._testproxy("foobar") == "foobar") - --- Test calling incorrect form raises an error. -assert(not pcall(function() digiline._testproxy("foobar") end)) - -local modpath = minetest.get_modpath("digilines") -dofile(modpath .. "/presetrules.lua") -dofile(modpath .. "/util.lua") -dofile(modpath .. "/internal.lua") -dofile(modpath .. "/wires_common.lua") -dofile(modpath .. "/wire_std.lua") - -function digilines.receptor_send(pos, rules, channel, msg) - local checked = {} - checked[minetest.hash_node_position(pos)] = true -- exclude itself - for _,rule in ipairs(rules) do - if digilines.rules_link(pos, digilines.addPosRule(pos, rule)) then - digilines.transmit(digilines.addPosRule(pos, rule), channel, msg, checked) - end - end -end - -minetest.register_craft({ - output = 'digilines:wire_std_00000000 2', - recipe = { - {'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'}, - {'mesecons_insulated:insulated_off', 'mesecons_insulated:insulated_off', 'default:gold_ingot'}, - {'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'}, - } -}) - --- former submods -if minetest.is_yes(minetest.setting_get("digilines_enable_inventory") or true) then - dofile(modpath .. "/inventory.lua") -end - -if minetest.is_yes(minetest.setting_get("digilines_enable_lcd") or true) then - dofile(modpath .. "/lcd.lua") -end - -if minetest.is_yes(minetest.setting_get("digilines_enable_lightsensor") or true) then - dofile(modpath .. "/lightsensor.lua") -end - -if minetest.is_yes(minetest.setting_get("digilines_enable_rtc") or true) then - dofile(modpath .. "/rtc.lua") -end diff --git a/digilines/internal.lua b/digilines/internal.lua deleted file mode 100644 index 2528f35..0000000 --- a/digilines/internal.lua +++ /dev/null @@ -1,119 +0,0 @@ -function digilines.getspec(node) - if not minetest.registered_nodes[node.name] then return false end - return minetest.registered_nodes[node.name].digiline -end - -function digilines.importrules(spec, node) - if type(spec) == 'function' then - return spec(node) - elseif spec then - return spec - else - return digilines.rules.default - end -end - -function digilines.getAnyInputRules(pos) - local node = digilines.get_node_force(pos) - local spec = digilines.getspec(node) - if not spec then return end - - if spec.wire then - return digilines.importrules(spec.wire.rules, node) - end - if spec.effector then - return digilines.importrules(spec.effector.rules, node) - end -end - -function digilines.getAnyOutputRules(pos) - local node = digilines.get_node_force(pos) - local spec = digilines.getspec(node) - if not spec then return end - - if spec.wire then - return digilines.importrules(spec.wire.rules, node) - end - if spec.receptor then - return digilines.importrules(spec.receptor.rules, node) - end -end - -function digilines.rules_link(output, input) - local outputrules = digilines.getAnyOutputRules(output) - local inputrules = digilines.getAnyInputRules (input) - - if not outputrules or not inputrules then return false end - - - for _, orule in ipairs(outputrules) do - if digilines.cmpPos(digilines.addPosRule(output, orule), input) then - for _, irule in ipairs(inputrules) do - if digilines.cmpPos(digilines.addPosRule(input, irule), output) then - return true - end - end - end - end - return false -end - -function digilines.rules_link_anydir(output, input) - return digilines.rules_link(output, input) - or digilines.rules_link(input, output) -end - -local function queue_new() - return {nextRead = 1, nextWrite = 1} -end - -local function queue_empty(queue) - return queue.nextRead == queue.nextWrite -end - -local function queue_enqueue(queue, object) - local nextWrite = queue.nextWrite - queue[nextWrite] = object - queue.nextWrite = nextWrite + 1 -end - -local function queue_dequeue(queue) - local nextRead = queue.nextRead - local object = queue[nextRead] - queue[nextRead] = nil - queue.nextRead = nextRead + 1 - return object -end - -function digilines.transmit(pos, channel, msg, checked) - digilines.vm_begin() - local queue = queue_new() - queue_enqueue(queue, pos) - while not queue_empty(queue) do - local curPos = queue_dequeue(queue) - local node = digilines.get_node_force(curPos) - local spec = digilines.getspec(node) - if spec then - -- Effector actions --> Receive - if spec.effector then - spec.effector.action(curPos, node, channel, msg) - end - - -- Cable actions --> Transmit - if spec.wire then - local rules = digilines.importrules(spec.wire.rules, node) - for _, rule in ipairs(rules) do - local nextPos = digilines.addPosRule(curPos, rule) - if digilines.rules_link(curPos, nextPos) then - local checkedID = minetest.hash_node_position(nextPos) - if not checked[checkedID] then - checked[checkedID] = true - queue_enqueue(queue, nextPos) - end - end - end - end - end - end - digilines.vm_end() -end diff --git a/digilines/inventory.lua b/digilines/inventory.lua deleted file mode 100644 index dcf86cc..0000000 --- a/digilines/inventory.lua +++ /dev/null @@ -1,116 +0,0 @@ -local pipeworks_enabled = minetest.get_modpath("pipeworks") ~= nil - -local function sendMessage(pos, msg, channel) - if channel == nil then - channel = minetest.get_meta(pos):get_string("channel") - end - digilines.receptor_send(pos,digilines.rules.default,channel,msg) -end - -local function maybeString(stack) - if type(stack)=='string' then return stack - elseif type(stack)=='table' then return dump(stack) - else return stack:to_string() - end -end - -local function can_insert(pos, stack) - local can = minetest.get_meta(pos):get_inventory():room_for_item("main", stack) - if can then - sendMessage(pos,"put "..maybeString(stack)) - else - -- overflow and lost means that items are gonna be out as entities :/ - sendMessage(pos,"lost "..maybeString(stack)) - end - return can -end - -local tubeconn = pipeworks_enabled and "^pipeworks_tube_connection_wooden.png" or "" -local tubescan = pipeworks_enabled and function(pos) pipeworks.scan_for_tube_objects(pos) end or nil - -minetest.register_alias("digilines_inventory:chest", "digilines:chest") -minetest.register_node("digilines:chest", { - description = "Digiline Chest", - tiles = { - "default_chest_top.png"..tubeconn, - "default_chest_top.png"..tubeconn, - "default_chest_side.png"..tubeconn, - "default_chest_side.png"..tubeconn, - "default_chest_side.png"..tubeconn, - "default_chest_front.png", - }, - paramtype2 = "facedir", - legacy_facedir_simple = true, - groups = {choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1}, - sounds = default.node_sound_wood_defaults(), - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("infotext", "Digiline Chest") - meta:set_string("formspec", "size[8,10]".. - ((default and default.gui_bg) or "").. - ((default and default.gui_bg_img) or "").. - ((default and default.gui_slots) or "").. - "label[0,0;Digiline Chest]".. - "list[current_name;main;0,1;8,4;]".. - "field[2,5.5;5,1;channel;Channel;${channel}]".. - ((default and default.get_hotbar_bg) and default.get_hotbar_bg(0,6) or "").. - "list[current_player;main;0,6;8,4;]".. - "listring[]") - local inv = meta:get_inventory() - inv:set_size("main", 8*4) - end, - after_place_node = tubescan, - after_dig_node = tubescan, - can_dig = function(pos) - return minetest.get_meta(pos):get_inventory():is_empty("main") - end, - on_receive_fields = function(pos, _, fields, sender) - local name = sender:get_player_name() - if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) - return - end - if fields.channel ~= nil then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, - digiline = { - receptor = {}, - effector = { - action = function() end - } - }, - tube = { - insert_object = function(pos, node, stack, direction) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - return inv:add_item("main", stack) - end, - can_insert = function(pos, node, stack, direction) - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - return inv:room_for_item("main", stack) - end, - connect_sides = {left=1, right=1, back=1, front=1, bottom=1, top=1}, - input_inventory = "main", - }, - on_metadata_inventory_move = function(pos, _, _, _, _, _, player) - minetest.log("action", player:get_player_name().." moves stuff in chest at "..minetest.pos_to_string(pos)) - end, - on_metadata_inventory_put = function(pos, _, _, stack, player) - local channel = minetest.get_meta(pos):get_string("channel") - sendMessage(pos, "uput "..maybeString(stack), channel) - minetest.log("action", player:get_player_name().." puts stuff into chest at "..minetest.pos_to_string(pos)) - end, - on_metadata_inventory_take = function(pos, listname, _, stack, player) - local channel = minetest.get_meta(pos):get_string("channel") - sendMessage(pos, "utake "..maybeString(stack), channel) - minetest.log("action", player:get_player_name().." takes stuff from chest at "..minetest.pos_to_string(pos)) - end, -}) - -minetest.register_craft({ - type = "shapeless", - output = "digilines:chest", - recipe = {"default:chest", "digilines:wire_std_00000000"} -}) diff --git a/digilines/lcd.lua b/digilines/lcd.lua deleted file mode 100644 index ce17dac..0000000 --- a/digilines/lcd.lua +++ /dev/null @@ -1,233 +0,0 @@ ---* parts are currently not possible because you cannot set the pitch of an entity from lua - --- Font: 04.jp.org - --- load characters map -local chars_file = io.open(minetest.get_modpath("digilines").."/characters", "r") -local charmap = {} -local max_chars = 12 -if not chars_file then - print("[digilines] E: LCD: character map file not found") -else - while true do - local char = chars_file:read("*l") - if char == nil then - break - end - local img = chars_file:read("*l") - chars_file:read("*l") - charmap[char] = img - end -end - --- CONSTANTS -local LCD_WITH = 100 -local LCD_PADDING = 8 - -local LINE_LENGTH = 12 -local NUMBER_OF_LINES = 5 - -local LINE_HEIGHT = 14 -local CHAR_WIDTH = 5 - -local create_lines = function(text) - local line = "" - local line_num = 1 - local tab = {} - for word in string.gmatch(text, "%S+") do - if string.len(line)+string.len(word) < LINE_LENGTH and word ~= "|" then - if line ~= "" then - line = line.." "..word - else - line = word - end - else - table.insert(tab, line) - if word ~= "|" then - line = word - else - line = "" - end - line_num = line_num+1 - if line_num > NUMBER_OF_LINES then - return tab - end - end - end - table.insert(tab, line) - return tab -end - -local generate_line = function(s, ypos) - local i = 1 - local parsed = {} - local width = 0 - local chars = 0 - while chars < max_chars and i <= #s do - local file = nil - if charmap[s:sub(i, i)] ~= nil then - file = charmap[s:sub(i, i)] - i = i + 1 - elseif i < #s and charmap[s:sub(i, i + 1)] ~= nil then - file = charmap[s:sub(i, i + 1)] - i = i + 2 - else - print("[digilines] W: LCD: unknown symbol in '"..s.."' at "..i) - i = i + 1 - end - if file ~= nil then - width = width + CHAR_WIDTH - table.insert(parsed, file) - chars = chars + 1 - end - end - width = width - 1 - - local texture = "" - local xpos = math.floor((LCD_WITH - 2 * LCD_PADDING - width) / 2 + LCD_PADDING) - for ii = 1, #parsed do - texture = texture..":"..xpos..","..ypos.."="..parsed[ii]..".png" - xpos = xpos + CHAR_WIDTH + 1 - end - return texture -end - -local generate_texture = function(lines) - local texture = "[combine:"..LCD_WITH.."x"..LCD_WITH - local ypos = 16 - for i = 1, #lines do - texture = texture..generate_line(lines[i], ypos) - ypos = ypos + LINE_HEIGHT - end - return texture -end - -local lcds = { - -- on ceiling - --* [0] = {delta = {x = 0, y = 0.4, z = 0}, pitch = math.pi / -2}, - -- on ground - --* [1] = {delta = {x = 0, y =-0.4, z = 0}, pitch = math.pi / 2}, - -- sides - [2] = {delta = {x = 0.437, y = 0, z = 0}, yaw = math.pi / -2}, - [3] = {delta = {x = -0.437, y = 0, z = 0}, yaw = math.pi / 2}, - [4] = {delta = {x = 0, y = 0, z = 0.437}, yaw = 0}, - [5] = {delta = {x = 0, y = 0, z = -0.437}, yaw = math.pi}, -} - -local reset_meta = function(pos) - minetest.get_meta(pos):set_string("formspec", "field[channel;Channel;${channel}]") -end - -local clearscreen = function(pos) - local objects = minetest.get_objects_inside_radius(pos, 0.5) - for _, o in ipairs(objects) do - local o_entity = o:get_luaentity() - if o_entity and o_entity.name == "digilines_lcd:text" then - o:remove() - end - end -end - -local prepare_writing = function(pos) - local lcd_info = lcds[minetest.get_node(pos).param2] - if lcd_info == nil then return end - local text = minetest.add_entity( - {x = pos.x + lcd_info.delta.x, - y = pos.y + lcd_info.delta.y, - z = pos.z + lcd_info.delta.z}, "digilines_lcd:text") - text:setyaw(lcd_info.yaw or 0) - --* text:setpitch(lcd_info.yaw or 0) - return text -end - -local on_digiline_receive = function(pos, _, channel, msg) - local meta = minetest.get_meta(pos) - local setchan = meta:get_string("channel") - if setchan ~= channel then return end - - meta:set_string("text", msg) - meta:set_string("infotext", msg) - clearscreen(pos) - if msg ~= "" then - prepare_writing(pos) - end -end - -local lcd_box = { - type = "wallmounted", - wall_top = {-8/16, 7/16, -8/16, 8/16, 8/16, 8/16} -} - -minetest.register_alias("digilines_lcd:lcd", "digilines:lcd") -minetest.register_node("digilines:lcd", { - drawtype = "nodebox", - description = "Digiline LCD", - inventory_image = "lcd_lcd.png", - wield_image = "lcd_lcd.png", - tiles = {"lcd_anyside.png"}, - - paramtype = "light", - sunlight_propagates = true, - paramtype2 = "wallmounted", - node_box = lcd_box, - selection_box = lcd_box, - groups = {choppy = 3, dig_immediate = 2}, - - after_place_node = function (pos) - local param2 = minetest.get_node(pos).param2 - if param2 == 0 or param2 == 1 then - minetest.add_node(pos, {name = "digilines:lcd", param2 = 3}) - end - prepare_writing (pos) - end, - - on_construct = function(pos) - reset_meta(pos) - end, - - on_destruct = function(pos) - clearscreen(pos) - end, - - on_receive_fields = function(pos, _, fields, sender) - local name = sender:get_player_name() - if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) - return - end - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, - - digiline = - { - receptor = {}, - effector = { - action = on_digiline_receive - }, - }, - - light_source = 6, -}) - -minetest.register_entity(":digilines_lcd:text", { - collisionbox = { 0, 0, 0, 0, 0, 0 }, - visual = "upright_sprite", - textures = {}, - - on_activate = function(self) - local meta = minetest.get_meta(self.object:getpos()) - local text = meta:get_string("text") - self.object:set_properties({textures={generate_texture(create_lines(text))}}) - end -}) - -minetest.register_craft({ - output = "digilines:lcd 2", - recipe = { - {"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"}, - {"mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off"}, - {"default:glass","default:glass","default:glass"} - } -}) diff --git a/digilines/lightsensor.lua b/digilines/lightsensor.lua deleted file mode 100644 index 1c7237b..0000000 --- a/digilines/lightsensor.lua +++ /dev/null @@ -1,63 +0,0 @@ -local GET_COMMAND = "GET" - -local lsensor_nodebox = -{ - type = "fixed", - fixed = { - { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab - - { -7/16, -7/16, -7/16, -4/16, -5/16, 7/16 }, -- bonds - { 4/16, -7/16, -7/16, 7/16, -5/16, 7/16 }, - { -7/16, -7/16, -7/16, 7/16, -5/16, -4/16 }, - { -7/16, -7/16, 4/16, 7/16, -5/16, 7/16 }, - - { -1/16, -7/16, -1/16, 1/16, -5/16, 1/16 }, -- pin thing in the middle - } -} - -local lsensor_selbox = -{ - type = "fixed", - fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }} -} - -local on_digiline_receive = function (pos, _, channel, msg) - local setchan = minetest.get_meta(pos):get_string("channel") - if channel == setchan and msg == GET_COMMAND then - local lightval = minetest.get_node_light(pos) - digilines.receptor_send(pos, digilines.rules.default, channel, lightval) - end -end - -minetest.register_alias("digilines_lightsensor:lightsensor", "digilines:lightsensor") -minetest.register_node("digilines:lightsensor", { - description = "Digiline Lightsensor", - drawtype = "nodebox", - tiles = {"digilines_lightsensor.png"}, - - paramtype = "light", - groups = {dig_immediate=2}, - selection_box = lsensor_selbox, - node_box = lsensor_nodebox, - digiline = - { - receptor = {}, - effector = { - action = on_digiline_receive - }, - }, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "field[channel;Channel;${channel}]") - end, - on_receive_fields = function(pos, _, fields, sender) - local name = sender:get_player_name() - if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) - return - end - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, -}) diff --git a/digilines/mod.conf b/digilines/mod.conf deleted file mode 100644 index 0b01ac5..0000000 --- a/digilines/mod.conf +++ /dev/null @@ -1 +0,0 @@ -name = digilines diff --git a/digilines/presetrules.lua b/digilines/presetrules.lua deleted file mode 100644 index a0ab508..0000000 --- a/digilines/presetrules.lua +++ /dev/null @@ -1,15 +0,0 @@ -digilines.rules = {} - -digilines.rules.default = -{{x=0, y=0, z=-1}, -{x=1, y=0, z=0}, -{x=-1, y=0, z=0}, -{x=0, y=0, z=1}, -{x=1, y=1, z=0}, -{x=1, y=-1, z=0}, -{x=-1, y=1, z=0}, -{x=-1, y=-1, z=0}, -{x=0, y=1, z=1}, -{x=0, y=-1, z=1}, -{x=0, y=1, z=-1}, -{x=0, y=-1, z=-1}} diff --git a/digilines/rtc.lua b/digilines/rtc.lua deleted file mode 100644 index a82f774..0000000 --- a/digilines/rtc.lua +++ /dev/null @@ -1,59 +0,0 @@ -local GET_COMMAND = "GET" - -local rtc_nodebox = -{ - type = "fixed", - fixed = { - { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab - - { -7/16, -7/16, -7/16, 7/16, -5/16, 7/16 }, - } -} - -local rtc_selbox = -{ - type = "fixed", - fixed = {{ -8/16, -8/16, -8/16, 8/16, -3/16, 8/16 }} -} - -local on_digiline_receive = function (pos, _, channel, msg) - local setchan = minetest.get_meta(pos):get_string("channel") - if channel == setchan and msg == GET_COMMAND then - local timeofday = minetest.get_timeofday() - digilines.receptor_send(pos, digilines.rules.default, channel, timeofday) - end -end - -minetest.register_alias("digilines_rtc:rtc", "digilines:rtc") -minetest.register_node("digilines:rtc", { - description = "Digiline Real Time Clock (RTC)", - drawtype = "nodebox", - tiles = {"digilines_rtc.png"}, - - paramtype = "light", - paramtype2 = "facedir", - groups = {dig_immediate=2}, - selection_box = rtc_selbox, - node_box = rtc_nodebox, - digiline = - { - receptor = {}, - effector = { - action = on_digiline_receive - }, - }, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "field[channel;Channel;${channel}]") - end, - on_receive_fields = function(pos, _, fields, sender) - local name = sender:get_player_name() - if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) - return - end - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, -}) diff --git a/digilines/screenshot.png b/digilines/screenshot.png deleted file mode 100644 index e699cea..0000000 Binary files a/digilines/screenshot.png and /dev/null differ diff --git a/digilines/settingtypes.txt b/digilines/settingtypes.txt deleted file mode 100644 index ad16ac8..0000000 --- a/digilines/settingtypes.txt +++ /dev/null @@ -1,13 +0,0 @@ - -# If enabled, makes some nodes with inventories (like chests) send signals -# when items are moved in the inventory. -digilines_enable_inventory (Enable inventory signals) bool true - -# Enable or disable the LCD panel with visible text. -digilines_enable_lcd (Enable LCD) bool true - -# Enable or disable the light sensor component. -digilines_enable_lightsensor (Enable light sensor) bool true - -# Enable or disable the real time clock component. -digilines_enable_rtc (Enable RTC) bool true diff --git a/digilines/textures/_0.png b/digilines/textures/_0.png deleted file mode 100644 index b030879..0000000 Binary files a/digilines/textures/_0.png and /dev/null differ diff --git a/digilines/textures/_1.png b/digilines/textures/_1.png deleted file mode 100644 index ae28369..0000000 Binary files a/digilines/textures/_1.png and /dev/null differ diff --git a/digilines/textures/_2.png b/digilines/textures/_2.png deleted file mode 100644 index 7375c68..0000000 Binary files a/digilines/textures/_2.png and /dev/null differ diff --git a/digilines/textures/_3.png b/digilines/textures/_3.png deleted file mode 100644 index d724811..0000000 Binary files a/digilines/textures/_3.png and /dev/null differ diff --git a/digilines/textures/_4.png b/digilines/textures/_4.png deleted file mode 100644 index 0fff433..0000000 Binary files a/digilines/textures/_4.png and /dev/null differ diff --git a/digilines/textures/_5.png b/digilines/textures/_5.png deleted file mode 100644 index 43010df..0000000 Binary files a/digilines/textures/_5.png and /dev/null differ diff --git a/digilines/textures/_6.png b/digilines/textures/_6.png deleted file mode 100644 index 1eba38c..0000000 Binary files a/digilines/textures/_6.png and /dev/null differ diff --git a/digilines/textures/_7.png b/digilines/textures/_7.png deleted file mode 100644 index dbcd2d1..0000000 Binary files a/digilines/textures/_7.png and /dev/null differ diff --git a/digilines/textures/_8.png b/digilines/textures/_8.png deleted file mode 100644 index edf6ef5..0000000 Binary files a/digilines/textures/_8.png and /dev/null differ diff --git a/digilines/textures/_9.png b/digilines/textures/_9.png deleted file mode 100644 index c276c11..0000000 Binary files a/digilines/textures/_9.png and /dev/null differ diff --git a/digilines/textures/_a.png b/digilines/textures/_a.png deleted file mode 100644 index 8f3f59c..0000000 Binary files a/digilines/textures/_a.png and /dev/null differ diff --git a/digilines/textures/_a_.png b/digilines/textures/_a_.png deleted file mode 100644 index 4da193c..0000000 Binary files a/digilines/textures/_a_.png and /dev/null differ diff --git a/digilines/textures/_am.png b/digilines/textures/_am.png deleted file mode 100644 index 75d0287..0000000 Binary files a/digilines/textures/_am.png and /dev/null differ diff --git a/digilines/textures/_ap.png b/digilines/textures/_ap.png deleted file mode 100644 index 5dd3325..0000000 Binary files a/digilines/textures/_ap.png and /dev/null differ diff --git a/digilines/textures/_as.png b/digilines/textures/_as.png deleted file mode 100644 index 3c7a25a..0000000 Binary files a/digilines/textures/_as.png and /dev/null differ diff --git a/digilines/textures/_at.png b/digilines/textures/_at.png deleted file mode 100644 index 4f9841c..0000000 Binary files a/digilines/textures/_at.png and /dev/null differ diff --git a/digilines/textures/_b.png b/digilines/textures/_b.png deleted file mode 100644 index baf4eaa..0000000 Binary files a/digilines/textures/_b.png and /dev/null differ diff --git a/digilines/textures/_b_.png b/digilines/textures/_b_.png deleted file mode 100644 index b00a378..0000000 Binary files a/digilines/textures/_b_.png and /dev/null differ diff --git a/digilines/textures/_bl.png b/digilines/textures/_bl.png deleted file mode 100644 index 546ca4e..0000000 Binary files a/digilines/textures/_bl.png and /dev/null differ diff --git a/digilines/textures/_br.png b/digilines/textures/_br.png deleted file mode 100644 index 5700fa6..0000000 Binary files a/digilines/textures/_br.png and /dev/null differ diff --git a/digilines/textures/_c.png b/digilines/textures/_c.png deleted file mode 100644 index eedd639..0000000 Binary files a/digilines/textures/_c.png and /dev/null differ diff --git a/digilines/textures/_c_.png b/digilines/textures/_c_.png deleted file mode 100644 index cab6518..0000000 Binary files a/digilines/textures/_c_.png and /dev/null differ diff --git a/digilines/textures/_ca.png b/digilines/textures/_ca.png deleted file mode 100644 index d359c88..0000000 Binary files a/digilines/textures/_ca.png and /dev/null differ diff --git a/digilines/textures/_cl.png b/digilines/textures/_cl.png deleted file mode 100644 index 55396b9..0000000 Binary files a/digilines/textures/_cl.png and /dev/null differ diff --git a/digilines/textures/_cm.png b/digilines/textures/_cm.png deleted file mode 100644 index 28beedf..0000000 Binary files a/digilines/textures/_cm.png and /dev/null differ diff --git a/digilines/textures/_co.png b/digilines/textures/_co.png deleted file mode 100644 index b161819..0000000 Binary files a/digilines/textures/_co.png and /dev/null differ diff --git a/digilines/textures/_cr.png b/digilines/textures/_cr.png deleted file mode 100644 index ac466a9..0000000 Binary files a/digilines/textures/_cr.png and /dev/null differ diff --git a/digilines/textures/_d.png b/digilines/textures/_d.png deleted file mode 100644 index a5f0699..0000000 Binary files a/digilines/textures/_d.png and /dev/null differ diff --git a/digilines/textures/_d_.png b/digilines/textures/_d_.png deleted file mode 100644 index 9a0e3ed..0000000 Binary files a/digilines/textures/_d_.png and /dev/null differ diff --git a/digilines/textures/_dl.png b/digilines/textures/_dl.png deleted file mode 100644 index 72184ad..0000000 Binary files a/digilines/textures/_dl.png and /dev/null differ diff --git a/digilines/textures/_dt.png b/digilines/textures/_dt.png deleted file mode 100644 index 61c1e4a..0000000 Binary files a/digilines/textures/_dt.png and /dev/null differ diff --git a/digilines/textures/_dv.png b/digilines/textures/_dv.png deleted file mode 100644 index 996d7cd..0000000 Binary files a/digilines/textures/_dv.png and /dev/null differ diff --git a/digilines/textures/_e.png b/digilines/textures/_e.png deleted file mode 100644 index 29e32e6..0000000 Binary files a/digilines/textures/_e.png and /dev/null differ diff --git a/digilines/textures/_e_.png b/digilines/textures/_e_.png deleted file mode 100644 index c7f19c1..0000000 Binary files a/digilines/textures/_e_.png and /dev/null differ diff --git a/digilines/textures/_eq.png b/digilines/textures/_eq.png deleted file mode 100644 index daf8424..0000000 Binary files a/digilines/textures/_eq.png and /dev/null differ diff --git a/digilines/textures/_ex.png b/digilines/textures/_ex.png deleted file mode 100644 index b5da8e9..0000000 Binary files a/digilines/textures/_ex.png and /dev/null differ diff --git a/digilines/textures/_f.png b/digilines/textures/_f.png deleted file mode 100644 index 6835912..0000000 Binary files a/digilines/textures/_f.png and /dev/null differ diff --git a/digilines/textures/_f_.png b/digilines/textures/_f_.png deleted file mode 100644 index 3698ed2..0000000 Binary files a/digilines/textures/_f_.png and /dev/null differ diff --git a/digilines/textures/_g.png b/digilines/textures/_g.png deleted file mode 100644 index 5a85cde..0000000 Binary files a/digilines/textures/_g.png and /dev/null differ diff --git a/digilines/textures/_g_.png b/digilines/textures/_g_.png deleted file mode 100644 index cc7bbc5..0000000 Binary files a/digilines/textures/_g_.png and /dev/null differ diff --git a/digilines/textures/_gt.png b/digilines/textures/_gt.png deleted file mode 100644 index f30855a..0000000 Binary files a/digilines/textures/_gt.png and /dev/null differ diff --git a/digilines/textures/_h.png b/digilines/textures/_h.png deleted file mode 100644 index 1a66a9e..0000000 Binary files a/digilines/textures/_h.png and /dev/null differ diff --git a/digilines/textures/_h_.png b/digilines/textures/_h_.png deleted file mode 100644 index 87beafc..0000000 Binary files a/digilines/textures/_h_.png and /dev/null differ diff --git a/digilines/textures/_ha.png b/digilines/textures/_ha.png deleted file mode 100644 index 4618ced..0000000 Binary files a/digilines/textures/_ha.png and /dev/null differ diff --git a/digilines/textures/_hs.png b/digilines/textures/_hs.png deleted file mode 100644 index 6f12bec..0000000 Binary files a/digilines/textures/_hs.png and /dev/null differ diff --git a/digilines/textures/_i.png b/digilines/textures/_i.png deleted file mode 100644 index f001142..0000000 Binary files a/digilines/textures/_i.png and /dev/null differ diff --git a/digilines/textures/_i_.png b/digilines/textures/_i_.png deleted file mode 100644 index fc658b8..0000000 Binary files a/digilines/textures/_i_.png and /dev/null differ diff --git a/digilines/textures/_j.png b/digilines/textures/_j.png deleted file mode 100644 index 87d2f26..0000000 Binary files a/digilines/textures/_j.png and /dev/null differ diff --git a/digilines/textures/_j_.png b/digilines/textures/_j_.png deleted file mode 100644 index c0d9ac2..0000000 Binary files a/digilines/textures/_j_.png and /dev/null differ diff --git a/digilines/textures/_k.png b/digilines/textures/_k.png deleted file mode 100644 index 34f9336..0000000 Binary files a/digilines/textures/_k.png and /dev/null differ diff --git a/digilines/textures/_k_.png b/digilines/textures/_k_.png deleted file mode 100644 index 86b623d..0000000 Binary files a/digilines/textures/_k_.png and /dev/null differ diff --git a/digilines/textures/_l.png b/digilines/textures/_l.png deleted file mode 100644 index defe7ec..0000000 Binary files a/digilines/textures/_l.png and /dev/null differ diff --git a/digilines/textures/_l_.png b/digilines/textures/_l_.png deleted file mode 100644 index 3fe1de2..0000000 Binary files a/digilines/textures/_l_.png and /dev/null differ diff --git a/digilines/textures/_lt.png b/digilines/textures/_lt.png deleted file mode 100644 index ec7219d..0000000 Binary files a/digilines/textures/_lt.png and /dev/null differ diff --git a/digilines/textures/_m.png b/digilines/textures/_m.png deleted file mode 100644 index e0fe039..0000000 Binary files a/digilines/textures/_m.png and /dev/null differ diff --git a/digilines/textures/_m_.png b/digilines/textures/_m_.png deleted file mode 100644 index 9164da6..0000000 Binary files a/digilines/textures/_m_.png and /dev/null differ diff --git a/digilines/textures/_mn.png b/digilines/textures/_mn.png deleted file mode 100644 index 935a2fe..0000000 Binary files a/digilines/textures/_mn.png and /dev/null differ diff --git a/digilines/textures/_n.png b/digilines/textures/_n.png deleted file mode 100644 index ac10fd9..0000000 Binary files a/digilines/textures/_n.png and /dev/null differ diff --git a/digilines/textures/_n_.png b/digilines/textures/_n_.png deleted file mode 100644 index d4355c1..0000000 Binary files a/digilines/textures/_n_.png and /dev/null differ diff --git a/digilines/textures/_o.png b/digilines/textures/_o.png deleted file mode 100644 index 080e99d..0000000 Binary files a/digilines/textures/_o.png and /dev/null differ diff --git a/digilines/textures/_o_.png b/digilines/textures/_o_.png deleted file mode 100644 index 2d19051..0000000 Binary files a/digilines/textures/_o_.png and /dev/null differ diff --git a/digilines/textures/_p.png b/digilines/textures/_p.png deleted file mode 100644 index 3050959..0000000 Binary files a/digilines/textures/_p.png and /dev/null differ diff --git a/digilines/textures/_p_.png b/digilines/textures/_p_.png deleted file mode 100644 index 0cca011..0000000 Binary files a/digilines/textures/_p_.png and /dev/null differ diff --git a/digilines/textures/_pr.png b/digilines/textures/_pr.png deleted file mode 100644 index b835141..0000000 Binary files a/digilines/textures/_pr.png and /dev/null differ diff --git a/digilines/textures/_ps.png b/digilines/textures/_ps.png deleted file mode 100644 index 1f4b5c1..0000000 Binary files a/digilines/textures/_ps.png and /dev/null differ diff --git a/digilines/textures/_q.png b/digilines/textures/_q.png deleted file mode 100644 index 945b6cf..0000000 Binary files a/digilines/textures/_q.png and /dev/null differ diff --git a/digilines/textures/_q_.png b/digilines/textures/_q_.png deleted file mode 100644 index f3bf455..0000000 Binary files a/digilines/textures/_q_.png and /dev/null differ diff --git a/digilines/textures/_qo.png b/digilines/textures/_qo.png deleted file mode 100644 index 5d261e3..0000000 Binary files a/digilines/textures/_qo.png and /dev/null differ diff --git a/digilines/textures/_qu.png b/digilines/textures/_qu.png deleted file mode 100644 index 5eb597a..0000000 Binary files a/digilines/textures/_qu.png and /dev/null differ diff --git a/digilines/textures/_r.png b/digilines/textures/_r.png deleted file mode 100644 index 39e9fce..0000000 Binary files a/digilines/textures/_r.png and /dev/null differ diff --git a/digilines/textures/_r_.png b/digilines/textures/_r_.png deleted file mode 100644 index 6c71c1e..0000000 Binary files a/digilines/textures/_r_.png and /dev/null differ diff --git a/digilines/textures/_re.png b/digilines/textures/_re.png deleted file mode 100644 index 1614837..0000000 Binary files a/digilines/textures/_re.png and /dev/null differ diff --git a/digilines/textures/_s.png b/digilines/textures/_s.png deleted file mode 100644 index a0ada1a..0000000 Binary files a/digilines/textures/_s.png and /dev/null differ diff --git a/digilines/textures/_s_.png b/digilines/textures/_s_.png deleted file mode 100644 index 9b018bb..0000000 Binary files a/digilines/textures/_s_.png and /dev/null differ diff --git a/digilines/textures/_sl.png b/digilines/textures/_sl.png deleted file mode 100644 index 08c9547..0000000 Binary files a/digilines/textures/_sl.png and /dev/null differ diff --git a/digilines/textures/_sm.png b/digilines/textures/_sm.png deleted file mode 100644 index 385c64f..0000000 Binary files a/digilines/textures/_sm.png and /dev/null differ diff --git a/digilines/textures/_sp.png b/digilines/textures/_sp.png deleted file mode 100644 index 4f38a35..0000000 Binary files a/digilines/textures/_sp.png and /dev/null differ diff --git a/digilines/textures/_sr.png b/digilines/textures/_sr.png deleted file mode 100644 index bc9c0a2..0000000 Binary files a/digilines/textures/_sr.png and /dev/null differ diff --git a/digilines/textures/_t.png b/digilines/textures/_t.png deleted file mode 100644 index c55731a..0000000 Binary files a/digilines/textures/_t.png and /dev/null differ diff --git a/digilines/textures/_t_.png b/digilines/textures/_t_.png deleted file mode 100644 index 773e666..0000000 Binary files a/digilines/textures/_t_.png and /dev/null differ diff --git a/digilines/textures/_tl.png b/digilines/textures/_tl.png deleted file mode 100644 index 059fe68..0000000 Binary files a/digilines/textures/_tl.png and /dev/null differ diff --git a/digilines/textures/_u.png b/digilines/textures/_u.png deleted file mode 100644 index 98bf8e6..0000000 Binary files a/digilines/textures/_u.png and /dev/null differ diff --git a/digilines/textures/_u_.png b/digilines/textures/_u_.png deleted file mode 100644 index 35ce915..0000000 Binary files a/digilines/textures/_u_.png and /dev/null differ diff --git a/digilines/textures/_un.png b/digilines/textures/_un.png deleted file mode 100644 index 01f547a..0000000 Binary files a/digilines/textures/_un.png and /dev/null differ diff --git a/digilines/textures/_v.png b/digilines/textures/_v.png deleted file mode 100644 index b692d11..0000000 Binary files a/digilines/textures/_v.png and /dev/null differ diff --git a/digilines/textures/_v_.png b/digilines/textures/_v_.png deleted file mode 100644 index 8049771..0000000 Binary files a/digilines/textures/_v_.png and /dev/null differ diff --git a/digilines/textures/_vb.png b/digilines/textures/_vb.png deleted file mode 100644 index 7fed7dc..0000000 Binary files a/digilines/textures/_vb.png and /dev/null differ diff --git a/digilines/textures/_w.png b/digilines/textures/_w.png deleted file mode 100644 index 6a58b07..0000000 Binary files a/digilines/textures/_w.png and /dev/null differ diff --git a/digilines/textures/_w_.png b/digilines/textures/_w_.png deleted file mode 100644 index 64904de..0000000 Binary files a/digilines/textures/_w_.png and /dev/null differ diff --git a/digilines/textures/_x.png b/digilines/textures/_x.png deleted file mode 100644 index b769e13..0000000 Binary files a/digilines/textures/_x.png and /dev/null differ diff --git a/digilines/textures/_x_.png b/digilines/textures/_x_.png deleted file mode 100644 index 2f6d067..0000000 Binary files a/digilines/textures/_x_.png and /dev/null differ diff --git a/digilines/textures/_y.png b/digilines/textures/_y.png deleted file mode 100644 index 777b55e..0000000 Binary files a/digilines/textures/_y.png and /dev/null differ diff --git a/digilines/textures/_y_.png b/digilines/textures/_y_.png deleted file mode 100644 index 0c40de9..0000000 Binary files a/digilines/textures/_y_.png and /dev/null differ diff --git a/digilines/textures/_z.png b/digilines/textures/_z.png deleted file mode 100644 index ae010fe..0000000 Binary files a/digilines/textures/_z.png and /dev/null differ diff --git a/digilines/textures/_z_.png b/digilines/textures/_z_.png deleted file mode 100644 index 1c3e053..0000000 Binary files a/digilines/textures/_z_.png and /dev/null differ diff --git a/digilines/textures/digiline_std.png b/digilines/textures/digiline_std.png deleted file mode 100644 index 721797c..0000000 Binary files a/digilines/textures/digiline_std.png and /dev/null differ diff --git a/digilines/textures/digiline_std_bump.png b/digilines/textures/digiline_std_bump.png deleted file mode 100644 index 068a4a9..0000000 Binary files a/digilines/textures/digiline_std_bump.png and /dev/null differ diff --git a/digilines/textures/digiline_std_inv.png b/digilines/textures/digiline_std_inv.png deleted file mode 100644 index f66f6c7..0000000 Binary files a/digilines/textures/digiline_std_inv.png and /dev/null differ diff --git a/digilines/textures/digiline_std_vertical.png b/digilines/textures/digiline_std_vertical.png deleted file mode 100644 index 1de0ead..0000000 Binary files a/digilines/textures/digiline_std_vertical.png and /dev/null differ diff --git a/digilines/textures/digilines_lightsensor.png b/digilines/textures/digilines_lightsensor.png deleted file mode 100644 index aa88495..0000000 Binary files a/digilines/textures/digilines_lightsensor.png and /dev/null differ diff --git a/digilines/textures/digilines_rtc.png b/digilines/textures/digilines_rtc.png deleted file mode 100644 index a7b1d84..0000000 Binary files a/digilines/textures/digilines_rtc.png and /dev/null differ diff --git a/digilines/textures/lcd_anyside.png b/digilines/textures/lcd_anyside.png deleted file mode 100644 index fe88e8d..0000000 Binary files a/digilines/textures/lcd_anyside.png and /dev/null differ diff --git a/digilines/textures/lcd_lcd.png b/digilines/textures/lcd_lcd.png deleted file mode 100644 index c959fa1..0000000 Binary files a/digilines/textures/lcd_lcd.png and /dev/null differ diff --git a/digilines/util.lua b/digilines/util.lua deleted file mode 100644 index ac15fab..0000000 --- a/digilines/util.lua +++ /dev/null @@ -1,156 +0,0 @@ -function digilines.addPosRule(p, r) - return {x = p.x + r.x, y = p.y + r.y, z = p.z + r.z} -end - -function digilines.cmpPos(p1, p2) - return (p1.x == p2.x and p1.y == p2.y and p1.z == p2.z) -end - ---Rules rotation Functions: -function digilines.rotate_rules_right(rules) - local nr={} - for i, rule in ipairs(rules) do - nr[i]={} - nr[i].z=rule.x - nr[i].x=-rule.z - nr[i].y=rule.y - end - return nr -end - -function digilines.rotate_rules_left(rules) - local nr={} - for i, rule in ipairs(rules) do - nr[i]={} - nr[i].z=-rule.x - nr[i].x=rule.z - nr[i].y=rule.y - end - return nr -end - -function digilines.rotate_rules_down(rules) - local nr={} - for i, rule in ipairs(rules) do - nr[i]={} - nr[i].y=rule.x - nr[i].x=-rule.y - nr[i].z=rule.z - end - return nr -end - -function digilines.rotate_rules_up(rules) - local nr={} - for i, rule in ipairs(rules) do - nr[i]={} - nr[i].y=-rule.x - nr[i].x=rule.y - nr[i].z=rule.z - end - return nr -end - -function digilines.tablecopy(table) -- deep table copy - if type(table) ~= "table" then return table end -- no need to copy - local newtable = {} - - for idx, item in pairs(table) do - if type(item) == "table" then - newtable[idx] = digilines.tablecopy(item) - else - newtable[idx] = item - end - end - - return newtable -end - - - --- VoxelManipulator-based node access functions: - --- Maps from a hashed mapblock position (as returned by hash_blockpos) to a --- table. --- --- Contents of the table are: --- “va” → the VoxelArea --- “data” → the data array --- “param1” → the param1 array --- “param2” → the param2 array --- --- Nil if no bulk-VM operation is in progress. -local vm_cache = nil - --- Starts a bulk-VoxelManipulator operation. --- --- During a bulk-VoxelManipulator operation, calls to get_node_force operate --- directly on VM-loaded arrays, which should be faster for reading many nodes --- in rapid succession. However, the cache must be flushed with vm_end once the --- scan is finished, to avoid using stale data in future. -function digilines.vm_begin() - vm_cache = {} -end - --- Ends a bulk-VoxelManipulator operation, freeing the cached data. -function digilines.vm_end() - vm_cache = nil -end - --- The dimension of a mapblock in nodes. -local MAPBLOCKSIZE = 16 - --- Converts a node position into a hash of a mapblock position. -local function vm_hash_blockpos(pos) - return minetest.hash_node_position({ - x = math.floor(pos.x / MAPBLOCKSIZE), - y = math.floor(pos.y / MAPBLOCKSIZE), - z = math.floor(pos.z / MAPBLOCKSIZE) - }) -end - --- Gets the cache entry covering a position, populating it if necessary. -local function vm_get_or_create_entry(pos) - local hash = vm_hash_blockpos(pos) - local tbl = vm_cache[hash] - if not tbl then - local vm = minetest.get_voxel_manip(pos, pos) - local min_pos, max_pos = vm:get_emerged_area() - local va = VoxelArea:new{MinEdge = min_pos, MaxEdge = max_pos} - tbl = {va = va, data = vm:get_data(), param1 = vm:get_light_data(), param2 = vm:get_param2_data()} - vm_cache[hash] = tbl - end - return tbl -end - --- Gets the node at a position during a bulk-VoxelManipulator operation. -local function vm_get_node(pos) - local tbl = vm_get_or_create_entry(pos) - local index = tbl.va:indexp(pos) - local node_value = tbl.data[index] - local node_param1 = tbl.param1[index] - local node_param2 = tbl.param2[index] - return {name = minetest.get_name_from_content_id(node_value), param1 = node_param1, param2 = node_param2} -end - --- Gets the node at a given position, regardless of whether it is loaded or --- not. --- --- Outside a bulk-VoxelManipulator operation, if the mapblock is not loaded, it --- is pulled into the server’s main map data cache and then accessed from --- there. --- --- Inside a bulk-VoxelManipulator operation, the operation’s VM cache is used. -function digilines.get_node_force(pos) - if vm_cache then - return vm_get_node(pos) - end - local node = minetest.get_node(pos) - if node.name == "ignore" then - -- Node is not currently loaded; use a VoxelManipulator to prime - -- the mapblock cache and try again. - minetest.get_voxel_manip(pos, pos) - node = minetest.get_node(pos) - end - return node -end diff --git a/digilines/wire_std.lua b/digilines/wire_std.lua deleted file mode 100644 index 177e795..0000000 --- a/digilines/wire_std.lua +++ /dev/null @@ -1,121 +0,0 @@ --- naming scheme: wire:(xp)(zp)(xm)(zm)_on/off --- The conditions in brackets define whether there is a digiline at that place or not --- 1 = there is one; 0 = there is none --- y always means y+ - -local box_center = {-1/16, -.5, -1/16, 1/16, -.5+1/16, 1/16} -local box_bump1 = { -2/16, -8/16, -2/16, 2/16, -13/32, 2/16 } -local box_bump2 = { -3/32, -13/32, -3/32, 3/32, -12/32, 3/32 } - -local box_xp = {1/16, -.5, -1/16, 8/16, -.5+1/16, 1/16} -local box_zp = {-1/16, -.5, 1/16, 1/16, -.5+1/16, 8/16} -local box_xm = {-8/16, -.5, -1/16, -1/16, -.5+1/16, 1/16} -local box_zm = {-1/16, -.5, -8/16, 1/16, -.5+1/16, -1/16} - -local box_xpy = {.5-1/16, -.5+1/16, -1/16, .5, .4999+1/16, 1/16} -local box_zpy = {-1/16, -.5+1/16, .5-1/16, 1/16, .4999+1/16, .5} -local box_xmy = {-.5, -.5+1/16, -1/16, -.5+1/16, .4999+1/16, 1/16} -local box_zmy = {-1/16, -.5+1/16, -.5, 1/16, .4999+1/16, -.5+1/16} - -for xp=0, 1 do -for zp=0, 1 do -for xm=0, 1 do -for zm=0, 1 do -for xpy=0, 1 do -for zpy=0, 1 do -for xmy=0, 1 do -for zmy=0, 1 do - if (xpy == 1 and xp == 0) or (zpy == 1 and zp == 0) - or (xmy == 1 and xm == 0) or (zmy == 1 and zm == 0) then break end - - local groups - local nodeid = tostring(xp )..tostring(zp )..tostring(xm )..tostring(zm ).. - tostring(xpy)..tostring(zpy)..tostring(xmy)..tostring(zmy) - - local wiredesc - - if nodeid == "00000000" then - groups = {dig_immediate = 3} - wiredesc = "Digiline" - else - groups = {dig_immediate = 3, not_in_creative_inventory = 1} - end - - local nodebox = {} - local adjx = false - local adjz = false - if xp == 1 then table.insert(nodebox, box_xp) adjx = true end - if zp == 1 then table.insert(nodebox, box_zp) adjz = true end - if xm == 1 then table.insert(nodebox, box_xm) adjx = true end - if zm == 1 then table.insert(nodebox, box_zm) adjz = true end - if xpy == 1 then table.insert(nodebox, box_xpy) end - if zpy == 1 then table.insert(nodebox, box_zpy) end - if xmy == 1 then table.insert(nodebox, box_xmy) end - if zmy == 1 then table.insert(nodebox, box_zmy) end - - local tiles - if adjx and adjz and (xp + zp + xm + zm > 2) then - table.insert(nodebox, box_bump1) - table.insert(nodebox, box_bump2) - tiles = { - "digiline_std_bump.png", - "digiline_std_bump.png", - "digiline_std_vertical.png", - "digiline_std_vertical.png", - "digiline_std_vertical.png", - "digiline_std_vertical.png" - } - else - table.insert(nodebox, box_center) - tiles = { - "digiline_std.png", - "digiline_std.png", - "digiline_std_vertical.png", - "digiline_std_vertical.png", - "digiline_std_vertical.png", - "digiline_std_vertical.png" - } - end - - if nodeid == "00000000" then - nodebox = {-8/16, -.5, -1/16, 8/16, -.5+1/16, 1/16} - end - - minetest.register_node("digilines:wire_std_"..nodeid, { - description = wiredesc, - drawtype = "nodebox", - tiles = tiles, - inventory_image = "digiline_std_inv.png", - wield_image = "digiline_std_inv.png", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - digiline = - { - wire = - { - basename = "digilines:wire_std_", - use_autoconnect = true - } - }, - selection_box = { - type = "fixed", - fixed = {-.5, -.5, -.5, .5, -.5+1/16, .5} - }, - node_box = { - type = "fixed", - fixed = nodebox - }, - groups = groups, - walkable = false, - stack_max = 99, - drop = "digilines:wire_std_00000000" - }) -end -end -end -end -end -end -end -end diff --git a/digilines/wires_common.lua b/digilines/wires_common.lua deleted file mode 100644 index 8ac1d29..0000000 --- a/digilines/wires_common.lua +++ /dev/null @@ -1,88 +0,0 @@ -minetest.register_on_placenode(function(pos, node) - if minetest.registered_nodes[node.name].digiline then - digilines.update_autoconnect(pos) - end -end) - -minetest.register_on_dignode(function(pos, node) - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].digiline then --- need to make sure that node exists (unknown nodes!) - digilines.update_autoconnect(pos) - end -end) - -function digilines.update_autoconnect(pos, secondcall) - local xppos = {x=pos.x+1, y=pos.y, z=pos.z} - local zppos = {x=pos.x, y=pos.y, z=pos.z+1} - local xmpos = {x=pos.x-1, y=pos.y, z=pos.z} - local zmpos = {x=pos.x, y=pos.y, z=pos.z-1} - local xpympos = {x=pos.x+1, y=pos.y-1, z=pos.z} - local zpympos = {x=pos.x, y=pos.y-1, z=pos.z+1} - local xmympos = {x=pos.x-1, y=pos.y-1, z=pos.z} - local zmympos = {x=pos.x, y=pos.y-1, z=pos.z-1} - local xpypos = {x=pos.x+1, y=pos.y+1, z=pos.z} - local zpypos = {x=pos.x, y=pos.y+1, z=pos.z+1} - local xmypos = {x=pos.x-1, y=pos.y+1, z=pos.z} - local zmypos = {x=pos.x, y=pos.y+1, z=pos.z-1} - - if secondcall == nil then - digilines.update_autoconnect(xppos, true) - digilines.update_autoconnect(zppos, true) - digilines.update_autoconnect(xmpos, true) - digilines.update_autoconnect(zmpos, true) - - digilines.update_autoconnect(xpypos, true) - digilines.update_autoconnect(zpypos, true) - digilines.update_autoconnect(xmypos, true) - digilines.update_autoconnect(zmypos, true) - - digilines.update_autoconnect(xpympos, true) - digilines.update_autoconnect(zpympos, true) - digilines.update_autoconnect(xmympos, true) - digilines.update_autoconnect(zmympos, true) - end - - local def = minetest.registered_nodes[minetest.get_node(pos).name] - local digilinespec = def and def.digiline - if not (digilinespec and digilinespec.wire and - digilinespec.wire.use_autoconnect) then - return nil - end - - local zmg = digilines.rules_link_anydir(pos, zmpos) - local zmymg = digilines.rules_link_anydir(pos, zmympos) - local xmg = digilines.rules_link_anydir(pos, xmpos) - local xmymg = digilines.rules_link_anydir(pos, xmympos) - local zpg = digilines.rules_link_anydir(pos, zppos) - local zpymg = digilines.rules_link_anydir(pos, zpympos) - local xpg = digilines.rules_link_anydir(pos, xppos) - local xpymg = digilines.rules_link_anydir(pos, xpympos) - - - local xpyg = digilines.rules_link_anydir(pos, xpypos) - local zpyg = digilines.rules_link_anydir(pos, zpypos) - local xmyg = digilines.rules_link_anydir(pos, xmypos) - local zmyg = digilines.rules_link_anydir(pos, zmypos) - - local zm, xm, zp, xp, xpy, zpy, xmy, zmy - if zmg or zmymg then zm = 1 else zm = 0 end - if xmg or xmymg then xm = 1 else xm = 0 end - if zpg or zpymg then zp = 1 else zp = 0 end - if xpg or xpymg then xp = 1 else xp = 0 end - - if xpyg then xpy = 1 else xpy = 0 end - if zpyg then zpy = 1 else zpy = 0 end - if xmyg then xmy = 1 else xmy = 0 end - if zmyg then zmy = 1 else zmy = 0 end - - if xpy == 1 then xp = 1 end - if zpy == 1 then zp = 1 end - if xmy == 1 then xm = 1 end - if zmy == 1 then zm = 1 end - - local nodeid = tostring(xp )..tostring(zp )..tostring(xm )..tostring(zm ).. - tostring(xpy)..tostring(zpy)..tostring(xmy)..tostring(zmy) - - - minetest.set_node(pos, {name = digilinespec.wire.basename..nodeid}) -end diff --git a/mesecons/COPYING.txt b/mesecons/COPYING.txt deleted file mode 100644 index 61bf7e2..0000000 --- a/mesecons/COPYING.txt +++ /dev/null @@ -1,30 +0,0 @@ -The Mesecons Mod for Minetest is - Copyright (C) 2011-2016 Mesecons Mod Developer Team and contributors - -See the version control system log for information about other authors. - -License of source code ----------------------- -Copyright (C) 2011-2016 Mesecons Mod Developer Team and contributors - -This program is free software; you can redistribute the Mesecons Mod and/or -modify it under the terms of the GNU Lesser General Public License version 3 -published by the Free Software Foundation. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with this library; if not, write to the -Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301, USA. - -License of media (textures, sounds and documentation) ------------------------------------------------------ -Copyright (C) 2011-2016 Mesecons Mod Developer Team and contributors - -All textures, sounds and documentation files are licensed under the -Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) -http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mesecons/LICENSE.txt b/mesecons/LICENSE.txt deleted file mode 100644 index 0d2fd18..0000000 --- a/mesecons/LICENSE.txt +++ /dev/null @@ -1,532 +0,0 @@ -The LGPLv3 applies to all code in this project. -The CC-BY-SA-3.0 license applies to textures and any other content in this project which is not source code. - -================================================================= - -GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - -================================================================= - -Creative Commons Legal Code - -Attribution-ShareAlike 3.0 Unported - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR - DAMAGES RESULTING FROM ITS USE. - -License - -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE -COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY -COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS -AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. - -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY -BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND -CONDITIONS. - -1. Definitions - - a. "Adaptation" means a work based upon the Work, or upon the Work and - other pre-existing works, such as a translation, adaptation, - derivative work, arrangement of music or other alterations of a - literary or artistic work, or phonogram or performance and includes - cinematographic adaptations or any other form in which the Work may be - recast, transformed, or adapted including in any form recognizably - derived from the original, except that a work that constitutes a - Collection will not be considered an Adaptation for the purpose of - this License. For the avoidance of doubt, where the Work is a musical - work, performance or phonogram, the synchronization of the Work in - timed-relation with a moving image ("synching") will be considered an - Adaptation for the purpose of this License. - b. "Collection" means a collection of literary or artistic works, such as - encyclopedias and anthologies, or performances, phonograms or - broadcasts, or other works or subject matter other than works listed - in Section 1(f) below, which, by reason of the selection and - arrangement of their contents, constitute intellectual creations, in - which the Work is included in its entirety in unmodified form along - with one or more other contributions, each constituting separate and - independent works in themselves, which together are assembled into a - collective whole. A work that constitutes a Collection will not be - considered an Adaptation (as defined below) for the purposes of this - License. - c. "Creative Commons Compatible License" means a license that is listed - at http://creativecommons.org/compatiblelicenses that has been - approved by Creative Commons as being essentially equivalent to this - License, including, at a minimum, because that license: (i) contains - terms that have the same purpose, meaning and effect as the License - Elements of this License; and, (ii) explicitly permits the relicensing - of adaptations of works made available under that license under this - License or a Creative Commons jurisdiction license with the same - License Elements as this License. - d. "Distribute" means to make available to the public the original and - copies of the Work or Adaptation, as appropriate, through sale or - other transfer of ownership. - e. "License Elements" means the following high-level license attributes - as selected by Licensor and indicated in the title of this License: - Attribution, ShareAlike. - f. "Licensor" means the individual, individuals, entity or entities that - offer(s) the Work under the terms of this License. - g. "Original Author" means, in the case of a literary or artistic work, - the individual, individuals, entity or entities who created the Work - or if no individual or entity can be identified, the publisher; and in - addition (i) in the case of a performance the actors, singers, - musicians, dancers, and other persons who act, sing, deliver, declaim, - play in, interpret or otherwise perform literary or artistic works or - expressions of folklore; (ii) in the case of a phonogram the producer - being the person or legal entity who first fixes the sounds of a - performance or other sounds; and, (iii) in the case of broadcasts, the - organization that transmits the broadcast. - h. "Work" means the literary and/or artistic work offered under the terms - of this License including without limitation any production in the - literary, scientific and artistic domain, whatever may be the mode or - form of its expression including digital form, such as a book, - pamphlet and other writing; a lecture, address, sermon or other work - of the same nature; a dramatic or dramatico-musical work; a - choreographic work or entertainment in dumb show; a musical - composition with or without words; a cinematographic work to which are - assimilated works expressed by a process analogous to cinematography; - a work of drawing, painting, architecture, sculpture, engraving or - lithography; a photographic work to which are assimilated works - expressed by a process analogous to photography; a work of applied - art; an illustration, map, plan, sketch or three-dimensional work - relative to geography, topography, architecture or science; a - performance; a broadcast; a phonogram; a compilation of data to the - extent it is protected as a copyrightable work; or a work performed by - a variety or circus performer to the extent it is not otherwise - considered a literary or artistic work. - i. "You" means an individual or entity exercising rights under this - License who has not previously violated the terms of this License with - respect to the Work, or who has received express permission from the - Licensor to exercise rights under this License despite a previous - violation. - j. "Publicly Perform" means to perform public recitations of the Work and - to communicate to the public those public recitations, by any means or - process, including by wire or wireless means or public digital - performances; to make available to the public Works in such a way that - members of the public may access these Works from a place and at a - place individually chosen by them; to perform the Work to the public - by any means or process and the communication to the public of the - performances of the Work, including by public digital performance; to - broadcast and rebroadcast the Work by any means including signs, - sounds or images. - k. "Reproduce" means to make copies of the Work by any means including - without limitation by sound or visual recordings and the right of - fixation and reproducing fixations of the Work, including storage of a - protected performance or phonogram in digital form or other electronic - medium. - -2. Fair Dealing Rights. Nothing in this License is intended to reduce, -limit, or restrict any uses free from copyright or rights arising from -limitations or exceptions that are provided for in connection with the -copyright protection under copyright law or other applicable laws. - -3. License Grant. Subject to the terms and conditions of this License, -Licensor hereby grants You a worldwide, royalty-free, non-exclusive, -perpetual (for the duration of the applicable copyright) license to -exercise the rights in the Work as stated below: - - a. to Reproduce the Work, to incorporate the Work into one or more - Collections, and to Reproduce the Work as incorporated in the - Collections; - b. to create and Reproduce Adaptations provided that any such Adaptation, - including any translation in any medium, takes reasonable steps to - clearly label, demarcate or otherwise identify that changes were made - to the original Work. For example, a translation could be marked "The - original work was translated from English to Spanish," or a - modification could indicate "The original work has been modified."; - c. to Distribute and Publicly Perform the Work including as incorporated - in Collections; and, - d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: - - i. Non-waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme cannot be waived, the Licensor - reserves the exclusive right to collect such royalties for any - exercise by You of the rights granted under this License; - ii. Waivable Compulsory License Schemes. In those jurisdictions in - which the right to collect royalties through any statutory or - compulsory licensing scheme can be waived, the Licensor waives the - exclusive right to collect such royalties for any exercise by You - of the rights granted under this License; and, - iii. Voluntary License Schemes. The Licensor waives the right to - collect royalties, whether individually or, in the event that the - Licensor is a member of a collecting society that administers - voluntary licensing schemes, via that society, from any exercise - by You of the rights granted under this License. - -The above rights may be exercised in all media and formats whether now -known or hereafter devised. The above rights include the right to make -such modifications as are technically necessary to exercise the rights in -other media and formats. Subject to Section 8(f), all rights not expressly -granted by Licensor are hereby reserved. - -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: - - a. You may Distribute or Publicly Perform the Work only under the terms - of this License. You must include a copy of, or the Uniform Resource - Identifier (URI) for, this License with every copy of the Work You - Distribute or Publicly Perform. You may not offer or impose any terms - on the Work that restrict the terms of this License or the ability of - the recipient of the Work to exercise the rights granted to that - recipient under the terms of the License. You may not sublicense the - Work. You must keep intact all notices that refer to this License and - to the disclaimer of warranties with every copy of the Work You - Distribute or Publicly Perform. When You Distribute or Publicly - Perform the Work, You may not impose any effective technological - measures on the Work that restrict the ability of a recipient of the - Work from You to exercise the rights granted to that recipient under - the terms of the License. This Section 4(a) applies to the Work as - incorporated in a Collection, but this does not require the Collection - apart from the Work itself to be made subject to the terms of this - License. If You create a Collection, upon notice from any Licensor You - must, to the extent practicable, remove from the Collection any credit - as required by Section 4(c), as requested. If You create an - Adaptation, upon notice from any Licensor You must, to the extent - practicable, remove from the Adaptation any credit as required by - Section 4(c), as requested. - b. You may Distribute or Publicly Perform an Adaptation only under the - terms of: (i) this License; (ii) a later version of this License with - the same License Elements as this License; (iii) a Creative Commons - jurisdiction license (either this or a later license version) that - contains the same License Elements as this License (e.g., - Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible - License. If you license the Adaptation under one of the licenses - mentioned in (iv), you must comply with the terms of that license. If - you license the Adaptation under the terms of any of the licenses - mentioned in (i), (ii) or (iii) (the "Applicable License"), you must - comply with the terms of the Applicable License generally and the - following provisions: (I) You must include a copy of, or the URI for, - the Applicable License with every copy of each Adaptation You - Distribute or Publicly Perform; (II) You may not offer or impose any - terms on the Adaptation that restrict the terms of the Applicable - License or the ability of the recipient of the Adaptation to exercise - the rights granted to that recipient under the terms of the Applicable - License; (III) You must keep intact all notices that refer to the - Applicable License and to the disclaimer of warranties with every copy - of the Work as included in the Adaptation You Distribute or Publicly - Perform; (IV) when You Distribute or Publicly Perform the Adaptation, - You may not impose any effective technological measures on the - Adaptation that restrict the ability of a recipient of the Adaptation - from You to exercise the rights granted to that recipient under the - terms of the Applicable License. This Section 4(b) applies to the - Adaptation as incorporated in a Collection, but this does not require - the Collection apart from the Adaptation itself to be made subject to - the terms of the Applicable License. - c. If You Distribute, or Publicly Perform the Work or any Adaptations or - Collections, You must, unless a request has been made pursuant to - Section 4(a), keep intact all copyright notices for the Work and - provide, reasonable to the medium or means You are utilizing: (i) the - name of the Original Author (or pseudonym, if applicable) if supplied, - and/or if the Original Author and/or Licensor designate another party - or parties (e.g., a sponsor institute, publishing entity, journal) for - attribution ("Attribution Parties") in Licensor's copyright notice, - terms of service or by other reasonable means, the name of such party - or parties; (ii) the title of the Work if supplied; (iii) to the - extent reasonably practicable, the URI, if any, that Licensor - specifies to be associated with the Work, unless such URI does not - refer to the copyright notice or licensing information for the Work; - and (iv) , consistent with Ssection 3(b), in the case of an - Adaptation, a credit identifying the use of the Work in the Adaptation - (e.g., "French translation of the Work by Original Author," or - "Screenplay based on original Work by Original Author"). The credit - required by this Section 4(c) may be implemented in any reasonable - manner; provided, however, that in the case of a Adaptation or - Collection, at a minimum such credit will appear, if a credit for all - contributing authors of the Adaptation or Collection appears, then as - part of these credits and in a manner at least as prominent as the - credits for the other contributing authors. For the avoidance of - doubt, You may only use the credit required by this Section for the - purpose of attribution in the manner set out above and, by exercising - Your rights under this License, You may not implicitly or explicitly - assert or imply any connection with, sponsorship or endorsement by the - Original Author, Licensor and/or Attribution Parties, as appropriate, - of You or Your use of the Work, without the separate, express prior - written permission of the Original Author, Licensor and/or Attribution - Parties. - d. Except as otherwise agreed in writing by the Licensor or as may be - otherwise permitted by applicable law, if You Reproduce, Distribute or - Publicly Perform the Work either by itself or as part of any - Adaptations or Collections, You must not distort, mutilate, modify or - take other derogatory action in relation to the Work which would be - prejudicial to the Original Author's honor or reputation. Licensor - agrees that in those jurisdictions (e.g. Japan), in which any exercise - of the right granted in Section 3(b) of this License (the right to - make Adaptations) would be deemed to be a distortion, mutilation, - modification or other derogatory action prejudicial to the Original - Author's honor and reputation, the Licensor will waive or not assert, - as appropriate, this Section, to the fullest extent permitted by the - applicable national law, to enable You to reasonably exercise Your - right under Section 3(b) of this License (right to make Adaptations) - but not otherwise. - -5. Representations, Warranties and Disclaimer - -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR -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, MERCHANTIBILITY, -FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF -LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. - -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE -LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR -ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. Termination - - a. This License and the rights granted hereunder will terminate - automatically upon any breach by You of the terms of this License. - Individuals or entities who have received Adaptations or Collections - from You under this License, however, will not have their licenses - terminated provided such individuals or entities remain in full - compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will - survive any termination of this License. - b. Subject to the above terms and conditions, the license granted here is - perpetual (for the duration of the applicable copyright in the Work). - Notwithstanding the above, Licensor reserves the right to release the - Work under different license terms or to stop distributing the Work at - any time; provided, however that any such election will not serve to - withdraw this License (or any other license that has been, or is - required to be, granted under the terms of this License), and this - License will continue in full force and effect unless terminated as - stated above. - -8. Miscellaneous - - a. Each time You Distribute or Publicly Perform the Work or a Collection, - the Licensor offers to the recipient a license to the Work on the same - terms and conditions as the license granted to You under this License. - b. Each time You Distribute or Publicly Perform an Adaptation, Licensor - offers to the recipient a license to the original Work on the same - terms and conditions as the license granted to You under this License. - c. If any provision of this License is invalid or unenforceable under - applicable law, it shall not affect the validity or enforceability of - the remainder of the terms of this License, and without further action - by the parties to this agreement, such provision shall be reformed to - the minimum extent necessary to make such provision valid and - enforceable. - d. No term or provision of this License shall be deemed waived and no - breach consented to unless such waiver or consent shall be in writing - and signed by the party to be charged with such waiver or consent. - e. This License constitutes the entire agreement between the parties with - respect to the Work licensed here. There are no understandings, - agreements or representations with respect to the Work not specified - here. Licensor shall not be bound by any additional provisions that - may appear in any communication from You. This License may not be - modified without the mutual written agreement of the Licensor and You. - f. The rights granted under, and the subject matter referenced, in this - License were drafted utilizing the terminology of the Berne Convention - for the Protection of Literary and Artistic Works (as amended on - September 28, 1979), the Rome Convention of 1961, the WIPO Copyright - Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 - and the Universal Copyright Convention (as revised on July 24, 1971). - These rights and subject matter take effect in the relevant - jurisdiction in which the License terms are sought to be enforced - according to the corresponding provisions of the implementation of - those treaty provisions in the applicable national law. If the - standard suite of rights granted under applicable copyright law - includes additional rights not granted under this License, such - additional rights are deemed to be included in the License; this - License is not intended to restrict the license of any rights under - applicable law. - - -Creative Commons Notice - - Creative Commons is not a party to this License, and makes no warranty - whatsoever in connection with the Work. Creative Commons will not be - liable to You or any party on any legal theory for any damages - whatsoever, including without limitation any general, special, - incidental or consequential damages arising in connection to this - license. Notwithstanding the foregoing two (2) sentences, if Creative - Commons has expressly identified itself as the Licensor hereunder, it - shall have all rights and obligations of Licensor. - - Except for the limited purpose of indicating to the public that the - Work is licensed under the CCPL, Creative Commons does not authorize - the use by either party of the trademark "Creative Commons" or any - related trademark or logo of Creative Commons without the prior - written consent of Creative Commons. Any permitted use will be in - compliance with Creative Commons' then-current trademark usage - guidelines, as may be published on its website or otherwise made - available upon request from time to time. For the avoidance of doubt, - this trademark restriction does not form part of the License. - - Creative Commons may be contacted at http://creativecommons.org/. diff --git a/mesecons/README.md b/mesecons/README.md deleted file mode 100644 index 80cf185..0000000 --- a/mesecons/README.md +++ /dev/null @@ -1,81 +0,0 @@ - ######################################################################## - ## __ __ _____ _____ _____ _____ _____ _ _ _____ ## - ## | \ / | | ___| | ___| | ___| | ___| | _ | | \ | | | ___| ## - ## | \/ | | |___ | |___ | |___ | | | | | | | \| | | |___ ## - ## | |\__/| | | ___| |___ | | ___| | | | | | | | | |___ | ## - ## | | | | | |___ ___| | | |___ | |___ | |_| | | |\ | ___| | ## - ## |_| |_| |_____| |_____| |_____| |_____| |_____| |_| \_| |_____| ## - ## ## - ######################################################################## - -MESECONS by Jeija and contributors - -Mezzee-what? ------------- -[Mesecons](http://mesecons.net/)! They're yellow, they're conductive, and they'll add a whole new dimension to Minetest's gameplay. - -Mesecons is a mod for [Minetest](http://minetest.net/) that implements a ton of items related to digital circuitry, such as wires, buttons, lights, and even programmable controllers. Among other things, there are also pistons, solar panels, pressure plates, and note blocks. - -Mesecons has a similar goal to Redstone in Minecraft, but works in its own way, with different rules and mechanics. - -OK, I want in. --------------- -Go get it! - -[DOWNLOAD IT NOW](https://github.com/minetest-mods/mesecons/archive/master.zip) - -Now go ahead and install it like any other Minetest mod. Don't know how? Check out [the wonderful page about it](https://wiki.minetest.net/Mods) over at the official Minetest Wiki. For your convenience, here's a quick summary: - -1. If Mesecons is still in a ZIP file, extract the folder inside to somewhere on the computer. -2. Make sure that when you open the folder, you can directly find `README.md` in the listing. If you just see another folder, move that folder up one level and delete the old one. -3. Open up the Minetest mods folder - usually `/mods/`. If you see the `minetest` or folder inside of that, that is your mod folder instead. -4. Copy the Mesecons folder into the mods folder. - -Don't like some parts of Mesecons? Open up the Mesecons folder and delete the subfolder containing the mod you don't want. If you didn't want movestones, for example, all you have to do is delete the `mesecons_movestones` folder and they will no longer be available. - -There are no dependencies - it will work right after installing! - -How do I use this thing? ------------------------- -How about a [quick overview video](https://www.youtube.com/watch?v=6kmeQj6iW5k)? - -Or maybe a [comprehensive reference](http://mesecons.net/items.html) is your style? - -An overview for the very newest of new beginners? How does [this one](http://uberi.mesecons.net/projects/MeseconsBasics/index.html) look? - -There is also a [wiki page](https://wiki.minetest.net/Mods/Mesecons) dedicated to this mod. - -Want to get more into building? Why not check out the [Mesecons Laboratory](http://uberi.mesecons.net/), a website dedicated to advanced Mesecons builders? - -Want to contribute to Mesecons itself? Check out the [source code](https://github.com/minetest-mods/mesecons)! - -Who wrote it anyways? ---------------------- -These awesome people made Mesecons possible! - -| Contributor | Contribution | -| --------------- | -------------------------------- | -| Hawk777 | Code for VoxelManip caching | -| Jat15 | Various tweaks. | -| Jeija | **Main developer! Everything.** | -| Jordach | Noteblock sounds. | -| khonkhortistan | Code, recipes, textures. | -| Kotolegokot | Nodeboxes for items. | -| minerd247 | Textures. | -| Nore/Novatux | Code. | -| RealBadAngel | Fixes, improvements. | -| sfan5 | Code, recipes, textures. | -| suzenako | Piston sounds. | -| Uberi/Temperest | Code, textures, documentation. | -| VanessaE | Code, recipes, textures, design. | -| Whiskers75 | Logic gates implementation. | - -There are also a whole bunch of other people helping with everything from code to testing and feedback. Mesecons would also not be possible without their help! - -Alright, how can I use it? --------------------------- -All textures in this project are licensed under the CC-BY-SA 3.0 (Creative Commons Attribution-ShareAlike 3.0 Generic). That means you can distribute and remix them as much as you want to, under the condition that you give credit to the authors and the project, and that if you remix and release them, they must be under the same or similar license to this one. - -All code in this project is licensed under the LGPL version 3 or later. That means you have unlimited freedom to distribute and modify the work however you see fit, provided that if you decide to distribute it or any modified versions of it, you must also use the same license. The LGPL also grants the additional freedom to write extensions for the software and distribute them without the extensions being subject to the terms of the LGPL, although the software itself retains its license. - -No warranty is provided, express or implied, for any part of the project. diff --git a/mesecons/bower.json b/mesecons/bower.json deleted file mode 100644 index 1d94e61..0000000 --- a/mesecons/bower.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "mesecons", - "description": "Mesecons is a mod for Minetest that implements items related to digital circuitry: wires, buttons, lights, and programmable controllers.", - "homepage": "http://mesecons.net", - "authors": "Jeija", - "license": "LGPL-3.0+", - "keywords": [ - "mesecons", - "minetest", - "mod" - ] -} diff --git a/mesecons/documentation.json b/mesecons/documentation.json deleted file mode 100644 index f318501..0000000 --- a/mesecons/documentation.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "Conductors" : { - "Mesecon" : "mesecons_wires/doc/mesecon", - "Insulated Wire" : "mesecons_insulated/doc/insulated", - "T-Junction" : "mesecons_extrawires/doc/tjunction", - "Crossing" : "mesecons_extrawires/doc/crossing", - "Corner" : "mesecons_extrawires/doc/corner", - "Vertical Wire" : "mesecons_extrawires/doc/vertical", - "Mese" : "mesecons_extrawires/doc/mese" - }, - "Receptors" : { - "Power Plant" : "mesecons_powerplant/doc/powerplant", - "Blinky Plant" : "mesecons_blinkyplant/doc/blinkyplant", - "Switch" : "mesecons_switch/doc/switch", - "Object Detector" : "mesecons_detector/doc/objectdetector", - "Node Detector" : "mesecons_detector/doc/nodedetector", - "Wall Lever" : "mesecons_walllever/doc/walllever", - "Pressure Plate" : "mesecons_pressureplates/doc/pressureplate_wood", - "Pressure Plate" : "mesecons_pressureplates/doc/pressureplate_stone", - "Water Turbine" : "mesecons_hydroturbine/doc/waterturbine", - "Solar Panel" : "mesecons_solarpanel/doc/solarpanel", - "Wall Button" : "mesecons_button/doc/button" - }, - "Effectors" : { - "Noteblock" : "mesecons_noteblock/doc/noteblock", - "Lamp" : "mesecons_lamp/doc/lamp", - "Piston" : "mesecons_pistons/doc/piston", - "Sticky Piston" : "mesecons_pistons/doc/piston_sticky", - "Movestone" : "mesecons_movestones/doc/movestone", - "Sticky Movestone" : "mesecons_movestones/doc/movestone_sticky", - "Removestone" : "mesecons_random/doc/removestone", - "Ghoststone" : "mesecons_random/doc/ghoststone", - "Command Block" : "mesecons_commandblock/doc/commandblock", - "Lightstones" : { - "Dark Grey" : "mesecons_lightstone/doc/lightstone_darkgrey", - "Light Grey" : "mesecons_lightstone/doc/lightstone_lightgrey", - "Green" : "mesecons_lightstone/doc/lightstone_green", - "Red" : "mesecons_lightstone/doc/lightstone_red", - "Blue" : "mesecons_lightstone/doc/lightstone_blue", - "Yellow" : "mesecons_lightstone/doc/lightstone_yellow" - } - }, - "Logic" : { - "Luacontroller" : "mesecons_luacontroller/doc/luacontroller", - "FPGA" : "mesecons_fpga/doc/fpga", - "FPGA Programmer" : "mesecons_fpga/doc/programmer", - "Torch" : "mesecons_torch/doc/torch", - "Delayer" : "mesecons_delayer/doc/delayer", - "Gates" : { - "Diode" : "mesecons_gates/doc/diode", - "NOT Gate" : "mesecons_gates/doc/not", - "AND Gate" : "mesecons_gates/doc/and", - "NAND Gate" : "mesecons_gates/doc/nand", - "OR Gate" : "mesecons_gates/doc/or", - "NOR Gate" : "mesecons_gates/doc/nor", - "XOR Gate" : "mesecons_gates/doc/xor" - } - }, - "Crafts" : { - "Silicon" : "mesecons_materials/doc/silicon", - "Glue" : "mesecons_materials/doc/glue", - "Fiber" : "mesecons_materials/doc/fiber" - } -} diff --git a/mesecons/mesecons/actionqueue.lua b/mesecons/mesecons/actionqueue.lua deleted file mode 100644 index f3479ce..0000000 --- a/mesecons/mesecons/actionqueue.lua +++ /dev/null @@ -1,105 +0,0 @@ -mesecon.queue.actions={} -- contains all ActionQueue actions - -function mesecon.queue:add_function(name, func) - mesecon.queue.funcs[name] = func -end - --- If add_action with twice the same overwritecheck and same position are called, the first one is overwritten --- use overwritecheck nil to never overwrite, but just add the event to the queue --- priority specifies the order actions are executed within one globalstep, highest first --- should be between 0 and 1 -function mesecon.queue:add_action(pos, func, params, time, overwritecheck, priority) - -- Create Action Table: - time = time or 0 -- time <= 0 --> execute, time > 0 --> wait time until execution - priority = priority or 1 - local action = { pos=mesecon.tablecopy(pos), - func=func, - params=mesecon.tablecopy(params or {}), - time=time, - owcheck=(overwritecheck and mesecon.tablecopy(overwritecheck)) or nil, - priority=priority} - - local toremove = nil - -- Otherwise, add the action to the queue - if overwritecheck then -- check if old action has to be overwritten / removed: - for i, ac in ipairs(mesecon.queue.actions) do - if(vector.equals(pos, ac.pos) - and mesecon.cmpAny(overwritecheck, ac.owcheck)) then - toremove = i - break - end - end - end - - if (toremove ~= nil) then - table.remove(mesecon.queue.actions, toremove) - end - - table.insert(mesecon.queue.actions, action) -end - --- execute the stored functions on a globalstep --- if however, the pos of a function is not loaded (get_node_or_nil == nil), do NOT execute the function --- this makes sure that resuming mesecons circuits when restarting minetest works fine --- However, even that does not work in some cases, that's why we delay the time the globalsteps --- start to be execute by 5 seconds -local get_highest_priority = function (actions) - local highestp = -1 - local highesti - for i, ac in ipairs(actions) do - if ac.priority > highestp then - highestp = ac.priority - highesti = i - end - end - - return highesti -end - -local m_time = 0 -local resumetime = mesecon.setting("resumetime", 4) -minetest.register_globalstep(function (dtime) - m_time = m_time + dtime - -- don't even try if server has not been running for XY seconds; resumetime = time to wait - -- after starting the server before processing the ActionQueue, don't set this too low - if (m_time < resumetime) then return end - local actions = mesecon.tablecopy(mesecon.queue.actions) - local actions_now={} - - mesecon.queue.actions = {} - - -- sort actions into two categories: - -- those toexecute now (actions_now) and those to execute later (mesecon.queue.actions) - for i, ac in ipairs(actions) do - if ac.time > 0 then - ac.time = ac.time - dtime -- executed later - table.insert(mesecon.queue.actions, ac) - else - table.insert(actions_now, ac) - end - end - - while(#actions_now > 0) do -- execute highest priorities first, until all are executed - local hp = get_highest_priority(actions_now) - mesecon.queue:execute(actions_now[hp]) - table.remove(actions_now, hp) - end -end) - -function mesecon.queue:execute(action) - -- ignore if action queue function name doesn't exist, - -- (e.g. in case the action queue savegame was written by an old mesecons version) - if mesecon.queue.funcs[action.func] then - mesecon.queue.funcs[action.func](action.pos, unpack(action.params)) - end -end - - --- Store and read the ActionQueue to / from a file --- so that upcoming actions are remembered when the game --- is restarted -mesecon.queue.actions = mesecon.file2table("mesecon_actionqueue") - -minetest.register_on_shutdown(function() - mesecon.table2file("mesecon_actionqueue", mesecon.queue.actions) -end) diff --git a/mesecons/mesecons/depends.txt b/mesecons/mesecons/depends.txt deleted file mode 100644 index 4ad96d5..0000000 --- a/mesecons/mesecons/depends.txt +++ /dev/null @@ -1 +0,0 @@ -default diff --git a/mesecons/mesecons/init.lua b/mesecons/mesecons/init.lua deleted file mode 100644 index 83e611b..0000000 --- a/mesecons/mesecons/init.lua +++ /dev/null @@ -1,128 +0,0 @@ --- |\ /| ____ ____ ____ _____ ____ _____ --- | \ / | | | | | | | |\ | | --- | \/ | |___ ____ |___ | | | | \ | |____ --- | | | | | | | | | \ | | --- | | |___ ____| |___ |____ |____| | \| ____| --- by Jeija, Uberi (Temperest), sfan5, VanessaE, Hawk777 and contributors --- --- --- --- This mod adds mesecons[=minecraft redstone] and different receptors/effectors to minetest. --- See the documentation on the forum for additional information, especially about crafting --- --- --- For basic development resources, see http://mesecons.net/developers.html --- --- --- ---Quick draft for the mesecons array in the node's definition ---mesecons = ---{ --- receptor = --- { --- state = mesecon.state.on/off --- rules = rules/get_rules --- }, --- effector = --- { --- action_on = function --- action_off = function --- action_change = function --- rules = rules/get_rules --- }, --- conductor = --- { --- state = mesecon.state.on/off --- offstate = opposite state (for state = on only) --- onstate = opposite state (for state = off only) --- rules = rules/get_rules --- } ---} - --- PUBLIC VARIABLES -mesecon={} -- contains all functions and all global variables -mesecon.queue={} -- contains the ActionQueue -mesecon.queue.funcs={} -- contains all ActionQueue functions - --- Settings -dofile(minetest.get_modpath("mesecons").."/settings.lua") - --- Utilities like comparing positions, --- adding positions and rules, --- mostly things that make the source look cleaner -dofile(minetest.get_modpath("mesecons").."/util.lua"); - --- Presets (eg default rules) -dofile(minetest.get_modpath("mesecons").."/presets.lua"); - --- The ActionQueue --- Saves all the actions that have to be execute in the future -dofile(minetest.get_modpath("mesecons").."/actionqueue.lua"); - --- Internal stuff --- This is the most important file --- it handles signal transmission and basically everything else --- It is also responsible for managing the nodedef things, --- like calling action_on/off/change -dofile(minetest.get_modpath("mesecons").."/internal.lua"); - --- API --- these are the only functions you need to remember - -mesecon.queue:add_function("receptor_on", function (pos, rules) - mesecon.vm_begin() - - rules = rules or mesecon.rules.default - - -- Call turnon on all linking positions - for _, rule in ipairs(mesecon.flattenrules(rules)) do - local np = vector.add(pos, rule) - local rulenames = mesecon.rules_link_rule_all(pos, rule) - for _, rulename in ipairs(rulenames) do - mesecon.turnon(np, rulename) - end - end - - mesecon.vm_commit() -end) - -function mesecon.receptor_on(pos, rules) - mesecon.queue:add_action(pos, "receptor_on", {rules}, nil, rules) -end - -mesecon.queue:add_function("receptor_off", function (pos, rules) - rules = rules or mesecon.rules.default - - -- Call turnoff on all linking positions - for _, rule in ipairs(mesecon.flattenrules(rules)) do - local np = vector.add(pos, rule) - local rulenames = mesecon.rules_link_rule_all(pos, rule) - for _, rulename in ipairs(rulenames) do - mesecon.vm_begin() - mesecon.changesignal(np, minetest.get_node(np), rulename, mesecon.state.off, 2) - - -- Turnoff returns true if turnoff process was successful, no onstate receptor - -- was found along the way. Commit changes that were made in voxelmanip. If turnoff - -- returns true, an onstate receptor was found, abort voxelmanip transaction. - if (mesecon.turnoff(np, rulename)) then - mesecon.vm_commit() - else - mesecon.vm_abort() - end - end - end -end) - -function mesecon.receptor_off(pos, rules) - mesecon.queue:add_action(pos, "receptor_off", {rules}, nil, rules) -end - - -print("[OK] Mesecons") - --- Deprecated stuff --- To be removed in future releases -dofile(minetest.get_modpath("mesecons").."/legacy.lua"); - ---Services like turnoff receptor on dignode and so on -dofile(minetest.get_modpath("mesecons").."/services.lua"); diff --git a/mesecons/mesecons/internal.lua b/mesecons/mesecons/internal.lua deleted file mode 100644 index 6fdc3f9..0000000 --- a/mesecons/mesecons/internal.lua +++ /dev/null @@ -1,550 +0,0 @@ --- Internal.lua - The core of mesecons --- --- For more practical developer resources see http://mesecons.net/developers.php --- --- Function overview --- mesecon.get_effector(nodename) --> Returns the mesecons.effector -specifictation in the nodedef by the nodename --- mesecon.get_receptor(nodename) --> Returns the mesecons.receptor -specifictation in the nodedef by the nodename --- mesecon.get_conductor(nodename) --> Returns the mesecons.conductor-specifictation in the nodedef by the nodename --- mesecon.get_any_inputrules (node) --> Returns the rules of a node if it is a conductor or an effector --- mesecon.get_any_outputrules (node) --> Returns the rules of a node if it is a conductor or a receptor - --- RECEPTORS --- mesecon.is_receptor(nodename) --> Returns true if nodename is a receptor --- mesecon.is_receptor_on(nodename --> Returns true if nodename is an receptor with state = mesecon.state.on --- mesecon.is_receptor_off(nodename) --> Returns true if nodename is an receptor with state = mesecon.state.off --- mesecon.receptor_get_rules(node) --> Returns the rules of the receptor (mesecon.rules.default if none specified) - --- EFFECTORS --- mesecon.is_effector(nodename) --> Returns true if nodename is an effector --- mesecon.is_effector_on(nodename) --> Returns true if nodename is an effector with nodedef.mesecons.effector.action_off --- mesecon.is_effector_off(nodename) --> Returns true if nodename is an effector with nodedef.mesecons.effector.action_on --- mesecon.effector_get_rules(node) --> Returns the input rules of the effector (mesecon.rules.default if none specified) - --- SIGNALS --- mesecon.activate(pos, node, depth) --> Activates the effector node at the specific pos (calls nodedef.mesecons.effector.action_on), higher depths are executed later --- mesecon.deactivate(pos, node, depth) --> Deactivates the effector node at the specific pos (calls nodedef.mesecons.effector.action_off), higher depths are executed later --- mesecon.changesignal(pos, node, rulename, newstate, depth) --> Changes the effector node at the specific pos (calls nodedef.mesecons.effector.action_change), higher depths are executed later - --- CONDUCTORS --- mesecon.is_conductor(nodename) --> Returns true if nodename is a conductor --- mesecon.is_conductor_on(node --> Returns true if node is a conductor with state = mesecon.state.on --- mesecon.is_conductor_off(node) --> Returns true if node is a conductor with state = mesecon.state.off --- mesecon.get_conductor_on(node_off) --> Returns the onstate nodename of the conductor --- mesecon.get_conductor_off(node_on) --> Returns the offstate nodename of the conductor --- mesecon.conductor_get_rules(node) --> Returns the input+output rules of a conductor (mesecon.rules.default if none specified) - --- HIGH-LEVEL Internals --- mesecon.is_power_on(pos) --> Returns true if pos emits power in any way --- mesecon.is_power_off(pos) --> Returns true if pos does not emit power in any way --- mesecon.is_powered(pos) --> Returns true if pos is powered by a receptor or a conductor - --- RULES ROTATION helpers --- mesecon.rotate_rules_right(rules) --- mesecon.rotate_rules_left(rules) --- mesecon.rotate_rules_up(rules) --- mesecon.rotate_rules_down(rules) --- These functions return rules that have been rotated in the specific direction - --- General -function mesecon.get_effector(nodename) - if minetest.registered_nodes[nodename] - and minetest.registered_nodes[nodename].mesecons - and minetest.registered_nodes[nodename].mesecons.effector then - return minetest.registered_nodes[nodename].mesecons.effector - end -end - -function mesecon.get_receptor(nodename) - if minetest.registered_nodes[nodename] - and minetest.registered_nodes[nodename].mesecons - and minetest.registered_nodes[nodename].mesecons.receptor then - return minetest.registered_nodes[nodename].mesecons.receptor - end -end - -function mesecon.get_conductor(nodename) - if minetest.registered_nodes[nodename] - and minetest.registered_nodes[nodename].mesecons - and minetest.registered_nodes[nodename].mesecons.conductor then - return minetest.registered_nodes[nodename].mesecons.conductor - end -end - -function mesecon.get_any_outputrules(node) - if not node then return nil end - - if mesecon.is_conductor(node.name) then - return mesecon.conductor_get_rules(node) - elseif mesecon.is_receptor(node.name) then - return mesecon.receptor_get_rules(node) - end -end - -function mesecon.get_any_inputrules(node) - if not node then return nil end - - if mesecon.is_conductor(node.name) then - return mesecon.conductor_get_rules(node) - elseif mesecon.is_effector(node.name) then - return mesecon.effector_get_rules(node) - end -end - -function mesecon.get_any_rules(node) - return mesecon.mergetable(mesecon.get_any_inputrules(node) or {}, - mesecon.get_any_outputrules(node) or {}) -end - --- Receptors --- Nodes that can power mesecons -function mesecon.is_receptor_on(nodename) - local receptor = mesecon.get_receptor(nodename) - if receptor and receptor.state == mesecon.state.on then - return true - end - return false -end - -function mesecon.is_receptor_off(nodename) - local receptor = mesecon.get_receptor(nodename) - if receptor and receptor.state == mesecon.state.off then - return true - end - return false -end - -function mesecon.is_receptor(nodename) - local receptor = mesecon.get_receptor(nodename) - if receptor then - return true - end - return false -end - -function mesecon.receptor_get_rules(node) - local receptor = mesecon.get_receptor(node.name) - if receptor then - local rules = receptor.rules - if type(rules) == 'function' then - return rules(node) - elseif rules then - return rules - end - end - - return mesecon.rules.default -end - --- Effectors --- Nodes that can be powered by mesecons -function mesecon.is_effector_on(nodename) - local effector = mesecon.get_effector(nodename) - if effector and effector.action_off then - return true - end - return false -end - -function mesecon.is_effector_off(nodename) - local effector = mesecon.get_effector(nodename) - if effector and effector.action_on then - return true - end - return false -end - -function mesecon.is_effector(nodename) - local effector = mesecon.get_effector(nodename) - if effector then - return true - end - return false -end - -function mesecon.effector_get_rules(node) - local effector = mesecon.get_effector(node.name) - if effector then - local rules = effector.rules - if type(rules) == 'function' then - return rules(node) - elseif rules then - return rules - end - end - return mesecon.rules.default -end - --- ####################### --- # Signals (effectors) # --- ####################### - --- Activation: -mesecon.queue:add_function("activate", function (pos, rulename) - local node = mesecon.get_node_force(pos) - if not node then return end - - local effector = mesecon.get_effector(node.name) - - if effector and effector.action_on then - effector.action_on(pos, node, rulename) - end -end) - -function mesecon.activate(pos, node, rulename, depth) - if rulename == nil then - for _,rule in ipairs(mesecon.effector_get_rules(node)) do - mesecon.activate(pos, node, rule, depth + 1) - end - return - end - mesecon.queue:add_action(pos, "activate", {rulename}, nil, rulename, 1 / depth) -end - - --- Deactivation -mesecon.queue:add_function("deactivate", function (pos, rulename) - local node = mesecon.get_node_force(pos) - if not node then return end - - local effector = mesecon.get_effector(node.name) - - if effector and effector.action_off then - effector.action_off(pos, node, rulename) - end -end) - -function mesecon.deactivate(pos, node, rulename, depth) - if rulename == nil then - for _,rule in ipairs(mesecon.effector_get_rules(node)) do - mesecon.deactivate(pos, node, rule, depth + 1) - end - return - end - mesecon.queue:add_action(pos, "deactivate", {rulename}, nil, rulename, 1 / depth) -end - - --- Change -mesecon.queue:add_function("change", function (pos, rulename, changetype) - local node = mesecon.get_node_force(pos) - if not node then return end - - local effector = mesecon.get_effector(node.name) - - if effector and effector.action_change then - effector.action_change(pos, node, rulename, changetype) - end -end) - -function mesecon.changesignal(pos, node, rulename, newstate, depth) - if rulename == nil then - for _,rule in ipairs(mesecon.effector_get_rules(node)) do - mesecon.changesignal(pos, node, rule, newstate, depth + 1) - end - return - end - - -- Include "change" in overwritecheck so that it cannot be overwritten - -- by "active" / "deactivate" that will be called upon the node at the same time. - local overwritecheck = {"change", rulename} - mesecon.queue:add_action(pos, "change", {rulename, newstate}, nil, overwritecheck, 1 / depth) -end - --- Conductors - -function mesecon.is_conductor_on(node, rulename) - if not node then return false end - - local conductor = mesecon.get_conductor(node.name) - if conductor then - if conductor.state then - return conductor.state == mesecon.state.on - end - if conductor.states then - if not rulename then - return mesecon.getstate(node.name, conductor.states) ~= 1 - end - local bit = mesecon.rule2bit(rulename, mesecon.conductor_get_rules(node)) - local binstate = mesecon.getbinstate(node.name, conductor.states) - return mesecon.get_bit(binstate, bit) - end - end - - return false -end - -function mesecon.is_conductor_off(node, rulename) - if not node then return false end - - local conductor = mesecon.get_conductor(node.name) - if conductor then - if conductor.state then - return conductor.state == mesecon.state.off - end - if conductor.states then - if not rulename then - return mesecon.getstate(node.name, conductor.states) == 1 - end - local bit = mesecon.rule2bit(rulename, mesecon.conductor_get_rules(node)) - local binstate = mesecon.getbinstate(node.name, conductor.states) - return not mesecon.get_bit(binstate, bit) - end - end - - return false -end - -function mesecon.is_conductor(nodename) - local conductor = mesecon.get_conductor(nodename) - if conductor then - return true - end - return false -end - -function mesecon.get_conductor_on(node_off, rulename) - local conductor = mesecon.get_conductor(node_off.name) - if conductor then - if conductor.onstate then - return conductor.onstate - end - if conductor.states then - local bit = mesecon.rule2bit(rulename, mesecon.conductor_get_rules(node_off)) - local binstate = mesecon.getbinstate(node_off.name, conductor.states) - binstate = mesecon.set_bit(binstate, bit, "1") - return conductor.states[tonumber(binstate,2)+1] - end - end - return offstate -end - -function mesecon.get_conductor_off(node_on, rulename) - local conductor = mesecon.get_conductor(node_on.name) - if conductor then - if conductor.offstate then - return conductor.offstate - end - if conductor.states then - local bit = mesecon.rule2bit(rulename, mesecon.conductor_get_rules(node_on)) - local binstate = mesecon.getbinstate(node_on.name, conductor.states) - binstate = mesecon.set_bit(binstate, bit, "0") - return conductor.states[tonumber(binstate,2)+1] - end - end - return onstate -end - -function mesecon.conductor_get_rules(node) - local conductor = mesecon.get_conductor(node.name) - if conductor then - local rules = conductor.rules - if type(rules) == 'function' then - return rules(node) - elseif rules then - return rules - end - end - return mesecon.rules.default -end - --- some more general high-level stuff - -function mesecon.is_power_on(pos, rulename) - local node = mesecon.get_node_force(pos) - if node and (mesecon.is_conductor_on(node, rulename) or mesecon.is_receptor_on(node.name)) then - return true - end - return false -end - -function mesecon.is_power_off(pos, rulename) - local node = mesecon.get_node_force(pos) - if node and (mesecon.is_conductor_off(node, rulename) or mesecon.is_receptor_off(node.name)) then - return true - end - return false -end - --- Turn off an equipotential section starting at `pos`, which outputs in the direction of `link`. --- Breadth-first search. Map is abstracted away in a voxelmanip. --- Follow all all conductor paths replacing conductors that were already --- looked at, activating / changing all effectors along the way. -function mesecon.turnon(pos, link) - local frontiers = {{pos = pos, link = link}} - - local depth = 1 - while frontiers[1] do - local f = table.remove(frontiers, 1) - local node = mesecon.get_node_force(f.pos) - - if not node then - -- Area does not exist; do nothing - elseif mesecon.is_conductor_off(node, f.link) then - local rules = mesecon.conductor_get_rules(node) - - -- Call turnon on neighbors - for _, r in ipairs(mesecon.rule2meta(f.link, rules)) do - local np = vector.add(f.pos, r) - for _, l in ipairs(mesecon.rules_link_rule_all(f.pos, r)) do - table.insert(frontiers, {pos = np, link = l}) - end - end - - mesecon.swap_node_force(f.pos, mesecon.get_conductor_on(node, f.link)) - elseif mesecon.is_effector(node.name) then - mesecon.changesignal(f.pos, node, f.link, mesecon.state.on, depth) - if mesecon.is_effector_off(node.name) then - mesecon.activate(f.pos, node, f.link, depth) - end - end - depth = depth + 1 - end -end - --- Turn on an equipotential section starting at `pos`, which outputs in the direction of `link`. --- Breadth-first search. Map is abstracted away in a voxelmanip. --- Follow all all conductor paths replacing conductors that were already --- looked at, deactivating / changing all effectors along the way. --- In case an onstate receptor is discovered, abort the process by returning false, which will --- cause `receptor_off` to discard all changes made in the voxelmanip. --- Contrary to turnon, turnoff has to cache all change and deactivate signals so that they will only --- be called in the very end when we can be sure that no conductor was found along the path. --- --- Signal table entry structure: --- { --- pos = position of effector, --- node = node descriptor (name, param1 and param2), --- link = link the effector is connected to, --- depth = indicates order in which signals wire fired, higher is later --- } -function mesecon.turnoff(pos, link) - local frontiers = {{pos = pos, link = link}} - local signals = {} - - local depth = 1 - while frontiers[1] do - local f = table.remove(frontiers, 1) - local node = mesecon.get_node_force(f.pos) - - if not node then - -- Area does not exist; do nothing - elseif mesecon.is_conductor_on(node, f.link) then - local rules = mesecon.conductor_get_rules(node) - for _, r in ipairs(mesecon.rule2meta(f.link, rules)) do - local np = vector.add(f.pos, r) - - -- Check if an onstate receptor is connected. If that is the case, - -- abort this turnoff process by returning false. `receptor_off` will - -- discard all the changes that we made in the voxelmanip: - for _, l in ipairs(mesecon.rules_link_rule_all_inverted(f.pos, r)) do - if mesecon.is_receptor_on(mesecon.get_node_force(np).name) then - return false - end - end - - -- Call turnoff on neighbors - for _, l in ipairs(mesecon.rules_link_rule_all(f.pos, r)) do - table.insert(frontiers, {pos = np, link = l}) - end - end - - mesecon.swap_node_force(f.pos, mesecon.get_conductor_off(node, f.link)) - elseif mesecon.is_effector(node.name) then - table.insert(signals, { - pos = f.pos, - node = node, - link = f.link, - depth = depth - }) - end - depth = depth + 1 - end - - for _, sig in ipairs(signals) do - mesecon.changesignal(sig.pos, sig.node, sig.link, mesecon.state.off, sig.depth) - if mesecon.is_effector_on(sig.node.name) and not mesecon.is_powered(sig.pos) then - mesecon.deactivate(sig.pos, sig.node, sig.link, sig.depth) - end - end - - return true -end - --- Get all linking inputrules of inputnode (effector or conductor) that is connected to --- outputnode (receptor or conductor) at position `output` and has an output in direction `rule` -function mesecon.rules_link_rule_all(output, rule) - local input = vector.add(output, rule) - local inputnode = mesecon.get_node_force(input) - local inputrules = mesecon.get_any_inputrules(inputnode) - if not inputrules then - return {} - end - local rules = {} - - for _, inputrule in ipairs(mesecon.flattenrules(inputrules)) do - -- Check if input accepts from output - if vector.equals(vector.add(input, inputrule), output) then - table.insert(rules, inputrule) - end - end - - return rules -end - --- Get all linking outputnodes of outputnode (receptor or conductor) that is connected to --- inputnode (effector or conductor) at position `input` and has an input in direction `rule` -function mesecon.rules_link_rule_all_inverted(input, rule) - local output = vector.add(input, rule) - local outputnode = mesecon.get_node_force(output) - local outputrules = mesecon.get_any_outputrules(outputnode) - if not outputrules then - return {} - end - local rules = {} - - for _, outputrule in ipairs(mesecon.flattenrules(outputrules)) do - if vector.equals(vector.add(output, outputrule), input) then - table.insert(rules, mesecon.invertRule(outputrule)) - end - end - return rules -end - -function mesecon.is_powered(pos, rule) - local node = mesecon.get_node_force(pos) - local rules = mesecon.get_any_inputrules(node) - if not rules then return false end - - -- List of nodes that send out power to pos - local sourcepos = {} - - if not rule then - for _, rule in ipairs(mesecon.flattenrules(rules)) do - local rulenames = mesecon.rules_link_rule_all_inverted(pos, rule) - for _, rname in ipairs(rulenames) do - local np = vector.add(pos, rname) - local nn = mesecon.get_node_force(np) - - if (mesecon.is_conductor_on(nn, mesecon.invertRule(rname)) - or mesecon.is_receptor_on(nn.name)) then - table.insert(sourcepos, np) - end - end - end - else - local rulenames = mesecon.rules_link_rule_all_inverted(pos, rule) - for _, rname in ipairs(rulenames) do - local np = vector.add(pos, rname) - local nn = mesecon.get_node_force(np) - if (mesecon.is_conductor_on (nn, mesecon.invertRule(rname)) - or mesecon.is_receptor_on (nn.name)) then - table.insert(sourcepos, np) - end - end - end - - -- Return FALSE if not powered, return list of sources if is powered - if (#sourcepos == 0) then return false - else return sourcepos end -end diff --git a/mesecons/mesecons/legacy.lua b/mesecons/mesecons/legacy.lua deleted file mode 100644 index ad7093a..0000000 --- a/mesecons/mesecons/legacy.lua +++ /dev/null @@ -1,14 +0,0 @@ --- Un-forceload any forceloaded mapblocks from older versions of Mesecons which --- used forceloading instead of VoxelManipulators. -local BLOCKSIZE = 16 - --- convert block hash --> node position -local function unhash_blockpos(hash) - return vector.multiply(minetest.get_position_from_hash(hash), BLOCKSIZE) -end - -local old_forceloaded_blocks = mesecon.file2table("mesecon_forceloaded") -for hash, _ in pairs(old_forceloaded_blocks) do - minetest.forceload_free_block(unhash_blockpos(hash)) -end -os.remove(minetest.get_worldpath()..DIR_DELIM.."mesecon_forceloaded") diff --git a/mesecons/mesecons/oldwires.lua b/mesecons/mesecons/oldwires.lua deleted file mode 100644 index 8d6c6b1..0000000 --- a/mesecons/mesecons/oldwires.lua +++ /dev/null @@ -1,38 +0,0 @@ -minetest.register_node("mesecons:mesecon_off", { - drawtype = "raillike", - tiles = {"jeija_mesecon_off.png", "jeija_mesecon_curved_off.png", "jeija_mesecon_t_junction_off.png", "jeija_mesecon_crossing_off.png"}, - inventory_image = "jeija_mesecon_off.png", - wield_image = "jeija_mesecon_off.png", - paramtype = "light", - is_ground_content = false, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}, - }, - groups = {dig_immediate=3, mesecon=1, mesecon_conductor_craftable=1}, - description="Mesecons", - mesecons = {conductor={ - state = mesecon.state.off, - onstate = "mesecons:mesecon_on" - }} -}) - -minetest.register_node("mesecons:mesecon_on", { - drawtype = "raillike", - tiles = {"jeija_mesecon_on.png", "jeija_mesecon_curved_on.png", "jeija_mesecon_t_junction_on.png", "jeija_mesecon_crossing_on.png"}, - paramtype = "light", - is_ground_content = false, - walkable = false, - selection_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}, - }, - groups = {dig_immediate=3, not_in_creaive_inventory=1, mesecon=1}, - drop = "mesecons:mesecon_off 1", - light_source = minetest.LIGHT_MAX-11, - mesecons = {conductor={ - state = mesecon.state.on, - offstate = "mesecons:mesecon_off" - }} -}) diff --git a/mesecons/mesecons/presets.lua b/mesecons/mesecons/presets.lua deleted file mode 100644 index a2062d9..0000000 --- a/mesecons/mesecons/presets.lua +++ /dev/null @@ -1,86 +0,0 @@ -mesecon.rules = {} -mesecon.state = {} - -mesecon.rules.default = { - {x = 0, y = 0, z = -1}, - {x = 1, y = 0, z = 0}, - {x = -1, y = 0, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 1, y = 1, z = 0}, - {x = 1, y = -1, z = 0}, - {x = -1, y = 1, z = 0}, - {x = -1, y = -1, z = 0}, - {x = 0, y = 1, z = 1}, - {x = 0, y = -1, z = 1}, - {x = 0, y = 1, z = -1}, - {x = 0, y = -1, z = -1}, -} - -mesecon.rules.floor = mesecon.mergetable(mesecon.rules.default, {{x = 0, y = -1, z = 0}}) - -mesecon.rules.pplate = mesecon.mergetable(mesecon.rules.floor, {{x = 0, y = -2, z = 0}}) - -mesecon.rules.buttonlike = { - {x = 1, y = 0, z = 0}, - {x = 1, y = 1, z = 0}, - {x = 1, y = -1, z = 0}, - {x = 1, y = -1, z = 1}, - {x = 1, y = -1, z = -1}, - {x = 2, y = 0, z = 0}, -} - -mesecon.rules.flat = { - {x = 1, y = 0, z = 0}, - {x = -1, y = 0, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z = -1}, -} - -mesecon.rules.alldirs = { - {x = 1, y = 0, z = 0}, - {x = -1, y = 0, z = 0}, - {x = 0, y = 1, z = 0}, - {x = 0, y = -1, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z = -1}, -} - -local rules_wallmounted = { - xp = mesecon.rotate_rules_down(mesecon.rules.floor), - xn = mesecon.rotate_rules_up(mesecon.rules.floor), - yp = mesecon.rotate_rules_up(mesecon.rotate_rules_up(mesecon.rules.floor)), - yn = mesecon.rules.floor, - zp = mesecon.rotate_rules_left(mesecon.rotate_rules_up(mesecon.rules.floor)), - zn = mesecon.rotate_rules_right(mesecon.rotate_rules_up(mesecon.rules.floor)), -} - -local rules_buttonlike = { - xp = mesecon.rules.buttonlike, - xn = mesecon.rotate_rules_right(mesecon.rotate_rules_right(mesecon.rules.buttonlike)), - yp = mesecon.rotate_rules_down(mesecon.rules.buttonlike), - yn = mesecon.rotate_rules_up(mesecon.rules.buttonlike), - zp = mesecon.rotate_rules_right(mesecon.rules.buttonlike), - zn = mesecon.rotate_rules_left(mesecon.rules.buttonlike), -} - -local function rules_from_dir(ruleset, dir) - if dir.x == 1 then return ruleset.xp end - if dir.y == 1 then return ruleset.yp end - if dir.z == 1 then return ruleset.zp end - if dir.x == -1 then return ruleset.xn end - if dir.y == -1 then return ruleset.yn end - if dir.z == -1 then return ruleset.zn end -end - -mesecon.rules.wallmounted_get = function(node) - local dir = minetest.wallmounted_to_dir(node.param2) - return rules_from_dir(rules_wallmounted, dir) -end - -mesecon.rules.buttonlike_get = function(node) - local dir = minetest.facedir_to_dir(node.param2) - return rules_from_dir(rules_buttonlike, dir) -end - -mesecon.state.on = "on" -mesecon.state.off = "off" diff --git a/mesecons/mesecons/services.lua b/mesecons/mesecons/services.lua deleted file mode 100644 index b1388ec..0000000 --- a/mesecons/mesecons/services.lua +++ /dev/null @@ -1,136 +0,0 @@ --- Dig and place services - -mesecon.on_placenode = function(pos, node) - mesecon.execute_autoconnect_hooks_now(pos, node) - - -- Receptors: Send on signal when active - if mesecon.is_receptor_on(node.name) then - mesecon.receptor_on(pos, mesecon.receptor_get_rules(node)) - end - - -- Conductors: Send turnon signal when powered or replace by respective offstate conductor - -- if placed conductor is an onstate one - if mesecon.is_conductor(node.name) then - local sources = mesecon.is_powered(pos) - if sources then - -- also call receptor_on if itself is powered already, so that neighboring - -- conductors will be activated (when pushing an on-conductor with a piston) - for _, s in ipairs(sources) do - local rule = vector.subtract(pos, s) - mesecon.turnon(pos, rule) - end - --mesecon.receptor_on (pos, mesecon.conductor_get_rules(node)) - elseif mesecon.is_conductor_on(node) then - node.name = mesecon.get_conductor_off(node) - minetest.swap_node(pos, node) - end - end - - -- Effectors: Send changesignal and activate or deactivate - if mesecon.is_effector(node.name) then - local powered_rules = {} - local unpowered_rules = {} - - -- for each input rule, check if powered - for _, r in ipairs(mesecon.effector_get_rules(node)) do - local powered = mesecon.is_powered(pos, r) - if powered then table.insert(powered_rules, r) - else table.insert(unpowered_rules, r) end - - local state = powered and mesecon.state.on or mesecon.state.off - mesecon.changesignal(pos, node, r, state, 1) - end - - if (#powered_rules > 0) then - for _, r in ipairs(powered_rules) do - mesecon.activate(pos, node, r, 1) - end - else - for _, r in ipairs(unpowered_rules) do - mesecon.deactivate(pos, node, r, 1) - end - end - end -end - -mesecon.on_dignode = function(pos, node) - if mesecon.is_conductor_on(node) then - mesecon.receptor_off(pos, mesecon.conductor_get_rules(node)) - elseif mesecon.is_receptor_on(node.name) then - mesecon.receptor_off(pos, mesecon.receptor_get_rules(node)) - end - - mesecon.execute_autoconnect_hooks_queue(pos, node) -end - -function mesecon.on_blastnode(pos, intensity) - local node = minetest.get_node(pos) - minetest.remove_node(pos) - mesecon.on_dignode(pos, node) - return minetest.get_node_drops(node.name, "") -end - -minetest.register_on_placenode(mesecon.on_placenode) -minetest.register_on_dignode(mesecon.on_dignode) - --- Overheating service for fast circuits -local OVERHEAT_MAX = mesecon.setting("overheat_max", 20) -local COOLDOWN_TIME = mesecon.setting("cooldown_time", 2.0) -local COOLDOWN_STEP = mesecon.setting("cooldown_granularity", 0.5) -local COOLDOWN_MULTIPLIER = OVERHEAT_MAX / COOLDOWN_TIME -local cooldown_timer = 0.0 -local object_heat = {} - --- returns true if heat is too high -function mesecon.do_overheat(pos) - local id = minetest.hash_node_position(pos) - local heat = (object_heat[id] or 0) + 1 - object_heat[id] = heat - if heat >= OVERHEAT_MAX then - minetest.log("action", "Node overheats at " .. minetest.pos_to_string(pos)) - object_heat[id] = nil - return true - end - return false -end - -function mesecon.do_cooldown(pos) - local id = minetest.hash_node_position(pos) - object_heat[id] = nil -end - -function mesecon.get_heat(pos) - local id = minetest.hash_node_position(pos) - return object_heat[id] or 0 -end - -function mesecon.move_hot_nodes(moved_nodes) - local new_heat = {} - for _, n in ipairs(moved_nodes) do - local old_id = minetest.hash_node_position(n.oldpos) - local new_id = minetest.hash_node_position(n.pos) - new_heat[new_id] = object_heat[old_id] - object_heat[old_id] = nil - end - for id, heat in pairs(new_heat) do - object_heat[id] = heat - end -end - -local function global_cooldown(dtime) - cooldown_timer = cooldown_timer + dtime - if cooldown_timer < COOLDOWN_STEP then - return -- don't overload the CPU - end - local cooldown = COOLDOWN_MULTIPLIER * cooldown_timer - cooldown_timer = 0 - for id, heat in pairs(object_heat) do - heat = heat - cooldown - if heat <= 0 then - object_heat[id] = nil -- free some RAM - else - object_heat[id] = heat - end - end -end -minetest.register_globalstep(global_cooldown) diff --git a/mesecons/mesecons/settings.lua b/mesecons/mesecons/settings.lua deleted file mode 100644 index 0220707..0000000 --- a/mesecons/mesecons/settings.lua +++ /dev/null @@ -1,15 +0,0 @@ --- SETTINGS -function mesecon.setting(setting, default) - if type(default) == "boolean" then - local read = minetest.settings:get_bool("mesecon."..setting) - if read == nil then - return default - else - return read - end - elseif type(default) == "string" then - return minetest.settings:get("mesecon."..setting) or default - elseif type(default) == "number" then - return tonumber(minetest.settings:get("mesecon."..setting) or default) - end -end diff --git a/mesecons/mesecons/textures/jeija_close_window.png b/mesecons/mesecons/textures/jeija_close_window.png deleted file mode 100644 index 5c27c6c..0000000 Binary files a/mesecons/mesecons/textures/jeija_close_window.png and /dev/null differ diff --git a/mesecons/mesecons/textures/jeija_microcontroller_LED_A.png b/mesecons/mesecons/textures/jeija_microcontroller_LED_A.png deleted file mode 100644 index 64526cf..0000000 Binary files a/mesecons/mesecons/textures/jeija_microcontroller_LED_A.png and /dev/null differ diff --git a/mesecons/mesecons/textures/jeija_microcontroller_LED_B.png b/mesecons/mesecons/textures/jeija_microcontroller_LED_B.png deleted file mode 100644 index 1f7b451..0000000 Binary files a/mesecons/mesecons/textures/jeija_microcontroller_LED_B.png and /dev/null differ diff --git a/mesecons/mesecons/textures/jeija_microcontroller_LED_C.png b/mesecons/mesecons/textures/jeija_microcontroller_LED_C.png deleted file mode 100644 index 399cc2c..0000000 Binary files a/mesecons/mesecons/textures/jeija_microcontroller_LED_C.png and /dev/null differ diff --git a/mesecons/mesecons/textures/jeija_microcontroller_LED_D.png b/mesecons/mesecons/textures/jeija_microcontroller_LED_D.png deleted file mode 100644 index 506389c..0000000 Binary files a/mesecons/mesecons/textures/jeija_microcontroller_LED_D.png and /dev/null differ diff --git a/mesecons/mesecons/textures/jeija_microcontroller_bottom.png b/mesecons/mesecons/textures/jeija_microcontroller_bottom.png deleted file mode 100644 index 3a9161e..0000000 Binary files a/mesecons/mesecons/textures/jeija_microcontroller_bottom.png and /dev/null differ diff --git a/mesecons/mesecons/textures/jeija_microcontroller_sides.png b/mesecons/mesecons/textures/jeija_microcontroller_sides.png deleted file mode 100644 index b367644..0000000 Binary files a/mesecons/mesecons/textures/jeija_microcontroller_sides.png and /dev/null differ diff --git a/mesecons/mesecons/textures/mesecons_wire_inv.png b/mesecons/mesecons/textures/mesecons_wire_inv.png deleted file mode 100644 index a3930cb..0000000 Binary files a/mesecons/mesecons/textures/mesecons_wire_inv.png and /dev/null differ diff --git a/mesecons/mesecons/textures/mesecons_wire_off.png b/mesecons/mesecons/textures/mesecons_wire_off.png deleted file mode 100644 index 58164fa..0000000 Binary files a/mesecons/mesecons/textures/mesecons_wire_off.png and /dev/null differ diff --git a/mesecons/mesecons/textures/mesecons_wire_on.png b/mesecons/mesecons/textures/mesecons_wire_on.png deleted file mode 100644 index 98a86c8..0000000 Binary files a/mesecons/mesecons/textures/mesecons_wire_on.png and /dev/null differ diff --git a/mesecons/mesecons/util.lua b/mesecons/mesecons/util.lua deleted file mode 100644 index b15858d..0000000 --- a/mesecons/mesecons/util.lua +++ /dev/null @@ -1,441 +0,0 @@ -function mesecon.move_node(pos, newpos) - local node = minetest.get_node(pos) - local meta = minetest.get_meta(pos):to_table() - minetest.remove_node(pos) - minetest.set_node(newpos, node) - minetest.get_meta(pos):from_table(meta) -end - --- Rules rotation Functions: -function mesecon.rotate_rules_right(rules) - local nr = {} - for i, rule in ipairs(rules) do - table.insert(nr, { - x = -rule.z, - y = rule.y, - z = rule.x, - name = rule.name}) - end - return nr -end - -function mesecon.rotate_rules_left(rules) - local nr = {} - for i, rule in ipairs(rules) do - table.insert(nr, { - x = rule.z, - y = rule.y, - z = -rule.x, - name = rule.name}) - end - return nr -end - -function mesecon.rotate_rules_down(rules) - local nr = {} - for i, rule in ipairs(rules) do - table.insert(nr, { - x = -rule.y, - y = rule.x, - z = rule.z, - name = rule.name}) - end - return nr -end - -function mesecon.rotate_rules_up(rules) - local nr = {} - for i, rule in ipairs(rules) do - table.insert(nr, { - x = rule.y, - y = -rule.x, - z = rule.z, - name = rule.name}) - end - return nr -end --- - -function mesecon.flattenrules(allrules) ---[[ - { - { - {xyz}, - {xyz}, - }, - { - {xyz}, - {xyz}, - }, - } ---]] - if allrules[1] and - allrules[1].x then - return allrules - end - - local shallowrules = {} - for _, metarule in ipairs( allrules) do - for _, rule in ipairs(metarule ) do - table.insert(shallowrules, rule) - end - end - return shallowrules ---[[ - { - {xyz}, - {xyz}, - {xyz}, - {xyz}, - } ---]] -end - -function mesecon.rule2bit(findrule, allrules) - --get the bit of the metarule the rule is in, or bit 1 - if (allrules[1] and - allrules[1].x) or - not findrule then - return 1 - end - for m,metarule in ipairs( allrules) do - for _, rule in ipairs(metarule ) do - if vector.equals(findrule, rule) then - return m - end - end - end -end - -function mesecon.rule2metaindex(findrule, allrules) - --get the metarule the rule is in, or allrules - if allrules[1].x then - return nil - end - - if not(findrule) then - return mesecon.flattenrules(allrules) - end - - for m, metarule in ipairs( allrules) do - for _, rule in ipairs(metarule ) do - if vector.equals(findrule, rule) then - return m - end - end - end -end - -function mesecon.rule2meta(findrule, allrules) - if #allrules == 0 then return {} end - - local index = mesecon.rule2metaindex(findrule, allrules) - if index == nil then - if allrules[1].x then - return allrules - else - return {} - end - end - return allrules[index] -end - -function mesecon.dec2bin(n) - local x, y = math.floor(n / 2), n % 2 - if (n > 1) then - return mesecon.dec2bin(x)..y - else - return ""..y - end -end - -function mesecon.getstate(nodename, states) - for state, name in ipairs(states) do - if name == nodename then - return state - end - end - error(nodename.." doesn't mention itself in "..dump(states)) -end - -function mesecon.getbinstate(nodename, states) - return mesecon.dec2bin(mesecon.getstate(nodename, states)-1) -end - -function mesecon.get_bit(binary,bit) - bit = bit or 1 - local c = binary:len()-(bit-1) - return binary:sub(c,c) == "1" -end - -function mesecon.set_bit(binary,bit,value) - if value == "1" then - if not mesecon.get_bit(binary,bit) then - return mesecon.dec2bin(tonumber(binary,2)+math.pow(2,bit-1)) - end - elseif value == "0" then - if mesecon.get_bit(binary,bit) then - return mesecon.dec2bin(tonumber(binary,2)-math.pow(2,bit-1)) - end - end - return binary - -end - -function mesecon.invertRule(r) - return vector.multiply(r, -1) -end - -function mesecon.tablecopy(table) -- deep table copy - if type(table) ~= "table" then return table end -- no need to copy - local newtable = {} - - for idx, item in pairs(table) do - if type(item) == "table" then - newtable[idx] = mesecon.tablecopy(item) - else - newtable[idx] = item - end - end - - return newtable -end - -function mesecon.cmpAny(t1, t2) - if type(t1) ~= type(t2) then return false end - if type(t1) ~= "table" and type(t2) ~= "table" then return t1 == t2 end - - for i, e in pairs(t1) do - if not mesecon.cmpAny(e, t2[i]) then return false end - end - - return true -end - --- does not overwrite values; number keys (ipairs) are appended, not overwritten -function mesecon.mergetable(source, dest) - local rval = mesecon.tablecopy(dest) - - for k, v in pairs(source) do - rval[k] = dest[k] or mesecon.tablecopy(v) - end - for i, v in ipairs(source) do - table.insert(rval, mesecon.tablecopy(v)) - end - - return rval -end - -function mesecon.register_node(name, spec_common, spec_off, spec_on) - spec_common.drop = spec_common.drop or name .. "_off" - spec_common.on_blast = spec_common.on_blast or mesecon.on_blastnode - spec_common.__mesecon_basename = name - spec_on.__mesecon_state = "on" - spec_off.__mesecon_state = "off" - - spec_on = mesecon.mergetable(spec_common, spec_on); - spec_off = mesecon.mergetable(spec_common, spec_off); - - minetest.register_node(name .. "_on", spec_on) - minetest.register_node(name .. "_off", spec_off) -end - --- swap onstate and offstate nodes, returns new state -function mesecon.flipstate(pos, node) - local nodedef = minetest.registered_nodes[node.name] - local newstate - if (nodedef.__mesecon_state == "on") then newstate = "off" end - if (nodedef.__mesecon_state == "off") then newstate = "on" end - - minetest.swap_node(pos, {name = nodedef.__mesecon_basename .. "_" .. newstate, - param2 = node.param2}) - - return newstate -end - --- File writing / reading utilities -local wpath = minetest.get_worldpath() -function mesecon.file2table(filename) - local f = io.open(wpath..DIR_DELIM..filename, "r") - if f == nil then return {} end - local t = f:read("*all") - f:close() - if t == "" or t == nil then return {} end - return minetest.deserialize(t) -end - -function mesecon.table2file(filename, table) - local f = io.open(wpath..DIR_DELIM..filename, "w") - f:write(minetest.serialize(table)) - f:close() -end - --- Block position "hashing" (convert to integer) functions for voxelmanip cache -local BLOCKSIZE = 16 - --- convert node position --> block hash -local function hash_blockpos(pos) - return minetest.hash_node_position({ - x = math.floor(pos.x/BLOCKSIZE), - y = math.floor(pos.y/BLOCKSIZE), - z = math.floor(pos.z/BLOCKSIZE) - }) -end - --- Maps from a hashed mapblock position (as returned by hash_blockpos) to a --- table. --- --- Contents of the table are: --- “vm” → the VoxelManipulator --- “va” → the VoxelArea --- “data” → the data array --- “param1” → the param1 array --- “param2” → the param2 array --- “dirty” → true if data has been modified --- --- Nil if no VM-based transaction is in progress. -local vm_cache = nil - --- Starts a VoxelManipulator-based transaction. --- --- During a VM transaction, calls to vm_get_node and vm_swap_node operate on a --- cached copy of the world loaded via VoxelManipulators. That cache can later --- be committed to the real map by means of vm_commit or discarded by means of --- vm_abort. -function mesecon.vm_begin() - vm_cache = {} -end - --- Finishes a VoxelManipulator-based transaction, freeing the VMs and map data --- and writing back any modified areas. -function mesecon.vm_commit() - for hash, tbl in pairs(vm_cache) do - if tbl.dirty then - local vm = tbl.vm - vm:set_data(tbl.data) - vm:write_to_map() - vm:update_map() - end - end - vm_cache = nil -end - --- Finishes a VoxelManipulator-based transaction, freeing the VMs and throwing --- away any modified areas. -function mesecon.vm_abort() - vm_cache = nil -end - --- Gets the cache entry covering a position, populating it if necessary. -local function vm_get_or_create_entry(pos) - local hash = hash_blockpos(pos) - local tbl = vm_cache[hash] - if not tbl then - local vm = minetest.get_voxel_manip(pos, pos) - local min_pos, max_pos = vm:get_emerged_area() - local va = VoxelArea:new{MinEdge = min_pos, MaxEdge = max_pos} - tbl = {vm = vm, va = va, data = vm:get_data(), param1 = vm:get_light_data(), param2 = vm:get_param2_data(), dirty = false} - vm_cache[hash] = tbl - end - return tbl -end - --- Gets the node at a given position during a VoxelManipulator-based --- transaction. -function mesecon.vm_get_node(pos) - local tbl = vm_get_or_create_entry(pos) - local index = tbl.va:indexp(pos) - local node_value = tbl.data[index] - if node_value == core.CONTENT_IGNORE then - return nil - else - local node_param1 = tbl.param1[index] - local node_param2 = tbl.param2[index] - return {name = minetest.get_name_from_content_id(node_value), param1 = node_param1, param2 = node_param2} - end -end - --- Sets a node’s name during a VoxelManipulator-based transaction. --- --- Existing param1, param2, and metadata are left alone. -function mesecon.vm_swap_node(pos, name) - local tbl = vm_get_or_create_entry(pos) - local index = tbl.va:indexp(pos) - tbl.data[index] = minetest.get_content_id(name) - tbl.dirty = true -end - --- Gets the node at a given position, regardless of whether it is loaded or --- not, respecting a transaction if one is in progress. --- --- Outside a VM transaction, if the mapblock is not loaded, it is pulled into --- the server’s main map data cache and then accessed from there. --- --- Inside a VM transaction, the transaction’s VM cache is used. -function mesecon.get_node_force(pos) - if vm_cache then - return mesecon.vm_get_node(pos) - else - local node = minetest.get_node_or_nil(pos) - if node == nil then - -- Node is not currently loaded; use a VoxelManipulator to prime - -- the mapblock cache and try again. - minetest.get_voxel_manip(pos, pos) - node = minetest.get_node_or_nil(pos) - end - return node - end -end - --- Swaps the node at a given position, regardless of whether it is loaded or --- not, respecting a transaction if one is in progress. --- --- Outside a VM transaction, if the mapblock is not loaded, it is pulled into --- the server’s main map data cache and then accessed from there. --- --- Inside a VM transaction, the transaction’s VM cache is used. --- --- This function can only be used to change the node’s name, not its parameters --- or metadata. -function mesecon.swap_node_force(pos, name) - if vm_cache then - return mesecon.vm_swap_node(pos, name) - else - -- This serves to both ensure the mapblock is loaded and also hand us - -- the old node table so we can preserve param2. - local node = mesecon.get_node_force(pos) - node.name = name - minetest.swap_node(pos, node) - end -end - --- Autoconnect Hooks --- Nodes like conductors may change their appearance and their connection rules --- right after being placed or after being dug, e.g. the default wires use this --- to automatically connect to linking nodes after placement. --- After placement, the update function will be executed immediately so that the --- possibly changed rules can be taken into account when recalculating the circuit. --- After digging, the update function will be queued and executed after --- recalculating the circuit. The update function must take care of updating the --- node at the given position itself, but also all of the other nodes the given --- position may have (had) a linking connection to. -mesecon.autoconnect_hooks = {} - --- name: A unique name for the hook, e.g. "foowire". Used to name the actionqueue function. --- fct: The update function with parameters function(pos, node) -function mesecon.register_autoconnect_hook(name, fct) - mesecon.autoconnect_hooks[name] = fct - mesecon.queue:add_function("autoconnect_hook_"..name, fct) -end - -function mesecon.execute_autoconnect_hooks_now(pos, node) - for _, fct in pairs(mesecon.autoconnect_hooks) do - fct(pos, node) - end -end - -function mesecon.execute_autoconnect_hooks_queue(pos, node) - for name in pairs(mesecon.autoconnect_hooks) do - mesecon.queue:add_action(pos, "autoconnect_hook_"..name, {node}) - end -end diff --git a/mesecons/mesecons_alias/depends.txt b/mesecons/mesecons_alias/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_alias/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_alias/init.lua b/mesecons/mesecons_alias/init.lua deleted file mode 100644 index 395c368..0000000 --- a/mesecons/mesecons_alias/init.lua +++ /dev/null @@ -1,38 +0,0 @@ --- This file registers aliases for the /give /giveme commands. - -minetest.register_alias("mesecons:removestone", "mesecons_random:removestone") -minetest.register_alias("mesecons:power_plant", "mesecons_powerplant:power_plant") -minetest.register_alias("mesecons:powerplant", "mesecons_powerplant:power_plant") -minetest.register_alias("mesecons:meselamp", "mesecons_lamp:lamp_off") -minetest.register_alias("mesecons:mesecon", "mesecons:wire_00000000_off") -minetest.register_alias("mesecons:object_detector", "mesecons_detector:object_detector_off") -minetest.register_alias("mesecons:wireless_inverter", "mesecons_wireless:wireless_inverter_on") -minetest.register_alias("mesecons:wireless_receiver", "mesecons_wireless:wireless_receiver_off") -minetest.register_alias("mesecons:wireless_transmitter", "mesecons_wireless:wireless_transmitter_off") -minetest.register_alias("mesecons:switch", "mesecons_switch:mesecon_switch_off") -minetest.register_alias("mesecons:button", "mesecons_button:button_off") -minetest.register_alias("mesecons:piston", "mesecons_pistons:piston_normal_off") -minetest.register_alias("mesecons:blinky_plant", "mesecons_blinkyplant:blinky_plant_off") -minetest.register_alias("mesecons:mesecon_torch", "mesecons_torch:mesecon_torch_on") -minetest.register_alias("mesecons:torch", "mesecons_torch:mesecon_torch_on") -minetest.register_alias("mesecons:hydro_turbine", "mesecons_hydroturbine:hydro_turbine_off") -minetest.register_alias("mesecons:pressure_plate_stone", "mesecons_pressureplates:pressure_plate_stone_off") -minetest.register_alias("mesecons:pressure_plate_wood", "mesecons_pressureplates:pressure_plate_wood_off") -minetest.register_alias("mesecons:mesecon_socket", "mesecons_temperest:mesecon_socket_off") -minetest.register_alias("mesecons:mesecon_inverter", "mesecons_temperest:mesecon_inverter_on") -minetest.register_alias("mesecons:movestone", "mesecons_movestones:movestone") -minetest.register_alias("mesecons:sticky_movestone", "mesecons_movestones:sticky_movestone") -minetest.register_alias("mesecons:noteblock", "mesecons_noteblock:noteblock") -minetest.register_alias("mesecons:microcontroller", "mesecons_microcontroller:microcontroller0000") -minetest.register_alias("mesecons:delayer", "mesecons_delayer:delayer_off_1") -minetest.register_alias("mesecons:solarpanel", "mesecons_solarpanel:solar_panel_off") - - ---Backwards compatibility -minetest.register_alias("mesecons:mesecon_off", "mesecons:wire_00000000_off") -minetest.register_alias("mesecons_pistons:piston_sticky", "mesecons_pistons:piston_sticky_on") -minetest.register_alias("mesecons_pistons:piston_normal", "mesecons_pistons:piston_normal_on") -minetest.register_alias("mesecons_pistons:piston_up_normal", "mesecons_pistons:piston_up_normal_on") -minetest.register_alias("mesecons_pistons:piston_down_normal", "mesecons_pistons:piston_down_normal_on") -minetest.register_alias("mesecons_pistons:piston_up_sticky", "mesecons_pistons:piston_up_sticky_on") -minetest.register_alias("mesecons_pistons:piston_down_sticky", "mesecons_pistons:piston_down_sticky_on") diff --git a/mesecons/mesecons_blinkyplant/depends.txt b/mesecons/mesecons_blinkyplant/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_blinkyplant/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_blinkyplant/doc/blinkyplant/description.html b/mesecons/mesecons_blinkyplant/doc/blinkyplant/description.html deleted file mode 100644 index 0d987a5..0000000 --- a/mesecons/mesecons_blinkyplant/doc/blinkyplant/description.html +++ /dev/null @@ -1,2 +0,0 @@ -The blinky plants toggles between on and off state every three seconds. Can be used to make clocks. Also works after having restarted the game. -It stops blinking in an inactive block, then starts again when the block becomes active. diff --git a/mesecons/mesecons_blinkyplant/doc/blinkyplant/preview.png b/mesecons/mesecons_blinkyplant/doc/blinkyplant/preview.png deleted file mode 100755 index 40ce5b5..0000000 Binary files a/mesecons/mesecons_blinkyplant/doc/blinkyplant/preview.png and /dev/null differ diff --git a/mesecons/mesecons_blinkyplant/doc/blinkyplant/recipe.png b/mesecons/mesecons_blinkyplant/doc/blinkyplant/recipe.png deleted file mode 100644 index 6f1e148..0000000 Binary files a/mesecons/mesecons_blinkyplant/doc/blinkyplant/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_blinkyplant/init.lua b/mesecons/mesecons_blinkyplant/init.lua deleted file mode 100644 index 14a274f..0000000 --- a/mesecons/mesecons_blinkyplant/init.lua +++ /dev/null @@ -1,52 +0,0 @@ --- The BLINKY_PLANT - -local toggle_timer = function (pos) - local timer = minetest.get_node_timer(pos) - if timer:is_started() then - timer:stop() - else - timer:start(mesecon.setting("blinky_plant_interval", 3)) - end -end - -local on_timer = function (pos) - local node = minetest.get_node(pos) - if(mesecon.flipstate(pos, node) == "on") then - mesecon.receptor_on(pos) - else - mesecon.receptor_off(pos) - end - toggle_timer(pos) -end - -mesecon.register_node("mesecons_blinkyplant:blinky_plant", { - description="Blinky Plant", - drawtype = "plantlike", - inventory_image = "jeija_blinky_plant_off.png", - paramtype = "light", - is_ground_content = false, - walkable = false, - sounds = default.node_sound_leaves_defaults(), - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3}, - }, - on_timer = on_timer, - on_rightclick = toggle_timer, - on_construct = toggle_timer -},{ - tiles = {"jeija_blinky_plant_off.png"}, - groups = {dig_immediate=3}, - mesecons = {receptor = { state = mesecon.state.off }} -},{ - tiles = {"jeija_blinky_plant_on.png"}, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - mesecons = {receptor = { state = mesecon.state.on }} -}) - -minetest.register_craft({ - output = "mesecons_blinkyplant:blinky_plant_off 1", - recipe = { {"","group:mesecon_conductor_craftable",""}, - {"","group:mesecon_conductor_craftable",""}, - {"group:sapling","group:sapling","group:sapling"}} -}) diff --git a/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_off.png b/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_off.png deleted file mode 100644 index 4f507da..0000000 Binary files a/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_off.png and /dev/null differ diff --git a/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_on.png b/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_on.png deleted file mode 100644 index f77a134..0000000 Binary files a/mesecons/mesecons_blinkyplant/textures/jeija_blinky_plant_on.png and /dev/null differ diff --git a/mesecons/mesecons_button/depends.txt b/mesecons/mesecons_button/depends.txt deleted file mode 100644 index 19c798c..0000000 --- a/mesecons/mesecons_button/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_receiver diff --git a/mesecons/mesecons_button/doc/button/description.html b/mesecons/mesecons_button/doc/button/description.html deleted file mode 100644 index ae6bf07..0000000 --- a/mesecons/mesecons_button/doc/button/description.html +++ /dev/null @@ -1 +0,0 @@ -This receptor can be attached to walls. It turns on for 1 second if it's punched. diff --git a/mesecons/mesecons_button/doc/button/preview.png b/mesecons/mesecons_button/doc/button/preview.png deleted file mode 100644 index b69f8f4..0000000 Binary files a/mesecons/mesecons_button/doc/button/preview.png and /dev/null differ diff --git a/mesecons/mesecons_button/doc/button/recipe.png b/mesecons/mesecons_button/doc/button/recipe.png deleted file mode 100644 index c6232b4..0000000 Binary files a/mesecons/mesecons_button/doc/button/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_button/init.lua b/mesecons/mesecons_button/init.lua deleted file mode 100644 index 8764fbc..0000000 --- a/mesecons/mesecons_button/init.lua +++ /dev/null @@ -1,106 +0,0 @@ --- WALL BUTTON --- A button that when pressed emits power for 1 second --- and then turns off again - -mesecon.button_turnoff = function (pos) - local node = minetest.get_node(pos) - if node.name ~= "mesecons_button:button_on" then -- has been dug - return - end - minetest.swap_node(pos, {name = "mesecons_button:button_off", param2 = node.param2}) - minetest.sound_play("mesecons_button_pop", {pos = pos}) - local rules = mesecon.rules.buttonlike_get(node) - mesecon.receptor_off(pos, rules) -end - -minetest.register_node("mesecons_button:button_off", { - drawtype = "nodebox", - tiles = { - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - legacy_wallmounted = true, - walkable = false, - on_rotate = mesecon.buttonlike_onrotate, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -6/16, -6/16, 5/16, 6/16, 6/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = { - { -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, -- the thin plate behind the button - { -4/16, -2/16, 4/16, 4/16, 2/16, 6/16 } -- the button itself - } - }, - groups = {dig_immediate=2, mesecon_needs_receiver = 1}, - description = "Button", - on_rightclick = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_button:button_on", param2=node.param2}) - mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node)) - minetest.sound_play("mesecons_button_push", {pos=pos}) - minetest.get_node_timer(pos):start(1) - end, - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.off, - rules = mesecon.rules.buttonlike_get - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_button:button_on", { - drawtype = "nodebox", - tiles = { - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_sides.png", - "jeija_wall_button_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - legacy_wallmounted = true, - walkable = false, - on_rotate = false, - light_source = minetest.LIGHT_MAX-7, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -6/16, -6/16, 5/16, 6/16, 6/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = { - { -6/16, -6/16, 6/16, 6/16, 6/16, 8/16 }, - { -4/16, -2/16, 11/32, 4/16, 2/16, 6/16 } - } - }, - groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon_needs_receiver = 1}, - drop = 'mesecons_button:button_off', - description = "Button", - sounds = default.node_sound_stone_defaults(), - mesecons = {receptor = { - state = mesecon.state.on, - rules = mesecon.rules.buttonlike_get - }}, - on_timer = mesecon.button_turnoff, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = "mesecons_button:button_off 2", - recipe = { - {"group:mesecon_conductor_craftable","default:stone"}, - } -}) diff --git a/mesecons/mesecons_button/sounds/mesecons_button_pop.ogg b/mesecons/mesecons_button/sounds/mesecons_button_pop.ogg deleted file mode 100644 index 9d56bb8..0000000 Binary files a/mesecons/mesecons_button/sounds/mesecons_button_pop.ogg and /dev/null differ diff --git a/mesecons/mesecons_button/sounds/mesecons_button_push.ogg b/mesecons/mesecons_button/sounds/mesecons_button_push.ogg deleted file mode 100644 index 53d45c1..0000000 Binary files a/mesecons/mesecons_button/sounds/mesecons_button_push.ogg and /dev/null differ diff --git a/mesecons/mesecons_button/textures/jeija_wall_button_off.png b/mesecons/mesecons_button/textures/jeija_wall_button_off.png deleted file mode 100644 index 0e3ff25..0000000 Binary files a/mesecons/mesecons_button/textures/jeija_wall_button_off.png and /dev/null differ diff --git a/mesecons/mesecons_button/textures/jeija_wall_button_on.png b/mesecons/mesecons_button/textures/jeija_wall_button_on.png deleted file mode 100644 index 1d97464..0000000 Binary files a/mesecons/mesecons_button/textures/jeija_wall_button_on.png and /dev/null differ diff --git a/mesecons/mesecons_button/textures/jeija_wall_button_sides.png b/mesecons/mesecons_button/textures/jeija_wall_button_sides.png deleted file mode 100644 index 9b79b57..0000000 Binary files a/mesecons/mesecons_button/textures/jeija_wall_button_sides.png and /dev/null differ diff --git a/mesecons/mesecons_commandblock/depends.txt b/mesecons/mesecons_commandblock/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_commandblock/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_commandblock/doc/commandblock/description.html b/mesecons/mesecons_commandblock/doc/commandblock/description.html deleted file mode 100644 index 9ba7ce5..0000000 --- a/mesecons/mesecons_commandblock/doc/commandblock/description.html +++ /dev/null @@ -1,2 +0,0 @@ -There is no crafting recipe as this should only be available for server admins. Quite similar to the Minecraft counterpart. Executes server commands. -It works in inactive blocks. diff --git a/mesecons/mesecons_commandblock/doc/commandblock/preview.png b/mesecons/mesecons_commandblock/doc/commandblock/preview.png deleted file mode 100644 index d89cc7b..0000000 Binary files a/mesecons/mesecons_commandblock/doc/commandblock/preview.png and /dev/null differ diff --git a/mesecons/mesecons_commandblock/init.lua b/mesecons/mesecons_commandblock/init.lua deleted file mode 100644 index 7db099a..0000000 --- a/mesecons/mesecons_commandblock/init.lua +++ /dev/null @@ -1,212 +0,0 @@ -minetest.register_chatcommand("say", { - params = "", - description = "Say as the server", - privs = {server=true}, - func = function(name, param) - minetest.chat_send_all(name .. ": " .. param) - end -}) - -minetest.register_chatcommand("tell", { - params = " ", - description = "Say to privately", - func = function(name, param) - local found, _, target, message = param:find("^([^%s]+)%s+(.*)$") - if found == nil then - minetest.chat_send_player(name, "Invalid usage: " .. param) - return - end - if not minetest.get_player_by_name(target) then - minetest.chat_send_player(name, "Invalid target: " .. target) - end - minetest.chat_send_player(target, name .. " whispers: " .. message, false) - end -}) - -minetest.register_chatcommand("hp", { - params = " ", - description = "Set health of to hitpoints", - privs = {ban=true}, - func = function(name, param) - local found, _, target, value = param:find("^([^%s]+)%s+(%d+)$") - if found == nil then - minetest.chat_send_player(name, "Invalid usage: " .. param) - return - end - local player = minetest.get_player_by_name(target) - if player then - player:set_hp(value) - else - minetest.chat_send_player(name, "Invalid target: " .. target) - end - end -}) - -local function initialize_data(meta) - local commands = minetest.formspec_escape(meta:get_string("commands")) - meta:set_string("formspec", - "invsize[9,5;]" .. - "textarea[0.5,0.5;8.5,4;commands;Commands;"..commands.."]" .. - "label[1,3.8;@nearest, @farthest, and @random are replaced by the respective player names]" .. - "button_exit[3.3,4.5;2,1;submit;Submit]") - local owner = meta:get_string("owner") - if owner == "" then - owner = "not owned" - else - owner = "owned by " .. owner - end - meta:set_string("infotext", "Command Block\n" .. - "(" .. owner .. ")\n" .. - "Commands: "..commands) -end - -local function construct(pos) - local meta = minetest.get_meta(pos) - - meta:set_string("commands", "tell @nearest Commandblock unconfigured") - - meta:set_string("owner", "") - - initialize_data(meta) -end - -local function after_place(pos, placer) - if placer then - local meta = minetest.get_meta(pos) - meta:set_string("owner", placer:get_player_name()) - initialize_data(meta) - end -end - -local function receive_fields(pos, formname, fields, sender) - if not fields.submit then - return - end - local meta = minetest.get_meta(pos) - local owner = meta:get_string("owner") - if owner ~= "" and sender:get_player_name() ~= owner then - return - end - meta:set_string("commands", fields.commands) - - initialize_data(meta) -end - -local function resolve_commands(commands, pos) - local players = minetest.get_connected_players() - - -- No players online: remove all commands containing - -- @nearest, @farthest and @random - if #players == 0 then - commands = commands:gsub("[^\r\n]+", function (line) - if line:find("@nearest") then return "" end - if line:find("@farthest") then return "" end - if line:find("@random") then return "" end - return line - end) - return commands - end - - local nearest, farthest = nil, nil - local min_distance, max_distance = math.huge, -1 - for index, player in pairs(players) do - local distance = vector.distance(pos, player:getpos()) - if distance < min_distance then - min_distance = distance - nearest = player:get_player_name() - end - if distance > max_distance then - max_distance = distance - farthest = player:get_player_name() - end - end - local random = players[math.random(#players)]:get_player_name() - commands = commands:gsub("@nearest", nearest) - commands = commands:gsub("@farthest", farthest) - commands = commands:gsub("@random", random) - return commands -end - -local function commandblock_action_on(pos, node) - if node.name ~= "mesecons_commandblock:commandblock_off" then - return - end - - minetest.swap_node(pos, {name = "mesecons_commandblock:commandblock_on"}) - - local meta = minetest.get_meta(pos) - local owner = meta:get_string("owner") - if owner == "" then - return - end - - local commands = resolve_commands(meta:get_string("commands"), pos) - for _, command in pairs(commands:split("\n/")) do - local pos = command:find(" ") - local cmd, param = command, "" - if pos then - cmd = command:sub(1, pos - 1) - param = command:sub(pos + 1) - end - local cmddef = minetest.chatcommands[cmd] - if not cmddef then - minetest.chat_send_player(owner, "The command "..cmd.." does not exist") - return - end - local has_privs, missing_privs = minetest.check_player_privs(owner, cmddef.privs) - if not has_privs then - minetest.chat_send_player(owner, "You don't have permission " - .."to run "..cmd - .." (missing privileges: " - ..table.concat(missing_privs, ", ")..")") - return - end - cmddef.func(owner, param) - end -end - -local function commandblock_action_off(pos, node) - if node.name == "mesecons_commandblock:commandblock_on" then - minetest.swap_node(pos, {name = "mesecons_commandblock:commandblock_off"}) - end -end - -local function can_dig(pos, player) - local meta = minetest.get_meta(pos) - local owner = meta:get_string("owner") - return owner == "" or owner == player:get_player_name() -end - -minetest.register_node("mesecons_commandblock:commandblock_off", { - description = "Command Block", - tiles = {"jeija_commandblock_off.png"}, - inventory_image = minetest.inventorycube("jeija_commandblock_off.png"), - is_ground_content = false, - groups = {cracky=2, mesecon_effector_off=1}, - on_construct = construct, - after_place_node = after_place, - on_receive_fields = receive_fields, - can_dig = can_dig, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_on = commandblock_action_on - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_commandblock:commandblock_on", { - tiles = {"jeija_commandblock_on.png"}, - is_ground_content = false, - groups = {cracky=2, mesecon_effector_on=1, not_in_creative_inventory=1}, - light_source = 10, - drop = "mesecons_commandblock:commandblock_off", - on_construct = construct, - after_place_node = after_place, - on_receive_fields = receive_fields, - can_dig = can_dig, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_off = commandblock_action_off - }}, - on_blast = mesecon.on_blastnode, -}) diff --git a/mesecons/mesecons_commandblock/textures/jeija_commandblock_off.png b/mesecons/mesecons_commandblock/textures/jeija_commandblock_off.png deleted file mode 100644 index c05b616..0000000 Binary files a/mesecons/mesecons_commandblock/textures/jeija_commandblock_off.png and /dev/null differ diff --git a/mesecons/mesecons_commandblock/textures/jeija_commandblock_on.png b/mesecons/mesecons_commandblock/textures/jeija_commandblock_on.png deleted file mode 100644 index 7fc35b6..0000000 Binary files a/mesecons/mesecons_commandblock/textures/jeija_commandblock_on.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/depends.txt b/mesecons/mesecons_delayer/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_delayer/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_delayer/doc/delayer/description.html b/mesecons/mesecons_delayer/doc/delayer/description.html deleted file mode 100644 index 966d729..0000000 --- a/mesecons/mesecons_delayer/doc/delayer/description.html +++ /dev/null @@ -1 +0,0 @@ -The delayer delays the signal from the input for a determined time. The time can be set by punching the delayer. Possible delays are: 0.1 seconds, 0.3 seconds, 0.5 seconds and 1 second. You may try to use it for creating songs with the noteblock. It works in unloaded blocks. diff --git a/mesecons/mesecons_delayer/doc/delayer/preview.png b/mesecons/mesecons_delayer/doc/delayer/preview.png deleted file mode 100644 index c57c728..0000000 Binary files a/mesecons/mesecons_delayer/doc/delayer/preview.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/doc/delayer/recipe.png b/mesecons/mesecons_delayer/doc/delayer/recipe.png deleted file mode 100644 index ea394aa..0000000 Binary files a/mesecons/mesecons_delayer/doc/delayer/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/init.lua b/mesecons/mesecons_delayer/init.lua deleted file mode 100644 index 94450db..0000000 --- a/mesecons/mesecons_delayer/init.lua +++ /dev/null @@ -1,184 +0,0 @@ --- Function that get the input/output rules of the delayer -local delayer_get_output_rules = function(node) - local rules = {{x = 0, y = 0, z = 1}} - for i = 0, node.param2 do - rules = mesecon.rotate_rules_left(rules) - end - return rules -end - -local delayer_get_input_rules = function(node) - local rules = {{x = 0, y = 0, z = -1}} - for i = 0, node.param2 do - rules = mesecon.rotate_rules_left(rules) - end - return rules -end - --- Functions that are called after the delay time - -local delayer_activate = function(pos, node) - local def = minetest.registered_nodes[node.name] - local time = def.delayer_time - minetest.swap_node(pos, {name = def.delayer_onstate, param2=node.param2}) - mesecon.queue:add_action(pos, "receptor_on", {delayer_get_output_rules(node)}, time, nil) -end - -local delayer_deactivate = function(pos, node) - local def = minetest.registered_nodes[node.name] - local time = def.delayer_time - minetest.swap_node(pos, {name = def.delayer_offstate, param2=node.param2}) - mesecon.queue:add_action(pos, "receptor_off", {delayer_get_output_rules(node)}, time, nil) -end - --- Register the 2 (states) x 4 (delay times) delayers - -for i = 1, 4 do -local groups = {} -if i == 1 then - groups = {bendy=2,snappy=1,dig_immediate=2} -else - groups = {bendy=2,snappy=1,dig_immediate=2, not_in_creative_inventory=1} -end - -local delaytime -if i == 1 then delaytime = 0.1 -elseif i == 2 then delaytime = 0.3 -elseif i == 3 then delaytime = 0.5 -elseif i == 4 then delaytime = 1.0 end - -local boxes = { - { -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab - - { -2/16, -7/16, -4/16, 2/16, -26/64, -3/16 }, -- the jeweled "on" indicator - { -3/16, -7/16, -3/16, 3/16, -26/64, -2/16 }, - { -4/16, -7/16, -2/16, 4/16, -26/64, 2/16 }, - { -3/16, -7/16, 2/16, 3/16, -26/64, 3/16 }, - { -2/16, -7/16, 3/16, 2/16, -26/64, 4/16 }, - - { -6/16, -7/16, -6/16, -4/16, -27/64, -4/16 }, -- the timer indicator - { -8/16, -8/16, -1/16, -6/16, -7/16, 1/16 }, -- the two wire stubs - { 6/16, -8/16, -1/16, 8/16, -7/16, 1/16 } -} - -minetest.register_node("mesecons_delayer:delayer_off_"..tostring(i), { - description = "Delayer", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_off_"..tostring(i)..".png", - "mesecons_delayer_bottom.png", - "mesecons_delayer_ends_off.png", - "mesecons_delayer_ends_off.png", - "mesecons_delayer_sides_off.png", - "mesecons_delayer_sides_off.png" - }, - inventory_image = "mesecons_delayer_off_1.png", - wield_image = "mesecons_delayer_off_1.png", - walkable = true, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = boxes - }, - groups = groups, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = false, - drop = 'mesecons_delayer:delayer_off_1', - on_punch = function (pos, node) - if node.name=="mesecons_delayer:delayer_off_1" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_2", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_off_2" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_3", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_off_3" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_4", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_off_4" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_off_1", param2=node.param2}) - end - end, - delayer_time = delaytime, - delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i), - sounds = default.node_sound_stone_defaults(), - mesecons = { - receptor = - { - state = mesecon.state.off, - rules = delayer_get_output_rules - }, - effector = - { - rules = delayer_get_input_rules, - action_on = delayer_activate - } - }, - on_blast = mesecon.on_blastnode, -}) - - -minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), { - description = "You hacker you", - drawtype = "nodebox", - tiles = { - "mesecons_delayer_on_"..tostring(i)..".png", - "mesecons_delayer_bottom.png", - "mesecons_delayer_ends_on.png", - "mesecons_delayer_ends_on.png", - "mesecons_delayer_sides_on.png", - "mesecons_delayer_sides_on.png" - }, - walkable = true, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = boxes - }, - groups = {bendy = 2, snappy = 1, dig_immediate = 2, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - is_ground_content = false, - drop = 'mesecons_delayer:delayer_off_1', - on_punch = function (pos, node) - if node.name=="mesecons_delayer:delayer_on_1" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_2", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_on_2" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_3", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_on_3" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_4", param2=node.param2}) - elseif node.name=="mesecons_delayer:delayer_on_4" then - minetest.swap_node(pos, {name = "mesecons_delayer:delayer_on_1", param2=node.param2}) - end - end, - delayer_time = delaytime, - delayer_offstate = "mesecons_delayer:delayer_off_"..tostring(i), - sounds = default.node_sound_stone_defaults(), - mesecons = { - receptor = - { - state = mesecon.state.on, - rules = delayer_get_output_rules - }, - effector = - { - rules = delayer_get_input_rules, - action_off = delayer_deactivate - } - }, - on_blast = mesecon.on_blastnode, -}) -end - -minetest.register_craft({ - output = "mesecons_delayer:delayer_off_1", - recipe = { - {"mesecons_torch:mesecon_torch_on", "group:mesecon_conductor_craftable", "mesecons_torch:mesecon_torch_on"}, - {"default:cobble","default:cobble", "default:cobble"}, - } -}) diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_bottom.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_bottom.png deleted file mode 100644 index 2e49d31..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_bottom.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_off.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_off.png deleted file mode 100644 index 0242deb..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_off.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_on.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_on.png deleted file mode 100644 index 19ae0cb..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_ends_on.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_1.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_off_1.png deleted file mode 100644 index 7372b37..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_1.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_2.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_off_2.png deleted file mode 100644 index e34f0ac..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_2.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_3.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_off_3.png deleted file mode 100644 index 091adbc..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_3.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_4.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_off_4.png deleted file mode 100644 index 7ecc9b6..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_off_4.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_1.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_on_1.png deleted file mode 100644 index 61f52f2..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_1.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_2.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_on_2.png deleted file mode 100644 index 7bd363f..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_2.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_3.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_on_3.png deleted file mode 100644 index b93f725..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_3.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_4.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_on_4.png deleted file mode 100644 index ca90a1e..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_on_4.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_off.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_off.png deleted file mode 100644 index 79f3d59..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_off.png and /dev/null differ diff --git a/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_on.png b/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_on.png deleted file mode 100644 index 1c8edaa..0000000 Binary files a/mesecons/mesecons_delayer/textures/mesecons_delayer_sides_on.png and /dev/null differ diff --git a/mesecons/mesecons_detector/depends.txt b/mesecons/mesecons_detector/depends.txt deleted file mode 100644 index bc7b062..0000000 --- a/mesecons/mesecons_detector/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_materials diff --git a/mesecons/mesecons_detector/doc/nodedetector/description.html b/mesecons/mesecons_detector/doc/nodedetector/description.html deleted file mode 100644 index ee8c09d..0000000 --- a/mesecons/mesecons_detector/doc/nodedetector/description.html +++ /dev/null @@ -1,8 +0,0 @@ -The node detector is a receptor. It changes its state when either any node -or a specific node is detected. Right-click it to set a nodename to scan for. -It can also receive digiline signals. You can either send "GET" and it will -respond with the detected nodename or you can send any other string and it will -set this string as the node to scan for. -Nodenames must include the mod they reside in, so for instance default:dirt, not just dirt. -The distance parameter specifies how many blocks are between the node detector and the node to detect. -Automatic scanning with Mesecons output only works when the detector is in an active block, but Digilines queries always work. diff --git a/mesecons/mesecons_detector/doc/nodedetector/preview.png b/mesecons/mesecons_detector/doc/nodedetector/preview.png deleted file mode 100644 index 1f78161..0000000 Binary files a/mesecons/mesecons_detector/doc/nodedetector/preview.png and /dev/null differ diff --git a/mesecons/mesecons_detector/doc/nodedetector/recipe.png b/mesecons/mesecons_detector/doc/nodedetector/recipe.png deleted file mode 100644 index 958c7e6..0000000 Binary files a/mesecons/mesecons_detector/doc/nodedetector/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_detector/doc/objectdetector/description.html b/mesecons/mesecons_detector/doc/objectdetector/description.html deleted file mode 100644 index a928434..0000000 --- a/mesecons/mesecons_detector/doc/objectdetector/description.html +++ /dev/null @@ -1,5 +0,0 @@ -The object detector is a receptor. It changes its state when a player approaches. -Right-click it to set a name to scan for. -You can also search for comma-separated lists of players where the detector gets activated if any of the names in the list are found. -It can also receive digiline signals which are the name to scan for on the specified channel in the right-click menu. -Automatic scanning with Mesecons output only works when the detector is in an active block, but Digilines queries always work. diff --git a/mesecons/mesecons_detector/doc/objectdetector/preview.png b/mesecons/mesecons_detector/doc/objectdetector/preview.png deleted file mode 100644 index 85c4dea..0000000 Binary files a/mesecons/mesecons_detector/doc/objectdetector/preview.png and /dev/null differ diff --git a/mesecons/mesecons_detector/doc/objectdetector/recipe.png b/mesecons/mesecons_detector/doc/objectdetector/recipe.png deleted file mode 100644 index a1cee00..0000000 Binary files a/mesecons/mesecons_detector/doc/objectdetector/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_detector/init.lua b/mesecons/mesecons_detector/init.lua deleted file mode 100644 index fc7d4c3..0000000 --- a/mesecons/mesecons_detector/init.lua +++ /dev/null @@ -1,315 +0,0 @@ -local GET_COMMAND = "GET" - --- Object detector --- Detects players in a certain radius --- The radius can be specified in mesecons/settings.lua - -local function object_detector_make_formspec(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[9,2.5]" .. - "field[0.3, 0;9,2;scanname;Name of player to scan for (empty for any):;${scanname}]".. - "field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]".. - "button_exit[7,0.75;2,3;;Save]") -end - -local function object_detector_on_receive_fields(pos, formname, fields, sender) - if not fields.scanname or not fields.digiline_channel then return end - - if minetest.is_protected(pos, sender:get_player_name()) then return end - - local meta = minetest.get_meta(pos) - meta:set_string("scanname", fields.scanname) - meta:set_string("digiline_channel", fields.digiline_channel) - object_detector_make_formspec(pos) -end - --- returns true if player was found, false if not -local function object_detector_scan(pos) - local objs = minetest.get_objects_inside_radius(pos, mesecon.setting("detector_radius", 6)) - - -- abort if no scan results were found - if next(objs) == nil then return false end - - local scanname = minetest.get_meta(pos):get_string("scanname") - local scan_for = {} - for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do - scan_for[str] = true - end - - local every_player = scanname == "" - for _, obj in pairs(objs) do - -- "" is returned if it is not a player; "" ~= nil; so only handle objects with foundname ~= "" - local foundname = obj:get_player_name() - if foundname ~= "" then - if every_player or scan_for[foundname] then - return true - end - end - end - - return false -end - --- set player name when receiving a digiline signal on a specific channel -local object_detector_digiline = { - effector = { - action = function(pos, node, channel, msg) - local meta = minetest.get_meta(pos) - if channel == meta:get_string("digiline_channel") then - meta:set_string("scanname", msg) - object_detector_make_formspec(pos) - end - end, - } -} - -minetest.register_node("mesecons_detector:object_detector_off", { - tiles = {"default_steel_block.png", "default_steel_block.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png", "jeija_object_detector_off.png"}, - paramtype = "light", - is_ground_content = false, - walkable = true, - groups = {cracky=3}, - description="Player Detector", - mesecons = {receptor = { - state = mesecon.state.off, - rules = mesecon.rules.pplate - }}, - on_construct = object_detector_make_formspec, - on_receive_fields = object_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = object_detector_digiline, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_detector:object_detector_on", { - tiles = {"default_steel_block.png", "default_steel_block.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png", "jeija_object_detector_on.png"}, - paramtype = "light", - is_ground_content = false, - walkable = true, - groups = {cracky=3,not_in_creative_inventory=1}, - drop = 'mesecons_detector:object_detector_off', - mesecons = {receptor = { - state = mesecon.state.on, - rules = mesecon.rules.pplate - }}, - on_construct = object_detector_make_formspec, - on_receive_fields = object_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = object_detector_digiline, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = 'mesecons_detector:object_detector_off', - recipe = { - {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = 'mesecons_detector:object_detector_off', - recipe = { - {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - {"default:steel_ingot", "mesecons_microcontroller:microcontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"}, - } -}) - -minetest.register_abm({ - nodenames = {"mesecons_detector:object_detector_off"}, - interval = 1, - chance = 1, - action = function(pos, node) - if not object_detector_scan(pos) then return end - - node.name = "mesecons_detector:object_detector_on" - minetest.swap_node(pos, node) - mesecon.receptor_on(pos, mesecon.rules.pplate) - end, -}) - -minetest.register_abm({ - nodenames = {"mesecons_detector:object_detector_on"}, - interval = 1, - chance = 1, - action = function(pos, node) - if object_detector_scan(pos) then return end - - node.name = "mesecons_detector:object_detector_off" - minetest.swap_node(pos, node) - mesecon.receptor_off(pos, mesecon.rules.pplate) - end, -}) - --- Node detector --- Detects the node in front of it - -local function node_detector_make_formspec(pos) - local meta = minetest.get_meta(pos) - if meta:get_string("distance") == "" then meta:set_string("distance", "0") end - meta:set_string("formspec", "size[9,2.5]" .. - "field[0.3, 0;9,2;scanname;Name of node to scan for (empty for any):;${scanname}]".. - "field[0.3,1.5;2.5,2;distance;Distance (0-"..mesecon.setting("node_detector_distance_max", 10).."):;${distance}]".. - "field[3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]".. - "button_exit[7,0.75;2,3;;Save]") -end - -local function node_detector_on_receive_fields(pos, fieldname, fields, sender) - if not fields.scanname or not fields.digiline_channel then return end - - if minetest.is_protected(pos, sender:get_player_name()) then return end - - local meta = minetest.get_meta(pos) - meta:set_string("scanname", fields.scanname) - meta:set_string("distance", fields.distance or "0") - meta:set_string("digiline_channel", fields.digiline_channel) - node_detector_make_formspec(pos) -end - --- returns true if node was found, false if not -local function node_detector_scan(pos) - local node = minetest.get_node_or_nil(pos) - if not node then return end - - local meta = minetest.get_meta(pos) - - local distance = meta:get_int("distance") - local distance_max = mesecon.setting("node_detector_distance_max", 10) - if distance < 0 then distance = 0 end - if distance > distance_max then distance = distance_max end - - local frontname = minetest.get_node( - vector.subtract(pos, vector.multiply(minetest.facedir_to_dir(node.param2), distance + 1)) - ).name - local scanname = meta:get_string("scanname") - - return (frontname == scanname) or - (frontname ~= "air" and frontname ~= "ignore" and scanname == "") -end - --- set player name when receiving a digiline signal on a specific channel -local node_detector_digiline = { - effector = { - action = function(pos, node, channel, msg) - local meta = minetest.get_meta(pos) - - local distance = meta:get_int("distance") - local distance_max = mesecon.setting("node_detector_distance_max", 10) - if distance < 0 then distance = 0 end - if distance > distance_max then distance = distance_max end - - if channel ~= meta:get_string("digiline_channel") then return end - - if msg == GET_COMMAND then - local nodename = minetest.get_node( - vector.subtract(pos, vector.multiply(minetest.facedir_to_dir(node.param2), distance + 1)) - ).name - - digiline:receptor_send(pos, digiline.rules.default, channel, nodename) - else - meta:set_string("scanname", msg) - node_detector_make_formspec(pos) - end - end, - }, - receptor = {} -} - -local function after_place_node_detector(pos, placer) - local placer_pos = placer:getpos() - if not placer_pos then - return - end - - --correct for the player's height - if placer:is_player() then - placer_pos.y = placer_pos.y + 1.625 - end - - --correct for 6d facedir - local node = minetest.get_node(pos) - node.param2 = minetest.dir_to_facedir(vector.subtract(pos, placer_pos), true) - minetest.set_node(pos, node) -end - -minetest.register_node("mesecons_detector:node_detector_off", { - tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "jeija_node_detector_off.png"}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = true, - groups = {cracky=3}, - description="Node Detector", - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_construct = node_detector_make_formspec, - on_receive_fields = node_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = node_detector_digiline, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_detector:node_detector_on", { - tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "default_steel_block.png", "jeija_node_detector_on.png"}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = true, - groups = {cracky=3,not_in_creative_inventory=1}, - drop = 'mesecons_detector:node_detector_off', - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_construct = node_detector_make_formspec, - on_receive_fields = node_detector_on_receive_fields, - sounds = default.node_sound_stone_defaults(), - digiline = node_detector_digiline, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = 'mesecons_detector:node_detector_off', - recipe = { - {"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"}, - {"default:steel_ingot", "mesecons_luacontroller:luacontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - } -}) - -minetest.register_craft({ - output = 'mesecons_detector:node_detector_off', - recipe = { - {"default:steel_ingot", "group:mesecon_conductor_craftable", "default:steel_ingot"}, - {"default:steel_ingot", "mesecons_microcontroller:microcontroller0000", "default:steel_ingot"}, - {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, - } -}) - -minetest.register_abm({ - nodenames = {"mesecons_detector:node_detector_off"}, - interval = 1, - chance = 1, - action = function(pos, node) - if not node_detector_scan(pos) then return end - - node.name = "mesecons_detector:node_detector_on" - minetest.swap_node(pos, node) - mesecon.receptor_on(pos) - end, -}) - -minetest.register_abm({ - nodenames = {"mesecons_detector:node_detector_on"}, - interval = 1, - chance = 1, - action = function(pos, node) - if node_detector_scan(pos) then return end - - node.name = "mesecons_detector:node_detector_off" - minetest.swap_node(pos, node) - mesecon.receptor_off(pos) - end, -}) diff --git a/mesecons/mesecons_detector/textures/jeija_node_detector_off.png b/mesecons/mesecons_detector/textures/jeija_node_detector_off.png deleted file mode 100644 index 6d130ad..0000000 Binary files a/mesecons/mesecons_detector/textures/jeija_node_detector_off.png and /dev/null differ diff --git a/mesecons/mesecons_detector/textures/jeija_node_detector_on.png b/mesecons/mesecons_detector/textures/jeija_node_detector_on.png deleted file mode 100644 index 926a9d1..0000000 Binary files a/mesecons/mesecons_detector/textures/jeija_node_detector_on.png and /dev/null differ diff --git a/mesecons/mesecons_detector/textures/jeija_object_detector_off.png b/mesecons/mesecons_detector/textures/jeija_object_detector_off.png deleted file mode 100644 index 825d78f..0000000 Binary files a/mesecons/mesecons_detector/textures/jeija_object_detector_off.png and /dev/null differ diff --git a/mesecons/mesecons_detector/textures/jeija_object_detector_on.png b/mesecons/mesecons_detector/textures/jeija_object_detector_on.png deleted file mode 100644 index 96f8ba3..0000000 Binary files a/mesecons/mesecons_detector/textures/jeija_object_detector_on.png and /dev/null differ diff --git a/mesecons/mesecons_doors/depends.txt b/mesecons/mesecons_doors/depends.txt deleted file mode 100644 index ed2fcd8..0000000 --- a/mesecons/mesecons_doors/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -doors diff --git a/mesecons/mesecons_doors/init.lua b/mesecons/mesecons_doors/init.lua deleted file mode 100644 index 52d6c17..0000000 --- a/mesecons/mesecons_doors/init.lua +++ /dev/null @@ -1,129 +0,0 @@ --- Modified, from minetest_game/mods/doors/init.lua -local function on_rightclick(pos, dir, check_name, replace, replace_dir, params) - pos.y = pos.y + dir - if not minetest.get_node(pos).name == check_name then - return - end - local p2 = minetest.get_node(pos).param2 - p2 = params[p2 + 1] - - minetest.swap_node(pos, {name = replace_dir, param2 = p2}) - - pos.y = pos.y - dir - minetest.swap_node(pos, {name = replace, param2 = p2}) - - if (minetest.get_meta(pos):get_int("right") ~= 0) == (params[1] ~= 3) then - minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10}) - else - minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10}) - end -end - -local function meseconify_door(name) - if minetest.registered_items[name .. "_b_1"] then - -- old style double-node doors - local function toggle_state1 (pos, node) - on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0}) - end - - local function toggle_state2 (pos, node) - on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2}) - end - - minetest.override_item(name.."_b_1", { - mesecons = {effector = { - action_on = toggle_state1, - action_off = toggle_state1, - rules = mesecon.rules.pplate - }} - }) - - minetest.override_item(name.."_b_2", { - mesecons = {effector = { - action_on = toggle_state2, - action_off = toggle_state2, - rules = mesecon.rules.pplate - }} - }) - elseif minetest.registered_items[name .. "_a"] then - -- new style mesh node based doors - local override = { - mesecons = {effector = { - action_on = function(pos, node) - local door = doors.get(pos) - if door then - door:open() - end - end, - action_off = function(pos, node) - local door = doors.get(pos) - if door then - door:close() - end - end, - rules = mesecon.rules.pplate - }} - } - minetest.override_item(name .. "_a", override) - minetest.override_item(name .. "_b", override) - end -end - -meseconify_door("doors:door_wood") -meseconify_door("doors:door_steel") -meseconify_door("doors:door_glass") -meseconify_door("doors:door_obsidian_glass") - --- Trapdoor -local function trapdoor_switch(pos, node) - local state = minetest.get_meta(pos):get_int("state") - - if state == 1 then - minetest.sound_play("doors_door_close", {pos = pos, gain = 0.3, max_hear_distance = 10}) - minetest.set_node(pos, {name="doors:trapdoor", param2 = node.param2}) - else - minetest.sound_play("doors_door_open", {pos = pos, gain = 0.3, max_hear_distance = 10}) - minetest.set_node(pos, {name="doors:trapdoor_open", param2 = node.param2}) - end - - minetest.get_meta(pos):set_int("state", state == 1 and 0 or 1) -end - -if doors and doors.get then - local override = { - mesecons = {effector = { - action_on = function(pos, node) - local door = doors.get(pos) - if door then - door:open() - end - end, - action_off = function(pos, node) - local door = doors.get(pos) - if door then - door:close() - end - end, - }}, - } - minetest.override_item("doors:trapdoor", override) - minetest.override_item("doors:trapdoor_open", override) - minetest.override_item("doors:trapdoor_steel", override) - minetest.override_item("doors:trapdoor_steel_open", override) -else - if minetest.registered_nodes["doors:trapdoor"] then - minetest.override_item("doors:trapdoor", { - mesecons = {effector = { - action_on = trapdoor_switch, - action_off = trapdoor_switch - }}, - }) - - minetest.override_item("doors:trapdoor_open", { - mesecons = {effector = { - action_on = trapdoor_switch, - action_off = trapdoor_switch - }}, - }) - end -end diff --git a/mesecons/mesecons_extrawires/corner.lua b/mesecons/mesecons_extrawires/corner.lua deleted file mode 100644 index d33447a..0000000 --- a/mesecons/mesecons_extrawires/corner.lua +++ /dev/null @@ -1,94 +0,0 @@ -local screwdriver_exists = minetest.global_exists("screwdriver") - -local corner_nodebox = { - type = "fixed", - -- ±0.001 is to prevent z-fighting - fixed = {{ -16/32-0.001, -17/32, -3/32, 0, -13/32, 3/32 }, - { -3/32, -17/32, -16/32+0.001, 3/32, -13/32, 3/32}} -} - -local corner_selectionbox = { - type = "fixed", - fixed = { -16/32, -16/32, -16/32, 5/32, -12/32, 5/32 }, -} - -local corner_get_rules = function (node) - local rules = - {{x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}} - - for i = 0, node.param2 do - rules = mesecon.rotate_rules_left(rules) - end - - return rules -end - -minetest.register_node("mesecons_extrawires:corner_on", { - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_curved_tb_on.png", - "jeija_insulated_wire_curved_tb_on.png^[transformR270", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = false, - sunlight_propagates = true, - selection_box = corner_selectionbox, - node_box = corner_nodebox, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_extrawires:corner_off", - sounds = default.node_sound_defaults(), - mesecons = {conductor = - { - state = mesecon.state.on, - rules = corner_get_rules, - offstate = "mesecons_extrawires:corner_off" - }}, - on_blast = mesecon.on_blastnode, - on_rotate = screwdriver_exists and screwdriver.rotate_simple, -}) - -minetest.register_node("mesecons_extrawires:corner_off", { - drawtype = "nodebox", - description = "Insulated Mesecon Corner", - tiles = { - "jeija_insulated_wire_curved_tb_off.png", - "jeija_insulated_wire_curved_tb_off.png^[transformR270", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = false, - sunlight_propagates = true, - selection_box = corner_selectionbox, - node_box = corner_nodebox, - groups = {dig_immediate = 3}, - sounds = default.node_sound_defaults(), - mesecons = {conductor = - { - state = mesecon.state.off, - rules = corner_get_rules, - onstate = "mesecons_extrawires:corner_on" - }}, - on_blast = mesecon.on_blastnode, - on_rotate = screwdriver_exists and screwdriver.rotate_simple, -}) - -minetest.register_craft({ - output = "mesecons_extrawires:corner_off 3", - recipe = { - {"", "", ""}, - {"mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off", ""}, - {"", "mesecons_insulated:insulated_off", ""}, - } -}) diff --git a/mesecons/mesecons_extrawires/crossover.lua b/mesecons/mesecons_extrawires/crossover.lua deleted file mode 100644 index 2656d61..0000000 --- a/mesecons/mesecons_extrawires/crossover.lua +++ /dev/null @@ -1,143 +0,0 @@ -local function crossover_get_rules(node) - return { - {--first wire - {x=-1,y=0,z=0}, - {x=1,y=0,z=0}, - }, - {--second wire - {x=0,y=0,z=-1}, - {x=0,y=0,z=1}, - }, - } -end - -local crossover_states = { - "mesecons_extrawires:crossover_off", - "mesecons_extrawires:crossover_01", - "mesecons_extrawires:crossover_10", - "mesecons_extrawires:crossover_on", -} - -minetest.register_node("mesecons_extrawires:crossover_off", { - description = "Insulated Mesecon Crossover", - drawtype = "mesh", - mesh = "mesecons_extrawires_crossover.b3d", - tiles = { - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - is_ground_content = false, - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}}, - groups = {dig_immediate=3, mesecon=3}, - sounds = default.node_sound_defaults(), - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_extrawires:crossover_01", { - description = "You hacker you!", - drop = "mesecons_extrawires:crossover_off", - drawtype = "mesh", - mesh = "mesecons_extrawires_crossover.b3d", - tiles = { - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - is_ground_content = false, - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}}, - groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1}, - sounds = default.node_sound_defaults(), - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_extrawires:crossover_10", { - description = "You hacker you!", - drop = "mesecons_extrawires:crossover_off", - drawtype = "mesh", - mesh = "mesecons_extrawires_crossover.b3d", - tiles = { - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - is_ground_content = false, - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}}, - groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1}, - sounds = default.node_sound_defaults(), - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_extrawires:crossover_on", { - description = "You hacker you!", - drop = "mesecons_extrawires:crossover_off", - drawtype = "mesh", - mesh = "mesecons_extrawires_crossover.b3d", - tiles = { - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - is_ground_content = false, - walkable = false, - stack_max = 99, - selection_box = {type="fixed", fixed={-16/32, -16/32, -16/32, 16/32, -5/32, 16/32}}, - groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1}, - sounds = default.node_sound_defaults(), - mesecons = { - conductor = { - states = crossover_states, - rules = crossover_get_rules(), - } - }, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_extrawires:crossover_off", - recipe = { - "mesecons_insulated:insulated_off", - "mesecons_insulated:insulated_off", - }, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_insulated:insulated_off 2", - recipe = { - "mesecons_extrawires:crossover_off", - }, -}) diff --git a/mesecons/mesecons_extrawires/depends.txt b/mesecons/mesecons_extrawires/depends.txt deleted file mode 100644 index 369aeb7..0000000 --- a/mesecons/mesecons_extrawires/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -default -mesecons -screwdriver? diff --git a/mesecons/mesecons_extrawires/doc/corner/description.html b/mesecons/mesecons_extrawires/doc/corner/description.html deleted file mode 100644 index fc420d1..0000000 --- a/mesecons/mesecons_extrawires/doc/corner/description.html +++ /dev/null @@ -1 +0,0 @@ -Insulated corners are conductors that only conduct between the inputs (also not up or down). When placing they always point to the left in direction of your vision. Like uninsulated wires, they work through unloaded blocks. diff --git a/mesecons/mesecons_extrawires/doc/corner/preview.png b/mesecons/mesecons_extrawires/doc/corner/preview.png deleted file mode 100644 index 9713229..0000000 Binary files a/mesecons/mesecons_extrawires/doc/corner/preview.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/corner/recipe.png b/mesecons/mesecons_extrawires/doc/corner/recipe.png deleted file mode 100644 index ac85b01..0000000 Binary files a/mesecons/mesecons_extrawires/doc/corner/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/crossing/description.html b/mesecons/mesecons_extrawires/doc/crossing/description.html deleted file mode 100644 index 5f02382..0000000 --- a/mesecons/mesecons_extrawires/doc/crossing/description.html +++ /dev/null @@ -1 +0,0 @@ -Insulated crossing are conductors that conduct two signals between the opposing sides, the signals are insulated to each other. Like uninsulated wires, they work through unloaded blocks. diff --git a/mesecons/mesecons_extrawires/doc/crossing/preview.png b/mesecons/mesecons_extrawires/doc/crossing/preview.png deleted file mode 100644 index 66aaa05..0000000 Binary files a/mesecons/mesecons_extrawires/doc/crossing/preview.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/crossing/recipe.png b/mesecons/mesecons_extrawires/doc/crossing/recipe.png deleted file mode 100644 index ac37401..0000000 Binary files a/mesecons/mesecons_extrawires/doc/crossing/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/mese/description.html b/mesecons/mesecons_extrawires/doc/mese/description.html deleted file mode 100644 index b29e92c..0000000 --- a/mesecons/mesecons_extrawires/doc/mese/description.html +++ /dev/null @@ -1 +0,0 @@ -The basic prerequesite for mesecons, can be crafted into wires and other stuff. Have a look at the Minetest Wiki for more information. Mese is a conductor. It conducts in all six directions: Up/Down/Left/Right/Forward/Backward. Like horizontal wires, Mese conduction works through unloaded blocks. diff --git a/mesecons/mesecons_extrawires/doc/mese/preview.png b/mesecons/mesecons_extrawires/doc/mese/preview.png deleted file mode 100644 index 3ce0ea4..0000000 Binary files a/mesecons/mesecons_extrawires/doc/mese/preview.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/mese/recipe.png b/mesecons/mesecons_extrawires/doc/mese/recipe.png deleted file mode 100644 index 904cf0b..0000000 Binary files a/mesecons/mesecons_extrawires/doc/mese/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/tjunction/description.html b/mesecons/mesecons_extrawires/doc/tjunction/description.html deleted file mode 100644 index 647bba6..0000000 --- a/mesecons/mesecons_extrawires/doc/tjunction/description.html +++ /dev/null @@ -1 +0,0 @@ -Insulated T-Junctions are conductors that only conduct between the inputs (also not up or down). Like uninsulated wires, they work through unloaded blocks. diff --git a/mesecons/mesecons_extrawires/doc/tjunction/preview.png b/mesecons/mesecons_extrawires/doc/tjunction/preview.png deleted file mode 100644 index 4dec841..0000000 Binary files a/mesecons/mesecons_extrawires/doc/tjunction/preview.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/tjunction/recipe.png b/mesecons/mesecons_extrawires/doc/tjunction/recipe.png deleted file mode 100644 index 8602941..0000000 Binary files a/mesecons/mesecons_extrawires/doc/tjunction/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/vertical/description.html b/mesecons/mesecons_extrawires/doc/vertical/description.html deleted file mode 100644 index 8508542..0000000 --- a/mesecons/mesecons_extrawires/doc/vertical/description.html +++ /dev/null @@ -1 +0,0 @@ -Vertical Mesecons only conduct up and down. Plates appear at the ends, at that place they also conduct to the side. Like horizontal wires, they work through unloaded blocks. diff --git a/mesecons/mesecons_extrawires/doc/vertical/preview.png b/mesecons/mesecons_extrawires/doc/vertical/preview.png deleted file mode 100644 index aad6ea8..0000000 Binary files a/mesecons/mesecons_extrawires/doc/vertical/preview.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/doc/vertical/recipe.png b/mesecons/mesecons_extrawires/doc/vertical/recipe.png deleted file mode 100644 index 83bc498..0000000 Binary files a/mesecons/mesecons_extrawires/doc/vertical/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_extrawires/init.lua b/mesecons/mesecons_extrawires/init.lua deleted file mode 100644 index b22f2e5..0000000 --- a/mesecons/mesecons_extrawires/init.lua +++ /dev/null @@ -1,5 +0,0 @@ -dofile(minetest.get_modpath("mesecons_extrawires").."/crossover.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/tjunction.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/corner.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/vertical.lua"); -dofile(minetest.get_modpath("mesecons_extrawires").."/mesewire.lua"); diff --git a/mesecons/mesecons_extrawires/mesewire.lua b/mesecons/mesecons_extrawires/mesewire.lua deleted file mode 100644 index 455f75f..0000000 --- a/mesecons/mesecons_extrawires/mesewire.lua +++ /dev/null @@ -1,37 +0,0 @@ -local mesewire_rules = -{ - {x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}, - {x = 0, y = 1, z = 0}, - {x = 0, y =-1, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z =-1}, -} - -minetest.override_item("default:mese", { - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:mese_powered", - rules = mesewire_rules - }} -}) - --- Copy node definition of powered mese from normal mese --- and brighten texture tiles to indicate mese is powered -local powered_def = mesecon.mergetable(minetest.registered_nodes["default:mese"], { - drop = "default:mese", - light_source = 5, - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "default:mese", - rules = mesewire_rules - }}, - groups = {cracky = 1, not_in_creative_inventory = 1}, - on_blast = mesecon.on_blastnode, -}) - -for i, v in pairs(powered_def.tiles) do - powered_def.tiles[i] = v .. "^[brighten" -end - -minetest.register_node("mesecons_extrawires:mese_powered", powered_def) diff --git a/mesecons/mesecons_extrawires/models/mesecons_extrawires_crossover.b3d b/mesecons/mesecons_extrawires/models/mesecons_extrawires_crossover.b3d deleted file mode 100644 index e776535..0000000 Binary files a/mesecons/mesecons_extrawires/models/mesecons_extrawires_crossover.b3d and /dev/null differ diff --git a/mesecons/mesecons_extrawires/src/mesecons_extrawires_crossover.blend b/mesecons/mesecons_extrawires/src/mesecons_extrawires_crossover.blend deleted file mode 100644 index 9ad3749..0000000 Binary files a/mesecons/mesecons_extrawires/src/mesecons_extrawires_crossover.blend and /dev/null differ diff --git a/mesecons/mesecons_extrawires/tjunction.lua b/mesecons/mesecons_extrawires/tjunction.lua deleted file mode 100644 index 77c4290..0000000 --- a/mesecons/mesecons_extrawires/tjunction.lua +++ /dev/null @@ -1,95 +0,0 @@ -local screwdriver_exists = minetest.global_exists("screwdriver") - -local tjunction_nodebox = { - type = "fixed", - -- ±0.001 is to prevent z-fighting - fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, - { -3/32, -17/32, -16/32+0.001, 3/32, -13/32, -3/32},} -} - -local tjunction_selectionbox = { - type = "fixed", - fixed = { -16/32, -16/32, -16/32, 16/32, -12/32, 7/32 }, -} - -local tjunction_get_rules = function (node) - local rules = - {{x = 0, y = 0, z = 1}, - {x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}} - - for i = 0, node.param2 do - rules = mesecon.rotate_rules_left(rules) - end - - return rules -end - -minetest.register_node("mesecons_extrawires:tjunction_on", { - drawtype = "nodebox", - tiles = { - "jeija_insulated_wire_tjunction_tb_on.png", - "jeija_insulated_wire_tjunction_tb_on.png^[transformR180", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = false, - sunlight_propagates = true, - selection_box = tjunction_selectionbox, - node_box = tjunction_nodebox, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_extrawires:tjunction_off", - sounds = default.node_sound_defaults(), - mesecons = {conductor = - { - state = mesecon.state.on, - rules = tjunction_get_rules, - offstate = "mesecons_extrawires:tjunction_off" - }}, - on_blast = mesecon.on_blastnode, - on_rotate = screwdriver_exists and screwdriver.rotate_simple, -}) - -minetest.register_node("mesecons_extrawires:tjunction_off", { - drawtype = "nodebox", - description = "Insulated Mesecon T-junction", - tiles = { - "jeija_insulated_wire_tjunction_tb_off.png", - "jeija_insulated_wire_tjunction_tb_off.png^[transformR180", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = false, - sunlight_propagates = true, - selection_box = tjunction_selectionbox, - node_box = tjunction_nodebox, - groups = {dig_immediate = 3}, - sounds = default.node_sound_defaults(), - mesecons = {conductor = - { - state = mesecon.state.off, - rules = tjunction_get_rules, - onstate = "mesecons_extrawires:tjunction_on" - }}, - on_blast = mesecon.on_blastnode, - on_rotate = screwdriver_exists and screwdriver.rotate_simple, -}) - -minetest.register_craft({ - output = "mesecons_extrawires:tjunction_off 3", - recipe = { - {"", "", ""}, - {"mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off"}, - {"", "mesecons_insulated:insulated_off", ""}, - } -}) diff --git a/mesecons/mesecons_extrawires/vertical.lua b/mesecons/mesecons_extrawires/vertical.lua deleted file mode 100644 index 1543194..0000000 --- a/mesecons/mesecons_extrawires/vertical.lua +++ /dev/null @@ -1,187 +0,0 @@ -local vertical_box = { - type = "fixed", - fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16} -} - -local top_box = { - type = "fixed", - fixed = {{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}} -} - -local bottom_box = { - type = "fixed", - fixed = { - {-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}, - {-1/16, -7/16, -1/16, 1/16, 8/16, 1/16}, - } -} - -local vertical_rules = { - {x=0, y=1, z=0}, - {x=0, y=-1, z=0} -} - -local top_rules = { - {x=1,y=0, z=0}, - {x=-1,y=0, z=0}, - {x=0,y=0, z=1}, - {x=0,y=0, z=-1}, - {x=0,y=-1, z=0} -} - -local bottom_rules = { - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=0, y=1, z=0}, - {x=0, y=2, z=0} -- receive power from pressure plate / detector / ... 2 nodes above -} - -local vertical_updatepos = function (pos) - local node = minetest.get_node(pos) - if minetest.registered_nodes[node.name] - and minetest.registered_nodes[node.name].is_vertical_conductor then - local node_above = minetest.get_node(vector.add(pos, vertical_rules[1])) - local node_below = minetest.get_node(vector.add(pos, vertical_rules[2])) - - local above = minetest.registered_nodes[node_above.name] - and minetest.registered_nodes[node_above.name].is_vertical_conductor - local below = minetest.registered_nodes[node_below.name] - and minetest.registered_nodes[node_below.name].is_vertical_conductor - - mesecon.on_dignode(pos, node) - - -- Always place offstate conductor and let mesecon.on_placenode take care - local newname = "mesecons_extrawires:vertical_" - if above and below then -- above and below: vertical mesecon - newname = newname .. "off" - elseif above and not below then -- above only: bottom - newname = newname .. "bottom_off" - elseif not above and below then -- below only: top - newname = newname .. "top_off" - else -- no vertical wire above, no vertical wire below: use bottom - newname = newname .. "bottom_off" - end - - minetest.set_node(pos, {name = newname}) - mesecon.on_placenode(pos, {name = newname}) - end -end - -local vertical_update = function (pos, node) - vertical_updatepos(pos) -- this one - vertical_updatepos(vector.add(pos, vertical_rules[1])) -- above - vertical_updatepos(vector.add(pos, vertical_rules[2])) -- below -end - --- Vertical wire -mesecon.register_node("mesecons_extrawires:vertical", { - description = "Vertical Mesecon", - drawtype = "nodebox", - walkable = false, - paramtype = "light", - is_ground_content = false, - sunlight_propagates = true, - selection_box = vertical_box, - node_box = vertical_box, - is_vertical_conductor = true, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, - sounds = default.node_sound_defaults(), -},{ - tiles = {"mesecons_wire_off.png"}, - groups = {dig_immediate=3}, - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:vertical_on", - rules = vertical_rules, - }} -},{ - tiles = {"mesecons_wire_on.png"}, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_extrawires:vertical_off", - rules = vertical_rules, - }} -}) - --- Vertical wire top -mesecon.register_node("mesecons_extrawires:vertical_top", { - description = "Vertical mesecon", - drawtype = "nodebox", - walkable = false, - paramtype = "light", - is_ground_content = false, - sunlight_propagates = true, - groups = {dig_immediate=3, not_in_creative_inventory=1}, - selection_box = top_box, - node_box = top_box, - is_vertical_conductor = true, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, - sounds = default.node_sound_defaults(), -},{ - tiles = {"mesecons_wire_off.png"}, - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:vertical_top_on", - rules = top_rules, - }} -},{ - tiles = {"mesecons_wire_on.png"}, - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_extrawires:vertical_top_off", - rules = top_rules, - }} -}) - --- Vertical wire bottom -mesecon.register_node("mesecons_extrawires:vertical_bottom", { - description = "Vertical mesecon", - drawtype = "nodebox", - walkable = false, - paramtype = "light", - is_ground_content = false, - sunlight_propagates = true, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - selection_box = bottom_box, - node_box = bottom_box, - is_vertical_conductor = true, - drop = "mesecons_extrawires:vertical_off", - after_place_node = vertical_update, - after_dig_node = vertical_update, - sounds = default.node_sound_defaults(), -},{ - tiles = {"mesecons_wire_off.png"}, - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_extrawires:vertical_bottom_on", - rules = bottom_rules, - }} -},{ - tiles = {"mesecons_wire_on.png"}, - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_extrawires:vertical_bottom_off", - rules = bottom_rules, - }} -}) - -minetest.register_craft({ - output = "mesecons_extrawires:vertical_off 3", - recipe = { - {"mesecons:wire_00000000_off"}, - {"mesecons:wire_00000000_off"}, - {"mesecons:wire_00000000_off"} - } -}) - -minetest.register_craft({ - output = "mesecons:wire_00000000_off", - recipe = {{"mesecons_extrawires:vertical_off"}} -}) diff --git a/mesecons/mesecons_fpga/depends.txt b/mesecons/mesecons_fpga/depends.txt deleted file mode 100644 index a0ba1ef..0000000 --- a/mesecons/mesecons_fpga/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -screwdriver? diff --git a/mesecons/mesecons_fpga/doc/fpga/description.html b/mesecons/mesecons_fpga/doc/fpga/description.html deleted file mode 100644 index a4cbeed..0000000 --- a/mesecons/mesecons_fpga/doc/fpga/description.html +++ /dev/null @@ -1,6 +0,0 @@ -FPGAs can be used to chain multiple logic gates together in a compact manner. -They come with 4 I/O ports and 10 internal registers, -which can then be connected with each other to form logic circuits. -They work fine in unloaded blocks.
-Supported gate types: AND, OR, NOT, XOR, NAND, XNOR, Buffer (=)
-I/O ports: A B C D; Registers: numbered 0 to 9 diff --git a/mesecons/mesecons_fpga/doc/fpga/preview.png b/mesecons/mesecons_fpga/doc/fpga/preview.png deleted file mode 100644 index c156321..0000000 Binary files a/mesecons/mesecons_fpga/doc/fpga/preview.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/doc/fpga/recipe.png b/mesecons/mesecons_fpga/doc/fpga/recipe.png deleted file mode 100644 index 1140bfa..0000000 Binary files a/mesecons/mesecons_fpga/doc/fpga/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/doc/programmer/description.html b/mesecons/mesecons_fpga/doc/programmer/description.html deleted file mode 100644 index 39e2374..0000000 --- a/mesecons/mesecons_fpga/doc/programmer/description.html +++ /dev/null @@ -1,3 +0,0 @@ -The FPGA programmer can be used to copy gate configurations from one FPGA to another.
-Shift+Right-Click an FPGA to read its configuration and "remember" it. -Left-click (punch) FPGAs to write the saved configuration to them. diff --git a/mesecons/mesecons_fpga/doc/programmer/preview.png b/mesecons/mesecons_fpga/doc/programmer/preview.png deleted file mode 100644 index 7437d39..0000000 Binary files a/mesecons/mesecons_fpga/doc/programmer/preview.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/doc/programmer/recipe.png b/mesecons/mesecons_fpga/doc/programmer/recipe.png deleted file mode 100644 index 778ec5f..0000000 Binary files a/mesecons/mesecons_fpga/doc/programmer/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/init.lua b/mesecons/mesecons_fpga/init.lua deleted file mode 100644 index 941b61a..0000000 --- a/mesecons/mesecons_fpga/init.lua +++ /dev/null @@ -1,420 +0,0 @@ -local plg = {} -plg.rules = {} - -local lcore = dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/logic.lua") -dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/tool.lua")(plg) - - -plg.register_nodes = function(template) - -- each loop is for one of the 4 IO ports - for a = 0, 1 do - for b = 0, 1 do - for c = 0, 1 do - for d = 0, 1 do - local ndef = table.copy(template) - local nodename = "mesecons_fpga:fpga" - .. tostring(d) .. tostring(c) .. tostring(b) .. tostring(a) - - -- build top texture string - local texture = "jeija_fpga_top.png" - if a == 1 then texture = texture .. "^jeija_microcontroller_LED_A.png" end - if b == 1 then texture = texture .. "^jeija_microcontroller_LED_B.png" end - if c == 1 then texture = texture .. "^jeija_microcontroller_LED_C.png" end - if d == 1 then texture = texture .. "^jeija_microcontroller_LED_D.png" end - ndef.tiles[1] = texture - ndef.inventory_image = texture - - if (a + b + c + d) > 0 then - ndef.groups["not_in_creative_inventory"] = 1 - end - - -- interaction with mesecons (input / output) - local rules_out = {} - if a == 1 then table.insert(rules_out, {x = -1, y = 0, z = 0}) end - if b == 1 then table.insert(rules_out, {x = 0, y = 0, z = 1}) end - if c == 1 then table.insert(rules_out, {x = 1, y = 0, z = 0}) end - if d == 1 then table.insert(rules_out, {x = 0, y = 0, z = -1}) end - plg.rules[nodename] = rules_out - - local rules_in = {} - if a == 0 then table.insert(rules_in, {x = -1, y = 0, z = 0}) end - if b == 0 then table.insert(rules_in, {x = 0, y = 0, z = 1}) end - if c == 0 then table.insert(rules_in, {x = 1, y = 0, z = 0}) end - if d == 0 then table.insert(rules_in, {x = 0, y = 0, z = -1}) end - ndef.mesecons.effector.rules = rules_in - - if (a + b + c + d) > 0 then - ndef.mesecons.receptor = { - state = mesecon.state.on, - rules = rules_out, - } - end - - minetest.register_node(nodename, ndef) - end - end - end - end -end - -plg.register_nodes({ - description = "FPGA", - drawtype = "nodebox", - tiles = { - "", -- replaced later - "jeija_microcontroller_bottom.png", - "jeija_fpga_sides.png", - "jeija_fpga_sides.png", - "jeija_fpga_sides.png", - "jeija_fpga_sides.png" - }, - inventory_image = "", -- replaced later - is_ground_content = false, - sunlight_propagates = true, - paramtype = "light", - walkable = true, - groups = {dig_immediate = 2, mesecon = 3, overheat = 1}, - drop = "mesecons_fpga:fpga0000", - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { - { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab - { -5/16, -7/16, -5/16, 5/16, -6/16, 5/16 }, -- circuit board - { -3/16, -6/16, -3/16, 3/16, -5/16, 3/16 }, -- IC - } - }, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - local is = { {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {} } - - meta:set_string("instr", lcore.serialize(is)) - meta:set_int("valid", 0) - meta:set_string("formspec", plg.to_formspec_string(is)) - meta:set_string("infotext", "FPGA") - end, - on_receive_fields = function(pos, formname, fields, sender) - if fields.program == nil then return end -- we only care when the user clicks "Program" - local meta = minetest.get_meta(pos) - local is = plg.from_formspec_fields(fields) - - meta:set_string("instr", lcore.serialize(is)) - plg.update_formspec(pos, is) - end, - sounds = default.node_sound_stone_defaults(), - mesecons = { - effector = { - rules = {}, -- replaced later - action_change = function(pos, node, rule, newstate) - plg.ports_changed(pos, rule, newstate) - plg.update(pos) - end - } - }, - after_dig_node = function(pos, node) - mesecon.receptor_off(pos, plg.rules[node.name]) - end, - on_blast = mesecon.on_blastnode, - on_rotate = function(pos, node, user, mode) - local abcd1 = {"A", "B", "C", "D"} - local abcd2 = {A = 1, B = 2, C = 3, D = 4} - local ops = {"op1", "op2", "dst"} - local dir = 0 - if mode == screwdriver.ROTATE_FACE then -- clock-wise - dir = 1 - if user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), - "FPGA ports have been rotated clockwise.") - end - elseif mode == screwdriver.ROTATE_AXIS then -- counter-clockwise - dir = -1 - if user and user:is_player() then - minetest.chat_send_player(user:get_player_name(), - "FPGA ports have been rotated counter-clockwise.") - end - end - - local meta = minetest.get_meta(pos) - local instr = lcore.deserialize(meta:get_string("instr")) - for i = 1, #instr do - for _, op in ipairs(ops) do - local o = instr[i][op] - if o and o.type == "io" then - local num = abcd2[o.port] - num = num + dir - if num > 4 then num = 1 - elseif num < 1 then num = 4 end - instr[i][op].port = abcd1[num] - end - end - end - - meta:set_string("instr", lcore.serialize(instr)) - plg.update_formspec(pos, instr) - return true - end, -}) - - -plg.to_formspec_string = function(is) - local function dropdown_op(x, y, name, val) - local s = "dropdown[" .. tostring(x) .. "," .. tostring(y) .. ";" - .. "0.75,0.5;" .. name .. ";" -- the height seems to be ignored? - s = s .. " ,A,B,C,D,0,1,2,3,4,5,6,7,8,9;" - if val == nil then - s = s .. "0" -- actually selects no field at all - elseif val.type == "io" then - local mapping = { - ["A"] = 1, - ["B"] = 2, - ["C"] = 3, - ["D"] = 4, - } - s = s .. tostring(1 + mapping[val.port]) - else -- "reg" - s = s .. tostring(6 + val.n) - end - return s .. "]" - end - local function dropdown_action(x, y, name, val) - local s = "dropdown[" .. tostring(x) .. "," .. tostring(y) .. ";" - .. "1.125,0.5;" .. name .. ";" -- the height seems to be ignored? - s = s .. " , AND, OR, NOT, XOR,NAND, =,XNOR;" - if val == nil then - return s .. "0]" -- actually selects no field at all - end - local mapping = { - ["and"] = 1, - ["or"] = 2, - ["not"] = 3, - ["xor"] = 4, - ["nand"] = 5, - ["buf"] = 6, - ["xnor"] = 7, - } - return s .. tostring(1 + mapping[val]) .. "]" - end - local s = "size[9,9]".. - "label[3.4,-0.15;FPGA gate configuration]".. - "button_exit[7,7.5;2,2.5;program;Program]".. - "box[4.2,0.5;0.03,7;#ffffff]".. - "label[0.25,0.25;op. 1]".. - "label[1.0,0.25;gate type]".. - "label[2.125,0.25;op. 2]".. - "label[3.15,0.25;dest]".. - "label[4.5,0.25;op. 1]".. - "label[5.25,0.25;gate type]".. - "label[6.375,0.25;op. 2]".. - "label[7.4,0.25;dest]" - local x = 1 - 0.75 - local y = 1 - 0.25 - for i = 1, 14 do - local cur = is[i] - s = s .. dropdown_op (x , y, tostring(i).."op1", cur.op1) - s = s .. dropdown_action(x+0.75 , y, tostring(i).."act", cur.action) - s = s .. dropdown_op (x+1.875, y, tostring(i).."op2", cur.op2) - s = s .. "label[" .. tostring(x+2.625) .. "," .. tostring(y+0.1) .. "; ->]" - s = s .. dropdown_op (x+2.9 , y, tostring(i).."dst", cur.dst) - y = y + 1 - - if i == 7 then - x = 4.5 - y = 1 - 0.25 - end - end - return s -end - -plg.from_formspec_fields = function(fields) - local function read_op(s) - if s == nil or s == " " then - return nil - elseif s == "A" or s == "B" or s == "C" or s == "D" then - return {type = "io", port = s} - else - return {type = "reg", n = tonumber(s)} - end - end - local function read_action(s) - if s == nil or s == " " then - return nil - end - local mapping = { - ["AND"] = "and", - ["OR"] = "or", - ["NOT"] = "not", - ["XOR"] = "xor", - ["NAND"] = "nand", - ["="] = "buf", - ["XNOR"] = "xnor", - } - s = s:gsub("^%s*", "") -- remove leading spaces - return mapping[s] - end - local is = {} - for i = 1, 14 do - local cur = {} - cur.op1 = read_op(fields[tonumber(i) .. "op1"]) - cur.action = read_action(fields[tonumber(i) .. "act"]) - cur.op2 = read_op(fields[tonumber(i) .. "op2"]) - cur.dst = read_op(fields[tonumber(i) .. "dst"]) - is[#is + 1] = cur - end - return is -end - -plg.update_formspec = function(pos, is) - if type(is) == "string" then -- serialized string - is = lcore.deserialize(is) - end - local meta = minetest.get_meta(pos) - local form = plg.to_formspec_string(is) - - local err = lcore.validate(is) - if err == nil then - meta:set_int("valid", 1) - meta:set_string("infotext", "FPGA (functional)") - else - meta:set_int("valid", 0) - meta:set_string("infotext", "FPGA") - local fmsg = minetest.colorize("#ff0000", minetest.formspec_escape(err.msg)) - form = form .. plg.red_box_around(err.i) .. - "label[0.25,8.25;The gate configuration is erroneous in the marked area:]".. - "label[0.25,8.5;" .. fmsg .. "]" - end - - meta:set_string("formspec", form) - - -- reset ports and run programmed logic - plg.setports(pos, false, false, false, false) - plg.update(pos) -end - -plg.red_box_around = function(i) - local x, y - if i > 7 then - x = 4.5 - y = 0.75 + (i - 8) - else - x = 0.25 - y = 0.75 + (i - 1) - end - return string.format("box[%f,%f;3.8,0.8;#ff0000]", x-0.1, y-0.05) -end - - -plg.update = function(pos) - local meta = minetest.get_meta(pos) - if meta:get_int("valid") ~= 1 then - return - elseif mesecon.do_overheat(pos) then - plg.setports(pos, false, false, false, false) - meta:set_int("valid", 0) - meta:set_string("infotext", "FPGA (overheated)") - return - end - - local is = lcore.deserialize(meta:get_string("instr")) - local A, B, C, D = plg.getports(pos) - A, B, C, D = lcore.interpret(is, A, B, C, D) - plg.setports(pos, A, B, C, D) -end - -plg.ports_changed = function(pos, rule, newstate) - if rule == nil then return end - local meta = minetest.get_meta(pos) - local states - - local s = meta:get_string("portstates") - if s == nil then - states = {false, false, false, false} - else - states = { - s:sub(1, 1) == "1", - s:sub(2, 2) == "1", - s:sub(3, 3) == "1", - s:sub(4, 4) == "1", - } - end - - -- trick to transform rules (see register_node) into port number - local portno = ({4, 1, nil, 3, 2})[3 + rule.x + 2*rule.z] - states[portno] = (newstate == "on") - - meta:set_string("portstates", - (states[1] and "1" or "0") .. (states[2] and "1" or "0") .. - (states[3] and "1" or "0") .. (states[4] and "1" or "0") - ) -end - -plg.getports = function(pos) -- gets merged states of INPUT & OUTPUT - local sin, sout - - local s = minetest.get_meta(pos):get_string("portstates") - if s == nil then - sin = {false, false, false, false} - else - sin = { - s:sub(1, 1) == "1", - s:sub(2, 2) == "1", - s:sub(3, 3) == "1", - s:sub(4, 4) == "1", - } - end - - local name = minetest.get_node(pos).name - assert(name:find("mesecons_fpga:fpga") == 1) - local off = #"mesecons_fpga:fpga" - sout = { - name:sub(off+4, off+4) == "1", - name:sub(off+3, off+3) == "1", - name:sub(off+2, off+2) == "1", - name:sub(off+1, off+1) == "1", - } - - return unpack({ - sin[1] or sout[1], - sin[2] or sout[2], - sin[3] or sout[3], - sin[4] or sout[4], - }) -end - -plg.setports = function(pos, A, B, C, D) -- sets states of OUTPUT - local base = "mesecons_fpga:fpga" - - local name = base - .. (D and "1" or "0") .. (C and "1" or "0") - .. (B and "1" or "0") .. (A and "1" or "0") - minetest.swap_node(pos, {name = name, param2 = minetest.get_node(pos).param2}) - - if A ~= nil then - local ru = plg.rules[base .. "0001"] - if A then mesecon.receptor_on(pos, ru) else mesecon.receptor_off(pos, ru) end - end - if B ~= nil then - local ru = plg.rules[base .. "0010"] - if B then mesecon.receptor_on(pos, ru) else mesecon.receptor_off(pos, ru) end - end - if C ~= nil then - local ru = plg.rules[base .. "0100"] - if C then mesecon.receptor_on(pos, ru) else mesecon.receptor_off(pos, ru) end - end - if D ~= nil then - local ru = plg.rules[base .. "1000"] - if D then mesecon.receptor_on(pos, ru) else mesecon.receptor_off(pos, ru) end - end -end - - -minetest.register_craft({ - output = "mesecons_fpga:fpga0000 2", - recipe = { - {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable'}, - {'mesecons_materials:silicon', 'mesecons_materials:silicon'}, - {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable'}, - } -}) diff --git a/mesecons/mesecons_fpga/logic.lua b/mesecons/mesecons_fpga/logic.lua deleted file mode 100644 index 3dca154..0000000 --- a/mesecons/mesecons_fpga/logic.lua +++ /dev/null @@ -1,210 +0,0 @@ -local lg = {} - --- (de)serialize -lg.serialize = function(t) - local function _op(t) - if t == nil then - return " " - elseif t.type == "io" then - return t.port - else -- t.type == "reg" - return tostring(t.n) - end - end - local function _action(s) - if s == nil then - return " " - end - local mapping = { - ["and"] = "&", - ["or"] = "|", - ["not"] = "~", - ["xor"] = "^", - ["nand"] = "?", --dunno - ["buf"] = "_", - ["xnor"] = "=", - } - return mapping[s] - end - - local s = "" - for i = 1, 14 do - local cur = t[i] - if next(cur) ~= nil then - s = s .. _op(cur.op1) .. _action(cur.action) .. _op(cur.op2) .. _op(cur.dst) - end - s = s .. "/" - end - return s -end - -lg.deserialize = function(s) - local function _op(c) - if c == "A" or c == "B" or c == "C" or c == "D" then - return {type = "io", port = c} - elseif c == " " then - return nil - else - return {type = "reg", n = tonumber(c)} - end - end - local function _action(c) - local mapping = { - ["&"] = "and", - ["|"] = "or", - ["~"] = "not", - ["^"] = "xor", - ["?"] = "nand", - ["_"] = "buf", - ["="] = "xnor", - [" "] = nil, - } - return mapping[c] - end - - local ret = {} - for part in s:gmatch("(.-)/") do - local parsed - if part == "" then - parsed = {} - else - parsed = { - action = _action( part:sub(2,2) ), - op1 = _op( part:sub(1,1) ), - op2 = _op( part:sub(3,3) ), - dst = _op( part:sub(4,4) ), - } - end - ret[#ret + 1] = parsed - end - -- More than 14 instructions (write to all 10 regs + 4 outputs) - -- will not pass the write-once requirement of the validator - assert(#ret == 14) - return ret -end - --- validation -lg.validate_single = function(t, i) - local function is_reg_written_to(t, n, max) - for i = 1, max-1 do - if next(t[i]) ~= nil - and t[i].dst and t[i].dst.type == "reg" - and t[i].dst.n == n then - return true - end - end - return false - end - local function compare_op(t1, t2, allow_same_io) - if t1 == nil or t2 == nil then - return false - elseif t1.type ~= t2.type then - return false - end - if t1.type == "reg" and t1.n == t2.n then - return true - elseif t1.type == "io" and t1.port == t2.port then - return not allow_same_io - end - return false - end - local elem = t[i] - -- check for completeness - if elem.action == nil then - return {i = i, msg = "Gate type required"} - elseif elem.action == "not" or elem.action == "buf" then - if elem.op1 ~= nil or elem.op2 == nil or elem.dst == nil then - return {i = i, msg = "Second operand (only) and destination required"} - end - else - if elem.op1 == nil or elem.op2 == nil or elem.dst == nil then - return {i = i, msg = "Operands and destination required"} - end - end - -- check whether operands/destination are identical - if compare_op(elem.op1, elem.op2) then - return {i = i, msg = "Operands cannot be identical"} - end - if compare_op(elem.op1, elem.dst, true) or compare_op(elem.op2, elem.dst, true) then - return {i = i, msg = "Destination and operands must be different"} - end - -- check whether operands point to defined registers - if elem.op1 ~= nil and elem.op1.type == "reg" - and not is_reg_written_to(t, elem.op1.n, i) then - return {i = i, msg = "First operand is undefined register"} - end - if elem.op2.type == "reg" and not is_reg_written_to(t, elem.op2.n, i) then - return {i = i, msg = "Second operand is undefined register"} - end - -- check whether destination points to undefined register - if elem.dst.type == "reg" and is_reg_written_to(t, elem.dst.n, i) then - return {i = i, msg = "Destination is already used register"} - end - - return nil -end - -lg.validate = function(t) - for i = 1, 14 do - if next(t[i]) ~= nil then - local r = lg.validate_single(t, i) - if r ~= nil then - return r - end - end - end - return nil -end - --- interpreter -lg.interpret = function(t, a, b, c, d) - local function _action(s, v1, v2) - if s == "and" then - return v1 and v2 - elseif s == "or" then - return v1 or v2 - elseif s == "not" then - return not v2 - elseif s == "xor" then - return v1 ~= v2 - elseif s == "nand" then - return not (v1 and v2) - elseif s == "buf" then - return v2 - else -- s == "xnor" - return v1 == v2 - end - end - local function _op(t, regs, io_in) - if t.type == "reg" then - return regs[t.n] - else -- t.type == "io" - return io_in[t.port] - end - end - - local io_in = {A=a, B=b, C=c, D=d} - local regs = {} - local io_out = {} - for i = 1, 14 do - local cur = t[i] - if next(cur) ~= nil then - local v1, v2 - if cur.op1 ~= nil then - v1 = _op(cur.op1, regs, io_in) - end - v2 = _op(cur.op2, regs, io_in) - - local result = _action(cur.action, v1, v2) - - if cur.dst.type == "reg" then - regs[cur.dst.n] = result - else -- cur.dst.type == "io" - io_out[cur.dst.port] = result - end - end - end - return io_out.A, io_out.B, io_out.C, io_out.D -end - -return lg diff --git a/mesecons/mesecons_fpga/textures/jeija_fpga_programmer.png b/mesecons/mesecons_fpga/textures/jeija_fpga_programmer.png deleted file mode 100644 index 9c0ba8f..0000000 Binary files a/mesecons/mesecons_fpga/textures/jeija_fpga_programmer.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/textures/jeija_fpga_sides.png b/mesecons/mesecons_fpga/textures/jeija_fpga_sides.png deleted file mode 100644 index e2d8e15..0000000 Binary files a/mesecons/mesecons_fpga/textures/jeija_fpga_sides.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/textures/jeija_fpga_top.png b/mesecons/mesecons_fpga/textures/jeija_fpga_top.png deleted file mode 100644 index eaf1a1c..0000000 Binary files a/mesecons/mesecons_fpga/textures/jeija_fpga_top.png and /dev/null differ diff --git a/mesecons/mesecons_fpga/tool.lua b/mesecons/mesecons_fpga/tool.lua deleted file mode 100644 index 26ab49e..0000000 --- a/mesecons/mesecons_fpga/tool.lua +++ /dev/null @@ -1,62 +0,0 @@ -return function(plg) - - -minetest.register_tool("mesecons_fpga:programmer", { - description = "FPGA Programmer", - inventory_image = "jeija_fpga_programmer.png", - stack_max = 1, - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - - local pos = pointed_thing.under - if minetest.get_node(pos).name:find("mesecons_fpga:fpga") ~= 1 then - return itemstack - end - - local meta = minetest.get_meta(pos) - if meta:get_string("instr") == "//////////////" then - minetest.chat_send_player(placer:get_player_name(), "This FPGA is unprogrammed.") - return itemstack - end - itemstack:set_metadata(meta:get_string("instr")) - minetest.chat_send_player(placer:get_player_name(), "FPGA gate configuration was successfully copied!") - - return itemstack - end, - on_use = function(itemstack, user, pointed_thing) - if pointed_thing.type ~= "node" then - return itemstack - end - - local pos = pointed_thing.under - if minetest.get_node(pos).name:find("mesecons_fpga:fpga") ~= 1 then - return itemstack - end - - local imeta = itemstack:get_metadata() - if imeta == "" then - minetest.chat_send_player(user:get_player_name(), "Use shift+right-click to copy a gate configuration first.") - return itemstack - end - - local meta = minetest.get_meta(pos) - meta:set_string("instr", imeta) - plg.update_formspec(pos, imeta) - minetest.chat_send_player(user:get_player_name(), "Gate configuration was successfully written to FPGA!") - - return itemstack - end -}) - -minetest.register_craft({ - output = "mesecons_fpga:programmer", - recipe = { - {'group:mesecon_conductor_craftable'}, - {'mesecons_materials:silicon'}, - } -}) - - -end diff --git a/mesecons/mesecons_gates/depends.txt b/mesecons/mesecons_gates/depends.txt deleted file mode 100644 index f3e0392..0000000 --- a/mesecons/mesecons_gates/depends.txt +++ /dev/null @@ -1,6 +0,0 @@ -mesecons -mesecons_microcontroller -mesecons_delayer - -mesecons_torch -mesecons_materials diff --git a/mesecons/mesecons_gates/doc/and/description.html b/mesecons/mesecons_gates/doc/and/description.html deleted file mode 100644 index e8aff91..0000000 --- a/mesecons/mesecons_gates/doc/and/description.html +++ /dev/null @@ -1,2 +0,0 @@ -AND gates power their output if both inputs (from left and right) are powered. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/and/preview.png b/mesecons/mesecons_gates/doc/and/preview.png deleted file mode 100644 index b2b5301..0000000 Binary files a/mesecons/mesecons_gates/doc/and/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/and/recipe.png b/mesecons/mesecons_gates/doc/and/recipe.png deleted file mode 100644 index ae6bf63..0000000 Binary files a/mesecons/mesecons_gates/doc/and/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/diode/description.html b/mesecons/mesecons_gates/doc/diode/description.html deleted file mode 100644 index b96aced..0000000 --- a/mesecons/mesecons_gates/doc/diode/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Diodes conduct signals in one direction only. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/diode/preview.png b/mesecons/mesecons_gates/doc/diode/preview.png deleted file mode 100644 index ced541b..0000000 Binary files a/mesecons/mesecons_gates/doc/diode/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/diode/recipe.png b/mesecons/mesecons_gates/doc/diode/recipe.png deleted file mode 100644 index 71086bf..0000000 Binary files a/mesecons/mesecons_gates/doc/diode/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/nand/description.html b/mesecons/mesecons_gates/doc/nand/description.html deleted file mode 100644 index c46a7e1..0000000 --- a/mesecons/mesecons_gates/doc/nand/description.html +++ /dev/null @@ -1,2 +0,0 @@ -NAND gates do not power their output if both inputs (from left and right) are powered, but power it in every other case. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/nand/preview.png b/mesecons/mesecons_gates/doc/nand/preview.png deleted file mode 100644 index d8db780..0000000 Binary files a/mesecons/mesecons_gates/doc/nand/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/nand/recipe.png b/mesecons/mesecons_gates/doc/nand/recipe.png deleted file mode 100644 index e6118b3..0000000 Binary files a/mesecons/mesecons_gates/doc/nand/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/nor/description.html b/mesecons/mesecons_gates/doc/nor/description.html deleted file mode 100644 index 7d53953..0000000 --- a/mesecons/mesecons_gates/doc/nor/description.html +++ /dev/null @@ -1,2 +0,0 @@ -NOR gates only power their output if none of their two inputs is powered. They are basically OR gates with a NOT gate at their output. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/nor/preview.png b/mesecons/mesecons_gates/doc/nor/preview.png deleted file mode 100644 index b6d2781..0000000 Binary files a/mesecons/mesecons_gates/doc/nor/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/nor/recipe.png b/mesecons/mesecons_gates/doc/nor/recipe.png deleted file mode 100644 index a2063c7..0000000 Binary files a/mesecons/mesecons_gates/doc/nor/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/not/description.html b/mesecons/mesecons_gates/doc/not/description.html deleted file mode 100644 index 5a08423..0000000 --- a/mesecons/mesecons_gates/doc/not/description.html +++ /dev/null @@ -1,2 +0,0 @@ -NOT gates invert signals, just like a mesecon torch does, but faster. The input is at the opposite side of the output. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/not/preview.png b/mesecons/mesecons_gates/doc/not/preview.png deleted file mode 100644 index 4a33cd1..0000000 Binary files a/mesecons/mesecons_gates/doc/not/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/not/recipe.png b/mesecons/mesecons_gates/doc/not/recipe.png deleted file mode 100644 index ee1c0d6..0000000 Binary files a/mesecons/mesecons_gates/doc/not/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/or/description.html b/mesecons/mesecons_gates/doc/or/description.html deleted file mode 100644 index 15d598f..0000000 --- a/mesecons/mesecons_gates/doc/or/description.html +++ /dev/null @@ -1,2 +0,0 @@ -OR gates power their output if either of their inputs (or both) are powered. You could basically get the same behaviour with two diodes, but OR gates save some space. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/or/preview.png b/mesecons/mesecons_gates/doc/or/preview.png deleted file mode 100644 index b7a8cdc..0000000 Binary files a/mesecons/mesecons_gates/doc/or/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/or/recipe.png b/mesecons/mesecons_gates/doc/or/recipe.png deleted file mode 100644 index b94169d..0000000 Binary files a/mesecons/mesecons_gates/doc/or/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/xor/description.html b/mesecons/mesecons_gates/doc/xor/description.html deleted file mode 100644 index 74f8b5f..0000000 --- a/mesecons/mesecons_gates/doc/xor/description.html +++ /dev/null @@ -1,2 +0,0 @@ -XOR gates power their output if only one input is powered, they're off if either both or none of the inputs is powered. -They work in unloaded blocks. diff --git a/mesecons/mesecons_gates/doc/xor/preview.png b/mesecons/mesecons_gates/doc/xor/preview.png deleted file mode 100644 index 3d3941e..0000000 Binary files a/mesecons/mesecons_gates/doc/xor/preview.png and /dev/null differ diff --git a/mesecons/mesecons_gates/doc/xor/recipe.png b/mesecons/mesecons_gates/doc/xor/recipe.png deleted file mode 100644 index 1e129bf..0000000 Binary files a/mesecons/mesecons_gates/doc/xor/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_gates/init.lua b/mesecons/mesecons_gates/init.lua deleted file mode 100644 index 421a7d4..0000000 --- a/mesecons/mesecons_gates/init.lua +++ /dev/null @@ -1,143 +0,0 @@ -local nodebox = { - type = "fixed", - fixed = {{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }}, -} - -local function gate_rotate_rules(node, rules) - for rotations = 0, node.param2 - 1 do - rules = mesecon.rotate_rules_left(rules) - end - return rules -end - -local function gate_get_output_rules(node) - return gate_rotate_rules(node, {{x=1, y=0, z=0}}) -end - -local function gate_get_input_rules_oneinput(node) - return gate_rotate_rules(node, {{x=-1, y=0, z=0}}) -end - -local function gate_get_input_rules_twoinputs(node) - return gate_rotate_rules(node, {{x=0, y=0, z=1, name="input1"}, - {x=0, y=0, z=-1, name="input2"}}) -end - -local function set_gate(pos, node, state) - local gate = minetest.registered_nodes[node.name] - - if mesecon.do_overheat(pos) then - minetest.remove_node(pos) - mesecon.receptor_off(pos, gate_get_output_rules(node)) - minetest.add_item(pos, gate.drop) - elseif state then - minetest.swap_node(pos, {name = gate.onstate, param2=node.param2}) - mesecon.receptor_on(pos, gate_get_output_rules(node)) - else - minetest.swap_node(pos, {name = gate.offstate, param2=node.param2}) - mesecon.receptor_off(pos, gate_get_output_rules(node)) - end -end - -local function update_gate(pos, node, link, newstate) - local gate = minetest.registered_nodes[node.name] - - if gate.inputnumber == 1 then - set_gate(pos, node, gate.assess(newstate == "on")) - elseif gate.inputnumber == 2 then - local meta = minetest.get_meta(pos) - meta:set_int(link.name, newstate == "on" and 1 or 0) - - local val1 = meta:get_int("input1") == 1 - local val2 = meta:get_int("input2") == 1 - set_gate(pos, node, gate.assess(val1, val2)) - end -end - -local function register_gate(name, inputnumber, assess, recipe, description) - local get_inputrules = inputnumber == 2 and gate_get_input_rules_twoinputs or - gate_get_input_rules_oneinput - description = "Logic Gate: "..name - - local basename = "mesecons_gates:"..name - mesecon.register_node(basename, { - description = description, - inventory_image = "jeija_gate_off.png^jeija_gate_"..name..".png", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drawtype = "nodebox", - drop = basename.."_off", - selection_box = nodebox, - node_box = nodebox, - walkable = true, - sounds = default.node_sound_stone_defaults(), - assess = assess, - onstate = basename.."_on", - offstate = basename.."_off", - inputnumber = inputnumber, - after_dig_node = mesecon.do_cooldown, - },{ - tiles = {"jeija_microcontroller_bottom.png^".."jeija_gate_off.png^".. - "jeija_gate_"..name..".png"}, - groups = {dig_immediate = 2, overheat = 1}, - mesecons = { receptor = { - state = "off", - rules = gate_get_output_rules - }, effector = { - rules = get_inputrules, - action_change = update_gate - }} - },{ - tiles = {"jeija_microcontroller_bottom.png^".."jeija_gate_on.png^".. - "jeija_gate_"..name..".png"}, - groups = {dig_immediate = 2, not_in_creative_inventory = 1, overheat = 1}, - mesecons = { receptor = { - state = "on", - rules = gate_get_output_rules - }, effector = { - rules = get_inputrules, - action_change = update_gate - }} - }) - - minetest.register_craft({output = basename.."_off", recipe = recipe}) -end - -register_gate("diode", 1, function (input) return input end, - {{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}}, - "Diode") - -register_gate("not", 1, function (input) return not input end, - {{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}}, - "NOT Gate") - -register_gate("and", 2, function (val1, val2) return val1 and val2 end, - {{"mesecons:mesecon", "", ""}, - {"", "mesecons_materials:silicon", "mesecons:mesecon"}, - {"mesecons:mesecon", "", ""}}, - "AND Gate") - -register_gate("nand", 2, function (val1, val2) return not (val1 and val2) end, - {{"mesecons:mesecon", "", ""}, - {"", "mesecons_materials:silicon", "mesecons_torch:mesecon_torch_on"}, - {"mesecons:mesecon", "", ""}}, - "NAND Gate") - -register_gate("xor", 2, function (val1, val2) return (val1 or val2) and not (val1 and val2) end, - {{"mesecons:mesecon", "", ""}, - {"", "mesecons_materials:silicon", "mesecons_materials:silicon"}, - {"mesecons:mesecon", "", ""}}, - "XOR Gate") - -register_gate("nor", 2, function (val1, val2) return not (val1 or val2) end, - {{"mesecons:mesecon", "", ""}, - {"", "mesecons:mesecon", "mesecons_torch:mesecon_torch_on"}, - {"mesecons:mesecon", "", ""}}, - "NOR Gate") - -register_gate("or", 2, function (val1, val2) return (val1 or val2) end, - {{"mesecons:mesecon", "", ""}, - {"", "mesecons:mesecon", "mesecons:mesecon"}, - {"mesecons:mesecon", "", ""}}, - "OR Gate") diff --git a/mesecons/mesecons_gates/textures/jeija_gate_and.png b/mesecons/mesecons_gates/textures/jeija_gate_and.png deleted file mode 100644 index 0ddc043..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_and.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_diode.png b/mesecons/mesecons_gates/textures/jeija_gate_diode.png deleted file mode 100644 index ffa403f..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_diode.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_nand.png b/mesecons/mesecons_gates/textures/jeija_gate_nand.png deleted file mode 100644 index 0e4294e..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_nand.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_nor.png b/mesecons/mesecons_gates/textures/jeija_gate_nor.png deleted file mode 100644 index c4298e3..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_nor.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_not.png b/mesecons/mesecons_gates/textures/jeija_gate_not.png deleted file mode 100644 index 939fb76..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_not.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_off.png b/mesecons/mesecons_gates/textures/jeija_gate_off.png deleted file mode 100644 index 44017b0..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_off.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_on.png b/mesecons/mesecons_gates/textures/jeija_gate_on.png deleted file mode 100644 index 47028a8..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_on.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_or.png b/mesecons/mesecons_gates/textures/jeija_gate_or.png deleted file mode 100644 index 09f0661..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_or.png and /dev/null differ diff --git a/mesecons/mesecons_gates/textures/jeija_gate_xor.png b/mesecons/mesecons_gates/textures/jeija_gate_xor.png deleted file mode 100644 index afbd6ab..0000000 Binary files a/mesecons/mesecons_gates/textures/jeija_gate_xor.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/depends.txt b/mesecons/mesecons_hydroturbine/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_hydroturbine/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_hydroturbine/doc/waterturbine/description.html b/mesecons/mesecons_hydroturbine/doc/waterturbine/description.html deleted file mode 100644 index 6153d51..0000000 --- a/mesecons/mesecons_hydroturbine/doc/waterturbine/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Water turbines are receptors that turn on if flowing water is above them. -They only work in active blocks; in inactive blocks they keep their old state. diff --git a/mesecons/mesecons_hydroturbine/doc/waterturbine/preview.png b/mesecons/mesecons_hydroturbine/doc/waterturbine/preview.png deleted file mode 100644 index 14be16e..0000000 Binary files a/mesecons/mesecons_hydroturbine/doc/waterturbine/preview.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/doc/waterturbine/recipe.png b/mesecons/mesecons_hydroturbine/doc/waterturbine/recipe.png deleted file mode 100644 index 8eb5365..0000000 Binary files a/mesecons/mesecons_hydroturbine/doc/waterturbine/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/init.lua b/mesecons/mesecons_hydroturbine/init.lua deleted file mode 100644 index afa21e9..0000000 --- a/mesecons/mesecons_hydroturbine/init.lua +++ /dev/null @@ -1,103 +0,0 @@ --- HYDRO_TURBINE --- Water turbine: --- Active if flowing >water< above it --- (does not work with other liquids) - -minetest.register_node("mesecons_hydroturbine:hydro_turbine_off", { - drawtype = "mesh", - mesh = "jeija_hydro_turbine_off.obj", - tiles = { - "jeija_hydro_turbine_sides_off.png", - "jeija_hydro_turbine_top_bottom.png", - "jeija_hydro_turbine_turbine_top_bottom_off.png", - "jeija_hydro_turbine_turbine_misc_off.png" - }, - inventory_image = "jeija_hydro_turbine_inv.png", - is_ground_content = false, - wield_scale = {x=0.75, y=0.75, z=0.75}, - groups = {dig_immediate=2}, - description="Water Turbine", - paramtype = "light", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }, - }, - sounds = default.node_sound_metal_defaults(), - mesecons = {receptor = { - state = mesecon.state.off - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_hydroturbine:hydro_turbine_on", { - drawtype = "mesh", - is_ground_content = false, - mesh = "jeija_hydro_turbine_on.obj", - wield_scale = {x=0.75, y=0.75, z=0.75}, - tiles = { - "jeija_hydro_turbine_sides_on.png", - "jeija_hydro_turbine_top_bottom.png", - { name = "jeija_hydro_turbine_turbine_top_bottom_on.png", - animation = {type = "vertical_frames", aspect_w = 128, aspect_h = 16, length = 1.6} }, - { name = "jeija_hydro_turbine_turbine_misc_on.png", - animation = {type = "vertical_frames", aspect_w = 256, aspect_h = 32, length = 0.4} } - }, - inventory_image = "jeija_hydro_turbine_inv.png", - drop = "mesecons_hydroturbine:hydro_turbine_off 1", - groups = {dig_immediate=2,not_in_creative_inventory=1}, - description="Water Turbine", - paramtype = "light", - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 }, - }, - sounds = default.node_sound_metal_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_blast = mesecon.on_blastnode, -}) - - -local function is_flowing_water(pos) - local name = minetest.get_node(pos).name - local is_water = minetest.get_item_group(name, "water") > 0 - local is_flowing = minetest.registered_items[name].liquidtype == "flowing" - return (is_water and is_flowing) -end - -minetest.register_abm({ -nodenames = {"mesecons_hydroturbine:hydro_turbine_off"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local waterpos={x=pos.x, y=pos.y+1, z=pos.z} - if is_flowing_water(waterpos) then - minetest.set_node(pos, {name="mesecons_hydroturbine:hydro_turbine_on"}) - mesecon.receptor_on(pos) - end - end, -}) - -minetest.register_abm({ -nodenames = {"mesecons_hydroturbine:hydro_turbine_on"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local waterpos={x=pos.x, y=pos.y+1, z=pos.z} - if not is_flowing_water(waterpos) then - minetest.set_node(pos, {name="mesecons_hydroturbine:hydro_turbine_off"}) - mesecon.receptor_off(pos) - end - end, -}) - -minetest.register_craft({ - output = "mesecons_hydroturbine:hydro_turbine_off 2", - recipe = { - {"","default:stick", ""}, - {"default:stick", "default:steel_ingot", "default:stick"}, - {"","default:stick", ""}, - } -}) - diff --git a/mesecons/mesecons_hydroturbine/models/jeija_hydro_turbine_off.obj b/mesecons/mesecons_hydroturbine/models/jeija_hydro_turbine_off.obj deleted file mode 100644 index 5cd5c96..0000000 --- a/mesecons/mesecons_hydroturbine/models/jeija_hydro_turbine_off.obj +++ /dev/null @@ -1,429 +0,0 @@ -# Blender v2.72 (sub 0) OBJ File: 'mesecons-water-turbine.blend' -# www.blender.org -o Cylinder.002_Cylinder.003 -v 0.000000 0.496094 -0.150000 -v 0.000000 0.562500 -0.150000 -v 0.106066 0.496094 -0.106066 -v 0.106066 0.562500 -0.106066 -v 0.150000 0.496094 0.000000 -v 0.150000 0.562500 0.000000 -v 0.106066 0.496094 0.106066 -v 0.106066 0.562500 0.106066 -v -0.000000 0.496094 0.150000 -v -0.000000 0.562500 0.150000 -v -0.106066 0.496094 0.106066 -v -0.106066 0.562500 0.106066 -v -0.150000 0.496094 -0.000000 -v -0.150000 0.562500 -0.000000 -v -0.106066 0.496094 -0.106066 -v -0.106066 0.562500 -0.106066 -v 0.097545 0.625000 -0.490393 -v -0.097545 0.625000 -0.490393 -v -0.277785 0.625000 -0.415735 -v -0.415735 0.625000 -0.277785 -v -0.490393 0.625000 -0.097545 -v -0.490393 0.625000 0.097545 -v -0.415735 0.625000 0.277785 -v -0.277785 0.625000 0.415735 -v -0.097545 0.625000 0.490393 -v 0.097545 0.625000 0.490393 -v 0.277785 0.625000 0.415735 -v 0.415735 0.625000 0.277785 -v 0.490393 0.625000 0.097545 -v 0.490393 0.625000 -0.097545 -v 0.415735 0.625000 -0.277785 -v 0.277785 0.625000 -0.415735 -v 0.097545 0.656250 -0.490393 -v -0.097545 0.656250 -0.490393 -v -0.277785 0.656250 -0.415735 -v -0.415735 0.656250 -0.277785 -v -0.490393 0.656250 -0.097545 -v -0.490393 0.656250 0.097545 -v -0.415735 0.656250 0.277785 -v -0.277785 0.656250 0.415735 -v -0.097545 0.656250 0.490393 -v 0.097545 0.656250 0.490393 -v 0.277785 0.656250 0.415735 -v 0.415735 0.656250 0.277785 -v 0.490393 0.656250 0.097545 -v 0.490393 0.656250 -0.097545 -v 0.415735 0.656250 -0.277785 -v 0.277785 0.656250 -0.415735 -v 0.116233 0.634645 -0.436100 -v 0.116233 1.482640 -0.436100 -v 0.299524 0.634645 -0.186124 -v 0.299524 1.482640 -0.186124 -v 0.343405 0.634645 0.080186 -v 0.343405 1.482640 0.080186 -v 0.186124 0.634645 0.299524 -v 0.186124 1.482640 0.299524 -v -0.080186 0.634645 0.343405 -v -0.080186 1.482640 0.343405 -v -0.299524 0.634645 0.186124 -v -0.299524 1.482640 0.186124 -v -0.343405 0.634645 -0.080186 -v -0.343405 1.482640 -0.080186 -v -0.186124 0.634645 -0.299524 -v -0.186124 1.482640 -0.299524 -v 0.080186 0.634645 -0.343405 -v 0.080186 1.482640 -0.343405 -v 0.390559 1.482640 -0.226180 -v 0.390559 0.634645 -0.226180 -v 0.436100 1.482640 0.116233 -v 0.436100 0.634645 0.116233 -v 0.226180 1.482640 0.390559 -v 0.226180 0.634645 0.390559 -v -0.116233 1.482640 0.436100 -v -0.116233 0.634645 0.436100 -v -0.390559 1.482640 0.226180 -v -0.390559 0.634645 0.226180 -v -0.436100 1.482640 -0.116233 -v -0.436100 0.634645 -0.116233 -v -0.226180 1.482640 -0.390559 -v -0.226180 0.634645 -0.390559 -v 0.108975 0.634645 -0.430778 -v 0.292266 0.634645 -0.180802 -v 0.292266 1.482640 -0.180802 -v 0.108975 1.482640 -0.430778 -v 0.381664 0.634645 -0.227549 -v 0.334509 0.634645 0.078817 -v 0.334509 1.482640 0.078817 -v 0.381664 1.482640 -0.227549 -v 0.430778 0.634645 0.108975 -v 0.180802 0.634645 0.292266 -v 0.180802 1.482640 0.292266 -v 0.430778 1.482640 0.108975 -v 0.227549 0.634645 0.381664 -v -0.078817 0.634645 0.334509 -v -0.078817 1.482640 0.334509 -v 0.227549 1.482640 0.381664 -v -0.108975 0.634645 0.430778 -v -0.292266 0.634645 0.180802 -v -0.292266 1.482640 0.180802 -v -0.108975 1.482640 0.430778 -v -0.381664 0.634645 0.227549 -v -0.334509 0.634645 -0.078817 -v -0.334509 1.482640 -0.078817 -v -0.381664 1.482640 0.227549 -v -0.227549 0.634645 -0.381663 -v 0.078817 0.634645 -0.334509 -v 0.078817 1.482640 -0.334509 -v -0.227549 1.482640 -0.381663 -v -0.430779 0.634645 -0.108975 -v -0.180802 0.634645 -0.292266 -v -0.180802 1.482640 -0.292266 -v -0.430779 1.482640 -0.108975 -v 0.097545 1.496094 -0.490393 -v -0.097545 1.496094 -0.490393 -v -0.277785 1.496094 -0.415735 -v -0.415735 1.496094 -0.277785 -v -0.490393 1.496094 -0.097545 -v -0.490393 1.496094 0.097545 -v -0.415735 1.496094 0.277785 -v -0.277785 1.496094 0.415735 -v -0.097545 1.496094 0.490393 -v 0.097545 1.496094 0.490393 -v 0.277785 1.496094 0.415735 -v 0.415735 1.496094 0.277785 -v 0.490393 1.496094 0.097545 -v 0.490393 1.496094 -0.097545 -v 0.415735 1.496094 -0.277785 -v 0.277785 1.496094 -0.415735 -v 0.097545 1.464844 -0.490393 -v -0.097545 1.464844 -0.490393 -v -0.277785 1.464844 -0.415735 -v -0.415735 1.464844 -0.277785 -v -0.490393 1.464844 -0.097545 -v -0.490393 1.464844 0.097545 -v -0.415735 1.464844 0.277785 -v -0.277785 1.464844 0.415735 -v -0.097545 1.464844 0.490393 -v 0.097545 1.464844 0.490393 -v 0.277785 1.464844 0.415735 -v 0.415735 1.464844 0.277785 -v 0.490393 1.464844 0.097545 -v 0.490393 1.464844 -0.097545 -v 0.415735 1.464844 -0.277785 -v 0.277785 1.464844 -0.415735 -v 0.025624 0.559630 -0.061863 -v 0.025624 1.481372 -0.061863 -v 0.061863 0.559630 -0.025624 -v 0.061863 1.481372 -0.025624 -v 0.061863 0.559630 0.025624 -v 0.061863 1.481372 0.025624 -v 0.025624 0.559630 0.061863 -v 0.025624 1.481372 0.061863 -v -0.025624 0.559630 0.061863 -v -0.025624 1.481372 0.061863 -v -0.061863 0.559630 0.025624 -v -0.061863 1.481372 0.025624 -v -0.061863 0.559630 -0.025624 -v -0.061863 1.481372 -0.025624 -v -0.025624 0.559630 -0.061863 -v -0.025624 1.481372 -0.061863 -v 0.496094 -0.496094 -0.496094 -v 0.496094 -0.496094 0.496094 -v -0.496094 -0.496094 0.496094 -v -0.496094 -0.496094 -0.496094 -v 0.496094 0.496094 -0.496094 -v 0.496094 0.496094 0.496094 -v -0.496094 0.496094 0.496094 -v -0.496094 0.496094 -0.496094 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vt 0.400544 1.000000 -vt 0.599456 1.000000 -vt 0.783227 0.923880 -vt 0.923880 0.783227 -vt 1.000000 0.599456 -vt 1.000000 0.400544 -vt 0.923880 0.216773 -vt 0.783227 0.076120 -vt 0.599456 0.000000 -vt 0.400544 0.000000 -vt 0.216773 0.076121 -vt 0.076120 0.216773 -vt 0.000000 0.400544 -vt 0.000000 0.599456 -vt 0.076121 0.783227 -vt 0.216773 0.923880 -vt 0.500000 0.343750 -vt 0.531250 0.343750 -vt 0.531250 0.375000 -vt 0.500000 0.375000 -vt 0.531250 0.406250 -vt 0.500000 0.406250 -vt 0.500000 0.531250 -vt 0.531250 0.531250 -vt 0.531250 0.500000 -vt 0.500000 0.500000 -vt 0.531250 0.468750 -vt 0.500000 0.468750 -vt 0.531250 0.437500 -vt 0.500000 0.437500 -vt 0.593750 0.468750 -vt 0.625000 0.437500 -vt 0.656250 0.437500 -vt 0.687500 0.468750 -vt 0.687500 0.500000 -vt 0.656250 0.531250 -vt 0.625000 0.531250 -vt 0.593750 0.500000 -vt 0.500000 0.312500 -vt 0.531250 0.312500 -vt 0.500000 0.281250 -vt 0.531250 0.281250 -vt 0.156250 0.750000 -vt 0.156250 0.875000 -vt 0.125000 0.875000 -vt 0.125000 0.750000 -vt 0.156250 0.625000 -vt 0.125000 0.625000 -vt 0.156250 0.500000 -vt 0.125000 0.500000 -vt 0.156250 0.375000 -vt 0.125000 0.375000 -vt 0.156250 0.250000 -vt 0.125000 0.250000 -vt 0.250000 0.500000 -vt 0.250000 0.625000 -vt 0.218750 0.625000 -vt 0.218750 0.500000 -vt 0.156250 0.125000 -vt 0.125000 0.125000 -vt 0.156250 -0.000000 -vt 0.125000 -0.000000 -vt 0.250000 0.375000 -vt 0.218750 0.375000 -vt 0.250000 0.875000 -vt 0.250000 1.000000 -vt 0.218750 1.000000 -vt 0.218750 0.875000 -vt 0.250000 0.250000 -vt 0.218750 0.250000 -vt 0.250000 0.750000 -vt 0.218750 0.750000 -vt 0.250000 0.125000 -vt 0.218750 0.125000 -vt 0.250000 -0.000000 -vt 0.218750 -0.000000 -vt 0.156250 1.000000 -vt 0.125000 1.000000 -vt 0.781250 0.593750 -vt 0.781250 0.968750 -vt 0.656250 0.968750 -vt 0.656250 0.593750 -vt 0.625000 0.593750 -vt 0.625000 0.968750 -vt 0.500000 0.968750 -vt 0.500000 0.593750 -vt 0.406250 -0.000000 -vt 0.437500 -0.000000 -vt 0.437500 0.125000 -vt 0.406250 0.125000 -vt 0.312500 0.875000 -vt 0.343750 0.875000 -vt 0.343750 1.000000 -vt 0.312500 1.000000 -vt 0.312500 0.750000 -vt 0.343750 0.750000 -vt 0.312500 0.625000 -vt 0.343750 0.625000 -vt 0.312500 0.500000 -vt 0.343750 0.500000 -vt 0.406250 0.750000 -vt 0.437500 0.750000 -vt 0.437500 0.875000 -vt 0.406250 0.875000 -vt 0.312500 0.375000 -vt 0.343750 0.375000 -vt 0.312500 0.250000 -vt 0.343750 0.250000 -vt 0.406250 0.625000 -vt 0.437500 0.625000 -vt 0.312500 0.125000 -vt 0.343750 0.125000 -vt 0.406250 0.500000 -vt 0.437500 0.500000 -vt 0.312500 -0.000000 -vt 0.343750 -0.000000 -vt 0.406250 0.375000 -vt 0.437500 0.375000 -vt 0.437500 1.000000 -vt 0.406250 1.000000 -vt 0.406250 0.250000 -vt 0.437500 0.250000 -vt 0.031250 0.937500 -vt 0.062500 0.937500 -vt 0.062500 0.968750 -vt 0.031250 0.968750 -vt 0.031250 0.718750 -vt 0.062500 0.718750 -vt 0.062500 0.750000 -vt 0.031250 0.750000 -vt 0.062500 0.781250 -vt 0.031250 0.781250 -vt 0.062500 0.812500 -vt 0.031250 0.812500 -vt 0.062500 0.843750 -vt 0.031250 0.843750 -vt 0.062500 0.875000 -vt 0.031250 0.875000 -vt 0.031250 0.906250 -vt 0.062500 0.906250 -vn 1.000000 0.000000 0.000000 -vn 0.000000 0.000000 1.000000 -vn -1.000000 0.000000 0.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn 0.382700 0.000000 -0.923900 -vn 0.923900 0.000000 -0.382700 -vn 0.923900 0.000000 0.382700 -vn 0.382700 0.000000 0.923900 -vn -0.382700 0.000000 0.923900 -vn -0.923900 0.000000 0.382700 -vn -0.382700 0.000000 -0.923900 -vn -0.923900 0.000000 -0.382700 -vn 0.707100 0.000000 0.707100 -vn -0.707100 0.000000 0.707100 -vn 0.707100 0.000000 -0.707100 -vn -0.707100 0.000000 -0.707100 -vn 0.806400 0.000000 -0.591300 -vn 0.988400 0.000000 0.152100 -vn 0.591300 0.000000 0.806400 -vn -0.152100 0.000000 0.988400 -vn -0.806400 0.000000 0.591300 -vn -0.988400 0.000000 -0.152100 -vn 0.152100 0.000000 -0.988400 -vn -0.591300 0.000000 -0.806400 -g Cylinder.002_Cylinder.003_sides -s off -f 161/1/1 165/2/1 166/3/1 162/4/1 -f 162/1/2 166/2/2 167/3/2 163/4/2 -f 163/4/3 167/3/3 168/2/3 164/1/3 -f 165/2/4 161/1/4 164/4/4 168/3/4 -g Cylinder.002_Cylinder.003_top-bottom -f 161/2/5 162/1/5 163/4/5 164/3/5 -f 165/2/6 168/3/6 167/4/6 166/1/6 -g Cylinder.002_Cylinder.003_turbine-top-bottom -f 130/5/5 129/6/5 144/7/5 143/8/5 142/9/5 141/10/5 140/11/5 139/12/5 138/13/5 137/14/5 136/15/5 135/16/5 134/17/5 133/18/5 132/19/5 131/20/5 -f 18/5/5 17/6/5 32/7/5 31/8/5 30/9/5 29/10/5 28/11/5 27/12/5 26/13/5 25/14/5 24/15/5 23/16/5 22/17/5 21/18/5 20/19/5 19/20/5 -f 33/6/6 34/5/6 35/20/6 36/19/6 37/18/6 38/17/6 39/16/6 40/15/6 41/14/6 42/13/6 43/12/6 44/11/6 45/10/6 46/9/6 47/8/6 48/7/6 -f 113/6/6 114/5/6 115/20/6 116/19/6 117/18/6 118/17/6 119/16/6 120/15/6 121/14/6 122/13/6 123/12/6 124/11/6 125/10/6 126/9/6 127/8/6 128/7/6 -g Cylinder.002_Cylinder.003_turbine-blades-etc -f 1/21/7 2/22/7 4/23/7 3/24/7 -f 3/24/8 4/23/8 6/25/8 5/26/8 -f 5/27/9 6/28/9 8/29/9 7/30/9 -f 7/30/10 8/29/10 10/31/10 9/32/10 -f 9/32/11 10/31/11 12/33/11 11/34/11 -f 11/34/12 12/33/12 14/25/12 13/26/12 -f 4/35/6 2/36/6 16/37/6 14/38/6 12/39/6 10/40/6 8/41/6 6/42/6 -f 15/43/13 16/44/13 2/22/13 1/21/13 -f 13/45/14 14/46/14 16/44/14 15/43/14 -f 27/47/15 28/48/15 44/49/15 43/50/15 -f 26/51/10 27/47/10 43/50/10 42/52/10 -f 25/53/2 26/51/2 42/52/2 41/54/2 -f 24/55/11 25/53/11 41/54/11 40/56/11 -f 23/57/16 24/55/16 40/56/16 39/58/16 -f 17/59/4 18/60/4 34/61/4 33/62/4 -f 22/63/12 23/57/12 39/58/12 38/64/12 -f 21/65/3 22/63/3 38/64/3 37/66/3 -f 32/67/7 17/59/7 33/62/7 48/68/7 -f 20/69/14 21/70/14 37/71/14 36/72/14 -f 31/73/17 32/67/17 48/68/17 47/74/17 -f 19/75/18 20/69/18 36/72/18 35/76/18 -f 30/77/8 31/73/8 47/74/8 46/78/8 -f 18/60/13 19/75/13 35/76/13 34/61/13 -f 29/79/1 30/77/1 46/78/1 45/80/1 -f 28/48/9 29/81/9 45/82/9 44/49/9 -f 49/83/19 50/84/19 52/85/19 51/86/19 -f 68/86/20 67/83/20 54/84/20 53/85/20 -f 70/83/21 69/84/21 56/85/21 55/86/21 -f 72/84/22 71/85/22 58/86/22 57/83/22 -f 74/83/23 73/84/23 60/85/23 59/86/23 -f 76/83/24 75/84/24 62/85/24 61/86/24 -f 80/84/25 79/85/25 66/86/25 65/83/25 -f 78/83/26 77/84/26 64/85/26 63/86/26 -f 81/87/23 82/88/23 83/89/23 84/90/23 -f 85/88/24 86/89/24 87/90/24 88/87/24 -f 89/89/26 90/90/26 91/87/26 92/88/26 -f 93/90/25 94/87/25 95/88/25 96/89/25 -f 97/90/19 98/87/19 99/88/19 100/89/19 -f 101/87/20 102/88/20 103/89/20 104/90/20 -f 105/90/22 106/87/22 107/88/22 108/89/22 -f 109/89/21 110/90/21 111/87/21 112/88/21 -f 75/88/22 76/87/22 101/86/22 104/85/22 -f 71/88/20 72/87/20 93/86/20 96/85/20 -f 67/86/25 68/85/25 85/88/25 88/87/25 -f 79/86/24 80/85/24 105/88/24 108/87/24 -f 77/88/23 78/87/23 109/86/23 112/85/23 -f 73/88/21 74/87/21 97/86/21 100/85/21 -f 69/86/19 70/85/19 89/88/19 92/87/19 -f 50/86/26 49/85/26 81/88/26 84/87/26 -f 123/91/15 139/92/15 140/93/15 124/94/15 -f 122/95/10 138/96/10 139/97/10 123/98/10 -f 121/99/2 137/100/2 138/96/2 122/95/2 -f 120/101/11 136/102/11 137/100/11 121/99/11 -f 119/103/16 135/104/16 136/102/16 120/101/16 -f 113/105/4 129/106/4 130/107/4 114/108/4 -f 118/109/12 134/110/12 135/104/12 119/103/12 -f 117/111/3 133/112/3 134/110/3 118/109/3 -f 128/113/7 144/114/7 129/106/7 113/105/7 -f 116/115/14 132/116/14 133/112/14 117/111/14 -f 127/117/17 143/118/17 144/114/17 128/113/17 -f 115/119/18 131/120/18 132/116/18 116/115/18 -f 126/121/8 142/122/8 143/118/8 127/117/8 -f 114/108/13 130/107/13 131/123/13 115/124/13 -f 125/125/1 141/126/1 142/122/1 126/121/1 -f 124/94/9 140/93/9 141/126/9 125/125/9 -f 145/127/17 146/128/17 148/129/17 147/130/17 -f 147/131/1 148/132/1 150/133/1 149/134/1 -f 149/134/15 150/133/15 152/135/15 151/136/15 -f 151/136/2 152/135/2 154/137/2 153/138/2 -f 153/138/16 154/137/16 156/139/16 155/140/16 -f 155/140/3 156/139/3 158/141/3 157/142/3 -f 159/143/4 160/144/4 146/128/4 145/127/4 -f 157/142/18 158/141/18 160/144/18 159/143/18 diff --git a/mesecons/mesecons_hydroturbine/models/jeija_hydro_turbine_on.obj b/mesecons/mesecons_hydroturbine/models/jeija_hydro_turbine_on.obj deleted file mode 100644 index 52f8768..0000000 --- a/mesecons/mesecons_hydroturbine/models/jeija_hydro_turbine_on.obj +++ /dev/null @@ -1,2059 +0,0 @@ -# Blender v2.72 (sub 0) OBJ File: 'mesecons-water-turbine_on.blend' -# www.blender.org -o Cylinder.002_Cylinder.003 -v 0.000000 0.496094 -0.150000 -v 0.000000 0.562500 -0.150000 -v 0.106066 0.496094 -0.106066 -v 0.106066 0.562500 -0.106066 -v 0.150000 0.496094 0.000000 -v 0.150000 0.562500 0.000000 -v 0.106066 0.496094 0.106066 -v 0.106066 0.562500 0.106066 -v -0.000000 0.496094 0.150000 -v -0.000000 0.562500 0.150000 -v -0.106066 0.496094 0.106066 -v -0.106066 0.562500 0.106066 -v -0.150000 0.496094 -0.000000 -v -0.150000 0.562500 -0.000000 -v -0.106066 0.496094 -0.106066 -v -0.106066 0.562500 -0.106066 -v 0.097545 0.625000 -0.490393 -v -0.097545 0.625000 -0.490393 -v -0.277785 0.625000 -0.415735 -v -0.415735 0.625000 -0.277785 -v -0.490393 0.625000 -0.097545 -v -0.490393 0.625000 0.097545 -v -0.415735 0.625000 0.277785 -v -0.277785 0.625000 0.415735 -v -0.097545 0.625000 0.490393 -v 0.097545 0.625000 0.490393 -v 0.277785 0.625000 0.415735 -v 0.415735 0.625000 0.277785 -v 0.490393 0.625000 0.097545 -v 0.490393 0.625000 -0.097545 -v 0.415735 0.625000 -0.277785 -v 0.277785 0.625000 -0.415735 -v 0.097545 0.656250 -0.490393 -v -0.097545 0.656250 -0.490393 -v -0.277785 0.656250 -0.415735 -v -0.415735 0.656250 -0.277785 -v -0.490393 0.656250 -0.097545 -v -0.490393 0.656250 0.097545 -v -0.415735 0.656250 0.277785 -v -0.277785 0.656250 0.415735 -v -0.097545 0.656250 0.490393 -v 0.097545 0.656250 0.490393 -v 0.277785 0.656250 0.415735 -v 0.415735 0.656250 0.277785 -v 0.490393 0.656250 0.097545 -v 0.490393 0.656250 -0.097545 -v 0.415735 0.656250 -0.277785 -v 0.277785 0.656250 -0.415735 -v 0.080186 0.634645 -0.343405 -v 0.080186 1.482640 -0.343405 -v -0.226180 1.482640 -0.390559 -v -0.226180 0.634645 -0.390559 -v -0.227549 0.634645 -0.381663 -v 0.078817 0.634645 -0.334509 -v 0.078817 1.482640 -0.334509 -v -0.227549 1.482640 -0.381663 -v 0.097545 1.496094 -0.490393 -v -0.097545 1.496094 -0.490393 -v -0.277785 1.496094 -0.415735 -v -0.415735 1.496094 -0.277785 -v -0.490393 1.496094 -0.097545 -v -0.490393 1.496094 0.097545 -v -0.415735 1.496094 0.277785 -v -0.277785 1.496094 0.415735 -v -0.097545 1.496094 0.490393 -v 0.097545 1.496094 0.490393 -v 0.277785 1.496094 0.415735 -v 0.415735 1.496094 0.277785 -v 0.490393 1.496094 0.097545 -v 0.490393 1.496094 -0.097545 -v 0.415735 1.496094 -0.277785 -v 0.277785 1.496094 -0.415735 -v 0.097545 1.464844 -0.490393 -v -0.097545 1.464844 -0.490393 -v -0.277785 1.464844 -0.415735 -v -0.415735 1.464844 -0.277785 -v -0.490393 1.464844 -0.097545 -v -0.490393 1.464844 0.097545 -v -0.415735 1.464844 0.277785 -v -0.277785 1.464844 0.415735 -v -0.097545 1.464844 0.490393 -v 0.097545 1.464844 0.490393 -v 0.277785 1.464844 0.415735 -v 0.415735 1.464844 0.277785 -v 0.490393 1.464844 0.097545 -v 0.490393 1.464844 -0.097545 -v 0.415735 1.464844 -0.277785 -v 0.277785 1.464844 -0.415735 -v 0.025624 0.559630 -0.061863 -v 0.025624 1.481372 -0.061863 -v 0.061863 0.559630 -0.025624 -v 0.061863 1.481372 -0.025624 -v 0.061863 0.559630 0.025624 -v 0.061863 1.481372 0.025624 -v 0.025624 0.559630 0.061863 -v 0.025624 1.481372 0.061863 -v -0.025624 0.559630 0.061863 -v -0.025624 1.481372 0.061863 -v -0.061863 0.559630 0.025624 -v -0.061863 1.481372 0.025624 -v -0.061863 0.559630 -0.025624 -v -0.061863 1.481372 -0.025624 -v -0.025624 0.559630 -0.061863 -v -0.025624 1.481372 -0.061863 -v 0.496094 -0.496094 -0.496094 -v 0.496094 -0.496094 0.496094 -v -0.496094 -0.496094 0.496094 -v -0.496094 -0.496094 -0.496094 -v 0.496094 0.496094 -0.496094 -v 0.496094 0.496094 0.496094 -v -0.496094 0.496094 0.496094 -v -0.496094 0.496094 -0.496094 -v 0.299524 0.634645 -0.186124 -v 0.299524 1.482640 -0.186124 -v 0.116233 1.482640 -0.436100 -v 0.116233 0.634645 -0.436100 -v 0.108975 0.634645 -0.430778 -v 0.292266 0.634645 -0.180802 -v 0.292266 1.482640 -0.180802 -v 0.108975 1.482640 -0.430778 -v 0.343405 0.634645 0.080186 -v 0.343405 1.482640 0.080186 -v 0.390559 1.482640 -0.226180 -v 0.390559 0.634645 -0.226180 -v 0.381663 0.634645 -0.227549 -v 0.334509 0.634645 0.078817 -v 0.334509 1.482640 0.078817 -v 0.381663 1.482640 -0.227549 -v 0.186124 0.634645 0.299524 -v 0.186124 1.482640 0.299524 -v 0.436100 1.482640 0.116233 -v 0.436100 0.634645 0.116233 -v 0.430778 0.634645 0.108975 -v 0.180802 0.634645 0.292266 -v 0.180802 1.482640 0.292266 -v 0.430778 1.482640 0.108975 -v -0.080186 0.634645 0.343405 -v -0.080186 1.482640 0.343405 -v 0.226180 1.482640 0.390559 -v 0.226180 0.634645 0.390559 -v 0.227549 0.634645 0.381663 -v -0.078817 0.634645 0.334509 -v -0.078817 1.482640 0.334509 -v 0.227549 1.482640 0.381663 -v -0.299524 0.634645 0.186124 -v -0.299524 1.482640 0.186124 -v -0.116233 1.482640 0.436100 -v -0.116233 0.634645 0.436100 -v -0.108975 0.634645 0.430778 -v -0.292266 0.634645 0.180802 -v -0.292266 1.482640 0.180802 -v -0.108975 1.482640 0.430778 -v -0.343404 0.634645 -0.080186 -v -0.343404 1.482640 -0.080186 -v -0.390559 1.482640 0.226180 -v -0.390559 0.634645 0.226180 -v -0.381663 0.634645 0.227549 -v -0.334509 0.634645 -0.078817 -v -0.334509 1.482640 -0.078817 -v -0.381663 1.482640 0.227549 -v -0.186124 0.634645 -0.299524 -v -0.186124 1.482640 -0.299524 -v -0.436100 1.482640 -0.116233 -v -0.436100 0.634645 -0.116233 -v -0.430778 0.634645 -0.108975 -v -0.180802 0.634645 -0.292266 -v -0.180802 1.482640 -0.292266 -v -0.430778 1.482640 -0.108975 -v 0.145640 0.634645 -0.321163 -v 0.145640 1.482640 -0.321163 -v -0.145640 1.482640 -0.427180 -v -0.145640 0.634645 -0.427180 -v -0.148718 0.634645 -0.418723 -v 0.142562 0.634645 -0.312705 -v 0.142562 1.482640 -0.312705 -v -0.148718 1.482640 -0.418723 -v 0.330079 0.634645 -0.124113 -v 0.330079 1.482640 -0.124113 -v 0.199079 1.482640 -0.405045 -v 0.199079 0.634645 -0.405045 -v 0.190922 0.634645 -0.401241 -v 0.321922 0.634645 -0.120310 -v 0.321922 1.482640 -0.120310 -v 0.190922 1.482640 -0.401241 -v 0.321163 0.634645 0.145640 -v 0.321163 1.482640 0.145640 -v 0.427180 1.482640 -0.145640 -v 0.427180 0.634645 -0.145640 -v 0.418723 0.634645 -0.148718 -v 0.312705 0.634645 0.142562 -v 0.312705 1.482640 0.142562 -v 0.418723 1.482640 -0.148718 -v 0.124113 0.634645 0.330079 -v 0.124113 1.482640 0.330079 -v 0.405045 1.482640 0.199079 -v 0.405045 0.634645 0.199079 -v 0.401241 0.634645 0.190922 -v 0.120310 0.634645 0.321922 -v 0.120310 1.482640 0.321922 -v 0.401241 1.482640 0.190922 -v -0.145640 0.634645 0.321163 -v -0.145640 1.482640 0.321163 -v 0.145640 1.482640 0.427180 -v 0.145640 0.634645 0.427180 -v 0.148718 0.634645 0.418723 -v -0.142562 0.634645 0.312705 -v -0.142562 1.482640 0.312705 -v 0.148718 1.482640 0.418723 -v -0.330079 0.634645 0.124113 -v -0.330079 1.482640 0.124113 -v -0.199079 1.482640 0.405045 -v -0.199079 0.634645 0.405045 -v -0.190922 0.634645 0.401241 -v -0.321923 0.634645 0.120309 -v -0.321923 1.482640 0.120309 -v -0.190922 1.482640 0.401241 -v -0.321163 0.634645 -0.145640 -v -0.321163 1.482640 -0.145640 -v -0.427180 1.482640 0.145640 -v -0.427180 0.634645 0.145640 -v -0.418723 0.634645 0.148718 -v -0.312705 0.634645 -0.142562 -v -0.312705 1.482640 -0.142562 -v -0.418723 1.482640 0.148718 -v -0.124113 0.634645 -0.330079 -v -0.124113 1.482640 -0.330079 -v -0.405045 1.482640 -0.199079 -v -0.405045 0.634645 -0.199079 -v -0.401241 0.634645 -0.190922 -v -0.120309 0.634645 -0.321923 -v -0.120309 1.482640 -0.321923 -v -0.401241 1.482640 -0.190922 -v 0.205497 0.634645 -0.286579 -v 0.205497 1.482640 -0.286579 -v -0.059503 1.482640 -0.447385 -v -0.059503 0.634645 -0.447385 -v -0.064172 0.634645 -0.439690 -v 0.200828 0.634645 -0.278884 -v 0.200828 1.482640 -0.278884 -v -0.064172 1.482640 -0.439690 -v 0.347950 0.634645 -0.057333 -v 0.347950 1.482640 -0.057333 -v 0.274274 1.482640 -0.358424 -v 0.274274 0.634645 -0.358424 -v 0.265532 0.634645 -0.356284 -v 0.339208 0.634645 -0.055194 -v 0.339208 1.482640 -0.055194 -v 0.265532 1.482640 -0.356284 -v 0.286579 0.634645 0.205497 -v 0.286579 1.482640 0.205497 -v 0.447385 1.482640 -0.059503 -v 0.447385 0.634645 -0.059503 -v 0.439690 0.634645 -0.064172 -v 0.278884 0.634645 0.200828 -v 0.278884 1.482640 0.200828 -v 0.439690 1.482640 -0.064172 -v 0.057333 0.634645 0.347950 -v 0.057333 1.482640 0.347950 -v 0.358423 1.482640 0.274274 -v 0.358423 0.634645 0.274274 -v 0.356284 0.634645 0.265532 -v 0.055194 0.634645 0.339208 -v 0.055194 1.482640 0.339208 -v 0.356284 1.482640 0.265532 -v -0.205497 0.634645 0.286579 -v -0.205497 1.482640 0.286579 -v 0.059503 1.482640 0.447385 -v 0.059503 0.634645 0.447385 -v 0.064172 0.634645 0.439690 -v -0.200828 0.634645 0.278884 -v -0.200828 1.482640 0.278884 -v 0.064172 1.482640 0.439690 -v -0.347950 0.634645 0.057333 -v -0.347950 1.482640 0.057333 -v -0.274274 1.482640 0.358423 -v -0.274274 0.634645 0.358423 -v -0.265532 0.634645 0.356284 -v -0.339208 0.634645 0.055194 -v -0.339208 1.482640 0.055194 -v -0.265532 1.482640 0.356284 -v -0.286579 0.634645 -0.205497 -v -0.286579 1.482640 -0.205497 -v -0.447385 1.482640 0.059503 -v -0.447385 0.634645 0.059503 -v -0.439690 0.634645 0.064172 -v -0.278884 0.634645 -0.200828 -v -0.278884 1.482640 -0.200828 -v -0.439690 1.482640 0.064172 -v -0.057333 0.634645 -0.347950 -v -0.057333 1.482640 -0.347950 -v -0.358423 1.482640 -0.274274 -v -0.358423 0.634645 -0.274274 -v -0.356284 0.634645 -0.265532 -v -0.055194 0.634645 -0.339208 -v -0.055194 1.482640 -0.339208 -v -0.356284 1.482640 -0.265532 -v 0.257457 0.634645 -0.240981 -v 0.257457 1.482640 -0.240981 -v 0.028921 1.482640 -0.450397 -v 0.028921 0.634645 -0.450397 -v 0.022841 0.634645 -0.443761 -v 0.251377 0.634645 -0.234346 -v 0.251377 1.482640 -0.234346 -v 0.022841 1.482640 -0.443761 -v 0.352450 0.634645 0.011650 -v 0.352450 1.482640 0.011650 -v 0.338929 1.482640 -0.298028 -v 0.338929 0.634645 -0.298028 -v 0.329937 0.634645 -0.297636 -v 0.343458 0.634645 0.012043 -v 0.343458 1.482640 0.012043 -v 0.329937 1.482640 -0.297636 -v 0.240981 0.634645 0.257458 -v 0.240981 1.482640 0.257458 -v 0.450397 1.482640 0.028921 -v 0.450397 0.634645 0.028921 -v 0.443761 0.634645 0.022841 -v 0.234346 0.634645 0.251377 -v 0.234346 1.482640 0.251377 -v 0.443761 1.482640 0.022841 -v -0.011650 0.634645 0.352450 -v -0.011650 1.482640 0.352450 -v 0.298028 1.482640 0.338929 -v 0.298028 0.634645 0.338929 -v 0.297636 0.634645 0.329937 -v -0.012043 0.634645 0.343458 -v -0.012043 1.482640 0.343458 -v 0.297636 1.482640 0.329937 -v -0.257458 0.634645 0.240981 -v -0.257458 1.482640 0.240981 -v -0.028921 1.482640 0.450397 -v -0.028921 0.634645 0.450397 -v -0.022841 0.634645 0.443761 -v -0.251377 0.634645 0.234346 -v -0.251377 1.482640 0.234346 -v -0.022841 1.482640 0.443761 -v -0.352450 0.634645 -0.011650 -v -0.352450 1.482640 -0.011650 -v -0.338929 1.482640 0.298028 -v -0.338929 0.634645 0.298028 -v -0.329937 0.634645 0.297636 -v -0.343458 0.634645 -0.012043 -v -0.343458 1.482640 -0.012043 -v -0.329937 1.482640 0.297636 -v -0.240981 0.634645 -0.257458 -v -0.240981 1.482640 -0.257458 -v -0.450397 1.482640 -0.028921 -v -0.450397 0.634645 -0.028921 -v -0.443761 0.634645 -0.022841 -v -0.234346 0.634645 -0.251377 -v -0.234346 1.482640 -0.251377 -v -0.443761 1.482640 -0.022841 -v 0.011651 0.634645 -0.352450 -v 0.011651 1.482640 -0.352450 -v -0.298028 1.482640 -0.338929 -v -0.298028 0.634645 -0.338929 -v -0.297635 0.634645 -0.329937 -v 0.012043 0.634645 -0.343458 -v 0.012043 1.482640 -0.343458 -v -0.297635 1.482640 -0.329937 -v 0.191342 0.625000 -0.461940 -v 0.000000 0.625000 -0.500000 -v -0.191342 0.625000 -0.461940 -v -0.353553 0.625000 -0.353554 -v -0.461940 0.625000 -0.191342 -v -0.500000 0.625000 -0.000000 -v -0.461940 0.625000 0.191342 -v -0.353553 0.625000 0.353553 -v -0.191342 0.625000 0.461940 -v -0.000000 0.625000 0.500000 -v 0.191342 0.625000 0.461940 -v 0.353553 0.625000 0.353553 -v 0.461940 0.625000 0.191341 -v 0.500000 0.625000 -0.000000 -v 0.461940 0.625000 -0.191342 -v 0.353553 0.625000 -0.353554 -v 0.191342 0.656250 -0.461940 -v 0.000000 0.656250 -0.500000 -v -0.191342 0.656250 -0.461940 -v -0.353553 0.656250 -0.353554 -v -0.461940 0.656250 -0.191342 -v -0.500000 0.656250 -0.000000 -v -0.461940 0.656250 0.191342 -v -0.353553 0.656250 0.353553 -v -0.191342 0.656250 0.461940 -v -0.000000 0.656250 0.500000 -v 0.191342 0.656250 0.461940 -v 0.353553 0.656250 0.353553 -v 0.461940 0.656250 0.191341 -v 0.500000 0.656250 -0.000000 -v 0.461940 0.656250 -0.191342 -v 0.353553 0.656250 -0.353554 -v 0.191342 1.496094 -0.461940 -v 0.000000 1.496094 -0.500000 -v -0.191342 1.496094 -0.461940 -v -0.353553 1.496094 -0.353554 -v -0.461940 1.496094 -0.191342 -v -0.500000 1.496094 -0.000000 -v -0.461940 1.496094 0.191342 -v -0.353553 1.496094 0.353553 -v -0.191342 1.496094 0.461940 -v -0.000000 1.496094 0.500000 -v 0.191341 1.496094 0.461940 -v 0.353553 1.496094 0.353553 -v 0.461940 1.496094 0.191342 -v 0.500000 1.496094 0.000000 -v 0.461940 1.496094 -0.191342 -v 0.353553 1.496094 -0.353554 -v 0.191342 1.464844 -0.461940 -v 0.000000 1.464844 -0.500000 -v -0.191342 1.464844 -0.461940 -v -0.353553 1.464844 -0.353554 -v -0.461940 1.464844 -0.191342 -v -0.500000 1.464844 -0.000000 -v -0.461940 1.464844 0.191342 -v -0.353553 1.464844 0.353553 -v -0.191342 1.464844 0.461940 -v -0.000000 1.464844 0.500000 -v 0.191341 1.464844 0.461940 -v 0.353553 1.464844 0.353553 -v 0.461940 1.464844 0.191342 -v 0.500000 1.464844 0.000000 -v 0.461940 1.464844 -0.191342 -v 0.353553 1.464844 -0.353554 -v 0.277785 0.625000 -0.415735 -v 0.097545 0.625000 -0.490393 -v -0.097545 0.625000 -0.490393 -v -0.277785 0.625000 -0.415735 -v -0.415735 0.625000 -0.277785 -v -0.490393 0.625000 -0.097545 -v -0.490393 0.625000 0.097545 -v -0.415735 0.625000 0.277785 -v -0.277785 0.625000 0.415735 -v -0.097545 0.625000 0.490392 -v 0.097545 0.625000 0.490393 -v 0.277785 0.625000 0.415735 -v 0.415735 0.625000 0.277785 -v 0.490393 0.625000 0.097545 -v 0.490393 0.625000 -0.097545 -v 0.415735 0.625000 -0.277786 -v 0.277785 0.656250 -0.415735 -v 0.097545 0.656250 -0.490393 -v -0.097545 0.656250 -0.490393 -v -0.277785 0.656250 -0.415735 -v -0.415735 0.656250 -0.277785 -v -0.490393 0.656250 -0.097545 -v -0.490393 0.656250 0.097545 -v -0.415735 0.656250 0.277785 -v -0.277785 0.656250 0.415735 -v -0.097545 0.656250 0.490392 -v 0.097545 0.656250 0.490393 -v 0.277785 0.656250 0.415735 -v 0.415735 0.656250 0.277785 -v 0.490393 0.656250 0.097545 -v 0.490393 0.656250 -0.097545 -v 0.415735 0.656250 -0.277786 -v 0.277785 1.496094 -0.415735 -v 0.097545 1.496094 -0.490393 -v -0.097545 1.496094 -0.490393 -v -0.277785 1.496094 -0.415735 -v -0.415735 1.496094 -0.277785 -v -0.490393 1.496094 -0.097545 -v -0.490393 1.496094 0.097545 -v -0.415735 1.496094 0.277785 -v -0.277785 1.496094 0.415735 -v -0.097545 1.496094 0.490393 -v 0.097545 1.496094 0.490393 -v 0.277785 1.496094 0.415735 -v 0.415735 1.496094 0.277785 -v 0.490393 1.496094 0.097545 -v 0.490393 1.496094 -0.097545 -v 0.415735 1.496094 -0.277785 -v 0.277785 1.464844 -0.415735 -v 0.097545 1.464844 -0.490393 -v -0.097545 1.464844 -0.490393 -v -0.277785 1.464844 -0.415735 -v -0.415735 1.464844 -0.277785 -v -0.490393 1.464844 -0.097545 -v -0.490393 1.464844 0.097545 -v -0.415735 1.464844 0.277785 -v -0.277785 1.464844 0.415735 -v -0.097545 1.464844 0.490393 -v 0.097545 1.464844 0.490393 -v 0.277785 1.464844 0.415735 -v 0.415735 1.464844 0.277785 -v 0.490393 1.464844 0.097545 -v 0.490393 1.464844 -0.097545 -v 0.415735 1.464844 -0.277785 -v 0.353554 0.625000 -0.353554 -v 0.191342 0.625000 -0.461940 -v 0.000000 0.625000 -0.500000 -v -0.191342 0.625000 -0.461940 -v -0.353553 0.625000 -0.353554 -v -0.461940 0.625000 -0.191342 -v -0.500000 0.625000 -0.000000 -v -0.461940 0.625000 0.191341 -v -0.353554 0.625000 0.353553 -v -0.191342 0.625000 0.461940 -v 0.000000 0.625000 0.500000 -v 0.191342 0.625000 0.461940 -v 0.353554 0.625000 0.353553 -v 0.461940 0.625000 0.191341 -v 0.500000 0.625000 -0.000000 -v 0.461940 0.625000 -0.191342 -v 0.353554 0.656250 -0.353554 -v 0.191342 0.656250 -0.461940 -v 0.000000 0.656250 -0.500000 -v -0.191342 0.656250 -0.461940 -v -0.353553 0.656250 -0.353554 -v -0.461940 0.656250 -0.191342 -v -0.500000 0.656250 -0.000000 -v -0.461940 0.656250 0.191341 -v -0.353554 0.656250 0.353553 -v -0.191342 0.656250 0.461940 -v 0.000000 0.656250 0.500000 -v 0.191342 0.656250 0.461940 -v 0.353554 0.656250 0.353553 -v 0.461940 0.656250 0.191341 -v 0.500000 0.656250 -0.000000 -v 0.461940 0.656250 -0.191342 -v 0.353553 1.496094 -0.353553 -v 0.191342 1.496094 -0.461940 -v 0.000000 1.496094 -0.500000 -v -0.191342 1.496094 -0.461940 -v -0.353554 1.496094 -0.353553 -v -0.461940 1.496094 -0.191342 -v -0.500000 1.496094 -0.000000 -v -0.461940 1.496094 0.191342 -v -0.353554 1.496094 0.353553 -v -0.191342 1.496094 0.461940 -v -0.000000 1.496094 0.500000 -v 0.191342 1.496094 0.461940 -v 0.353554 1.496094 0.353553 -v 0.461940 1.496094 0.191342 -v 0.500000 1.496094 -0.000000 -v 0.461940 1.496094 -0.191342 -v 0.353553 1.464844 -0.353553 -v 0.191342 1.464844 -0.461940 -v 0.000000 1.464844 -0.500000 -v -0.191342 1.464844 -0.461940 -v -0.353554 1.464844 -0.353553 -v -0.461940 1.464844 -0.191342 -v -0.500000 1.464844 -0.000000 -v -0.461940 1.464844 0.191342 -v -0.353554 1.464844 0.353553 -v -0.191342 1.464844 0.461940 -v -0.000000 1.464844 0.500000 -v 0.191342 1.464844 0.461940 -v 0.353554 1.464844 0.353553 -v 0.461940 1.464844 0.191342 -v 0.500000 1.464844 -0.000000 -v 0.461940 1.464844 -0.191342 -v 0.415735 0.625000 -0.277785 -v 0.277785 0.625000 -0.415735 -v 0.097545 0.625000 -0.490393 -v -0.097545 0.625000 -0.490393 -v -0.277785 0.625000 -0.415735 -v -0.415735 0.625000 -0.277785 -v -0.490393 0.625000 -0.097545 -v -0.490393 0.625000 0.097545 -v -0.415735 0.625000 0.277785 -v -0.277785 0.625000 0.415735 -v -0.097545 0.625000 0.490393 -v 0.097545 0.625000 0.490393 -v 0.277785 0.625000 0.415735 -v 0.415735 0.625000 0.277785 -v 0.490393 0.625000 0.097545 -v 0.490393 0.625000 -0.097546 -v 0.415735 0.656250 -0.277785 -v 0.277785 0.656250 -0.415735 -v 0.097545 0.656250 -0.490393 -v -0.097545 0.656250 -0.490393 -v -0.277785 0.656250 -0.415735 -v -0.415735 0.656250 -0.277785 -v -0.490393 0.656250 -0.097545 -v -0.490393 0.656250 0.097545 -v -0.415735 0.656250 0.277785 -v -0.277785 0.656250 0.415735 -v -0.097545 0.656250 0.490393 -v 0.097545 0.656250 0.490393 -v 0.277785 0.656250 0.415735 -v 0.415735 0.656250 0.277785 -v 0.490393 0.656250 0.097545 -v 0.490393 0.656250 -0.097546 -v 0.415735 1.496094 -0.277785 -v 0.277785 1.496094 -0.415735 -v 0.097545 1.496094 -0.490392 -v -0.097545 1.496094 -0.490393 -v -0.277785 1.496094 -0.415735 -v -0.415735 1.496094 -0.277785 -v -0.490393 1.496094 -0.097545 -v -0.490393 1.496094 0.097545 -v -0.415735 1.496094 0.277785 -v -0.277785 1.496094 0.415735 -v -0.097545 1.496094 0.490393 -v 0.097545 1.496094 0.490393 -v 0.277785 1.496094 0.415735 -v 0.415735 1.496094 0.277785 -v 0.490393 1.496094 0.097545 -v 0.490393 1.496094 -0.097545 -v 0.415735 1.464844 -0.277785 -v 0.277785 1.464844 -0.415735 -v 0.097545 1.464844 -0.490392 -v -0.097545 1.464844 -0.490393 -v -0.277785 1.464844 -0.415735 -v -0.415735 1.464844 -0.277785 -v -0.490393 1.464844 -0.097545 -v -0.490393 1.464844 0.097545 -v -0.415735 1.464844 0.277785 -v -0.277785 1.464844 0.415735 -v -0.097545 1.464844 0.490393 -v 0.097545 1.464844 0.490393 -v 0.277785 1.464844 0.415735 -v 0.415735 1.464844 0.277785 -v 0.490393 1.464844 0.097545 -v 0.490393 1.464844 -0.097545 -v 0.461939 0.625000 -0.191342 -v 0.353554 0.625000 -0.353553 -v 0.191342 0.625000 -0.461940 -v -0.000000 0.625000 -0.500000 -v -0.191342 0.625000 -0.461940 -v -0.353554 0.625000 -0.353554 -v -0.461940 0.625000 -0.191342 -v -0.500000 0.625000 -0.000000 -v -0.461940 0.625000 0.191341 -v -0.353554 0.625000 0.353553 -v -0.191342 0.625000 0.461940 -v -0.000000 0.625000 0.500000 -v 0.191342 0.625000 0.461940 -v 0.353554 0.625000 0.353553 -v 0.461939 0.625000 0.191342 -v 0.500000 0.625000 -0.000000 -v 0.461939 0.656250 -0.191342 -v 0.353554 0.656250 -0.353553 -v 0.191342 0.656250 -0.461940 -v -0.000000 0.656250 -0.500000 -v -0.191342 0.656250 -0.461940 -v -0.353554 0.656250 -0.353554 -v -0.461940 0.656250 -0.191342 -v -0.500000 0.656250 -0.000000 -v -0.461940 0.656250 0.191341 -v -0.353554 0.656250 0.353553 -v -0.191342 0.656250 0.461940 -v -0.000000 0.656250 0.500000 -v 0.191342 0.656250 0.461940 -v 0.353554 0.656250 0.353553 -v 0.461939 0.656250 0.191342 -v 0.500000 0.656250 -0.000000 -v 0.461939 1.496094 -0.191342 -v 0.353553 1.496094 -0.353553 -v 0.191342 1.496094 -0.461940 -v -0.000000 1.496094 -0.500000 -v -0.191342 1.496094 -0.461940 -v -0.353554 1.496094 -0.353553 -v -0.461940 1.496094 -0.191342 -v -0.500000 1.496094 -0.000000 -v -0.461940 1.496094 0.191342 -v -0.353554 1.496094 0.353553 -v -0.191342 1.496094 0.461940 -v -0.000000 1.496094 0.500000 -v 0.191342 1.496094 0.461940 -v 0.353553 1.496094 0.353553 -v 0.461939 1.496094 0.191342 -v 0.500000 1.496094 -0.000000 -v 0.461939 1.464844 -0.191342 -v 0.353553 1.464844 -0.353553 -v 0.191342 1.464844 -0.461940 -v -0.000000 1.464844 -0.500000 -v -0.191342 1.464844 -0.461940 -v -0.353554 1.464844 -0.353553 -v -0.461940 1.464844 -0.191342 -v -0.500000 1.464844 -0.000000 -v -0.461940 1.464844 0.191342 -v -0.353554 1.464844 0.353553 -v -0.191342 1.464844 0.461940 -v -0.000000 1.464844 0.500000 -v 0.191342 1.464844 0.461940 -v 0.353553 1.464844 0.353553 -v 0.461939 1.464844 0.191342 -v 0.500000 1.464844 -0.000000 -v 0.490393 0.625000 -0.097545 -v 0.415735 0.625000 -0.277785 -v 0.277785 0.625000 -0.415735 -v 0.097545 0.625000 -0.490393 -v -0.097545 0.625000 -0.490393 -v -0.277785 0.625000 -0.415735 -v -0.415735 0.625000 -0.277785 -v -0.490393 0.625000 -0.097545 -v -0.490393 0.625000 0.097545 -v -0.415735 0.625000 0.277785 -v -0.277785 0.625000 0.415735 -v -0.097545 0.625000 0.490393 -v 0.097545 0.625000 0.490393 -v 0.277785 0.625000 0.415735 -v 0.415735 0.625000 0.277785 -v 0.490393 0.625000 0.097545 -v 0.490393 0.656250 -0.097545 -v 0.415735 0.656250 -0.277785 -v 0.277785 0.656250 -0.415735 -v 0.097545 0.656250 -0.490393 -v -0.097545 0.656250 -0.490393 -v -0.277785 0.656250 -0.415735 -v -0.415735 0.656250 -0.277785 -v -0.490393 0.656250 -0.097545 -v -0.490393 0.656250 0.097545 -v -0.415735 0.656250 0.277785 -v -0.277785 0.656250 0.415735 -v -0.097545 0.656250 0.490393 -v 0.097545 0.656250 0.490393 -v 0.277785 0.656250 0.415735 -v 0.415735 0.656250 0.277785 -v 0.490393 0.656250 0.097545 -v 0.490393 1.496094 -0.097545 -v 0.415735 1.496094 -0.277785 -v 0.277785 1.496094 -0.415735 -v 0.097545 1.496094 -0.490393 -v -0.097545 1.496094 -0.490393 -v -0.277785 1.496094 -0.415735 -v -0.415735 1.496094 -0.277785 -v -0.490393 1.496094 -0.097545 -v -0.490393 1.496094 0.097545 -v -0.415735 1.496094 0.277785 -v -0.277785 1.496094 0.415735 -v -0.097545 1.496094 0.490393 -v 0.097545 1.496094 0.490393 -v 0.277785 1.496094 0.415735 -v 0.415735 1.496094 0.277785 -v 0.490393 1.496094 0.097545 -v 0.490393 1.464844 -0.097545 -v 0.415735 1.464844 -0.277785 -v 0.277785 1.464844 -0.415735 -v 0.097545 1.464844 -0.490393 -v -0.097545 1.464844 -0.490393 -v -0.277785 1.464844 -0.415735 -v -0.415735 1.464844 -0.277785 -v -0.490393 1.464844 -0.097545 -v -0.490393 1.464844 0.097545 -v -0.415735 1.464844 0.277785 -v -0.277785 1.464844 0.415735 -v -0.097545 1.464844 0.490393 -v 0.097545 1.464844 0.490393 -v 0.277785 1.464844 0.415735 -v 0.415735 1.464844 0.277785 -v 0.490393 1.464844 0.097545 -v 0.500001 0.625000 -0.000000 -v 0.461940 0.625000 -0.191342 -v 0.353554 0.625000 -0.353553 -v 0.191342 0.625000 -0.461940 -v 0.000000 0.625000 -0.500000 -v -0.191342 0.625000 -0.461940 -v -0.353553 0.625000 -0.353553 -v -0.461939 0.625000 -0.191342 -v -0.500000 0.625000 -0.000000 -v -0.461939 0.625000 0.191342 -v -0.353553 0.625000 0.353553 -v -0.191342 0.625000 0.461940 -v 0.000001 0.625000 0.500000 -v 0.191342 0.625000 0.461940 -v 0.353554 0.625000 0.353553 -v 0.461940 0.625000 0.191341 -v 0.500001 0.656250 -0.000000 -v 0.461940 0.656250 -0.191342 -v 0.353554 0.656250 -0.353553 -v 0.191342 0.656250 -0.461940 -v 0.000000 0.656250 -0.500000 -v -0.191342 0.656250 -0.461940 -v -0.353553 0.656250 -0.353553 -v -0.461939 0.656250 -0.191342 -v -0.500000 0.656250 -0.000000 -v -0.461939 0.656250 0.191342 -v -0.353553 0.656250 0.353553 -v -0.191342 0.656250 0.461940 -v 0.000001 0.656250 0.500000 -v 0.191342 0.656250 0.461940 -v 0.353554 0.656250 0.353553 -v 0.461940 0.656250 0.191341 -v 0.500000 1.496094 -0.000000 -v 0.461940 1.496094 -0.191342 -v 0.353554 1.496094 -0.353553 -v 0.191342 1.496094 -0.461940 -v 0.000000 1.496094 -0.500000 -v -0.191342 1.496094 -0.461940 -v -0.353553 1.496094 -0.353553 -v -0.461939 1.496094 -0.191342 -v -0.500000 1.496094 -0.000000 -v -0.461939 1.496094 0.191342 -v -0.353554 1.496094 0.353553 -v -0.191342 1.496094 0.461940 -v 0.000000 1.496094 0.500000 -v 0.191342 1.496094 0.461940 -v 0.353554 1.496094 0.353553 -v 0.461940 1.496094 0.191341 -v 0.500000 1.464844 -0.000000 -v 0.461940 1.464844 -0.191342 -v 0.353554 1.464844 -0.353553 -v 0.191342 1.464844 -0.461940 -v 0.000000 1.464844 -0.500000 -v -0.191342 1.464844 -0.461940 -v -0.353553 1.464844 -0.353553 -v -0.461939 1.464844 -0.191342 -v -0.500000 1.464844 -0.000000 -v -0.461939 1.464844 0.191342 -v -0.353554 1.464844 0.353553 -v -0.191342 1.464844 0.461940 -v 0.000000 1.464844 0.500000 -v 0.191342 1.464844 0.461940 -v 0.353554 1.464844 0.353553 -v 0.461940 1.464844 0.191341 -vt 1.000000 0.000000 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vt 0.000000 0.000000 -vt 0.050068 0.998878 -vt 0.074932 0.998878 -vt 0.097903 0.922758 -vt 0.115485 0.782105 -vt 0.125000 0.598334 -vt 0.125000 0.399421 -vt 0.115485 0.215651 -vt 0.097903 0.074998 -vt 0.074932 -0.001122 -vt 0.050068 -0.001122 -vt 0.027097 0.074998 -vt 0.009515 0.215650 -vt 0.000000 0.399421 -vt 0.000000 0.598334 -vt 0.009515 0.782105 -vt 0.027097 0.922758 -vt 0.175068 0.998878 -vt 0.199932 0.998878 -vt 0.222903 0.922758 -vt 0.240485 0.782105 -vt 0.250000 0.598334 -vt 0.250000 0.399421 -vt 0.240485 0.215651 -vt 0.222903 0.074998 -vt 0.199932 -0.001122 -vt 0.175068 -0.001122 -vt 0.152097 0.074998 -vt 0.134515 0.215650 -vt 0.134515 0.782105 -vt 0.152097 0.922758 -vt 0.300068 0.998878 -vt 0.324932 0.998878 -vt 0.347903 0.922758 -vt 0.365485 0.782105 -vt 0.375000 0.598334 -vt 0.375000 0.399421 -vt 0.365485 0.215651 -vt 0.347903 0.074998 -vt 0.324932 -0.001122 -vt 0.300068 -0.001122 -vt 0.277097 0.074998 -vt 0.259515 0.215650 -vt 0.259515 0.782105 -vt 0.277097 0.922758 -vt 0.425068 0.998878 -vt 0.449932 0.998878 -vt 0.472903 0.922758 -vt 0.490485 0.782105 -vt 0.500000 0.598334 -vt 0.500000 0.399421 -vt 0.490485 0.215651 -vt 0.472903 0.074998 -vt 0.449932 -0.001122 -vt 0.425068 -0.001122 -vt 0.402097 0.074998 -vt 0.384515 0.215650 -vt 0.384515 0.782105 -vt 0.402097 0.922758 -vt 0.550068 0.998878 -vt 0.574932 0.998878 -vt 0.597903 0.922758 -vt 0.615485 0.782105 -vt 0.625000 0.598334 -vt 0.625000 0.399421 -vt 0.615485 0.215651 -vt 0.597903 0.074998 -vt 0.574932 -0.001122 -vt 0.550068 -0.001122 -vt 0.527097 0.074998 -vt 0.509515 0.215650 -vt 0.509515 0.782105 -vt 0.527097 0.922758 -vt 0.675068 0.998878 -vt 0.699932 0.998878 -vt 0.722903 0.922758 -vt 0.740485 0.782105 -vt 0.750000 0.598334 -vt 0.750000 0.399421 -vt 0.740485 0.215651 -vt 0.722903 0.074998 -vt 0.699932 -0.001122 -vt 0.675068 -0.001122 -vt 0.652097 0.074998 -vt 0.634515 0.215650 -vt 0.634515 0.782105 -vt 0.652097 0.922758 -vt 0.800068 0.998878 -vt 0.824932 0.998878 -vt 0.847903 0.922758 -vt 0.865485 0.782105 -vt 0.875000 0.598334 -vt 0.875000 0.399421 -vt 0.865485 0.215651 -vt 0.847903 0.074998 -vt 0.824932 -0.001122 -vt 0.800068 -0.001122 -vt 0.777097 0.074998 -vt 0.759515 0.215650 -vt 0.759515 0.782105 -vt 0.777097 0.922758 -vt 0.925068 0.998878 -vt 0.949932 0.998878 -vt 0.972903 0.922758 -vt 0.990485 0.782105 -vt 1.000000 0.598334 -vt 1.000000 0.399421 -vt 0.990485 0.215651 -vt 0.972903 0.074998 -vt 0.949932 -0.001122 -vt 0.925068 -0.001122 -vt 0.902097 0.074998 -vt 0.884515 0.215650 -vt 0.884515 0.782105 -vt 0.902097 0.922758 -vt 0.062500 0.343750 -vt 0.066406 0.343750 -vt 0.066406 0.375000 -vt 0.062500 0.375000 -vt 0.066406 0.406250 -vt 0.062500 0.406250 -vt 0.062500 0.531250 -vt 0.066406 0.531250 -vt 0.066406 0.500000 -vt 0.062500 0.500000 -vt 0.066406 0.468750 -vt 0.062500 0.468750 -vt 0.066406 0.437500 -vt 0.062500 0.437500 -vt 0.074219 0.468750 -vt 0.078125 0.437500 -vt 0.082031 0.437500 -vt 0.085938 0.468750 -vt 0.085938 0.500000 -vt 0.082031 0.531250 -vt 0.078125 0.531250 -vt 0.074219 0.500000 -vt 0.062500 0.312500 -vt 0.066406 0.312500 -vt 0.062500 0.281250 -vt 0.066406 0.281250 -vt 0.023438 0.750000 -vt 0.023438 0.875000 -vt 0.019531 0.875000 -vt 0.019531 0.750000 -vt 0.023438 0.625000 -vt 0.019531 0.625000 -vt 0.023438 0.500000 -vt 0.019531 0.500000 -vt 0.023438 0.375000 -vt 0.019531 0.375000 -vt 0.023438 0.250000 -vt 0.019531 0.250000 -vt 0.035156 0.500000 -vt 0.035156 0.625000 -vt 0.027344 0.625000 -vt 0.027344 0.500000 -vt 0.023438 0.125000 -vt 0.019531 0.125000 -vt 0.023438 0.000000 -vt 0.019531 0.000000 -vt 0.035156 0.375000 -vt 0.027344 0.375000 -vt 0.035156 0.875000 -vt 0.035156 1.000000 -vt 0.027344 1.000000 -vt 0.027344 0.875000 -vt 0.035156 0.250000 -vt 0.027344 0.250000 -vt 0.035156 0.750000 -vt 0.027344 0.750000 -vt 0.035156 0.125000 -vt 0.027344 0.125000 -vt 0.035156 0.000000 -vt 0.027344 0.000000 -vt 0.023438 1.000000 -vt 0.019531 1.000000 -vt 0.078125 0.593750 -vt 0.078125 0.968750 -vt 0.062500 0.968750 -vt 0.062500 0.593750 -vt 0.082031 0.593750 -vt 0.097656 0.593750 -vt 0.097656 0.968750 -vt 0.082031 0.968750 -vt 0.046875 0.000000 -vt 0.054688 0.000000 -vt 0.054688 0.125000 -vt 0.046875 0.125000 -vt 0.039062 0.875000 -vt 0.042969 0.875000 -vt 0.042969 1.000000 -vt 0.039062 1.000000 -vt 0.039062 0.750000 -vt 0.042969 0.750000 -vt 0.039062 0.625000 -vt 0.042969 0.625000 -vt 0.039062 0.500000 -vt 0.042969 0.500000 -vt 0.046875 0.750000 -vt 0.054688 0.750000 -vt 0.054688 0.875000 -vt 0.046875 0.875000 -vt 0.039062 0.375000 -vt 0.042969 0.375000 -vt 0.039062 0.250000 -vt 0.042969 0.250000 -vt 0.046875 0.625000 -vt 0.054688 0.625000 -vt 0.039062 0.125000 -vt 0.042969 0.125000 -vt 0.046875 0.500000 -vt 0.054688 0.500000 -vt 0.039062 0.000000 -vt 0.042969 0.000000 -vt 0.046875 0.375000 -vt 0.054688 0.375000 -vt 0.054688 1.000000 -vt 0.046875 1.000000 -vt 0.046875 0.250000 -vt 0.054688 0.250000 -vt 0.003906 0.937500 -vt 0.007812 0.937500 -vt 0.007812 0.968750 -vt 0.003906 0.968750 -vt 0.003906 0.718750 -vt 0.007812 0.718750 -vt 0.007812 0.750000 -vt 0.003906 0.750000 -vt 0.007812 0.781250 -vt 0.003906 0.781250 -vt 0.007812 0.812500 -vt 0.003906 0.812500 -vt 0.007812 0.843750 -vt 0.003906 0.843750 -vt 0.007812 0.875000 -vt 0.003906 0.875000 -vt 0.003906 0.906250 -vt 0.007812 0.906250 -vt 0.203125 0.593750 -vt 0.203125 0.968750 -vt 0.187500 0.968750 -vt 0.187500 0.593750 -vt 0.207031 0.593750 -vt 0.222656 0.593750 -vt 0.222656 0.968750 -vt 0.207031 0.968750 -vt 0.328125 0.593750 -vt 0.328125 0.968750 -vt 0.312500 0.968750 -vt 0.312500 0.593750 -vt 0.332031 0.593750 -vt 0.347656 0.593750 -vt 0.347656 0.968750 -vt 0.332031 0.968750 -vt 0.453125 0.593750 -vt 0.453125 0.968750 -vt 0.437500 0.968750 -vt 0.437500 0.593750 -vt 0.457031 0.593750 -vt 0.472656 0.593750 -vt 0.472656 0.968750 -vt 0.457031 0.968750 -vt 0.148438 0.750000 -vt 0.148438 0.875000 -vt 0.144531 0.875000 -vt 0.144531 0.750000 -vt 0.148438 0.625000 -vt 0.144531 0.625000 -vt 0.148438 0.500000 -vt 0.144531 0.500000 -vt 0.148438 0.375000 -vt 0.144531 0.375000 -vt 0.148438 0.250000 -vt 0.144531 0.250000 -vt 0.160156 0.500000 -vt 0.160156 0.625000 -vt 0.152344 0.625000 -vt 0.152344 0.500000 -vt 0.148438 0.125000 -vt 0.144531 0.125000 -vt 0.148438 0.000000 -vt 0.144531 0.000000 -vt 0.160156 0.375000 -vt 0.152344 0.375000 -vt 0.160156 0.875000 -vt 0.160156 1.000000 -vt 0.152344 1.000000 -vt 0.152344 0.875000 -vt 0.160156 0.250000 -vt 0.152344 0.250000 -vt 0.160156 0.750000 -vt 0.152344 0.750000 -vt 0.160156 0.125000 -vt 0.152344 0.125000 -vt 0.160156 0.000000 -vt 0.152344 0.000000 -vt 0.148438 1.000000 -vt 0.144531 1.000000 -vt 0.171875 0.000000 -vt 0.179688 0.000000 -vt 0.179688 0.125000 -vt 0.171875 0.125000 -vt 0.164062 0.875000 -vt 0.167969 0.875000 -vt 0.167969 1.000000 -vt 0.164062 1.000000 -vt 0.164062 0.750000 -vt 0.167969 0.750000 -vt 0.164062 0.625000 -vt 0.167969 0.625000 -vt 0.164062 0.500000 -vt 0.167969 0.500000 -vt 0.171875 0.750000 -vt 0.179688 0.750000 -vt 0.179688 0.875000 -vt 0.171875 0.875000 -vt 0.164062 0.375000 -vt 0.167969 0.375000 -vt 0.164062 0.250000 -vt 0.167969 0.250000 -vt 0.171875 0.625000 -vt 0.179688 0.625000 -vt 0.164062 0.125000 -vt 0.167969 0.125000 -vt 0.171875 0.500000 -vt 0.179688 0.500000 -vt 0.164062 0.000000 -vt 0.167969 0.000000 -vt 0.171875 0.375000 -vt 0.179688 0.375000 -vt 0.179688 1.000000 -vt 0.171875 1.000000 -vt 0.171875 0.250000 -vt 0.179688 0.250000 -vt 0.273438 0.750000 -vt 0.273438 0.875000 -vt 0.269531 0.875000 -vt 0.269531 0.750000 -vt 0.273438 0.625000 -vt 0.269531 0.625000 -vt 0.273438 0.500000 -vt 0.269531 0.500000 -vt 0.273438 0.375000 -vt 0.269531 0.375000 -vt 0.273438 0.250000 -vt 0.269531 0.250000 -vt 0.285156 0.500000 -vt 0.285156 0.625000 -vt 0.277344 0.625000 -vt 0.277344 0.500000 -vt 0.273438 0.125000 -vt 0.269531 0.125000 -vt 0.273438 0.000000 -vt 0.269531 0.000000 -vt 0.285156 0.375000 -vt 0.277344 0.375000 -vt 0.285156 0.875000 -vt 0.285156 1.000000 -vt 0.277344 1.000000 -vt 0.277344 0.875000 -vt 0.285156 0.250000 -vt 0.277344 0.250000 -vt 0.285156 0.750000 -vt 0.277344 0.750000 -vt 0.285156 0.125000 -vt 0.277344 0.125000 -vt 0.285156 0.000000 -vt 0.277344 0.000000 -vt 0.273438 1.000000 -vt 0.269531 1.000000 -vt 0.296875 0.000000 -vt 0.304688 0.000000 -vt 0.304688 0.125000 -vt 0.296875 0.125000 -vt 0.289062 0.875000 -vt 0.292969 0.875000 -vt 0.292969 1.000000 -vt 0.289062 1.000000 -vt 0.289062 0.750000 -vt 0.292969 0.750000 -vt 0.289062 0.625000 -vt 0.292969 0.625000 -vt 0.289062 0.500000 -vt 0.292969 0.500000 -vt 0.296875 0.750000 -vt 0.304688 0.750000 -vt 0.304688 0.875000 -vt 0.296875 0.875000 -vt 0.289062 0.375000 -vt 0.292969 0.375000 -vt 0.289062 0.250000 -vt 0.292969 0.250000 -vt 0.296875 0.625000 -vt 0.304688 0.625000 -vt 0.289062 0.125000 -vt 0.292969 0.125000 -vt 0.296875 0.500000 -vt 0.304688 0.500000 -vt 0.289062 0.000000 -vt 0.292969 0.000000 -vt 0.296875 0.375000 -vt 0.304688 0.375000 -vt 0.304688 1.000000 -vt 0.296875 1.000000 -vt 0.296875 0.250000 -vt 0.304688 0.250000 -vt 0.398438 0.750000 -vt 0.398438 0.875000 -vt 0.394531 0.875000 -vt 0.394531 0.750000 -vt 0.398438 0.625000 -vt 0.394531 0.625000 -vt 0.398438 0.500000 -vt 0.394531 0.500000 -vt 0.398438 0.375000 -vt 0.394531 0.375000 -vt 0.398438 0.250000 -vt 0.394531 0.250000 -vt 0.410156 0.500000 -vt 0.410156 0.625000 -vt 0.402344 0.625000 -vt 0.402344 0.500000 -vt 0.398438 0.125000 -vt 0.394531 0.125000 -vt 0.398438 0.000000 -vt 0.394531 0.000000 -vt 0.410156 0.375000 -vt 0.402344 0.375000 -vt 0.410156 0.875000 -vt 0.410156 1.000000 -vt 0.402344 1.000000 -vt 0.402344 0.875000 -vt 0.410156 0.250000 -vt 0.402344 0.250000 -vt 0.410156 0.750000 -vt 0.402344 0.750000 -vt 0.410156 0.125000 -vt 0.402344 0.125000 -vt 0.410156 0.000000 -vt 0.402344 0.000000 -vt 0.398438 1.000000 -vt 0.394531 1.000000 -vt 0.421875 0.000000 -vt 0.429688 0.000000 -vt 0.429688 0.125000 -vt 0.421875 0.125000 -vt 0.414062 0.875000 -vt 0.417969 0.875000 -vt 0.417969 1.000000 -vt 0.414062 1.000000 -vt 0.414062 0.750000 -vt 0.417969 0.750000 -vt 0.414062 0.625000 -vt 0.417969 0.625000 -vt 0.414062 0.500000 -vt 0.417969 0.500000 -vt 0.421875 0.750000 -vt 0.429688 0.750000 -vt 0.429688 0.875000 -vt 0.421875 0.875000 -vt 0.414062 0.375000 -vt 0.417969 0.375000 -vt 0.414062 0.250000 -vt 0.417969 0.250000 -vt 0.421875 0.625000 -vt 0.429688 0.625000 -vt 0.414062 0.125000 -vt 0.417969 0.125000 -vt 0.421875 0.500000 -vt 0.429688 0.500000 -vt 0.414062 0.000000 -vt 0.417969 0.000000 -vt 0.421875 0.375000 -vt 0.429688 0.375000 -vt 0.429688 1.000000 -vt 0.421875 1.000000 -vt 0.421875 0.250000 -vt 0.429688 0.250000 -vt 0.523438 0.750000 -vt 0.523438 0.875000 -vt 0.519531 0.875000 -vt 0.519531 0.750000 -vt 0.523438 0.625000 -vt 0.519531 0.625000 -vt 0.523438 0.500000 -vt 0.519531 0.500000 -vt 0.523438 0.375000 -vt 0.519531 0.375000 -vt 0.523438 0.250000 -vt 0.519531 0.250000 -vt 0.535156 0.500000 -vt 0.535156 0.625000 -vt 0.527344 0.625000 -vt 0.527344 0.500000 -vt 0.523438 0.125000 -vt 0.519531 0.125000 -vt 0.523438 0.000000 -vt 0.519531 0.000000 -vt 0.535156 0.375000 -vt 0.527344 0.375000 -vt 0.535156 0.875000 -vt 0.535156 1.000000 -vt 0.527344 1.000000 -vt 0.527344 0.875000 -vt 0.535156 0.250000 -vt 0.527344 0.250000 -vt 0.535156 0.750000 -vt 0.527344 0.750000 -vt 0.535156 0.125000 -vt 0.527344 0.125000 -vt 0.535156 0.000000 -vt 0.527344 0.000000 -vt 0.523438 1.000000 -vt 0.519531 1.000000 -vt 0.546875 0.000000 -vt 0.554688 0.000000 -vt 0.554688 0.125000 -vt 0.546875 0.125000 -vt 0.539062 0.875000 -vt 0.542969 0.875000 -vt 0.542969 1.000000 -vt 0.539062 1.000000 -vt 0.539062 0.750000 -vt 0.542969 0.750000 -vt 0.539062 0.625000 -vt 0.542969 0.625000 -vt 0.539062 0.500000 -vt 0.542969 0.500000 -vt 0.546875 0.750000 -vt 0.554688 0.750000 -vt 0.554688 0.875000 -vt 0.546875 0.875000 -vt 0.539062 0.375000 -vt 0.542969 0.375000 -vt 0.539062 0.250000 -vt 0.542969 0.250000 -vt 0.546875 0.625000 -vt 0.554688 0.625000 -vt 0.539062 0.125000 -vt 0.542969 0.125000 -vt 0.546875 0.500000 -vt 0.554688 0.500000 -vt 0.539062 0.000000 -vt 0.542969 0.000000 -vt 0.546875 0.375000 -vt 0.554688 0.375000 -vt 0.554688 1.000000 -vt 0.546875 1.000000 -vt 0.546875 0.250000 -vt 0.554688 0.250000 -vt 0.648438 0.750000 -vt 0.648438 0.875000 -vt 0.644531 0.875000 -vt 0.644531 0.750000 -vt 0.648438 0.625000 -vt 0.644531 0.625000 -vt 0.648438 0.500000 -vt 0.644531 0.500000 -vt 0.648438 0.375000 -vt 0.644531 0.375000 -vt 0.648438 0.250000 -vt 0.644531 0.250000 -vt 0.660156 0.500000 -vt 0.660156 0.625000 -vt 0.652344 0.625000 -vt 0.652344 0.500000 -vt 0.648438 0.125000 -vt 0.644531 0.125000 -vt 0.648438 0.000000 -vt 0.644531 0.000000 -vt 0.660156 0.375000 -vt 0.652344 0.375000 -vt 0.660156 0.875000 -vt 0.660156 1.000000 -vt 0.652344 1.000000 -vt 0.652344 0.875000 -vt 0.660156 0.250000 -vt 0.652344 0.250000 -vt 0.660156 0.750000 -vt 0.652344 0.750000 -vt 0.660156 0.125000 -vt 0.652344 0.125000 -vt 0.660156 0.000000 -vt 0.652344 0.000000 -vt 0.648438 1.000000 -vt 0.644531 1.000000 -vt 0.671875 0.000000 -vt 0.679688 0.000000 -vt 0.679688 0.125000 -vt 0.671875 0.125000 -vt 0.664062 0.875000 -vt 0.667969 0.875000 -vt 0.667969 1.000000 -vt 0.664062 1.000000 -vt 0.664062 0.750000 -vt 0.667969 0.750000 -vt 0.664062 0.625000 -vt 0.667969 0.625000 -vt 0.664062 0.500000 -vt 0.667969 0.500000 -vt 0.671875 0.750000 -vt 0.679688 0.750000 -vt 0.679688 0.875000 -vt 0.671875 0.875000 -vt 0.664062 0.375000 -vt 0.667969 0.375000 -vt 0.664062 0.250000 -vt 0.667969 0.250000 -vt 0.671875 0.625000 -vt 0.679688 0.625000 -vt 0.664062 0.125000 -vt 0.667969 0.125000 -vt 0.671875 0.500000 -vt 0.679688 0.500000 -vt 0.664062 0.000000 -vt 0.667969 0.000000 -vt 0.671875 0.375000 -vt 0.679688 0.375000 -vt 0.679688 1.000000 -vt 0.671875 1.000000 -vt 0.671875 0.250000 -vt 0.679688 0.250000 -vt 0.773438 0.750000 -vt 0.773438 0.875000 -vt 0.769531 0.875000 -vt 0.769531 0.750000 -vt 0.773438 0.625000 -vt 0.769531 0.625000 -vt 0.773438 0.500000 -vt 0.769531 0.500000 -vt 0.773438 0.375000 -vt 0.769531 0.375000 -vt 0.773438 0.250000 -vt 0.769531 0.250000 -vt 0.785156 0.500000 -vt 0.785156 0.625000 -vt 0.777344 0.625000 -vt 0.777344 0.500000 -vt 0.773438 0.125000 -vt 0.769531 0.125000 -vt 0.773438 0.000000 -vt 0.769531 0.000000 -vt 0.785156 0.375000 -vt 0.777344 0.375000 -vt 0.785156 0.875000 -vt 0.785156 1.000000 -vt 0.777344 1.000000 -vt 0.777344 0.875000 -vt 0.785156 0.250000 -vt 0.777344 0.250000 -vt 0.785156 0.750000 -vt 0.777344 0.750000 -vt 0.785156 0.125000 -vt 0.777344 0.125000 -vt 0.785156 0.000000 -vt 0.777344 0.000000 -vt 0.773438 1.000000 -vt 0.769531 1.000000 -vt 0.796875 0.000000 -vt 0.804688 0.000000 -vt 0.804688 0.125000 -vt 0.796875 0.125000 -vt 0.789062 0.875000 -vt 0.792969 0.875000 -vt 0.792969 1.000000 -vt 0.789062 1.000000 -vt 0.789062 0.750000 -vt 0.792969 0.750000 -vt 0.789062 0.625000 -vt 0.792969 0.625000 -vt 0.789062 0.500000 -vt 0.792969 0.500000 -vt 0.796875 0.750000 -vt 0.804688 0.750000 -vt 0.804688 0.875000 -vt 0.796875 0.875000 -vt 0.789062 0.375000 -vt 0.792969 0.375000 -vt 0.789062 0.250000 -vt 0.792969 0.250000 -vt 0.796875 0.625000 -vt 0.804688 0.625000 -vt 0.789062 0.125000 -vt 0.792969 0.125000 -vt 0.796875 0.500000 -vt 0.804688 0.500000 -vt 0.789062 0.000000 -vt 0.792969 0.000000 -vt 0.796875 0.375000 -vt 0.804688 0.375000 -vt 0.804688 1.000000 -vt 0.796875 1.000000 -vt 0.796875 0.250000 -vt 0.804688 0.250000 -vt 0.898438 0.750000 -vt 0.898438 0.875000 -vt 0.894531 0.875000 -vt 0.894531 0.750000 -vt 0.898438 0.625000 -vt 0.894531 0.625000 -vt 0.898438 0.500000 -vt 0.894531 0.500000 -vt 0.898438 0.375000 -vt 0.894531 0.375000 -vt 0.898438 0.250000 -vt 0.894531 0.250000 -vt 0.910156 0.500000 -vt 0.910156 0.625000 -vt 0.902344 0.625000 -vt 0.902344 0.500000 -vt 0.898438 0.125000 -vt 0.894531 0.125000 -vt 0.898438 0.000000 -vt 0.894531 0.000000 -vt 0.910156 0.375000 -vt 0.902344 0.375000 -vt 0.910156 0.875000 -vt 0.910156 1.000000 -vt 0.902344 1.000000 -vt 0.902344 0.875000 -vt 0.910156 0.250000 -vt 0.902344 0.250000 -vt 0.910156 0.750000 -vt 0.902344 0.750000 -vt 0.910156 0.125000 -vt 0.902344 0.125000 -vt 0.910156 0.000000 -vt 0.902344 0.000000 -vt 0.898438 1.000000 -vt 0.894531 1.000000 -vt 0.921875 0.000000 -vt 0.929688 0.000000 -vt 0.929688 0.125000 -vt 0.921875 0.125000 -vt 0.914062 0.875000 -vt 0.917969 0.875000 -vt 0.917969 1.000000 -vt 0.914062 1.000000 -vt 0.914062 0.750000 -vt 0.917969 0.750000 -vt 0.914062 0.625000 -vt 0.917969 0.625000 -vt 0.914062 0.500000 -vt 0.917969 0.500000 -vt 0.921875 0.750000 -vt 0.929688 0.750000 -vt 0.929688 0.875000 -vt 0.921875 0.875000 -vt 0.914062 0.375000 -vt 0.917969 0.375000 -vt 0.914062 0.250000 -vt 0.917969 0.250000 -vt 0.921875 0.625000 -vt 0.929688 0.625000 -vt 0.914062 0.125000 -vt 0.917969 0.125000 -vt 0.921875 0.500000 -vt 0.929688 0.500000 -vt 0.914062 0.000000 -vt 0.917969 0.000000 -vt 0.921875 0.375000 -vt 0.929688 0.375000 -vt 0.929688 1.000000 -vt 0.921875 1.000000 -vt 0.921875 0.250000 -vt 0.929688 0.250000 -vn 1.000000 0.000000 0.000000 -vn 0.000000 0.000000 1.000000 -vn -1.000000 0.000000 0.000000 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 -1.000000 0.000000 -vn 0.000000 1.000000 0.000000 -vn 0.382700 0.000000 -0.923900 -vn 0.923900 0.000000 -0.382700 -vn 0.923900 0.000000 0.382700 -vn 0.382700 0.000000 0.923900 -vn -0.382700 0.000000 0.923900 -vn -0.923900 0.000000 0.382700 -vn -0.382700 0.000000 -0.923900 -vn -0.923900 0.000000 -0.382700 -vn 0.707100 0.000000 0.707100 -vn -0.707100 0.000000 0.707100 -vn 0.707100 0.000000 -0.707100 -vn -0.707100 0.000000 -0.707100 -vn 0.152100 0.000000 -0.988400 -vn -0.152100 0.000000 0.988400 -vn -0.988400 0.000000 -0.152100 -vn 0.806400 0.000000 -0.591300 -vn -0.806400 0.000000 0.591300 -vn -0.591300 0.000000 -0.806400 -vn 0.988400 0.000000 0.152100 -vn 0.591300 0.000000 0.806400 -vn 0.342000 0.000000 -0.939700 -vn -0.342000 0.000000 0.939700 -vn -0.939700 0.000000 -0.342000 -vn 0.906300 0.000000 -0.422600 -vn -0.906300 0.000000 0.422600 -vn -0.422600 0.000000 -0.906300 -vn 0.939700 0.000000 0.342000 -vn 0.422600 0.000000 0.906300 -vn 0.518800 0.000000 -0.854900 -vn -0.518800 0.000000 0.854900 -vn -0.854900 0.000000 -0.518800 -vn 0.971300 0.000000 -0.237700 -vn -0.971300 0.000000 0.237700 -vn -0.237700 0.000000 -0.971300 -vn 0.854900 0.000000 0.518800 -vn 0.237700 0.000000 0.971300 -vn 0.675600 0.000000 -0.737300 -vn -0.675600 0.000000 0.737300 -vn -0.737300 0.000000 -0.675600 -vn 0.999000 0.000000 -0.043600 -vn -0.999000 0.000000 0.043600 -vn -0.043600 0.000000 -0.999000 -vn 0.737300 0.000000 0.675600 -vn 0.043600 0.000000 0.999000 -vn 0.555600 0.000000 0.831500 -vn 0.195100 0.000000 0.980800 -vn -0.195100 0.000000 0.980800 -vn -0.555600 0.000000 0.831500 -vn -0.831500 0.000000 0.555600 -vn 0.195100 0.000000 -0.980800 -vn -0.980800 0.000000 0.195100 -vn -0.980800 0.000000 -0.195100 -vn 0.555600 0.000000 -0.831500 -vn -0.831500 0.000000 -0.555600 -vn 0.831500 0.000000 -0.555600 -vn -0.555600 0.000000 -0.831500 -vn 0.980800 0.000000 -0.195100 -vn -0.195100 0.000000 -0.980800 -vn 0.980800 0.000000 0.195100 -vn 0.831500 0.000000 0.555600 -g Cylinder.002_Cylinder.003_sides -s off -f 105/1/1 109/2/1 110/3/1 106/4/1 -f 106/1/2 110/2/2 111/3/2 107/4/2 -f 107/4/3 111/3/3 112/2/3 108/1/3 -f 109/2/4 105/1/4 108/4/4 112/3/4 -g Cylinder.002_Cylinder.003_top-bottom -f 105/2/5 106/1/5 107/4/5 108/3/5 -f 109/2/6 112/3/6 111/4/6 110/1/6 -g Cylinder.002_Cylinder.003_turbine-top-bottom -f 74/5/5 73/6/5 88/7/5 87/8/5 86/9/5 85/10/5 84/11/5 83/12/5 82/13/5 81/14/5 80/15/5 79/16/5 78/17/5 77/18/5 76/19/5 75/20/5 -f 18/5/5 17/6/5 32/7/5 31/8/5 30/9/5 29/10/5 28/11/5 27/12/5 26/13/5 25/14/5 24/15/5 23/16/5 22/17/5 21/18/5 20/19/5 19/20/5 -f 33/6/6 34/5/6 35/20/6 36/19/6 37/18/6 38/17/6 39/16/6 40/15/6 41/14/6 42/13/6 43/12/6 44/11/6 45/10/6 46/9/6 47/8/6 48/7/6 -f 57/6/6 58/5/6 59/20/6 60/19/6 61/18/6 62/17/6 63/16/6 64/15/6 65/14/6 66/13/6 67/12/6 68/11/6 69/10/6 70/9/6 71/8/6 72/7/6 -f 410/21/5 409/22/5 424/23/5 423/24/5 422/25/5 421/26/5 420/27/5 419/28/5 418/29/5 417/30/5 416/31/5 415/32/5 414/10/5 413/9/5 412/33/5 411/34/5 -f 362/21/5 361/22/5 376/23/5 375/24/5 374/25/5 373/26/5 372/27/5 371/28/5 370/29/5 369/30/5 368/31/5 367/32/5 366/10/5 365/9/5 364/33/5 363/34/5 -f 377/22/6 378/21/6 379/34/6 380/33/6 381/9/6 382/10/6 383/32/6 384/31/6 385/30/6 386/29/6 387/28/6 388/27/6 389/26/6 390/25/6 391/24/6 392/23/6 -f 393/22/6 394/21/6 395/34/6 396/33/6 397/9/6 398/10/6 399/32/6 400/31/6 401/30/6 402/29/6 403/28/6 404/27/6 405/26/6 406/25/6 407/24/6 408/23/6 -f 474/35/5 473/36/5 488/37/5 487/38/5 486/39/5 485/40/5 484/41/5 483/42/5 482/43/5 481/44/5 480/45/5 479/46/5 478/26/5 477/25/5 476/47/5 475/48/5 -f 426/35/5 425/36/5 440/37/5 439/38/5 438/39/5 437/40/5 436/41/5 435/42/5 434/43/5 433/44/5 432/45/5 431/46/5 430/26/5 429/25/5 428/47/5 427/48/5 -f 441/36/6 442/35/6 443/48/6 444/47/6 445/25/6 446/26/6 447/46/6 448/45/6 449/44/6 450/43/6 451/42/6 452/41/6 453/40/6 454/39/6 455/38/6 456/37/6 -f 457/36/6 458/35/6 459/48/6 460/47/6 461/25/6 462/26/6 463/46/6 464/45/6 465/44/6 466/43/6 467/42/6 468/41/6 469/40/6 470/39/6 471/38/6 472/37/6 -f 538/49/5 537/50/5 552/51/5 551/52/5 550/53/5 549/54/5 548/55/5 547/56/5 546/57/5 545/58/5 544/59/5 543/60/5 542/40/5 541/39/5 540/61/5 539/62/5 -f 490/49/5 489/50/5 504/51/5 503/52/5 502/53/5 501/54/5 500/55/5 499/56/5 498/57/5 497/58/5 496/59/5 495/60/5 494/40/5 493/39/5 492/61/5 491/62/5 -f 505/50/6 506/49/6 507/62/6 508/61/6 509/39/6 510/40/6 511/60/6 512/59/6 513/58/6 514/57/6 515/56/6 516/55/6 517/54/6 518/53/6 519/52/6 520/51/6 -f 521/50/6 522/49/6 523/62/6 524/61/6 525/39/6 526/40/6 527/60/6 528/59/6 529/58/6 530/57/6 531/56/6 532/55/6 533/54/6 534/53/6 535/52/6 536/51/6 -f 602/63/5 601/64/5 616/65/5 615/66/5 614/67/5 613/68/5 612/69/5 611/70/5 610/71/5 609/72/5 608/73/5 607/74/5 606/54/5 605/53/5 604/75/5 603/76/5 -f 554/63/5 553/64/5 568/65/5 567/66/5 566/67/5 565/68/5 564/69/5 563/70/5 562/71/5 561/72/5 560/73/5 559/74/5 558/54/5 557/53/5 556/75/5 555/76/5 -f 569/64/6 570/63/6 571/76/6 572/75/6 573/53/6 574/54/6 575/74/6 576/73/6 577/72/6 578/71/6 579/70/6 580/69/6 581/68/6 582/67/6 583/66/6 584/65/6 -f 585/64/6 586/63/6 587/76/6 588/75/6 589/53/6 590/54/6 591/74/6 592/73/6 593/72/6 594/71/6 595/70/6 596/69/6 597/68/6 598/67/6 599/66/6 600/65/6 -f 666/77/5 665/78/5 680/79/5 679/80/5 678/81/5 677/82/5 676/83/5 675/84/5 674/85/5 673/86/5 672/87/5 671/88/5 670/68/5 669/67/5 668/89/5 667/90/5 -f 618/77/5 617/78/5 632/79/5 631/80/5 630/81/5 629/82/5 628/83/5 627/84/5 626/85/5 625/86/5 624/87/5 623/88/5 622/68/5 621/67/5 620/89/5 619/90/5 -f 633/78/6 634/77/6 635/90/6 636/89/6 637/67/6 638/68/6 639/88/6 640/87/6 641/86/6 642/85/6 643/84/6 644/83/6 645/82/6 646/81/6 647/80/6 648/79/6 -f 649/78/6 650/77/6 651/90/6 652/89/6 653/67/6 654/68/6 655/88/6 656/87/6 657/86/6 658/85/6 659/84/6 660/83/6 661/82/6 662/81/6 663/80/6 664/79/6 -f 730/91/5 729/92/5 744/93/5 743/94/5 742/95/5 741/96/5 740/97/5 739/98/5 738/99/5 737/100/5 736/101/5 735/102/5 734/82/5 733/81/5 732/103/5 731/104/5 -f 682/91/5 681/92/5 696/93/5 695/94/5 694/95/5 693/96/5 692/97/5 691/98/5 690/99/5 689/100/5 688/101/5 687/102/5 686/82/5 685/81/5 684/103/5 683/104/5 -f 697/92/6 698/91/6 699/104/6 700/103/6 701/81/6 702/82/6 703/102/6 704/101/6 705/100/6 706/99/6 707/98/6 708/97/6 709/96/6 710/95/6 711/94/6 712/93/6 -f 713/92/6 714/91/6 715/104/6 716/103/6 717/81/6 718/82/6 719/102/6 720/101/6 721/100/6 722/99/6 723/98/6 724/97/6 725/96/6 726/95/6 727/94/6 728/93/6 -f 794/105/5 793/106/5 808/107/5 807/108/5 806/109/5 805/110/5 804/111/5 803/112/5 802/113/5 801/114/5 800/115/5 799/116/5 798/96/5 797/95/5 796/117/5 795/118/5 -f 746/105/5 745/106/5 760/107/5 759/108/5 758/109/5 757/110/5 756/111/5 755/112/5 754/113/5 753/114/5 752/115/5 751/116/5 750/96/5 749/95/5 748/117/5 747/118/5 -f 761/106/6 762/105/6 763/118/6 764/117/6 765/95/6 766/96/6 767/116/6 768/115/6 769/114/6 770/113/6 771/112/6 772/111/6 773/110/6 774/109/6 775/108/6 776/107/6 -f 777/106/6 778/105/6 779/118/6 780/117/6 781/95/6 782/96/6 783/116/6 784/115/6 785/114/6 786/113/6 787/112/6 788/111/6 789/110/6 790/109/6 791/108/6 792/107/6 -g Cylinder.002_Cylinder.003_turbine-blades-etc -f 1/119/7 2/120/7 4/121/7 3/122/7 -f 3/122/8 4/121/8 6/123/8 5/124/8 -f 5/125/9 6/126/9 8/127/9 7/128/9 -f 7/128/10 8/127/10 10/129/10 9/130/10 -f 9/130/11 10/129/11 12/131/11 11/132/11 -f 11/132/12 12/131/12 14/123/12 13/124/12 -f 4/133/6 2/134/6 16/135/6 14/136/6 12/137/6 10/138/6 8/139/6 6/140/6 -f 15/141/13 16/142/13 2/120/13 1/119/13 -f 13/143/14 14/144/14 16/142/14 15/141/14 -f 27/145/15 28/146/15 44/147/15 43/148/15 -f 26/149/10 27/145/10 43/148/10 42/150/10 -f 25/151/2 26/149/2 42/150/2 41/152/2 -f 24/153/11 25/151/11 41/152/11 40/154/11 -f 23/155/16 24/153/16 40/154/16 39/156/16 -f 17/157/4 18/158/4 34/159/4 33/160/4 -f 22/161/12 23/155/12 39/156/12 38/162/12 -f 21/163/3 22/161/3 38/162/3 37/164/3 -f 32/165/7 17/157/7 33/160/7 48/166/7 -f 20/167/14 21/168/14 37/169/14 36/170/14 -f 31/171/17 32/165/17 48/166/17 47/172/17 -f 19/173/18 20/167/18 36/170/18 35/174/18 -f 30/175/8 31/171/8 47/172/8 46/176/8 -f 18/158/13 19/173/13 35/174/13 34/159/13 -f 29/177/1 30/175/1 46/176/1 45/178/1 -f 28/146/9 29/179/9 45/180/9 44/147/9 -f 52/181/19 51/182/19 50/183/19 49/184/19 -f 53/185/20 54/186/20 55/187/20 56/188/20 -f 51/182/21 52/181/21 53/185/21 56/188/21 -f 67/189/15 83/190/15 84/191/15 68/192/15 -f 66/193/10 82/194/10 83/195/10 67/196/10 -f 65/197/2 81/198/2 82/194/2 66/193/2 -f 64/199/11 80/200/11 81/198/11 65/197/11 -f 63/201/16 79/202/16 80/200/16 64/199/16 -f 57/203/4 73/204/4 74/205/4 58/206/4 -f 62/207/12 78/208/12 79/202/12 63/201/12 -f 61/209/3 77/210/3 78/208/3 62/207/3 -f 72/211/7 88/212/7 73/204/7 57/203/7 -f 60/213/14 76/214/14 77/210/14 61/209/14 -f 71/215/17 87/216/17 88/212/17 72/211/17 -f 59/217/18 75/218/18 76/214/18 60/213/18 -f 70/219/8 86/220/8 87/216/8 71/215/8 -f 58/206/13 74/205/13 75/221/13 59/222/13 -f 69/223/1 85/224/1 86/220/1 70/219/1 -f 68/192/9 84/191/9 85/224/9 69/223/9 -f 89/225/17 90/226/17 92/227/17 91/228/17 -f 91/229/1 92/230/1 94/231/1 93/232/1 -f 93/232/15 94/231/15 96/233/15 95/234/15 -f 95/234/2 96/233/2 98/235/2 97/236/2 -f 97/236/16 98/235/16 100/237/16 99/238/16 -f 99/238/3 100/237/3 102/239/3 101/240/3 -f 103/241/4 104/242/4 90/226/4 89/225/4 -f 101/240/18 102/239/18 104/242/18 103/241/18 -f 116/181/22 115/182/22 114/183/22 113/184/22 -f 117/185/23 118/186/23 119/187/23 120/188/23 -f 115/182/24 116/181/24 117/185/24 120/188/24 -f 124/181/25 123/182/25 122/183/25 121/184/25 -f 125/185/21 126/186/21 127/187/21 128/188/21 -f 123/182/19 124/181/19 125/185/19 128/188/19 -f 132/181/26 131/182/26 130/183/26 129/184/26 -f 133/185/24 134/186/24 135/187/24 136/188/24 -f 131/182/22 132/181/22 133/185/22 136/188/22 -f 140/181/20 139/182/20 138/183/20 137/184/20 -f 141/185/19 142/186/19 143/187/19 144/188/19 -f 139/182/25 140/181/25 141/185/25 144/188/25 -f 148/181/23 147/182/23 146/183/23 145/184/23 -f 149/185/22 150/186/22 151/187/22 152/188/22 -f 147/182/26 148/181/26 149/185/26 152/188/26 -f 156/181/21 155/182/21 154/183/21 153/184/21 -f 157/185/25 158/186/25 159/187/25 160/188/25 -f 155/182/20 156/181/20 157/185/20 160/188/20 -f 164/181/24 163/182/24 162/183/24 161/184/24 -f 165/185/26 166/186/26 167/187/26 168/188/26 -f 163/182/23 164/181/23 165/185/23 168/188/23 -f 172/243/27 171/244/27 170/245/27 169/246/27 -f 173/247/28 174/248/28 175/249/28 176/250/28 -f 171/244/29 172/243/29 173/247/29 176/250/29 -f 180/243/30 179/244/30 178/245/30 177/246/30 -f 181/247/31 182/248/31 183/249/31 184/250/31 -f 179/244/32 180/243/32 181/247/32 184/250/32 -f 188/243/33 187/244/33 186/245/33 185/246/33 -f 189/247/29 190/248/29 191/249/29 192/250/29 -f 187/244/27 188/243/27 189/247/27 192/250/27 -f 196/243/34 195/244/34 194/245/34 193/246/34 -f 197/247/32 198/248/32 199/249/32 200/250/32 -f 195/244/30 196/243/30 197/247/30 200/250/30 -f 204/243/28 203/244/28 202/245/28 201/246/28 -f 205/247/27 206/248/27 207/249/27 208/250/27 -f 203/244/33 204/243/33 205/247/33 208/250/33 -f 212/243/31 211/244/31 210/245/31 209/246/31 -f 213/247/30 214/248/30 215/249/30 216/250/30 -f 211/244/34 212/243/34 213/247/34 216/250/34 -f 220/243/29 219/244/29 218/245/29 217/246/29 -f 221/247/33 222/248/33 223/249/33 224/250/33 -f 219/244/28 220/243/28 221/247/28 224/250/28 -f 228/243/32 227/244/32 226/245/32 225/246/32 -f 229/247/34 230/248/34 231/249/34 232/250/34 -f 227/244/31 228/243/31 229/247/31 232/250/31 -f 236/251/35 235/252/35 234/253/35 233/254/35 -f 237/255/36 238/256/36 239/257/36 240/258/36 -f 235/252/37 236/251/37 237/255/37 240/258/37 -f 244/251/38 243/252/38 242/253/38 241/254/38 -f 245/255/39 246/256/39 247/257/39 248/258/39 -f 243/252/40 244/251/40 245/255/40 248/258/40 -f 252/251/41 251/252/41 250/253/41 249/254/41 -f 253/255/37 254/256/37 255/257/37 256/258/37 -f 251/252/35 252/251/35 253/255/35 256/258/35 -f 260/251/42 259/252/42 258/253/42 257/254/42 -f 261/255/40 262/256/40 263/257/40 264/258/40 -f 259/252/38 260/251/38 261/255/38 264/258/38 -f 268/251/36 267/252/36 266/253/36 265/254/36 -f 269/255/35 270/256/35 271/257/35 272/258/35 -f 267/252/41 268/251/41 269/255/41 272/258/41 -f 276/251/39 275/252/39 274/253/39 273/254/39 -f 277/255/38 278/256/38 279/257/38 280/258/38 -f 275/252/42 276/251/42 277/255/42 280/258/42 -f 284/251/37 283/252/37 282/253/37 281/254/37 -f 285/255/41 286/256/41 287/257/41 288/258/41 -f 283/252/36 284/251/36 285/255/36 288/258/36 -f 292/251/40 291/252/40 290/253/40 289/254/40 -f 293/255/42 294/256/42 295/257/42 296/258/42 -f 291/252/39 292/251/39 293/255/39 296/258/39 -f 300/259/43 299/260/43 298/261/43 297/262/43 -f 301/263/44 302/264/44 303/265/44 304/266/44 -f 299/260/45 300/259/45 301/263/45 304/266/45 -f 308/259/46 307/260/46 306/261/46 305/262/46 -f 309/263/47 310/264/47 311/265/47 312/266/47 -f 307/260/48 308/259/48 309/263/48 312/266/48 -f 316/259/49 315/260/49 314/261/49 313/262/49 -f 317/263/45 318/264/45 319/265/45 320/266/45 -f 315/260/43 316/259/43 317/263/43 320/266/43 -f 324/259/50 323/260/50 322/261/50 321/262/50 -f 325/263/48 326/264/48 327/265/48 328/266/48 -f 323/260/46 324/259/46 325/263/46 328/266/46 -f 332/259/44 331/260/44 330/261/44 329/262/44 -f 333/263/43 334/264/43 335/265/43 336/266/43 -f 331/260/49 332/259/49 333/263/49 336/266/49 -f 340/259/47 339/260/47 338/261/47 337/262/47 -f 341/263/46 342/264/46 343/265/46 344/266/46 -f 339/260/50 340/259/50 341/263/50 344/266/50 -f 348/259/45 347/260/45 346/261/45 345/262/45 -f 349/263/49 350/264/49 351/265/49 352/266/49 -f 347/260/44 348/259/44 349/263/44 352/266/44 -f 356/259/48 355/260/48 354/261/48 353/262/48 -f 357/263/50 358/264/50 359/265/50 360/266/50 -f 355/260/47 356/259/47 357/263/47 360/266/47 -f 371/267/51 372/268/51 388/269/51 387/270/51 -f 370/271/52 371/267/52 387/270/52 386/272/52 -f 369/273/53 370/271/53 386/272/53 385/274/53 -f 368/275/54 369/273/54 385/274/54 384/276/54 -f 367/277/55 368/275/55 384/276/55 383/278/55 -f 361/279/56 362/280/56 378/281/56 377/282/56 -f 366/283/57 367/277/57 383/278/57 382/284/57 -f 365/285/58 366/283/58 382/284/58 381/286/58 -f 376/287/59 361/279/59 377/282/59 392/288/59 -f 364/289/60 365/290/60 381/291/60 380/292/60 -f 375/293/61 376/287/61 392/288/61 391/294/61 -f 363/295/62 364/289/62 380/292/62 379/296/62 -f 374/297/63 375/293/63 391/294/63 390/298/63 -f 362/280/64 363/295/64 379/296/64 378/281/64 -f 373/299/65 374/297/65 390/298/65 389/300/65 -f 372/268/66 373/301/66 389/302/66 388/269/66 -f 403/303/51 419/304/51 420/305/51 404/306/51 -f 402/307/52 418/308/52 419/309/52 403/310/52 -f 401/311/53 417/312/53 418/308/53 402/307/53 -f 400/313/54 416/314/54 417/312/54 401/311/54 -f 399/315/55 415/316/55 416/314/55 400/313/55 -f 393/317/56 409/318/56 410/319/56 394/320/56 -f 398/321/57 414/322/57 415/316/57 399/315/57 -f 397/323/58 413/324/58 414/322/58 398/321/58 -f 408/325/59 424/326/59 409/318/59 393/317/59 -f 396/327/60 412/328/60 413/324/60 397/323/60 -f 407/329/61 423/330/61 424/326/61 408/325/61 -f 395/331/62 411/332/62 412/328/62 396/327/62 -f 406/333/63 422/334/63 423/330/63 407/329/63 -f 394/320/64 410/319/64 411/335/64 395/336/64 -f 405/337/65 421/338/65 422/334/65 406/333/65 -f 404/306/66 420/305/66 421/338/66 405/337/66 -f 435/339/10 436/340/10 452/341/10 451/342/10 -f 434/343/2 435/339/2 451/342/2 450/344/2 -f 433/345/11 434/343/11 450/344/11 449/346/11 -f 432/347/16 433/345/16 449/346/16 448/348/16 -f 431/349/12 432/347/12 448/348/12 447/350/12 -f 425/351/7 426/352/7 442/353/7 441/354/7 -f 430/355/3 431/349/3 447/350/3 446/356/3 -f 429/357/14 430/355/14 446/356/14 445/358/14 -f 440/359/17 425/351/17 441/354/17 456/360/17 -f 428/361/18 429/362/18 445/363/18 444/364/18 -f 439/365/8 440/359/8 456/360/8 455/366/8 -f 427/367/13 428/361/13 444/364/13 443/368/13 -f 438/369/1 439/365/1 455/366/1 454/370/1 -f 426/352/4 427/367/4 443/368/4 442/353/4 -f 437/371/9 438/369/9 454/370/9 453/372/9 -f 436/340/15 437/373/15 453/374/15 452/341/15 -f 467/375/10 483/376/10 484/377/10 468/378/10 -f 466/379/2 482/380/2 483/381/2 467/382/2 -f 465/383/11 481/384/11 482/380/11 466/379/11 -f 464/385/16 480/386/16 481/384/16 465/383/16 -f 463/387/12 479/388/12 480/386/12 464/385/12 -f 457/389/7 473/390/7 474/391/7 458/392/7 -f 462/393/3 478/394/3 479/388/3 463/387/3 -f 461/395/14 477/396/14 478/394/14 462/393/14 -f 472/397/17 488/398/17 473/390/17 457/389/17 -f 460/399/18 476/400/18 477/396/18 461/395/18 -f 471/401/8 487/402/8 488/398/8 472/397/8 -f 459/403/13 475/404/13 476/400/13 460/399/13 -f 470/405/1 486/406/1 487/402/1 471/401/1 -f 458/392/4 474/391/4 475/407/4 459/408/4 -f 469/409/9 485/410/9 486/406/9 470/405/9 -f 468/378/15 484/377/15 485/410/15 469/409/15 -f 499/411/52 500/412/52 516/413/52 515/414/52 -f 498/415/53 499/411/53 515/414/53 514/416/53 -f 497/417/54 498/415/54 514/416/54 513/418/54 -f 496/419/55 497/417/55 513/418/55 512/420/55 -f 495/421/57 496/419/57 512/420/57 511/422/57 -f 489/423/59 490/424/59 506/425/59 505/426/59 -f 494/427/58 495/421/58 511/422/58 510/428/58 -f 493/429/60 494/427/60 510/428/60 509/430/60 -f 504/431/61 489/423/61 505/426/61 520/432/61 -f 492/433/62 493/434/62 509/435/62 508/436/62 -f 503/437/63 504/431/63 520/432/63 519/438/63 -f 491/439/64 492/433/64 508/436/64 507/440/64 -f 502/441/65 503/437/65 519/438/65 518/442/65 -f 490/424/56 491/439/56 507/440/56 506/425/56 -f 501/443/66 502/441/66 518/442/66 517/444/66 -f 500/412/51 501/445/51 517/446/51 516/413/51 -f 531/447/52 547/448/52 548/449/52 532/450/52 -f 530/451/53 546/452/53 547/453/53 531/454/53 -f 529/455/54 545/456/54 546/452/54 530/451/54 -f 528/457/55 544/458/55 545/456/55 529/455/55 -f 527/459/57 543/460/57 544/458/57 528/457/57 -f 521/461/59 537/462/59 538/463/59 522/464/59 -f 526/465/58 542/466/58 543/460/58 527/459/58 -f 525/467/60 541/468/60 542/466/60 526/465/60 -f 536/469/61 552/470/61 537/462/61 521/461/61 -f 524/471/62 540/472/62 541/468/62 525/467/62 -f 535/473/63 551/474/63 552/470/63 536/469/63 -f 523/475/64 539/476/64 540/472/64 524/471/64 -f 534/477/65 550/478/65 551/474/65 535/473/65 -f 522/464/56 538/463/56 539/479/56 523/480/56 -f 533/481/66 549/482/66 550/478/66 534/477/66 -f 532/450/51 548/449/51 549/482/51 533/481/51 -f 563/483/2 564/484/2 580/485/2 579/486/2 -f 562/487/11 563/483/11 579/486/11 578/488/11 -f 561/489/16 562/487/16 578/488/16 577/490/16 -f 560/491/12 561/489/12 577/490/12 576/492/12 -f 559/493/3 560/491/3 576/492/3 575/494/3 -f 553/495/17 554/496/17 570/497/17 569/498/17 -f 558/499/14 559/493/14 575/494/14 574/500/14 -f 557/501/18 558/499/18 574/500/18 573/502/18 -f 568/503/8 553/495/8 569/498/8 584/504/8 -f 556/505/13 557/506/13 573/507/13 572/508/13 -f 567/509/1 568/503/1 584/504/1 583/510/1 -f 555/511/4 556/505/4 572/508/4 571/512/4 -f 566/513/9 567/509/9 583/510/9 582/514/9 -f 554/496/7 555/511/7 571/512/7 570/497/7 -f 565/515/15 566/513/15 582/514/15 581/516/15 -f 564/484/10 565/517/10 581/518/10 580/485/10 -f 595/519/2 611/520/2 612/521/2 596/522/2 -f 594/523/11 610/524/11 611/525/11 595/526/11 -f 593/527/16 609/528/16 610/524/16 594/523/16 -f 592/529/12 608/530/12 609/528/12 593/527/12 -f 591/531/3 607/532/3 608/530/3 592/529/3 -f 585/533/17 601/534/17 602/535/17 586/536/17 -f 590/537/14 606/538/14 607/532/14 591/531/14 -f 589/539/18 605/540/18 606/538/18 590/537/18 -f 600/541/8 616/542/8 601/534/8 585/533/8 -f 588/543/13 604/544/13 605/540/13 589/539/13 -f 599/545/1 615/546/1 616/542/1 600/541/1 -f 587/547/4 603/548/4 604/544/4 588/543/4 -f 598/549/9 614/550/9 615/546/9 599/545/9 -f 586/536/7 602/535/7 603/551/7 587/552/7 -f 597/553/15 613/554/15 614/550/15 598/549/15 -f 596/522/10 612/521/10 613/554/10 597/553/10 -f 627/555/53 628/556/53 644/557/53 643/558/53 -f 626/559/54 627/555/54 643/558/54 642/560/54 -f 625/561/55 626/559/55 642/560/55 641/562/55 -f 624/563/57 625/561/57 641/562/57 640/564/57 -f 623/565/58 624/563/58 640/564/58 639/566/58 -f 617/567/61 618/568/61 634/569/61 633/570/61 -f 622/571/60 623/565/60 639/566/60 638/572/60 -f 621/573/62 622/571/62 638/572/62 637/574/62 -f 632/575/63 617/567/63 633/570/63 648/576/63 -f 620/577/64 621/578/64 637/579/64 636/580/64 -f 631/581/65 632/575/65 648/576/65 647/582/65 -f 619/583/56 620/577/56 636/580/56 635/584/56 -f 630/585/66 631/581/66 647/582/66 646/586/66 -f 618/568/59 619/583/59 635/584/59 634/569/59 -f 629/587/51 630/585/51 646/586/51 645/588/51 -f 628/556/52 629/589/52 645/590/52 644/557/52 -f 659/591/53 675/592/53 676/593/53 660/594/53 -f 658/595/54 674/596/54 675/597/54 659/598/54 -f 657/599/55 673/600/55 674/596/55 658/595/55 -f 656/601/57 672/602/57 673/600/57 657/599/57 -f 655/603/58 671/604/58 672/602/58 656/601/58 -f 649/605/61 665/606/61 666/607/61 650/608/61 -f 654/609/60 670/610/60 671/604/60 655/603/60 -f 653/611/62 669/612/62 670/610/62 654/609/62 -f 664/613/63 680/614/63 665/606/63 649/605/63 -f 652/615/64 668/616/64 669/612/64 653/611/64 -f 663/617/65 679/618/65 680/614/65 664/613/65 -f 651/619/56 667/620/56 668/616/56 652/615/56 -f 662/621/66 678/622/66 679/618/66 663/617/66 -f 650/608/59 666/607/59 667/623/59 651/624/59 -f 661/625/51 677/626/51 678/622/51 662/621/51 -f 660/594/52 676/593/52 677/626/52 661/625/52 -f 691/627/11 692/628/11 708/629/11 707/630/11 -f 690/631/16 691/627/16 707/630/16 706/632/16 -f 689/633/12 690/631/12 706/632/12 705/634/12 -f 688/635/3 689/633/3 705/634/3 704/636/3 -f 687/637/14 688/635/14 704/636/14 703/638/14 -f 681/639/8 682/640/8 698/641/8 697/642/8 -f 686/643/18 687/637/18 703/638/18 702/644/18 -f 685/645/13 686/643/13 702/644/13 701/646/13 -f 696/647/1 681/639/1 697/642/1 712/648/1 -f 684/649/4 685/650/4 701/651/4 700/652/4 -f 695/653/9 696/647/9 712/648/9 711/654/9 -f 683/655/7 684/649/7 700/652/7 699/656/7 -f 694/657/15 695/653/15 711/654/15 710/658/15 -f 682/640/17 683/655/17 699/656/17 698/641/17 -f 693/659/10 694/657/10 710/658/10 709/660/10 -f 692/628/2 693/661/2 709/662/2 708/629/2 -f 723/663/11 739/664/11 740/665/11 724/666/11 -f 722/667/16 738/668/16 739/669/16 723/670/16 -f 721/671/12 737/672/12 738/668/12 722/667/12 -f 720/673/3 736/674/3 737/672/3 721/671/3 -f 719/675/14 735/676/14 736/674/14 720/673/14 -f 713/677/8 729/678/8 730/679/8 714/680/8 -f 718/681/18 734/682/18 735/676/18 719/675/18 -f 717/683/13 733/684/13 734/682/13 718/681/13 -f 728/685/1 744/686/1 729/678/1 713/677/1 -f 716/687/4 732/688/4 733/684/4 717/683/4 -f 727/689/9 743/690/9 744/686/9 728/685/9 -f 715/691/7 731/692/7 732/688/7 716/687/7 -f 726/693/15 742/694/15 743/690/15 727/689/15 -f 714/680/17 730/679/17 731/695/17 715/696/17 -f 725/697/10 741/698/10 742/694/10 726/693/10 -f 724/666/2 740/665/2 741/698/2 725/697/2 -f 755/699/54 756/700/54 772/701/54 771/702/54 -f 754/703/55 755/699/55 771/702/55 770/704/55 -f 753/705/57 754/703/57 770/704/57 769/706/57 -f 752/707/58 753/705/58 769/706/58 768/708/58 -f 751/709/60 752/707/60 768/708/60 767/710/60 -f 745/711/63 746/712/63 762/713/63 761/714/63 -f 750/715/62 751/709/62 767/710/62 766/716/62 -f 749/717/64 750/715/64 766/716/64 765/718/64 -f 760/719/65 745/711/65 761/714/65 776/720/65 -f 748/721/56 749/722/56 765/723/56 764/724/56 -f 759/725/66 760/719/66 776/720/66 775/726/66 -f 747/727/59 748/721/59 764/724/59 763/728/59 -f 758/729/51 759/725/51 775/726/51 774/730/51 -f 746/712/61 747/727/61 763/728/61 762/713/61 -f 757/731/52 758/729/52 774/730/52 773/732/52 -f 756/700/53 757/733/53 773/734/53 772/701/53 -f 787/735/54 803/736/54 804/737/54 788/738/54 -f 786/739/55 802/740/55 803/741/55 787/742/55 -f 785/743/57 801/744/57 802/740/57 786/739/57 -f 784/745/58 800/746/58 801/744/58 785/743/58 -f 783/747/60 799/748/60 800/746/60 784/745/60 -f 777/749/63 793/750/63 794/751/63 778/752/63 -f 782/753/62 798/754/62 799/748/62 783/747/62 -f 781/755/64 797/756/64 798/754/64 782/753/64 -f 792/757/65 808/758/65 793/750/65 777/749/65 -f 780/759/56 796/760/56 797/756/56 781/755/56 -f 791/761/66 807/762/66 808/758/66 792/757/66 -f 779/763/59 795/764/59 796/760/59 780/759/59 -f 790/765/51 806/766/51 807/762/51 791/761/51 -f 778/752/61 794/751/61 795/767/61 779/768/61 -f 789/769/52 805/770/52 806/766/52 790/765/52 -f 788/738/53 804/737/53 805/770/53 789/769/53 diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_inv.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_inv.png deleted file mode 100644 index 4cc9f20..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_inv.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_off.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_off.png deleted file mode 100644 index 89975e8..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_off.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_on.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_on.png deleted file mode 100644 index 759388a..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_sides_on.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_top_bottom.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_top_bottom.png deleted file mode 100644 index 37d634f..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_top_bottom.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc_off.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc_off.png deleted file mode 100644 index 45a720b..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc_off.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc_on.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc_on.png deleted file mode 100644 index e609dd2..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_misc_on.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom_off.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom_off.png deleted file mode 100644 index fa76591..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom_off.png and /dev/null differ diff --git a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom_on.png b/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom_on.png deleted file mode 100644 index ac4df83..0000000 Binary files a/mesecons/mesecons_hydroturbine/textures/jeija_hydro_turbine_turbine_top_bottom_on.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/depends.txt b/mesecons/mesecons_insulated/depends.txt deleted file mode 100644 index a0ba1ef..0000000 --- a/mesecons/mesecons_insulated/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -screwdriver? diff --git a/mesecons/mesecons_insulated/doc/insulated/description.html b/mesecons/mesecons_insulated/doc/insulated/description.html deleted file mode 100644 index deb344d..0000000 --- a/mesecons/mesecons_insulated/doc/insulated/description.html +++ /dev/null @@ -1 +0,0 @@ - Insulated mesecons are conductors that only conduct in one direction (and also not up or down). Like uninsulated wires, they work through unloaded blocks. diff --git a/mesecons/mesecons_insulated/doc/insulated/preview.png b/mesecons/mesecons_insulated/doc/insulated/preview.png deleted file mode 100644 index bf544e8..0000000 Binary files a/mesecons/mesecons_insulated/doc/insulated/preview.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/doc/insulated/recipe.png b/mesecons/mesecons_insulated/doc/insulated/recipe.png deleted file mode 100644 index f2a731a..0000000 Binary files a/mesecons/mesecons_insulated/doc/insulated/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/init.lua b/mesecons/mesecons_insulated/init.lua deleted file mode 100644 index ca55b9a..0000000 --- a/mesecons/mesecons_insulated/init.lua +++ /dev/null @@ -1,92 +0,0 @@ -local screwdriver_exists = minetest.global_exists("screwdriver") - -local function insulated_wire_get_rules(node) - local rules = {{x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}} - if node.param2 == 1 or node.param2 == 3 then - return mesecon.rotate_rules_right(rules) - end - return rules -end - -minetest.register_node("mesecons_insulated:insulated_on", { - drawtype = "nodebox", - description = "Straight Insulated Mesecon", - tiles = { - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides_on.png", - "jeija_insulated_wire_sides_on.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -16/32, -16/32, -7/32, 16/32, -12/32, 7/32 } - }, - node_box = { - type = "fixed", - -- ±0.001 is to prevent z-fighting - fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 } - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_insulated:insulated_off", - sounds = default.node_sound_defaults(), - mesecons = {conductor = { - state = mesecon.state.on, - offstate = "mesecons_insulated:insulated_off", - rules = insulated_wire_get_rules - }}, - on_blast = mesecon.on_blastnode, - on_rotate = screwdriver_exists and screwdriver.rotate_simple, -}) - -minetest.register_node("mesecons_insulated:insulated_off", { - drawtype = "nodebox", - description = "Straight Insulated Mesecon", - tiles = { - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides_off.png", - "jeija_insulated_wire_sides_off.png" - }, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - walkable = false, - sunlight_propagates = true, - selection_box = { - type = "fixed", - fixed = { -16/32, -16/32, -7/32, 16/32, -12/32, 7/32 } - }, - node_box = { - type = "fixed", - -- ±0.001 is to prevent z-fighting - fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 } - }, - groups = {dig_immediate = 3}, - sounds = default.node_sound_defaults(), - mesecons = {conductor = { - state = mesecon.state.off, - onstate = "mesecons_insulated:insulated_on", - rules = insulated_wire_get_rules - }}, - on_blast = mesecon.on_blastnode, - on_rotate = screwdriver_exists and screwdriver.rotate_simple, -}) - -minetest.register_craft({ - output = "mesecons_insulated:insulated_off 3", - recipe = { - {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, - {"mesecons:wire_00000000_off", "mesecons:wire_00000000_off", "mesecons:wire_00000000_off"}, - {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, - } -}) diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png deleted file mode 100644 index 85ca90b..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png deleted file mode 100644 index 772d9a6..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png deleted file mode 100644 index 89a8385..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png deleted file mode 100644 index 75cf435..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png deleted file mode 100644 index db33f14..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png deleted file mode 100644 index f76e9a8..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png deleted file mode 100644 index a897b29..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png and /dev/null differ diff --git a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png b/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png deleted file mode 100644 index 8fc312b..0000000 Binary files a/mesecons/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png and /dev/null differ diff --git a/mesecons/mesecons_lamp/depends.txt b/mesecons/mesecons_lamp/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_lamp/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_lamp/doc/lamp/description.html b/mesecons/mesecons_lamp/doc/lamp/description.html deleted file mode 100644 index 72f24ed..0000000 --- a/mesecons/mesecons_lamp/doc/lamp/description.html +++ /dev/null @@ -1 +0,0 @@ -Mesecon lamps are effectors that if powered emit light. diff --git a/mesecons/mesecons_lamp/doc/lamp/preview.png b/mesecons/mesecons_lamp/doc/lamp/preview.png deleted file mode 100644 index a581cb3..0000000 Binary files a/mesecons/mesecons_lamp/doc/lamp/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lamp/doc/lamp/recipe.png b/mesecons/mesecons_lamp/doc/lamp/recipe.png deleted file mode 100644 index 77570bd..0000000 Binary files a/mesecons/mesecons_lamp/doc/lamp/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lamp/init.lua b/mesecons/mesecons_lamp/init.lua deleted file mode 100644 index 14a3659..0000000 --- a/mesecons/mesecons_lamp/init.lua +++ /dev/null @@ -1,67 +0,0 @@ --- MESELAMPS --- A lamp is "is an electrical device used to create artificial light" (wikipedia) --- guess what? - -local mesecon_lamp_box = { - type = "wallmounted", - wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125}, - wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125}, - wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125}, -} - -minetest.register_node("mesecons_lamp:lamp_on", { - drawtype = "nodebox", - tiles = {"jeija_meselamp_on.png"}, - paramtype = "light", - paramtype2 = "wallmounted", - is_ground_content = false, - legacy_wallmounted = true, - sunlight_propagates = true, - walkable = true, - light_source = minetest.LIGHT_MAX, - node_box = mesecon_lamp_box, - selection_box = mesecon_lamp_box, - groups = {dig_immediate = 3,not_in_creative_inventory = 1, mesecon_effector_on = 1}, - drop = "mesecons_lamp:lamp_off 1", - sounds = default.node_sound_glass_defaults(), - mesecons = {effector = { - action_off = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lamp:lamp_off", param2 = node.param2}) - end, - rules = mesecon.rules.wallmounted_get, - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_lamp:lamp_off", { - drawtype = "nodebox", - tiles = {"jeija_meselamp_off.png"}, - inventory_image = "jeija_meselamp.png", - wield_image = "jeija_meselamp.png", - paramtype = "light", - paramtype2 = "wallmounted", - is_ground_content = false, - sunlight_propagates = true, - walkable = true, - node_box = mesecon_lamp_box, - selection_box = mesecon_lamp_box, - groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1}, - description = "Mesecon Lamp", - sounds = default.node_sound_glass_defaults(), - mesecons = {effector = { - action_on = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lamp:lamp_on", param2 = node.param2}) - end, - rules = mesecon.rules.wallmounted_get, - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = "mesecons_lamp:lamp_off 1", - recipe = { - {"", "default:glass", ""}, - {"group:mesecon_conductor_craftable", "default:steel_ingot", "group:mesecon_conductor_craftable"}, - {"", "default:glass", ""}, - } -}) diff --git a/mesecons/mesecons_lamp/textures/jeija_meselamp.png b/mesecons/mesecons_lamp/textures/jeija_meselamp.png deleted file mode 100644 index 5456ee9..0000000 Binary files a/mesecons/mesecons_lamp/textures/jeija_meselamp.png and /dev/null differ diff --git a/mesecons/mesecons_lamp/textures/jeija_meselamp_off.png b/mesecons/mesecons_lamp/textures/jeija_meselamp_off.png deleted file mode 100644 index 67bd7fd..0000000 Binary files a/mesecons/mesecons_lamp/textures/jeija_meselamp_off.png and /dev/null differ diff --git a/mesecons/mesecons_lamp/textures/jeija_meselamp_on.png b/mesecons/mesecons_lamp/textures/jeija_meselamp_on.png deleted file mode 100644 index 2316e00..0000000 Binary files a/mesecons/mesecons_lamp/textures/jeija_meselamp_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/depends.txt b/mesecons/mesecons_lightstone/depends.txt deleted file mode 100644 index f9705e0..0000000 --- a/mesecons/mesecons_lightstone/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -dye diff --git a/mesecons/mesecons_lightstone/doc/lightstone_blue/description.html b/mesecons/mesecons_lightstone/doc/lightstone_blue/description.html deleted file mode 100644 index 5397a96..0000000 --- a/mesecons/mesecons_lightstone/doc/lightstone_blue/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Effector, glows blue when powered. -It works in an inactive block. diff --git a/mesecons/mesecons_lightstone/doc/lightstone_blue/preview.png b/mesecons/mesecons_lightstone/doc/lightstone_blue/preview.png deleted file mode 100644 index 579f719..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_blue/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_blue/recipe.png b/mesecons/mesecons_lightstone/doc/lightstone_blue/recipe.png deleted file mode 100644 index ce8ebd7..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_blue/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/description.html b/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/description.html deleted file mode 100644 index aad59ea..0000000 --- a/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Effector, glows dark grey when powered. -It works in an inactive block. diff --git a/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/preview.png b/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/preview.png deleted file mode 100644 index 56fe6ea..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/recipe.png b/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/recipe.png deleted file mode 100644 index fed0db2..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_darkgrey/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_green/description.html b/mesecons/mesecons_lightstone/doc/lightstone_green/description.html deleted file mode 100644 index 1191334..0000000 --- a/mesecons/mesecons_lightstone/doc/lightstone_green/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Effector, glows green when powered. -It works in an inactive block. diff --git a/mesecons/mesecons_lightstone/doc/lightstone_green/preview.png b/mesecons/mesecons_lightstone/doc/lightstone_green/preview.png deleted file mode 100644 index 9efc774..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_green/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_green/recipe.png b/mesecons/mesecons_lightstone/doc/lightstone_green/recipe.png deleted file mode 100644 index 6690064..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_green/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/description.html b/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/description.html deleted file mode 100644 index b3003d2..0000000 --- a/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Effector, glows light grey when powered. -It works in an inactive block. diff --git a/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/preview.png b/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/preview.png deleted file mode 100644 index 0084fa3..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/recipe.png b/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/recipe.png deleted file mode 100644 index e790012..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_lightgrey/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_red/description.html b/mesecons/mesecons_lightstone/doc/lightstone_red/description.html deleted file mode 100644 index f49aeac..0000000 --- a/mesecons/mesecons_lightstone/doc/lightstone_red/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Effector, glows red when powered. -It works in an inactive block. diff --git a/mesecons/mesecons_lightstone/doc/lightstone_red/preview.png b/mesecons/mesecons_lightstone/doc/lightstone_red/preview.png deleted file mode 100644 index 5fd3eba..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_red/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_red/recipe.png b/mesecons/mesecons_lightstone/doc/lightstone_red/recipe.png deleted file mode 100644 index 7791a99..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_red/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_yellow/description.html b/mesecons/mesecons_lightstone/doc/lightstone_yellow/description.html deleted file mode 100644 index a97839b..0000000 --- a/mesecons/mesecons_lightstone/doc/lightstone_yellow/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Effector, glows yellow when powered. -It works in an inactive block. diff --git a/mesecons/mesecons_lightstone/doc/lightstone_yellow/preview.png b/mesecons/mesecons_lightstone/doc/lightstone_yellow/preview.png deleted file mode 100644 index fb9f644..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_yellow/preview.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/doc/lightstone_yellow/recipe.png b/mesecons/mesecons_lightstone/doc/lightstone_yellow/recipe.png deleted file mode 100644 index f17e9d4..0000000 Binary files a/mesecons/mesecons_lightstone/doc/lightstone_yellow/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/init.lua b/mesecons/mesecons_lightstone/init.lua deleted file mode 100644 index 4e56ba2..0000000 --- a/mesecons/mesecons_lightstone/init.lua +++ /dev/null @@ -1,73 +0,0 @@ -local lightstone_rules = { - {x=0, y=0, z=-1}, - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=1, y=1, z=0}, - {x=1, y=-1, z=0}, - {x=-1, y=1, z=0}, - {x=-1, y=-1, z=0}, - {x=0, y=1, z=1}, - {x=0, y=-1, z=1}, - {x=0, y=1, z=-1}, - {x=0, y=-1, z=-1}, - {x=0, y=-1, z=0}, -} - -function mesecon.lightstone_add(name, base_item, texture_off, texture_on, desc) - if not desc then - desc = name .. " Lightstone" - end - minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_off", { - tiles = {texture_off}, - is_ground_content = false, - groups = {cracky = 2, mesecon_effector_off = 1, mesecon = 2}, - description = desc, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - rules = lightstone_rules, - action_on = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_" .. name .. "_on", param2 = node.param2}) - end, - }}, - on_blast = mesecon.on_blastnode, - }) - minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_on", { - tiles = {texture_on}, - is_ground_content = false, - groups = {cracky = 2, not_in_creative_inventory = 1, mesecon = 2}, - drop = "mesecons_lightstone:lightstone_" .. name .. "_off", - light_source = minetest.LIGHT_MAX - 2, - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - rules = lightstone_rules, - action_off = function (pos, node) - minetest.swap_node(pos, {name = "mesecons_lightstone:lightstone_" .. name .. "_off", param2 = node.param2}) - end, - }}, - on_blast = mesecon.on_blastnode, - }) - - minetest.register_craft({ - output = "mesecons_lightstone:lightstone_" .. name .. "_off", - recipe = { - {"",base_item,""}, - {base_item,"default:torch",base_item}, - {"","group:mesecon_conductor_craftable",""} - } - }) -end - - -mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png", "Red Lightstone") -mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png", "Green Lightstone") -mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png", "Blue Lightstone") -mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png", "Grey Lightstone") -mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png", "Dark Grey Lightstone") -mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png", "Yellow Lightstone") -mesecon.lightstone_add("orange", "dye:orange", "jeija_lightstone_orange_off.png", "jeija_lightstone_orange_on.png", "Orange Lightstone") -mesecon.lightstone_add("white", "dye:white", "jeija_lightstone_white_off.png", "jeija_lightstone_white_on.png", "White Lightstone") -mesecon.lightstone_add("pink", "dye:pink", "jeija_lightstone_pink_off.png", "jeija_lightstone_pink_on.png", "Pink Lightstone") -mesecon.lightstone_add("magenta", "dye:magenta", "jeija_lightstone_magenta_off.png", "jeija_lightstone_magenta_on.png", "Magenta Lightstone") -mesecon.lightstone_add("cyan", "dye:cyan", "jeija_lightstone_cyan_off.png", "jeija_lightstone_cyan_on.png", "Cyan Lightstone") -mesecon.lightstone_add("violet", "dye:violet", "jeija_lightstone_violet_off.png", "jeija_lightstone_violet_on.png", "Violet Lightstone") diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_off.png deleted file mode 100644 index 09acc22..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_on.png deleted file mode 100644 index 93c8638..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_blue_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_cyan_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_cyan_off.png deleted file mode 100644 index 5315110..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_cyan_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_cyan_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_cyan_on.png deleted file mode 100644 index 200345c..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_cyan_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_off.png deleted file mode 100644 index 7e5aae7..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_on.png deleted file mode 100644 index e6d4d00..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_darkgray_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_off.png deleted file mode 100644 index f168fc2..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_on.png deleted file mode 100644 index 24c5470..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_gray_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_off.png deleted file mode 100644 index 2f214fa..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_on.png deleted file mode 100644 index 225bf4e..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_green_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_magenta_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_magenta_off.png deleted file mode 100644 index 43fa524..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_magenta_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_magenta_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_magenta_on.png deleted file mode 100644 index 8f28b7c..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_magenta_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_orange_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_orange_off.png deleted file mode 100644 index 4bf206e..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_orange_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_orange_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_orange_on.png deleted file mode 100644 index bcba4d2..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_orange_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_pink_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_pink_off.png deleted file mode 100644 index ee265f9..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_pink_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_pink_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_pink_on.png deleted file mode 100644 index ba85110..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_pink_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_off.png deleted file mode 100644 index 3c828b2..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_on.png deleted file mode 100644 index 512b0fe..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_red_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_violet_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_violet_off.png deleted file mode 100644 index 83b5e2d..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_violet_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_violet_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_violet_on.png deleted file mode 100644 index 2b3eb2e..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_violet_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_white_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_white_off.png deleted file mode 100644 index 78338c8..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_white_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_white_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_white_on.png deleted file mode 100644 index 792d89d..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_white_on.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_off.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_off.png deleted file mode 100644 index 2e7fed0..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_off.png and /dev/null differ diff --git a/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_on.png b/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_on.png deleted file mode 100644 index 8943aca..0000000 Binary files a/mesecons/mesecons_lightstone/textures/jeija_lightstone_yellow_on.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/depends.txt b/mesecons/mesecons_luacontroller/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_luacontroller/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_luacontroller/doc/luacontroller/description.html b/mesecons/mesecons_luacontroller/doc/luacontroller/description.html deleted file mode 100644 index 8c5d023..0000000 --- a/mesecons/mesecons_luacontroller/doc/luacontroller/description.html +++ /dev/null @@ -1,7 +0,0 @@ -The Luacontroller is an advanced programmable component. -You can simply code it in the language Mesecons uses itself: Lua! -All the code runs in a sandbox, so it's completely safe (but I won't guarantee that for absolute certainty!). -It works fine in an unloaded block, loading the block when the program needs to run. -Events are properly delivered after a server restart. - -Documentation is available here! diff --git a/mesecons/mesecons_luacontroller/doc/luacontroller/preview.png b/mesecons/mesecons_luacontroller/doc/luacontroller/preview.png deleted file mode 100644 index f16c9d0..0000000 Binary files a/mesecons/mesecons_luacontroller/doc/luacontroller/preview.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/doc/luacontroller/recipe.png b/mesecons/mesecons_luacontroller/doc/luacontroller/recipe.png deleted file mode 100644 index 529b66d..0000000 Binary files a/mesecons/mesecons_luacontroller/doc/luacontroller/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/init.lua b/mesecons/mesecons_luacontroller/init.lua deleted file mode 100644 index 1c93e48..0000000 --- a/mesecons/mesecons_luacontroller/init.lua +++ /dev/null @@ -1,904 +0,0 @@ --- ______ --- | --- | --- | __ ___ _ __ _ _ --- | | | | | |\ | | |_| | | | | |_ |_| --- |___| |______ |__| | \| | | \ |__| |_ |_ |_ |\ --- | --- | --- - --- Reference --- ports = get_real_port_states(pos): gets if inputs are powered from outside --- newport = merge_port_states(state1, state2): just does result = state1 or state2 for every port --- set_port(pos, rule, state): activates/deactivates the mesecons according to the port states --- set_port_states(pos, ports): Applies new port states to a Luacontroller at pos --- run_inner(pos, code, event): runs code on the controller at pos and event --- reset_formspec(pos, code, errmsg): installs new code and prints error messages, without resetting LCID --- reset_meta(pos, code, errmsg): performs a software-reset, installs new code and prints error message --- run(pos, event): a wrapper for run_inner which gets code & handles errors via reset_meta --- resetn(pos): performs a hardware reset, turns off all ports --- --- The Sandbox --- The whole code of the controller runs in a sandbox, --- a very restricted environment. --- Actually the only way to damage the server is to --- use too much memory from the sandbox. --- You can add more functions to the environment --- (see where local env is defined) --- Something nice to play is is appending minetest.env to it. - -local BASENAME = "mesecons_luacontroller:luacontroller" - -local rules = { - a = {x = -1, y = 0, z = 0, name="A"}, - b = {x = 0, y = 0, z = 1, name="B"}, - c = {x = 1, y = 0, z = 0, name="C"}, - d = {x = 0, y = 0, z = -1, name="D"}, -} - - ------------------- --- Action stuff -- ------------------- --- These helpers are required to set the port states of the luacontroller - -local function update_real_port_states(pos, rule_name, new_state) - local meta = minetest.get_meta(pos) - if rule_name == nil then - meta:set_int("real_portstates", 1) - return - end - local n = meta:get_int("real_portstates") - 1 - local L = {} - for i = 1, 4 do - L[i] = n % 2 - n = math.floor(n / 2) - end - -- (0,-1) (-1,0) (1,0) (0,1) - local pos_to_side = { 4, 1, nil, 3, 2 } - if rule_name.x == nil then - for _, rname in ipairs(rule_name) do - local port = pos_to_side[rname.x + (2 * rname.z) + 3] - L[port] = (newstate == "on") and 1 or 0 - end - else - local port = pos_to_side[rule_name.x + (2 * rule_name.z) + 3] - L[port] = (new_state == "on") and 1 or 0 - end - meta:set_int("real_portstates", - 1 + - 1 * L[1] + - 2 * L[2] + - 4 * L[3] + - 8 * L[4]) -end - - -local port_names = {"a", "b", "c", "d"} - -local function get_real_port_states(pos) - -- Determine if ports are powered (by itself or from outside) - local meta = minetest.get_meta(pos) - local L = {} - local n = meta:get_int("real_portstates") - 1 - for _, name in ipairs(port_names) do - L[name] = ((n % 2) == 1) - n = math.floor(n / 2) - end - return L -end - - -local function merge_port_states(ports, vports) - return { - a = ports.a or vports.a, - b = ports.b or vports.b, - c = ports.c or vports.c, - d = ports.d or vports.d, - } -end - -local function generate_name(ports) - local d = ports.d and 1 or 0 - local c = ports.c and 1 or 0 - local b = ports.b and 1 or 0 - local a = ports.a and 1 or 0 - return BASENAME..d..c..b..a -end - - -local function set_port(pos, rule, state) - if state then - mesecon.receptor_on(pos, {rule}) - else - mesecon.receptor_off(pos, {rule}) - end -end - - -local function clean_port_states(ports) - ports.a = ports.a and true or false - ports.b = ports.b and true or false - ports.c = ports.c and true or false - ports.d = ports.d and true or false -end - - -local function set_port_states(pos, ports) - local node = minetest.get_node(pos) - local name = node.name - clean_port_states(ports) - local vports = minetest.registered_nodes[name].virtual_portstates - local new_name = generate_name(ports) - - if name ~= new_name and vports then - -- Problem: - -- We need to place the new node first so that when turning - -- off some port, it won't stay on because the rules indicate - -- there is an onstate output port there. - -- When turning the output off then, it will however cause feedback - -- so that the luacontroller will receive an "off" event by turning - -- its output off. - -- Solution / Workaround: - -- Remember which output was turned off and ignore next "off" event. - local meta = minetest.get_meta(pos) - local ign = minetest.deserialize(meta:get_string("ignore_offevents"), true) or {} - if ports.a and not vports.a and not mesecon.is_powered(pos, rules.a) then ign.A = true end - if ports.b and not vports.b and not mesecon.is_powered(pos, rules.b) then ign.B = true end - if ports.c and not vports.c and not mesecon.is_powered(pos, rules.c) then ign.C = true end - if ports.d and not vports.d and not mesecon.is_powered(pos, rules.d) then ign.D = true end - meta:set_string("ignore_offevents", minetest.serialize(ign)) - - minetest.swap_node(pos, {name = new_name, param2 = node.param2}) - - if ports.a ~= vports.a then set_port(pos, rules.a, ports.a) end - if ports.b ~= vports.b then set_port(pos, rules.b, ports.b) end - if ports.c ~= vports.c then set_port(pos, rules.c, ports.c) end - if ports.d ~= vports.d then set_port(pos, rules.d, ports.d) end - end -end - - ------------------ --- Overheating -- ------------------ -local function burn_controller(pos) - local node = minetest.get_node(pos) - node.name = BASENAME.."_burnt" - minetest.swap_node(pos, node) - minetest.get_meta(pos):set_string("lc_memory", ""); - -- Wait for pending operations - minetest.after(0.2, mesecon.receptor_off, pos, mesecon.rules.flat) -end - -local function overheat(pos, meta) - if mesecon.do_overheat(pos) then -- If too hot - burn_controller(pos) - return true - end -end - ------------------------- --- Ignored off events -- ------------------------- - -local function ignore_event(event, meta) - if event.type ~= "off" then return false end - local ignore_offevents = minetest.deserialize(meta:get_string("ignore_offevents"), true) or {} - if ignore_offevents[event.pin.name] then - ignore_offevents[event.pin.name] = nil - meta:set_string("ignore_offevents", minetest.serialize(ignore_offevents)) - return true - end -end - -------------------------- --- Parsing and running -- -------------------------- - -local function safe_print(param) - local string_meta = getmetatable("") - local sandbox = string_meta.__index - string_meta.__index = string -- Leave string sandbox temporarily - print(dump(param)) - string_meta.__index = sandbox -- Restore string sandbox -end - -local function safe_date() - return(os.date("*t",os.time())) -end - --- string.rep(str, n) with a high value for n can be used to DoS --- the server. Therefore, limit max. length of generated string. -local function safe_string_rep(str, n) - if #str * n > mesecon.setting("luacontroller_string_rep_max", 64000) then - debug.sethook() -- Clear hook - error("string.rep: string length overflow", 2) - end - - return string.rep(str, n) -end - --- string.find with a pattern can be used to DoS the server. --- Therefore, limit string.find to patternless matching. -local function safe_string_find(...) - if (select(4, ...)) ~= true then - debug.sethook() -- Clear hook - error("string.find: 'plain' (fourth parameter) must always be true in a Luacontroller") - end - - return string.find(...) -end - -local function remove_functions(x) - local tp = type(x) - if tp == "function" then - return nil - end - - -- Make sure to not serialize the same table multiple times, otherwise - -- writing mem.test = mem in the Luacontroller will lead to infinite recursion - local seen = {} - - local function rfuncs(x) - if x == nil then return end - if seen[x] then return end - seen[x] = true - if type(x) ~= "table" then return end - - for key, value in pairs(x) do - if type(key) == "function" or type(value) == "function" then - x[key] = nil - else - if type(key) == "table" then - rfuncs(key) - end - if type(value) == "table" then - rfuncs(value) - end - end - end - end - - rfuncs(x) - - return x -end - --- The setting affects API so is not intended to be changeable at runtime -local get_interrupt -if mesecon.setting("luacontroller_lightweight_interrupts", false) then - -- use node timer - get_interrupt = function(pos, itbl, send_warning) - return (function(time, iid) - if type(time) ~= "number" then error("Delay must be a number") end - if iid ~= nil then send_warning("Interrupt IDs are disabled on this server") end - table.insert(itbl, function() minetest.get_node_timer(pos):start(time) end) - end) - end -else - -- use global action queue - -- itbl: Flat table of functions to run after sandbox cleanup, used to prevent various security hazards - get_interrupt = function(pos, itbl, send_warning) - -- iid = interrupt id - local function interrupt(time, iid) - -- NOTE: This runs within string metatable sandbox, so don't *rely* on anything of the form (""):y - -- Hence the values get moved out. Should take less time than original, so totally compatible - if type(time) ~= "number" then error("Delay must be a number") end - table.insert(itbl, function () - -- Outside string metatable sandbox, can safely run this now - local luac_id = minetest.get_meta(pos):get_int("luac_id") - -- Check if IID is dodgy, so you can't use interrupts to store an infinite amount of data. - -- Note that this is safe from alter-after-free because this code gets run after the sandbox has ended. - -- This runs outside of the timer and *shouldn't* harm perf. unless dodgy data is being sent in the first place - iid = remove_functions(iid) - local msg_ser = minetest.serialize(iid) - if #msg_ser <= mesecon.setting("luacontroller_interruptid_maxlen", 256) then - mesecon.queue:add_action(pos, "lc_interrupt", {luac_id, iid}, time, iid, 1) - else - send_warning("An interrupt ID was too large!") - end - end) - end - return interrupt - end -end - --- Given a message object passed to digiline_send, clean it up into a form --- which is safe to transmit over the network and compute its "cost" (a very --- rough estimate of its memory usage). --- --- The cleaning comprises the following: --- 1. Functions (and userdata, though user scripts ought not to get hold of --- those in the first place) are removed, because they break the model of --- Digilines as a network that carries basic data, and they could exfiltrate --- references to mutable objects from one Luacontroller to another, allowing --- inappropriate high-bandwidth, no-wires communication. --- 2. Tables are duplicated because, being mutable, they could otherwise be --- modified after the send is complete in order to change what data arrives --- at the recipient, perhaps in violation of the previous cleaning rule or --- in violation of the message size limit. --- --- The cost indication is only approximate; it’s not a perfect measurement of --- the number of bytes of memory used by the message object. --- --- Parameters: --- msg -- the message to clean --- back_references -- for internal use only; do not provide --- --- Returns: --- 1. The cleaned object. --- 2. The approximate cost of the object. -local function clean_and_weigh_digiline_message(msg, back_references) - local t = type(msg) - if t == "string" then - -- Strings are immutable so can be passed by reference, and cost their - -- length plus the size of the Lua object header (24 bytes on a 64-bit - -- platform) plus one byte for the NUL terminator. - return msg, #msg + 25 - elseif t == "number" then - -- Numbers are passed by value so need not be touched, and cost 8 bytes - -- as all numbers in Lua are doubles. - return msg, 8 - elseif t == "boolean" then - -- Booleans are passed by value so need not be touched, and cost 1 - -- byte. - return msg, 1 - elseif t == "table" then - -- Tables are duplicated. Check if this table has been seen before - -- (self-referential or shared table); if so, reuse the cleaned value - -- of the previous occurrence, maintaining table topology and avoiding - -- infinite recursion, and charge zero bytes for this as the object has - -- already been counted. - back_references = back_references or {} - local bref = back_references[msg] - if bref then - return bref, 0 - end - -- Construct a new table by cleaning all the keys and values and adding - -- up their costs, plus 8 bytes as a rough estimate of table overhead. - local cost = 8 - local ret = {} - back_references[msg] = ret - for k, v in pairs(msg) do - local k_cost, v_cost - k, k_cost = clean_and_weigh_digiline_message(k, back_references) - v, v_cost = clean_and_weigh_digiline_message(v, back_references) - if k ~= nil and v ~= nil then - -- Only include an element if its key and value are of legal - -- types. - ret[k] = v - end - -- If we only counted the cost of a table element when we actually - -- used it, we would be vulnerable to the following attack: - -- 1. Construct a huge table (too large to pass the cost limit). - -- 2. Insert it somewhere in a table, with a function as a key. - -- 3. Insert it somewhere in another table, with a number as a key. - -- 4. The first occurrence doesn’t pay the cost because functions - -- are stripped and therefore the element is dropped. - -- 5. The second occurrence doesn’t pay the cost because it’s in - -- back_references. - -- By counting the costs regardless of whether the objects will be - -- included, we avoid this attack; it may overestimate the cost of - -- some messages, but only those that won’t be delivered intact - -- anyway because they contain illegal object types. - cost = cost + k_cost + v_cost - end - return ret, cost - else - return nil, 0 - end -end - - --- itbl: Flat table of functions to run after sandbox cleanup, used to prevent various security hazards -local function get_digiline_send(pos, itbl, send_warning) - if not minetest.global_exists("digilines") then return end - local chan_maxlen = mesecon.setting("luacontroller_digiline_channel_maxlen", 256) - local maxlen = mesecon.setting("luacontroller_digiline_maxlen", 50000) - return function(channel, msg) - -- NOTE: This runs within string metatable sandbox, so don't *rely* on anything of the form (""):y - -- or via anything that could. - -- Make sure channel is string, number or boolean - if type(channel) == "string" then - if #channel > chan_maxlen then - send_warning("Channel string too long.") - return false - end - elseif (type(channel) ~= "string" and type(channel) ~= "number" and type(channel) ~= "boolean") then - send_warning("Channel must be string, number or boolean.") - return false - end - - local msg_cost - msg, msg_cost = clean_and_weigh_digiline_message(msg) - if msg == nil or msg_cost > maxlen then - send_warning("Message was too complex, or contained invalid data.") - return false - end - - table.insert(itbl, function () - -- Runs outside of string metatable sandbox - local luac_id = minetest.get_meta(pos):get_int("luac_id") - mesecon.queue:add_action(pos, "lc_digiline_relay", {channel, luac_id, msg}) - end) - return true - end -end - -local safe_globals = { - -- Don't add pcall/xpcall unless willing to deal with the consequences (unless very careful, incredibly likely to allow killing server indirectly) - "assert", "error", "ipairs", "next", "pairs", "select", - "tonumber", "tostring", "type", "unpack", "_VERSION" -} - -local function create_environment(pos, mem, event, itbl, send_warning) - -- Gather variables for the environment - local vports = minetest.registered_nodes[minetest.get_node(pos).name].virtual_portstates - local vports_copy = {} - for k, v in pairs(vports) do vports_copy[k] = v end - local rports = get_real_port_states(pos) - - -- Create new library tables on each call to prevent one Luacontroller - -- from breaking a library and messing up other Luacontrollers. - local env = { - pin = merge_port_states(vports, rports), - port = vports_copy, - event = event, - mem = mem, - heat = mesecon.get_heat(pos), - heat_max = mesecon.setting("overheat_max", 20), - print = safe_print, - interrupt = get_interrupt(pos, itbl, send_warning), - digiline_send = get_digiline_send(pos, itbl, send_warning), - string = { - byte = string.byte, - char = string.char, - format = string.format, - len = string.len, - lower = string.lower, - upper = string.upper, - rep = safe_string_rep, - reverse = string.reverse, - sub = string.sub, - find = safe_string_find, - }, - math = { - abs = math.abs, - acos = math.acos, - asin = math.asin, - atan = math.atan, - atan2 = math.atan2, - ceil = math.ceil, - cos = math.cos, - cosh = math.cosh, - deg = math.deg, - exp = math.exp, - floor = math.floor, - fmod = math.fmod, - frexp = math.frexp, - huge = math.huge, - ldexp = math.ldexp, - log = math.log, - log10 = math.log10, - max = math.max, - min = math.min, - modf = math.modf, - pi = math.pi, - pow = math.pow, - rad = math.rad, - random = math.random, - sin = math.sin, - sinh = math.sinh, - sqrt = math.sqrt, - tan = math.tan, - tanh = math.tanh, - }, - table = { - concat = table.concat, - insert = table.insert, - maxn = table.maxn, - remove = table.remove, - sort = table.sort, - }, - os = { - clock = os.clock, - difftime = os.difftime, - time = os.time, - datetable = safe_date, - }, - } - env._G = env - - for _, name in pairs(safe_globals) do - env[name] = _G[name] - end - - return env -end - - -local function timeout() - debug.sethook() -- Clear hook - error("Code timed out!", 2) -end - - -local function create_sandbox(code, env) - if code:byte(1) == 27 then - return nil, "Binary code prohibited." - end - local f, msg = loadstring(code) - if not f then return nil, msg end - setfenv(f, env) - - -- Turn off JIT optimization for user code so that count - -- events are generated when adding debug hooks - if rawget(_G, "jit") then - jit.off(f, true) - end - - local maxevents = mesecon.setting("luacontroller_maxevents", 10000) - return function(...) - -- NOTE: This runs within string metatable sandbox, so the setting's been moved out for safety - -- Use instruction counter to stop execution - -- after luacontroller_maxevents - debug.sethook(timeout, "", maxevents) - local ok, ret = pcall(f, ...) - debug.sethook() -- Clear hook - if not ok then error(ret, 0) end - return ret - end -end - - -local function load_memory(meta) - return minetest.deserialize(meta:get_string("lc_memory"), true) or {} -end - - -local function save_memory(pos, meta, mem) - local memstring = minetest.serialize(remove_functions(mem)) - local memsize_max = mesecon.setting("luacontroller_memsize", 100000) - - if (#memstring <= memsize_max) then - meta:set_string("lc_memory", memstring) - meta:mark_as_private("lc_memory") - else - print("Error: Luacontroller memory overflow. "..memsize_max.." bytes available, " - ..#memstring.." required. Controller overheats.") - burn_controller(pos) - end -end - --- Returns success (boolean), errmsg (string) --- run (as opposed to run_inner) is responsible for setting up meta according to this output -local function run_inner(pos, code, event) - local meta = minetest.get_meta(pos) - -- Note: These return success, presumably to avoid changing LC ID. - if overheat(pos) then return true, "" end - if ignore_event(event, meta) then return true, "" end - - -- Load code & mem from meta - local mem = load_memory(meta) - local code = meta:get_string("code") - - -- 'Last warning' label. - local warning = "" - local function send_warning(str) - warning = "Warning: " .. str - end - - -- Create environment - local itbl = {} - local env = create_environment(pos, mem, event, itbl, send_warning) - - -- Create the sandbox and execute code - local f, msg = create_sandbox(code, env) - if not f then return false, msg end - -- Start string true sandboxing - local onetruestring = getmetatable("") - -- If a string sandbox is already up yet inconsistent, something is very wrong - assert(onetruestring.__index == string) - onetruestring.__index = env.string - local success, msg = pcall(f) - onetruestring.__index = string - -- End string true sandboxing - if not success then return false, msg end - if type(env.port) ~= "table" then - return false, "Ports set are invalid." - end - - -- Actually set the ports - set_port_states(pos, env.port) - - -- Save memory. This may burn the luacontroller if a memory overflow occurs. - save_memory(pos, meta, env.mem) - - -- Execute deferred tasks - for _, v in ipairs(itbl) do - local failure = v() - if failure then - return false, failure - end - end - return true, warning -end - -local function reset_formspec(meta, code, errmsg) - meta:set_string("code", code) - meta:mark_as_private("code") - code = minetest.formspec_escape(code or "") - errmsg = minetest.formspec_escape(tostring(errmsg or "")) - meta:set_string("formspec", "size[12,10]" - .."background[-0.2,-0.25;12.4,10.75;jeija_luac_background.png]" - .."label[0.1,8.3;"..errmsg.."]" - .."textarea[0.2,0.2;12.2,9.5;code;;"..code.."]" - .."image_button[4.75,8.75;2.5,1;jeija_luac_runbutton.png;program;]" - .."image_button_exit[11.72,-0.25;0.425,0.4;jeija_close_window.png;exit;]" - ) -end - -local function reset_meta(pos, code, errmsg) - local meta = minetest.get_meta(pos) - reset_formspec(meta, code, errmsg) - meta:set_int("luac_id", math.random(1, 65535)) -end - --- Wraps run_inner with LC-reset-on-error -local function run(pos, event) - local meta = minetest.get_meta(pos) - local code = meta:get_string("code") - local ok, errmsg = run_inner(pos, code, event) - if not ok then - reset_meta(pos, code, errmsg) - else - reset_formspec(meta, code, errmsg) - end - return ok, errmsg -end - -local function reset(pos) - set_port_states(pos, {a=false, b=false, c=false, d=false}) -end - -local function node_timer(pos) - if minetest.registered_nodes[minetest.get_node(pos).name].is_burnt then - return false - end - run(pos, {type="interrupt"}) - return false -end - ------------------------ --- A.Queue callbacks -- ------------------------ - -mesecon.queue:add_function("lc_interrupt", function (pos, luac_id, iid) - -- There is no luacontroller anymore / it has been reprogrammed / replaced / burnt - if (minetest.get_meta(pos):get_int("luac_id") ~= luac_id) then return end - if (minetest.registered_nodes[minetest.get_node(pos).name].is_burnt) then return end - run(pos, {type="interrupt", iid = iid}) -end) - -mesecon.queue:add_function("lc_digiline_relay", function (pos, channel, luac_id, msg) - if not digiline then return end - -- This check is only really necessary because in case of server crash, old actions can be thrown into the future - if (minetest.get_meta(pos):get_int("luac_id") ~= luac_id) then return end - if (minetest.registered_nodes[minetest.get_node(pos).name].is_burnt) then return end - -- The actual work - digiline:receptor_send(pos, digiline.rules.default, channel, msg) -end) - ------------------------ --- Node Registration -- ------------------------ - -local output_rules = {} -local input_rules = {} - -local node_box = { - type = "fixed", - fixed = { - {-8/16, -8/16, -8/16, 8/16, -7/16, 8/16}, -- Bottom slab - {-5/16, -7/16, -5/16, 5/16, -6/16, 5/16}, -- Circuit board - {-3/16, -6/16, -3/16, 3/16, -5/16, 3/16}, -- IC - } -} - -local selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 }, -} - -local digiline = { - receptor = {}, - effector = { - action = function(pos, node, channel, msg) - msg = clean_and_weigh_digiline_message(msg) - run(pos, {type = "digiline", channel = channel, msg = msg}) - end - } -} - -local function get_program(pos) - local meta = minetest.get_meta(pos) - return meta:get_string("code") -end - -local function set_program(pos, code) - reset(pos) - reset_meta(pos, code) - return run(pos, {type="program"}) -end - -local function on_receive_fields(pos, form_name, fields, sender) - if not fields.program then - return - end - local name = sender:get_player_name() - if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, name) - return - end - local ok, err = set_program(pos, fields.code) - if not ok then - -- it's not an error from the server perspective - minetest.log("action", "Lua controller programming error: " .. tostring(err)) - end -end - -for a = 0, 1 do -- 0 = off 1 = on -for b = 0, 1 do -for c = 0, 1 do -for d = 0, 1 do - local cid = tostring(d)..tostring(c)..tostring(b)..tostring(a) - local node_name = BASENAME..cid - local top = "jeija_luacontroller_top.png" - if a == 1 then - top = top.."^jeija_luacontroller_LED_A.png" - end - if b == 1 then - top = top.."^jeija_luacontroller_LED_B.png" - end - if c == 1 then - top = top.."^jeija_luacontroller_LED_C.png" - end - if d == 1 then - top = top.."^jeija_luacontroller_LED_D.png" - end - - local groups - if a + b + c + d ~= 0 then - groups = {dig_immediate=2, not_in_creative_inventory=1, overheat = 1} - else - groups = {dig_immediate=2, overheat = 1} - end - - output_rules[cid] = {} - input_rules[cid] = {} - if a == 1 then table.insert(output_rules[cid], rules.a) end - if b == 1 then table.insert(output_rules[cid], rules.b) end - if c == 1 then table.insert(output_rules[cid], rules.c) end - if d == 1 then table.insert(output_rules[cid], rules.d) end - - if a == 0 then table.insert( input_rules[cid], rules.a) end - if b == 0 then table.insert( input_rules[cid], rules.b) end - if c == 0 then table.insert( input_rules[cid], rules.c) end - if d == 0 then table.insert( input_rules[cid], rules.d) end - - local mesecons = { - effector = { - rules = input_rules[cid], - action_change = function (pos, _, rule_name, new_state) - update_real_port_states(pos, rule_name, new_state) - run(pos, {type=new_state, pin=rule_name}) - end, - }, - receptor = { - state = mesecon.state.on, - rules = output_rules[cid] - }, - luacontroller = { - get_program = get_program, - set_program = set_program, - }, - } - - minetest.register_node(node_name, { - description = "Luacontroller", - drawtype = "nodebox", - tiles = { - top, - "jeija_microcontroller_bottom.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png" - }, - inventory_image = top, - paramtype = "light", - is_ground_content = false, - groups = groups, - drop = BASENAME.."0000", - sunlight_propagates = true, - selection_box = selection_box, - node_box = node_box, - on_construct = reset_meta, - on_receive_fields = on_receive_fields, - sounds = default.node_sound_stone_defaults(), - mesecons = mesecons, - digiline = digiline, - -- Virtual portstates are the ports that - -- the node shows as powered up (light up). - virtual_portstates = { - a = a == 1, - b = b == 1, - c = c == 1, - d = d == 1, - }, - after_dig_node = function (pos, node) - mesecon.do_cooldown(pos) - mesecon.receptor_off(pos, output_rules) - end, - is_luacontroller = true, - on_timer = node_timer, - on_blast = mesecon.on_blastnode, - }) -end -end -end -end - ------------------------------- --- Overheated Luacontroller -- ------------------------------- - -minetest.register_node(BASENAME .. "_burnt", { - drawtype = "nodebox", - tiles = { - "jeija_luacontroller_burnt_top.png", - "jeija_microcontroller_bottom.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png" - }, - inventory_image = "jeija_luacontroller_burnt_top.png", - is_burnt = true, - paramtype = "light", - is_ground_content = false, - groups = {dig_immediate=2, not_in_creative_inventory=1}, - drop = BASENAME.."0000", - sunlight_propagates = true, - selection_box = selection_box, - node_box = node_box, - on_construct = reset_meta, - on_receive_fields = on_receive_fields, - sounds = default.node_sound_stone_defaults(), - virtual_portstates = {a = false, b = false, c = false, d = false}, - mesecons = { - effector = { - rules = mesecon.rules.flat, - action_change = function(pos, _, rule_name, new_state) - update_real_port_states(pos, rule_name, new_state) - end, - }, - }, - on_blast = mesecon.on_blastnode, -}) - ------------------------- --- Craft Registration -- ------------------------- - -minetest.register_craft({ - output = BASENAME.."0000 2", - recipe = { - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable', ''}, - } -}) - diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luac_background.png b/mesecons/mesecons_luacontroller/textures/jeija_luac_background.png deleted file mode 100644 index 40b427e..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luac_background.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luac_runbutton.png b/mesecons/mesecons_luacontroller/textures/jeija_luac_runbutton.png deleted file mode 100644 index 157507f..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luac_runbutton.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_A.png b/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_A.png deleted file mode 100644 index a187e8e..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_A.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_B.png b/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_B.png deleted file mode 100644 index 738ba96..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_B.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_C.png b/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_C.png deleted file mode 100644 index abe0fe6..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_C.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_D.png b/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_D.png deleted file mode 100644 index cc10170..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_LED_D.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_burnt_top.png b/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_burnt_top.png deleted file mode 100644 index d1a17af..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_burnt_top.png and /dev/null differ diff --git a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_top.png b/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_top.png deleted file mode 100644 index 3128230..0000000 Binary files a/mesecons/mesecons_luacontroller/textures/jeija_luacontroller_top.png and /dev/null differ diff --git a/mesecons/mesecons_materials/depends.txt b/mesecons/mesecons_materials/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_materials/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_materials/doc/fiber/description.html b/mesecons/mesecons_materials/doc/fiber/description.html deleted file mode 100644 index 23a414a..0000000 --- a/mesecons/mesecons_materials/doc/fiber/description.html +++ /dev/null @@ -1 +0,0 @@ -Craftitem: It can't be placed! Made by cooking glue in the furnace. Used for insulated mesecon crafting. diff --git a/mesecons/mesecons_materials/doc/fiber/preview.png b/mesecons/mesecons_materials/doc/fiber/preview.png deleted file mode 100644 index cad9645..0000000 Binary files a/mesecons/mesecons_materials/doc/fiber/preview.png and /dev/null differ diff --git a/mesecons/mesecons_materials/doc/fiber/recipe.png b/mesecons/mesecons_materials/doc/fiber/recipe.png deleted file mode 100644 index 7a53123..0000000 Binary files a/mesecons/mesecons_materials/doc/fiber/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_materials/doc/glue/description.html b/mesecons/mesecons_materials/doc/glue/description.html deleted file mode 100644 index a18490c..0000000 --- a/mesecons/mesecons_materials/doc/glue/description.html +++ /dev/null @@ -1 +0,0 @@ -Craftitem: It can't be placed! Made by cooking saplings in furnace. Used for sticky pistons and sticky movestones. diff --git a/mesecons/mesecons_materials/doc/glue/preview.png b/mesecons/mesecons_materials/doc/glue/preview.png deleted file mode 100644 index 0158f9c..0000000 Binary files a/mesecons/mesecons_materials/doc/glue/preview.png and /dev/null differ diff --git a/mesecons/mesecons_materials/doc/glue/recipe.png b/mesecons/mesecons_materials/doc/glue/recipe.png deleted file mode 100644 index b20ce66..0000000 Binary files a/mesecons/mesecons_materials/doc/glue/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_materials/doc/silicon/description.html b/mesecons/mesecons_materials/doc/silicon/description.html deleted file mode 100644 index a2ae598..0000000 --- a/mesecons/mesecons_materials/doc/silicon/description.html +++ /dev/null @@ -1 +0,0 @@ -Silicon is just a craftitem: It can't be placed. You'll need it in order to craft other items. diff --git a/mesecons/mesecons_materials/doc/silicon/preview.png b/mesecons/mesecons_materials/doc/silicon/preview.png deleted file mode 100644 index cd52dbd..0000000 Binary files a/mesecons/mesecons_materials/doc/silicon/preview.png and /dev/null differ diff --git a/mesecons/mesecons_materials/doc/silicon/recipe.png b/mesecons/mesecons_materials/doc/silicon/recipe.png deleted file mode 100644 index 9e8b332..0000000 Binary files a/mesecons/mesecons_materials/doc/silicon/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_materials/init.lua b/mesecons/mesecons_materials/init.lua deleted file mode 100644 index eb19c3e..0000000 --- a/mesecons/mesecons_materials/init.lua +++ /dev/null @@ -1,41 +0,0 @@ --- Glue and fiber -minetest.register_craftitem("mesecons_materials:glue", { - image = "mesecons_glue.png", - on_place_on_ground = minetest.craftitem_place_item, - description="Glue", -}) - -minetest.register_craftitem("mesecons_materials:fiber", { - image = "mesecons_fiber.png", - on_place_on_ground = minetest.craftitem_place_item, - description="Fiber", -}) - -minetest.register_craft({ - output = "mesecons_materials:glue 2", - type = "cooking", - recipe = "group:sapling", - cooktime = 2 -}) - -minetest.register_craft({ - output = "mesecons_materials:fiber 6", - type = "cooking", - recipe = "mesecons_materials:glue", - cooktime = 4 -}) - --- Silicon -minetest.register_craftitem("mesecons_materials:silicon", { - image = "mesecons_silicon.png", - on_place_on_ground = minetest.craftitem_place_item, - description="Silicon", -}) - -minetest.register_craft({ - output = "mesecons_materials:silicon 4", - recipe = { - {"group:sand", "group:sand"}, - {"group:sand", "default:steel_ingot"}, - } -}) diff --git a/mesecons/mesecons_materials/textures/mesecons_fiber.png b/mesecons/mesecons_materials/textures/mesecons_fiber.png deleted file mode 100644 index e8c7b08..0000000 Binary files a/mesecons/mesecons_materials/textures/mesecons_fiber.png and /dev/null differ diff --git a/mesecons/mesecons_materials/textures/mesecons_glue.png b/mesecons/mesecons_materials/textures/mesecons_glue.png deleted file mode 100644 index 2f351d1..0000000 Binary files a/mesecons/mesecons_materials/textures/mesecons_glue.png and /dev/null differ diff --git a/mesecons/mesecons_materials/textures/mesecons_silicon.png b/mesecons/mesecons_materials/textures/mesecons_silicon.png deleted file mode 100644 index a7b0d52..0000000 Binary files a/mesecons/mesecons_materials/textures/mesecons_silicon.png and /dev/null differ diff --git a/mesecons/mesecons_microcontroller/depends.txt b/mesecons/mesecons_microcontroller/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_microcontroller/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_microcontroller/init.lua b/mesecons/mesecons_microcontroller/init.lua deleted file mode 100644 index f9ba979..0000000 --- a/mesecons/mesecons_microcontroller/init.lua +++ /dev/null @@ -1,718 +0,0 @@ -local EEPROM_SIZE = 255 - -local microc_rules = {} -local yc = {} - -for a = 0, 1 do -for b = 0, 1 do -for c = 0, 1 do -for d = 0, 1 do -local nodename = "mesecons_microcontroller:microcontroller"..tostring(d)..tostring(c)..tostring(b)..tostring(a) -local top = "jeija_microcontroller_top.png" -if tostring(a) == "1" then - top = top.."^jeija_microcontroller_LED_A.png" -end -if tostring(b) == "1" then - top = top.."^jeija_microcontroller_LED_B.png" -end -if tostring(c) == "1" then - top = top.."^jeija_microcontroller_LED_C.png" -end -if tostring(d) == "1" then - top = top.."^jeija_microcontroller_LED_D.png" -end -local groups -if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then - groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 3, overheat = 1} -else - groups = {dig_immediate=2, mesecon = 3, overheat = 1} -end -local rules={} -if (a == 1) then table.insert(rules, {x = -1, y = 0, z = 0}) end -if (b == 1) then table.insert(rules, {x = 0, y = 0, z = 1}) end -if (c == 1) then table.insert(rules, {x = 1, y = 0, z = 0}) end -if (d == 1) then table.insert(rules, {x = 0, y = 0, z = -1}) end - -local input_rules={} -if (a == 0) then table.insert(input_rules, {x = -1, y = 0, z = 0, name = "A"}) end -if (b == 0) then table.insert(input_rules, {x = 0, y = 0, z = 1, name = "B"}) end -if (c == 0) then table.insert(input_rules, {x = 1, y = 0, z = 0, name = "C"}) end -if (d == 0) then table.insert(input_rules, {x = 0, y = 0, z = -1, name = "D"}) end -microc_rules[nodename] = rules - -local mesecons = {effector = -{ - rules = input_rules, - action_change = function (pos, node, rulename, newstate) - yc.update_real_portstates(pos, node, rulename, newstate) - yc.update(pos) - end -}} -if nodename ~= "mesecons_microcontroller:microcontroller0000" then - mesecons.receptor = { - state = mesecon.state.on, - rules = rules - } -end - -minetest.register_node(nodename, { - description = "Microcontroller", - drawtype = "nodebox", - tiles = { - top, - "jeija_microcontroller_bottom.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png", - "jeija_microcontroller_sides.png" - }, - - sunlight_propagates = true, - paramtype = "light", - is_ground_content = false, - walkable = true, - groups = groups, - drop = "mesecons_microcontroller:microcontroller0000 1", - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, -8/16, 8/16, -5/16, 8/16 }, - }, - node_box = { - type = "fixed", - fixed = { - { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 }, -- bottom slab - { -5/16, -7/16, -5/16, 5/16, -6/16, 5/16 }, -- circuit board - { -3/16, -6/16, -3/16, 3/16, -5/16, 3/16 }, -- IC - } - }, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("code", "") - meta:set_string("formspec", "size[9,2.5]".. - "field[0.256,-0.2;9,2;code;Code:;]".. - "button[0 ,0.2;1.5,3;band;AND]".. - "button[1.5,0.2;1.5,3;bxor;XOR]".. - "button[3 ,0.2;1.5,3;bnot;NOT]".. - "button[4.5,0.2;1.5,3;bnand;NAND]".. - "button[6 ,0.2;1.5,3;btflop;T-Flop]".. - "button[7.5,0.2;1.5,3;brsflop;RS-Flop]".. - "button_exit[3.5,1;2,3;program;Program]") - meta:set_string("infotext", "Unprogrammed Microcontroller") - local r = "" - for i=1, EEPROM_SIZE+1 do r=r.."0" end --Generate a string with EEPROM_SIZE*"0" - meta:set_string("eeprom", r) - end, - on_receive_fields = function(pos, formanme, fields, sender) - local player_name = sender:get_player_name() - if minetest.is_protected(pos, player_name) and - not minetest.check_player_privs(player_name, {protection_bypass=true}) then - minetest.record_protection_violation(pos, player_name) - return - end - local meta = minetest.get_meta(pos) - if fields.band then - fields.code = "sbi(C, A&B) :A and B are inputs, C is output" - elseif fields.bxor then - fields.code = "sbi(C, A~B) :A and B are inputs, C is output" - elseif fields.bnot then - fields.code = "sbi(B, !A) :A is input, B is output" - elseif fields.bnand then - fields.code = "sbi(C, !A|!B) :A and B are inputs, C is output" - elseif fields.btflop then - fields.code = "if(A)sbi(1,1);if(!A)sbi(B,!B)sbi(1,0); if(C)off(B,1); :A is input, B is output (Q), C is reset, toggles with falling edge" - elseif fields.brsflop then - fields.code = "if(A)on(C);if(B)off(C); :A is S (Set), B is R (Reset), C is output (R dominates)" - end - if fields.code == nil then return end - - meta:set_string("code", fields.code) - meta:set_string("formspec", "size[9,2.5]".. - "field[0.256,-0.2;9,2;code;Code:;"..minetest.formspec_escape(fields.code).."]".. - "button[0 ,0.2;1.5,3;band;AND]".. - "button[1.5,0.2;1.5,3;bxor;XOR]".. - "button[3 ,0.2;1.5,3;bnot;NOT]".. - "button[4.5,0.2;1.5,3;bnand;NAND]".. - "button[6 ,0.2;1.5,3;btflop;T-Flop]".. - "button[7.5,0.2;1.5,3;brsflop;RS-Flop]".. - "button_exit[3.5,1;2,3;program;Program]") - meta:set_string("infotext", "Programmed Microcontroller") - yc.reset (pos) - yc.update(pos) - end, - sounds = default.node_sound_stone_defaults(), - mesecons = mesecons, - after_dig_node = function (pos, node) - rules = microc_rules[node.name] - mesecon.receptor_off(pos, rules) - end, - on_blast = mesecon.on_blastnode, -}) -end -end -end -end - -if minetest.get_modpath("mesecons_luacontroller") then - minetest.register_craft({ - type = "shapeless", - output = "mesecons_microcontroller:microcontroller0000", - recipe = {"mesecons_luacontroller:luacontroller0000"}, - }) - minetest.register_craft({ - type = "shapeless", - output = "mesecons_luacontroller:luacontroller0000", - recipe = {"mesecons_microcontroller:microcontroller0000"}, - }) -else - minetest.register_craft({ - output = 'craft "mesecons_microcontroller:microcontroller0000" 2', - recipe = { - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'mesecons_materials:silicon', 'mesecons_materials:silicon', 'group:mesecon_conductor_craftable'}, - {'group:mesecon_conductor_craftable', 'group:mesecon_conductor_craftable', ''}, - } - }) -end - -yc.reset = function(pos) - yc.action(pos, {a=false, b=false, c=false, d=false}) - local meta = minetest.get_meta(pos) - meta:set_int("afterid", 0) - local r = "" - for i=1, EEPROM_SIZE+1 do r=r.."0" end --Generate a string with EEPROM_SIZE*"0" - meta:set_string("eeprom", r) -end - -yc.update = function(pos) - local meta = minetest.get_meta(pos) - - if (mesecon.do_overheat(pos)) then - minetest.remove_node(pos) - minetest.after(0.2, function (pos) - mesecon.receptor_off(pos, mesecon.rules.flat) - end , pos) -- wait for pending parsings - minetest.add_item(pos, "mesecons_microcontroller:microcontroller0000") - end - - local code = meta:get_string("code") - code = yc.code_remove_commentary(code) - code = string.gsub(code, " ", "") --Remove all spaces - code = string.gsub(code, " ", "") --Remove all tabs - if yc.parsecode(code, pos) == nil then - meta:set_string("infotext", "Code not valid!\n"..code) - else - meta:set_string("infotext", "Working Microcontroller\n"..code) - end -end - - ---Code Parsing -yc.code_remove_commentary = function(code) - local is_string = false - for i = 1, #code do - if code:sub(i, i) == '"' then - is_string = not is_string --toggle is_string - elseif code:sub(i, i) == ":" and not is_string then - return code:sub(1, i-1) - end - end - return code -end - -yc.parsecode = function(code, pos) - local meta = minetest.get_meta(pos) - local endi = 1 - local Lreal = yc.get_real_portstates(pos) - local Lvirtual = yc.get_virtual_portstates(pos) - if Lvirtual == nil then return nil end - local c - local eeprom = meta:get_string("eeprom") - while true do - local command, params - command, endi = yc.parse_get_command(code, endi) - if command == nil then return nil end - if command == true then break end --end of code - if command == "if" then - local r - r, endi = yc.command_if(code, endi, yc.merge_portstates(Lreal, Lvirtual), eeprom) - if r == nil then return nil end - if r == true then -- nothing - elseif r == false then - local endi_new = yc.skip_to_else (code, endi) - if endi_new == nil then --else > not found - endi = yc.skip_to_endif(code, endi) - else - endi = endi_new - end - if endi == nil then return nil end - end - else - params, endi = yc.parse_get_params(code, endi) - if not params then return nil end - end - if command == "on" then - L = yc.command_on (params, Lvirtual) - elseif command == "off" then - L = yc.command_off(params, Lvirtual) - elseif command == "print" then - local su = yc.command_print(params, eeprom, yc.merge_portstates(Lreal, Lvirtual)) - if su ~= true then return nil end - elseif command == "after" then - local su = yc.command_after(params, pos) - if su == nil then return nil end - elseif command == "sbi" then - local new_eeprom - new_eeprom, Lvirtual = yc.command_sbi (params, eeprom, yc.merge_portstates(Lreal, Lvirtual), Lvirtual) - if new_eeprom == nil then return nil - else eeprom = new_eeprom end - elseif command == "if" then --nothing - else - return nil - end - if Lvirtual == nil then return nil end - if eeprom == nil then return nil else - minetest.get_meta(pos):set_string("eeprom", eeprom) end - end - yc.action(pos, Lvirtual) - return true -end - -yc.parse_get_command = function(code, starti) - local i = starti - local s - while s ~= "" do - s = string.sub(code, i, i) - if s == "(" then - return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after ( - end - if s == ";" and starti == i then - starti = starti + 1 - i = starti - elseif s == ">" then - starti = yc.skip_to_endif(code, starti) - if starti == nil then return nil end - i = starti - else - i = i + 1 - end - end - - if starti == i-1 then - return true, true - end - return nil, nil -end - -yc.parse_get_params = function(code, starti) - local i = starti - local s - local params = {} - local is_string = false - while s ~= "" do - s = string.sub(code, i, i) - if code:sub(i, i) == '"' then - is_string = (is_string==false) --toggle is_string - end - if s == ")" and is_string == false then - table.insert(params, string.sub(code, starti, i-1)) -- i: ) i+1 after ) - return params, i + 1 - end - if s == "," and is_string == false then - table.insert(params, string.sub(code, starti, i-1)) -- i: ) i+1 after ) - starti = i + 1 - end - i = i + 1 - end - return nil, nil -end - -yc.parse_get_eeprom_param = function(cond, starti) - local i = starti - local s - local addr - while s ~= "" do - s = string.sub(cond, i, i) - if string.find("0123456789", s) == nil or s == "" then - addr = string.sub(cond, starti, i-1) -- i: last number i+1 after last number - return addr, i - end - if s == "," then return nil, nil end - i = i + 1 - end - return nil, nil -end - -yc.skip_to_endif = function(code, starti) - local i = starti - local s = false - local open_ifs = 1 - while s ~= nil and s~= "" do - s = code:sub(i, i) - if s == "i" and code:sub(i+1, i+1) == "f" then --if in µCScript - open_ifs = open_ifs + 1 - end - if s == ";" then - open_ifs = open_ifs - 1 - end - if open_ifs == 0 then - return i + 1 - end - i = i + 1 - end - return nil -end - -yc.skip_to_else = function(code, starti) - local i = starti - local s = false - local open_ifs = 1 - while s ~= nil and s~= "" do - s = code:sub(i, i) - if s == "i" and code:sub(i+1, i+1) == "f" then --if in µCScript - open_ifs = open_ifs + 1 - end - if s == ";" then - open_ifs = open_ifs - 1 - end - if open_ifs == 1 and s == ">" then - return i + 1 - end - i = i + 1 - end - return nil -end - ---Commands -yc.command_on = function(params, L) - local rules = {} - for i, port in ipairs(params) do - L = yc.set_portstate (port, true, L) - end - return L -end - -yc.command_off = function(params, L) - local rules = {} - for i, port in ipairs(params) do - L = yc.set_portstate (port, false, L) - end - return L -end - -yc.command_print = function(params, eeprom, L) - local s = "" - for i, param in ipairs(params) do - if param:sub(1,1) == '"' and param:sub(#param, #param) == '"' then - s = s..param:sub(2, #param-1) - else - r = yc.command_parsecondition(param, L, eeprom) - if r == "1" or r == "0" then - s = s..r - else return nil end - end - end - print(s) --don't remove - return true -end - -yc.command_sbi = function(params, eeprom, L, Lv) - if params[1]==nil or params[2]==nil or params[3] ~=nil then return nil end - local status = yc.command_parsecondition(params[2], L, eeprom) - - if status == nil then return nil, nil end - - if string.find("ABCD", params[1])~=nil and #params[1]==1 then --is a port - if status == "1" then - Lv = yc.set_portstate (params[1], true, Lv) - else - Lv = yc.set_portstate (params[1], false, Lv) - end - return eeprom, Lv; - end - - --is an eeprom address - local new_eeprom = ""; - for i=1, #eeprom do - if tonumber(params[1])==i then - new_eeprom = new_eeprom..status - else - new_eeprom = new_eeprom..eeprom:sub(i, i) - end - end - return new_eeprom, Lv -end - --- after (delay) -yc.command_after = function(params, pos) - if params[1] == nil or params[2] == nil or params[3] ~= nil then return nil end - - --get time (maximum time is 200) - local time = tonumber(params[1]) - if time == nil or time > 200 then - return nil - end - - --get code in quotes "code" - if string.sub(params[2], 1, 1) ~= '"' or string.sub(params[2], #params[2], #params[2]) ~= '"' then return nil end - local code = string.sub(params[2], 2, #params[2] - 1) - - local afterid = math.random(10000) - local meta = minetest.get_meta(pos) - meta:set_int("afterid", afterid) - minetest.after(time, yc.command_after_execute, {pos = pos, code = code, afterid = afterid}) - return true -end - -yc.command_after_execute = function(params) - local meta = minetest.get_meta(params.pos) - if meta:get_int("afterid") == params.afterid then --make sure the node has not been changed - if yc.parsecode(params.code, params.pos) == nil then - meta:set_string("infotext", "Code in after() not valid!") - else - if code ~= nil then - meta:set_string("infotext", "Working Microcontroller\n"..code) - else - meta:set_string("infotext", "Working Microcontroller") - end - end - end -end - ---If -yc.command_if = function(code, starti, L, eeprom) - local cond, endi = yc.command_if_getcondition(code, starti) - if cond == nil then return nil end - - cond = yc.command_parsecondition(cond, L, eeprom) - - local result - if cond == "0" then result = false - elseif cond == "1" then result = true end - if not result then end - return result, endi --endi from local cond, endi = yc.command_if_getcondition(code, starti) -end - ---Condition parsing -yc.command_if_getcondition = function(code, starti) - local i = starti - local s - local brackets = 1 --1 Bracket to close - while s ~= "" do - s = string.sub(code, i, i) - - if s == ")" then - brackets = brackets - 1 - end - - if s == "(" then - brackets = brackets + 1 - end - - if brackets == 0 then - return string.sub(code, starti, i-1), i + 1 -- i: ( i+1 after ( - end - - i = i + 1 - end - return nil, nil -end - -yc.command_parsecondition = function(cond, L, eeprom) - cond = string.gsub(cond, "A", tonumber(L.a and 1 or 0)) - cond = string.gsub(cond, "B", tonumber(L.b and 1 or 0)) - cond = string.gsub(cond, "C", tonumber(L.c and 1 or 0)) - cond = string.gsub(cond, "D", tonumber(L.d and 1 or 0)) - - - local i = 1 - local l = string.len(cond) - while i<=l do - local s = cond:sub(i,i) - if s == "#" then - local addr, endi = yc.parse_get_eeprom_param(cond, i+1) - local buf = yc.eeprom_read(tonumber(addr), eeprom) - if buf == nil then return nil end - local call = cond:sub(i, endi-1) - cond = string.gsub(cond, call, buf) - i = 0 - l = string.len(cond) - end - i = i + 1 - end - - cond = string.gsub(cond, "!0", "1") - cond = string.gsub(cond, "!1", "0") - - local i = 2 - local l = string.len(cond) - while i<=l do - local s = cond:sub(i,i) - local b = tonumber(cond:sub(i-1, i-1)) - local a = tonumber(cond:sub(i+1, i+1)) - if cond:sub(i+1, i+1) == nil then break end - if s == "=" then - if a==nil then return nil end - if b==nil then return nil end - if a == b then buf = "1" end - if a ~= b then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - i = i + 1 - end - - local i = 2 - local l = string.len(cond) - while i<=l do - local s = cond:sub(i,i) - local b = tonumber(cond:sub(i-1, i-1)) - local a = tonumber(cond:sub(i+1, i+1)) - if cond:sub(i+1, i+1) == nil then break end - if s == "&" then - if a==nil then return nil end - if b==nil then return nil end - local buf = ((a==1) and (b==1)) - if buf == true then buf = "1" end - if buf == false then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - if s == "|" then - if a==nil then return nil end - if b==nil then return nil end - local buf = ((a == 1) or (b == 1)) - if buf == true then buf = "1" end - if buf == false then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - if s == "~" then - if a==nil then return nil end - if b==nil then return nil end - local buf = (((a == 1) or (b == 1)) and not((a==1) and (b==1))) - if buf == true then buf = "1" end - if buf == false then buf = "0" end - cond = string.gsub(cond, b..s..a, buf) - i = 1 - l = string.len(cond) - end - i = i + 1 - end - - return cond -end - ---Virtual-Hardware functions -yc.eeprom_read = function(number, eeprom) - if not number then return end - return eeprom:sub(number, number) -end - ---Real I/O functions -yc.action = function(pos, L) --L-->Lvirtual - local Lv = yc.get_virtual_portstates(pos) - local name = "mesecons_microcontroller:microcontroller" - ..tonumber(L.d and 1 or 0) - ..tonumber(L.c and 1 or 0) - ..tonumber(L.b and 1 or 0) - ..tonumber(L.a and 1 or 0) - local node = minetest.get_node(pos) - minetest.swap_node(pos, {name = name, param2 = node.param2}) - - yc.action_setports(pos, L, Lv) -end - -yc.action_setports = function(pos, L, Lv) - local name = "mesecons_microcontroller:microcontroller" - local rules - if Lv.a ~= L.a then - rules = microc_rules[name.."0001"] - if L.a == true then mesecon.receptor_on(pos, rules) - else mesecon.receptor_off(pos, rules) end - end - if Lv.b ~= L.b then - rules = microc_rules[name.."0010"] - if L.b == true then mesecon.receptor_on(pos, rules) - else mesecon.receptor_off(pos, rules) end - end - if Lv.c ~= L.c then - rules = microc_rules[name.."0100"] - if L.c == true then mesecon.receptor_on(pos, rules) - else mesecon.receptor_off(pos, rules) end - end - if Lv.d ~= L.d then - rules = microc_rules[name.."1000"] - if L.d == true then mesecon.receptor_on(pos, rules) - else mesecon.receptor_off(pos, rules) end - end -end - -yc.set_portstate = function(port, state, L) - if port == "A" then L.a = state - elseif port == "B" then L.b = state - elseif port == "C" then L.c = state - elseif port == "D" then L.d = state - else return nil end - return L -end - -yc.update_real_portstates = function(pos, node, rulename, newstate) - local meta = minetest.get_meta(pos) - if rulename == nil then - meta:set_int("real_portstates", 1) - return - end - local n = meta:get_int("real_portstates") - 1 - local L = {} - for i = 1, 4 do - L[i] = n%2 - n = math.floor(n/2) - end - if rulename.x == nil then - for _, rname in ipairs(rulename) do - local port = ({4, 1, nil, 3, 2})[rname.x+2*rname.z+3] - L[port] = (newstate == "on") and 1 or 0 - end - else - local port = ({4, 1, nil, 3, 2})[rulename.x+2*rulename.z+3] - L[port] = (newstate == "on") and 1 or 0 - end - meta:set_int("real_portstates", 1 + L[1] + 2*L[2] + 4*L[3] + 8*L[4]) -end - -yc.get_real_portstates = function(pos) -- determine if ports are powered (by itself or from outside) - local meta = minetest.get_meta(pos) - local L = {} - local n = meta:get_int("real_portstates") - 1 - for _, index in ipairs({"a", "b", "c", "d"}) do - L[index] = ((n%2) == 1) - n = math.floor(n/2) - end - return L -end - -yc.get_virtual_portstates = function(pos) -- portstates according to the name - local name = minetest.get_node(pos).name - local b, a = string.find(name, ":microcontroller") - if a == nil then return nil end - a = a + 1 - - local Lvirtual = {a=false, b=false, c=false, d=false} - if name:sub(a , a ) == "1" then Lvirtual.d = true end - if name:sub(a+1, a+1) == "1" then Lvirtual.c = true end - if name:sub(a+2, a+2) == "1" then Lvirtual.b = true end - if name:sub(a+3, a+3) == "1" then Lvirtual.a = true end - return Lvirtual -end - -yc.merge_portstates = function(Lreal, Lvirtual) - local L = {a=false, b=false, c=false, d=false} - if Lvirtual.a or Lreal.a then L.a = true end - if Lvirtual.b or Lreal.b then L.b = true end - if Lvirtual.c or Lreal.c then L.c = true end - if Lvirtual.d or Lreal.d then L.d = true end - return L -end diff --git a/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_top.png b/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_top.png deleted file mode 100644 index 438c934..0000000 Binary files a/mesecons/mesecons_microcontroller/textures/jeija_microcontroller_top.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/depends.txt b/mesecons/mesecons_movestones/depends.txt deleted file mode 100644 index a596cf8..0000000 --- a/mesecons/mesecons_movestones/depends.txt +++ /dev/null @@ -1,3 +0,0 @@ -mesecons -mesecons_materials -mesecons_mvps diff --git a/mesecons/mesecons_movestones/doc/movestone/description.html b/mesecons/mesecons_movestones/doc/movestone/description.html deleted file mode 100644 index b7138a0..0000000 --- a/mesecons/mesecons_movestones/doc/movestone/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Movestones are effectors that push the blocks in front of them. They move along on the right side of a mesecon wire track. -A movestone trying to move into, or push other nodes into, an unloaded block doesn't move. diff --git a/mesecons/mesecons_movestones/doc/movestone/preview.png b/mesecons/mesecons_movestones/doc/movestone/preview.png deleted file mode 100644 index bda64db..0000000 Binary files a/mesecons/mesecons_movestones/doc/movestone/preview.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/doc/movestone/recipe.png b/mesecons/mesecons_movestones/doc/movestone/recipe.png deleted file mode 100644 index f3d45df..0000000 Binary files a/mesecons/mesecons_movestones/doc/movestone/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/doc/movestone_sticky/description.html b/mesecons/mesecons_movestones/doc/movestone_sticky/description.html deleted file mode 100644 index f19d6a5..0000000 --- a/mesecons/mesecons_movestones/doc/movestone_sticky/description.html +++ /dev/null @@ -1,3 +0,0 @@ -Movestones are effectors that push the blocks in front of them. They move along on the right side of a mesecon wire track. Sticky ones also pull blocks. -A sticky movestone trying to move into, or push other nodes into, an unloaded block doesn't move. -A sticky movestone trying to pull nodes from an unloaded block moves but leaves them behind. diff --git a/mesecons/mesecons_movestones/doc/movestone_sticky/preview.png b/mesecons/mesecons_movestones/doc/movestone_sticky/preview.png deleted file mode 100644 index 85f9213..0000000 Binary files a/mesecons/mesecons_movestones/doc/movestone_sticky/preview.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/doc/movestone_sticky/recipe.png b/mesecons/mesecons_movestones/doc/movestone_sticky/recipe.png deleted file mode 100644 index 55338f4..0000000 Binary files a/mesecons/mesecons_movestones/doc/movestone_sticky/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/init.lua b/mesecons/mesecons_movestones/init.lua deleted file mode 100644 index e3781df..0000000 --- a/mesecons/mesecons_movestones/init.lua +++ /dev/null @@ -1,224 +0,0 @@ --- MOVESTONE --- Non-sticky: --- Moves along mesecon lines --- Pushes all blocks in front of it --- --- Sticky one --- Moves along mesecon lines --- Pushes all block in front of it --- Pull all blocks in its back - --- settings: -local timer_interval = 1 / mesecon.setting("movestone_speed", 3) -local max_push = mesecon.setting("movestone_max_push", 50) -local max_pull = mesecon.setting("movestone_max_pull", 50) - --- helper functions: -local function get_movestone_direction(rulename, is_vertical) - if is_vertical then - if rulename.z > 0 then - return {x = 0, y = -1, z = 0} - elseif rulename.z < 0 then - return {x = 0, y = 1, z = 0} - elseif rulename.x > 0 then - return {x = 0, y = -1, z = 0} - elseif rulename.x < 0 then - return {x = 0, y = 1, z = 0} - end - else - if rulename.z > 0 then - return {x = -1, y = 0, z = 0} - elseif rulename.z < 0 then - return {x = 1, y = 0, z = 0} - elseif rulename.x > 0 then - return {x = 0, y = 0, z = -1} - elseif rulename.x < 0 then - return {x = 0, y = 0, z = 1} - end - end -end - --- registration functions: -function mesecon.register_movestone(name, def, is_sticky, is_vertical) - - def.after_place_node = function(pos, placer) - minetest.get_meta(pos):set_string("owner", placer:get_player_name()) - end - - local function movestone_move(pos, node, rulename) - local direction = get_movestone_direction(rulename, is_vertical) - local frontpos = vector.add(pos, direction) - - -- ### Step 1: Push nodes in front ### - local owner = minetest.get_meta(pos):get_string("owner") - local success, stack, oldstack = mesecon.mvps_push(frontpos, direction, max_push, owner) - if not success then - minetest.get_node_timer(pos):start(timer_interval) - return - end - mesecon.mvps_move_objects(frontpos, direction, oldstack) - - -- ### Step 2: Move the movestone ### - minetest.set_node(frontpos, node) - minetest.get_meta(frontpos):set_string("owner", owner) - minetest.remove_node(pos) - mesecon.on_dignode(pos, node) - mesecon.on_placenode(frontpos, node) - minetest.get_node_timer(frontpos):start(timer_interval) - - -- ### Step 3: If sticky, pull stack behind ### - if is_sticky then - local backpos = vector.subtract(pos, direction) - success, stack, oldstack = mesecon.mvps_pull_all(backpos, direction, max_pull, owner) - if success then - mesecon.mvps_move_objects(backpos, vector.multiply(direction, -1), oldstack, -1) - end - end - - -- ### Step 4: Let things fall ### - minetest.check_for_falling(vector.add(pos, {x=0, y=1, z=0})) - end - - def.is_ground_content = false - - def.mesecons = {effector = { - action_on = function(pos, node, rulename) - if rulename and not minetest.get_node_timer(pos):is_started() then - movestone_move(pos, node, rulename) - end - end, - rules = mesecon.rules.default, - }} - - def.on_timer = function(pos, elapsed) - local sourcepos = mesecon.is_powered(pos) - if not sourcepos then - return - end - local rulename = vector.subtract(sourcepos[1], pos) - mesecon.activate(pos, minetest.get_node(pos), rulename, 0) - end - - def.on_blast = mesecon.on_blastnode - - minetest.register_node(name, def) -end - - --- registration: -mesecon.register_movestone("mesecons_movestones:movestone", { - tiles = { - "jeija_movestone_side.png", - "jeija_movestone_side.png", - "jeija_movestone_arrows.png^[transformFX", - "jeija_movestone_arrows.png^[transformFX", - "jeija_movestone_arrows.png", - "jeija_movestone_arrows.png", - }, - groups = {cracky = 3}, - description = "Movestone", - sounds = default.node_sound_stone_defaults() -}, false, false) - -mesecon.register_movestone("mesecons_movestones:sticky_movestone", { - tiles = { - "jeija_movestone_side.png", - "jeija_movestone_side.png", - "jeija_sticky_movestone.png^[transformFX", - "jeija_sticky_movestone.png^[transformFX", - "jeija_sticky_movestone.png", - "jeija_sticky_movestone.png", - }, - groups = {cracky = 3}, - description = "Sticky Movestone", - sounds = default.node_sound_stone_defaults(), -}, true, false) - -mesecon.register_movestone("mesecons_movestones:movestone_vertical", { - tiles = { - "jeija_movestone_side.png", - "jeija_movestone_side.png", - "jeija_movestone_arrows.png^[transformFXR90", - "jeija_movestone_arrows.png^[transformR90", - "jeija_movestone_arrows.png^[transformFXR90", - "jeija_movestone_arrows.png^[transformR90", - }, - groups = {cracky = 3}, - description = "Vertical Movestone", - sounds = default.node_sound_stone_defaults() -}, false, true) - -mesecon.register_movestone("mesecons_movestones:sticky_movestone_vertical", { - tiles = { - "jeija_movestone_side.png^(mesecons_glue.png^[opacity:127)", - "jeija_movestone_side.png^(mesecons_glue.png^[opacity:127)", - "jeija_movestone_arrows.png^[transformFXR90", - "jeija_movestone_arrows.png^[transformR90", - "jeija_movestone_arrows.png^[transformFXR90", - "jeija_movestone_arrows.png^[transformR90", - }, - groups = {cracky = 3}, - description = "Vertical Sticky Movestone", - sounds = default.node_sound_stone_defaults(), -}, true, true) - - --- crafting: --- base recipe: -minetest.register_craft({ - output = "mesecons_movestones:movestone 2", - recipe = { - {"default:stone", "default:stone", "default:stone"}, - {"group:mesecon_conductor_craftable", "group:mesecon_conductor_craftable", "group:mesecon_conductor_craftable"}, - {"default:stone", "default:stone", "default:stone"}, - } -}) - --- conversation: -minetest.register_craft({ - type = "shapeless", - output = "mesecons_movestones:movestone", - recipe = {"mesecons_movestones:movestone_vertical"}, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_movestones:movestone_vertical", - recipe = {"mesecons_movestones:movestone"}, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_movestones:sticky_movestone", - recipe = {"mesecons_movestones:sticky_movestone_vertical"}, -}) - -minetest.register_craft({ - type = "shapeless", - output = "mesecons_movestones:sticky_movestone_vertical", - recipe = {"mesecons_movestones:sticky_movestone"}, -}) - --- make sticky: -minetest.register_craft({ - output = "mesecons_movestones:sticky_movestone", - recipe = { - {"mesecons_materials:glue", "mesecons_movestones:movestone", "mesecons_materials:glue"}, - } -}) - -minetest.register_craft({ - output = "mesecons_movestones:sticky_movestone_vertical", - recipe = { - {"mesecons_materials:glue"}, - {"mesecons_movestones:movestone_vertical"}, - {"mesecons_materials:glue"}, - } -}) - - --- legacy code: -minetest.register_alias("mesecons_movestones:movestone_active", - "mesecons_movestones:movestone") -minetest.register_alias("mesecons_movestones:sticky_movestone_active", - "mesecons_movestones:sticky_movestone") diff --git a/mesecons/mesecons_movestones/textures/jeija_movestone_arrows.png b/mesecons/mesecons_movestones/textures/jeija_movestone_arrows.png deleted file mode 100644 index 358c357..0000000 Binary files a/mesecons/mesecons_movestones/textures/jeija_movestone_arrows.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/textures/jeija_movestone_side.png b/mesecons/mesecons_movestones/textures/jeija_movestone_side.png deleted file mode 100644 index de753ef..0000000 Binary files a/mesecons/mesecons_movestones/textures/jeija_movestone_side.png and /dev/null differ diff --git a/mesecons/mesecons_movestones/textures/jeija_sticky_movestone.png b/mesecons/mesecons_movestones/textures/jeija_sticky_movestone.png deleted file mode 100644 index 8953cf1..0000000 Binary files a/mesecons/mesecons_movestones/textures/jeija_sticky_movestone.png and /dev/null differ diff --git a/mesecons/mesecons_mvps/depends.txt b/mesecons/mesecons_mvps/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_mvps/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_mvps/init.lua b/mesecons/mesecons_mvps/init.lua deleted file mode 100644 index 3dc9e28..0000000 --- a/mesecons/mesecons_mvps/init.lua +++ /dev/null @@ -1,289 +0,0 @@ ---register stoppers for movestones/pistons - -mesecon.mvps_stoppers = {} -mesecon.on_mvps_move = {} -mesecon.mvps_unmov = {} - ---- Objects (entities) that cannot be moved -function mesecon.register_mvps_unmov(objectname) - mesecon.mvps_unmov[objectname] = true; -end - -function mesecon.is_mvps_unmov(objectname) - return mesecon.mvps_unmov[objectname] -end - --- Nodes that cannot be pushed / pulled by movestones, pistons -function mesecon.is_mvps_stopper(node, pushdir, stack, stackid) - -- unknown nodes are always stoppers - if not minetest.registered_nodes[node.name] then - return true - end - - local get_stopper = mesecon.mvps_stoppers[node.name] - if type (get_stopper) == "function" then - get_stopper = get_stopper(node, pushdir, stack, stackid) - end - - return get_stopper -end - -function mesecon.register_mvps_stopper(nodename, get_stopper) - if get_stopper == nil then - get_stopper = true - end - mesecon.mvps_stoppers[nodename] = get_stopper -end - --- Functions to be called on mvps movement -function mesecon.register_on_mvps_move(callback) - mesecon.on_mvps_move[#mesecon.on_mvps_move+1] = callback -end - -local function on_mvps_move(moved_nodes) - for _, callback in ipairs(mesecon.on_mvps_move) do - callback(moved_nodes) - end -end - -function mesecon.mvps_process_stack(stack) - -- update mesecons for placed nodes ( has to be done after all nodes have been added ) - for _, n in ipairs(stack) do - mesecon.on_placenode(n.pos, minetest.get_node(n.pos)) - end -end - --- tests if the node can be pushed into, e.g. air, water, grass -local function node_replaceable(name) - if minetest.registered_nodes[name] then - return minetest.registered_nodes[name].buildable_to or false - end - - return false -end - -function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky) - -- determine the number of nodes to be pushed - local nodes = {} - local frontiers = {pos} - - while #frontiers > 0 do - local np = frontiers[1] - local nn = minetest.get_node(np) - if nn.name == "ignore" then return nil end - - if not node_replaceable(nn.name) then - table.insert(nodes, {node = nn, pos = np}) - if #nodes > maximum then return nil end - - -- add connected nodes to frontiers, connected is a vector list - -- the vectors must be absolute positions - local connected = {} - if minetest.registered_nodes[nn.name] - and minetest.registered_nodes[nn.name].mvps_sticky then - connected = minetest.registered_nodes[nn.name].mvps_sticky(np, nn) - end - - table.insert(connected, vector.add(np, dir)) - - -- If adjacent node is sticky block and connects add that - -- position to the connected table - for _, r in ipairs(mesecon.rules.alldirs) do - local adjpos = vector.add(np, r) - local adjnode = minetest.get_node(adjpos) - if adjnode.name == "ignore" then return nil end - if minetest.registered_nodes[adjnode.name] - and minetest.registered_nodes[adjnode.name].mvps_sticky then - local sticksto = minetest.registered_nodes[adjnode.name] - .mvps_sticky(adjpos, adjnode) - - -- connects to this position? - for _, link in ipairs(sticksto) do - if vector.equals(link, np) then - table.insert(connected, adjpos) - end - end - end - end - - if all_pull_sticky then - table.insert(connected, vector.subtract(np, dir)) - end - - -- Make sure there are no duplicates in frontiers / nodes before - -- adding nodes in "connected" to frontiers - for _, cp in ipairs(connected) do - local duplicate = false - for _, rp in ipairs(nodes) do - if vector.equals(cp, rp.pos) then - duplicate = true - end - end - for _, fp in ipairs(frontiers) do - if vector.equals(cp, fp) then - duplicate = true - end - end - if not duplicate then - table.insert(frontiers, cp) - end - end - end - table.remove(frontiers, 1) - end - - return nodes -end - -function mesecon.mvps_push(pos, dir, maximum, owner) - return mesecon.mvps_push_or_pull(pos, dir, dir, maximum, nil, owner) -end - -function mesecon.mvps_pull_all(pos, dir, maximum, owner) - return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum, true, owner) -end - -function mesecon.mvps_pull_single(pos, dir, maximum, owner) - return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum, nil, owner) -end - --- pos: pos of mvps; stackdir: direction of building the stack --- movedir: direction of actual movement --- maximum: maximum nodes to be pushed --- all_pull_sticky: All nodes are sticky in the direction that they are pulled from -function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sticky, owner) - local owner = tostring(owner ~= "" and owner or "mvps") - local nodes = mesecon.mvps_get_stack(pos, movedir, maximum, all_pull_sticky) - - if not nodes then return end - -- determine if one of the nodes blocks the push / pull - for id, n in ipairs(nodes) do - if mesecon.is_mvps_stopper(n.node, movedir, nodes, id) - or minetest.is_protected(n.pos, owner) then - return - end - end - - -- remove all nodes - for _, n in ipairs(nodes) do - n.meta = minetest.get_meta(n.pos):to_table() - local node_timer = minetest.get_node_timer(n.pos) - if node_timer:is_started() then - n.node_timer = {node_timer:get_timeout(), node_timer:get_elapsed()} - end - minetest.remove_node(n.pos) - end - - -- update mesecons for removed nodes ( has to be done after all nodes have been removed ) - for _, n in ipairs(nodes) do - mesecon.on_dignode(n.pos, n.node) - end - - -- add nodes - for _, n in ipairs(nodes) do - local np = vector.add(n.pos, movedir) - - minetest.set_node(np, n.node) - minetest.get_meta(np):from_table(n.meta) - if n.node_timer then - minetest.get_node_timer(np):set(unpack(n.node_timer)) - end - end - - local moved_nodes = {} - local oldstack = mesecon.tablecopy(nodes) - for i in ipairs(nodes) do - moved_nodes[i] = {} - moved_nodes[i].oldpos = nodes[i].pos - nodes[i].pos = vector.add(nodes[i].pos, movedir) - moved_nodes[i].pos = nodes[i].pos - moved_nodes[i].node = nodes[i].node - moved_nodes[i].meta = nodes[i].meta - moved_nodes[i].node_timer = nodes[i].node_timer - end - - on_mvps_move(moved_nodes) - - return true, nodes, oldstack -end - -function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor) - local objects_to_move = {} - local dir_k - local dir_l - for k, v in pairs(dir) do - if v ~= 0 then - dir_k = k - dir_l = v - break - end - end - movefactor = movefactor or 1 - dir = vector.multiply(dir, movefactor) - for id, obj in pairs(minetest.object_refs) do - local obj_pos = obj:getpos() - local cbox = obj:get_properties().collisionbox - local min_pos = vector.add(obj_pos, vector.new(cbox[1], cbox[2], cbox[3])) - local max_pos = vector.add(obj_pos, vector.new(cbox[4], cbox[5], cbox[6])) - local ok = true - for k, v in pairs(pos) do - local edge1, edge2 - if k ~= dir_k then - edge1 = v - 0.51 -- More than 0.5 to move objects near to the stack. - edge2 = v + 0.51 - else - edge1 = v - 0.5 * dir_l - edge2 = v + (#nodestack + 0.5 * movefactor) * dir_l - -- Make sure, edge1 is bigger than edge2: - if edge1 > edge2 then - edge1, edge2 = edge2, edge1 - end - end - if min_pos[k] > edge2 or max_pos[k] < edge1 then - ok = false - break - end - end - if ok then - local ent = obj:get_luaentity() - if obj:is_player() or (ent and not mesecon.is_mvps_unmov(ent.name)) then - local np = vector.add(obj_pos, dir) - -- Move only if destination is not solid or object is inside stack: - local nn = minetest.get_node(np) - local node_def = minetest.registered_nodes[nn.name] - local obj_offset = dir_l * (obj_pos[dir_k] - pos[dir_k]) - if (node_def and not node_def.walkable) or - (obj_offset >= 0 and - obj_offset <= #nodestack - 0.5) then - obj:move_to(np) - end - end - end - end -end - --- Never push into unloaded blocks. Don’t try to pull from them, either. --- TODO: load blocks instead, as with wires. -mesecon.register_mvps_stopper("ignore") - -mesecon.register_mvps_stopper("doors:door_steel_b_1") -mesecon.register_mvps_stopper("doors:door_steel_t_1") -mesecon.register_mvps_stopper("doors:door_steel_b_2") -mesecon.register_mvps_stopper("doors:door_steel_t_2") -mesecon.register_mvps_stopper("default:chest_locked") -mesecon.register_on_mvps_move(mesecon.move_hot_nodes) -mesecon.register_on_mvps_move(function(moved_nodes) - for i = 1, #moved_nodes do - local moved_node = moved_nodes[i] - mesecon.on_placenode(moved_node.pos, moved_node.node) - minetest.after(0, function() - minetest.check_for_falling(moved_node.oldpos) - minetest.check_for_falling(moved_node.pos) - end) - local node_def = minetest.registered_nodes[moved_node.node.name] - if node_def and node_def.mesecon and node_def.mesecon.on_mvps_move then - node_def.mesecon.on_mvps_move(moved_node.pos, moved_node.node, - moved_node.oldpos, moved_node.meta) - end - end -end) diff --git a/mesecons/mesecons_noteblock/depends.txt b/mesecons/mesecons_noteblock/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_noteblock/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_noteblock/doc/noteblock/description.html b/mesecons/mesecons_noteblock/doc/noteblock/description.html deleted file mode 100644 index 729bfe1..0000000 --- a/mesecons/mesecons_noteblock/doc/noteblock/description.html +++ /dev/null @@ -1,13 +0,0 @@ -This effector makes a sound if powered and can be used for making music. Normally it makes piano sounds. The sound frequency can be changed by punching the block. There are some special sounds that depend on the block below: -
- - - - - - - - - - -
Block BelowEffect
GlassHihat
StoneKick
ChestSnare
TreeCrash
GlassHihat
WoodLite Crash
Coal BlockExplosion Sound
Lava SourceFire Sound
Steel BlockRaises the pitch by one octave
diff --git a/mesecons/mesecons_noteblock/doc/noteblock/preview.png b/mesecons/mesecons_noteblock/doc/noteblock/preview.png deleted file mode 100644 index c4991fb..0000000 Binary files a/mesecons/mesecons_noteblock/doc/noteblock/preview.png and /dev/null differ diff --git a/mesecons/mesecons_noteblock/doc/noteblock/recipe.png b/mesecons/mesecons_noteblock/doc/noteblock/recipe.png deleted file mode 100644 index d3c3675..0000000 Binary files a/mesecons/mesecons_noteblock/doc/noteblock/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_noteblock/init.lua b/mesecons/mesecons_noteblock/init.lua deleted file mode 100644 index 22755ef..0000000 --- a/mesecons/mesecons_noteblock/init.lua +++ /dev/null @@ -1,71 +0,0 @@ -minetest.register_node("mesecons_noteblock:noteblock", { - description = "Noteblock", - tiles = {"mesecons_noteblock.png"}, - is_ground_content = false, - groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2}, - on_punch = function(pos, node) -- change sound when punched - node.param2 = (node.param2+1)%12 - mesecon.noteblock_play(pos, node.param2) - minetest.set_node(pos, node) - end, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector = { -- play sound when activated - action_on = function(pos, node) - mesecon.noteblock_play(pos, node.param2) - end - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = "mesecons_noteblock:noteblock 1", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"group:mesecon_conductor_craftable", "default:steel_ingot", "group:mesecon_conductor_craftable"}, - {"group:wood", "group:wood", "group:wood"}, - } -}) - -local soundnames = { - [0] = "mesecons_noteblock_csharp", - "mesecons_noteblock_d", - "mesecons_noteblock_dsharp", - "mesecons_noteblock_e", - "mesecons_noteblock_f", - "mesecons_noteblock_fsharp", - "mesecons_noteblock_g", - "mesecons_noteblock_gsharp", - - "mesecons_noteblock_a", - "mesecons_noteblock_asharp", - "mesecons_noteblock_b", - "mesecons_noteblock_c" -} - -local node_sounds = { - ["default:glass"] = "mesecons_noteblock_hihat", - ["default:stone"] = "mesecons_noteblock_kick", - ["default:lava_source"] = "fire_fire", - ["default:chest"] = "mesecons_noteblock_snare", - ["default:tree"] = "mesecons_noteblock_crash", - ["default:wood"] = "mesecons_noteblock_litecrash", - ["default:coalblock"] = "tnt_explode", -} - -mesecon.noteblock_play = function(pos, param2) - pos.y = pos.y-1 - local nodeunder = minetest.get_node(pos).name - local soundname = node_sounds[nodeunder] - if not soundname then - soundname = soundnames[param2] - if not soundname then - minetest.log("error", "[mesecons_noteblock] No soundname found, test param2") - return - end - if nodeunder == "default:steelblock" then - soundname = soundname.. 2 - end - end - pos.y = pos.y+1 - minetest.sound_play(soundname, {pos = pos}) -end diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a.ogg deleted file mode 100644 index 331fc1c..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a2.ogg deleted file mode 100644 index 695b0f4..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_a2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp.ogg deleted file mode 100644 index db96aed..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp2.ogg deleted file mode 100644 index 27bd09d..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_asharp2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b.ogg deleted file mode 100644 index 810fe18..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b2.ogg deleted file mode 100644 index 3de1250..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_b2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c.ogg deleted file mode 100644 index 5c60d31..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c2.ogg deleted file mode 100644 index 724db7d..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_c2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_crash.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_crash.ogg deleted file mode 100644 index 0308d11..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_crash.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp.ogg deleted file mode 100644 index 12c1ef3..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp2.ogg deleted file mode 100644 index fc7f6c8..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_csharp2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d.ogg deleted file mode 100644 index 929b7fb..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d2.ogg deleted file mode 100644 index dfd702b..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_d2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp.ogg deleted file mode 100644 index eb6045d..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp2.ogg deleted file mode 100644 index 5ac16dd..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_dsharp2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e.ogg deleted file mode 100644 index 94977e0..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e2.ogg deleted file mode 100644 index 1dcc0c4..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_e2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f.ogg deleted file mode 100644 index 221d926..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f2.ogg deleted file mode 100644 index acf10db..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_f2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp.ogg deleted file mode 100644 index 7af83a8..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp2.ogg deleted file mode 100644 index a96f637..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_fsharp2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g.ogg deleted file mode 100644 index 480ca36..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g2.ogg deleted file mode 100644 index 917b2b9..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_g2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp.ogg deleted file mode 100644 index 2e71fea..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp2.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp2.ogg deleted file mode 100644 index 941c685..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_gsharp2.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_hihat.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_hihat.ogg deleted file mode 100644 index 0afa7c0..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_hihat.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg deleted file mode 100644 index 10d585b..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_kick.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_litecrash.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_litecrash.ogg deleted file mode 100644 index 79ab256..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_litecrash.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg b/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg deleted file mode 100644 index 83a7944..0000000 Binary files a/mesecons/mesecons_noteblock/sounds/mesecons_noteblock_snare.ogg and /dev/null differ diff --git a/mesecons/mesecons_noteblock/textures/mesecons_noteblock.png b/mesecons/mesecons_noteblock/textures/mesecons_noteblock.png deleted file mode 100644 index 7158a49..0000000 Binary files a/mesecons/mesecons_noteblock/textures/mesecons_noteblock.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/depends.txt b/mesecons/mesecons_pistons/depends.txt deleted file mode 100644 index 01f085b..0000000 --- a/mesecons/mesecons_pistons/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_mvps diff --git a/mesecons/mesecons_pistons/doc/piston/description.html b/mesecons/mesecons_pistons/doc/piston/description.html deleted file mode 100644 index b9dffaa..0000000 --- a/mesecons/mesecons_pistons/doc/piston/description.html +++ /dev/null @@ -1,3 +0,0 @@ -Pistons are effectors, they push up to 20 blocks in front of them. The push direction can be set by placing them from different angles. -A piston pointing into an unloaded block won't extend. -A piston retracting from an unloaded block works, but gravity-sensitive nodes above the empty space may not fall. diff --git a/mesecons/mesecons_pistons/doc/piston/preview.png b/mesecons/mesecons_pistons/doc/piston/preview.png deleted file mode 100644 index 9e9ede3..0000000 Binary files a/mesecons/mesecons_pistons/doc/piston/preview.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/doc/piston/recipe.png b/mesecons/mesecons_pistons/doc/piston/recipe.png deleted file mode 100644 index 0a71159..0000000 Binary files a/mesecons/mesecons_pistons/doc/piston/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/doc/piston_sticky/description.html b/mesecons/mesecons_pistons/doc/piston_sticky/description.html deleted file mode 100644 index 580b76f..0000000 --- a/mesecons/mesecons_pistons/doc/piston_sticky/description.html +++ /dev/null @@ -1,4 +0,0 @@ -Sticky pistons are effectors, they push up to 20 blocks in front of them. The push direction can be set by placing them from different angles. Sticky ones also pull 1 block. -A sticky piston pointing into an unloaded block won't extend. -A sticky piston retracting from within an unloaded block works and pulls a node, but if it doesn't pull anything, then gravity-sensitive nodes above the empty space may not fall. -An extended sticky piston that touches the surface of an unloaded block and loses signal retracts but doesn't pull anything. diff --git a/mesecons/mesecons_pistons/doc/piston_sticky/preview.png b/mesecons/mesecons_pistons/doc/piston_sticky/preview.png deleted file mode 100644 index 716d675..0000000 Binary files a/mesecons/mesecons_pistons/doc/piston_sticky/preview.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/doc/piston_sticky/recipe.png b/mesecons/mesecons_pistons/doc/piston_sticky/recipe.png deleted file mode 100644 index 3520736..0000000 Binary files a/mesecons/mesecons_pistons/doc/piston_sticky/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/init.lua b/mesecons/mesecons_pistons/init.lua deleted file mode 100644 index e4317a1..0000000 --- a/mesecons/mesecons_pistons/init.lua +++ /dev/null @@ -1,504 +0,0 @@ -local specs = { - normal = { - offname = "mesecons_pistons:piston_normal_off", - onname = "mesecons_pistons:piston_normal_on", - pusher = "mesecons_pistons:piston_pusher_normal", - }, - sticky = { - offname = "mesecons_pistons:piston_sticky_off", - onname = "mesecons_pistons:piston_sticky_on", - pusher = "mesecons_pistons:piston_pusher_sticky", - sticky = true, - }, -} - -local function get_pistonspec_name(name, part) - if part then - for spec_name, spec in pairs(specs) do - if name == spec[part] then - return spec_name, part - end - end - return - end - for spec_name, spec in pairs(specs) do - for part, value in pairs(spec) do - if name == value then - return spec_name, part - end - end - end -end - -local function get_pistonspec(name, part) - return specs[get_pistonspec_name(name, part)] -end - -local max_push = mesecon.setting("piston_max_push", 15) -local max_pull = mesecon.setting("piston_max_pull", 15) - --- Get mesecon rules of pistons -local function piston_get_rules(node) - local dir = minetest.facedir_to_dir(node.param2) - for k, v in pairs(dir) do - if v ~= 0 then - dir = {k, -v} - break - end - end - local rules = table.copy(mesecon.rules.default) - for i, rule in ipairs(rules) do - if rule[dir[1]] == dir[2] then - table.remove(rules, i) - end - end - return rules -end - -local function piston_remove_pusher(pos, node, check_falling) - local pistonspec = get_pistonspec(node.name, "onname") - local dir = vector.multiply(minetest.facedir_to_dir(node.param2), -1) - local pusherpos = vector.add(pos, dir) - local pushername = minetest.get_node(pusherpos).name - - -- make sure there actually is a pusher (for compatibility reasons mainly) - if pushername ~= pistonspec.pusher then - return - end - - minetest.remove_node(pusherpos) - minetest.sound_play("piston_retract", { - pos = pos, - max_hear_distance = 20, - gain = 0.3, - }) - - if check_falling then - minetest.check_for_falling(pusherpos) - end -end - -local function piston_after_dig(pos, node) - piston_remove_pusher(pos, node, true) -end - -local piston_on = function(pos, node) - local pistonspec = get_pistonspec(node.name, "offname") - local dir = vector.multiply(minetest.facedir_to_dir(node.param2), -1) - local pusher_pos = vector.add(pos, dir) - local owner = minetest.get_meta(pos):get_string("owner") - local success, stack, oldstack = mesecon.mvps_push(pusher_pos, dir, max_push, owner) - if not success then - return - end - minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname}) - minetest.set_node(pusher_pos, {param2 = node.param2, name = pistonspec.pusher}) - minetest.sound_play("piston_extend", { - pos = pos, - max_hear_distance = 20, - gain = 0.3, - }) - mesecon.mvps_process_stack(stack) - mesecon.mvps_move_objects(pusher_pos, dir, oldstack) -end - -local function piston_off(pos, node) - local pistonspec = get_pistonspec(node.name, "onname") - minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.offname}) - piston_remove_pusher(pos, node, not pistonspec.sticky) - - if not pistonspec.sticky then - return - end - local dir = minetest.facedir_to_dir(node.param2) - local pullpos = vector.add(pos, vector.multiply(dir, -2)) - local owner = minetest.get_meta(pos):get_string("owner") - local success, stack, oldstack = mesecon.mvps_pull_single(pullpos, dir, max_pull, owner) - if success then - mesecon.mvps_move_objects(pullpos, vector.multiply(dir, -1), oldstack, -1) - end -end - -local orientations = { - [0] = { 4, 8}, - {13, 17}, - {10, 6}, - {20, 15}, -} - -local function piston_orientate(pos, placer) - if not placer then - return - end - local pitch = math.deg(placer:get_look_vertical()) - local node = minetest.get_node(pos) - if pitch > 55 then - node.param2 = orientations[node.param2][1] - elseif pitch < -55 then - node.param2 = orientations[node.param2][2] - else - return - end - minetest.swap_node(pos, node) - -- minetest.after, because on_placenode for unoriented piston must be processed first - minetest.after(0, mesecon.on_placenode, pos, node) -end - -local rotations = { - {0, 16, 20, 12}, - {2, 14, 22, 18}, - {1, 5, 23, 9}, - {3, 11, 21, 7}, - {4, 13, 10, 19}, - {6, 15, 8, 17}, -} - -local function get_rotation(param2) - for a = 1, #rotations do - for f = 1, #rotations[a] do - if rotations[a][f] == param2 then - return a, f - end - end - end -end - -local function rotate(param2, mode) - local axis, face = get_rotation(param2) - if mode == screwdriver.ROTATE_FACE then - face = face + 1 - if face > 4 then - face = 1 - end - elseif mode == screwdriver.ROTATE_AXIS then - axis = axis + 1 - if axis > 6 then - axis = 1 - end - face = 1 - else - return param2 - end - return rotations[axis][face] -end - -local function piston_rotate(pos, node, _, mode) - node.param2 = rotate(node.param2, mode) - minetest.swap_node(pos, node) - mesecon.execute_autoconnect_hooks_now(pos, node) - return true -end - -local function piston_rotate_on(pos, node, player, mode) - local pistonspec = get_pistonspec(node.name, "onname") - local dir = vector.multiply(minetest.facedir_to_dir(node.param2), -1) - local pusher_pos = vector.add(dir, pos) - local pusher_node = minetest.get_node(pusher_pos) - if pusher_node.name ~= pistonspec.pusher then - return piston_rotate(pos, node, nil, mode) - end - if mode == screwdriver.ROTATE_FACE then - piston_rotate(pusher_pos, pusher_node, nil, mode) - return piston_rotate(pos, node, nil, mode) - elseif mode ~= screwdriver.ROTATE_AXIS then - return false - end - local player_name = player and player:is_player() and player:get_player_name() or "" - local ok, dir_after, pusher_pos_after - for i = 1, 5 do - node.param2 = rotate(node.param2, mode) - dir_after = vector.multiply(minetest.facedir_to_dir(node.param2), -1) - pusher_pos_after = vector.add(dir_after, pos) - local pusher_pos_after_node_name = minetest.get_node(pusher_pos_after).name - local pusher_pos_after_node_def = minetest.registered_nodes[pusher_pos_after_node_name] - if pusher_pos_after_node_def and pusher_pos_after_node_def.buildable_to and - not minetest.is_protected(pusher_pos_after, player_name) then - ok = true - break - end - end - if not ok then - return false - end - pusher_node.param2 = node.param2 - minetest.remove_node(pusher_pos) - minetest.set_node(pusher_pos_after, pusher_node) - minetest.swap_node(pos, node) - mesecon.execute_autoconnect_hooks_now(pos, node) - return true -end - -local function piston_rotate_pusher(pos, node, player, mode) - local pistonspec = get_pistonspec(node.name, "pusher") - local piston_pos = vector.add(pos, minetest.facedir_to_dir(node.param2)) - local piston_node = minetest.get_node(piston_pos) - if piston_node.name ~= pistonspec.onname then - minetest.remove_node(pos) -- Make it possible to remove alone pushers. - return false - end - return piston_rotate_on(piston_pos, piston_node, player, mode) -end - - --- Boxes: - -local pt = 3/16 -- pusher thickness - -local piston_pusher_box = { - type = "fixed", - fixed = { - {-2/16, -2/16, -.5 + pt, 2/16, 2/16, .5 + pt}, - {-.5 , -.5 , -.5 , .5 , .5 , -.5 + pt}, - }, -} - -local piston_on_box = { - type = "fixed", - fixed = { - {-.5, -.5, -.5 + pt, .5, .5, .5} - }, -} - - --- Normal (non-sticky) Pistons: --- offstate -minetest.register_node("mesecons_pistons:piston_normal_off", { - description = "Piston", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_pusher_front.png" - }, - groups = {cracky = 3}, - paramtype2 = "facedir", - is_ground_content = false, - after_place_node = piston_orientate, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_get_rules, - }}, - on_rotate = piston_rotate, - on_blast = mesecon.on_blastnode, - after_place_node = function(pos, placer) - minetest.get_meta(pos):set_string("owner", placer:get_player_name()) - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_normal_on", { - description = "Activated Piston Base", - drawtype = "nodebox", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_on_front.png" - }, - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_normal_off", - after_dig_node = piston_after_dig, - node_box = piston_on_box, - selection_box = piston_on_box, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_get_rules, - }}, - on_rotate = piston_rotate_on, - on_blast = mesecon.on_blastnode, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_pusher_normal", { - description = "Piston Pusher", - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_top.png", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_left.png", - "mesecons_piston_pusher_right.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front.png" - }, - groups = {not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - diggable = false, - selection_box = piston_pusher_box, - node_box = piston_pusher_box, - on_rotate = piston_rotate_pusher, - drop = "", - sounds = default.node_sound_wood_defaults(), -}) - --- Sticky ones --- offstate -minetest.register_node("mesecons_pistons:piston_sticky_off", { - description = "Sticky Piston", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_pusher_front_sticky.png" - }, - groups = {cracky = 3}, - paramtype2 = "facedir", - is_ground_content = false, - after_place_node = piston_orientate, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_on = piston_on, - rules = piston_get_rules, - }}, - on_rotate = piston_rotate, - on_blast = mesecon.on_blastnode, - after_place_node = function(pos, placer) - minetest.get_meta(pos):set_string("owner", placer:get_player_name()) - end, -}) - --- onstate -minetest.register_node("mesecons_pistons:piston_sticky_on", { - description = "Activated Sticky Piston Base", - drawtype = "nodebox", - tiles = { - "mesecons_piston_top.png", - "mesecons_piston_bottom.png", - "mesecons_piston_left.png", - "mesecons_piston_right.png", - "mesecons_piston_back.png", - "mesecons_piston_on_front.png" - }, - groups = {cracky = 3, not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - drop = "mesecons_pistons:piston_sticky_off", - after_dig_node = piston_after_dig, - node_box = piston_on_box, - selection_box = piston_on_box, - sounds = default.node_sound_wood_defaults(), - mesecons = {effector={ - action_off = piston_off, - rules = piston_get_rules, - }}, - on_rotate = piston_rotate_on, - on_blast = mesecon.on_blastnode, -}) - --- pusher -minetest.register_node("mesecons_pistons:piston_pusher_sticky", { - description = "Sticky Piston Pusher", - drawtype = "nodebox", - tiles = { - "mesecons_piston_pusher_top.png", - "mesecons_piston_pusher_bottom.png", - "mesecons_piston_pusher_left.png", - "mesecons_piston_pusher_right.png", - "mesecons_piston_pusher_back.png", - "mesecons_piston_pusher_front_sticky.png" - }, - groups = {not_in_creative_inventory = 1}, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - diggable = false, - selection_box = piston_pusher_box, - node_box = piston_pusher_box, - on_rotate = piston_rotate_pusher, - drop = "", - sounds = default.node_sound_wood_defaults(), -}) - - --- Register pushers as stoppers if they would be seperated from the piston -local function piston_pusher_get_stopper(node, dir, stack, stackid) - if (stack[stackid + 1] - and stack[stackid + 1].node.name == get_pistonspec(node.name, "pusher").onname - and stack[stackid + 1].node.param2 == node.param2) - or (stack[stackid - 1] - and stack[stackid - 1].node.name == get_pistonspec(node.name, "pusher").onname - and stack[stackid - 1].node.param2 == node.param2) then - return false - end - return true -end - -local function piston_pusher_up_down_get_stopper(node, dir, stack, stackid) - if (stack[stackid + 1] - and stack[stackid + 1].node.name == get_pistonspec(node.name, "pusher").onname) - or (stack[stackid - 1] - and stack[stackid - 1].node.name == get_pistonspec(node.name, "pusher").onname) then - return false - end - return true -end - -mesecon.register_mvps_stopper("mesecons_pistons:piston_pusher_normal", piston_pusher_get_stopper) -mesecon.register_mvps_stopper("mesecons_pistons:piston_pusher_sticky", piston_pusher_get_stopper) - - --- Register pistons as stoppers if they would be seperated from the stopper -local piston_up_down_get_stopper = function (node, dir, stack, stackid) - if (stack[stackid + 1] - and stack[stackid + 1].node.name == get_pistonspec(node.name, "onname").pusher) - or (stack[stackid - 1] - and stack[stackid - 1].node.name == get_pistonspec(node.name, "onname").pusher) then - return false - end - return true -end - -local function piston_get_stopper(node, dir, stack, stackid) - local pistonspec = get_pistonspec(node.name, "onname") - local dir = vector.multiply(minetest.facedir_to_dir(node.param2), -1) - local pusherpos = vector.add(stack[stackid].pos, dir) - local pushernode = minetest.get_node(pusherpos) - if pistonspec.pusher == pushernode.name then - for _, s in ipairs(stack) do - if vector.equals(s.pos, pusherpos) -- pusher is also to be pushed - and s.node.param2 == node.param2 then - return false - end - end - end - return true -end - -mesecon.register_mvps_stopper("mesecons_pistons:piston_normal_on", piston_get_stopper) -mesecon.register_mvps_stopper("mesecons_pistons:piston_sticky_on", piston_get_stopper) - - ---craft recipes -minetest.register_craft({ - output = "mesecons_pistons:piston_normal_off 2", - recipe = { - {"group:wood", "group:wood", "group:wood"}, - {"default:cobble", "default:steel_ingot", "default:cobble"}, - {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, - } -}) - -minetest.register_craft({ - output = "mesecons_pistons:piston_sticky_off", - recipe = { - {"mesecons_materials:glue"}, - {"mesecons_pistons:piston_normal_off"}, - } -}) - - --- load legacy code -dofile(minetest.get_modpath("mesecons_pistons")..DIR_DELIM.."legacy.lua") diff --git a/mesecons/mesecons_pistons/legacy.lua b/mesecons/mesecons_pistons/legacy.lua deleted file mode 100644 index 0c6dcb3..0000000 --- a/mesecons/mesecons_pistons/legacy.lua +++ /dev/null @@ -1,48 +0,0 @@ -local ground_dir = { - [0] = {x = 0, y = -1, z = 0}, - {x = 0, y = 0, z = -1}, - {x = 0, y = 0, z = 1}, - {x = -1, y = 0, z = 0}, - {x = 1, y = 0, z = 0}, - {x = 0, y = 1, z = 0}, -} - -minetest.register_lbm({ - label = "Upgrade legacy pistons pointing up", - name = "mesecons_pistons:replace_legacy_piston_up", - nodenames = { - "mesecons_pistons:piston_up_normal_off", - "mesecons_pistons:piston_up_normal_on", - "mesecons_pistons:piston_up_pusher_normal", - "mesecons_pistons:piston_up_sticky_off", - "mesecons_pistons:piston_up_sticky_on", - "mesecons_pistons:piston_up_pusher_sticky", - }, - run_at_every_load = false, - action = function(pos, node) - local dir = ground_dir[math.floor(node.param2/4)] - node.param2 = minetest.dir_to_facedir(dir, true) - node.name = node.name:sub(1, 24)..node.name:sub(28) - minetest.swap_node(pos, node) - end, -}) - -minetest.register_lbm({ - label = "Upgrade legacy pistons pointing down", - name = "mesecons_pistons:replace_legacy_piston_down", - nodenames = { - "mesecons_pistons:piston_down_normal_off", - "mesecons_pistons:piston_down_normal_on", - "mesecons_pistons:piston_down_pusher_normal", - "mesecons_pistons:piston_down_sticky_off", - "mesecons_pistons:piston_down_sticky_on", - "mesecons_pistons:piston_down_pusher_sticky", - }, - run_at_every_load = false, - action = function(pos, node) - local dir = vector.multiply(ground_dir[math.floor(node.param2/4)], -1) - node.param2 = minetest.dir_to_facedir(dir, true) - node.name = node.name:sub(1, 24)..node.name:sub(30) - minetest.swap_node(pos, node) - end, -}) diff --git a/mesecons/mesecons_pistons/sounds/piston_extend.ogg b/mesecons/mesecons_pistons/sounds/piston_extend.ogg deleted file mode 100644 index e234ad9..0000000 Binary files a/mesecons/mesecons_pistons/sounds/piston_extend.ogg and /dev/null differ diff --git a/mesecons/mesecons_pistons/sounds/piston_retract.ogg b/mesecons/mesecons_pistons/sounds/piston_retract.ogg deleted file mode 100644 index feb9f04..0000000 Binary files a/mesecons/mesecons_pistons/sounds/piston_retract.ogg and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_back.png b/mesecons/mesecons_pistons/textures/mesecons_piston_back.png deleted file mode 100644 index 6a57dce..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_back.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_bottom.png b/mesecons/mesecons_pistons/textures/mesecons_piston_bottom.png deleted file mode 100644 index 5a3af9b..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_bottom.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_left.png b/mesecons/mesecons_pistons/textures/mesecons_piston_left.png deleted file mode 100644 index 215dd73..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_left.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_on_front.png b/mesecons/mesecons_pistons/textures/mesecons_piston_on_front.png deleted file mode 100644 index 0ade67e..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_on_front.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_back.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_back.png deleted file mode 100644 index fe87943..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_back.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png deleted file mode 100644 index 87c4e81..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_bottom.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front.png deleted file mode 100644 index 8ec9dc6..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png deleted file mode 100644 index e38b4e6..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_front_sticky.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_left.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_left.png deleted file mode 100644 index bc5495b..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_left.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_right.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_right.png deleted file mode 100644 index 32ee32f..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_right.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_top.png b/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_top.png deleted file mode 100644 index 72f04e9..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_pusher_top.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_right.png b/mesecons/mesecons_pistons/textures/mesecons_piston_right.png deleted file mode 100644 index 176463c..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_right.png and /dev/null differ diff --git a/mesecons/mesecons_pistons/textures/mesecons_piston_top.png b/mesecons/mesecons_pistons/textures/mesecons_piston_top.png deleted file mode 100644 index 5c8bace..0000000 Binary files a/mesecons/mesecons_pistons/textures/mesecons_piston_top.png and /dev/null differ diff --git a/mesecons/mesecons_powerplant/depends.txt b/mesecons/mesecons_powerplant/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_powerplant/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_powerplant/doc/powerplant/description.html b/mesecons/mesecons_powerplant/doc/powerplant/description.html deleted file mode 100644 index 22be496..0000000 --- a/mesecons/mesecons_powerplant/doc/powerplant/description.html +++ /dev/null @@ -1,2 +0,0 @@ -A power plant is a receptor that is always turned on: it provides energy. -It continues to work in an unloaded block. diff --git a/mesecons/mesecons_powerplant/doc/powerplant/preview.png b/mesecons/mesecons_powerplant/doc/powerplant/preview.png deleted file mode 100644 index 473d15c..0000000 Binary files a/mesecons/mesecons_powerplant/doc/powerplant/preview.png and /dev/null differ diff --git a/mesecons/mesecons_powerplant/doc/powerplant/recipe.png b/mesecons/mesecons_powerplant/doc/powerplant/recipe.png deleted file mode 100644 index 04a4002..0000000 Binary files a/mesecons/mesecons_powerplant/doc/powerplant/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_powerplant/init.lua b/mesecons/mesecons_powerplant/init.lua deleted file mode 100644 index 356fb12..0000000 --- a/mesecons/mesecons_powerplant/init.lua +++ /dev/null @@ -1,33 +0,0 @@ --- The POWER_PLANT --- Just emits power. always. - -minetest.register_node("mesecons_powerplant:power_plant", { - drawtype = "plantlike", - visual_scale = 1, - tiles = {"jeija_power_plant.png"}, - inventory_image = "jeija_power_plant.png", - paramtype = "light", - is_ground_content = false, - walkable = false, - groups = {dig_immediate=3, mesecon = 2}, - light_source = minetest.LIGHT_MAX-9, - description="Power Plant", - selection_box = { - type = "fixed", - fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3}, - }, - sounds = default.node_sound_leaves_defaults(), - mesecons = {receptor = { - state = mesecon.state.on - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = "mesecons_powerplant:power_plant 1", - recipe = { - {"group:mesecon_conductor_craftable"}, - {"group:mesecon_conductor_craftable"}, - {"group:sapling"}, - } -}) diff --git a/mesecons/mesecons_powerplant/textures/jeija_power_plant.png b/mesecons/mesecons_powerplant/textures/jeija_power_plant.png deleted file mode 100644 index edc8891..0000000 Binary files a/mesecons/mesecons_powerplant/textures/jeija_power_plant.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/depends.txt b/mesecons/mesecons_pressureplates/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_pressureplates/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_pressureplates/doc/pressureplate_stone/description.html b/mesecons/mesecons_pressureplates/doc/pressureplate_stone/description.html deleted file mode 100644 index 35e3fc0..0000000 --- a/mesecons/mesecons_pressureplates/doc/pressureplate_stone/description.html +++ /dev/null @@ -1 +0,0 @@ -This receptor turns on if there's an object above it. An object can be a player, an item, a mob... diff --git a/mesecons/mesecons_pressureplates/doc/pressureplate_stone/preview.png b/mesecons/mesecons_pressureplates/doc/pressureplate_stone/preview.png deleted file mode 100644 index 235ffc4..0000000 Binary files a/mesecons/mesecons_pressureplates/doc/pressureplate_stone/preview.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/doc/pressureplate_stone/recipe.png b/mesecons/mesecons_pressureplates/doc/pressureplate_stone/recipe.png deleted file mode 100644 index 62acf45..0000000 Binary files a/mesecons/mesecons_pressureplates/doc/pressureplate_stone/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/doc/pressureplate_wood/description.html b/mesecons/mesecons_pressureplates/doc/pressureplate_wood/description.html deleted file mode 100644 index 35e3fc0..0000000 --- a/mesecons/mesecons_pressureplates/doc/pressureplate_wood/description.html +++ /dev/null @@ -1 +0,0 @@ -This receptor turns on if there's an object above it. An object can be a player, an item, a mob... diff --git a/mesecons/mesecons_pressureplates/doc/pressureplate_wood/preview.png b/mesecons/mesecons_pressureplates/doc/pressureplate_wood/preview.png deleted file mode 100644 index 7063cb0..0000000 Binary files a/mesecons/mesecons_pressureplates/doc/pressureplate_wood/preview.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/doc/pressureplate_wood/recipe.png b/mesecons/mesecons_pressureplates/doc/pressureplate_wood/recipe.png deleted file mode 100644 index 429d491..0000000 Binary files a/mesecons/mesecons_pressureplates/doc/pressureplate_wood/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/init.lua b/mesecons/mesecons_pressureplates/init.lua deleted file mode 100644 index 1a503e9..0000000 --- a/mesecons/mesecons_pressureplates/init.lua +++ /dev/null @@ -1,110 +0,0 @@ -local pp_box_off = { - type = "fixed", - fixed = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, -} - -local pp_box_on = { - type = "fixed", - fixed = { -7/16, -8/16, -7/16, 7/16, -7.5/16, 7/16 }, -} - -local function pp_on_timer(pos, elapsed) - local node = minetest.get_node(pos) - local basename = minetest.registered_nodes[node.name].pressureplate_basename - - -- This is a workaround for a strange bug that occurs when the server is started - -- For some reason the first time on_timer is called, the pos is wrong - if not basename then return end - - local objs = minetest.get_objects_inside_radius(pos, 1) - local two_below = vector.add(pos, vector.new(0, -2, 0)) - - if objs[1] == nil and node.name == basename .. "_on" then - minetest.set_node(pos, {name = basename .. "_off"}) - mesecon.receptor_off(pos, mesecon.rules.pplate) - elseif node.name == basename .. "_off" then - for k, obj in pairs(objs) do - local objpos = obj:getpos() - if objpos.y > pos.y-1 and objpos.y < pos.y then - minetest.set_node(pos, {name = basename .. "_on"}) - mesecon.receptor_on(pos, mesecon.rules.pplate ) - end - end - end - return true -end - --- Register a Pressure Plate --- offstate: name of the pressure plate when inactive --- onstate: name of the pressure plate when active --- description: description displayed in the player's inventory --- tiles_off: textures of the pressure plate when inactive --- tiles_on: textures of the pressure plate when active --- image: inventory and wield image of the pressure plate --- recipe: crafting recipe of the pressure plate --- groups: groups --- sounds: sound table - -function mesecon.register_pressure_plate(basename, description, textures_off, textures_on, image_w, image_i, recipe, groups, sounds) - local groups_off, groups_on - if not groups then - groups = {} - end - local groups_off = table.copy(groups) - local groups_on = table.copy(groups) - groups_on.not_in_creative_inventory = 1 - - mesecon.register_node(basename, { - drawtype = "nodebox", - inventory_image = image_i, - wield_image = image_w, - paramtype = "light", - is_ground_content = false, - description = description, - pressureplate_basename = basename, - on_timer = pp_on_timer, - on_construct = function(pos) - minetest.get_node_timer(pos):start(mesecon.setting("pplate_interval", 0.1)) - end, - sounds = sounds, - },{ - mesecons = {receptor = { state = mesecon.state.off, rules = mesecon.rules.pplate }}, - node_box = pp_box_off, - selection_box = pp_box_off, - groups = groups_off, - tiles = textures_off - },{ - mesecons = {receptor = { state = mesecon.state.on, rules = mesecon.rules.pplate }}, - node_box = pp_box_on, - selection_box = pp_box_on, - groups = groups_on, - tiles = textures_on - }) - - minetest.register_craft({ - output = basename .. "_off", - recipe = recipe, - }) -end - -mesecon.register_pressure_plate( - "mesecons_pressureplates:pressure_plate_wood", - "Wooden Pressure Plate", - {"jeija_pressure_plate_wood_off.png","jeija_pressure_plate_wood_off.png","jeija_pressure_plate_wood_off_edges.png"}, - {"jeija_pressure_plate_wood_on.png","jeija_pressure_plate_wood_on.png","jeija_pressure_plate_wood_on_edges.png"}, - "jeija_pressure_plate_wood_wield.png", - "jeija_pressure_plate_wood_inv.png", - {{"group:wood", "group:wood"}}, - { choppy = 3, oddly_breakable_by_hand = 3 }, - default.node_sound_wood_defaults()) - -mesecon.register_pressure_plate( - "mesecons_pressureplates:pressure_plate_stone", - "Stone Pressure Plate", - {"jeija_pressure_plate_stone_off.png","jeija_pressure_plate_stone_off.png","jeija_pressure_plate_stone_off_edges.png"}, - {"jeija_pressure_plate_stone_on.png","jeija_pressure_plate_stone_on.png","jeija_pressure_plate_stone_on_edges.png"}, - "jeija_pressure_plate_stone_wield.png", - "jeija_pressure_plate_stone_inv.png", - {{"default:cobble", "default:cobble"}}, - { cracky = 3, oddly_breakable_by_hand = 3 }, - default.node_sound_stone_defaults()) diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_inv.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_inv.png deleted file mode 100644 index bfe5a1d..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_inv.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off.png deleted file mode 100644 index 46140da..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off_edges.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off_edges.png deleted file mode 100644 index 2ad9acc..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_off_edges.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on.png deleted file mode 100644 index dc64931..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on_edges.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on_edges.png deleted file mode 100644 index 51add95..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_on_edges.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_wield.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_wield.png deleted file mode 100644 index c533567..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_stone_wield.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_inv.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_inv.png deleted file mode 100644 index 36dacd0..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_inv.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off.png deleted file mode 100644 index ca98757..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off_edges.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off_edges.png deleted file mode 100644 index 665ae97..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_off_edges.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on.png deleted file mode 100644 index e1a7d8e..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on_edges.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on_edges.png deleted file mode 100644 index 358f2ea..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_on_edges.png and /dev/null differ diff --git a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_wield.png b/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_wield.png deleted file mode 100644 index 50b321d..0000000 Binary files a/mesecons/mesecons_pressureplates/textures/jeija_pressure_plate_wood_wield.png and /dev/null differ diff --git a/mesecons/mesecons_random/depends.txt b/mesecons/mesecons_random/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_random/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_random/doc/ghoststone/description.html b/mesecons/mesecons_random/doc/ghoststone/description.html deleted file mode 100644 index d54ef63..0000000 --- a/mesecons/mesecons_random/doc/ghoststone/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Ghoststones disappear when powered, just like Removestones. But in contrast to Removestones, they reappear again when not powered anymore and they are also conductive. -They work in inactive blocks. diff --git a/mesecons/mesecons_random/doc/ghoststone/preview.png b/mesecons/mesecons_random/doc/ghoststone/preview.png deleted file mode 100644 index 4ab33fb..0000000 Binary files a/mesecons/mesecons_random/doc/ghoststone/preview.png and /dev/null differ diff --git a/mesecons/mesecons_random/doc/ghoststone/recipe.png b/mesecons/mesecons_random/doc/ghoststone/recipe.png deleted file mode 100644 index 3bd385d..0000000 Binary files a/mesecons/mesecons_random/doc/ghoststone/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_random/doc/removestone/description.html b/mesecons/mesecons_random/doc/removestone/description.html deleted file mode 100644 index ccd3c14..0000000 --- a/mesecons/mesecons_random/doc/removestone/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Removestones are probably the simplest effectors possible. They simply disappear when powered. -They work in inactive blocks. diff --git a/mesecons/mesecons_random/doc/removestone/preview.png b/mesecons/mesecons_random/doc/removestone/preview.png deleted file mode 100644 index 15caf3f..0000000 Binary files a/mesecons/mesecons_random/doc/removestone/preview.png and /dev/null differ diff --git a/mesecons/mesecons_random/doc/removestone/recipe.png b/mesecons/mesecons_random/doc/removestone/recipe.png deleted file mode 100644 index f271963..0000000 Binary files a/mesecons/mesecons_random/doc/removestone/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_random/init.lua b/mesecons/mesecons_random/init.lua deleted file mode 100644 index 0536007..0000000 --- a/mesecons/mesecons_random/init.lua +++ /dev/null @@ -1,78 +0,0 @@ --- REMOVESTONE - -minetest.register_node("mesecons_random:removestone", { - tiles = {"jeija_removestone.png"}, - is_ground_content = false, - inventory_image = minetest.inventorycube("jeija_removestone_inv.png"), - groups = {cracky=3}, - description="Removestone", - sounds = default.node_sound_stone_defaults(), - mesecons = {effector = { - action_on = function (pos, node) - minetest.remove_node(pos) - mesecon.on_dignode(pos, node) - minetest.check_for_falling(vector.add(pos, vector.new(0, 1, 0))) - end - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = 'mesecons_random:removestone 4', - recipe = { - {"", "default:cobble", ""}, - {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, - {"", "default:cobble", ""}, - } -}) - --- GHOSTSTONE - -minetest.register_node("mesecons_random:ghoststone", { - description="Ghoststone", - tiles = {"jeija_ghoststone.png"}, - is_ground_content = false, - inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"), - groups = {cracky=3}, - sounds = default.node_sound_stone_defaults(), - mesecons = {conductor = { - state = mesecon.state.off, - rules = mesecon.rules.alldirs, - onstate = "mesecons_random:ghoststone_active" - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_random:ghoststone_active", { - drawtype = "airlike", - pointable = false, - walkable = false, - diggable = false, - is_ground_content = false, - sunlight_propagates = true, - paramtype = "light", - drop = "mesecons_random:ghoststone", - mesecons = {conductor = { - state = mesecon.state.on, - rules = mesecon.rules.alldirs, - offstate = "mesecons_random:ghoststone" - }}, - on_construct = function(pos) - -- remove shadow - shadowpos = vector.add(pos, vector.new(0, 1, 0)) - if (minetest.get_node(shadowpos).name == "air") then - minetest.dig_node(shadowpos) - end - end, - on_blast = mesecon.on_blastnode, -}) - - -minetest.register_craft({ - output = 'mesecons_random:ghoststone 4', - recipe = { - {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, - {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, - {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, - } -}) diff --git a/mesecons/mesecons_random/textures/jeija_ghoststone.png b/mesecons/mesecons_random/textures/jeija_ghoststone.png deleted file mode 100644 index 1917b7c..0000000 Binary files a/mesecons/mesecons_random/textures/jeija_ghoststone.png and /dev/null differ diff --git a/mesecons/mesecons_random/textures/jeija_ghoststone_inv.png b/mesecons/mesecons_random/textures/jeija_ghoststone_inv.png deleted file mode 100644 index c715d7f..0000000 Binary files a/mesecons/mesecons_random/textures/jeija_ghoststone_inv.png and /dev/null differ diff --git a/mesecons/mesecons_random/textures/jeija_removestone.png b/mesecons/mesecons_random/textures/jeija_removestone.png deleted file mode 100644 index 1917b7c..0000000 Binary files a/mesecons/mesecons_random/textures/jeija_removestone.png and /dev/null differ diff --git a/mesecons/mesecons_random/textures/jeija_removestone_inv.png b/mesecons/mesecons_random/textures/jeija_removestone_inv.png deleted file mode 100644 index c715d7f..0000000 Binary files a/mesecons/mesecons_random/textures/jeija_removestone_inv.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/depends.txt b/mesecons/mesecons_receiver/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_receiver/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_receiver/init.lua b/mesecons/mesecons_receiver/init.lua deleted file mode 100644 index 476131d..0000000 --- a/mesecons/mesecons_receiver/init.lua +++ /dev/null @@ -1,263 +0,0 @@ -local rcvboxes = { - { -3/16, -3/16, -8/16 , 3/16, 3/16 , -13/32 }, -- the smaller bump - { -1/32, -1/32, -3/2 , 1/32, 1/32 , -1/2 }, -- the wire through the block - { -2/32, -1/2 , -.5 , 2/32, 0 , -.5002+3/32 }, -- the vertical wire bit - { -2/32, -1/2 , -7/16+0.002 , 2/32, -14/32, 16/32+0.001 } -- the horizontal wire -} - -local down_rcvboxes = { - {-6/16, -8/16, -6/16, 6/16, -7/16, 6/16}, -- Top plate - {-2/16, -6/16, -2/16, 2/16, -7/16, 2/16}, -- Bump - {-1/16, -8/16, -1/16, 1/16, -24/16, 1/16}, -- Wire through the block - {-1/16, -8/16, 6/16, 1/16, -7/16, 8/16}, -- Plate extension (North) - {-1/16, -8/16, -6/16, 1/16, -7/16, -8/16}, -- Plate extension (South) - {-8/16, -8/16, 1/16, -6/16, -7/16, -1/16}, -- Plate extension (West) - {6/16, -8/16, 1/16, 8/16, -7/16, -1/16}, -- Plate extension (East) -} - -local up_rcvboxes = { - {-6/16, -8/16, -6/16, 6/16, -7/16, 6/16}, -- Top plate - {-2/16, -6/16, -2/16, 2/16, -7/16, 2/16}, -- Bump - {-1/16, -6/16, -1/16, 1/16, 24/16, 1/16}, -- Wire through the block - {-1/16, -8/16, 6/16, 1/16, -7/16, 8/16}, -- Plate extension (North) - {-1/16, -8/16, -6/16, 1/16, -7/16, -8/16}, -- Plate extension (South) - {-8/16, -8/16, 1/16, -6/16, -7/16, -1/16}, -- Plate extension (West) - {6/16, -8/16, 1/16, 8/16, -7/16, -1/16}, -- Plate extension (East) -} - -local receiver_get_rules = function (node) - local rules = { {x = 1, y = 0, z = 0}, - {x = -2, y = 0, z = 0}} - if node.param2 == 2 then - rules = mesecon.rotate_rules_left(rules) - elseif node.param2 == 3 then - rules = mesecon.rotate_rules_right(mesecon.rotate_rules_right(rules)) - elseif node.param2 == 0 then - rules = mesecon.rotate_rules_right(rules) - end - return rules -end - -mesecon.register_node("mesecons_receiver:receiver", { - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - sunlight_propagates = true, - walkable = false, - on_rotate = false, - selection_box = { - type = "fixed", - fixed = { -3/16, -8/16, -8/16, 3/16, 3/16, 8/16 } - }, - node_box = { - type = "fixed", - fixed = rcvboxes - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons:wire_00000000_off", - sounds = default.node_sound_defaults(), -}, { - tiles = { - "receiver_top_off.png", - "receiver_bottom_off.png", - "receiver_lr_off.png", - "receiver_lr_off.png", - "receiver_fb_off.png", - "receiver_fb_off.png", - }, - mesecons = {conductor = { - state = mesecon.state.off, - rules = receiver_get_rules, - onstate = "mesecons_receiver:receiver_on" - }} -}, { - tiles = { - "receiver_top_on.png", - "receiver_bottom_on.png", - "receiver_lr_on.png", - "receiver_lr_on.png", - "receiver_fb_on.png", - "receiver_fb_on.png", - }, - mesecons = {conductor = { - state = mesecon.state.on, - rules = receiver_get_rules, - offstate = "mesecons_receiver:receiver_off" - }} -}) - -mesecon.register_node("mesecons_receiver:receiver_up", { - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - sunlight_propagates = true, - walkable = false, - on_rotate = false, - selection_box = { - type = "fixed", - fixed = up_rcvboxes - }, - node_box = { - type = "fixed", - fixed = up_rcvboxes - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons:wire_00000000_off", - sounds = default.node_sound_defaults(), -}, { - tiles = {"mesecons_wire_off.png"}, - mesecons = {conductor = { - state = mesecon.state.off, - rules = {{x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=0, y=1, z=0}, - {x=0, y=2, z=0}}, - onstate = "mesecons_receiver:receiver_up_on" - }} -}, { - tiles = {"mesecons_wire_on.png"}, - mesecons = {conductor = { - state = mesecon.state.on, - rules = {{x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=0, y=1, z=0}, - {x=0, y=2, z=0}}, - offstate = "mesecons_receiver:receiver_up_off" - }} -}) - -mesecon.register_node("mesecons_receiver:receiver_down", { - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - sunlight_propagates = true, - walkable = false, - on_rotate = false, - selection_box = { - type = "fixed", - fixed = down_rcvboxes - }, - node_box = { - type = "fixed", - fixed = down_rcvboxes - }, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons:wire_00000000_off", - sounds = default.node_sound_defaults(), -}, { - tiles = {"mesecons_wire_off.png"}, - mesecons = {conductor = { - state = mesecon.state.off, - rules = {{x=1,y=0, z=0}, - {x=-1,y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=0, y=-2,z=0}}, - onstate = "mesecons_receiver:receiver_down_on" - }} -}, { - tiles = {"mesecons_wire_on.png"}, - mesecons = {conductor = { - state = mesecon.state.on, - rules = {{x=1,y=0, z=0}, - {x=-1,y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, - {x=0, y=-2,z=0}}, - offstate = "mesecons_receiver:receiver_down_off" - }} -}) - -function mesecon.receiver_get_pos_from_rcpt(pos, param2) - local rules = {{x = 2, y = 0, z = 0}} - if param2 == nil then param2 = minetest.get_node(pos).param2 end - local rcvtype = "mesecons_receiver:receiver_off" - local dir = minetest.facedir_to_dir(param2) - - if dir.x == 1 then - -- No action needed - elseif dir.z == -1 then - rules = mesecon.rotate_rules_left(rules) - elseif dir.x == -1 then - rules = mesecon.rotate_rules_right(mesecon.rotate_rules_right(rules)) - elseif dir.z == 1 then - rules = mesecon.rotate_rules_right(rules) - elseif dir.y == -1 then - rules = mesecon.rotate_rules_up(rules) - rcvtype = "mesecons_receiver:receiver_up_off" - elseif dir.y == 1 then - rules = mesecon.rotate_rules_down(rules) - rcvtype = "mesecons_receiver:receiver_down_off" - end - local np = { x = pos.x + rules[1].x, - y = pos.y + rules[1].y, - z = pos.z + rules[1].z} - return np, rcvtype -end - -function mesecon.receiver_place(rcpt_pos) - local node = minetest.get_node(rcpt_pos) - local pos, rcvtype = mesecon.receiver_get_pos_from_rcpt(rcpt_pos, node.param2) - local nn = minetest.get_node(pos) - local param2 = minetest.dir_to_facedir(minetest.facedir_to_dir(node.param2)) - - if string.find(nn.name, "mesecons:wire_") ~= nil then - minetest.set_node(pos, {name = rcvtype, param2 = param2}) - mesecon.on_placenode(pos, nn) - end -end - -function mesecon.receiver_remove(rcpt_pos, dugnode) - local pos = mesecon.receiver_get_pos_from_rcpt(rcpt_pos, dugnode.param2) - local nn = minetest.get_node(pos) - if string.find(nn.name, "mesecons_receiver:receiver_") ~= nil then - local node = {name = "mesecons:wire_00000000_off"} - minetest.set_node(pos, node) - mesecon.on_placenode(pos, node) - end -end - -minetest.register_on_placenode(function (pos, node) - if minetest.get_item_group(node.name, "mesecon_needs_receiver") == 1 then - mesecon.receiver_place(pos) - end -end) - -minetest.register_on_dignode(function(pos, node) - if minetest.get_item_group(node.name, "mesecon_needs_receiver") == 1 then - mesecon.receiver_remove(pos, node) - end -end) - -minetest.register_on_placenode(function (pos, node) - if string.find(node.name, "mesecons:wire_") ~= nil then - local rules = { {x = 2, y = 0, z = 0}, - {x =-2, y = 0, z = 0}, - {x = 0, y = 0, z = 2}, - {x = 0, y = 0, z =-2}, - {x = 0, y = 2, z = 0}, - {x = 0, y = -2, z = 0}} - local i = 1 - while rules[i] ~= nil do - local np = { x = pos.x + rules[i].x, - y = pos.y + rules[i].y, - z = pos.z + rules[i].z} - if minetest.get_item_group(minetest.get_node(np).name, "mesecon_needs_receiver") == 1 then - mesecon.receiver_place(np) - end - i = i + 1 - end - end -end) - -function mesecon.buttonlike_onrotate(pos, node) - minetest.after(0, mesecon.receiver_remove, pos, node) - minetest.after(0, mesecon.receiver_place, pos) -end diff --git a/mesecons/mesecons_receiver/textures/receiver_bottom_off.png b/mesecons/mesecons_receiver/textures/receiver_bottom_off.png deleted file mode 100644 index b95903e..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_bottom_off.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_bottom_on.png b/mesecons/mesecons_receiver/textures/receiver_bottom_on.png deleted file mode 100644 index d0b7006..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_bottom_on.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_fb_off.png b/mesecons/mesecons_receiver/textures/receiver_fb_off.png deleted file mode 100644 index aed3008..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_fb_off.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_fb_on.png b/mesecons/mesecons_receiver/textures/receiver_fb_on.png deleted file mode 100644 index 0916736..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_fb_on.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_lr_off.png b/mesecons/mesecons_receiver/textures/receiver_lr_off.png deleted file mode 100644 index 1fb2b3a..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_lr_off.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_lr_on.png b/mesecons/mesecons_receiver/textures/receiver_lr_on.png deleted file mode 100644 index 087c0b4..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_lr_on.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_top_off.png b/mesecons/mesecons_receiver/textures/receiver_top_off.png deleted file mode 100644 index ae50106..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_top_off.png and /dev/null differ diff --git a/mesecons/mesecons_receiver/textures/receiver_top_on.png b/mesecons/mesecons_receiver/textures/receiver_top_on.png deleted file mode 100644 index 5b48cac..0000000 Binary files a/mesecons/mesecons_receiver/textures/receiver_top_on.png and /dev/null differ diff --git a/mesecons/mesecons_solarpanel/depends.txt b/mesecons/mesecons_solarpanel/depends.txt deleted file mode 100644 index bc7b062..0000000 --- a/mesecons/mesecons_solarpanel/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_materials diff --git a/mesecons/mesecons_solarpanel/doc/solarpanel/description.html b/mesecons/mesecons_solarpanel/doc/solarpanel/description.html deleted file mode 100644 index 53570ca..0000000 --- a/mesecons/mesecons_solarpanel/doc/solarpanel/description.html +++ /dev/null @@ -1,2 +0,0 @@ -Solar panels are light receptors: they turn on if there is enough light. -They only work in active blocks; in inactive blocks they keep their old state. diff --git a/mesecons/mesecons_solarpanel/doc/solarpanel/preview.png b/mesecons/mesecons_solarpanel/doc/solarpanel/preview.png deleted file mode 100644 index b773195..0000000 Binary files a/mesecons/mesecons_solarpanel/doc/solarpanel/preview.png and /dev/null differ diff --git a/mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png b/mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png deleted file mode 100644 index 3a3d799..0000000 Binary files a/mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_solarpanel/init.lua b/mesecons/mesecons_solarpanel/init.lua deleted file mode 100644 index ccc5882..0000000 --- a/mesecons/mesecons_solarpanel/init.lua +++ /dev/null @@ -1,101 +0,0 @@ --- Solar Panel -minetest.register_node("mesecons_solarpanel:solar_panel_on", { - drawtype = "nodebox", - tiles = { "jeija_solar_panel.png", }, - inventory_image = "jeija_solar_panel.png", - wield_image = "jeija_solar_panel.png", - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - is_ground_content = false, - node_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - selection_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - drop = "mesecons_solarpanel:solar_panel_off", - groups = {dig_immediate=3, not_in_creative_inventory = 1}, - sounds = default.node_sound_glass_defaults(), - mesecons = {receptor = { - state = mesecon.state.on, - rules = mesecon.rules.wallmounted_get, - }}, - on_blast = mesecon.on_blastnode, -}) - --- Solar Panel -minetest.register_node("mesecons_solarpanel:solar_panel_off", { - drawtype = "nodebox", - tiles = { "jeija_solar_panel.png", }, - inventory_image = "jeija_solar_panel.png", - wield_image = "jeija_solar_panel.png", - paramtype = "light", - paramtype2 = "wallmounted", - walkable = false, - is_ground_content = false, - node_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - selection_box = { - type = "wallmounted", - wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, - wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, - wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, - }, - groups = {dig_immediate=3}, - description = "Solar Panel", - sounds = default.node_sound_glass_defaults(), - mesecons = {receptor = { - state = mesecon.state.off, - rules = mesecon.rules.wallmounted_get, - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_craft({ - output = "mesecons_solarpanel:solar_panel_off 1", - recipe = { - {"mesecons_materials:silicon", "mesecons_materials:silicon"}, - {"mesecons_materials:silicon", "mesecons_materials:silicon"}, - } -}) - -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_off"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local light = minetest.get_node_light(pos, nil) - - if light >= 12 then - node.name = "mesecons_solarpanel:solar_panel_on" - minetest.swap_node(pos, node) - mesecon.receptor_on(pos, mesecon.rules.wallmounted_get(node)) - end - end, -}) - -minetest.register_abm( - {nodenames = {"mesecons_solarpanel:solar_panel_on"}, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local light = minetest.get_node_light(pos, nil) - - if light < 12 then - node.name = "mesecons_solarpanel:solar_panel_off" - minetest.swap_node(pos, node) - mesecon.receptor_off(pos, mesecon.rules.wallmounted_get(node)) - end - end, -}) diff --git a/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png b/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png deleted file mode 100644 index a7b0f75..0000000 Binary files a/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png and /dev/null differ diff --git a/mesecons/mesecons_stickyblocks/depends.txt b/mesecons/mesecons_stickyblocks/depends.txt deleted file mode 100644 index 01f085b..0000000 --- a/mesecons/mesecons_stickyblocks/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_mvps diff --git a/mesecons/mesecons_stickyblocks/init.lua b/mesecons/mesecons_stickyblocks/init.lua deleted file mode 100644 index 10bcf54..0000000 --- a/mesecons/mesecons_stickyblocks/init.lua +++ /dev/null @@ -1,28 +0,0 @@ --- Sticky blocks can be used together with pistons or movestones to push / pull --- structures that are "glued" together using sticky blocks - --- All sides sticky block -minetest.register_node("mesecons_stickyblocks:sticky_block_all", { - -- TODO: Rename to “All-Faces Sticky Block” when other sticky blocks become available - description = "Sticky Block", - tiles = {"mesecons_stickyblocks_sticky.png"}, - is_ground_content = false, - groups = {choppy=3, oddly_breakable_by_hand=2}, - mvps_sticky = function (pos, node) - local connected = {} - for _, r in ipairs(mesecon.rules.alldirs) do - table.insert(connected, vector.add(pos, r)) - end - return connected - end, - sounds = default.node_sound_wood_defaults(), -}) - -minetest.register_craft({ - output = "mesecons_stickyblocks:sticky_block_all", - recipe = { - {"mesecons_materials:glue", "mesecons_materials:glue", "mesecons_materials:glue"}, - {"mesecons_materials:glue", "mesecons_materials:glue", "mesecons_materials:glue"}, - {"mesecons_materials:glue", "mesecons_materials:glue", "mesecons_materials:glue"}, - } -}) \ No newline at end of file diff --git a/mesecons/mesecons_stickyblocks/textures/mesecons_stickyblocks_sticky.png b/mesecons/mesecons_stickyblocks/textures/mesecons_stickyblocks_sticky.png deleted file mode 100644 index 3a5f6f1..0000000 Binary files a/mesecons/mesecons_stickyblocks/textures/mesecons_stickyblocks_sticky.png and /dev/null differ diff --git a/mesecons/mesecons_switch/depends.txt b/mesecons/mesecons_switch/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_switch/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_switch/doc/switch/description.html b/mesecons/mesecons_switch/doc/switch/description.html deleted file mode 100644 index 0c8f607..0000000 --- a/mesecons/mesecons_switch/doc/switch/description.html +++ /dev/null @@ -1 +0,0 @@ -The switch is a receptor. It changes its state when punched. diff --git a/mesecons/mesecons_switch/doc/switch/preview.png b/mesecons/mesecons_switch/doc/switch/preview.png deleted file mode 100644 index 0a0487d..0000000 Binary files a/mesecons/mesecons_switch/doc/switch/preview.png and /dev/null differ diff --git a/mesecons/mesecons_switch/doc/switch/recipe.png b/mesecons/mesecons_switch/doc/switch/recipe.png deleted file mode 100644 index 6db6464..0000000 Binary files a/mesecons/mesecons_switch/doc/switch/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_switch/init.lua b/mesecons/mesecons_switch/init.lua deleted file mode 100644 index 7f42253..0000000 --- a/mesecons/mesecons_switch/init.lua +++ /dev/null @@ -1,36 +0,0 @@ --- mesecons_switch - -mesecon.register_node("mesecons_switch:mesecon_switch", { - paramtype2="facedir", - description="Switch", - is_ground_content = false, - sounds = default.node_sound_stone_defaults(), - on_rightclick = function (pos, node) - if(mesecon.flipstate(pos, node) == "on") then - mesecon.receptor_on(pos) - else - mesecon.receptor_off(pos) - end - minetest.sound_play("mesecons_switch", {pos=pos}) - end -},{ - groups = {dig_immediate=2}, - tiles = { "mesecons_switch_side.png", "mesecons_switch_side.png", - "mesecons_switch_side.png", "mesecons_switch_side.png", - "mesecons_switch_side.png", "mesecons_switch_off.png"}, - mesecons = {receptor = { state = mesecon.state.off }} -},{ - groups = {dig_immediate=2, not_in_creative_inventory=1}, - tiles = { "mesecons_switch_side.png", "mesecons_switch_side.png", - "mesecons_switch_side.png", "mesecons_switch_side.png", - "mesecons_switch_side.png", "mesecons_switch_on.png"}, - mesecons = {receptor = { state = mesecon.state.on }} -}) - -minetest.register_craft({ - output = "mesecons_switch:mesecon_switch_off 2", - recipe = { - {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, - {"group:mesecon_conductor_craftable","", "group:mesecon_conductor_craftable"}, - } -}) diff --git a/mesecons/mesecons_switch/sounds/mesecons_switch.ogg b/mesecons/mesecons_switch/sounds/mesecons_switch.ogg deleted file mode 100644 index 53d45c1..0000000 Binary files a/mesecons/mesecons_switch/sounds/mesecons_switch.ogg and /dev/null differ diff --git a/mesecons/mesecons_switch/textures/mesecons_switch_off.png b/mesecons/mesecons_switch/textures/mesecons_switch_off.png deleted file mode 100644 index 2a75ef3..0000000 Binary files a/mesecons/mesecons_switch/textures/mesecons_switch_off.png and /dev/null differ diff --git a/mesecons/mesecons_switch/textures/mesecons_switch_on.png b/mesecons/mesecons_switch/textures/mesecons_switch_on.png deleted file mode 100644 index 9df3450..0000000 Binary files a/mesecons/mesecons_switch/textures/mesecons_switch_on.png and /dev/null differ diff --git a/mesecons/mesecons_switch/textures/mesecons_switch_side.png b/mesecons/mesecons_switch/textures/mesecons_switch_side.png deleted file mode 100644 index fb5db33..0000000 Binary files a/mesecons/mesecons_switch/textures/mesecons_switch_side.png and /dev/null differ diff --git a/mesecons/mesecons_torch/depends.txt b/mesecons/mesecons_torch/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_torch/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_torch/doc/torch/description.html b/mesecons/mesecons_torch/doc/torch/description.html deleted file mode 100644 index 60a6713..0000000 --- a/mesecons/mesecons_torch/doc/torch/description.html +++ /dev/null @@ -1,2 +0,0 @@ -The torch is an inverter, it may take up to 1 second until the signal has passed through. The input is 2 blocks away in the direction of the stick, outputs are around the mesecon glow. -It doesn't work in an inactive block; it just retains its state until the block becomes active. diff --git a/mesecons/mesecons_torch/doc/torch/preview.png b/mesecons/mesecons_torch/doc/torch/preview.png deleted file mode 100644 index fa32543..0000000 Binary files a/mesecons/mesecons_torch/doc/torch/preview.png and /dev/null differ diff --git a/mesecons/mesecons_torch/doc/torch/recipe.png b/mesecons/mesecons_torch/doc/torch/recipe.png deleted file mode 100644 index 529d99f..0000000 Binary files a/mesecons/mesecons_torch/doc/torch/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_torch/init.lua b/mesecons/mesecons_torch/init.lua deleted file mode 100644 index 867c909..0000000 --- a/mesecons/mesecons_torch/init.lua +++ /dev/null @@ -1,124 +0,0 @@ ---MESECON TORCHES - -local rotate_torch_rules = function (rules, param2) - if param2 == 5 then - return mesecon.rotate_rules_right(rules) - elseif param2 == 2 then - return mesecon.rotate_rules_right(mesecon.rotate_rules_right(rules)) --180 degrees - elseif param2 == 4 then - return mesecon.rotate_rules_left(rules) - elseif param2 == 1 then - return mesecon.rotate_rules_down(rules) - elseif param2 == 0 then - return mesecon.rotate_rules_up(rules) - else - return rules - end -end - -local torch_get_output_rules = function(node) - local rules = { - {x = 1, y = 0, z = 0}, - {x = 0, y = 0, z = 1}, - {x = 0, y = 0, z =-1}, - {x = 0, y = 1, z = 0}, - {x = 0, y =-1, z = 0}} - - return rotate_torch_rules(rules, node.param2) -end - -local torch_get_input_rules = function(node) - local rules = {{x = -2, y = 0, z = 0}, - {x = -1, y = 1, z = 0}} - - return rotate_torch_rules(rules, node.param2) -end - -minetest.register_craft({ - output = "mesecons_torch:mesecon_torch_on 4", - recipe = { - {"group:mesecon_conductor_craftable"}, - {"default:stick"},} -}) - -local torch_selectionbox = -{ - type = "wallmounted", - wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1}, - wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1}, - wall_side = {-0.5, -0.1, -0.1, -0.5+0.6, 0.1, 0.1}, -} - -minetest.register_node("mesecons_torch:mesecon_torch_off", { - drawtype = "torchlike", - tiles = {"jeija_torches_off.png", "jeija_torches_off_ceiling.png", "jeija_torches_off_side.png"}, - inventory_image = "jeija_torches_off.png", - paramtype = "light", - is_ground_content = false, - walkable = false, - paramtype2 = "wallmounted", - selection_box = torch_selectionbox, - groups = {dig_immediate = 3, not_in_creative_inventory = 1}, - drop = "mesecons_torch:mesecon_torch_on", - sounds = default.node_sound_defaults(), - mesecons = {receptor = { - state = mesecon.state.off, - rules = torch_get_output_rules - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_node("mesecons_torch:mesecon_torch_on", { - drawtype = "torchlike", - tiles = {"jeija_torches_on.png", "jeija_torches_on_ceiling.png", "jeija_torches_on_side.png"}, - inventory_image = "jeija_torches_on.png", - wield_image = "jeija_torches_on.png", - paramtype = "light", - is_ground_content = false, - sunlight_propagates = true, - walkable = false, - paramtype2 = "wallmounted", - selection_box = torch_selectionbox, - groups = {dig_immediate=3}, - light_source = minetest.LIGHT_MAX-5, - description="Mesecon Torch", - sounds = default.node_sound_defaults(), - mesecons = {receptor = { - state = mesecon.state.on, - rules = torch_get_output_rules - }}, - on_blast = mesecon.on_blastnode, -}) - -minetest.register_abm({ - nodenames = {"mesecons_torch:mesecon_torch_off","mesecons_torch:mesecon_torch_on"}, - interval = 1, - chance = 1, - action = function(pos, node) - local is_powered = false - for _, rule in ipairs(torch_get_input_rules(node)) do - local src = vector.add(pos, rule) - if mesecon.is_power_on(src) then - is_powered = true - end - end - - if is_powered then - if node.name == "mesecons_torch:mesecon_torch_on" then - minetest.swap_node(pos, {name = "mesecons_torch:mesecon_torch_off", param2 = node.param2}) - mesecon.receptor_off(pos, torch_get_output_rules(node)) - end - elseif node.name == "mesecons_torch:mesecon_torch_off" then - minetest.swap_node(pos, {name = "mesecons_torch:mesecon_torch_on", param2 = node.param2}) - mesecon.receptor_on(pos, torch_get_output_rules(node)) - end - end -}) - --- Param2 Table (Block Attached To) --- 5 = z-1 --- 3 = x-1 --- 4 = z+1 --- 2 = x+1 --- 0 = y+1 --- 1 = y-1 diff --git a/mesecons/mesecons_torch/textures/jeija_torches_off.png b/mesecons/mesecons_torch/textures/jeija_torches_off.png deleted file mode 100644 index 537920c..0000000 Binary files a/mesecons/mesecons_torch/textures/jeija_torches_off.png and /dev/null differ diff --git a/mesecons/mesecons_torch/textures/jeija_torches_off_ceiling.png b/mesecons/mesecons_torch/textures/jeija_torches_off_ceiling.png deleted file mode 100644 index 3934e6e..0000000 Binary files a/mesecons/mesecons_torch/textures/jeija_torches_off_ceiling.png and /dev/null differ diff --git a/mesecons/mesecons_torch/textures/jeija_torches_off_side.png b/mesecons/mesecons_torch/textures/jeija_torches_off_side.png deleted file mode 100644 index ecb2951..0000000 Binary files a/mesecons/mesecons_torch/textures/jeija_torches_off_side.png and /dev/null differ diff --git a/mesecons/mesecons_torch/textures/jeija_torches_on.png b/mesecons/mesecons_torch/textures/jeija_torches_on.png deleted file mode 100644 index a93dcc2..0000000 Binary files a/mesecons/mesecons_torch/textures/jeija_torches_on.png and /dev/null differ diff --git a/mesecons/mesecons_torch/textures/jeija_torches_on_ceiling.png b/mesecons/mesecons_torch/textures/jeija_torches_on_ceiling.png deleted file mode 100644 index 24fe201..0000000 Binary files a/mesecons/mesecons_torch/textures/jeija_torches_on_ceiling.png and /dev/null differ diff --git a/mesecons/mesecons_torch/textures/jeija_torches_on_side.png b/mesecons/mesecons_torch/textures/jeija_torches_on_side.png deleted file mode 100644 index fe7dfd2..0000000 Binary files a/mesecons/mesecons_torch/textures/jeija_torches_on_side.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/depends.txt b/mesecons/mesecons_walllever/depends.txt deleted file mode 100644 index 19c798c..0000000 --- a/mesecons/mesecons_walllever/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons -mesecons_receiver diff --git a/mesecons/mesecons_walllever/doc/walllever/description.html b/mesecons/mesecons_walllever/doc/walllever/description.html deleted file mode 100644 index ea5a0ed..0000000 --- a/mesecons/mesecons_walllever/doc/walllever/description.html +++ /dev/null @@ -1 +0,0 @@ -A receptor just like a switch, but it can be attached to walls. diff --git a/mesecons/mesecons_walllever/doc/walllever/preview.png b/mesecons/mesecons_walllever/doc/walllever/preview.png deleted file mode 100644 index e8d2015..0000000 Binary files a/mesecons/mesecons_walllever/doc/walllever/preview.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/doc/walllever/recipe.png b/mesecons/mesecons_walllever/doc/walllever/recipe.png deleted file mode 100644 index 0ad7c92..0000000 Binary files a/mesecons/mesecons_walllever/doc/walllever/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/init.lua b/mesecons/mesecons_walllever/init.lua deleted file mode 100644 index 1dc08f0..0000000 --- a/mesecons/mesecons_walllever/init.lua +++ /dev/null @@ -1,64 +0,0 @@ --- WALL LEVER --- Basically a switch that can be attached to a wall --- Powers the block 2 nodes behind (using a receiver) -mesecon.register_node("mesecons_walllever:wall_lever", { - description="Lever", - drawtype = "mesh", - inventory_image = "jeija_wall_lever_inv.png", - wield_image = "jeija_wall_lever_inv.png", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "fixed", - fixed = { -8/16, -8/16, 3/16, 8/16, 8/16, 8/16 }, - }, - sounds = default.node_sound_wood_defaults(), - on_rightclick = function (pos, node) - if(mesecon.flipstate(pos, node) == "on") then - mesecon.receptor_on(pos, mesecon.rules.buttonlike_get(node)) - else - mesecon.receptor_off(pos, mesecon.rules.buttonlike_get(node)) - end - minetest.sound_play("mesecons_lever", {pos=pos}) - end -},{ - tiles = { - "jeija_wall_lever_lever_light_off.png", - "jeija_wall_lever_front.png", - "jeija_wall_lever_front_bump.png", - "jeija_wall_lever_back_edges.png" - }, - mesh="jeija_wall_lever_off.obj", - on_rotate = mesecon.buttonlike_onrotate, - mesecons = {receptor = { - rules = mesecon.rules.buttonlike_get, - state = mesecon.state.off - }}, - groups = {dig_immediate = 2, mesecon_needs_receiver = 1} -},{ - tiles = { - "jeija_wall_lever_lever_light_on.png", - "jeija_wall_lever_front.png", - "jeija_wall_lever_front_bump.png", - "jeija_wall_lever_back_edges.png" - }, - mesh="jeija_wall_lever_on.obj", - on_rotate = false, - mesecons = {receptor = { - rules = mesecon.rules.buttonlike_get, - state = mesecon.state.on - }}, - groups = {dig_immediate = 2, mesecon_needs_receiver = 1, not_in_creative_inventory = 1} -}) - -minetest.register_craft({ - output = "mesecons_walllever:wall_lever_off 2", - recipe = { - {"group:mesecon_conductor_craftable"}, - {"default:stone"}, - {"default:stick"}, - } -}) diff --git a/mesecons/mesecons_walllever/models/jeija_wall_lever_off.obj b/mesecons/mesecons_walllever/models/jeija_wall_lever_off.obj deleted file mode 100644 index 334b54b..0000000 --- a/mesecons/mesecons_walllever/models/jeija_wall_lever_off.obj +++ /dev/null @@ -1,216 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'mesecons-wall-lever-off.blend' -# www.blender.org -o nodebox-5 -v 0.281250 0.156250 0.312500 -v -0.375000 0.375000 0.375000 -v -0.375000 -0.375000 0.375000 -v 0.343751 0.218750 0.375000 -v 0.343751 -0.218752 0.375000 -v 0.375000 0.375000 0.375000 -v 0.375000 -0.375000 0.375000 -v 0.281250 -0.156250 0.312500 -v -0.062500 -0.055586 0.191789 -v -0.062500 -0.087939 0.312529 -v -0.062500 -0.413939 0.225178 -v -0.062500 -0.381586 0.104437 -v -0.343751 0.218750 0.375000 -v 0.062500 -0.055586 0.191789 -v 0.062500 -0.087939 0.312529 -v -0.343751 -0.218752 0.375000 -v 0.062500 -0.413939 0.225178 -v 0.062500 -0.381586 0.104437 -v 0.375000 -0.375000 0.500000 -v 0.375000 0.375000 0.500000 -v -0.375000 -0.375000 0.500000 -v -0.375000 0.375000 0.500000 -v -0.281250 0.156250 0.312500 -v -0.281250 -0.156250 0.312500 -v -0.250000 0.125000 0.312500 -v -0.250000 -0.125000 0.312500 -v 0.250000 0.125000 0.312500 -v 0.250000 -0.125000 0.312500 -v -0.250000 0.125000 0.250000 -v -0.250000 -0.125000 0.250000 -v 0.250000 0.125000 0.250000 -v 0.250000 -0.125000 0.250000 -v 0.125000 -0.062500 0.187500 -v 0.125000 0.062500 0.187500 -v -0.125000 -0.062500 0.187500 -v -0.125000 0.062500 0.187500 -v 0.062500 -0.031251 0.176992 -v 0.062500 0.031250 0.176992 -v -0.062498 -0.031251 0.176992 -v -0.062498 0.031250 0.176992 -v -0.187500 -0.093750 0.208750 -v 0.187500 0.093750 0.208750 -v 0.187500 -0.093750 0.208750 -v -0.187500 0.093750 0.208750 -v -0.375000 0.375000 0.375000 -v -0.375000 -0.375000 0.375000 -v 0.375000 0.375000 0.375000 -v 0.375000 -0.375000 0.375000 -v 0.375000 -0.375000 0.500000 -v 0.375000 0.375000 0.500000 -v -0.375000 -0.375000 0.500000 -v -0.375000 0.375000 0.500000 -vt 0.312500 0.437500 -vt 0.312500 0.000000 -vt 0.437500 0.000000 -vt 0.437500 0.437500 -vt 0.687500 0.187500 -vt 0.812500 0.187500 -vt 0.812500 0.312500 -vt 0.687500 0.312500 -vt 0.187500 0.437500 -vt 0.062500 0.437500 -vt 0.062500 0.000000 -vt 0.187500 0.000000 -vt 0.875000 0.796875 -vt 0.375000 0.796875 -vt 0.343750 0.765625 -vt 0.906250 0.765625 -vt 0.203125 0.875000 -vt 0.203125 0.625000 -vt 0.234375 0.593750 -vt 0.234375 0.906250 -vt 0.875000 0.890625 -vt 0.906250 0.921875 -vt 0.343750 0.921875 -vt 0.375000 0.890625 -vt 0.109375 0.875000 -vt 0.078125 0.906250 -vt 0.078125 0.593750 -vt 0.109375 0.625000 -vt 0.562500 0.437500 -vt 0.562500 0.000000 -vt 0.218880 0.343823 -vt 0.218880 0.656178 -vt 0.156408 0.718649 -vt 0.156408 0.281350 -vt 0.968592 0.718649 -vt 0.968592 0.281350 -vt 0.999827 0.125174 -vt 0.999827 0.874827 -vt 0.781120 0.656178 -vt 0.843592 0.718649 -vt 0.843592 0.281350 -vt 0.781120 0.343823 -vt 0.843592 0.156350 -vt 0.156408 0.156350 -vt 0.125173 0.000174 -vt 0.874827 0.000174 -vt 0.031408 0.718649 -vt 0.000173 0.874827 -vt 0.000173 0.125174 -vt 0.031408 0.281350 -vt 0.843592 0.843649 -vt 0.874827 0.999827 -vt 0.125173 0.999827 -vt 0.156408 0.843649 -vt 0.250000 0.625000 -vt 0.750000 0.625000 -vt 0.750000 0.687500 -vt 0.250000 0.687500 -vt 0.250000 0.375000 -vt 0.250000 0.312500 -vt 0.750000 0.312500 -vt 0.750000 0.375000 -vt 0.812500 0.375000 -vt 0.812500 0.625000 -vt 0.187500 0.625000 -vt 0.187500 0.375000 -vt 0.625000 0.562500 -vt 0.562500 0.531250 -vt 0.562500 0.468750 -vt 0.625000 0.437500 -vt 0.437500 0.468750 -vt 0.437500 0.531250 -vt 0.375000 0.437500 -vt 0.375000 0.562500 -vt 0.312500 0.406250 -vt 0.687500 0.406250 -vt 0.312500 0.593750 -vt 0.687500 0.593750 -vt 1.000000 0.000000 -vt 1.000000 0.875000 -vt 0.125000 0.875000 -vt 0.125000 0.000000 -vt 0.000000 0.875000 -vt 0.000000 0.000000 -vt 1.000000 1.000000 -vt 0.125000 1.000000 -vn 0.000000 -0.258800 0.965900 -vn 0.000000 -0.965900 -0.258800 -vn 0.000000 0.258800 -0.965900 -vn 0.000000 0.000000 -1.000000 -vn -1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.707100 0.000000 -0.707100 -vn 0.000000 0.707100 -0.707100 -vn 0.000000 -0.707100 -0.707100 -vn -0.707100 0.000000 -0.707100 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.141100 0.273900 -0.951300 -vn -0.054600 0.137500 -0.989000 -vn -0.054600 -0.137500 -0.989000 -vn -0.141100 -0.273900 -0.951300 -vn 0.054600 -0.137500 -0.989000 -vn 0.054600 0.137500 -0.989000 -vn 0.141100 -0.273900 -0.951300 -vn 0.141100 0.273900 -0.951300 -vn 0.269900 -0.421500 -0.865700 -vn -0.269900 -0.421500 -0.865700 -vn 0.269900 0.421500 -0.865700 -vn -0.269900 0.421500 -0.865700 -vn -0.395600 0.336800 -0.854500 -vn 0.395600 0.336800 -0.854500 -vn 0.395600 -0.336800 -0.854500 -vn -0.395600 -0.336800 -0.854500 -vn 0.000000 -0.000000 1.000000 -g nodebox-5_nodebox-5_lever-light -s off -f 17/1/1 15/2/1 10/3/1 11/4/1 -f 18/5/2 17/6/2 11/7/2 12/8/2 -f 18/9/3 12/10/3 9/11/3 14/12/3 -f 26/13/4 28/14/4 8/15/4 24/16/4 -f 25/17/4 26/18/4 24/19/4 23/20/4 -f 25/21/4 23/22/4 1/23/4 27/24/4 -f 27/25/4 1/26/4 8/27/4 28/28/4 -f 12/29/5 11/4/5 10/3/5 9/30/5 -f 18/9/6 14/12/6 15/2/6 17/1/6 -g nodebox-5_nodebox-5_front -f 8/31/7 1/32/7 4/33/7 5/34/7 -f 13/35/4 16/36/4 3/37/4 2/38/4 -f 1/32/8 23/39/8 13/40/8 4/33/8 -f 8/31/9 5/34/9 16/41/9 24/42/9 -f 24/42/10 16/41/10 13/40/10 23/39/10 -f 16/43/4 5/44/4 7/45/4 3/46/4 -f 4/47/4 6/48/4 7/49/4 5/50/4 -f 13/51/4 2/52/4 6/53/4 4/54/4 -g nodebox-5_nodebox-5_front-bump -f 31/55/11 29/56/11 25/57/11 27/58/11 -f 32/59/12 28/60/12 26/61/12 30/62/12 -f 30/62/5 26/63/5 25/64/5 29/56/5 -f 32/59/6 31/55/6 27/65/6 28/66/6 -s 1 -f 36/67/13 40/68/14 39/69/15 35/70/16 -f 37/71/17 39/69/15 40/68/14 38/72/18 -f 35/70/16 39/69/15 37/71/17 33/73/19 -f 33/73/19 37/71/17 38/72/18 34/74/20 -f 34/74/20 38/72/18 40/68/14 36/67/13 -f 33/73/19 43/75/21 41/76/22 35/70/16 -f 33/73/19 34/74/20 42/77/23 43/75/21 -f 35/70/16 41/76/22 44/78/24 36/67/13 -f 42/77/23 44/78/24 29/56/25 31/55/26 -f 43/75/21 32/59/27 30/62/28 41/76/22 -f 43/75/21 42/77/23 31/55/26 32/59/27 -f 41/76/22 30/62/28 29/56/25 44/78/24 -f 34/74/20 36/67/13 44/78/24 42/77/23 -g nodebox-5_nodebox-5_back-edges -s off -f 19/79/29 20/80/29 22/81/29 21/82/29 -f 7/82/6 6/81/6 20/83/6 19/84/6 -f 3/82/5 21/84/5 22/83/5 2/81/5 -f 48/85/12 49/80/12 51/81/12 46/86/12 -f 47/85/11 45/86/11 52/81/11 50/80/11 diff --git a/mesecons/mesecons_walllever/models/jeija_wall_lever_on.obj b/mesecons/mesecons_walllever/models/jeija_wall_lever_on.obj deleted file mode 100644 index a806be8..0000000 --- a/mesecons/mesecons_walllever/models/jeija_wall_lever_on.obj +++ /dev/null @@ -1,216 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'mesecons-wall-lever.blend' -# www.blender.org -o nodebox-5 -v 0.281250 0.156250 0.312500 -v -0.375000 0.375000 0.375000 -v -0.375000 -0.375000 0.375000 -v 0.343751 0.218750 0.375000 -v 0.343751 -0.218752 0.375000 -v 0.375000 0.375000 0.375000 -v 0.375000 -0.375000 0.375000 -v 0.281250 -0.156250 0.312500 -v -0.062500 0.075354 0.315617 -v -0.062500 0.043002 0.194876 -v -0.062500 0.369002 0.107525 -v -0.062500 0.401354 0.228266 -v -0.343751 0.218750 0.375000 -v 0.062500 0.075354 0.315617 -v 0.062500 0.043002 0.194876 -v -0.343751 -0.218752 0.375000 -v 0.062500 0.369002 0.107525 -v 0.062500 0.401354 0.228266 -v 0.375000 -0.375000 0.500000 -v 0.375000 0.375000 0.500000 -v -0.375000 -0.375000 0.500000 -v -0.375000 0.375000 0.500000 -v -0.281250 0.156250 0.312500 -v -0.281250 -0.156250 0.312500 -v -0.250000 0.125000 0.312500 -v -0.250000 -0.125000 0.312500 -v 0.250000 0.125000 0.312500 -v 0.250000 -0.125000 0.312500 -v -0.250000 0.125000 0.250000 -v -0.250000 -0.125000 0.250000 -v 0.250000 0.125000 0.250000 -v 0.250000 -0.125000 0.250000 -v 0.125000 -0.062500 0.187500 -v 0.125000 0.062500 0.187500 -v -0.125000 -0.062500 0.187500 -v -0.125000 0.062500 0.187500 -v 0.062500 -0.031251 0.176992 -v 0.062500 0.031250 0.176992 -v -0.062498 -0.031251 0.176992 -v -0.062498 0.031250 0.176992 -v -0.187500 -0.093750 0.208750 -v 0.187500 0.093750 0.208750 -v 0.187500 -0.093750 0.208750 -v -0.187500 0.093750 0.208750 -v -0.375000 0.375000 0.375000 -v -0.375000 -0.375000 0.375000 -v 0.375000 0.375000 0.375000 -v 0.375000 -0.375000 0.375000 -v 0.375000 -0.375000 0.500000 -v 0.375000 0.375000 0.500000 -v -0.375000 -0.375000 0.500000 -v -0.375000 0.375000 0.500000 -vt 0.312500 0.437500 -vt 0.312500 0.000000 -vt 0.437500 0.000000 -vt 0.437500 0.437500 -vt 0.687500 0.187500 -vt 0.812500 0.187500 -vt 0.812500 0.312500 -vt 0.687500 0.312500 -vt 0.187500 0.437500 -vt 0.062500 0.437500 -vt 0.062500 0.000000 -vt 0.187500 0.000000 -vt 0.875000 0.796875 -vt 0.375000 0.796875 -vt 0.343750 0.765625 -vt 0.906250 0.765625 -vt 0.203125 0.875000 -vt 0.203125 0.625000 -vt 0.234375 0.593750 -vt 0.234375 0.906250 -vt 0.875000 0.890625 -vt 0.906250 0.921875 -vt 0.343750 0.921875 -vt 0.375000 0.890625 -vt 0.109375 0.875000 -vt 0.078125 0.906250 -vt 0.078125 0.593750 -vt 0.109375 0.625000 -vt 0.562500 0.437500 -vt 0.562500 0.000000 -vt 0.218880 0.343823 -vt 0.218880 0.656178 -vt 0.156408 0.718649 -vt 0.156408 0.281350 -vt 0.968592 0.718649 -vt 0.968592 0.281350 -vt 0.999827 0.125174 -vt 0.999827 0.874827 -vt 0.781120 0.656178 -vt 0.843592 0.718649 -vt 0.843592 0.281350 -vt 0.781120 0.343823 -vt 0.843592 0.156350 -vt 0.156408 0.156350 -vt 0.125173 0.000174 -vt 0.874827 0.000174 -vt 0.031408 0.718649 -vt 0.000173 0.874827 -vt 0.000173 0.125174 -vt 0.031408 0.281350 -vt 0.843592 0.843649 -vt 0.874827 0.999827 -vt 0.125173 0.999827 -vt 0.156408 0.843649 -vt 0.250000 0.625000 -vt 0.750000 0.625000 -vt 0.750000 0.687500 -vt 0.250000 0.687500 -vt 0.250000 0.375000 -vt 0.250000 0.312500 -vt 0.750000 0.312500 -vt 0.750000 0.375000 -vt 0.812500 0.375000 -vt 0.812500 0.625000 -vt 0.187500 0.625000 -vt 0.187500 0.375000 -vt 0.625000 0.562500 -vt 0.562500 0.531250 -vt 0.562500 0.468750 -vt 0.625000 0.437500 -vt 0.437500 0.468750 -vt 0.437500 0.531250 -vt 0.375000 0.437500 -vt 0.375000 0.562500 -vt 0.312500 0.406250 -vt 0.687500 0.406250 -vt 0.312500 0.593750 -vt 0.687500 0.593750 -vt 1.000000 0.000000 -vt 1.000000 0.875000 -vt 0.125000 0.875000 -vt 0.125000 0.000000 -vt 0.000000 0.875000 -vt 0.000000 0.000000 -vt 1.000000 1.000000 -vt 0.125000 1.000000 -vn 0.000000 -0.258800 -0.965900 -vn 0.000000 0.965900 -0.258800 -vn 0.000000 0.258800 0.965900 -vn 0.000000 0.000000 -1.000000 -vn -1.000000 0.000000 0.000000 -vn 1.000000 0.000000 0.000000 -vn 0.707100 0.000000 -0.707100 -vn 0.000000 0.707100 -0.707100 -vn 0.000000 -0.707100 -0.707100 -vn -0.707100 0.000000 -0.707100 -vn 0.000000 1.000000 0.000000 -vn 0.000000 -1.000000 0.000000 -vn -0.141100 0.273900 -0.951300 -vn -0.054600 0.137500 -0.989000 -vn -0.054600 -0.137500 -0.989000 -vn -0.141100 -0.273900 -0.951300 -vn 0.054600 -0.137500 -0.989000 -vn 0.054600 0.137500 -0.989000 -vn 0.141100 -0.273900 -0.951300 -vn 0.141100 0.273900 -0.951300 -vn 0.269900 -0.421500 -0.865700 -vn -0.269900 -0.421500 -0.865700 -vn 0.269900 0.421500 -0.865700 -vn -0.269900 0.421500 -0.865700 -vn -0.395600 0.336800 -0.854500 -vn 0.395600 0.336800 -0.854500 -vn 0.395600 -0.336800 -0.854500 -vn -0.395600 -0.336800 -0.854500 -vn 0.000000 -0.000000 1.000000 -g nodebox-5_nodebox-5_lever-light -s off -f 17/1/1 15/2/1 10/3/1 11/4/1 -f 18/5/2 17/6/2 11/7/2 12/8/2 -f 18/9/3 12/10/3 9/11/3 14/12/3 -f 26/13/4 28/14/4 8/15/4 24/16/4 -f 25/17/4 26/18/4 24/19/4 23/20/4 -f 25/21/4 23/22/4 1/23/4 27/24/4 -f 27/25/4 1/26/4 8/27/4 28/28/4 -f 12/29/5 11/4/5 10/3/5 9/30/5 -f 18/9/6 14/12/6 15/2/6 17/1/6 -g nodebox-5_nodebox-5_front -f 8/31/7 1/32/7 4/33/7 5/34/7 -f 13/35/4 16/36/4 3/37/4 2/38/4 -f 1/32/8 23/39/8 13/40/8 4/33/8 -f 8/31/9 5/34/9 16/41/9 24/42/9 -f 24/42/10 16/41/10 13/40/10 23/39/10 -f 16/43/4 5/44/4 7/45/4 3/46/4 -f 4/47/4 6/48/4 7/49/4 5/50/4 -f 13/51/4 2/52/4 6/53/4 4/54/4 -g nodebox-5_nodebox-5_front-bump -f 31/55/11 29/56/11 25/57/11 27/58/11 -f 32/59/12 28/60/12 26/61/12 30/62/12 -f 30/62/5 26/63/5 25/64/5 29/56/5 -f 32/59/6 31/55/6 27/65/6 28/66/6 -s 1 -f 36/67/13 40/68/14 39/69/15 35/70/16 -f 37/71/17 39/69/15 40/68/14 38/72/18 -f 35/70/16 39/69/15 37/71/17 33/73/19 -f 33/73/19 37/71/17 38/72/18 34/74/20 -f 34/74/20 38/72/18 40/68/14 36/67/13 -f 33/73/19 43/75/21 41/76/22 35/70/16 -f 33/73/19 34/74/20 42/77/23 43/75/21 -f 35/70/16 41/76/22 44/78/24 36/67/13 -f 42/77/23 44/78/24 29/56/25 31/55/26 -f 43/75/21 32/59/27 30/62/28 41/76/22 -f 43/75/21 42/77/23 31/55/26 32/59/27 -f 41/76/22 30/62/28 29/56/25 44/78/24 -f 34/74/20 36/67/13 44/78/24 42/77/23 -g nodebox-5_nodebox-5_back-edges -s off -f 19/79/29 20/80/29 22/81/29 21/82/29 -f 7/82/6 6/81/6 20/83/6 19/84/6 -f 3/82/5 21/84/5 22/83/5 2/81/5 -f 48/85/12 49/80/12 51/81/12 46/86/12 -f 47/85/11 45/86/11 52/81/11 50/80/11 diff --git a/mesecons/mesecons_walllever/sounds/mesecons_lever.ogg b/mesecons/mesecons_walllever/sounds/mesecons_lever.ogg deleted file mode 100644 index 53d45c1..0000000 Binary files a/mesecons/mesecons_walllever/sounds/mesecons_lever.ogg and /dev/null differ diff --git a/mesecons/mesecons_walllever/textures/jeija_wall_lever_back_edges.png b/mesecons/mesecons_walllever/textures/jeija_wall_lever_back_edges.png deleted file mode 100644 index 936b454..0000000 Binary files a/mesecons/mesecons_walllever/textures/jeija_wall_lever_back_edges.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/textures/jeija_wall_lever_front.png b/mesecons/mesecons_walllever/textures/jeija_wall_lever_front.png deleted file mode 100644 index 1bd747a..0000000 Binary files a/mesecons/mesecons_walllever/textures/jeija_wall_lever_front.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/textures/jeija_wall_lever_front_bump.png b/mesecons/mesecons_walllever/textures/jeija_wall_lever_front_bump.png deleted file mode 100644 index 5c2a88a..0000000 Binary files a/mesecons/mesecons_walllever/textures/jeija_wall_lever_front_bump.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/textures/jeija_wall_lever_inv.png b/mesecons/mesecons_walllever/textures/jeija_wall_lever_inv.png deleted file mode 100644 index 474f8c1..0000000 Binary files a/mesecons/mesecons_walllever/textures/jeija_wall_lever_inv.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_off.png b/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_off.png deleted file mode 100644 index 2b47c7d..0000000 Binary files a/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_off.png and /dev/null differ diff --git a/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_on.png b/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_on.png deleted file mode 100644 index 83b83a0..0000000 Binary files a/mesecons/mesecons_walllever/textures/jeija_wall_lever_lever_light_on.png and /dev/null differ diff --git a/mesecons/mesecons_wires/depends.txt b/mesecons/mesecons_wires/depends.txt deleted file mode 100644 index acaa924..0000000 --- a/mesecons/mesecons_wires/depends.txt +++ /dev/null @@ -1 +0,0 @@ -mesecons diff --git a/mesecons/mesecons_wires/doc/mesecon/description.html b/mesecons/mesecons_wires/doc/mesecon/description.html deleted file mode 100644 index b20606b..0000000 --- a/mesecons/mesecons_wires/doc/mesecon/description.html +++ /dev/null @@ -1 +0,0 @@ -Mesecons are the wires, use them to connect effectors with receptors. Wiring works through unloaded blocks; they’re loaded when the signal level changes. diff --git a/mesecons/mesecons_wires/doc/mesecon/preview.png b/mesecons/mesecons_wires/doc/mesecon/preview.png deleted file mode 100755 index f81e5cb..0000000 Binary files a/mesecons/mesecons_wires/doc/mesecon/preview.png and /dev/null differ diff --git a/mesecons/mesecons_wires/doc/mesecon/recipe.png b/mesecons/mesecons_wires/doc/mesecon/recipe.png deleted file mode 100644 index 72f9210..0000000 Binary files a/mesecons/mesecons_wires/doc/mesecon/recipe.png and /dev/null differ diff --git a/mesecons/mesecons_wires/init.lua b/mesecons/mesecons_wires/init.lua deleted file mode 100644 index 3ca9cbc..0000000 --- a/mesecons/mesecons_wires/init.lua +++ /dev/null @@ -1,250 +0,0 @@ --- naming scheme: wire:(xp)(zp)(xm)(zm)(xpyp)(zpyp)(xmyp)(zmyp)_on/off --- where x= x direction, z= z direction, y= y direction, p = +1, m = -1, e.g. xpym = {x=1, y=-1, z=0} --- The (xp)/(zpyp)/.. statements shall be replaced by either 0 or 1 --- Where 0 means the wire has no visual connection to that direction and --- 1 means that the wire visually connects to that other node. - --- ####################### --- ## Update wire looks ## --- ####################### - --- self_pos = pos of any mesecon node, from_pos = pos of conductor to getconnect for -local wire_getconnect = function (from_pos, self_pos) - local node = minetest.get_node(self_pos) - if minetest.registered_nodes[node.name] - and minetest.registered_nodes[node.name].mesecons then - -- rules of node to possibly connect to - local rules = {} - if (minetest.registered_nodes[node.name].mesecon_wire) then - rules = mesecon.rules.default - else - rules = mesecon.get_any_rules(node) - end - - for _, r in ipairs(mesecon.flattenrules(rules)) do - if (vector.equals(vector.add(self_pos, r), from_pos)) then - return true - end - end - end - return false -end - --- Update this node -local wire_updateconnect = function (pos) - local connections = {} - - for _, r in ipairs(mesecon.rules.default) do - if wire_getconnect(pos, vector.add(pos, r)) then - table.insert(connections, r) - end - end - - local nid = {} - for _, vec in ipairs(connections) do - -- flat component - if vec.x == 1 then nid[0] = "1" end - if vec.z == 1 then nid[1] = "1" end - if vec.x == -1 then nid[2] = "1" end - if vec.z == -1 then nid[3] = "1" end - - -- slopy component - if vec.y == 1 then - if vec.x == 1 then nid[4] = "1" end - if vec.z == 1 then nid[5] = "1" end - if vec.x == -1 then nid[6] = "1" end - if vec.z == -1 then nid[7] = "1" end - end - end - - local nodeid = (nid[0] or "0")..(nid[1] or "0")..(nid[2] or "0")..(nid[3] or "0") - ..(nid[4] or "0")..(nid[5] or "0")..(nid[6] or "0")..(nid[7] or "0") - - local state_suffix = string.find(minetest.get_node(pos).name, "_off") and "_off" or "_on" - minetest.set_node(pos, {name = "mesecons:wire_"..nodeid..state_suffix}) -end - -local update_on_place_dig = function (pos, node) - -- Update placed node (get_node again as it may have been dug) - local nn = minetest.get_node(pos) - if (minetest.registered_nodes[nn.name]) - and (minetest.registered_nodes[nn.name].mesecon_wire) then - wire_updateconnect(pos) - end - - -- Update nodes around it - local rules = {} - if minetest.registered_nodes[node.name] - and minetest.registered_nodes[node.name].mesecon_wire then - rules = mesecon.rules.default - else - rules = mesecon.get_any_rules(node) - end - if (not rules) then return end - - for _, r in ipairs(mesecon.flattenrules(rules)) do - local np = vector.add(pos, r) - if minetest.registered_nodes[minetest.get_node(np).name] - and minetest.registered_nodes[minetest.get_node(np).name].mesecon_wire then - wire_updateconnect(np) - end - end -end - -mesecon.register_autoconnect_hook("wire", update_on_place_dig) - --- ############################ --- ## Wire node registration ## --- ############################ --- Nodeboxes: -local box_center = {-1/16, -.5, -1/16, 1/16, -.5+1/16, 1/16} -local box_bump1 = { -2/16, -8/16, -2/16, 2/16, -13/32, 2/16 } - -local nbox_nid = -{ - [0] = {1/16, -.5, -1/16, 8/16, -.5+1/16, 1/16}, -- x positive - [1] = {-1/16, -.5, 1/16, 1/16, -.5+1/16, 8/16}, -- z positive - [2] = {-8/16, -.5, -1/16, -1/16, -.5+1/16, 1/16}, -- x negative - [3] = {-1/16, -.5, -8/16, 1/16, -.5+1/16, -1/16}, -- z negative - - [4] = {.5-1/16, -.5+1/16, -1/16, .5, .4999+1/16, 1/16}, -- x positive up - [5] = {-1/16, -.5+1/16, .5-1/16, 1/16, .4999+1/16, .5}, -- z positive up - [6] = {-.5, -.5+1/16, -1/16, -.5+1/16, .4999+1/16, 1/16}, -- x negative up - [7] = {-1/16, -.5+1/16, -.5, 1/16, .4999+1/16, -.5+1/16} -- z negative up -} - -local tiles_off = { "mesecons_wire_off.png" } -local tiles_on = { "mesecons_wire_on.png" } - -local selectionbox = -{ - type = "fixed", - fixed = {-.5, -.5, -.5, .5, -.5+4/16, .5} -} - --- go to the next nodeid (ex.: 01000011 --> 01000100) -local nid_inc = function() end -nid_inc = function (nid) - local i = 0 - while nid[i-1] ~= 1 do - nid[i] = (nid[i] ~= 1) and 1 or 0 - i = i + 1 - end - - -- BUT: Skip impossible nodeids: - if ((nid[0] == 0 and nid[4] == 1) or (nid[1] == 0 and nid[5] == 1) - or (nid[2] == 0 and nid[6] == 1) or (nid[3] == 0 and nid[7] == 1)) then - return nid_inc(nid) - end - - return i <= 8 -end - -local function register_wires() - local nid = {} - while true do - -- Create group specifiction and nodeid string (see note above for details) - local nodeid = (nid[0] or "0")..(nid[1] or "0")..(nid[2] or "0")..(nid[3] or "0") - ..(nid[4] or "0")..(nid[5] or "0")..(nid[6] or "0")..(nid[7] or "0") - - -- Calculate nodebox - local nodebox = {type = "fixed", fixed={box_center}} - for i=0,7 do - if nid[i] == 1 then - table.insert(nodebox.fixed, nbox_nid[i]) - end - end - - -- Add bump to nodebox if curved - if (nid[0] == 1 and nid[1] == 1) or (nid[1] == 1 and nid[2] == 1) - or (nid[2] == 1 and nid[3] == 1) or (nid[3] == 1 and nid[0] == 1) then - table.insert(nodebox.fixed, box_bump1) - end - - -- If nothing to connect to, still make a nodebox of a straight wire - if nodeid == "00000000" then - nodebox.fixed = {-8/16, -.5, -1/16, 8/16, -.5+1/16, 1/16} - end - - local rules = {} - if (nid[0] == 1) then table.insert(rules, vector.new( 1, 0, 0)) end - if (nid[1] == 1) then table.insert(rules, vector.new( 0, 0, 1)) end - if (nid[2] == 1) then table.insert(rules, vector.new(-1, 0, 0)) end - if (nid[3] == 1) then table.insert(rules, vector.new( 0, 0, -1)) end - - if (nid[0] == 1) then table.insert(rules, vector.new( 1, -1, 0)) end - if (nid[1] == 1) then table.insert(rules, vector.new( 0, -1, 1)) end - if (nid[2] == 1) then table.insert(rules, vector.new(-1, -1, 0)) end - if (nid[3] == 1) then table.insert(rules, vector.new( 0, -1, -1)) end - - if (nid[4] == 1) then table.insert(rules, vector.new( 1, 1, 0)) end - if (nid[5] == 1) then table.insert(rules, vector.new( 0, 1, 1)) end - if (nid[6] == 1) then table.insert(rules, vector.new(-1, 1, 0)) end - if (nid[7] == 1) then table.insert(rules, vector.new( 0, 1, -1)) end - - local meseconspec_off = { conductor = { - rules = rules, - state = mesecon.state.off, - onstate = "mesecons:wire_"..nodeid.."_on" - }} - - local meseconspec_on = { conductor = { - rules = rules, - state = mesecon.state.on, - offstate = "mesecons:wire_"..nodeid.."_off" - }} - - local groups_on = {dig_immediate = 3, mesecon_conductor_craftable = 1, - not_in_creative_inventory = 1} - local groups_off = {dig_immediate = 3, mesecon_conductor_craftable = 1} - if nodeid ~= "00000000" then - groups_off["not_in_creative_inventory"] = 1 - end - - mesecon.register_node(":mesecons:wire_"..nodeid, { - description = "Mesecon", - drawtype = "nodebox", - inventory_image = "mesecons_wire_inv.png", - wield_image = "mesecons_wire_inv.png", - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = false, - sunlight_propagates = true, - selection_box = selectionbox, - node_box = nodebox, - walkable = false, - drop = "mesecons:wire_00000000_off", - mesecon_wire = true, - sounds = default.node_sound_defaults(), - on_rotate = false, - }, {tiles = tiles_off, mesecons = meseconspec_off, groups = groups_off}, - {tiles = tiles_on, mesecons = meseconspec_on, groups = groups_on}) - - if (nid_inc(nid) == false) then return end - end -end -register_wires() - --- ############## --- ## Crafting ## --- ############## -minetest.register_craft({ - type = "cooking", - output = "mesecons:wire_00000000_off 2", - recipe = "default:mese_crystal_fragment", - cooktime = 3, -}) - -minetest.register_craft({ - type = "cooking", - output = "mesecons:wire_00000000_off 18", - recipe = "default:mese_crystal", - cooktime = 15, -}) - -minetest.register_craft({ - type = "cooking", - output = "mesecons:wire_00000000_off 162", - recipe = "default:mese", - cooktime = 30, -}) diff --git a/mesecons/modpack.txt b/mesecons/modpack.txt deleted file mode 100644 index 33d91f5..0000000 --- a/mesecons/modpack.txt +++ /dev/null @@ -1 +0,0 @@ -The presence of this file indicates that the current folder is a modpack. \ No newline at end of file diff --git a/mesecons/screenshot.png b/mesecons/screenshot.png deleted file mode 100644 index 6f1bae5..0000000 Binary files a/mesecons/screenshot.png and /dev/null differ diff --git a/mesecons/settingtypes.txt b/mesecons/settingtypes.txt deleted file mode 100644 index 9259a83..0000000 --- a/mesecons/settingtypes.txt +++ /dev/null @@ -1,47 +0,0 @@ -[mesecons] - -mesecon.resumetime (Startup delay) int 4 1 10 -mesecon.overheat_max (Device heat limit) int 20 1 100 -mesecon.cooldown_time (Device cooldown time) float 2.0 0.1 10.0 -mesecon.cooldown_granularity (Cooldown step length) float 0.5 0.0 1.0 - - -[mesecons_blinkyplant] - -mesecon.blinky_plant_interval (Plant blinking interval) int 3 1 5 - - -[mesecons_detector] - -mesecon.detector_radius (Player detector scanning radius) int 6 3 16 -mesecon.node_detector_distance_max (Node detector distance limit) int 10 1 16 - - -[mesecons_luacontroller] - -mesecon.luacontroller_string_rep_max (string:rep result length limit) int 64000 1000 1000000 -mesecon.luacontroller_digiline_maxlen (Digiline message size limit) int 50000 1000 1000000 -mesecon.luacontroller_maxevents (Controller execution time limit) int 10000 1000 100000 -mesecon.luacontroller_memsize (Controller memory limit) int 100000 10000 1000000 - -# Use node timer for interrupts (runs in active blocks only). -# IID is ignored and at most one interrupt may be queued if this setting is enabled. -mesecon.luacontroller_lightweight_interrupts (Lightweight interrupts) bool false - - -[mesecons_movestones] - -mesecon.movestone_speed (Speed) int 3 1 10 -mesecon.movestone_max_push (Max push) int 50 1 100 -mesecon.movestone_max_pull (Max pull) int 50 1 100 - - -[mesecons_pistons] - -mesecon.piston_max_push (Max push) int 15 1 100 -mesecon.piston_max_pull (Max pull) int 15 1 100 - - -[mesecons_pressureplates] - -mesecon.pplate_interval (Check interval) float 0.1 0.1 1.0 diff --git a/nixie_tubes/LICENSE b/nixie_tubes/LICENSE deleted file mode 100644 index c5885ae..0000000 --- a/nixie_tubes/LICENSE +++ /dev/null @@ -1,600 +0,0 @@ -License for code: LGPL 3.0 -License for media and all other assets: CC-by-SA 4.0 - -############################################################################### - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - -############################################################################### - -Attribution-ShareAlike 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution-ShareAlike 4.0 International Public -License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution-ShareAlike 4.0 International Public License ("Public -License"). To the extent this Public License may be interpreted as a -contract, You are granted the Licensed Rights in consideration of Your -acceptance of these terms and conditions, and the Licensor grants You -such rights in consideration of benefits the Licensor receives from -making the Licensed Material available under these terms and -conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. BY-SA Compatible License means a license listed at - creativecommons.org/compatiblelicenses, approved by Creative - Commons as essentially the equivalent of this Public License. - - d. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - e. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - f. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - g. License Elements means the license attributes listed in the name - of a Creative Commons Public License. The License Elements of this - Public License are Attribution and ShareAlike. - - h. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - i. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - j. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - k. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - l. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - m. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. Additional offer from the Licensor -- Adapted Material. - Every recipient of Adapted Material from You - automatically receives an offer from the Licensor to - exercise the Licensed Rights in the Adapted Material - under the conditions of the Adapter's License You apply. - - c. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - b. ShareAlike. - - In addition to the conditions in Section 3(a), if You Share - Adapted Material You produce, the following conditions also apply. - - 1. The Adapter's License You apply must be a Creative Commons - license with the same License Elements, this version or - later, or a BY-SA Compatible License. - - 2. You must include the text of, or the URI or hyperlink to, the - Adapter's License You apply. You may satisfy this condition - in any reasonable manner based on the medium, means, and - context in which You Share Adapted Material. - - 3. You may not offer or impose any additional or different terms - or conditions on, or apply any Effective Technological - Measures to, Adapted Material that restrict exercise of the - rights granted under the Adapter's License You apply. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material, - - including for purposes of Section 3(b); and - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public -licenses. Notwithstanding, Creative Commons may elect to apply one of -its public licenses to material it publishes and in those instances -will be considered the “Licensor.” The text of the Creative Commons -public licenses is dedicated to the public domain under the CC0 Public -Domain Dedication. Except for the limited purpose of indicating that -material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the -public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/nixie_tubes/README.md b/nixie_tubes/README.md deleted file mode 100644 index 34a0a10..0000000 --- a/nixie_tubes/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# nixie_tubes mod - -*by Vanessa Dannenberg* - -This mod provides a set of classic Nixie tubes, and a set of alphanumeric 15-segment tubes similar to Burroughs B-7971, controlled by Mesecons' Digilines mod. - -Simply place a tube, right-click it, and set a channel. - -Then send a character, or one of several control words to that channel from a Mesecons Lua Controller and the mod will try to display it. - -The classic tubes are numeric with colon and period symbols, and hence will respond to the literal numbers 0-9, and the words "colon", "period", and "off". Any other symbol or string is ignored. - -The alphanumeric tubes respond to singular characters from the standard 7-bit ASCII character set, or entire strings composed of such. - -A single character will be displayed on the connected tube. A decimal value as a numeric message (i.e. not a string) will display the first digit on the connected tube. - -Strings will be displayed to all alphanumeric tubes in a lineup, so long as they all face the same way, starting from the tube the Lua Controller is connected to, going left to right. The other tubes in the line do not need to be connected to anything - think of them as being connected together internally. Only the tube at the far left need be connected to the Lua Controller. - -The string will spread until either a tube is found that faces the wrong way, or has a channel that's not empty/nil and is set to something other than what the first is set to, or if a node is encountered that is not an alpha-numeric tube at all. - -Tubes to the left of the connected one are ignored in the case of strings. - -You can put multiple lines of tubes end to end to form independent displays, so long as the tubes that start each of the lines have unique channel names set. - -The string is padded with spaces and then trimmed to 64 characters. - -Any unrecognized symbol or character outside the ASCII 32 - 128 range, or characters 31 and 144, whether part of a string or singularly is ignored. - -The alphanumeric tubes also respond to these control messages: - -* "off", "colon" and "period" act the same as on the numeric tubes. Note that neither a colon nor a period actually look all that great on a 15-segment - display, so use a classic tube for those, if you can. -* "del" or character code 127 displays an all-on square, but without segment #15 (the bottom, chevron-shaped one). -* "allon" or character code 144 will display an all-on square, with segment #15 lit also. -* "cursor" or character code 31 will display just segment 15. -* "off_multi" turns all tubes in a lineup off -* "allon_multi" turns on all segments of all tubes in a lineup. - -You can use "get" and "getstr" to read the one character from the first, connected tube. These messages will not read the other tubes in the lineup. - -This mod also provides Decatron tubes, which respond to 0-9 and "off", just as with the classic numeric tubes, along with the following actions: - -* "inc" will increment the tube's current number value. If the value overflows from 9 back to 0, the tube will generate a "carry" message. -* "dec" will decrement the current value. If the value wraps from 0 back to 9, the tube will send out a "borrow" message. -* "get" will query the current state of the tube, responding with a single digit 0-9 or the word "off". - -All tubes emit a small amount of light when displaying something. - -Nixies can only be mounted on the floor, while Decatrons can be mounted on a wall (or a ceiling if so desired). - -A Decatron has a small grey spot on its internal insulator to mark the "0" position. diff --git a/nixie_tubes/depends.txt b/nixie_tubes/depends.txt deleted file mode 100644 index 2cec86e..0000000 --- a/nixie_tubes/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -digilines diff --git a/nixie_tubes/description.txt b/nixie_tubes/description.txt deleted file mode 100644 index e93f904..0000000 --- a/nixie_tubes/description.txt +++ /dev/null @@ -1 +0,0 @@ -This mod provides a set of classic Nixie tubes, and a set of alphanumeric 15-segment tubes similar to Burroughs B-7971, controlled by Mesecons' Digilines mod. diff --git a/nixie_tubes/init.lua b/nixie_tubes/init.lua deleted file mode 100644 index 436b73a..0000000 --- a/nixie_tubes/init.lua +++ /dev/null @@ -1,517 +0,0 @@ --- simple nixie tubes mod --- by Vanessa Ezekowitz - -nixie_tubes = {} - -local S -if minetest.get_modpath("intllib") then - S = intllib.Getter() -else - S = function(s) return s end -end - -local nixie_types = { - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "0", - "colon", - "period", - "off" -} - -local tube_cbox = { - type = "fixed", - fixed = { -11/32, -8/16, -11/32, 11/32, 8/16, 11/32 } -} - --- the following functions based on the so-named ones in Jeija's digilines mod - -local reset_meta = function(pos) - minetest.get_meta(pos):set_string("formspec", "field[channel;Channel;${channel}]") -end - -local on_digiline_receive_std = function(pos, node, channel, msg) - local meta = minetest.get_meta(pos) - local setchan = meta:get_string("channel") - if setchan ~= channel then return end - local num = tonumber(msg) - if msg == "colon" or msg == "period" or msg == "off" or (num and (num >= 0 and num <= 9)) then - if string.sub(node.name,1,21) == "nixie_tubes:numitron_" then - minetest.swap_node(pos, { name = "nixie_tubes:numitron_"..msg, param2 = node.param2}) - else - minetest.swap_node(pos, { name = "nixie_tubes:tube_"..msg, param2 = node.param2}) - end - end -end - -local on_digiline_receive_deca = function(pos, node, channel, msg) - - local meta = minetest.get_meta(pos) - local setchan = meta:get_string("channel") - if setchan ~= channel then return end - local tubenum = string.gsub(node.name, "nixie_tubes:decatron_", "") - local num = tonumber(msg) - - if msg == "off" or (num and (num >= 0 and num <= 9)) then - minetest.swap_node(pos, { name = "nixie_tubes:decatron_"..msg, param2 = node.param2}) - - elseif msg == "inc" then - num = (tonumber(tubenum) or 0) + 1 - if num > 9 then - num = 0 - digiline:receptor_send(pos, digiline.rules.default, channel, "carry") - end - minetest.swap_node(pos, { name = "nixie_tubes:decatron_"..num, param2 = node.param2}) - - elseif msg == "dec" then - num = (tonumber(tubenum) or 0) - 1 - if num < 0 then - num = 9 - digiline:receptor_send(pos, digiline.rules.default, channel, "borrow") - end - minetest.swap_node(pos, { name = "nixie_tubes:decatron_"..num, param2 = node.param2}) - - elseif msg == "get" then - digiline:receptor_send(pos, digiline.rules.default, channel, tubenum) - - end -end - --- the nodes: - -for _,tube in ipairs(nixie_types) do - local groups = { cracky = 2, not_in_creative_inventory = 1} - local light = LIGHT_MAX-4 - local light2 = LIGHT_MAX-5 - local description = S("Nixie Tube ("..tube..")") - local description2 = S("Decatron ("..tube..")") - local cathode = "nixie_tube_cathode_off.png^nixie_tube_cathode_"..tube..".png" - local cathode2 = "decatron_cathode_"..tube..".png" - local cathode3 = "numitron_filaments.png^numitron_"..tube..".png" - - if tube == "off" then - groups = {cracky = 2} - light = nil - light2 = nil - description = S("Nixie Tube") - description2 = S("Decatron") - description3 = S("Numitron Tube") - cathode = "nixie_tube_cathode_off.png" - cathode2 = "nixie_tube_blank.png" - cathode3 = "numitron_filaments.png" - end - - minetest.register_node("nixie_tubes:tube_"..tube, { - description = description, - drawtype = "mesh", - mesh = "nixie_tube.obj", - tiles = { - "nixie_tube_base.png", - "nixie_tube_backing.png", - cathode, - "nixie_tube_anode.png", - "nixie_tube_glass.png", - }, - use_texture_alpha = true, - groups = groups, - paramtype = "light", - paramtype2 = "facedir", - light_source = light, - selection_box = tube_cbox, - collision_box = tube_cbox, - on_construct = function(pos) - reset_meta(pos) - end, - on_receive_fields = function(pos, formname, fields, sender) - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, - digiline = { - receptor = {}, - effector = { - action = on_digiline_receive_std - }, - }, - drop = "nixie_tubes:tube_off" - }) - - minetest.register_node("nixie_tubes:numitron_"..tube, { - description = description3, - drawtype = "mesh", - mesh = "nixie_tube.obj", - tiles = { - "nixie_tube_base.png", - "nixie_tube_backing.png", - cathode3, - "nixie_tube_anode.png", - "nixie_tube_glass.png", - }, - use_texture_alpha = true, - groups = groups, - paramtype = "light", - paramtype2 = "facedir", - light_source = light, - selection_box = tube_cbox, - collision_box = tube_cbox, - on_construct = function(pos) - reset_meta(pos) - end, - on_receive_fields = function(pos, formname, fields, sender) - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, - digiline = { - receptor = {}, - effector = { - action = on_digiline_receive_std - }, - }, - drop = "nixie_tubes:numitron_off" - }) - - if tube ~= "colon" and tube ~= "period" then - minetest.register_node("nixie_tubes:decatron_"..tube, { - description = description2, - drawtype = "mesh", - mesh = "decatron.obj", - tiles = { - "nixie_tube_base.png", - "decatron_internals.png", - "decatron_anode.png", - "decatron_cathode_pins.png", - cathode2, - "nixie_tube_glass.png", - }, - use_texture_alpha = true, - groups = groups, - paramtype = "light", - paramtype2 = "facedir", - light_source = light2, - selection_box = tube_cbox, - collision_box = tube_cbox, - after_place_node = function(pos, placer, itemstack, pointed_thing) - minetest.set_node(pos, { name = "air"}) - minetest.rotate_node(itemstack, placer, pointed_thing) - if minetest.get_node(pos).param2 == 12 then - minetest.set_node(pos, { name = "nixie_tubes:decatron_off", param2 = 15 }) - end - end, - on_construct = function(pos) - reset_meta(pos) - end, - on_receive_fields = function(pos, formname, fields, sender) - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, - digiline = { - receptor = {}, - effector = { - action = on_digiline_receive_deca - }, - }, - drop = "nixie_tubes:decatron_off" - }) - end -end - --- Alpha-numeric tubes (Burroughs B-7971 or similar) - ---[[ - -Map of display wires: - - --1------ - |\ |8 /| - 6| \ | / |2 - | 7\ | /9 | - | \|/ | -14--> ---- ---- <--10 - | /|\ | - |13/ | \11| - 5| / | \ |3 - |/ 12| \| - ------4-- - _ - --¯¯ ¯¯-- <--15 - --- Wire positions in table: --- char = { 1, 2, 3, 4, .... , 13, 14, 15 } - -]]-- - -local alnum_chars = { - { string.char(31), { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } }, -- "cursor" segment - { " ", { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } }, -- 32 - { "!", { 0,0,0,0,1,1,0,0,0,0,0,0,0,0,0 } }, - { '"', { 0,0,0,0,0,1,0,1,0,0,0,0,0,0,0 } }, - { "#", { 0,1,1,1,0,0,0,1,0,1,0,1,0,1,0 } }, - { "$", { 1,0,1,1,0,1,0,1,0,1,0,1,0,1,0 } }, - { "%", { 0,0,1,0,0,1,0,0,1,0,0,0,1,0,0 } }, - { "&", { 1,0,0,1,1,0,1,0,1,0,1,0,0,1,0 } }, - { "'", { 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 } }, - { "(", { 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0 } }, - { ")", { 0,0,0,0,0,0,1,0,0,0,0,0,1,0,0 } }, - { "*", { 0,0,0,0,0,0,1,1,1,1,1,1,1,1,0 } }, - { "+", { 0,0,0,0,0,0,0,1,0,1,0,1,0,1,0 } }, - { ",", { 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0 } }, - { "-", { 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0 } }, - { ".", { 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 } }, - { "/", { 0,0,0,0,0,0,0,0,1,0,0,0,1,0,0 } }, - { "0", { 1,1,1,1,1,1,0,0,1,0,0,0,1,0,0 } }, -- 48 - { "1", { 0,1,1,0,0,0,0,0,1,0,0,0,0,0,0 } }, - { "2", { 1,1,0,1,0,0,0,0,0,1,0,0,1,0,0 } }, - { "3", { 1,1,1,1,0,0,0,0,0,1,0,0,0,0,0 } }, - { "4", { 0,1,1,0,0,1,0,0,0,1,0,0,0,1,0 } }, - { "5", { 1,0,1,1,0,1,0,0,0,1,0,0,0,1,0 } }, - { "6", { 1,0,1,1,1,1,0,0,0,1,0,0,0,1,0 } }, - { "7", { 1,0,0,0,0,0,0,0,1,0,0,1,0,0,0 } }, - { "8", { 1,1,1,1,1,1,0,0,0,1,0,0,0,1,0 } }, - { "9", { 1,1,1,0,0,1,0,0,0,1,0,0,0,1,0 } }, - { ":", { 0,0,0,0,0,0,0,1,0,0,0,1,0,0,0 } }, -- 58 - { ";", { 0,0,0,0,0,0,0,1,0,0,0,0,1,0,0 } }, - { "<", { 0,0,0,0,0,0,0,0,1,0,1,0,0,1,0 } }, - { "=", { 0,0,0,1,0,0,0,0,0,1,0,0,0,1,0 } }, - { ">", { 0,0,0,0,0,0,1,0,0,1,0,0,1,0,0 } }, - { "?", { 1,1,0,0,0,0,0,0,0,1,0,1,0,0,0 } }, - { "@", { 1,1,0,1,1,1,0,1,0,1,0,0,0,0,0 } }, -- 64 - { "A", { 1,1,1,0,1,1,0,0,0,1,0,0,0,1,0 } }, - { "B", { 1,1,1,1,0,0,0,1,0,1,0,1,0,0,0 } }, - { "C", { 1,0,0,1,1,1,0,0,0,0,0,0,0,0,0 } }, - { "D", { 1,1,1,1,0,0,0,1,0,0,0,1,0,0,0 } }, - { "E", { 1,0,0,1,1,1,0,0,0,0,0,0,0,1,0 } }, - { "F", { 1,0,0,0,1,1,0,0,0,0,0,0,0,1,0 } }, - { "G", { 1,0,1,1,1,1,0,0,0,1,0,0,0,0,0 } }, - { "H", { 0,1,1,0,1,1,0,0,0,1,0,0,0,1,0 } }, - { "I", { 1,0,0,1,0,0,0,1,0,0,0,1,0,0,0 } }, - { "J", { 0,1,1,1,1,0,0,0,0,0,0,0,0,0,0 } }, - { "K", { 0,0,0,0,1,1,0,0,1,0,1,0,0,1,0 } }, - { "L", { 0,0,0,1,1,1,0,0,0,0,0,0,0,0,0 } }, - { "M", { 0,1,1,0,1,1,1,0,1,0,0,0,0,0,0 } }, - { "N", { 0,1,1,0,1,1,1,0,0,0,1,0,0,0,0 } }, - { "O", { 1,1,1,1,1,1,0,0,0,0,0,0,0,0,0 } }, - { "P", { 1,1,0,0,1,1,0,0,0,1,0,0,0,1,0 } }, - { "Q", { 1,1,1,1,1,1,0,0,0,0,1,0,0,0,0 } }, - { "R", { 1,1,0,0,1,1,0,0,0,1,1,0,0,1,0 } }, - { "S", { 1,0,1,1,0,1,0,0,0,1,0,0,0,1,0 } }, - { "T", { 1,0,0,0,0,0,0,1,0,0,0,1,0,0,0 } }, - { "U", { 0,1,1,1,1,1,0,0,0,0,0,0,0,0,0 } }, - { "V", { 0,0,0,0,1,1,0,0,1,0,0,0,1,0,0 } }, - { "W", { 0,1,1,0,1,1,0,0,0,0,1,0,1,0,0 } }, - { "X", { 0,0,0,0,0,0,1,0,1,0,1,0,1,0,0 } }, - { "Y", { 0,0,0,0,0,0,1,0,1,0,0,1,0,0,0 } }, - { "Z", { 1,0,0,1,0,0,0,0,1,0,0,0,1,0,0 } }, - { "[", { 1,0,0,1,1,1,0,0,0,0,0,0,0,0,0 } }, -- 91 - { "\\", { 0,0,0,0,0,0,1,0,0,0,1,0,0,0,0 } }, - { "]", { 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0 } }, - { "^", { 0,0,0,0,0,0,0,0,0,0,1,0,1,0,0 } }, - { "_", { 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0 } }, - { "`", { 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 } }, - { "a", { 1,1,1,1,0,0,0,0,0,1,0,0,1,0,0 } }, -- 97 - { "b", { 0,0,0,1,1,1,0,0,0,0,1,0,0,1,0 } }, - { "c", { 0,0,0,1,1,0,0,0,0,1,0,0,0,1,0 } }, - { "d", { 0,1,1,1,0,0,0,0,0,1,0,0,1,0,0 } }, - { "e", { 0,0,0,1,1,0,0,0,0,0,0,0,1,1,0 } }, - { "f", { 1,0,0,0,1,1,0,0,0,0,0,0,0,1,0 } }, - { "g", { 1,1,1,1,0,0,1,0,0,1,0,0,0,0,0 } }, - { "h", { 0,0,0,0,1,1,0,0,0,0,1,0,0,1,0 } }, - { "i", { 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0 } }, - { "j", { 0,1,1,1,0,0,0,0,0,0,0,0,0,0,0 } }, - { "k", { 0,0,0,0,0,0,0,1,1,0,1,1,0,0,0 } }, - { "l", { 0,0,0,0,0,0,0,1,0,0,0,1,0,0,0 } }, - { "m", { 0,0,1,0,1,0,0,0,0,1,0,1,0,1,0 } }, - { "n", { 0,0,0,0,1,0,0,0,0,0,1,0,0,1,0 } }, - { "o", { 0,0,1,1,1,0,0,0,0,1,0,0,0,1,0 } }, - { "p", { 1,0,0,0,1,1,0,0,1,0,0,0,0,1,0 } }, - { "q", { 1,1,1,0,0,0,1,0,0,1,0,0,0,0,0 } }, - { "r", { 0,0,0,0,1,0,0,0,0,0,0,0,0,1,0 } }, - { "s", { 0,0,0,1,0,0,0,0,0,1,1,0,0,0,0 } }, - { "t", { 0,0,0,1,1,1,0,0,0,0,0,0,0,1,0 } }, - { "u", { 0,0,1,1,1,0,0,0,0,0,0,0,0,0,0 } }, - { "v", { 0,0,0,0,1,0,0,0,0,0,0,0,1,0,0 } }, - { "w", { 0,0,1,0,1,0,0,0,0,0,1,0,1,0,0 } }, - { "x", { 0,0,0,0,0,0,1,0,1,0,1,0,1,0,0 } }, - { "y", { 0,0,0,0,0,0,1,0,1,0,0,0,1,0,0 } }, - { "z", { 0,0,0,4,0,0,0,0,0,0,0,0,1,1,0 } }, - { "{", { 1,0,0,1,0,0,1,0,0,0,0,0,1,1,0 } }, - { "|", { 0,0,0,0,0,0,0,1,0,0,0,1,0,0,0 } }, - { "}", { 1,0,0,1,0,0,0,0,1,1,1,0,0,0,0 } }, - { "~", { 0,1,0,0,0,1,1,0,0,1,0,0,0,0,0 } }, - { string.char(127), { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 } }, -- "DEL" - { string.char(144), { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 } }, -- all-on -} - -local fdir_to_right = { - { 1, 0 }, - { 0, -1 }, - { -1, 0 }, - { 0, 1 }, -} - -local padding = " " -local allon = string.char(128) -for i = 1, 64 do - padding = padding.." " - allon = allon..string.char(128) -end - -local display_string = function(pos, channel, string) - if string == "off_multi" then - string = "" - elseif string == "allon_multi" then - string = allon - end - local padded_string = string.sub(string..padding, 1, 64) - local fdir = minetest.get_node(pos).param2 % 4 - local pos2 = pos - for i = 1, 64 do - local node = minetest.get_node(pos2) - local meta = minetest.get_meta(pos2) - local setchan = meta:get_string("channel") - if not string.match(node.name, "nixie_tubes:alnum_") or (setchan ~= nil and setchan ~= "" and setchan ~= channel) then break end - local asc = string.byte(padded_string, i, i) - if node.param2 == fdir and ((asc > 30 and asc < 128) or asc == 144) then - minetest.swap_node(pos2, { name = "nixie_tubes:alnum_"..asc, param2 = node.param2}) - end - pos2.x = pos2.x + fdir_to_right[fdir+1][1] - pos2.z = pos2.z + fdir_to_right[fdir+1][2] - end -end - -local on_digiline_receive_alnum = function(pos, node, channel, msg) - local meta = minetest.get_meta(pos) - local setchan = meta:get_string("channel") - if setchan ~= channel then return end - if msg and msg ~= "" and type(msg) == "string" then - if string.len(msg) > 1 then - if msg == "off" then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_32", param2 = node.param2}) - elseif msg == "colon" then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_58", param2 = node.param2}) - elseif msg == "period" then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_46", param2 = node.param2}) - elseif msg == "del" then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_127", param2 = node.param2}) - elseif msg == "allon" then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_144", param2 = node.param2}) - elseif msg == "cursor" then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_31", param2 = node.param2}) - else - display_string(pos, channel, msg) - end - else - local asc = string.byte(msg) - if (asc > 30 and asc < 128) or asc == 144 then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_"..asc, param2 = node.param2}) - elseif msg == "get" then -- get value as ASCII numerical value - digiline:receptor_send(pos, digiline.rules.default, channel, tonumber(string.match(minetest.get_node(pos).name,"nixie_tubes:alnum_(.+)"))) -- wonderfully horrible string manipulaiton - elseif msg == "getstr" then -- get actual char - digiline:receptor_send(pos, digiline.rules.default, channel, string.char(tonumber(string.match(minetest.get_node(pos).name,"nixie_tubes:alnum_(.+)")))) - end - end - elseif msg and type(msg) == "number" then - if msg == 0 then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_32", param2 = node.param2}) - elseif (msg > 30 and msg < 128) or msg == 144 then - minetest.swap_node(pos, { name = "nixie_tubes:alnum_"..tostring(msg), param2 = node.param2}) - end - end -end - -for i in ipairs(alnum_chars) do - local char = alnum_chars[i][1] - local bits = alnum_chars[i][2] - - local groups = { cracky = 2, not_in_creative_inventory = 1} - local light = LIGHT_MAX-4 - local description = S("Alphanumeric Nixie Tube ("..char..")") - - local wires = "nixie_tube_alnum_wires.png" - for j = 1, 15 do - if bits[j] == 1 then - wires = wires.."^nixie_tube_alnum_seg_"..j..".png" - end - end - - if char == " " then - groups = {cracky = 2} - light = nil - description = S("Alphanumeric Nixie Tube") - wires = "nixie_tube_alnum_wires.png" - end - - minetest.register_node("nixie_tubes:alnum_"..string.byte(char), { - description = description, - drawtype = "mesh", - mesh = "nixie_tube.obj", - tiles = { - "nixie_tube_base.png", - "nixie_tube_backing.png", - wires, - "nixie_tube_anode.png", - "nixie_tube_glass.png", - }, - use_texture_alpha = true, - groups = groups, - paramtype = "light", - paramtype2 = "facedir", - light_source = light, - selection_box = tube_cbox, - collision_box = tube_cbox, - on_construct = function(pos) - reset_meta(pos) - end, - on_receive_fields = function(pos, formname, fields, sender) - if (fields.channel) then - minetest.get_meta(pos):set_string("channel", fields.channel) - end - end, - digiline = { - receptor = {}, - effector = { - action = on_digiline_receive_alnum - }, - }, - drop = "nixie_tubes:alnum_32" - }) -end - --- crafts - -minetest.register_craft({ - output = "nixie_tubes:tube_off 4", - recipe = { - { "", "default:glass", "" }, - { "default:glass", "default:sign_wall", "default:glass" }, - { "default:glass", "default:mese_crystal_fragment", "default:glass" } - }, -}) - -minetest.register_craft({ - output = "nixie_tubes:numitron_off 4", - recipe = { - { "", "default:glass", "" }, - { "default:glass", "default:copper_ingot", "default:glass" }, - { "default:glass", "default:mese_crystal_fragment", "default:glass" } - }, -}) - - -minetest.register_craft({ - output = "nixie_tubes:alnum_32 4", - recipe = { - { "", "default:glass", "" }, - { "default:glass", "default:sign_wall", "default:glass" }, - { "default:glass", "default:mese_crystal", "default:glass" } - }, -}) - diff --git a/nixie_tubes/mod.conf b/nixie_tubes/mod.conf deleted file mode 100644 index 2ead58f..0000000 --- a/nixie_tubes/mod.conf +++ /dev/null @@ -1 +0,0 @@ -name = nixie_tubes diff --git a/nixie_tubes/models/decatron.obj b/nixie_tubes/models/decatron.obj deleted file mode 100644 index 27b71d7..0000000 --- a/nixie_tubes/models/decatron.obj +++ /dev/null @@ -1,1225 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'decatron.blend' -# www.blender.org -o nixie_Cylinder.009 -v 0.349999 -0.500000 0.000000 -v 0.323357 -0.500000 0.133939 -v 0.247486 -0.500000 0.247486 -v 0.133939 -0.500000 0.323357 -v 0.000000 -0.500000 0.349999 -v -0.133939 -0.500000 0.323357 -v -0.247486 -0.500000 0.247486 -v -0.323357 -0.500000 0.133939 -v -0.349999 -0.500000 0.000000 -v -0.323357 -0.500000 -0.133939 -v -0.247486 -0.500000 -0.247486 -v -0.133939 -0.500000 -0.323357 -v -0.000000 -0.500000 -0.349999 -v 0.133939 -0.500000 -0.323357 -v 0.247486 -0.500000 -0.247486 -v 0.323357 -0.500000 -0.133939 -v -0.000000 -0.227297 0.000000 -v -0.000000 -0.500000 0.000000 -v 0.323357 -0.250001 0.133939 -v 0.247486 -0.250001 0.247486 -v 0.133939 -0.250001 0.323357 -v 0.000000 -0.250001 0.349999 -v -0.133939 -0.250001 0.323357 -v -0.247486 -0.250001 0.247486 -v -0.323357 -0.250001 0.133939 -v -0.349999 -0.250001 0.000000 -v -0.323357 -0.250001 -0.133939 -v -0.247486 -0.250001 -0.247486 -v -0.133939 -0.250001 -0.323357 -v -0.000000 -0.250001 -0.349999 -v 0.133939 -0.250001 -0.323357 -v 0.247486 -0.250001 -0.247486 -v 0.323357 -0.250001 -0.133939 -v 0.349999 -0.250001 0.000000 -v 0.326386 -0.227297 0.000000 -v 0.301541 -0.227297 0.124903 -v 0.230790 -0.227297 0.230790 -v 0.124903 -0.227297 0.301541 -v 0.000000 -0.227297 0.326386 -v -0.124903 -0.227297 0.301541 -v -0.230790 -0.227297 0.230790 -v -0.301541 -0.227297 0.124903 -v -0.326386 -0.227297 0.000000 -v -0.301541 -0.227297 -0.124902 -v -0.230790 -0.227297 -0.230790 -v -0.124903 -0.227297 -0.301541 -v -0.000000 -0.227297 -0.326386 -v 0.124903 -0.227297 -0.301541 -v 0.230790 -0.227297 -0.230790 -v 0.301541 -0.227297 -0.124902 -v 0.207637 0.464059 -0.086006 -v 0.158918 0.464059 -0.158918 -v 0.086006 0.464059 -0.207637 -v -0.000000 0.464059 -0.224745 -v -0.086006 0.464059 -0.207637 -v -0.158919 0.464059 -0.158918 -v -0.207637 0.464059 -0.086006 -v -0.224745 0.464059 0.000000 -v -0.207637 0.464059 0.086006 -v -0.158918 0.464059 0.158919 -v -0.086006 0.464059 0.207637 -v 0.000000 0.464059 0.224745 -v 0.086006 0.464059 0.207637 -v 0.158918 0.464059 0.158918 -v 0.207637 0.464059 0.086006 -v 0.326386 0.287854 0.000000 -v 0.301541 0.287854 -0.124902 -v 0.230790 0.287854 -0.230790 -v 0.124903 0.287854 -0.301541 -v -0.000000 0.287854 -0.326386 -v -0.124903 0.287854 -0.301541 -v -0.230790 0.287854 -0.230790 -v -0.301541 0.287854 -0.124902 -v -0.326386 0.287854 0.000000 -v -0.301541 0.287854 0.124903 -v -0.230790 0.287854 0.230790 -v -0.124903 0.287854 0.301541 -v 0.000000 0.287854 0.326386 -v 0.124903 0.287854 0.301541 -v 0.230790 0.287854 0.230790 -v 0.301541 0.287854 0.124903 -v 0.224745 0.464059 0.000000 -v 0.280086 0.375956 -0.116015 -v 0.214368 0.375956 -0.214368 -v 0.116015 0.375956 -0.280086 -v -0.000000 0.375956 -0.303163 -v -0.116015 0.375956 -0.280086 -v -0.214368 0.375956 -0.214368 -v -0.280086 0.375956 -0.116015 -v -0.303163 0.375956 0.000000 -v -0.280086 0.375956 0.116015 -v -0.214368 0.375956 0.214368 -v -0.116015 0.375956 0.280086 -v 0.000000 0.375956 0.303163 -v 0.116015 0.375956 0.280086 -v 0.214368 0.375956 0.214368 -v 0.280086 0.375956 0.116015 -v 0.303163 0.375956 0.000000 -v -0.000000 0.499996 0.000000 -v 0.041885 0.499996 -0.017349 -v 0.032057 0.499996 -0.032057 -v 0.017349 0.499996 -0.041885 -v -0.000000 0.499996 -0.045336 -v -0.017349 0.499996 -0.041885 -v -0.032057 0.499996 -0.032057 -v -0.041885 0.499996 -0.017349 -v -0.045336 0.499996 0.000000 -v -0.041885 0.499996 0.017349 -v -0.032057 0.499996 0.032057 -v -0.017349 0.499996 0.041885 -v 0.000000 0.499996 0.045336 -v 0.017349 0.499996 0.041885 -v 0.032057 0.499996 0.032057 -v 0.041885 0.499996 0.017349 -v 0.045336 0.499996 0.000000 -v 0.301541 -0.227297 -0.124902 -v 0.230790 -0.227297 -0.230790 -v 0.124903 -0.227297 -0.301541 -v -0.000000 -0.227297 -0.326386 -v -0.124903 -0.227297 -0.301541 -v -0.230790 -0.227297 -0.230790 -v -0.301541 -0.227297 -0.124902 -v -0.326386 -0.227297 0.000000 -v -0.301541 -0.227297 0.124903 -v -0.230790 -0.227297 0.230790 -v -0.124903 -0.227297 0.301541 -v 0.000000 -0.227297 0.326386 -v 0.124903 -0.227297 0.301541 -v 0.230790 -0.227297 0.230790 -v 0.301541 -0.227297 0.124903 -v 0.326386 -0.227297 0.000000 -v 0.147416 0.489328 0.000000 -v 0.136194 0.489328 0.056414 -v 0.104239 0.489328 0.104239 -v 0.056414 0.489328 0.136195 -v 0.000000 0.489328 0.147416 -v -0.056414 0.489328 0.136195 -v -0.104239 0.489328 0.104239 -v -0.136194 0.489328 0.056414 -v -0.147416 0.489328 0.000000 -v -0.136195 0.489328 -0.056414 -v -0.104239 0.489328 -0.104239 -v -0.056414 0.489328 -0.136194 -v -0.000000 0.489328 -0.147416 -v 0.056414 0.489328 -0.136194 -v 0.104239 0.489328 -0.104239 -v 0.136195 0.489328 -0.056414 -v 0.182642 0.475456 0.036330 -v 0.154837 0.475456 0.103459 -v 0.103459 0.475456 0.154837 -v 0.036330 0.475456 0.182643 -v -0.036330 0.475456 0.182643 -v -0.103459 0.475456 0.154837 -v -0.154837 0.475456 0.103459 -v -0.182642 0.475456 0.036330 -v -0.182642 0.475456 -0.036330 -v -0.154837 0.475456 -0.103459 -v -0.103459 0.475456 -0.154837 -v -0.036330 0.475456 -0.182642 -v 0.036330 0.475456 -0.182642 -v 0.103459 0.475456 -0.154837 -v 0.182642 0.475456 -0.036330 -v 0.154837 0.475456 -0.103459 -v 0.256519 0.416957 0.051025 -v 0.217466 0.416957 0.145306 -v 0.145306 0.416957 0.217466 -v 0.051025 0.416957 0.256519 -v -0.051025 0.416957 0.256519 -v -0.145306 0.416957 0.217466 -v -0.217466 0.416957 0.145306 -v -0.256519 0.416957 0.051025 -v -0.256519 0.416957 -0.051025 -v -0.217466 0.416957 -0.145306 -v -0.145306 0.416957 -0.217466 -v -0.051025 0.416957 -0.256519 -v 0.051025 0.416957 -0.256519 -v 0.145306 0.416957 -0.217466 -v 0.256519 0.416957 -0.051025 -v 0.217466 0.416957 -0.145306 -v 0.303030 0.330972 0.060276 -v 0.256897 0.330972 0.171653 -v 0.171653 0.330972 0.256897 -v 0.060277 0.330972 0.303030 -v -0.060277 0.330972 0.303030 -v -0.171653 0.330972 0.256897 -v -0.256897 0.330972 0.171653 -v -0.303030 0.330972 0.060277 -v -0.303031 0.330972 -0.060276 -v -0.256897 0.330972 -0.171653 -v -0.171653 0.330972 -0.256897 -v -0.060277 0.330972 -0.303030 -v 0.060277 0.330972 -0.303030 -v 0.171653 0.330972 -0.256897 -v 0.303031 0.330972 -0.060276 -v 0.256897 0.330972 -0.171653 -v 0.096678 -0.024066 0.070240 -v 0.119500 -0.024066 -0.000000 -v 0.119500 -0.250000 -0.000000 -v 0.317357 0.256231 -0.000000 -v 0.096678 -0.250000 0.070240 -v 0.256747 0.256231 0.186538 -v 0.036928 -0.250000 0.113651 -v 0.098069 0.256231 0.301824 -v -0.036928 -0.250000 0.113651 -v -0.098069 0.256231 0.301824 -v -0.096678 -0.250000 0.070240 -v -0.256747 0.256231 0.186538 -v -0.119500 -0.250000 0.000000 -v -0.317357 0.256231 0.000000 -v -0.096678 -0.250000 -0.070240 -v -0.256747 0.256231 -0.186538 -v -0.036928 -0.250000 -0.113651 -v -0.098069 0.256231 -0.301824 -v 0.036928 -0.250000 -0.113651 -v 0.098069 0.256231 -0.301824 -v 0.096678 -0.250000 -0.070240 -v 0.256747 0.256231 -0.186538 -v 0.036928 -0.024066 0.113651 -v -0.036928 -0.024066 0.113651 -v -0.096678 -0.024066 0.070240 -v -0.119500 -0.024066 0.000000 -v -0.096678 -0.024066 -0.070240 -v -0.036928 -0.024066 -0.113651 -v 0.036928 -0.024066 -0.113651 -v 0.096678 -0.024066 -0.070240 -v 0.096678 0.093867 -0.070240 -v 0.036928 0.093867 -0.113651 -v 0.119500 0.093867 -0.000000 -v -0.036928 0.093867 -0.113651 -v -0.096678 0.093867 -0.070240 -v -0.119500 0.093867 0.000000 -v -0.096678 0.093867 0.070240 -v -0.036928 0.093867 0.113651 -v 0.036928 0.093867 0.113651 -v 0.096678 0.093867 0.070240 -v 0.317332 0.175898 -0.000000 -v 0.256727 0.175898 -0.186523 -v 0.098061 0.175898 -0.301801 -v -0.098061 0.175898 -0.301801 -v -0.256727 0.175898 -0.186523 -v -0.317332 0.175898 0.000000 -v -0.256727 0.175898 0.186523 -v -0.098061 0.175898 0.301801 -v 0.098061 0.175898 0.301801 -v 0.256727 0.175898 0.186523 -v 0.096678 -0.188128 0.070240 -v 0.036928 -0.188128 0.113651 -v -0.036928 -0.188128 0.113651 -v -0.096678 -0.188128 0.070240 -v -0.119500 -0.188128 0.000000 -v -0.096678 -0.188128 -0.070240 -v -0.036928 -0.188128 -0.113651 -v 0.036928 -0.188128 -0.113651 -v 0.119500 -0.188128 -0.000000 -v 0.096678 -0.188128 -0.070240 -v 0.061561 -0.106097 -0.000000 -v 0.049804 -0.106097 0.036184 -v 0.019023 -0.106097 0.058548 -v -0.019023 -0.106097 0.058548 -v -0.049804 -0.106097 0.036184 -v -0.061561 -0.106097 0.000000 -v -0.049804 -0.106097 -0.036184 -v -0.019023 -0.106097 -0.058548 -v 0.019023 -0.106097 -0.058548 -v 0.049804 -0.106097 -0.036184 -v -0.221607 0.336504 -0.161007 -v -0.273921 0.336504 0.000000 -v -0.221607 0.336504 0.161007 -v -0.084646 0.336504 0.260514 -v 0.084646 0.336504 0.260514 -v 0.273900 0.256171 -0.000000 -v 0.221590 0.256171 0.160994 -v 0.084640 0.256171 0.260495 -v -0.084640 0.256171 0.260495 -v -0.221590 0.256171 0.160995 -v -0.273900 0.256171 0.000000 -v -0.221590 0.256171 -0.160994 -v -0.084640 0.256171 -0.260495 -v 0.084640 0.256171 -0.260495 -v 0.221590 0.256171 -0.160995 -v 0.119500 0.253981 -0.000000 -v 0.119500 0.320332 -0.000000 -v 0.096678 0.253981 0.070240 -v 0.096678 0.320332 0.070240 -v 0.036928 0.253981 0.113651 -v 0.036928 0.320332 0.113651 -v -0.036928 0.253981 0.113651 -v -0.036928 0.320332 0.113651 -v -0.096678 0.253981 0.070240 -v -0.096678 0.320332 0.070240 -v -0.119500 0.253981 0.000000 -v -0.119500 0.320332 0.000000 -v -0.096678 0.253981 -0.070240 -v -0.096678 0.320332 -0.070240 -v -0.036928 0.253981 -0.113651 -v -0.036928 0.320332 -0.113651 -v 0.036928 0.253981 -0.113651 -v 0.036928 0.320332 -0.113651 -v 0.096678 0.253981 -0.070240 -v 0.096678 0.320332 -0.070240 -v 0.273799 0.336504 -0.000000 -v 0.221508 0.336504 -0.160935 -v 0.084609 0.336504 -0.260398 -v -0.084609 0.336504 -0.260398 -v 0.221508 0.336504 0.160935 -v 0.117966 0.317873 -0.000000 -v 0.095436 0.317873 0.069338 -v 0.036453 0.317873 0.112192 -v -0.036453 0.317873 0.112192 -v -0.095436 0.317873 0.069339 -v -0.117966 0.317873 0.000000 -v -0.095436 0.317873 -0.069338 -v -0.036453 0.317873 -0.112192 -v 0.036453 0.317873 -0.112192 -v 0.095436 0.317873 -0.069338 -v 0.190983 0.325972 -0.062054 -v 0.118034 0.325972 -0.162460 -v -0.000000 0.325972 -0.200811 -v -0.118034 0.325971 -0.162460 -v -0.190983 0.325972 -0.062054 -v -0.190983 0.325972 0.062054 -v -0.118034 0.325972 0.162460 -v 0.000000 0.325971 0.200811 -v 0.190983 0.325972 0.062054 -v 0.118034 0.325972 0.162460 -v -0.220928 0.336504 0.160514 -v -0.273082 0.336504 0.000000 -v -0.220928 0.336504 -0.160514 -v -0.084387 0.336504 -0.259717 -v 0.084387 0.336504 -0.259717 -v 0.273061 0.256171 -0.000000 -v 0.220911 0.256171 -0.160501 -v 0.084381 0.256171 -0.259697 -v -0.084381 0.256171 -0.259697 -v -0.220911 0.256171 -0.160502 -v -0.273061 0.256171 0.000000 -v -0.220911 0.256171 0.160502 -v -0.084381 0.256171 0.259697 -v 0.084381 0.256171 0.259697 -v 0.220911 0.256171 0.160502 -v 0.272961 0.336504 -0.000000 -v 0.220830 0.336504 0.160442 -v 0.084350 0.336504 0.259601 -v -0.084349 0.336504 0.259601 -v 0.220830 0.336504 -0.160442 -v -0.220152 0.336504 0.159950 -v -0.272123 0.336504 0.000000 -v -0.220152 0.336504 -0.159950 -v -0.084091 0.336504 -0.258804 -v 0.084091 0.336504 -0.258804 -v 0.272102 0.256171 -0.000000 -v 0.220135 0.256171 -0.159938 -v 0.084084 0.256171 -0.258785 -v -0.084084 0.256171 -0.258785 -v -0.220135 0.256171 -0.159938 -v -0.272102 0.256171 0.000000 -v -0.220135 0.256171 0.159938 -v -0.084084 0.256171 0.258785 -v 0.084084 0.256171 0.258785 -v 0.220135 0.256171 0.159938 -v 0.272002 0.336504 -0.000000 -v 0.220054 0.336504 0.159879 -v 0.084053 0.336504 0.258689 -v -0.084053 0.336504 0.258689 -v 0.220054 0.336504 -0.159879 -v -0.219464 0.336504 -0.159450 -v -0.271273 0.336504 0.000000 -v -0.219464 0.336504 0.159450 -v -0.083828 0.336504 0.257996 -v 0.083828 0.336504 0.257996 -v 0.271252 0.256171 -0.000000 -v 0.219447 0.256171 0.159438 -v 0.083822 0.256171 0.257976 -v -0.083821 0.256171 0.257976 -v -0.219447 0.256171 0.159438 -v -0.271252 0.256171 0.000000 -v -0.219447 0.256171 -0.159438 -v -0.083822 0.256171 -0.257976 -v 0.083821 0.256171 -0.257976 -v 0.219447 0.256171 -0.159438 -v 0.271152 0.336504 -0.000000 -v 0.219366 0.336504 -0.159379 -v 0.083790 0.336504 -0.257881 -v -0.083791 0.336504 -0.257881 -v 0.219366 0.336504 0.159379 -v 0.000000 -0.060385 0.089254 -v -0.052462 -0.060385 0.072208 -v -0.084886 -0.060385 0.027581 -v -0.084886 -0.060385 -0.027581 -v -0.052462 -0.060385 -0.072208 -v -0.000000 -0.060385 -0.089254 -v 0.084886 -0.060385 -0.027581 -v 0.084886 -0.060385 0.027581 -v 0.052462 -0.060385 -0.072208 -v 0.052462 -0.060385 0.072208 -v 0.052462 -0.151808 0.072208 -v 0.052462 -0.151808 -0.072208 -v 0.084886 -0.151808 0.027581 -v 0.084886 -0.151808 -0.027581 -v -0.000000 -0.151808 -0.089254 -v -0.052462 -0.151808 -0.072208 -v -0.084886 -0.151808 -0.027581 -v -0.084886 -0.151808 0.027581 -v -0.052462 -0.151808 0.072208 -v 0.000000 -0.151808 0.089254 -v 0.131780 0.142064 -0.181380 -v 0.213225 0.142064 -0.069281 -v -0.000000 0.142064 -0.224198 -v -0.131780 0.142064 -0.181380 -v -0.213225 0.142064 -0.069281 -v -0.213225 0.142064 0.069281 -v -0.131780 0.142064 0.181380 -v 0.000000 0.142064 0.224198 -v 0.131780 0.142064 0.181380 -v 0.213225 0.142064 0.069281 -vt 0.500000 0.750000 -vt 0.595671 0.730970 -vt 0.500000 0.500000 -vt 0.437500 0.000000 -vt 0.437500 0.250000 -vt 0.375000 0.250000 -vt 0.375000 0.000000 -vt 0.312500 0.250000 -vt 0.312500 0.000000 -vt 0.250000 0.250000 -vt 0.250000 0.000000 -vt 0.187500 0.250000 -vt 0.187500 0.000000 -vt 0.125000 0.250000 -vt 0.125000 0.000000 -vt 0.062500 0.250000 -vt 0.062500 0.000000 -vt 0.000000 0.250000 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.250000 -vt 0.937500 0.250000 -vt 0.937500 0.000000 -vt 0.875000 0.250000 -vt 0.875000 0.000000 -vt 0.812500 0.250000 -vt 0.812500 0.000000 -vt 0.750000 0.250000 -vt 0.750000 0.000000 -vt 0.687500 0.250000 -vt 0.687500 0.000000 -vt 0.625000 0.250000 -vt 0.625000 0.000000 -vt 0.562500 0.250000 -vt 0.562500 0.000000 -vt 0.500000 0.000000 -vt 0.500000 0.250000 -vt 0.676777 0.676777 -vt 0.500000 0.733134 -vt 0.589216 0.715388 -vt 0.664850 0.664850 -vt 0.715388 0.589216 -vt 0.730970 0.595671 -vt 0.733134 0.500000 -vt 0.750000 0.500000 -vt 0.715388 0.410784 -vt 0.730970 0.404329 -vt 0.664850 0.335149 -vt 0.676777 0.323223 -vt 0.589216 0.284612 -vt 0.595671 0.269030 -vt 0.500000 0.266866 -vt 0.410784 0.284612 -vt 0.404329 0.269030 -vt 0.335150 0.335149 -vt 0.323223 0.323223 -vt 0.284612 0.410784 -vt 0.269030 0.404329 -vt 0.266866 0.500000 -vt 0.250000 0.500000 -vt 0.284612 0.589217 -vt 0.269030 0.595671 -vt 0.335150 0.664851 -vt 0.323223 0.676777 -vt 0.404329 0.730970 -vt 0.410784 0.715388 -vt 0.875000 0.500000 -vt 0.812500 0.389311 -vt 0.250000 0.875000 -vt 0.250000 1.000000 -vt 0.125000 1.000000 -vt 0.125000 0.875000 -vt 0.875000 0.750000 -vt 0.750000 0.750000 -vt 0.687500 0.389311 -vt -0.000000 1.000000 -vt -0.000000 0.875000 -vt 1.000000 0.500000 -vt 1.000000 0.750000 -vt 0.625000 0.500000 -vt 0.562500 0.389311 -vt 1.000000 0.875000 -vt 1.000000 1.000000 -vt 0.875000 1.000000 -vt 0.875000 0.875000 -vt 0.625000 0.750000 -vt 0.437500 0.389311 -vt 0.750000 1.000000 -vt 0.750000 0.875000 -vt 0.375000 0.750000 -vt 0.375000 0.500000 -vt 0.312500 0.389311 -vt 0.625000 1.000000 -vt 0.625000 0.875000 -vt 0.250000 0.750000 -vt 0.125000 0.500000 -vt 0.062500 0.389311 -vt 0.500000 1.000000 -vt 0.500000 0.875000 -vt 0.125000 0.750000 -vt -0.000000 0.750000 -vt -0.000000 0.500000 -vt 0.187500 0.389311 -vt 0.375000 1.000000 -vt 0.375000 0.875000 -vt 0.125000 0.062500 -vt 0.062500 0.145516 -vt 0.500000 0.998244 -vt 0.572441 0.974707 -vt 0.617212 0.913084 -vt 0.617212 0.836916 -vt 0.572441 0.775293 -vt 0.500000 0.751756 -vt 0.427559 0.775293 -vt 0.382788 0.836916 -vt 0.382788 0.913085 -vt 0.427559 0.974707 -vt 0.062500 0.823443 -vt 0.312500 0.823443 -vt 0.437500 0.823443 -vt 0.562500 0.823443 -vt 0.687500 0.823443 -vt 0.812500 0.823443 -vt 0.937500 0.823443 -vt 0.187500 0.823443 -vt -0.000000 0.062500 -vt 0.250000 0.062500 -vt 0.375000 0.062500 -vt 0.500000 0.062500 -vt 0.625000 0.062500 -vt 0.750000 0.062500 -vt 0.875000 0.062500 -vt 0.187500 0.145516 -vt 0.312500 0.145516 -vt 0.437500 0.145516 -vt 0.562500 0.145516 -vt 0.687500 0.145516 -vt 0.812500 0.145516 -vt 1.000000 0.062500 -vt 0.937500 0.145516 -vt 0.937500 0.389311 -vt 0.250000 0.125000 -vt 0.125000 0.125000 -vt -0.000000 0.125000 -vt 1.000000 0.125000 -vt 0.875000 0.125000 -vt 0.750000 0.125000 -vt 0.625000 0.125000 -vt 0.500000 0.125000 -vt 0.375000 0.125000 -vt 0.617946 0.662339 -vt 0.500000 0.700662 -vt 0.382054 0.662339 -vt 0.309159 0.562008 -vt 0.309159 0.437992 -vt 0.382054 0.337661 -vt 0.500000 0.299338 -vt 0.617946 0.337661 -vt 0.690840 0.437992 -vt 0.690840 0.562008 -vt 0.625000 0.646142 -vt 0.375000 0.646142 -vt 0.125000 0.646142 -vt 0.875000 0.896142 -vt 0.625000 0.896142 -vt 0.375000 0.896142 -vt 0.125000 0.896142 -vt 0.125000 0.396142 -vt 0.375000 0.396142 -vt 0.875000 0.646142 -vt 0.250000 0.320312 -vt 0.125000 0.320312 -vt 1.000000 0.320312 -vt 0.875000 0.320312 -vt 0.750000 0.320312 -vt 0.625000 0.320312 -vt 0.500000 0.320312 -vt 0.375000 0.320312 -vt 0.000000 0.320312 -vt 0.875000 0.445312 -vt 0.812500 0.469977 -vt 0.750000 0.445312 -vt 0.687500 0.469977 -vt 0.625000 0.445312 -vt 0.562500 0.469977 -vt 0.500000 0.445312 -vt 0.437500 0.469977 -vt 0.375000 0.445312 -vt 0.312500 0.469977 -vt 0.250000 0.445312 -vt 0.187500 0.469977 -vt 0.125000 0.445312 -vt 0.062500 0.469977 -vt 1.000000 0.445312 -vt 0.937500 0.469977 -vt 1.000000 0.375000 -vt 0.937500 0.407722 -vt 0.875000 0.375000 -vt 0.812500 0.407722 -vt 0.750000 0.375000 -vt 0.687500 0.407722 -vt 0.625000 0.375000 -vt 0.562500 0.407722 -vt 0.500000 0.375000 -vt 0.437500 0.407722 -vt 0.375000 0.375000 -vt 0.312500 0.407722 -vt 0.250000 0.375000 -vt 0.187500 0.407722 -vt 0.125000 0.375000 -vt 0.062500 0.407722 -vt 0.937500 0.347077 -vt 0.537472 0.537472 -vt 0.520280 0.548959 -vt 0.548959 0.520280 -vt 0.552993 0.500000 -vt 0.548959 0.479721 -vt 0.537472 0.462529 -vt 0.520280 0.451041 -vt 0.500000 0.447008 -vt 0.479721 0.451041 -vt 0.462529 0.462529 -vt 0.451041 0.479721 -vt 0.447007 0.500000 -vt 0.451041 0.520280 -vt 0.462529 0.537472 -vt 0.479721 0.548959 -vt 0.500000 0.552993 -vt 0.812500 0.347077 -vt 0.687500 0.347077 -vt 0.562500 0.347077 -vt 0.437500 0.347077 -vt 0.312500 0.347077 -vt 0.187500 0.347077 -vt 0.062500 0.347077 -vt 0.378156 0.621844 -vt 0.434059 0.659197 -vt 0.500000 0.672314 -vt 0.340803 0.565942 -vt 0.327687 0.500000 -vt 0.340803 0.434059 -vt 0.378156 0.378156 -vt 0.434059 0.340803 -vt 0.500000 0.327687 -vt 0.565942 0.340803 -vt 0.621844 0.378156 -vt 0.659197 0.434059 -vt 0.672314 0.500000 -vt 0.659197 0.565942 -vt 0.621844 0.621844 -vt 0.565942 0.659197 -vt 0.000000 0.445312 -vt 0.000000 0.375000 -g nixie_Cylinder.009_base -s 1 -f 1/1 2/2 18/3 -f 1/4 34/5 19/6 2/7 -f 2/7 19/6 20/8 3/9 -f 3/9 20/8 21/10 4/11 -f 4/11 21/10 22/12 5/13 -f 5/13 22/12 23/14 6/15 -f 6/15 23/14 24/16 7/17 -f 7/17 24/16 25/18 8/19 -f 8/20 25/21 26/22 9/23 -f 9/23 26/22 27/24 10/25 -f 10/25 27/24 28/26 11/27 -f 11/27 28/26 29/28 12/29 -f 12/29 29/28 30/30 13/31 -f 13/31 30/30 31/32 14/33 -f 14/33 31/32 32/34 15/35 -f 16/36 33/37 34/5 1/4 -f 15/35 32/34 33/37 16/36 -f 2/2 3/38 18/3 -f 34/1 35/39 36/40 19/2 -f 19/2 36/40 37/41 20/38 -f 20/38 37/41 38/42 21/43 -f 21/43 38/42 39/44 22/45 -f 22/45 39/44 40/46 23/47 -f 23/47 40/46 41/48 24/49 -f 24/49 41/48 42/50 25/51 -f 25/51 42/50 43/52 26/37 -f 26/37 43/52 44/53 27/54 -f 27/54 44/53 45/55 28/56 -f 28/56 45/55 46/57 29/58 -f 29/58 46/57 47/59 30/60 -f 30/60 47/59 48/61 31/62 -f 31/62 48/61 49/63 32/64 -f 33/65 50/66 35/39 34/1 -f 32/64 49/63 50/66 33/65 -f 3/38 4/43 18/3 -f 4/43 5/45 18/3 -f 5/45 6/47 18/3 -f 6/47 7/49 18/3 -f 7/49 8/51 18/3 -f 8/51 9/37 18/3 -f 9/37 10/54 18/3 -f 10/54 11/56 18/3 -f 11/56 12/58 18/3 -f 12/58 13/60 18/3 -f 13/60 14/62 18/3 -f 14/62 15/64 18/3 -f 15/64 16/65 18/3 -f 16/65 1/1 18/3 -f 50/66 35/39 17/3 -f 35/39 36/40 17/3 -f 36/40 37/41 17/3 -f 37/41 38/42 17/3 -f 38/42 39/44 17/3 -f 39/44 40/46 17/3 -f 40/46 41/48 17/3 -f 41/48 42/50 17/3 -f 42/50 43/52 17/3 -f 43/52 44/53 17/3 -f 44/53 45/55 17/3 -f 45/55 46/57 17/3 -f 46/57 47/59 17/3 -f 47/59 48/61 17/3 -f 48/61 49/63 17/3 -f 49/63 50/66 17/3 -g nixie_Cylinder.009_internals -f 259/24 219/67 387/68 -f 236/69 199/70 201/71 245/72 -f 219/67 233/73 232/74 220/45 -f 260/28 220/45 388/75 -f 245/72 201/71 203/76 244/77 -f 218/78 234/79 233/73 219/67 -f 261/32 221/80 389/81 -f 244/82 203/83 205/84 243/85 -f 221/80 231/86 230/1 222/3 -f 262/37 222/3 390/87 -f 243/85 205/84 207/88 242/89 -f 222/3 230/1 229/90 223/91 -f 263/6 223/91 391/92 -f 242/89 207/88 209/93 241/94 -f 223/91 229/90 227/95 224/60 -f 265/14 225/96 392/97 -f 241/94 209/93 211/98 240/99 -f 225/96 226/100 228/101 197/102 -f 256/10 197/60 393/103 -f 240/99 211/98 213/104 239/105 -f 264/10 224/60 394/103 -f 257/14 196/96 395/97 -f 239/105 213/104 215/70 238/69 -f 201/19 199/19 217/19 215/19 213/19 211/19 209/19 207/19 205/19 203/19 -f 237/72 217/71 199/76 236/77 -f 238/69 215/70 217/71 237/72 -f 224/60 227/95 226/100 225/96 -f 246/106 257/14 396/107 -f 198/108 200/109 202/110 204/111 206/112 208/113 210/114 212/115 214/116 216/117 -f 220/45 232/74 231/86 221/80 -f 196/96 235/100 234/101 218/102 -f 226/100 237/72 407/118 -f 229/90 239/105 408/119 -f 230/1 240/99 409/120 -f 231/86 241/94 410/121 -f 232/74 242/89 411/122 -f 233/73 243/85 412/123 -f 234/79 244/82 413/124 -f 235/100 245/72 414/118 -f 228/95 236/69 415/125 -f 197/60 228/95 235/100 196/96 -f 200/15 246/106 247/126 202/19 -f 214/11 253/127 255/106 216/15 -f 198/11 254/127 246/106 200/15 -f 216/15 255/106 254/126 198/19 -f 212/7 252/128 253/127 214/11 -f 210/36 251/129 252/128 212/7 -f 208/33 250/130 251/129 210/36 -f 206/29 249/131 250/130 208/33 -f 204/25 248/132 249/131 206/29 -f 253/127 264/10 397/133 -f 254/127 256/10 398/133 -f 255/106 265/14 399/107 -f 252/128 263/6 400/134 -f 251/129 262/37 401/135 -f 250/130 261/32 402/136 -f 249/131 260/28 403/137 -f 248/132 259/24 404/138 -f 247/139 258/21 405/140 -f 227/95 238/69 406/125 -f 202/20 247/139 248/132 204/25 -f 258/21 218/78 386/141 -f 218/78 219/67 386/141 -f 219/67 259/24 386/141 -f 259/24 258/21 386/141 -f 219/67 220/45 387/68 -f 220/45 260/28 387/68 -f 260/28 259/24 387/68 -f 220/45 221/80 388/75 -f 221/80 261/32 388/75 -f 261/32 260/28 388/75 -f 221/80 222/3 389/81 -f 222/3 262/37 389/81 -f 262/37 261/32 389/81 -f 222/3 223/91 390/87 -f 223/91 263/6 390/87 -f 263/6 262/37 390/87 -f 223/91 224/60 391/92 -f 224/60 264/10 391/92 -f 264/10 263/6 391/92 -f 225/96 197/102 392/97 -f 197/102 256/18 392/97 -f 256/18 265/14 392/97 -f 197/60 196/96 393/103 -f 196/96 257/14 393/103 -f 257/14 256/10 393/103 -f 224/60 225/96 394/103 -f 225/96 265/14 394/103 -f 265/14 264/10 394/103 -f 196/96 218/102 395/97 -f 218/102 258/18 395/97 -f 258/18 257/14 395/97 -f 257/14 258/18 396/107 -f 258/18 247/126 396/107 -f 247/126 246/106 396/107 -f 264/10 265/14 397/133 -f 265/14 255/106 397/133 -f 255/106 253/127 397/133 -f 256/10 257/14 398/133 -f 257/14 246/106 398/133 -f 246/106 254/127 398/133 -f 265/14 256/18 399/107 -f 256/18 254/126 399/107 -f 254/126 255/106 399/107 -f 263/6 264/10 400/134 -f 264/10 253/127 400/134 -f 253/127 252/128 400/134 -f 262/37 263/6 401/135 -f 263/6 252/128 401/135 -f 252/128 251/129 401/135 -f 261/32 262/37 402/136 -f 262/37 251/129 402/136 -f 251/129 250/130 402/136 -f 260/28 261/32 403/137 -f 261/32 250/130 403/137 -f 250/130 249/131 403/137 -f 259/24 260/28 404/138 -f 260/28 249/131 404/138 -f 249/131 248/132 404/138 -f 258/21 259/24 405/140 -f 259/24 248/132 405/140 -f 248/132 247/139 405/140 -f 238/69 237/72 406/125 -f 237/72 226/100 406/125 -f 226/100 227/95 406/125 -f 237/72 236/77 407/118 -f 236/77 228/101 407/118 -f 228/101 226/100 407/118 -f 239/105 238/69 408/119 -f 238/69 227/95 408/119 -f 227/95 229/90 408/119 -f 240/99 239/105 409/120 -f 239/105 229/90 409/120 -f 229/90 230/1 409/120 -f 241/94 240/99 410/121 -f 240/99 230/1 410/121 -f 230/1 231/86 410/121 -f 242/89 241/94 411/122 -f 241/94 231/86 411/122 -f 231/86 232/74 411/122 -f 243/85 242/89 412/123 -f 242/89 232/74 412/123 -f 232/74 233/73 412/123 -f 244/82 243/85 413/124 -f 243/85 233/73 413/124 -f 233/73 234/79 413/124 -f 245/72 244/77 414/118 -f 244/77 234/101 414/118 -f 234/101 235/100 414/118 -f 236/69 245/72 415/125 -f 245/72 235/100 415/125 -f 235/100 228/95 415/125 -g nixie_Cylinder.009_anode -f 281/142 282/10 284/14 283/143 -f 283/143 284/14 286/18 285/144 -f 285/20 286/145 288/146 287/25 -f 287/25 288/146 290/147 289/29 -f 289/29 290/147 292/148 291/33 -f 291/33 292/148 294/149 293/36 -f 293/36 294/149 296/150 295/7 -f 295/7 296/150 298/142 297/11 -f 284/151 282/152 300/153 298/154 296/155 294/156 292/157 290/158 288/159 286/160 -f 299/15 300/143 282/144 281/19 -f 297/11 298/142 300/143 299/15 -g nixie_Cylinder.009_cathode-pins -f 337/79 326/83 327/88 336/74 -f 336/74 327/88 328/98 335/1 -f 335/1 328/98 329/70 334/95 -f 334/95 329/70 330/76 333/101 -f 331/78 341/79 342/74 340/45 -f 340/45 342/74 343/1 339/3 -f 339/3 343/1 344/95 338/60 -f 338/60 344/95 326/101 337/102 -f 332/10 345/60 341/102 331/18 -f 333/37 330/3 345/60 332/10 -f 357/79 356/74 347/88 346/83 -f 356/74 355/1 348/98 347/88 -f 355/1 354/95 349/70 348/98 -f 354/95 353/101 350/76 349/70 -f 351/78 360/45 362/74 361/79 -f 360/45 359/3 363/1 362/74 -f 359/3 358/60 364/95 363/1 -f 358/60 357/102 346/101 364/95 -f 352/10 351/18 361/102 365/60 -f 353/37 352/10 365/60 350/3 -g nixie_Cylinder.009_cathode-lighting -f 277/79 276/74 267/88 266/83 -f 276/74 275/1 268/98 267/88 -f 275/1 274/95 269/70 268/98 -f 274/95 273/101 270/76 269/70 -f 315/45 317/161 314/3 -f 314/3 318/162 313/60 -f 313/60 319/163 312/102 -f 312/79 320/164 311/74 -f 311/74 321/165 310/1 -f 310/1 322/166 309/95 -f 309/95 323/167 308/101 -f 307/10 324/168 306/18 -f 308/37 325/169 307/10 -f 306/78 316/170 315/45 -f 315/45 316/170 302/74 -f 302/74 316/170 301/79 -f 301/79 316/170 306/78 -f 314/3 317/161 303/1 -f 303/1 317/161 302/74 -f 302/74 317/161 315/45 -f 313/60 318/162 304/95 -f 304/95 318/162 303/1 -f 303/1 318/162 314/3 -f 304/95 319/163 313/60 -f 306/18 324/168 301/102 -f 301/102 324/168 305/60 -f 305/60 324/168 307/10 -f 307/10 325/169 305/60 -f 271/78 280/45 302/74 301/79 -f 280/45 279/3 303/1 302/74 -f 279/3 278/60 304/95 303/1 -f 278/60 277/102 266/101 304/95 -f 272/10 271/18 301/102 305/60 -f 273/37 272/10 305/60 270/3 -f 312/102 319/163 266/101 -f 266/101 319/163 304/95 -f 311/74 320/164 267/88 -f 267/88 320/164 266/83 -f 266/83 320/164 312/79 -f 310/1 321/165 268/98 -f 268/98 321/165 267/88 -f 267/88 321/165 311/74 -f 309/95 322/166 269/70 -f 269/70 322/166 268/98 -f 268/98 322/166 310/1 -f 308/101 323/167 270/76 -f 270/76 323/167 269/70 -f 269/70 323/167 309/95 -f 305/60 325/169 270/3 -f 270/3 325/169 308/37 -f 377/79 376/74 367/88 366/83 -f 376/74 375/1 368/98 367/88 -f 375/1 374/95 369/70 368/98 -f 374/95 373/101 370/76 369/70 -f 371/78 380/45 382/74 381/79 -f 380/45 379/3 383/1 382/74 -f 379/3 378/60 384/95 383/1 -f 378/60 377/102 366/101 384/95 -f 372/10 371/18 381/102 385/60 -f 373/37 372/10 385/60 370/3 -g nixie_Cylinder.009_glass -f 68/171 67/172 116/15 117/11 -f 131/20 66/173 81/174 130/25 -f 81/174 80/175 129/29 130/25 -f 80/175 79/176 128/33 129/29 -f 79/176 78/177 127/36 128/33 -f 78/177 77/178 126/7 127/36 -f 77/178 76/171 125/11 126/7 -f 76/171 75/172 124/15 125/11 -f 75/172 74/179 123/19 124/15 -f 74/173 73/174 122/25 123/20 -f 73/174 72/175 121/29 122/25 -f 72/175 71/176 120/33 121/29 -f 71/176 70/177 119/36 120/33 -f 70/177 69/178 118/7 119/36 -f 69/178 68/171 117/11 118/7 -f 67/172 66/179 131/19 116/15 -f 65/180 133/67 149/181 -f 64/182 134/45 150/183 -f 63/184 135/80 151/185 -f 62/186 136/3 152/187 -f 61/188 137/91 153/189 -f 60/190 138/60 154/191 -f 59/192 139/96 155/193 -f 58/194 140/78 156/195 -f 57/180 141/67 157/181 -f 56/182 142/45 158/183 -f 55/184 143/80 159/185 -f 54/186 144/3 160/187 -f 53/188 145/91 161/189 -f 51/192 147/96 162/193 -f 52/190 146/60 163/191 -f 98/196 82/194 164/197 -f 97/198 65/180 165/199 -f 96/200 64/182 166/201 -f 95/202 63/184 167/203 -f 94/204 62/186 168/205 -f 93/206 61/188 169/207 -f 92/208 60/190 170/209 -f 91/210 59/192 171/211 -f 90/196 58/194 172/197 -f 89/198 57/180 173/199 -f 88/200 56/182 174/201 -f 87/202 55/184 175/203 -f 86/204 54/186 176/205 -f 85/206 53/188 177/207 -f 83/210 51/192 178/211 -f 84/208 52/190 179/209 -f 66/173 98/196 180/212 -f 113/213 114/214 99/3 -f 112/215 113/213 99/3 -f 111/216 112/215 99/3 -f 110/217 111/216 99/3 -f 109/218 110/217 99/3 -f 108/219 109/218 99/3 -f 107/220 108/219 99/3 -f 106/221 107/220 99/3 -f 105/222 106/221 99/3 -f 104/223 105/222 99/3 -f 103/224 104/223 99/3 -f 102/225 103/224 99/3 -f 101/226 102/225 99/3 -f 100/227 101/226 99/3 -f 115/228 100/227 99/3 -f 81/174 97/198 181/229 -f 80/175 96/200 182/230 -f 79/176 95/202 183/231 -f 78/177 94/204 184/232 -f 77/178 93/206 185/233 -f 76/171 92/208 186/234 -f 75/172 91/210 187/235 -f 74/173 90/196 188/212 -f 73/174 89/198 189/229 -f 72/175 88/200 190/230 -f 71/176 87/202 191/231 -f 70/177 86/204 192/232 -f 69/178 85/206 193/233 -f 67/172 83/210 194/235 -f 68/171 84/208 195/234 -f 114/214 115/228 99/3 -f 146/236 101/226 100/227 147/237 -f 147/237 100/227 115/228 132/238 -f 145/239 102/225 101/226 146/236 -f 144/240 103/224 102/225 145/239 -f 143/241 104/223 103/224 144/240 -f 142/242 105/222 104/223 143/241 -f 141/243 106/221 105/222 142/242 -f 140/244 107/220 106/221 141/243 -f 139/245 108/219 107/220 140/244 -f 138/246 109/218 108/219 139/245 -f 137/247 110/217 109/218 138/246 -f 136/248 111/216 110/217 137/247 -f 135/249 112/215 111/216 136/248 -f 134/250 113/213 112/215 135/249 -f 133/251 114/214 113/213 134/250 -f 132/238 115/228 114/214 133/251 -f 82/194 132/78 148/195 -f 132/78 133/67 148/195 -f 133/67 65/180 148/195 -f 65/180 82/194 148/195 -f 133/67 134/45 149/181 -f 134/45 64/182 149/181 -f 64/182 65/180 149/181 -f 134/45 135/80 150/183 -f 135/80 63/184 150/183 -f 63/184 64/182 150/183 -f 135/80 136/3 151/185 -f 136/3 62/186 151/185 -f 62/186 63/184 151/185 -f 136/3 137/91 152/187 -f 137/91 61/188 152/187 -f 61/188 62/186 152/187 -f 137/91 138/60 153/189 -f 138/60 60/190 153/189 -f 60/190 61/188 153/189 -f 138/60 139/96 154/191 -f 139/96 59/192 154/191 -f 59/192 60/190 154/191 -f 139/96 140/102 155/193 -f 140/102 58/252 155/193 -f 58/252 59/192 155/193 -f 140/78 141/67 156/195 -f 141/67 57/180 156/195 -f 57/180 58/194 156/195 -f 141/67 142/45 157/181 -f 142/45 56/182 157/181 -f 56/182 57/180 157/181 -f 142/45 143/80 158/183 -f 143/80 55/184 158/183 -f 55/184 56/182 158/183 -f 143/80 144/3 159/185 -f 144/3 54/186 159/185 -f 54/186 55/184 159/185 -f 144/3 145/91 160/187 -f 145/91 53/188 160/187 -f 53/188 54/186 160/187 -f 145/91 146/60 161/189 -f 146/60 52/190 161/189 -f 52/190 53/188 161/189 -f 147/96 132/102 162/193 -f 132/102 82/252 162/193 -f 82/252 51/192 162/193 -f 146/60 147/96 163/191 -f 147/96 51/192 163/191 -f 51/192 52/190 163/191 -f 82/194 65/180 164/197 -f 65/180 97/198 164/197 -f 97/198 98/196 164/197 -f 65/180 64/182 165/199 -f 64/182 96/200 165/199 -f 96/200 97/198 165/199 -f 64/182 63/184 166/201 -f 63/184 95/202 166/201 -f 95/202 96/200 166/201 -f 63/184 62/186 167/203 -f 62/186 94/204 167/203 -f 94/204 95/202 167/203 -f 62/186 61/188 168/205 -f 61/188 93/206 168/205 -f 93/206 94/204 168/205 -f 61/188 60/190 169/207 -f 60/190 92/208 169/207 -f 92/208 93/206 169/207 -f 60/190 59/192 170/209 -f 59/192 91/210 170/209 -f 91/210 92/208 170/209 -f 59/192 58/252 171/211 -f 58/252 90/253 171/211 -f 90/253 91/210 171/211 -f 58/194 57/180 172/197 -f 57/180 89/198 172/197 -f 89/198 90/196 172/197 -f 57/180 56/182 173/199 -f 56/182 88/200 173/199 -f 88/200 89/198 173/199 -f 56/182 55/184 174/201 -f 55/184 87/202 174/201 -f 87/202 88/200 174/201 -f 55/184 54/186 175/203 -f 54/186 86/204 175/203 -f 86/204 87/202 175/203 -f 54/186 53/188 176/205 -f 53/188 85/206 176/205 -f 85/206 86/204 176/205 -f 53/188 52/190 177/207 -f 52/190 84/208 177/207 -f 84/208 85/206 177/207 -f 51/192 82/252 178/211 -f 82/252 98/253 178/211 -f 98/253 83/210 178/211 -f 52/190 51/192 179/209 -f 51/192 83/210 179/209 -f 83/210 84/208 179/209 -f 98/196 97/198 180/212 -f 97/198 81/174 180/212 -f 81/174 66/173 180/212 -f 97/198 96/200 181/229 -f 96/200 80/175 181/229 -f 80/175 81/174 181/229 -f 96/200 95/202 182/230 -f 95/202 79/176 182/230 -f 79/176 80/175 182/230 -f 95/202 94/204 183/231 -f 94/204 78/177 183/231 -f 78/177 79/176 183/231 -f 94/204 93/206 184/232 -f 93/206 77/178 184/232 -f 77/178 78/177 184/232 -f 93/206 92/208 185/233 -f 92/208 76/171 185/233 -f 76/171 77/178 185/233 -f 92/208 91/210 186/234 -f 91/210 75/172 186/234 -f 75/172 76/171 186/234 -f 91/210 90/253 187/235 -f 90/253 74/179 187/235 -f 74/179 75/172 187/235 -f 90/196 89/198 188/212 -f 89/198 73/174 188/212 -f 73/174 74/173 188/212 -f 89/198 88/200 189/229 -f 88/200 72/175 189/229 -f 72/175 73/174 189/229 -f 88/200 87/202 190/230 -f 87/202 71/176 190/230 -f 71/176 72/175 190/230 -f 87/202 86/204 191/231 -f 86/204 70/177 191/231 -f 70/177 71/176 191/231 -f 86/204 85/206 192/232 -f 85/206 69/178 192/232 -f 69/178 70/177 192/232 -f 85/206 84/208 193/233 -f 84/208 68/171 193/233 -f 68/171 69/178 193/233 -f 83/210 98/253 194/235 -f 98/253 66/179 194/235 -f 66/179 67/172 194/235 -f 84/208 83/210 195/234 -f 83/210 67/172 195/234 -f 67/172 68/171 195/234 diff --git a/nixie_tubes/models/nixie_tube.obj b/nixie_tubes/models/nixie_tube.obj deleted file mode 100644 index e2d8f8d..0000000 --- a/nixie_tubes/models/nixie_tube.obj +++ /dev/null @@ -1,712 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'nixie.blend' -# www.blender.org -o nixie_Cylinder.009 -v 0.000000 -0.500000 -0.349999 -v 0.133939 -0.500000 -0.323357 -v 0.247486 -0.500000 -0.247486 -v 0.323357 -0.500000 -0.133939 -v 0.349999 -0.500000 0.000000 -v 0.323357 -0.500000 0.133939 -v 0.247486 -0.500000 0.247486 -v 0.133939 -0.500000 0.323357 -v 0.000000 -0.500000 0.349999 -v -0.133939 -0.500000 0.323357 -v -0.247486 -0.500000 0.247486 -v -0.323357 -0.500000 0.133939 -v -0.349999 -0.500000 -0.000000 -v -0.323357 -0.500000 -0.133939 -v -0.247486 -0.500000 -0.247486 -v -0.133938 -0.500000 -0.323357 -v 0.000000 -0.227297 0.000000 -v 0.000000 -0.500000 0.000000 -v 0.133939 -0.250001 -0.323357 -v 0.247486 -0.250001 -0.247486 -v 0.323357 -0.250001 -0.133939 -v 0.349999 -0.250001 0.000000 -v 0.323357 -0.250001 0.133939 -v 0.247486 -0.250001 0.247486 -v 0.133939 -0.250001 0.323357 -v 0.000000 -0.250001 0.349999 -v -0.133939 -0.250001 0.323357 -v -0.247486 -0.250001 0.247486 -v -0.323357 -0.250001 0.133939 -v -0.349999 -0.250001 -0.000000 -v -0.323357 -0.250001 -0.133939 -v -0.247486 -0.250001 -0.247486 -v -0.133938 -0.250001 -0.323357 -v 0.000000 -0.250001 -0.349999 -v 0.000000 -0.227297 -0.326386 -v 0.124903 -0.227297 -0.301541 -v 0.230790 -0.227297 -0.230790 -v 0.301541 -0.227297 -0.124903 -v 0.326386 -0.227297 0.000000 -v 0.301541 -0.227297 0.124903 -v 0.230790 -0.227297 0.230790 -v 0.124903 -0.227297 0.301541 -v 0.000000 -0.227297 0.326386 -v -0.124902 -0.227297 0.301541 -v -0.230790 -0.227297 0.230790 -v -0.301541 -0.227297 0.124903 -v -0.326386 -0.227297 0.000000 -v -0.301541 -0.227297 -0.124903 -v -0.230790 -0.227297 -0.230790 -v -0.124902 -0.227297 -0.301541 -v -0.086006 0.464059 -0.207637 -v -0.158918 0.464059 -0.158919 -v -0.207637 0.464059 -0.086006 -v -0.224745 0.464059 0.000000 -v -0.207637 0.464059 0.086006 -v -0.158918 0.464059 0.158919 -v -0.086006 0.464059 0.207637 -v 0.000000 0.464059 0.224745 -v 0.086006 0.464059 0.207637 -v 0.158919 0.464059 0.158918 -v 0.207637 0.464059 0.086006 -v 0.224745 0.464059 0.000000 -v 0.207637 0.464059 -0.086006 -v 0.158919 0.464059 -0.158918 -v 0.086006 0.464059 -0.207637 -v 0.000000 0.287854 -0.326386 -v -0.124902 0.287854 -0.301541 -v -0.230790 0.287854 -0.230790 -v -0.301541 0.287854 -0.124903 -v -0.326386 0.287854 0.000000 -v -0.301541 0.287854 0.124903 -v -0.230790 0.287854 0.230790 -v -0.124902 0.287854 0.301541 -v 0.000000 0.287854 0.326386 -v 0.124903 0.287854 0.301541 -v 0.230790 0.287854 0.230790 -v 0.301541 0.287854 0.124903 -v 0.326386 0.287854 0.000000 -v 0.301541 0.287854 -0.124903 -v 0.230790 0.287854 -0.230790 -v 0.124903 0.287854 -0.301541 -v 0.000000 0.464059 -0.224745 -v -0.116015 0.375956 -0.280086 -v -0.214368 0.375956 -0.214368 -v -0.280086 0.375956 -0.116015 -v -0.303163 0.375956 0.000000 -v -0.280086 0.375956 0.116015 -v -0.214368 0.375956 0.214368 -v -0.116015 0.375956 0.280086 -v 0.000000 0.375956 0.303163 -v 0.116015 0.375956 0.280086 -v 0.214368 0.375956 0.214368 -v 0.280086 0.375956 0.116015 -v 0.303163 0.375956 0.000000 -v 0.280086 0.375956 -0.116015 -v 0.214368 0.375956 -0.214368 -v 0.116015 0.375956 -0.280086 -v 0.000000 0.375956 -0.303163 -v 0.000000 0.499996 0.000000 -v -0.017349 0.499996 -0.041885 -v -0.032057 0.499996 -0.032057 -v -0.041885 0.499996 -0.017349 -v -0.045336 0.499996 0.000000 -v -0.041885 0.499996 0.017349 -v -0.032057 0.499996 0.032057 -v -0.017349 0.499996 0.041885 -v 0.000000 0.499996 0.045336 -v 0.017349 0.499996 0.041885 -v 0.032057 0.499996 0.032057 -v 0.041885 0.499996 0.017349 -v 0.045336 0.499996 0.000000 -v 0.041885 0.499996 -0.017349 -v 0.032057 0.499996 -0.032057 -v 0.017349 0.499996 -0.041885 -v 0.000000 0.499996 -0.045336 -v -0.124902 -0.227297 -0.301541 -v -0.230790 -0.227297 -0.230790 -v -0.301541 -0.227297 -0.124903 -v -0.326386 -0.227297 0.000000 -v -0.301541 -0.227297 0.124903 -v -0.230790 -0.227297 0.230790 -v -0.124902 -0.227297 0.301541 -v 0.000000 -0.227297 0.326386 -v 0.124903 -0.227297 0.301541 -v 0.230790 -0.227297 0.230790 -v 0.301541 -0.227297 0.124903 -v 0.326386 -0.227297 0.000000 -v 0.301541 -0.227297 -0.124903 -v 0.230790 -0.227297 -0.230790 -v 0.124903 -0.227297 -0.301541 -v 0.000000 -0.227297 -0.326386 -v 0.000000 0.489328 -0.147416 -v 0.056414 0.489328 -0.136194 -v 0.104239 0.489328 -0.104239 -v 0.136195 0.489328 -0.056414 -v 0.147416 0.489328 0.000000 -v 0.136195 0.489328 0.056414 -v 0.104239 0.489328 0.104239 -v 0.056414 0.489328 0.136194 -v 0.000000 0.489328 0.147416 -v -0.056414 0.489328 0.136195 -v -0.104239 0.489328 0.104239 -v -0.136194 0.489328 0.056414 -v -0.147416 0.489328 0.000000 -v -0.136194 0.489328 -0.056414 -v -0.104239 0.489328 -0.104239 -v -0.056414 0.489328 -0.136195 -v -0.224443 -0.231638 -0.000969 -v -0.224444 0.401803 -0.000969 -v 0.224447 -0.231638 -0.000969 -v 0.224447 0.401804 -0.000969 -v 0.000002 -0.231638 -0.123652 -v 0.000001 0.401804 -0.123652 -v -0.182487 -0.231638 -0.073743 -v 0.182490 0.401804 -0.073743 -v 0.182490 -0.231638 -0.073743 -v -0.182487 0.401804 -0.073743 -v -0.229076 -0.231638 -0.015446 -v 0.229079 0.401804 -0.015446 -v 0.124738 -0.231638 -0.102105 -v -0.124735 0.401804 -0.102105 -v -0.124735 -0.231638 -0.102105 -v 0.124738 0.401804 -0.102105 -v 0.229080 -0.231638 -0.015446 -v -0.229076 0.401803 -0.015446 -v 0.249582 0.401804 0.050941 -v 0.249582 -0.231638 0.050941 -v -0.249579 0.401803 0.050941 -v -0.249579 -0.231638 0.050941 -v 0.000002 -0.231638 -0.007523 -v 0.000001 0.401803 -0.007523 -v 0.036330 0.475456 -0.182642 -v 0.103459 0.475456 -0.154837 -v 0.154837 0.475456 -0.103459 -v 0.182643 0.475456 -0.036330 -v 0.182643 0.475456 0.036330 -v 0.154837 0.475456 0.103459 -v 0.103459 0.475456 0.154837 -v 0.036330 0.475456 0.182642 -v -0.036330 0.475456 0.182642 -v -0.103459 0.475456 0.154837 -v -0.154837 0.475456 0.103459 -v -0.182642 0.475456 0.036330 -v -0.182642 0.475456 -0.036330 -v -0.154837 0.475456 -0.103459 -v -0.036330 0.475456 -0.182642 -v -0.103459 0.475456 -0.154837 -v 0.051025 0.416957 -0.256519 -v 0.145306 0.416957 -0.217466 -v 0.217466 0.416957 -0.145306 -v 0.256519 0.416957 -0.051025 -v 0.256519 0.416957 0.051025 -v 0.217466 0.416957 0.145306 -v 0.145306 0.416957 0.217466 -v 0.051025 0.416957 0.256519 -v -0.051025 0.416957 0.256519 -v -0.145306 0.416957 0.217466 -v -0.217466 0.416957 0.145306 -v -0.256519 0.416957 0.051025 -v -0.256519 0.416957 -0.051025 -v -0.217466 0.416957 -0.145306 -v -0.051025 0.416957 -0.256519 -v -0.145306 0.416957 -0.217466 -v 0.060277 0.330972 -0.303030 -v 0.171653 0.330972 -0.256897 -v 0.256897 0.330972 -0.171653 -v 0.303030 0.330972 -0.060276 -v 0.303030 0.330972 0.060277 -v 0.256897 0.330972 0.171653 -v 0.171653 0.330972 0.256897 -v 0.060277 0.330972 0.303030 -v -0.060276 0.330972 0.303031 -v -0.171653 0.330972 0.256897 -v -0.256897 0.330972 0.171653 -v -0.303030 0.330972 0.060277 -v -0.303030 0.330972 -0.060277 -v -0.256897 0.330972 -0.171653 -v -0.060276 0.330972 -0.303031 -v -0.171653 0.330972 -0.256897 -vt 0.500000 0.750000 -vt 0.595671 0.730970 -vt 0.500000 0.500000 -vt 0.437500 0.000000 -vt 0.437500 0.250000 -vt 0.375000 0.250000 -vt 0.375000 0.000000 -vt 0.312500 0.250000 -vt 0.312500 0.000000 -vt 0.250000 0.250000 -vt 0.250000 0.000000 -vt 0.187500 0.250000 -vt 0.187500 0.000000 -vt 0.125000 0.250000 -vt 0.125000 0.000000 -vt 0.062500 0.250000 -vt 0.062500 0.000000 -vt 0.000000 0.250000 -vt 0.000000 0.000000 -vt 1.000000 0.000000 -vt 1.000000 0.250000 -vt 0.937500 0.250000 -vt 0.937500 0.000000 -vt 0.875000 0.250000 -vt 0.875000 0.000000 -vt 0.812500 0.250000 -vt 0.812500 0.000000 -vt 0.750000 0.250000 -vt 0.750000 0.000000 -vt 0.687500 0.250000 -vt 0.687500 0.000000 -vt 0.625000 0.250000 -vt 0.625000 0.000000 -vt 0.562500 0.250000 -vt 0.562500 0.000000 -vt 0.500000 0.000000 -vt 0.500000 0.250000 -vt 0.676777 0.676777 -vt 0.500000 0.733134 -vt 0.589216 0.715388 -vt 0.664850 0.664850 -vt 0.715388 0.589216 -vt 0.730970 0.595671 -vt 0.733134 0.500000 -vt 0.750000 0.500000 -vt 0.715388 0.410784 -vt 0.730970 0.404329 -vt 0.664850 0.335149 -vt 0.676777 0.323223 -vt 0.589216 0.284612 -vt 0.595671 0.269030 -vt 0.500000 0.266866 -vt 0.410784 0.284612 -vt 0.404329 0.269030 -vt 0.335150 0.335149 -vt 0.323223 0.323223 -vt 0.284612 0.410784 -vt 0.269030 0.404329 -vt 0.266866 0.500000 -vt 0.250000 0.500000 -vt 0.284612 0.589217 -vt 0.269030 0.595671 -vt 0.335150 0.664851 -vt 0.323223 0.676777 -vt 0.404329 0.730970 -vt 0.410784 0.715388 -vt 0.000000 1.000000 -vt 1.000000 1.000000 -vt 0.500000 1.000000 -vt 0.093750 1.000000 -vt 0.093750 0.000000 -vt 0.906250 0.000000 -vt 0.906250 1.000000 -vt 0.718750 0.000000 -vt 0.718750 1.000000 -vt 0.812500 1.000000 -vt 0.312500 1.000000 -vt 0.218750 1.000000 -vt 0.218750 0.000000 -vt 0.125000 1.000000 -vt 0.250000 0.320312 -vt 0.125000 0.320312 -vt 1.000000 0.320312 -vt 0.875000 0.320312 -vt 0.750000 0.320312 -vt 0.625000 0.320312 -vt 0.500000 0.320312 -vt 0.375000 0.320312 -vt 0.000000 0.320312 -vt 0.875000 0.445312 -vt 0.875000 0.500000 -vt 0.812500 0.469977 -vt 0.750000 0.445312 -vt 0.687500 0.469977 -vt 0.625000 0.445312 -vt 0.625000 0.500000 -vt 0.562500 0.469977 -vt 0.500000 0.445312 -vt 0.437500 0.469977 -vt 0.375000 0.445312 -vt 0.375000 0.500000 -vt 0.312500 0.469977 -vt 0.250000 0.445312 -vt 0.187500 0.469977 -vt 0.125000 0.445312 -vt 0.125000 0.500000 -vt 0.062500 0.469977 -vt 1.000000 0.445312 -vt 1.000000 0.500000 -vt 0.937500 0.469977 -vt 1.000000 0.375000 -vt 0.937500 0.407722 -vt 0.875000 0.375000 -vt 0.812500 0.407722 -vt 0.750000 0.375000 -vt 0.687500 0.407722 -vt 0.625000 0.375000 -vt 0.562500 0.407722 -vt 0.500000 0.375000 -vt 0.437500 0.407722 -vt 0.375000 0.375000 -vt 0.312500 0.407722 -vt 0.250000 0.375000 -vt 0.187500 0.407722 -vt 0.125000 0.375000 -vt 0.062500 0.407722 -vt 0.937500 0.347077 -vt 0.537472 0.537472 -vt 0.520280 0.548959 -vt 0.548959 0.520280 -vt 0.552993 0.500000 -vt 0.548959 0.479721 -vt 0.537472 0.462529 -vt 0.520280 0.451041 -vt 0.500000 0.447008 -vt 0.479721 0.451041 -vt 0.462529 0.462529 -vt 0.451041 0.479721 -vt 0.447007 0.500000 -vt 0.451041 0.520280 -vt 0.462529 0.537472 -vt 0.479721 0.548959 -vt 0.500000 0.552993 -vt 0.812500 0.347077 -vt 0.687500 0.347077 -vt 0.562500 0.347077 -vt 0.437500 0.347077 -vt 0.312500 0.347077 -vt 0.187500 0.347077 -vt 0.062500 0.347077 -vt 0.378156 0.621844 -vt 0.434059 0.659197 -vt 0.500000 0.672314 -vt 0.340803 0.565942 -vt 0.327687 0.500000 -vt 0.340803 0.434059 -vt 0.378156 0.378156 -vt 0.434059 0.340803 -vt 0.500000 0.327687 -vt 0.565942 0.340803 -vt 0.621844 0.378156 -vt 0.659197 0.434059 -vt 0.672314 0.500000 -vt 0.659197 0.565942 -vt 0.621844 0.621844 -vt 0.565942 0.659197 -vt 0.000000 0.500000 -vt 0.000000 0.445312 -vt 0.000000 0.375000 -g nixie_Cylinder.009_base -s 1 -f 1/1 2/2 18/3 -f 1/4 34/5 19/6 2/7 -f 2/7 19/6 20/8 3/9 -f 3/9 20/8 21/10 4/11 -f 4/11 21/10 22/12 5/13 -f 5/13 22/12 23/14 6/15 -f 6/15 23/14 24/16 7/17 -f 7/17 24/16 25/18 8/19 -f 8/20 25/21 26/22 9/23 -f 9/23 26/22 27/24 10/25 -f 10/25 27/24 28/26 11/27 -f 11/27 28/26 29/28 12/29 -f 12/29 29/28 30/30 13/31 -f 13/31 30/30 31/32 14/33 -f 14/33 31/32 32/34 15/35 -f 16/36 33/37 34/5 1/4 -f 15/35 32/34 33/37 16/36 -f 2/2 3/38 18/3 -f 34/1 35/39 36/40 19/2 -f 19/2 36/40 37/41 20/38 -f 20/38 37/41 38/42 21/43 -f 21/43 38/42 39/44 22/45 -f 22/45 39/44 40/46 23/47 -f 23/47 40/46 41/48 24/49 -f 24/49 41/48 42/50 25/51 -f 25/51 42/50 43/52 26/37 -f 26/37 43/52 44/53 27/54 -f 27/54 44/53 45/55 28/56 -f 28/56 45/55 46/57 29/58 -f 29/58 46/57 47/59 30/60 -f 30/60 47/59 48/61 31/62 -f 31/62 48/61 49/63 32/64 -f 33/65 50/66 35/39 34/1 -f 32/64 49/63 50/66 33/65 -f 3/38 4/43 18/3 -f 4/43 5/45 18/3 -f 5/45 6/47 18/3 -f 6/47 7/49 18/3 -f 7/49 8/51 18/3 -f 8/51 9/37 18/3 -f 9/37 10/54 18/3 -f 10/54 11/56 18/3 -f 11/56 12/58 18/3 -f 12/58 13/60 18/3 -f 13/60 14/62 18/3 -f 14/62 15/64 18/3 -f 15/64 16/65 18/3 -f 16/65 1/1 18/3 -f 50/66 35/39 17/3 -f 35/39 36/40 17/3 -f 36/40 37/41 17/3 -f 37/41 38/42 17/3 -f 38/42 39/44 17/3 -f 39/44 40/46 17/3 -f 40/46 41/48 17/3 -f 41/48 42/50 17/3 -f 42/50 43/52 17/3 -f 43/52 44/53 17/3 -f 44/53 45/55 17/3 -f 45/55 46/57 17/3 -f 46/57 47/59 17/3 -f 47/59 48/61 17/3 -f 48/61 49/63 17/3 -f 49/63 50/66 17/3 -g nixie_Cylinder.009_backing -f 169/67 168/68 166/20 167/19 -g nixie_Cylinder.009_cathode -f 170/36 171/69 151/70 150/71 -f 148/72 149/73 171/69 170/36 -g nixie_Cylinder.009_anode -f 162/74 161/75 153/69 152/36 -f 158/72 165/73 157/76 154/27 -f 160/9 163/77 155/78 156/79 -f 152/36 153/69 163/77 160/9 -f 154/27 157/76 161/75 162/74 -f 156/79 155/78 159/80 164/15 -f 164/15 159/80 166/67 167/19 -f 169/20 168/68 165/73 158/72 -g nixie_Cylinder.009_glass -f 68/81 67/82 116/15 117/11 -f 131/20 66/83 81/84 130/25 -f 81/84 80/85 129/29 130/25 -f 80/85 79/86 128/33 129/29 -f 79/86 78/87 127/36 128/33 -f 78/87 77/88 126/7 127/36 -f 77/88 76/81 125/11 126/7 -f 76/81 75/82 124/15 125/11 -f 75/82 74/89 123/19 124/15 -f 74/83 73/84 122/25 123/20 -f 73/84 72/85 121/29 122/25 -f 72/85 71/86 120/33 121/29 -f 71/86 70/87 119/36 120/33 -f 70/87 69/88 118/7 119/36 -f 69/88 68/81 117/11 118/7 -f 67/82 66/89 131/19 116/15 -f 65/90 133/91 173/92 -f 64/93 134/45 174/94 -f 63/95 135/96 175/97 -f 62/98 136/3 176/99 -f 61/100 137/101 177/102 -f 60/103 138/60 178/104 -f 59/105 139/106 179/107 -f 58/108 140/109 180/110 -f 57/90 141/91 181/92 -f 56/93 142/45 182/94 -f 55/95 143/96 183/97 -f 54/98 144/3 184/99 -f 53/100 145/101 185/102 -f 51/105 147/106 186/107 -f 52/103 146/60 187/104 -f 98/111 82/108 188/112 -f 97/113 65/90 189/114 -f 96/115 64/93 190/116 -f 95/117 63/95 191/118 -f 94/119 62/98 192/120 -f 93/121 61/100 193/122 -f 92/123 60/103 194/124 -f 91/125 59/105 195/126 -f 90/111 58/108 196/112 -f 89/113 57/90 197/114 -f 88/115 56/93 198/116 -f 87/117 55/95 199/118 -f 86/119 54/98 200/120 -f 85/121 53/100 201/122 -f 83/125 51/105 202/126 -f 84/123 52/103 203/124 -f 66/83 98/111 204/127 -f 113/128 114/129 99/3 -f 112/130 113/128 99/3 -f 111/131 112/130 99/3 -f 110/132 111/131 99/3 -f 109/133 110/132 99/3 -f 108/134 109/133 99/3 -f 107/135 108/134 99/3 -f 106/136 107/135 99/3 -f 105/137 106/136 99/3 -f 104/138 105/137 99/3 -f 103/139 104/138 99/3 -f 102/140 103/139 99/3 -f 101/141 102/140 99/3 -f 100/142 101/141 99/3 -f 115/143 100/142 99/3 -f 81/84 97/113 205/144 -f 80/85 96/115 206/145 -f 79/86 95/117 207/146 -f 78/87 94/119 208/147 -f 77/88 93/121 209/148 -f 76/81 92/123 210/149 -f 75/82 91/125 211/150 -f 74/83 90/111 212/127 -f 73/84 89/113 213/144 -f 72/85 88/115 214/145 -f 71/86 87/117 215/146 -f 70/87 86/119 216/147 -f 69/88 85/121 217/148 -f 67/82 83/125 218/150 -f 68/81 84/123 219/149 -f 114/129 115/143 99/3 -f 146/151 101/141 100/142 147/152 -f 147/152 100/142 115/143 132/153 -f 145/154 102/140 101/141 146/151 -f 144/155 103/139 102/140 145/154 -f 143/156 104/138 103/139 144/155 -f 142/157 105/137 104/138 143/156 -f 141/158 106/136 105/137 142/157 -f 140/159 107/135 106/136 141/158 -f 139/160 108/134 107/135 140/159 -f 138/161 109/133 108/134 139/160 -f 137/162 110/132 109/133 138/161 -f 136/163 111/131 110/132 137/162 -f 135/164 112/130 111/131 136/163 -f 134/165 113/128 112/130 135/164 -f 133/166 114/129 113/128 134/165 -f 132/153 115/143 114/129 133/166 -f 82/108 132/109 172/110 -f 132/109 133/91 172/110 -f 133/91 65/90 172/110 -f 65/90 82/108 172/110 -f 133/91 134/45 173/92 -f 134/45 64/93 173/92 -f 64/93 65/90 173/92 -f 134/45 135/96 174/94 -f 135/96 63/95 174/94 -f 63/95 64/93 174/94 -f 135/96 136/3 175/97 -f 136/3 62/98 175/97 -f 62/98 63/95 175/97 -f 136/3 137/101 176/99 -f 137/101 61/100 176/99 -f 61/100 62/98 176/99 -f 137/101 138/60 177/102 -f 138/60 60/103 177/102 -f 60/103 61/100 177/102 -f 138/60 139/106 178/104 -f 139/106 59/105 178/104 -f 59/105 60/103 178/104 -f 139/106 140/167 179/107 -f 140/167 58/168 179/107 -f 58/168 59/105 179/107 -f 140/109 141/91 180/110 -f 141/91 57/90 180/110 -f 57/90 58/108 180/110 -f 141/91 142/45 181/92 -f 142/45 56/93 181/92 -f 56/93 57/90 181/92 -f 142/45 143/96 182/94 -f 143/96 55/95 182/94 -f 55/95 56/93 182/94 -f 143/96 144/3 183/97 -f 144/3 54/98 183/97 -f 54/98 55/95 183/97 -f 144/3 145/101 184/99 -f 145/101 53/100 184/99 -f 53/100 54/98 184/99 -f 145/101 146/60 185/102 -f 146/60 52/103 185/102 -f 52/103 53/100 185/102 -f 147/106 132/167 186/107 -f 132/167 82/168 186/107 -f 82/168 51/105 186/107 -f 146/60 147/106 187/104 -f 147/106 51/105 187/104 -f 51/105 52/103 187/104 -f 82/108 65/90 188/112 -f 65/90 97/113 188/112 -f 97/113 98/111 188/112 -f 65/90 64/93 189/114 -f 64/93 96/115 189/114 -f 96/115 97/113 189/114 -f 64/93 63/95 190/116 -f 63/95 95/117 190/116 -f 95/117 96/115 190/116 -f 63/95 62/98 191/118 -f 62/98 94/119 191/118 -f 94/119 95/117 191/118 -f 62/98 61/100 192/120 -f 61/100 93/121 192/120 -f 93/121 94/119 192/120 -f 61/100 60/103 193/122 -f 60/103 92/123 193/122 -f 92/123 93/121 193/122 -f 60/103 59/105 194/124 -f 59/105 91/125 194/124 -f 91/125 92/123 194/124 -f 59/105 58/168 195/126 -f 58/168 90/169 195/126 -f 90/169 91/125 195/126 -f 58/108 57/90 196/112 -f 57/90 89/113 196/112 -f 89/113 90/111 196/112 -f 57/90 56/93 197/114 -f 56/93 88/115 197/114 -f 88/115 89/113 197/114 -f 56/93 55/95 198/116 -f 55/95 87/117 198/116 -f 87/117 88/115 198/116 -f 55/95 54/98 199/118 -f 54/98 86/119 199/118 -f 86/119 87/117 199/118 -f 54/98 53/100 200/120 -f 53/100 85/121 200/120 -f 85/121 86/119 200/120 -f 53/100 52/103 201/122 -f 52/103 84/123 201/122 -f 84/123 85/121 201/122 -f 51/105 82/168 202/126 -f 82/168 98/169 202/126 -f 98/169 83/125 202/126 -f 52/103 51/105 203/124 -f 51/105 83/125 203/124 -f 83/125 84/123 203/124 -f 98/111 97/113 204/127 -f 97/113 81/84 204/127 -f 81/84 66/83 204/127 -f 97/113 96/115 205/144 -f 96/115 80/85 205/144 -f 80/85 81/84 205/144 -f 96/115 95/117 206/145 -f 95/117 79/86 206/145 -f 79/86 80/85 206/145 -f 95/117 94/119 207/146 -f 94/119 78/87 207/146 -f 78/87 79/86 207/146 -f 94/119 93/121 208/147 -f 93/121 77/88 208/147 -f 77/88 78/87 208/147 -f 93/121 92/123 209/148 -f 92/123 76/81 209/148 -f 76/81 77/88 209/148 -f 92/123 91/125 210/149 -f 91/125 75/82 210/149 -f 75/82 76/81 210/149 -f 91/125 90/169 211/150 -f 90/169 74/89 211/150 -f 74/89 75/82 211/150 -f 90/111 89/113 212/127 -f 89/113 73/84 212/127 -f 73/84 74/83 212/127 -f 89/113 88/115 213/144 -f 88/115 72/85 213/144 -f 72/85 73/84 213/144 -f 88/115 87/117 214/145 -f 87/117 71/86 214/145 -f 71/86 72/85 214/145 -f 87/117 86/119 215/146 -f 86/119 70/87 215/146 -f 70/87 71/86 215/146 -f 86/119 85/121 216/147 -f 85/121 69/88 216/147 -f 69/88 70/87 216/147 -f 85/121 84/123 217/148 -f 84/123 68/81 217/148 -f 68/81 69/88 217/148 -f 83/125 98/169 218/150 -f 98/169 66/89 218/150 -f 66/89 67/82 218/150 -f 84/123 83/125 219/149 -f 83/125 67/82 219/149 -f 67/82 68/81 219/149 diff --git a/nixie_tubes/screenshot.png b/nixie_tubes/screenshot.png deleted file mode 100644 index 38523ac..0000000 Binary files a/nixie_tubes/screenshot.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_anode.png b/nixie_tubes/textures/decatron_anode.png deleted file mode 100644 index 98ad8c7..0000000 Binary files a/nixie_tubes/textures/decatron_anode.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_0.png b/nixie_tubes/textures/decatron_cathode_0.png deleted file mode 100644 index be1fff0..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_0.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_1.png b/nixie_tubes/textures/decatron_cathode_1.png deleted file mode 100644 index 4171fc3..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_1.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_2.png b/nixie_tubes/textures/decatron_cathode_2.png deleted file mode 100644 index ef8ca2a..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_2.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_3.png b/nixie_tubes/textures/decatron_cathode_3.png deleted file mode 100644 index a3509df..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_3.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_4.png b/nixie_tubes/textures/decatron_cathode_4.png deleted file mode 100644 index 0f38c4e..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_4.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_5.png b/nixie_tubes/textures/decatron_cathode_5.png deleted file mode 100644 index 60a8717..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_5.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_6.png b/nixie_tubes/textures/decatron_cathode_6.png deleted file mode 100644 index 8fb1bef..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_6.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_7.png b/nixie_tubes/textures/decatron_cathode_7.png deleted file mode 100644 index 5925788..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_7.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_8.png b/nixie_tubes/textures/decatron_cathode_8.png deleted file mode 100644 index c3009ca..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_8.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_9.png b/nixie_tubes/textures/decatron_cathode_9.png deleted file mode 100644 index dd19aa5..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_9.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_cathode_pins.png b/nixie_tubes/textures/decatron_cathode_pins.png deleted file mode 100644 index d7a9d25..0000000 Binary files a/nixie_tubes/textures/decatron_cathode_pins.png and /dev/null differ diff --git a/nixie_tubes/textures/decatron_internals.png b/nixie_tubes/textures/decatron_internals.png deleted file mode 100644 index 170eea6..0000000 Binary files a/nixie_tubes/textures/decatron_internals.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_1.png b/nixie_tubes/textures/nixie_tube_alnum_seg_1.png deleted file mode 100644 index 3cc70b0..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_1.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_10.png b/nixie_tubes/textures/nixie_tube_alnum_seg_10.png deleted file mode 100644 index 8b01a26..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_10.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_11.png b/nixie_tubes/textures/nixie_tube_alnum_seg_11.png deleted file mode 100644 index 0664dcb..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_11.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_12.png b/nixie_tubes/textures/nixie_tube_alnum_seg_12.png deleted file mode 100644 index 4739711..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_12.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_13.png b/nixie_tubes/textures/nixie_tube_alnum_seg_13.png deleted file mode 100644 index 92d4980..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_13.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_14.png b/nixie_tubes/textures/nixie_tube_alnum_seg_14.png deleted file mode 100644 index 8cfccb1..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_14.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_15.png b/nixie_tubes/textures/nixie_tube_alnum_seg_15.png deleted file mode 100644 index 61aeead..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_15.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_2.png b/nixie_tubes/textures/nixie_tube_alnum_seg_2.png deleted file mode 100644 index 34bd0a5..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_2.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_3.png b/nixie_tubes/textures/nixie_tube_alnum_seg_3.png deleted file mode 100644 index 94f95f2..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_3.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_4.png b/nixie_tubes/textures/nixie_tube_alnum_seg_4.png deleted file mode 100644 index 5b435d7..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_4.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_5.png b/nixie_tubes/textures/nixie_tube_alnum_seg_5.png deleted file mode 100644 index 3abdd45..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_5.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_6.png b/nixie_tubes/textures/nixie_tube_alnum_seg_6.png deleted file mode 100644 index 8d1f0a8..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_6.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_7.png b/nixie_tubes/textures/nixie_tube_alnum_seg_7.png deleted file mode 100644 index 9bcdcb1..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_7.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_8.png b/nixie_tubes/textures/nixie_tube_alnum_seg_8.png deleted file mode 100644 index 7668d42..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_8.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_seg_9.png b/nixie_tubes/textures/nixie_tube_alnum_seg_9.png deleted file mode 100644 index 30bf7db..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_seg_9.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_alnum_wires.png b/nixie_tubes/textures/nixie_tube_alnum_wires.png deleted file mode 100644 index f993a8a..0000000 Binary files a/nixie_tubes/textures/nixie_tube_alnum_wires.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_anode.png b/nixie_tubes/textures/nixie_tube_anode.png deleted file mode 100644 index 4d7329e..0000000 Binary files a/nixie_tubes/textures/nixie_tube_anode.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_backing.png b/nixie_tubes/textures/nixie_tube_backing.png deleted file mode 100644 index 23874db..0000000 Binary files a/nixie_tubes/textures/nixie_tube_backing.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_base.png b/nixie_tubes/textures/nixie_tube_base.png deleted file mode 100644 index 9f6b13f..0000000 Binary files a/nixie_tubes/textures/nixie_tube_base.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_blank.png b/nixie_tubes/textures/nixie_tube_blank.png deleted file mode 100644 index 37c28e7..0000000 Binary files a/nixie_tubes/textures/nixie_tube_blank.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_0.png b/nixie_tubes/textures/nixie_tube_cathode_0.png deleted file mode 100644 index 3b9032d..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_0.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_1.png b/nixie_tubes/textures/nixie_tube_cathode_1.png deleted file mode 100644 index 5a12a64..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_1.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_2.png b/nixie_tubes/textures/nixie_tube_cathode_2.png deleted file mode 100644 index d8cba25..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_2.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_3.png b/nixie_tubes/textures/nixie_tube_cathode_3.png deleted file mode 100644 index 7e3c758..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_3.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_4.png b/nixie_tubes/textures/nixie_tube_cathode_4.png deleted file mode 100644 index c2b8e81..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_4.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_5.png b/nixie_tubes/textures/nixie_tube_cathode_5.png deleted file mode 100644 index 67383d6..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_5.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_6.png b/nixie_tubes/textures/nixie_tube_cathode_6.png deleted file mode 100644 index 3a56552..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_6.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_7.png b/nixie_tubes/textures/nixie_tube_cathode_7.png deleted file mode 100644 index 07ceafb..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_7.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_8.png b/nixie_tubes/textures/nixie_tube_cathode_8.png deleted file mode 100644 index 95e2809..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_8.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_9.png b/nixie_tubes/textures/nixie_tube_cathode_9.png deleted file mode 100644 index 8aaf82d..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_9.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_colon.png b/nixie_tubes/textures/nixie_tube_cathode_colon.png deleted file mode 100644 index 97fd6a6..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_colon.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_off.png b/nixie_tubes/textures/nixie_tube_cathode_off.png deleted file mode 100644 index 97d5591..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_off.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_cathode_period.png b/nixie_tubes/textures/nixie_tube_cathode_period.png deleted file mode 100644 index f9b668f..0000000 Binary files a/nixie_tubes/textures/nixie_tube_cathode_period.png and /dev/null differ diff --git a/nixie_tubes/textures/nixie_tube_glass.png b/nixie_tubes/textures/nixie_tube_glass.png deleted file mode 100644 index a50754b..0000000 Binary files a/nixie_tubes/textures/nixie_tube_glass.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_0.png b/nixie_tubes/textures/numitron_0.png deleted file mode 100644 index 2ff78c9..0000000 Binary files a/nixie_tubes/textures/numitron_0.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_1.png b/nixie_tubes/textures/numitron_1.png deleted file mode 100644 index 3da4764..0000000 Binary files a/nixie_tubes/textures/numitron_1.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_2.png b/nixie_tubes/textures/numitron_2.png deleted file mode 100644 index 6748af6..0000000 Binary files a/nixie_tubes/textures/numitron_2.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_3.png b/nixie_tubes/textures/numitron_3.png deleted file mode 100644 index 67744bc..0000000 Binary files a/nixie_tubes/textures/numitron_3.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_4.png b/nixie_tubes/textures/numitron_4.png deleted file mode 100644 index 9cc27f7..0000000 Binary files a/nixie_tubes/textures/numitron_4.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_5.png b/nixie_tubes/textures/numitron_5.png deleted file mode 100644 index 56dfe82..0000000 Binary files a/nixie_tubes/textures/numitron_5.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_6.png b/nixie_tubes/textures/numitron_6.png deleted file mode 100644 index 4e147c8..0000000 Binary files a/nixie_tubes/textures/numitron_6.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_7.png b/nixie_tubes/textures/numitron_7.png deleted file mode 100644 index b701433..0000000 Binary files a/nixie_tubes/textures/numitron_7.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_8.png b/nixie_tubes/textures/numitron_8.png deleted file mode 100644 index bf9da7a..0000000 Binary files a/nixie_tubes/textures/numitron_8.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_9.png b/nixie_tubes/textures/numitron_9.png deleted file mode 100644 index 65b138b..0000000 Binary files a/nixie_tubes/textures/numitron_9.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_colon.png b/nixie_tubes/textures/numitron_colon.png deleted file mode 100644 index ca097d8..0000000 Binary files a/nixie_tubes/textures/numitron_colon.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_filaments.png b/nixie_tubes/textures/numitron_filaments.png deleted file mode 100644 index 8f4d9b3..0000000 Binary files a/nixie_tubes/textures/numitron_filaments.png and /dev/null differ diff --git a/nixie_tubes/textures/numitron_period.png b/nixie_tubes/textures/numitron_period.png deleted file mode 100644 index 335d2a5..0000000 Binary files a/nixie_tubes/textures/numitron_period.png and /dev/null differ diff --git a/sprint/COPYING b/sprint/COPYING deleted file mode 100644 index 0e259d4..0000000 --- a/sprint/COPYING +++ /dev/null @@ -1,121 +0,0 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. diff --git a/sprint/README.md b/sprint/README.md deleted file mode 100644 index 71e7d44..0000000 --- a/sprint/README.md +++ /dev/null @@ -1,62 +0,0 @@ -Sprint Mod For Minetest by GunshipPenguin - -Allows the player to sprint by either double tapping w or pressing e. -By default, sprinting will make the player travel 80% faster and -allow him/her to jump 10% higher. Also adds a stamina bar that goes -down when the player sprints and goes up when he/she isn't -sprinting. - -This mod is compatible with the HUD bars [hudbars] mod, but does -not depend on it. In this care, a green HUD bar will be displayed, -also showing a number. -If this mod is not present, a standard statbar with 0-20 -“half-arrows” is shown, which is a bit more coarse than the HUD -bar version. - - -Licence: CC0 (see COPYING file) - ---- - -This mod can be configured by changing the variables declared in -the start of init.lua. The following is a brief explanation of each -one. - -SPRINT_METHOD (default 1) - -What a player has to do to start sprinting. 0 = double tap w, 1 = press e. -Note that if you have the fast privlige, and have the fast -speed turned on, you will run very, very fast. You can toggle this -by pressing j. - -SPRINT_SPEED (default 1.5) - -How fast the player will move when sprinting as opposed to normal -movement speed. 1.0 represents normal speed so 1.5 would mean that a -sprinting player would travel 50% faster than a walking player and -2.4 would mean that a sprinting player would travel 140% faster than -a walking player. - -SPRINT_JUMP (default 1.1) - -How high the player will jump when sprinting as opposed to normal -jump height. Same as SPRINT_SPEED, just controls jump height while -sprinting rather than speed. - -SPRINT_STAMINA (default 20) - -How long the player can sprint for in seconds. Each player has a -stamina variable assigned to them, it is initially set to -SPRINT_STAMINA and can go no higher. When the player is sprinting, -this variable ticks down once each second, and when it reaches 0, -the player stops sprinting. It ticks back up when the player isn't -sprinting and stops at SPRINT_STAMINA. Set this to a huge value if -you want unlimited sprinting. - -SPRINT_TIMEOUT (default 0.5) - -Only used if SPRINT_METHOD = 0. -How much time the player has after releasing w, to press w again and -start sprinting. Setting this too high will result in unwanted -sprinting and setting it too low will result in it being -difficult/impossible to sprint. diff --git a/sprint/depends.txt b/sprint/depends.txt deleted file mode 100644 index 3e1d5c2..0000000 --- a/sprint/depends.txt +++ /dev/null @@ -1 +0,0 @@ -hudbars? diff --git a/sprint/esprint.lua b/sprint/esprint.lua deleted file mode 100644 index 87797ec..0000000 --- a/sprint/esprint.lua +++ /dev/null @@ -1,125 +0,0 @@ ---[[ -Sprint mod for Minetest by GunshipPenguin - -To the extent possible under law, the author(s) -have dedicated all copyright and related and neighboring rights -to this software to the public domain worldwide. This software is -distributed without any warranty. -]] - -local players = {} -local staminaHud = {} - -local function setSprinting(playerName, sprinting) --Sets the state of a player (0=stopped/moving, 1=sprinting) - local player = minetest.get_player_by_name(playerName) - if players[playerName] then - players[playerName]["sprinting"] = sprinting - if sprinting == true then - player:set_physics_override({speed=SPRINT_SPEED,jump=SPRINT_JUMP}) - elseif sprinting == false then - player:set_physics_override({speed=1.0,jump=1.0}) - end - return true - end - return false -end - -minetest.register_on_joinplayer(function(player) - local playerName = player:get_player_name() - - players[playerName] = { - sprinting = false, - timeOut = 0, - stamina = SPRINT_STAMINA, - shouldSprint = false, - } - if SPRINT_HUDBARS_USED then - hb.init_hudbar(player, "sprint") - else - players[playerName].hud = player:hud_add({ - hud_elem_type = "statbar", - position = {x=0.5,y=1}, - size = {x=24, y=24}, - text = "sprint_stamina_icon.png", - number = 20, - alignment = {x=0,y=1}, - offset = {x=-263, y=-110}, - } - ) - end -end) -minetest.register_on_leaveplayer(function(player) - local playerName = player:get_player_name() - players[playerName] = nil -end) -minetest.register_globalstep(function(dtime) - --Get the gametime - local gameTime = minetest.get_gametime() - - --Loop through all connected players - for playerName,playerInfo in pairs(players) do - local player = minetest.get_player_by_name(playerName) - if player ~= nil then - --Check if the player should be sprinting - if player:get_player_control()["aux1"] and player:get_player_control()["up"] then - players[playerName]["shouldSprint"] = true - else - players[playerName]["shouldSprint"] = false - end - - --If the player is sprinting, create particles behind him/her - if playerInfo["sprinting"] == true and gameTime % 0.1 == 0 then - local numParticles = math.random(1, 2) - local playerPos = player:getpos() - local playerNode = minetest.get_node({x=playerPos["x"], y=playerPos["y"]-1, z=playerPos["z"]}) - if playerNode["name"] ~= "air" then - for i=1, numParticles, 1 do - minetest.add_particle({ - pos = {x=playerPos["x"]+math.random(-1,1)*math.random()/2,y=playerPos["y"]+0.1,z=playerPos["z"]+math.random(-1,1)*math.random()/2}, - vel = {x=0, y=5, z=0}, - acc = {x=0, y=-13, z=0}, - expirationtime = math.random(), - size = math.random()+0.5, - collisiondetection = true, - vertical = false, - texture = "sprint_particle.png", - }) - end - end - end - - --Adjust player states - if players[playerName]["shouldSprint"] == true then --Stopped - setSprinting(playerName, true) - elseif players[playerName]["shouldSprint"] == false then - setSprinting(playerName, false) - end - - --Lower the player's stamina by dtime if he/she is sprinting and set his/her state to 0 if stamina is zero - if playerInfo["sprinting"] == true then - playerInfo["stamina"] = playerInfo["stamina"] - dtime - if playerInfo["stamina"] <= 0 then - playerInfo["stamina"] = 0 - setSprinting(playerName, false) - end - - --Increase player's stamina if he/she is not sprinting and his/her stamina is less than SPRINT_STAMINA - elseif playerInfo["sprinting"] == false and playerInfo["stamina"] < SPRINT_STAMINA then - playerInfo["stamina"] = playerInfo["stamina"] + dtime - end - -- Cap stamina at SPRINT_STAMINA - if playerInfo["stamina"] > SPRINT_STAMINA then - playerInfo["stamina"] = SPRINT_STAMINA - end - - --Update the players's hud sprint stamina bar - - if SPRINT_HUDBARS_USED then - hb.change_hudbar(player, "sprint", playerInfo["stamina"]) - else - local numBars = (playerInfo["stamina"]/SPRINT_STAMINA)*20 - player:hud_change(playerInfo["hud"], "number", numBars) - end - end - end -end) diff --git a/sprint/init.lua b/sprint/init.lua deleted file mode 100644 index 5108bac..0000000 --- a/sprint/init.lua +++ /dev/null @@ -1,34 +0,0 @@ ---[[ -Sprint mod for Minetest by GunshipPenguin - -To the extent possible under law, the author(s) -have dedicated all copyright and related and neighboring rights -to this software to the public domain worldwide. This software is -distributed without any warranty. -]] - ---Configuration variables, these are all explained in README.md -SPRINT_METHOD = 1 -SPRINT_SPEED = 1.8 -SPRINT_JUMP = 1.1 -SPRINT_STAMINA = 20 -SPRINT_TIMEOUT = 0.5 --Only used if SPRINT_METHOD = 0 - -if minetest.get_modpath("hudbars") ~= nil then - hb.register_hudbar("sprint", 0xFFFFFF, "Stamina", - { bar = "sprint_stamina_bar.png", icon = "sprint_stamina_icon.png" }, - SPRINT_STAMINA, SPRINT_STAMINA, - false, "%s: %.1f/%.1f") - SPRINT_HUDBARS_USED = true -else - SPRINT_HUDBARS_USED = false -end - -if SPRINT_METHOD == 0 then - dofile(minetest.get_modpath("sprint") .. "/wsprint.lua") -elseif SPRINT_METHOD == 1 then - dofile(minetest.get_modpath("sprint") .. "/esprint.lua") -else - minetest.log("error", "Sprint Mod - SPRINT_METHOD is not set properly, using e to sprint") - dofile(minetest.get_modpath("sprint") .. "/esprint.lua") -end diff --git a/sprint/textures/sprint_particle.png b/sprint/textures/sprint_particle.png deleted file mode 100644 index 451fbba..0000000 Binary files a/sprint/textures/sprint_particle.png and /dev/null differ diff --git a/sprint/textures/sprint_stamina_bar.png b/sprint/textures/sprint_stamina_bar.png deleted file mode 100644 index 1ca7a75..0000000 Binary files a/sprint/textures/sprint_stamina_bar.png and /dev/null differ diff --git a/sprint/textures/sprint_stamina_icon.png b/sprint/textures/sprint_stamina_icon.png deleted file mode 100644 index eb661eb..0000000 Binary files a/sprint/textures/sprint_stamina_icon.png and /dev/null differ diff --git a/sprint/wsprint.lua b/sprint/wsprint.lua deleted file mode 100644 index 3a832e2..0000000 --- a/sprint/wsprint.lua +++ /dev/null @@ -1,135 +0,0 @@ ---[[ -Sprint mod for Minetest by GunshipPenguin - -To the extent possible under law, the author(s) -have dedicated all copyright and related and neighboring rights -to this software to the public domain worldwide. This software is -distributed without any warranty. -]] - -local players = {} -local staminaHud = {} - -minetest.register_on_joinplayer(function(player) - local playerName = player:get_player_name() - players[playerName] = { - state = 0, - timeOut = 0, - stamina = SPRINT_STAMINA, - moving = false, - } - - if SPRINT_HUDBARS_USED then - hb.init_hudbar(player, "sprint") - else - players[playerName].hud = player:hud_add({ - hud_elem_type = "statbar", - position = {x=0.5,y=1}, - size = {x=24, y=24}, - text = "sprint_stamina_icon.png", - number = 20, - alignment = {x=0,y=1}, - offset = {x=-263, y=-110}, - } - ) - end -end) -minetest.register_on_leaveplayer(function(player) - local playerName = player:get_player_name() - players[playerName] = nil -end) -minetest.register_globalstep(function(dtime) - --Get the gametime - local gameTime = minetest.get_gametime() - - --Loop through all connected players - for playerName,playerInfo in pairs(players) do - local player = minetest.get_player_by_name(playerName) - if player ~= nil then - --Check if they are moving or not - players[playerName]["moving"] = player:get_player_control()["up"] - - --If the player has tapped w longer than SPRINT_TIMEOUT ago, set his/her state to 0 - if playerInfo["state"] == 2 then - if playerInfo["timeOut"] + SPRINT_TIMEOUT < gameTime then - players[playerName]["timeOut"] = nil - setState(playerName, 0) - end - - --If the player is sprinting, create particles behind him/her - elseif playerInfo["state"] == 3 and gameTime % 0.1 == 0 then - local numParticles = math.random(1, 2) - local playerPos = player:getpos() - local playerNode = minetest.get_node({x=playerPos["x"], y=playerPos["y"]-1, z=playerPos["z"]}) - if playerNode["name"] ~= "air" then - for i=1, numParticles, 1 do - minetest.add_particle({ - pos = {x=playerPos["x"]+math.random(-1,1)*math.random()/2,y=playerPos["y"]+0.1,z=playerPos["z"]+math.random(-1,1)*math.random()/2}, - vel = {x=0, y=5, z=0}, - acc = {x=0, y=-13, z=0}, - expirationtime = math.random(), - size = math.random()+0.5, - collisiondetection = true, - vertical = false, - texture = "sprint_particle.png", - }) - end - end - end - - --Adjust player states - if players[playerName]["moving"] == false and playerInfo["state"] == 3 then --Stopped - setState(playerName, 0) - elseif players[playerName]["moving"] == true and playerInfo["state"] == 0 then --Moving - setState(playerName, 1) - elseif players[playerName]["moving"] == false and playerInfo["state"] == 1 then --Primed - setState(playerName, 2) - elseif players[playerName]["moving"] == true and playerInfo["state"] == 2 then --Sprinting - setState(playerName, 3) - end - - --Lower the player's stamina by dtime if he/she is sprinting and set his/her state to 0 if stamina is zero - if playerInfo["state"] == 3 then - playerInfo["stamina"] = playerInfo["stamina"] - dtime - if playerInfo["stamina"] <= 0 then - playerInfo["stamina"] = 0 - setState(playerName, 0) - end - - --Increase player's stamina if he/she is not sprinting and his/her stamina is less than SPRINT_STAMINA - elseif playerInfo["state"] ~= 3 and playerInfo["stamina"] < SPRINT_STAMINA then - playerInfo["stamina"] = playerInfo["stamina"] + dtime - end - -- Cap stamina at SPRINT_STAMINA - if playerInfo["stamina"] > SPRINT_STAMINA then - playerInfo["stamina"] = SPRINT_STAMINA - end - - --Update the players's hud sprint stamina bar - - if SPRINT_HUDBARS_USED then - hb.change_hudbar(player, "sprint", playerInfo["stamina"]) - else - local numBars = (playerInfo["stamina"]/SPRINT_STAMINA)*20 - player:hud_change(playerInfo["hud"], "number", numBars) - end - end - end -end) - -function setState(playerName, state) --Sets the state of a player (0=stopped, 1=moving, 2=primed, 3=sprinting) - local player = minetest.get_player_by_name(playerName) - local gameTime = minetest.get_gametime() - if players[playerName] then - players[playerName]["state"] = state - if state == 0 then--Stopped - player:set_physics_override({speed=1.0,jump=1.0}) - elseif state == 2 then --Primed - players[playerName]["timeOut"] = gameTime - elseif state == 3 then --Sprinting - player:set_physics_override({speed=SPRINT_SPEED,jump=SPRINT_JUMP}) - end - return true - end - return false -end diff --git a/travelnet/LICENSE b/travelnet/LICENSE deleted file mode 100644 index 9cecc1d..0000000 --- a/travelnet/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - {project} Copyright (C) {year} {fullname} - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/travelnet/README.md b/travelnet/README.md deleted file mode 100644 index 2bebb08..0000000 --- a/travelnet/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# TravelNet - -How this works: - -- craft it by filling the right and left row with glass; place in the middle row (from top to bottom): steel, mese, steel -- place the travelnet box somewhere -- right-click on it; enter name of the station (e.g. "my house", "center of desert city") and name of the network (e.g. "intresting towns","my buildings") -- punch it to update the list of stations on that network -- right-click to use the travelbox - -An unconfigured travelnet box can be configured by anyone. If it is misconfigured, just dig it and place it anew. -All stations that have the same network name set and are owned by the same user connect to the same network. - -LICENSE - -The mod was written by me, Sokomine, and includes small contributions from other contributors. -License: GPLv3 (see file LICENSE) - -The models and textures as found in the textures/ and models/ folders where created by VanessaE -and are provided under the CC0 license. diff --git a/travelnet/config.lua b/travelnet/config.lua deleted file mode 100644 index 7673833..0000000 --- a/travelnet/config.lua +++ /dev/null @@ -1,67 +0,0 @@ - -travelnet.MAX_STATIONS_PER_NETWORK = 24; - --- set this to true if you want a simulated beam effect -travelnet.travelnet_effect_enabled = false; --- set this to true if you want a sound to be played when the travelnet is used -travelnet.travelnet_sound_enabled = false; - --- if you set this to false, travelnets cannot be created --- (this may be useful if you want nothing but the elevators on your server) -travelnet.travelnet_enabled = true; --- if you set travelnet.elevator_enabled to false, you will not be able to --- craft, place or use elevators -travelnet.elevator_enabled = true; --- if you set this to false, doors will be disabled -travelnet.doors_enabled = true; - --- starts an abm which re-adds travelnet stations to networks in case the savefile got lost -travelnet.abm_enabled = false; - --- change these if you want other receipes for travelnet or elevator -travelnet.travelnet_recipe = { - {"default:glass", "default:steel_ingot", "default:glass", }, - {"default:glass", "default:mese", "default:glass", }, - {"default:glass", "default:steel_ingot", "default:glass", } -} -travelnet.elevator_recipe = { - {"default:steel_ingot", "default:glass", "default:steel_ingot", }, - {"default:steel_ingot", "", "default:steel_ingot", }, - {"default:steel_ingot", "default:glass", "default:steel_ingot", } -} - --- if this function returns true, the player with the name player_name is --- allowed to add a box to the network named network_name, which is owned --- by the player owner_name; --- if you want to allow *everybody* to attach stations to all nets, let the --- function always return true; --- if the function returns false, players with the travelnet_attach priv --- can still add stations to that network - -travelnet.allow_attach = function( player_name, owner_name, network_name ) - return false; -end - - --- if this returns true, a player named player_name can remove a travelnet station --- from network_name (owned by owner_name) even though he is neither the owner nor --- has the travelnet_remove priv -travelnet.allow_dig = function( player_name, owner_name, network_name ) - return false; -end - - --- if this function returns false, then player player_name will not be allowed to use --- the travelnet station_name_start on networ network_name owned by owner_name to travel to --- the station station_name_target on the same network; --- if this function returns true, the player will be transfered to the target station; --- you can use this code to i.e. charge the player money for the transfer or to limit --- usage of stations to players in the same fraction on PvP servers -travelnet.allow_travel = function( player_name, owner_name, network_name, station_name_start, station_name_target ) - - --minetest.chat_send_player( player_name, "Player "..tostring( player_name ).." tries to use station "..tostring( station_name_start ).. - -- " on network "..tostring( network_name ).." owned by "..tostring( owner_name ).." in order to travel to ".. - -- tostring( station_name_target ).."."); - - return true; -end diff --git a/travelnet/depends.txt b/travelnet/depends.txt deleted file mode 100644 index c20c0f0..0000000 --- a/travelnet/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -mesecons? -intllib? diff --git a/travelnet/description.txt b/travelnet/description.txt deleted file mode 100644 index 03c69f8..0000000 --- a/travelnet/description.txt +++ /dev/null @@ -1 +0,0 @@ -Network of teleporter-boxes that allow easy travelling to other boxes on the same network. \ No newline at end of file diff --git a/travelnet/doors.lua b/travelnet/doors.lua deleted file mode 100644 index 1ca64c1..0000000 --- a/travelnet/doors.lua +++ /dev/null @@ -1,97 +0,0 @@ --- Doors that are especially useful for travelnet elevators but can also be used in other situations. --- All doors (not only these here) in front of a travelnet or elevator are opened automaticly when a player arrives --- and are closed when a player departs from the travelnet or elevator. --- Autor: Sokomine -local S = travelnet.S; - -travelnet.register_door = function( node_base_name, def_tiles, material ) - - minetest.register_node( node_base_name.."_open", { - description = S("elevator door (open)"), - drawtype = "nodebox", - -- top, bottom, side1, side2, inner, outer - tiles = def_tiles, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = true, - -- only the closed variant is in creative inventory - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,not_in_creative_inventory=1}, - -- larger than one node but slightly smaller than a half node so that wallmounted torches pose no problem - node_box = { - type = "fixed", - fixed = { - {-0.90, -0.5, 0.4, -0.49, 1.5, 0.5}, - { 0.49, -0.5, 0.4, 0.9, 1.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.9, -0.5, 0.4, 0.9, 1.5, 0.5}, - }, - }, - drop = node_base_name.."_closed", - on_rightclick = function(pos, node, puncher) - minetest.add_node(pos, {name = node_base_name.."_closed", param2 = node.param2}) - end, - }) - - minetest.register_node(node_base_name.."_closed", { - description = S("elevator door (closed)"), - drawtype = "nodebox", - -- top, bottom, side1, side2, inner, outer - tiles = def_tiles, - paramtype = "light", - paramtype2 = "facedir", - is_ground_content = true, - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.4, -0.01, 1.5, 0.5}, - { 0.01, -0.5, 0.4, 0.5, 1.5, 0.5}, - }, - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.4, 0.5, 1.5, 0.5}, - }, - }, - on_rightclick = function(pos, node, puncher) - minetest.add_node(pos, {name = node_base_name.."_open", param2 = node.param2}) - end, - }) - - -- add a craft receipe for the door - minetest.register_craft({ - output = node_base_name.."_closed", - recipe = { - {material, '', material }, - {material, '', material }, - {material, '', material } - } - }) - - - -- Make doors reacts to mesecons - if minetest.get_modpath("mesecons") then - local mesecons = {effector = { - action_on = function(pos, node) - minetest.add_node(pos, {name = node_base_name.."_open", param2 = node.param2}) - end, - action_off = function(pos, node) - minetest.add_node(pos, {name = node_base_name.."_closed", param2 = node.param2}) - end, - rules = mesecon.rules.pplate - }} - - minetest.override_item( node_base_name.."_closed", { mesecons = mesecons }) - minetest.override_item( node_base_name.."_open", { mesecons = mesecons }) - end -end - --- actually register the doors -travelnet.register_door( "travelnet:elevator_door_steel", {"default_stone.png"}, "default:steel_ingot"); -travelnet.register_door( "travelnet:elevator_door_glass", {"travelnet_elevator_door_glass.png"}, "default:glass"); -travelnet.register_door( "travelnet:elevator_door_tin", {"default_clay.png"}, "default:tin_ingot"); diff --git a/travelnet/elevator.lua b/travelnet/elevator.lua deleted file mode 100644 index 722a73a..0000000 --- a/travelnet/elevator.lua +++ /dev/null @@ -1,204 +0,0 @@ --- This version of the travelnet box allows to move up or down only. --- The network name is determined automaticly from the position (x/z coordinates). --- >utor: Sokomine -local S = travelnet.S; - -travelnet.show_nearest_elevator = function( pos, owner_name, param2 ) - if( not( pos ) or not(pos.x) or not(pos.z) or not( owner_name )) then - return; - end - - if( not( travelnet.targets[ owner_name ] )) then - minetest.chat_send_player( owner_name, S("Congratulations! This is your first elevator.".. - "You can build an elevator network by placing further elevators somewhere above ".. - "or below this one. Just make sure that the x and z coordinate are the same.")); - return; - end - - local network_name = tostring( pos.x )..','..tostring( pos.z ); - -- will this be an elevator that will be added to an existing network? - if( travelnet.targets[ owner_name ][ network_name ] - -- does the network have any members at all? - and next( travelnet.targets[ owner_name ][ network_name ], nil )) then - minetest.chat_send_player( owner_name, S("This elevator will automaticly connect to the ".. - "other elevators you have placed at diffrent heights. Just enter a station name ".. - "and click on \"store\" to set it up. Or just punch it to set the height as station ".. - "name.")); - return; - end - - local nearest_name = ""; - local nearest_dist = 100000000; - local nearest_dist_x = 0; - local nearest_dist_z = 0; - for network_name, data in pairs( travelnet.targets[ owner_name ] ) do - local station_name = next( data, nil ); - if( station_name and data[ station_name ][ "nr" ] and data[ station_name ].pos) then - local station_pos = data[ station_name ].pos; - local dist = math.ceil(math.sqrt( - ( station_pos.x - pos.x ) * ( station_pos.x - pos.x ) - + ( station_pos.z - pos.z ) * ( station_pos.z - pos.z ))); - -- find the nearest one; store network_name and (minimal) distance - if( dist < nearest_dist ) then - nearest_dist = dist; - nearest_dist_x = station_pos.x - pos.x; - nearest_dist_z = station_pos.z - pos.z; - nearest_name = network_name; - end - end - end - if( nearest_name ~= "" ) then - local text = S("Your nearest elevator network is located").." "; - -- in front of/behind - if( (param2==0 and nearest_dist_z>=0)or (param2==2 and nearest_dist_z<=0)) then - text = text..tostring( math.abs(nearest_dist_z )).." "..S("m behind this elevator and"); - elseif((param2==1 and nearest_dist_x>=0)or (param2==3 and nearest_dist_x<=0)) then - text = text..tostring( math.abs(nearest_dist_x )).." "..S("m behind this elevator and"); - elseif((param2==0 and nearest_dist_z< 0)or (param2==2 and nearest_dist_z> 0)) then - text = text..tostring( math.abs(nearest_dist_z )).." "..S("m in front of this elevator and"); - elseif((param2==1 and nearest_dist_x< 0)or (param2==3 and nearest_dist_x> 0)) then - text = text..tostring( math.abs(nearest_dist_x )).." "..S("m in front of this elevator and"); - else text = text..S(" ERROR"); - end - text = text.." "; - - -- right/left - if( (param2==0 and nearest_dist_x< 0)or (param2==2 and nearest_dist_x> 0)) then - text = text..tostring( math.abs(nearest_dist_x )).." "..S("m to the left"); - elseif((param2==1 and nearest_dist_z>=0)or (param2==3 and nearest_dist_z<=0)) then - text = text..tostring( math.abs(nearest_dist_z )).." "..S("m to the left"); - elseif((param2==0 and nearest_dist_x>=0)or (param2==2 and nearest_dist_x<=0)) then - text = text..tostring( math.abs(nearest_dist_x )).." "..S("m to the right"); - elseif((param2==1 and nearest_dist_z< 0)or (param2==3 and nearest_dist_z> 0)) then - text = text..tostring( math.abs(nearest_dist_z )).." "..S("m to the right"); - else text = text..S(" ERROR"); - end - - minetest.chat_send_player( owner_name, text.. - S(", located at x").."="..tostring( pos.x+nearest_dist_x).. - ", z="..tostring( pos.z+nearest_dist_z).. - ". "..S("This elevator here will start a new shaft/network.")); - else - minetest.chat_send_player( owner_name, S("This is your first elevator. It differs from ".. - "travelnet networks by only allowing movement in vertical direction (up or down). ".. - "All further elevators which you will place at the same x,z coordinates at differnt ".. - "heights will be able to connect to this elevator.")); - end -end - - -minetest.register_node("travelnet:elevator", { - description = S("Elevator"), - drawtype = "mesh", - mesh = "travelnet_elevator.obj", - sunlight_propagates = true, - paramtype = 'light', - paramtype2 = "facedir", - wield_scale = {x=0.6, y=0.6, z=0.6}, - - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 } - }, - - collision_box = { - type = "fixed", - fixed = { - - { 0.48, -0.5,-0.5, 0.5, 0.5, 0.5}, - {-0.5 , -0.5, 0.48, 0.48, 0.5, 0.5}, - {-0.5, -0.5,-0.5 ,-0.48, 0.5, 0.5}, - - --groundplate to stand on - { -0.5,-0.5,-0.5,0.5,-0.48, 0.5}, - }, - }, - - tiles = { - "travelnet_elevator_front.png", - "travelnet_elevator_inside_controls.png", - "travelnet_elevator_sides_outside.png", - "travelnet_elevator_inside_ceiling.png", - "travelnet_elevator_inside_floor.png", - "default_steel_block.png" - }, - inventory_image = "travelnet_elevator_inv.png", - groups = {cracky=1,choppy=1,snappy=1}, - - light_source = 10, - - after_place_node = function(pos, placer, itemstack) - local meta = minetest.get_meta(pos); - meta:set_string("infotext", S("Elevator (unconfigured)")); - meta:set_string("station_name", ""); - meta:set_string("station_network",""); - meta:set_string("owner", placer:get_player_name() ); - -- request initial data - meta:set_string("formspec", - "size[12,10]".. - "field[0.3,5.6;6,0.7;station_name;"..S("Name of this station:")..";]".. --- "field[0.3,6.6;6,0.7;station_network;Assign to Network:;]".. --- "field[0.3,7.6;6,0.7;owner_name;(optional) owned by:;]".. - "button_exit[6.3,6.2;1.7,0.7;station_set;"..S("Store").."]" ); - - local p = {x=pos.x, y=pos.y+1, z=pos.z} - local p2 = minetest.dir_to_facedir(placer:get_look_dir()) - minetest.add_node(p, {name="travelnet:elevator_top", paramtype2="facedir", param2=p2}) - travelnet.show_nearest_elevator( pos, placer:get_player_name(), p2 ); - end, - - on_receive_fields = travelnet.on_receive_fields, - on_punch = function(pos, node, puncher) - if( not( travelnet.check_if_trying_to_dig( puncher, node ))) then - travelnet.update_formspec(pos, puncher:get_player_name()) - end - end, - - can_dig = function( pos, player ) - return travelnet.can_dig( pos, player, 'elevator' ) - end, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - travelnet.remove_box( pos, oldnode, oldmetadata, digger ) - end, - - -- TNT and overenthusiastic DMs do not destroy elevators either - on_blast = function(pos, intensity) - end, - - -- taken from VanessaEs homedecor fridge - on_place = function(itemstack, placer, pointed_thing) - local pos = pointed_thing.above; - local node = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}); - -- leftover elevator_top nodes can be removed by placing a new elevator underneath - if( node ~= nil and node.name ~= "air" and node.name ~= 'travelnet:elevator_top') then - minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!')) - return; - end - return minetest.item_place(itemstack, placer, pointed_thing); - end, - - on_destruct = function(pos) - local p = {x=pos.x, y=pos.y+1, z=pos.z} - minetest.remove_node(p) - end -}) - -minetest.register_alias("travelnet:elevator_top", "air") - ---if( minetest.get_modpath("technic") ~= nil ) then --- minetest.register_craft({ --- output = "travelnet:elevator", --- recipe = { --- {"default:steel_ingot", "technic:motor", "default:steel_ingot", }, --- {"default:steel_ingot", "technic:control_logic_unit", "default:steel_ingot", }, --- {"default:steel_ingot", "moreores:copper_ingot", "default:steel_ingot", } --- } --- }) ---else - minetest.register_craft({ - output = "travelnet:elevator", - recipe = travelnet.elevator_recipe, - }) ---end - diff --git a/travelnet/init.lua b/travelnet/init.lua deleted file mode 100644 index a7aab85..0000000 --- a/travelnet/init.lua +++ /dev/null @@ -1,937 +0,0 @@ - - ---[[ - Teleporter networks that allow players to choose a destination out of a list - Copyright (C) 2013 Sokomine - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - Version: 2.2 (with optional abm for self-healing) - - Please configure this mod in config.lua - - Changelog: - 22.09.18 - Move up/move down no longer close the formspec. - 22.09.18 - If in creative mode, wield a diamond pick to dig the station. This avoids - conflicts with too fast punches. - 24.12.17 - Added support for localization through intllib. - Added localization for German (de). - Door opening/closing can now handle more general doors. - 17.07.17 - Added more detailled licence information. - TNT and DungeonMasters ought to leave travelnets and elevators untouched now. - Added function to register elevator doors. - Added elevator doors made out of tin ingots. - Provide information about the nearest elevator network when placing a new elevator. This - ought to make it easier to find the right spot. - Improved formspec. - 16.07.17 - Merged several PR from others (Typo, screenshot, documentation, mesecon support, bugfix). - Added buttons to move stations up or down in the list, independent on when they where added. - Fixed undeclared globals. - Changed deprecated functions set_look_yaw/pitch to current functions. - 22.07.17 - Fixed bug with locked travelnets beeing removed from the network due to not beeing recognized. - 30.08.16 - If the station the traveller just travelled to no longer exists, the player is sent back to the - station where he/she came from. - 30.08.16 - Attaching a travelnet box to a non-existant network of another player is possible (requested by OldCoder). - Still requires the travelnet_attach-priv. - 05.10.14 - Added an optional abm so that the travelnet network can heal itshelf in case of loss of the savefile. - If you want to use this, set - travelnet.enable_abm = true - in config.lua and edit the interval in the abm to suit your needs. - 19.11.13 - moved doors and travelnet definition into an extra file - - moved configuration to config.lua - 05.08.13 - fixed possible crash when the node in front of the travelnet is unknown - 26.06.13 - added inventory image for elevator (created by VanessaE) - 21.06.13 - bugfix: wielding an elevator while digging a door caused the elevator_top to be placed - - leftover floating elevator_top nodes can be removed by placing a new travelnet:elevator underneath them and removing that afterwards - - homedecor-doors are now opened and closed correctly as well - - removed nodes that are not intended for manual use from creative inventory - - improved naming of station levels for the elevator - 21.06.13 - elevator stations are sorted by height instead of date of creation as is the case with travelnet boxes - - elevator stations are named automaticly - 20.06.13 - doors can be opened and closed from inside the travelnet box/elevator - - the elevator can only move vertically; the network name is defined by its x and z coordinate - 13.06.13 - bugfix - - elevator added (written by kpoppel) and placed into extra file - - elevator doors added - - groups changed to avoid accidental dig/drop on dig of node beneath - - added new priv travelnet_remove for digging of boxes owned by other players - - only the owner of a box or players with the travelnet_remove priv can now dig it - - entering your own name as owner_name does no longer abort setup - 22.03.13 - added automatic detection if yaw can be set - - beam effect is disabled by default - 20.03.13 - added inventory image provided by VanessaE - - fixed bug that made it impossible to remove stations from the net - - if the station a player beamed to no longer exists, the station will be removed automaticly - - with the travelnet_attach priv, you can now attach your box to the nets of other players - - in newer versions of Minetest, the players yaw is set so that he/she looks out of the receiving box - - target list is now centered if there are less than 9 targets ---]] - - -travelnet = {}; - -travelnet.targets = {}; - --- Boilerplate to support localized strings if intllib mod is installed. -if minetest.get_modpath( "intllib" ) and intllib then - travelnet.S = intllib.Getter() -else - travelnet.S = function(s) return s end -end - -local S = travelnet.S; - -minetest.register_privilege("travelnet_attach", { description = S("allows to attach travelnet boxes to travelnets of other players"), give_to_singleplayer = false}); -minetest.register_privilege("travelnet_remove", { description = S("allows to dig travelnet boxes which belog to nets of other players"), give_to_singleplayer = false}); - --- read the configuration -dofile(minetest.get_modpath("travelnet").."/config.lua"); -- the normal, default travelnet - - - --- TODO: save and restore ought to be library functions and not implemented in each individual mod! --- called whenever a station is added or removed -travelnet.save_data = function() - - local data = minetest.serialize( travelnet.targets ); - local path = minetest.get_worldpath().."/mod_travelnet.data"; - - local file = io.open( path, "w" ); - if( file ) then - file:write( data ); - file:close(); - else - print(S("[Mod travelnet] Error: Savefile '%s' could not be written."):format(tostring(path))); - end -end - - -travelnet.restore_data = function() - - local path = minetest.get_worldpath().."/mod_travelnet.data"; - - local file = io.open( path, "r" ); - if( file ) then - local data = file:read("*all"); - travelnet.targets = minetest.deserialize( data ); - file:close(); - else - print(S("[Mod travelnet] Error: Savefile '%s' not found."):format(tostring(path))); - end -end - - --- punching the travelnet updates its formspec and shows it to the player; --- however, that would be very annoying when actually trying to dig the thing. --- Thus, check if the player is wielding a tool that can dig nodes of the --- group cracky -travelnet.check_if_trying_to_dig = function( puncher, node ) - -- if in doubt: show formspec - if( not( puncher) or not( puncher:get_wielded_item())) then - return false; - end - -- show menu when in creative mode - if( creative - and creative.is_enabled_for(puncher:get_player_name()) --- and (not(puncher:get_wielded_item()) --- or puncher:get_wielded_item():get_name()~="default:pick_diamond")) then - ) then - return false; - end - local tool_capabilities = puncher:get_wielded_item():get_tool_capabilities(); - if( not( tool_capabilities ) - or not( tool_capabilities["groupcaps"]) - or not( tool_capabilities["groupcaps"]["cracky"])) then - return false; - end - -- tools which can dig cracky items can start digging immediately - return true; -end - --- minetest.chat_send_player is sometimes not so well visible -travelnet.show_message = function( pos, player_name, title, message ) - if( not( pos ) or not( player_name ) or not( message )) then - return; - end - local formspec = "size[8,3]".. - "label[3,0;"..minetest.formspec_escape( title or "Error").."]".. - "textlist[0,0.5;8,1.5;;"..minetest.formspec_escape( message or "- nothing -")..";]".. - "button_exit[3.5,2.5;1.0,0.5;back;"..S("Back").."]".. - "button_exit[6.8,2.5;1.0,0.5;station_exit;"..S("Exit").."]".. - "field[20,20;0.1,0.1;pos2str;Pos;".. minetest.pos_to_string( pos ).."]"; - minetest.show_formspec(player_name, "travelnet:show", formspec); -end - --- show the player the formspec he would see when right-clicking the node; --- needs to be simulated this way as calling on_rightclick would not do -travelnet.show_current_formspec = function( pos, meta, player_name ) - if( not( pos ) or not( meta ) or not( player_name )) then - return; - end - -- we need to supply the position of the travelnet box - formspec = meta:get_string("formspec").. - "field[20,20;0.1,0.1;pos2str;Pos;".. minetest.pos_to_string( pos ).."]"; - -- show the formspec manually - minetest.show_formspec(player_name, "travelnet:show", formspec); -end - --- a player clicked on something in the formspec he was manually shown --- (back from help page, moved travelnet up or down etc.) -travelnet.form_input_handler = function( player, formname, fields) - if(formname == "travelnet:show" and fields and fields.pos2str) then - local pos = minetest.string_to_pos( fields.pos2str ); - -- back button leads back to the main menu - if( fields.back and fields.back ~= "" ) then - return travelnet.show_current_formspec( pos, - minetest.get_meta( pos ), player:get_player_name()); - end - return travelnet.on_receive_fields(pos, formname, fields, player); - end -end - --- most formspecs the travelnet uses are stored in the travelnet node itself, --- but some may require some "back"-button functionality (i.e. help page, --- move up/down etc.) -minetest.register_on_player_receive_fields( travelnet.form_input_handler ); - - - -travelnet.reset_formspec = function( meta ) - if( not( meta )) then - return; - end - meta:set_string("infotext", S("Travelnet-box (unconfigured)")); - meta:set_string("station_name", ""); - meta:set_string("station_network",""); - meta:set_string("owner", ""); - -- some players seem to be confused with entering network names at first; provide them - -- with a default name - if( not( station_network ) or station_network == "" ) then - station_network = "net1"; - end - -- request initinal data - meta:set_string("formspec", - "size[10,6.0]".. - "label[2.0,0.0;--> "..S("Configure this travelnet station").." <--]".. - "field[0.3,1.2;9,0.9;station_name;"..S("Name of this station")..":;".. - minetest.formspec_escape(station_name or "").."]".. - "label[0.3,1.5;"..S("How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"...").."]".. - - "field[0.3,2.8;9,0.9;station_network;"..S("Assign to Network:")..";".. - minetest.formspec_escape(station_network or "").."]".. - "label[0.3,3.1;"..S("You can have more than one network. If unsure, use \"%s\""):format(tostring(station_network)).."\".]".. - "field[0.3,4.4;9,0.9;owner;"..S("Owned by:")..";]".. - "label[0.3,4.7;"..S("Unless you know what you are doing, leave this empty.").."]".. - "button_exit[1.3,5.3;1.7,0.7;station_help_setup;"..S("Help").."]".. - "button_exit[3.8,5.3;1.7,0.7;station_set;"..S("Save").."]".. - "button_exit[6.3,5.3;1.7,0.7;station_exit;"..S("Exit").."]"); -end - - -travelnet.update_formspec = function( pos, puncher_name, fields ) - local meta = minetest.get_meta(pos); - - local this_node = minetest.get_node( pos ); - local is_elevator = false; - - if( this_node ~= nil and this_node.name == 'travelnet:elevator' ) then - is_elevator = true; - end - - if( not( meta )) then - return; - end - - local owner_name = meta:get_string( "owner" ); - local station_name = meta:get_string( "station_name" ); - local station_network = meta:get_string( "station_network" ); - - if( not( owner_name ) - or not( station_name ) or station_network == '' - or not( station_network )) then - - - if( is_elevator == true ) then - travelnet.add_target( nil, nil, pos, puncher_name, meta, owner_name ); - return; - end - --- minetest.chat_send_player(puncher_name, "DEBUG DATA: owner: "..(owner_name or "?").. --- " station_name: "..(station_name or "?").. --- " station_network: "..(station_network or "?").."."); --- minetest.chat_send_player(puncher_name, "data: "..minetest.serialize( travelnet.targets )); - - - travelnet.reset_formspec( meta ); - travelnet.show_message( pos, puncher_name, "Error", S("Update failed! Resetting this box on the travelnet.")); - return; - end - - -- if the station got lost from the network for some reason (savefile corrupted?) then add it again - if( not( travelnet.targets[ owner_name ] ) - or not( travelnet.targets[ owner_name ][ station_network ] ) - or not( travelnet.targets[ owner_name ][ station_network ][ station_name ] )) then - - -- first one by this player? - if( not( travelnet.targets[ owner_name ] )) then - travelnet.targets[ owner_name ] = {}; - end - - -- first station on this network? - if( not( travelnet.targets[ owner_name ][ station_network ] )) then - travelnet.targets[ owner_name ][ station_network ] = {}; - end - - - local zeit = meta:get_int("timestamp"); - if( not( zeit) or type(zeit)~="number" or zeit<100000 ) then - zeit = os.time(); - end - - -- add this station - travelnet.targets[ owner_name ][ station_network ][ station_name ] = {pos=pos, timestamp=zeit }; - - minetest.chat_send_player(owner_name, S("Station '%s'"):format(station_name).." ".. - S(" has been reattached to the network '%s'."):format(station_network)); - travelnet.save_data(); - end - - - -- add name of station + network + owner + update-button - local zusatzstr = ""; - local trheight = "10"; - if( this_node and this_node.name=="locked_travelnet:travelnet" ) then - zusatzstr = "field[0.3,11;6,0.7;locks_sent_lock_command;"..S("Locked travelnet. Type /help for help:")..";]"; - trheight = "11.5"; - end - local formspec = "size[12,"..trheight.."]".. - "label[3.3,0.0;"..S("Travelnet-Box")..":]".."label[6.3,0.0;"..S("Punch box to update target list.").."]".. - "label[0.3,0.4;"..S("Name of this station:").."]".."label[6.3,0.4;"..minetest.formspec_escape(station_name or "?").."]".. - "label[0.3,0.8;"..S("Assigned to Network:").."]" .."label[6.3,0.8;"..minetest.formspec_escape(station_network or "?").."]".. - "label[0.3,1.2;"..S("Owned by:").."]" .."label[6.3,1.2;"..minetest.formspec_escape(owner_name or "?").."]".. - "label[3.3,1.6;"..S("Click on target to travel there:").."]".. - zusatzstr; --- "button_exit[5.3,0.3;8,0.8;do_update;Punch box to update destination list. Click on target to travel there.]".. - local x = 0; - local y = 0; - local i = 0; - - - -- collect all station names in a table - local stations = {}; - - for k,v in pairs( travelnet.targets[ owner_name ][ station_network ] ) do - table.insert( stations, k ); - end - -- minetest.chat_send_player(puncher_name, "stations: "..minetest.serialize( stations )); - - local ground_level = 1; - if( is_elevator ) then - table.sort( stations, function(a,b) return travelnet.targets[ owner_name ][ station_network ][ a ].pos.y > - travelnet.targets[ owner_name ][ station_network ][ b ].pos.y end); - -- find ground level - local vgl_timestamp = 999999999999; - for index,k in ipairs( stations ) do - if( not( travelnet.targets[ owner_name ][ station_network ][ k ].timestamp )) then - travelnet.targets[ owner_name ][ station_network ][ k ].timestamp = os.time(); - end - if( travelnet.targets[ owner_name ][ station_network ][ k ].timestamp < vgl_timestamp ) then - vgl_timestamp = travelnet.targets[ owner_name ][ station_network ][ k ].timestamp; - ground_level = index; - end - end - for index,k in ipairs( stations ) do - if( index == ground_level ) then - travelnet.targets[ owner_name ][ station_network ][ k ].nr = S('G'); - else - travelnet.targets[ owner_name ][ station_network ][ k ].nr = tostring( ground_level - index ); - end - end - - else - -- sort the table according to the timestamp (=time the station was configured) - table.sort( stations, function(a,b) return travelnet.targets[ owner_name ][ station_network ][ a ].timestamp < - travelnet.targets[ owner_name ][ station_network ][ b ].timestamp end); - end - - -- does the player want to move this station one position up in the list? - -- only the owner and players with the travelnet_attach priv can change the order of the list - -- Note: With elevators, only the "G"(round) marking is actually moved - if( fields - and (fields.move_up or fields.move_down) - and owner_name - and owner_name ~= "" - and ((owner_name == puncher_name) - or (minetest.check_player_privs(puncher_name, {travelnet_attach=true}))) - ) then - - local current_pos = -1; - for index,k in ipairs( stations ) do - if( k==station_name ) then - current_pos = index; - end - end - - local swap_with_pos = -1; - if( fields.move_up ) then - swap_with_pos = current_pos - 1; - else - swap_with_pos = current_pos + 1; - end - -- handle errors - if( swap_with_pos < 1) then - travelnet.show_message( pos, puncher_name, "Info", S("This station is already the first one on the list.")); - return; - elseif( swap_with_pos > #stations ) then - travelnet.show_message( pos, puncher_name, "Info", S("This station is already the last one on the list.")); - return; - else - -- swap the actual data by which the stations are sorted - local old_timestamp = travelnet.targets[ owner_name ][ station_network ][ stations[swap_with_pos]].timestamp; - travelnet.targets[ owner_name ][ station_network ][ stations[swap_with_pos]].timestamp = - travelnet.targets[ owner_name ][ station_network ][ stations[current_pos ]].timestamp; - travelnet.targets[ owner_name ][ station_network ][ stations[current_pos ]].timestamp = - old_timestamp; - - -- for elevators, only the "G"(round) marking is moved; no point in swapping stations - if( not( is_elevator )) then - -- actually swap the stations - local old_val = stations[ swap_with_pos ]; - stations[ swap_with_pos ] = stations[ current_pos ]; - stations[ current_pos ] = old_val; - end - - -- store the changed order - travelnet.save_data(); - end - end - - -- if there are only 8 stations (plus this one), center them in the formspec - if( #stations < 10 ) then - x = 4; - end - - for index,k in ipairs( stations ) do - - -- check if there is an elevator door in front that needs to be opened - local open_door_cmd = false; - if( k==station_name ) then - open_door_cmd = true; - end - - if( k ~= station_name or open_door_cmd) then - i = i+1; - - -- new column - if( y==8 ) then - x = x+4; - y = 0; - end - - if( open_door_cmd ) then - formspec = formspec .."button_exit["..(x)..","..(y+2.5)..";1,0.5;open_door;<>]".. - "label["..(x+0.9)..","..(y+2.35)..";"..tostring( k ).."]"; - elseif( is_elevator ) then - formspec = formspec .."button_exit["..(x)..","..(y+2.5)..";1,0.5;target;"..tostring( travelnet.targets[ owner_name ][ station_network ][ k ].nr ).."]".. - "label["..(x+0.9)..","..(y+2.35)..";"..tostring( k ).."]"; - else - formspec = formspec .."button_exit["..(x)..","..(y+2.5)..";4,0.5;target;"..k.."]"; - end - --- if( is_elevator ) then --- formspec = formspec ..' ('..tostring( travelnet.targets[ owner_name ][ station_network ][ k ].pos.y )..'m)'; --- end --- formspec = formspec .. ']'; - - y = y+1; - --x = x+4; - end - end - formspec = formspec.. - "label[8.0,1.6;"..S("Position in list:").."]".. - "button_exit[11.3,0.0;1.0,0.5;station_exit;"..S("Exit").."]".. - "button[9.6,1.6;1.4,0.5;move_up;"..S("move up").."]".. - "button[10.9,1.6;1.4,0.5;move_down;"..S("move down").."]"; - - meta:set_string( "formspec", formspec ); - - meta:set_string( "infotext", S("Station '%s'"):format(tostring( station_name )).." ".. - S("on travelnet '%s'"):format(tostring( station_network )).." ".. - S("(owned by %s)"):format(tostring( owner_name )).." ".. - S("ready for usage. Right-click to travel, punch to update.")); - - -- show the player the updated formspec - travelnet.show_current_formspec( pos, meta, puncher_name ); -end - - - --- add a new target; meta is optional -travelnet.add_target = function( station_name, network_name, pos, player_name, meta, owner_name ) - - -- if it is an elevator, determine the network name through x and z coordinates - local this_node = minetest.get_node( pos ); - local is_elevator = false; - - if( this_node.name == 'travelnet:elevator' ) then --- owner_name = '*'; -- the owner name is not relevant here - is_elevator = true; - network_name = tostring( pos.x )..','..tostring( pos.z ); - if( not( station_name ) or station_name == '' ) then - station_name = S('at %s m'):format(tostring( pos.y )); - end - end - - if( station_name == "" or not(station_name )) then - travelnet.show_message( pos, player_name, S("Error"), S("Please provide a name for this station." )); - return; - end - - if( network_name == "" or not( network_name )) then - travelnet.show_message( pos, player_name, S("Error"), - S("Please provide the name of the network this station ought to be connected to.")); - return; - end - - if( owner_name == nil or owner_name == '' or owner_name == player_name) then - owner_name = player_name; - - elseif( is_elevator ) then -- elevator networks - owner_name = player_name; - - elseif( not( minetest.check_player_privs(player_name, {interact=true}))) then - - travelnet.show_message( pos, player_name, S("Error"), - S("There is no player with interact privilege named '%s'. Aborting."):format(tostring( player_name ))); - return; - - elseif( not( minetest.check_player_privs(player_name, {travelnet_attach=true})) - and not( travelnet.allow_attach( player_name, owner_name, network_name ))) then - - travelnet.show_message( pos, player_name, S("Error"), - S("You do not have the travelnet_attach priv which is required to attach your box to ".. - "the network of someone else. Aborting.")); - return; - end - - -- first one by this player? - if( not( travelnet.targets[ owner_name ] )) then - travelnet.targets[ owner_name ] = {}; - end - - -- first station on this network? - if( not( travelnet.targets[ owner_name ][ network_name ] )) then - travelnet.targets[ owner_name ][ network_name ] = {}; - end - - -- lua doesn't allow efficient counting here - local anz = 0; - for k,v in pairs( travelnet.targets[ owner_name ][ network_name ] ) do - - if( k == station_name ) then - travelnet.show_message( pos, player_name, S("Error"), - S("A station named '%s' already exists on this network. Please choose a diffrent name!"):format(station_name)); - return; - end - - anz = anz + 1; - end - - -- we don't want too many stations in the same network because that would get confusing when displaying the targets - if( anz+1 > travelnet.MAX_STATIONS_PER_NETWORK ) then - travelnet.show_message( pos, player_name, S("Error"), - S("Network '%s',"):format(network_name).." ".. - S("already contains the maximum number (=%s) of allowed stations per network. ".. - "Please choose a diffrent/new network name."):format(travelnet.MAX_STATIONS_PER_NETWORK)); - return; - end - - -- add this station - travelnet.targets[ owner_name ][ network_name ][ station_name ] = {pos=pos, timestamp=os.time() }; - - -- do we have a new node to set up? (and are not just reading from a safefile?) - if( meta ) then - - minetest.chat_send_player(player_name, S("Station '%s'"):format(station_name).." ".. - S("has been added to the network '%s'"):format(network_name).. - S(", which now consists of %s station(s)."):format(anz+1)); - - meta:set_string( "station_name", station_name ); - meta:set_string( "station_network", network_name ); - meta:set_string( "owner", owner_name ); - meta:set_int( "timestamp", travelnet.targets[ owner_name ][ network_name ][ station_name ].timestamp); - - meta:set_string("formspec", - "size[12,10]".. - "field[0.3,0.6;6,0.7;station_name;"..S("Station:")..";".. minetest.formspec_escape(meta:get_string("station_name")).."]".. - "field[0.3,3.6;6,0.7;station_network;"..S("Network:")..";"..minetest.formspec_escape(meta:get_string("station_network")).."]" ); - - -- display a list of all stations that can be reached from here - travelnet.update_formspec( pos, player_name, nil ); - - -- save the updated network data in a savefile over server restart - travelnet.save_data(); - end -end - - - --- allow doors to open -travelnet.open_close_door = function( pos, player, mode ) - - local this_node = minetest.get_node( pos ); - local pos2 = {x=pos.x,y=pos.y,z=pos.z}; - - if( this_node.param2 == 0 ) then pos2 = {x=pos.x,y=pos.y,z=(pos.z-1)}; - elseif( this_node.param2 == 1 ) then pos2 = {x=(pos.x-1),y=pos.y,z=pos.z}; - elseif( this_node.param2 == 2 ) then pos2 = {x=pos.x,y=pos.y,z=(pos.z+1)}; - elseif( this_node.param2 == 3 ) then pos2 = {x=(pos.x+1),y=pos.y,z=pos.z}; - end - - local door_node = minetest.get_node( pos2 ); - if( door_node ~= nil and door_node.name ~= 'ignore' and door_node.name ~= 'air' and minetest.registered_nodes[ door_node.name ] ~= nil and minetest.registered_nodes[ door_node.name ].on_rightclick ~= nil) then - - -- at least for homedecor, same facedir would mean "door closed" - - -- do not close the elevator door if it is already closed - if( mode==1 and ( string.sub( door_node.name, -7 ) == '_closed' - -- handle doors that change their facedir - or ( door_node.param2 == this_node.param2 - and door_node.name ~= 'travelnet:elevator_door_glass_open' - and door_node.name ~= 'travelnet:elevator_door_steel_open'))) then - return; - end - -- do not open the doors if they are already open (works only on elevator-doors; not on doors in general) - if( mode==2 and ( string.sub( door_node.name, -5 ) == '_open' - -- handle doors that change their facedir - or ( door_node.param2 ~= this_node.param2 - and door_node.name ~= 'travelnet:elevator_door_glass_closed' - and door_node.name ~= 'travelnet:elevator_door_steel_closed'))) then - return; - end - - if( mode==2 ) then - minetest.after( 1, minetest.registered_nodes[ door_node.name ].on_rightclick, pos2, door_node, player ); - else - minetest.registered_nodes[ door_node.name ].on_rightclick(pos2, door_node, player); - end - end -end - - -travelnet.on_receive_fields = function(pos, formname, fields, player) - if( not( pos )) then - return; - end - local meta = minetest.get_meta(pos); - - local name = player:get_player_name(); - - -- the player wants to quit/exit the formspec; do not save/update anything - if( fields and fields.station_exit and fields.station_exit ~= "" ) then - return; - end - - -- show help text - if( fields and fields.station_help_setup and fields.station_help_setup ~= "") then - -- simulate right-click - local node = minetest.get_node( pos ); - if( node and node.name and minetest.registered_nodes[ node.name ] ) then - travelnet.show_message( pos, name, "--> Help <--", --- TODO: actually add help page - S("No help available yet.")); - end - return; - end - - -- if the box has not been configured yet - if( meta:get_string("station_network")=="" ) then - - travelnet.add_target( fields.station_name, fields.station_network, pos, name, meta, fields.owner_name ); - return; - end - - if( fields.open_door ) then - travelnet.open_close_door( pos, player, 0 ); - return; - end - - -- the owner or players with the travelnet_attach priv can move stations up or down in the list - if( fields.move_up or fields.move_down) then - travelnet.update_formspec( pos, name, fields ); - return; - end - - if( not( fields.target )) then - minetest.chat_send_player(name, S("Please click on the target you want to travel to.")); - return; - end - - - -- if there is something wrong with the data - local owner_name = meta:get_string( "owner" ); - local station_name = meta:get_string( "station_name" ); - local station_network = meta:get_string( "station_network" ); - - if( not( owner_name ) - or not( station_name ) - or not( station_network ) - or not( travelnet.targets[ owner_name ] ) - or not( travelnet.targets[ owner_name ][ station_network ] )) then - - - if( owner_name - and station_name - and station_network ) then - travelnet.add_target( station_name, station_network, pos, owner_name, meta, owner_name ); - else - minetest.chat_send_player(name, S("Error")..": ".. - S("There is something wrong with the configuration of this station.").. - " DEBUG DATA: owner: "..( owner_name or "?").. - " station_name: "..(station_name or "?").. - " station_network: "..(station_network or "?").."."); - return - end - end - - if( not( owner_name ) - or not( station_network ) - or not( travelnet.targets ) - or not( travelnet.targets[ owner_name ] ) - or not( travelnet.targets[ owner_name ][ station_network ] )) then - minetest.chat_send_player(name, S("Error")..": ".. - S("This travelnet is lacking data and/or improperly configured.")); - print( "ERROR: The travelnet at "..minetest.pos_to_string( pos ).." has a problem: ".. - " DATA: owner: "..( owner_name or "?").. - " station_name: "..(station_name or "?").. - " station_network: "..(station_network or "?").."."); - return; - end - - local this_node = minetest.get_node( pos ); - if( this_node ~= nil and this_node.name == 'travelnet:elevator' ) then - for k,v in pairs( travelnet.targets[ owner_name ][ station_network ] ) do - if( travelnet.targets[ owner_name ][ station_network ][ k ].nr --..' ('..tostring( travelnet.targets[ owner_name ][ station_network ][ k ].pos.y )..'m)' - == fields.target) then - fields.target = k; - end - end - end - - - -- if the target station is gone - if( not( travelnet.targets[ owner_name ][ station_network ][ fields.target ] )) then - - minetest.chat_send_player(name, S("Station '%s'"):format( fields.target or "?").." ".. - S("does not exist (anymore?) on this network.")); - travelnet.update_formspec( pos, name, nil ); - return; - end - - - if( not( travelnet.allow_travel( name, owner_name, station_network, station_name, fields.target ))) then - return; - end - minetest.chat_send_player(name, S("Initiating transfer to station '%s'."):format( fields.target or "?")); - - - - if( travelnet.travelnet_sound_enabled ) then - minetest.sound_play("128590_7037-lq.mp3", {pos = pos, gain = 1.0, max_hear_distance = 10,}) - end - if( travelnet.travelnet_effect_enabled ) then - minetest.add_entity( {x=pos.x,y=pos.y+0.5,z=pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns - end - - -- close the doors at the sending station - travelnet.open_close_door( pos, player, 1 ); - - -- transport the player to the target location - local target_pos = travelnet.targets[ owner_name ][ station_network ][ fields.target ].pos; - player:moveto( target_pos, false); - - if( travelnet.travelnet_sound_enabled ) then - minetest.sound_play("travelnet_travel.wav", {pos = target_pos, gain = 1.0, max_hear_distance = 10,}) - end - if( travelnet.travelnet_effect_enabled ) then - minetest.add_entity( {x=target_pos.x,y=target_pos.y+0.5,z=target_pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns - end - - - -- check if the box has at the other end has been removed. - local node2 = minetest.get_node( target_pos ); - if( node2 ~= nil and node2.name ~= 'ignore' and node2.name ~= 'travelnet:travelnet' and node2.name ~= 'travelnet:elevator' and node2.name ~= "locked_travelnet:travelnet" and node2.name ~= "travelnet:travelnet_private") then - - -- provide information necessary to identify the removed box - local oldmetadata = { fields = { owner = owner_name, - station_name = fields.target, - station_network = station_network }}; - - travelnet.remove_box( target_pos, nil, oldmetadata, player ); - -- send the player back as there's no receiving travelnet - player:moveto( pos, false ); - - -- do this only on servers where the function exists - elseif( player.set_look_horizontal ) then - - -- rotate the player so that he/she can walk straight out of the box - local yaw = 0; - local param2 = node2.param2; - if( param2==0 ) then - yaw = 180; - elseif( param2==1 ) then - yaw = 90; - elseif( param2==2 ) then - yaw = 0; - elseif( param2==3 ) then - yaw = 270; - end - - player:set_look_horizontal( math.rad( yaw )); - player:set_look_vertical( math.rad( 0 )); - end - - travelnet.open_close_door( target_pos, player, 2 ); -end - - -travelnet.remove_box = function( pos, oldnode, oldmetadata, digger ) - - if( not( oldmetadata ) or oldmetadata=="nil" or not(oldmetadata.fields)) then - minetest.chat_send_player( digger:get_player_name(), S("Error")..": ".. - S("Could not find information about the station that is to be removed.")); - return; - end - - local owner_name = oldmetadata.fields[ "owner" ]; - local station_name = oldmetadata.fields[ "station_name" ]; - local station_network = oldmetadata.fields[ "station_network" ]; - - -- station is not known? then just remove it - if( not( owner_name ) - or not( station_name ) - or not( station_network ) - or not( travelnet.targets[ owner_name ] ) - or not( travelnet.targets[ owner_name ][ station_network ] )) then - - minetest.chat_send_player( digger:get_player_name(), S("Error")..": ".. - S("Could not find the station that is to be removed.")); - return; - end - - travelnet.targets[ owner_name ][ station_network ][ station_name ] = nil; - - -- inform the owner - minetest.chat_send_player( owner_name, S("Station '%s'"):format(station_name ).." ".. - S("has been REMOVED from the network '%s'."):format(station_network)); - if( digger ~= nil and owner_name ~= digger:get_player_name() ) then - minetest.chat_send_player( digger:get_player_name(), S("Station '%s'"):format(station_name).. - S("has been REMOVED from the network '%s'."):format(station_network)); - end - - -- save the updated network data in a savefile over server restart - travelnet.save_data(); -end - - - -travelnet.can_dig = function( pos, player, description ) - - if( not( player )) then - return false; - end - local name = player:get_player_name(); - local meta = minetest.get_meta( pos ); - local owner = meta:get_string('owner'); - local network_name = meta:get_string( "station_network" ); - - -- in creative mode, accidental digging could happen too easily when trying to update the net - if(creative and creative.is_enabled_for(player:get_player_name())) then - -- only a diamond pick can dig the travelnet - if( not(player:get_wielded_item()) - or player:get_wielded_item():get_name()~="default:pick_diamond") then - return false; - end - end - - -- players with that priv can dig regardless of owner - if( minetest.check_player_privs(name, {travelnet_remove=true}) - or travelnet.allow_dig( name, owner, network_name )) then - return true; - end - - if( not( meta ) or not( owner) or owner=='') then - minetest.chat_send_player(name, S("This %s has not been configured yet. Please set it up first to claim it. Afterwards you can remove it because you are then the owner."):format(description)); - return false; - - elseif( owner ~= name ) then - minetest.chat_send_player(name, S("This %s belongs to %s. You can't remove it."):format(description, tostring( meta:get_string('owner')))); - return false; - end - return true; -end - - - - - -if( travelnet.travelnet_effect_enabled ) then - minetest.register_entity( 'travelnet:effect', { - - hp_max = 1, - physical = false, - weight = 5, - collisionbox = {-0.4,-0.5,-0.4, 0.4,1.5,0.4}, - visual = "upright_sprite", - visual_size = {x=1, y=2}, --- mesh = "model", - textures = { "travelnet_flash.png" }, -- number of required textures depends on visual --- colors = {}, -- number of required colors depends on visual - spritediv = {x=1, y=1}, - initial_sprite_basepos = {x=0, y=0}, - is_visible = true, - makes_footstep_sound = false, - automatic_rotate = true, - - anz_rotations = 0, - - on_step = function( self, dtime ) - -- this is supposed to be more flickering than smooth animation - self.object:setyaw( self.object:getyaw()+1); - self.anz_rotations = self.anz_rotations + 1; - -- eventually self-destruct - if( self.anz_rotations > 15 ) then - self.object:remove(); - end - end - }) -end - - -if( travelnet.travelnet_enabled ) then - dofile(minetest.get_modpath("travelnet").."/travelnet.lua"); -- the travelnet node definition -end -if( travelnet.elevator_enabled ) then - dofile(minetest.get_modpath("travelnet").."/elevator.lua"); -- allows up/down transfers only -end -if( travelnet.doors_enabled ) then - dofile(minetest.get_modpath("travelnet").."/doors.lua"); -- doors that open and close automaticly when the travelnet or elevator is used -end - -if( travelnet.abm_enabled ) then - dofile(minetest.get_modpath("travelnet").."/restore_network_via_abm.lua"); -- restore travelnet data when players pass by broken networks -end - --- upon server start, read the savefile -travelnet.restore_data(); diff --git a/travelnet/locale/de.txt b/travelnet/locale/de.txt deleted file mode 100644 index 2675c13..0000000 --- a/travelnet/locale/de.txt +++ /dev/null @@ -1,92 +0,0 @@ -# Template - -### config.lua ### - -### init.lua ### - -allows to attach travelnet boxes to travelnets of other players = erlaubt es, Stationen zu den Reisenetzwerken anderer Spieler hinzuzufügen -allows to dig travelnet boxes which belog to nets of other players = erlaubt es, die Reisenetz-Stationen anderer Spieler zu entfernen - -[Mod travelnet] Error: Savefile '%s' could not be written. = [Mod travelnet] Fehler: Sicherungsdatei '%s' konnte nicht geschrieben werden. -[Mod travelnet] Error: Savefile '%s' not found. = [Mod travelnet] Fehler: Sicherungsdatei '%s' nicht gefunden. - -Back = Zurück -Exit = Ende - -Travelnet-box (unconfigured) = Reisenetz-Box (nicht konfiguriert) - -Configure this travelnet station = Konfiguration dieser Reisenetz-Box -Name of this station = Name dieser Reisenetz-Box -How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"... = Wie willst du diesen Ort nennen? Beispiel: \"mein erstes Haus\", \"Mine\", \"Laden\"... -Assign to Network: = Station dem folgendem Netzwerk zuweisen: -You can have more than one network. If unsure, use \"%s\" = Du kannst mehrere Netzwerke anlegen. Falls du nicht weißt, was du tun sollst, wähle \"%s\" -Owned by: = Besitzer: -Unless you know what you are doing, leave this empty. = Wenn du nicht weißt, wozu dieses Feld dient, laß es leer. -Help = Hilfe -Save = Speichern -Update failed! Resetting this box on the travelnet. = Aktualisierung gescheitert. Konfiguration der Reisenetz-Box wird zurückgesetzt. -Station '%s' = Station '%s' -has been reattached to the network '%s'. = wurde dem Netzwerk '%s' wieder hinzugefügt. -Locked travelnet. Type /help for help: = Abgeschlossene Reisenetz-Box. Tippe /help für Hilfe: -Punch box to update target list. = Reisenetz-Box mit Linksklick aktualisieren. -Travelnet-Box = Reisenetz-Box -Name of this station: = Name dieser Station: -Assigned to Network: = Zugehöriges Netzwerk: -Click on target to travel there: = Klicke auf das Ziel um dorthin zu reisen: -G = E -This station is already the first one on the list. = Diese Reisenetz-Box ist bereits die erste auf der Liste. -This station is already the last one on the list. = Diese Reisenetz-Box ist bereits die letzte auf der Liste. -Position in list: = Listenposition: -move up = hoch -move down = runter -on travelnet '%s' = im Reisenetzwerk '%s' -owned by %s = Eigentum von %s -ready for usage. Right-click to travel, punch to update. = bereit für die Nutzung. Rechtsklick um zu Reisen, Linksklick für Update. -at %s m = in %s m Höhe -Error = Fehler -Please provide a name for this station. = Bitte gib einen Namen für diese Reisenetz-Box an. -Please provide the name of the network this station ought to be connected to. = Bitte gib einen Namen für das Netzwerk an zu dem diese Reisenetz-Box gehören soll. -There is no player with interact privilege named '%s'. Aborting. = Es gibt keinen Spieler mit interact-Recht names '%s'. Abbruch. -You do not have the travelnet_attach priv which is required to attach your box to the network of someone else. Aborting. = Dir fehlt das travelnet_attach-Recht, welches für das Hinzufügen von Reisenetz-Boxen zu Netzwerken nötig ist, die anderen Spielern gehören. Abbruch. -A station named '%s' already exists on this network. Please choose a diffrent name! = Eine Reisenetz-Box namens '%s' existiert bereits in diesem Netzwerk. Abbruch. -Network '%s' = Netzwerk '%s' -already contains the maximum number (=%s) of allowed stations per network. Please choose a diffrent/new network name. = enthält bereits die maixmale Anzahl (=%s) erlaubert Stationen pro Netzwerk. Bitte wähle ein anderes bzw. neues Netzwerk. -has been added to the network '%s' = wurde an das Netzwerk '%s' angeschlossen. -, which now consists of %s station(s). = , das nun aus %s Station(en) besteht. -Station: = Station: -Network: = Netzwerk: -No help available yet. = Noch keine Hilfe eingebaut. -Please click on the target you want to travel to. = Bitte klicke auf das Ziel zu dem du reisen willst. -There is something wrong with the configuration of this station. = Die Konfiguration dieser Reisenetz-Box ist fehlerhaft. -This travelnet is lacking data and/or improperly configured. = Diese Reisenetz-Box ist fehlerhaft oder unvollständig konfiguriert. -does not exist (anymore?) on this network. = gibt es nicht (mehr?) in diesem Netzwerk. -Initiating transfer to station '%s'. = leite Reise zur Station '%s' ein. -Could not find information about the station that is to be removed. = Konnte keine Informationen über die zu entfernende Station finden. -Could not find the station that is to be removed. = Konnte die zu entfernende Station nicht finden. -has been REMOVED from the network '%s'. = wurde vom Netzwerk '%s' ENTFERNT. -This %s has not been configured yet. Please set it up first to claim it. Afterwards you can remove it because you are then the owner. = Diese Reisenetz-Box wurde noch nicht konfiguriert. Bitte konfiguriere sie um sie in Besitz zu nehmen. Anschließend kannst du sie auch wieder entfernen da du dann der Besitzer bist. -This %s belongs to %s. You can't remove it. = Diese Reisenetz-Box gehört %s. Du kannst sie nicht entfernen. - - -### travelnet.lua ### -Not enough vertical space to place the travelnet box! = Nicht genug Platz (vertikal) um die Reisenetz-Box zu setzen! - - -### elevator.lua ### -Congratulations! This is your first elevator. You can build an elevator network by placing further elevators somewhere above or below this one. Just make sure that the x and z coordinate are the same. = -This elevator will automaticly connect to the other elevators you have placed at diffrent heights. Just enter a station name and click on \"store\" to set it up. Or just punch it to set the height as station name. = Dieser Aufzug wird sich automatisch mit anderen Aufzügen verbinden die du auf unterschiedlichen Höhen positioniert hast. Gib einfach einen Namen für diese Station hier ein und klicke auf \"Speichern\" um die Station einzurichten. Oder mache einen Linksklick um die Höhe als Stationsname zu setzen. -Your nearest elevator network is located = Dein nächstgelegenes Aufzugs-Netzwerk befindet sich -m behind this elevator and = m hinter diesem Aufzug und -m in front of this elevator and = m vor diesem Aufzug und -m to the left = m links -m to the right = m rechts -, located at x = , an Position x -This elevator here will start a new shaft/network. = Dieser Aufzug hier wird einen neuen Schaft bzw. ein neues Netzwerk erstellen. -This is your first elevator. It differs from travelnet networks by only allowing movement in vertical direction (up or down). All further elevators which you will place at the same x,z coordinates at differnt heights will be able to connect to this elevator. = Dies ist dein erster Aufzug. Der Aufzug unterscheidet sich von Reisenetz-Boxen insofern als daß er nur Reisen in vertikaler Richtung (hoch und runter) erlaubt. Alle folgenden Aufzüge, die du an die selben x,z Koordinaten auf verschiedenen Höhenpositionen setzen wirst, werden sich automatisch mit diesem Aufzug verbinden. -Elevator = Aufzug -Elevator (unconfigured) = Aufzug (nicht konfiguriert) - - -### doors.lua ### -elevator door (open) = Aufzugstür (offen) -elevator door (closed) = Aufzugstür (geschlossen) diff --git a/travelnet/locale/template.txt b/travelnet/locale/template.txt deleted file mode 100644 index 661dbdd..0000000 --- a/travelnet/locale/template.txt +++ /dev/null @@ -1,92 +0,0 @@ -# Template - -### config.lua ### - -### init.lua ### - -allows to attach travelnet boxes to travelnets of other players = -allows to dig travelnet boxes which belog to nets of other players = - -[Mod travelnet] Error: Savefile '%s' could not be written. = -[Mod travelnet] Error: Savefile '%s' not found. = - -Back = -Exit = - -Travelnet-box (unconfigured) = - -Configure this travelnet station = -Name of this station = -How do you call this place here? Example: \"my first house\", \"mine\", \"shop\"... = -Assign to Network: = -You can have more than one network. If unsure, use \"%s\" = -Owned by: = -Unless you know what you are doing, leave this empty. = -Help = -Save = -Update failed! Resetting this box on the travelnet. = -Station '%s' = -has been reattached to the network '%s'. = -Locked travelnet. Type /help for help: = -Punch box to update target list. = -Travelnet-Box = -Name of this station: = -Assigned to Network: = -Click on target to travel there: = -G = -This station is already the first one on the list. = -This station is already the last one on the list. = -Position in list: = -move up = -move down = -on travelnet '%s' = -owned by %s = -ready for usage. Right-click to travel, punch to update. = -at %s m = -Error = -Please provide a name for this station. = -Please provide the name of the network this station ought to be connected to. = -There is no player with interact privilege named '%s'. Aborting. = -You do not have the travelnet_attach priv which is required to attach your box to the network of someone else. Aborting. = -A station named '%s' already exists on this network. Please choose a diffrent name! = -Network '%s' = -already contains the maximum number (=%s) of allowed stations per network. Please choose a diffrent/new network name. = -has been added to the network '%s' = -, which now consists of %s station(s). = -Station: = -Network: = -No help available yet. = -Please click on the target you want to travel to. = -There is something wrong with the configuration of this station. = -This travelnet is lacking data and/or improperly configured. = -does not exist (anymore?) on this network. = -Initiating transfer to station '%s'. = -Could not find information about the station that is to be removed. = -Could not find the station that is to be removed. = -has been REMOVED from the network '%s'. = -This %s has not been configured yet. Please set it up first to claim it. Afterwards you can remove it because you are then the owner. = -This %s belongs to %s. You can't remove it. = - - -### travelnet.lua ### -Not enough vertical space to place the travelnet box! = - - -### elevator.lua ### -Congratulations! This is your first elevator. You can build an elevator network by placing further elevators somewhere above or below this one. Just make sure that the x and z coordinate are the same. = -This elevator will automaticly connect to the other elevators you have placed at diffrent heights. Just enter a station name and click on \"store\" to set it up. Or just punch it to set the height as station name. = -Your nearest elevator network is located = -m behind this elevator and = -m in front of this elevator and = -m to the left = -m to the right = -, located at x = -This elevator here will start a new shaft/network. = -This is your first elevator. It differs from travelnet networks by only allowing movement in vertical direction (up or down). All further elevators which you will place at the same x,z coordinates at differnt heights will be able to connect to this elevator. = -Elevator = -Elevator (unconfigured) = - - -### doors.lua ### -elevator door (open) = -elevator door (closed) = diff --git a/travelnet/models/travelnet.obj b/travelnet/models/travelnet.obj deleted file mode 100644 index 50e5afd..0000000 --- a/travelnet/models/travelnet.obj +++ /dev/null @@ -1,63 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'travelnet.blend' -# www.blender.org -o Cylinder -v -0.499016 -0.499034 0.499022 -v -0.499016 -0.499034 -0.498989 -v 0.499035 -0.499034 -0.498989 -v 0.499035 -0.499034 0.499022 -v -0.499016 1.498990 0.499022 -v -0.499016 1.498990 -0.498989 -v 0.499035 1.498990 -0.498989 -v 0.499035 1.498990 0.499022 -v 0.437500 -0.437500 0.437500 -v -0.499016 1.437500 -0.498989 -v 0.499035 1.437500 -0.498989 -v -0.437500 -0.437500 0.437500 -v 0.437500 1.437500 0.437500 -v -0.499016 -0.437500 -0.498989 -v 0.499035 -0.437500 -0.498989 -v -0.437500 1.437500 0.437500 -v -0.437500 -0.437500 -0.498989 -v 0.437500 -0.437500 -0.498989 -v -0.437500 1.437500 -0.498989 -v 0.437500 1.437500 -0.498989 -vt 0.000000 0.968750 -vt 1.000000 0.968750 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vt 0.062500 0.031250 -vt 0.062500 0.968750 -vt 0.000000 0.031250 -vt 0.937500 0.031250 -vt 1.000000 0.031250 -vt 0.937500 0.968750 -vt 1.000000 -0.000000 -vt 0.000000 -0.000000 -vt 0.062500 -0.000000 -vt 0.937500 -0.000000 -vt 0.937500 0.937500 -vt 0.062500 0.937500 -vt 0.062500 1.000000 -vt 0.062500 0.062500 -vt 0.937500 0.062500 -vt 0.937500 1.000000 -g Cylinder_Cylinder_front -s off -f 11/1 10/2 6/3 7/4 -f 18/5 20/6 11/1 15/7 -f 17/8 14/9 10/2 19/10 -f 13/6 9/5 12/8 16/10 -f 2/11 14/9 15/7 3/12 -g Cylinder_Cylinder_back -f 8/4 5/3 1/11 4/12 -g Cylinder_Cylinder_sides -f 18/7 9/8 13/10 20/1 -f 17/7 19/1 16/10 12/8 -f 8/3 4/11 3/12 7/4 -f 6/4 2/12 1/11 5/3 -g Cylinder_Cylinder_top -f 5/12 8/11 7/3 6/4 -f 19/13 20/14 13/15 16/16 -g Cylinder_Cylinder_bottom -f 17/17 12/18 9/19 18/20 -f 2/12 3/11 4/3 1/4 diff --git a/travelnet/models/travelnet_elevator.obj b/travelnet/models/travelnet_elevator.obj deleted file mode 100644 index cc006e2..0000000 --- a/travelnet/models/travelnet_elevator.obj +++ /dev/null @@ -1,64 +0,0 @@ -# Blender v2.73 (sub 0) OBJ File: 'travelnet_elevator.blend' -# www.blender.org -o Cylinder -v -0.499016 -0.499034 0.499022 -v -0.499016 -0.499034 -0.498989 -v 0.499035 -0.499034 -0.498989 -v 0.499035 -0.499034 0.499022 -v -0.499016 1.498990 0.499022 -v -0.499016 1.498990 -0.498989 -v 0.499035 1.498990 -0.498989 -v 0.499035 1.498990 0.499022 -v 0.437500 -0.437500 0.437500 -v -0.499016 1.437500 -0.498989 -v 0.499035 1.437500 -0.498989 -v -0.437500 -0.437500 0.437500 -v 0.437500 1.437500 0.437500 -v -0.499016 -0.437500 -0.498989 -v 0.499035 -0.437500 -0.498989 -v -0.437500 1.437500 0.437500 -v -0.437500 -0.437500 -0.498989 -v 0.437500 -0.437500 -0.498989 -v -0.437500 1.437500 -0.498989 -v 0.437500 1.437500 -0.498989 -vt 0.000000 0.968750 -vt 1.000000 0.968750 -vt 1.000000 1.000000 -vt 0.000000 1.000000 -vt 0.062500 0.031250 -vt 0.062500 0.968750 -vt 0.000000 0.031250 -vt 0.937500 0.031250 -vt 1.000000 0.031250 -vt 0.937500 0.968750 -vt 1.000000 -0.000000 -vt 0.000000 -0.000000 -vt 0.062500 -0.000000 -vt 0.937500 -0.000000 -vt 0.937500 0.937500 -vt 0.062500 0.937500 -vt 0.062500 1.000000 -vt 0.062500 0.062500 -vt 0.937500 0.062500 -vt 0.937500 1.000000 -g Cylinder_Cylinder_front -s off -f 11/1 10/2 6/3 7/4 -f 18/5 20/6 11/1 15/7 -f 17/8 14/9 10/2 19/10 -f 13/6 9/5 12/8 16/10 -f 2/11 14/9 15/7 3/12 -f 17/7 19/1 16/10 12/8 -g Cylinder_Cylinder_controls -f 18/7 9/8 13/10 20/1 -g Cylinder_Cylinder_outside -f 8/3 4/11 3/12 7/4 -f 6/4 2/12 1/11 5/3 -f 8/4 5/3 1/11 4/12 -g Cylinder_Cylinder_ceiling -f 19/13 20/14 13/15 16/16 -g Cylinder_Cylinder_floor -f 17/17 12/18 9/19 18/20 -g Cylinder_Cylinder_top-bottom -f 5/12 8/11 7/3 6/4 -f 2/12 3/11 4/3 1/4 diff --git a/travelnet/restore_network_via_abm.lua b/travelnet/restore_network_via_abm.lua deleted file mode 100644 index 3bd1dda..0000000 --- a/travelnet/restore_network_via_abm.lua +++ /dev/null @@ -1,24 +0,0 @@ - -minetest.register_abm({ - nodenames = {"travelnet:travelnet"}, - interval = 20, - chance = 1, - action = function(pos, node) - local meta = minetest.get_meta( pos ); - - local owner_name = meta:get_string( "owner" ); - local station_name = meta:get_string( "station_name" ); - local station_network = meta:get_string( "station_network" ); - - if( owner_name and station_name and station_network - and ( not( travelnet.targets ) - or not( travelnet.targets[ owner_name ] ) - or not( travelnet.targets[ owner_name ][ station_network ] ) - or not( travelnet.targets[ owner_name ][ station_network ][ station_name ] ))) then - - travelnet.add_target( station_name, station_network, pos, owner_name, meta, owner_name ); - print( 'TRAVELNET: re-adding '..tostring( station_name )..' to '..tostring( station_network )..' owned by '..tostring( owner_name )); - end - end -}) - diff --git a/travelnet/screenshot.png b/travelnet/screenshot.png deleted file mode 100644 index 706012f..0000000 Binary files a/travelnet/screenshot.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_door_glass.png b/travelnet/textures/travelnet_elevator_door_glass.png deleted file mode 100644 index ae775c4..0000000 Binary files a/travelnet/textures/travelnet_elevator_door_glass.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_front.png b/travelnet/textures/travelnet_elevator_front.png deleted file mode 100644 index 60ec49e..0000000 Binary files a/travelnet/textures/travelnet_elevator_front.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_inside_ceiling.png b/travelnet/textures/travelnet_elevator_inside_ceiling.png deleted file mode 100644 index f35dd07..0000000 Binary files a/travelnet/textures/travelnet_elevator_inside_ceiling.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_inside_controls.png b/travelnet/textures/travelnet_elevator_inside_controls.png deleted file mode 100644 index 725c39b..0000000 Binary files a/travelnet/textures/travelnet_elevator_inside_controls.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_inside_floor.png b/travelnet/textures/travelnet_elevator_inside_floor.png deleted file mode 100644 index 7874bac..0000000 Binary files a/travelnet/textures/travelnet_elevator_inside_floor.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_inv.png b/travelnet/textures/travelnet_elevator_inv.png deleted file mode 100644 index a390d75..0000000 Binary files a/travelnet/textures/travelnet_elevator_inv.png and /dev/null differ diff --git a/travelnet/textures/travelnet_elevator_sides_outside.png b/travelnet/textures/travelnet_elevator_sides_outside.png deleted file mode 100644 index 82c0a03..0000000 Binary files a/travelnet/textures/travelnet_elevator_sides_outside.png and /dev/null differ diff --git a/travelnet/textures/travelnet_flash.png b/travelnet/textures/travelnet_flash.png deleted file mode 100644 index 47a6365..0000000 Binary files a/travelnet/textures/travelnet_flash.png and /dev/null differ diff --git a/travelnet/textures/travelnet_inv.png b/travelnet/textures/travelnet_inv.png deleted file mode 100644 index 6f7df22..0000000 Binary files a/travelnet/textures/travelnet_inv.png and /dev/null differ diff --git a/travelnet/textures/travelnet_travelnet_back.png b/travelnet/textures/travelnet_travelnet_back.png deleted file mode 100644 index f08c9eb..0000000 Binary files a/travelnet/textures/travelnet_travelnet_back.png and /dev/null differ diff --git a/travelnet/textures/travelnet_travelnet_front.png b/travelnet/textures/travelnet_travelnet_front.png deleted file mode 100644 index 2b0c3a2..0000000 Binary files a/travelnet/textures/travelnet_travelnet_front.png and /dev/null differ diff --git a/travelnet/textures/travelnet_travelnet_side.png b/travelnet/textures/travelnet_travelnet_side.png deleted file mode 100644 index bd6092e..0000000 Binary files a/travelnet/textures/travelnet_travelnet_side.png and /dev/null differ diff --git a/travelnet/travelnet.lua b/travelnet/travelnet.lua deleted file mode 100644 index aee7f64..0000000 --- a/travelnet/travelnet.lua +++ /dev/null @@ -1,98 +0,0 @@ --- contains the node definition for a general travelnet that can be used by anyone --- further travelnets can only be installed by the owner or by people with the travelnet_attach priv --- digging of such a travelnet is limited to the owner and to people with the travelnet_remove priv (useful for admins to clean up) --- (this can be overrided in config.lua) --- Author: Sokomine -local S = travelnet.S; - -minetest.register_node("travelnet:travelnet", { - - description = S("Travelnet-Box"), - - drawtype = "mesh", - mesh = "travelnet.obj", - sunlight_propagates = true, - paramtype = 'light', - paramtype2 = "facedir", - wield_scale = {x=0.6, y=0.6, z=0.6}, - selection_box = { - type = "fixed", - fixed = { -0.5, -0.5, -0.5, 0.5, 1.5, 0.5 } - }, - - collision_box = { - type = "fixed", - fixed = { - - { 0.45, -0.5,-0.5, 0.5, 1.45, 0.5}, - {-0.5 , -0.5, 0.45, 0.45, 1.45, 0.5}, - {-0.5, -0.5,-0.5 ,-0.45, 1.45, 0.5}, - - --groundplate to stand on - { -0.5,-0.5,-0.5,0.5,-0.45, 0.5}, - --roof - { -0.5, 1.45,-0.5,0.5, 1.5, 0.5}, - - -- control panel - -- { -0.2, 0.6, 0.3, 0.2, 1.1, 0.5}, - - }, - }, - - tiles = { - "travelnet_travelnet_front.png", -- backward view - "travelnet_travelnet_back.png", -- front view - "travelnet_travelnet_side.png", -- sides :) - "default_steel_block.png", -- view from top - "default_clay.png", -- view from bottom - }, - inventory_image = "travelnet_inv.png", - - groups = {cracky=1,choppy=1,snappy=1}, - - light_source = 10, - - after_place_node = function(pos, placer, itemstack) - local meta = minetest.get_meta(pos); - travelnet.reset_formspec( meta ); - meta:set_string("owner", placer:get_player_name() ); - end, - - on_receive_fields = travelnet.on_receive_fields, - on_punch = function(pos, node, puncher) - if( not( travelnet.check_if_trying_to_dig( puncher, node ))) then - travelnet.update_formspec(pos, puncher:get_player_name(), nil) - end - end, - - can_dig = function( pos, player ) - return travelnet.can_dig( pos, player, 'travelnet box' ) - end, - - after_dig_node = function(pos, oldnode, oldmetadata, digger) - travelnet.remove_box( pos, oldnode, oldmetadata, digger ) - end, - - -- TNT and overenthusiastic DMs do not destroy travelnets - on_blast = function(pos, intensity) - end, - - -- taken from VanessaEs homedecor fridge - on_place = function(itemstack, placer, pointed_thing) - - local pos = pointed_thing.above; - if( minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name ~= "air" ) then - - minetest.chat_send_player( placer:get_player_name(), S('Not enough vertical space to place the travelnet box!')) - return; - end - return minetest.item_place(itemstack, placer, pointed_thing); - end, - -}) - ---[ -minetest.register_craft({ - output = "travelnet:travelnet", - recipe = travelnet.travelnet_recipe, -}) diff --git a/unified_inventory/.github/workflows/check-release.yml b/unified_inventory/.github/workflows/check-release.yml new file mode 100644 index 0000000..47313ff --- /dev/null +++ b/unified_inventory/.github/workflows/check-release.yml @@ -0,0 +1,11 @@ +on: [push, pull_request] +name: Check & Release +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: lint + uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: https://raw.githubusercontent.com/minetest-mods/unified_inventory/master/.luacheckrc diff --git a/unified_inventory/.gitignore b/unified_inventory/.gitignore new file mode 100644 index 0000000..5236e1e --- /dev/null +++ b/unified_inventory/.gitignore @@ -0,0 +1,2 @@ +*~ + diff --git a/unified_inventory/.luacheckrc b/unified_inventory/.luacheckrc new file mode 100644 index 0000000..9fb6a7c --- /dev/null +++ b/unified_inventory/.luacheckrc @@ -0,0 +1,20 @@ +unused_args = false +allow_defined_top = true +max_line_length = 999 + +globals = { + "unified_inventory", +} + +read_globals = { + string = {fields = {"split", "trim"}}, + table = {fields = {"copy", "getn"}}, + + "minetest", "vector", + "ItemStack", "datastorage", + + "hb", +} + +files["callbacks.lua"].ignore = { "player", "draw_lite_mode" } +files["bags.lua"].ignore = { "player" } diff --git a/unified_inventory/LICENSE.txt b/unified_inventory/LICENSE.txt new file mode 100644 index 0000000..32492e4 --- /dev/null +++ b/unified_inventory/LICENSE.txt @@ -0,0 +1,19 @@ +Unified Inventory for Minetest +Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel) + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Contact information: + Examine a git patch to get the contributor's email address. diff --git a/unified_inventory/README.md b/unified_inventory/README.md index 1de7256..d159c02 100644 --- a/unified_inventory/README.md +++ b/unified_inventory/README.md @@ -1,22 +1,51 @@ -Unified inventory -================= +# Unified Inventory + +[![](https://github.com/minetest-mods/unified_inventory/workflows/Check%20&%20Release/badge.svg)](https://github.com/minetest-mods/unified_inventory/actions) + +![Screenshot](screenshot.png) Unified Inventory replaces the default survival and creative inventory. -It adds a nicer interface and a number of features, such as a crafting guide. -License -======= + +## Features + + * Node, item and tool browser + * Crafting guide + * Can copy the recipe to the crafting grid + * Recipe search function by ingredients + * Up to four bags with up to 24 slots each + * Home function to teleport + * Trash slot + * Lite mode: reduces the item browser width + * `minetest.conf` setting `unified_inventory_lite = true` + * Mod API for modders: see [mod_api.txt](doc/mod_api.txt) + * Setting-determinated features: see [settingtypes.txt](settingtypes.txt) + + +## Requirements + + * Minetest 5.4.0+ + +# Licenses Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel) -Unified inventory code is licensed under the GNU LGPLv2+. +Copyright (C) 2012-? Various minetest-mods contributors -Licenses for textures: + +## Code + +GNU LGPLv2+, see [license notice](LICENSE.txt) + + +## Textures VanessaE: (CC-BY-4.0) + * `ui_group.png` Tango Project: (Public Domain, CC-BY-4.0) + * [`ui_reset_icon.png`](https://commons.wikimedia.org/wiki/File:Edit-clear.svg) * [`ui_doubleleft_icon.png`](http://commons.wikimedia.org/wiki/File:Media-seek-backward.svg) * [`ui_doubleright_icon.png`](http://commons.wikimedia.org/wiki/File:Media-seek-forward.svg) @@ -25,6 +54,7 @@ Tango Project: (Public Domain, CC-BY-4.0) * [`ui_skip_forward_icon.png`](http://commons.wikimedia.org/wiki/File:Media-skip-forward.svg) From http://www.clker.com (Public Domain, CC-BY-4.0): + * [`bags_small.png`](http://www.clker.com/clipart-moneybag-empty.html) * [`bags_medium.png`](http://www.clker.com/clipart-backpack-1.html) * [`bags_large.png` / `ui_bags_icon.png`](http://www.clker.com/clipart-backpack-green-brown.html) @@ -37,25 +67,33 @@ From http://www.clker.com (Public Domain, CC-BY-4.0): * [`ui_waypoint_set_icon.png`](http://www.clker.com/clipart-larger-flag.html) Everaldo Coelho (YellowIcon) (LGPL v2.1+): + * [`ui_craftguide_icon.png` / `ui_craft_icon.png`](http://commons.wikimedia.org/wiki/File:Advancedsettings.png) Gregory H. Revera: (CC-BY-SA 3.0) + * [`ui_moon_icon.png`](http://commons.wikimedia.org/wiki/File:FullMoon2010.jpg) Thomas Bresson: (CC-BY 3.0) + * [`ui_sun_icon.png`](http://commons.wikimedia.org/wiki/File:2012-10-13_15-29-35-sun.jpg) Fibonacci: (Public domain, CC-BY 4.0) + * [`ui_xyz_off_icon.png`](http://commons.wikimedia.org/wiki/File:No_sign.svg) Gregory Maxwell: (Public domain, CC-BY 4.0) + * [`ui_ok_icon.png`](http://commons.wikimedia.org/wiki/File:Yes_check.svg) Adrien Facélina: (LGPL v2.1+) + * [`inventory_plus_worldedit_gui.png`](http://commons.wikimedia.org/wiki/File:Erioll_world_2.svg) Other files from Wikimedia Commons: + * [`ui_gohome_icon.png` / `ui_home_icon.png` / `ui_sethome_icon.png`](http://commons.wikimedia.org/wiki/File:Home_256x256.png) (GPL v2+) RealBadAngel: (CC-BY-4.0) - * Everything else. \ No newline at end of file + + * Everything else. diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua index f6afec5..05a34ee 100644 --- a/unified_inventory/api.lua +++ b/unified_inventory/api.lua @@ -1,5 +1,6 @@ -local S = unified_inventory.gettext +local S = minetest.get_translator("unified_inventory") local F = minetest.formspec_escape +local ui = unified_inventory -- Create detached creative inventory after loading all mods minetest.after(0.01, function() @@ -8,16 +9,16 @@ minetest.after(0.01, function() if not rev_aliases[target] then rev_aliases[target] = {} end table.insert(rev_aliases[target], source) end - unified_inventory.items_list = {} + ui.items_list = {} for name, def in pairs(minetest.registered_items) do if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" then - table.insert(unified_inventory.items_list, name) + table.insert(ui.items_list, name) local all_names = rev_aliases[name] or {} table.insert(all_names, name) - for _, name in ipairs(all_names) do - local recipes = minetest.get_all_craft_recipes(name) + for _, player_name in ipairs(all_names) do + local recipes = minetest.get_all_craft_recipes(player_name) if recipes then for _, recipe in ipairs(recipes) do @@ -26,30 +27,30 @@ minetest.after(0.01, function() for _,chk in pairs(recipe.items) do local groupchk = string.find(chk, "group:") if (not groupchk and not minetest.registered_items[chk]) - or (groupchk and not unified_inventory.get_group_item(string.gsub(chk, "group:", "")).item) + or (groupchk and not ui.get_group_item(string.gsub(chk, "group:", "")).item) or minetest.get_item_group(chk, "not_in_craft_guide") ~= 0 then unknowns = true end end if not unknowns then - unified_inventory.register_craft(recipe) + ui.register_craft(recipe) end end end end end end - table.sort(unified_inventory.items_list) - unified_inventory.items_list_size = #unified_inventory.items_list - print("Unified Inventory. inventory size: "..unified_inventory.items_list_size) - for _, name in ipairs(unified_inventory.items_list) do + table.sort(ui.items_list) + ui.items_list_size = #ui.items_list + print("Unified Inventory. inventory size: "..ui.items_list_size) + for _, name in ipairs(ui.items_list) do local def = minetest.registered_items[name] -- Simple drops if type(def.drop) == "string" then local dstack = ItemStack(def.drop) if not dstack:is_empty() and dstack:get_name() ~= name then - unified_inventory.register_craft({ + ui.register_craft({ type = "digging", items = {name}, output = def.drop, @@ -115,7 +116,7 @@ minetest.after(0.01, function() end end for itemstring, count in pairs(drop_guaranteed) do - unified_inventory.register_craft({ + ui.register_craft({ type = "digging", items = {name}, output = itemstring .. " " .. count, @@ -123,7 +124,7 @@ minetest.after(0.01, function() }) end for itemstring, count in pairs(drop_maybe) do - unified_inventory.register_craft({ + ui.register_craft({ type = "digging_chance", items = {name}, output = itemstring .. " " .. count, @@ -132,22 +133,22 @@ minetest.after(0.01, function() end end end - for _, recipes in pairs(unified_inventory.crafts_for.recipe) do + for _, recipes in pairs(ui.crafts_for.recipe) do for _, recipe in ipairs(recipes) do local ingredient_items = {} for _, spec in pairs(recipe.items) do - local matches_spec = unified_inventory.canonical_item_spec_matcher(spec) - for _, name in ipairs(unified_inventory.items_list) do + local matches_spec = ui.canonical_item_spec_matcher(spec) + for _, name in ipairs(ui.items_list) do if matches_spec(name) then ingredient_items[name] = true end end end for name, _ in pairs(ingredient_items) do - if unified_inventory.crafts_for.usage[name] == nil then - unified_inventory.crafts_for.usage[name] = {} + if ui.crafts_for.usage[name] == nil then + ui.crafts_for.usage[name] = {} end - table.insert(unified_inventory.crafts_for.usage[name], recipe) + table.insert(ui.crafts_for.usage[name], recipe) end end end @@ -156,9 +157,9 @@ end) -- load_home local function load_home() - local input = io.open(unified_inventory.home_filename, "r") + local input = io.open(ui.home_filename, "r") if not input then - unified_inventory.home_pos = {} + ui.home_pos = {} return end while true do @@ -167,32 +168,34 @@ local function load_home() local y = input:read("*n") local z = input:read("*n") local name = input:read("*l") - unified_inventory.home_pos[name:sub(2)] = {x = x, y = y, z = z} + ui.home_pos[name:sub(2)] = {x = x, y = y, z = z} end io.close(input) end load_home() -function unified_inventory.set_home(player, pos) +function ui.set_home(player, pos) local player_name = player:get_player_name() - unified_inventory.home_pos[player_name] = vector.round(pos) + ui.home_pos[player_name] = vector.round(pos) -- save the home data from the table to the file - local output = io.open(unified_inventory.home_filename, "w") - for k, v in pairs(unified_inventory.home_pos) do + local output = io.open(ui.home_filename, "w") + for k, v in pairs(ui.home_pos) do output:write(v.x.." "..v.y.." "..v.z.." "..k.."\n") end io.close(output) end -function unified_inventory.go_home(player) - local pos = unified_inventory.home_pos[player:get_player_name()] +function ui.go_home(player) + local pos = ui.home_pos[player:get_player_name()] if pos then - player:setpos(pos) + player:set_pos(pos) + return true end + return false end -- register_craft -function unified_inventory.register_craft(options) +function ui.register_craft(options) if not options.output then return end @@ -203,10 +206,10 @@ function unified_inventory.register_craft(options) if options.type == "normal" and options.width == 0 then options = { type = "shapeless", items = options.items, output = options.output, width = 0 } end - if not unified_inventory.crafts_for.recipe[itemstack:get_name()] then - unified_inventory.crafts_for.recipe[itemstack:get_name()] = {} + if not ui.crafts_for.recipe[itemstack:get_name()] then + ui.crafts_for.recipe[itemstack:get_name()] = {} end - table.insert(unified_inventory.crafts_for.recipe[itemstack:get_name()],options) + table.insert(ui.crafts_for.recipe[itemstack:get_name()],options) end @@ -217,7 +220,7 @@ local craft_type_defaults = { } -function unified_inventory.craft_type_defaults(name, options) +function ui.craft_type_defaults(name, options) if not options.description then options.description = name end @@ -226,13 +229,13 @@ function unified_inventory.craft_type_defaults(name, options) end -function unified_inventory.register_craft_type(name, options) - unified_inventory.registered_craft_types[name] = - unified_inventory.craft_type_defaults(name, options) +function ui.register_craft_type(name, options) + ui.registered_craft_types[name] = + ui.craft_type_defaults(name, options) end -unified_inventory.register_craft_type("normal", { +ui.register_craft_type("normal", { description = F(S("Crafting")), icon = "ui_craftgrid_icon.png", width = 3, @@ -248,7 +251,7 @@ unified_inventory.register_craft_type("normal", { }) -unified_inventory.register_craft_type("shapeless", { +ui.register_craft_type("shapeless", { description = F(S("Mixing")), icon = "ui_craftgrid_icon.png", width = 3, @@ -263,7 +266,7 @@ unified_inventory.register_craft_type("shapeless", { }) -unified_inventory.register_craft_type("cooking", { +ui.register_craft_type("cooking", { description = F(S("Cooking")), icon = "default_furnace_front.png", width = 1, @@ -271,38 +274,60 @@ unified_inventory.register_craft_type("cooking", { }) -unified_inventory.register_craft_type("digging", { +ui.register_craft_type("digging", { description = F(S("Digging")), icon = "default_tool_steelpick.png", width = 1, height = 1, }) -unified_inventory.register_craft_type("digging_chance", { +ui.register_craft_type("digging_chance", { description = "Digging (by chance)", icon = "default_tool_steelpick.png^[transformFY.png", width = 1, height = 1, }) -function unified_inventory.register_page(name, def) - unified_inventory.pages[name] = def +function ui.register_page(name, def) + ui.pages[name] = def end -function unified_inventory.register_button(name, def) +function ui.register_button(name, def) if not def.action then def.action = function(player) - unified_inventory.set_inventory_formspec(player, name) + ui.set_inventory_formspec(player, name) end end def.name = name - table.insert(unified_inventory.buttons, def) + table.insert(ui.buttons, def) end - -function unified_inventory.is_creative(playername) +function ui.is_creative(playername) return minetest.check_player_privs(playername, {creative=true}) or minetest.settings:get_bool("creative_mode") end +function ui.single_slot(xpos, ypos, bright) + return string.format("background9[%f,%f;%f,%f;ui_single_slot%s.png;false;16]", + xpos, ypos, ui.imgscale, ui.imgscale, (bright and "_bright" or "") ) +end + +function ui.make_trash_slot(xpos, ypos) + return + ui.single_slot(xpos, ypos).. + "image["..xpos..","..ypos..";1.25,1.25;ui_trash_slot_icon.png]".. + "list[detached:trash;main;"..(xpos + ui.list_img_offset)..","..(ypos + ui.list_img_offset)..";1,1;]" +end + +function ui.make_inv_img_grid(xpos, ypos, width, height, bright) + local tiled = {} + local n=1 + for y = 0, (height - 1) do + for x = 0, (width -1) do + tiled[n] = ui.single_slot(xpos + (ui.imgscale * x), ypos + (ui.imgscale * y), bright) + n = n + 1 + end + end + return table.concat(tiled) +end diff --git a/unified_inventory/bags.lua b/unified_inventory/bags.lua index 6f07314..14ac875 100644 --- a/unified_inventory/bags.lua +++ b/unified_inventory/bags.lua @@ -1,30 +1,38 @@ --- Bags for Minetest +--[[ +Bags for Minetest --- Copyright (c) 2012 cornernote, Brett O'Donnell --- License: GPLv3 +Copyright (c) 2012 cornernote, Brett O'Donnell +License: GPLv3 +--]] -local S = unified_inventory.gettext +local S = minetest.get_translator("unified_inventory") local F = minetest.formspec_escape +local ui = unified_inventory -unified_inventory.register_page("bags", { +ui.register_page("bags", { get_formspec = function(player) local player_name = player:get_player_name() - local formspec = "background[0.06,0.99;7.92,7.52;ui_bags_main_form.png]" - formspec = formspec.."label[0,0;"..F(S("Bags")).."]" - formspec = formspec.."button[0,2;2,0.5;bag1;"..F(S("Bag @1", 1)).."]" - formspec = formspec.."button[2,2;2,0.5;bag2;"..F(S("Bag @1", 2)).."]" - formspec = formspec.."button[4,2;2,0.5;bag3;"..F(S("Bag @1", 3)).."]" - formspec = formspec.."button[6,2;2,0.5;bag4;"..F(S("Bag @1", 4)).."]" - formspec = formspec.."listcolors[#00000000;#00000000]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag1;0.5,1;1,1;]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag2;2.5,1;1,1;]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag3;4.5,1;1,1;]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag4;6.5,1;1,1;]" - return {formspec=formspec} + return { formspec = table.concat({ + ui.style_full.standard_inv_bg, + ui.single_slot(0.925, 1.5), + ui.single_slot(3.425, 1.5), + ui.single_slot(5.925, 1.5), + ui.single_slot(8.425, 1.5), + "label["..ui.style_full.form_header_x..","..ui.style_full.form_header_y..";" .. F(S("Bags")) .. "]", + "button[0.6125,2.75;1.875,0.75;bag1;" .. F(S("Bag @1", 1)) .. "]", + "button[3.1125,2.75;1.875,0.75;bag2;" .. F(S("Bag @1", 2)) .. "]", + "button[5.6125,2.75;1.875,0.75;bag3;" .. F(S("Bag @1", 3)) .. "]", + "button[8.1125,2.75;1.875,0.75;bag4;" .. F(S("Bag @1", 4)) .. "]", + "listcolors[#00000000;#00000000]", + "list[detached:" .. F(player_name) .. "_bags;bag1;1.075,1.65;1,1;]", + "list[detached:" .. F(player_name) .. "_bags;bag2;3.575,1.65;1,1;]", + "list[detached:" .. F(player_name) .. "_bags;bag3;6.075,1.65;1,1;]", + "list[detached:" .. F(player_name) .. "_bags;bag4;8.575,1.65;1,1;]" + }) } end, }) -unified_inventory.register_button("bags", { +ui.register_button("bags", { type = "image", image = "ui_bags_icon.png", tooltip = S("Bags"), @@ -38,37 +46,38 @@ local function get_player_bag_stack(player, i) }):get_stack("bag" .. i, 1) end -for i = 1, 4 do - local bi = i - unified_inventory.register_page("bag"..bi, { +for bag_i = 1, 4 do + ui.register_page("bag" .. bag_i, { get_formspec = function(player) - local stack = get_player_bag_stack(player, bi) + local stack = get_player_bag_stack(player, bag_i) local image = stack:get_definition().inventory_image - local formspec = ("image[7,0;1,1;"..image.."]" - .."label[0,0;"..F(S("Bag @1", bi)).."]" - .."listcolors[#00000000;#00000000]" - .."list[current_player;bag"..bi.."contents;0,1;8,3;]" - .."listring[current_name;bag"..bi.."contents]" - .."listring[current_player;main]") local slots = stack:get_definition().groups.bagslots - if slots == 8 then - formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_sm_form.png]" - elseif slots == 16 then - formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_med_form.png]" - elseif slots == 24 then - formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_lg_form.png]" - end + + local formspec = { + ui.style_full.standard_inv_bg, + ui.make_inv_img_grid(0.3, 1.5, 8, slots/8), + "image[9.2,0.4;1,1;" .. image .. "]", + "label[0.3,0.65;" .. F(S("Bag @1", bag_i)) .. "]", + "listcolors[#00000000;#00000000]", + "listring[current_player;main]", + string.format("list[current_player;bag%icontents;%f,%f;8,3;]", + bag_i, 0.3 + ui.list_img_offset, 1.5 + ui.list_img_offset), + "listring[current_name;bag" .. bag_i .. "contents]", + } + local n = #formspec + 1 + local player_name = player:get_player_name() -- For if statement. - if unified_inventory.trash_enabled or unified_inventory.is_creative(player_name) or minetest.get_player_privs(player_name).give then - formspec = (formspec.."background[6.06,0;0.92,0.92;ui_bags_trash.png]" - .."list[detached:trash;main;6,0.1;1,1;]") + if ui.trash_enabled + or ui.is_creative(player_name) + or minetest.get_player_privs(player_name).give then + formspec[n] = ui.make_trash_slot(7.8, 0.25) + n = n + 1 end local inv = player:get_inventory() for i = 1, 4 do local def = get_player_bag_stack(player, i):get_definition() - local button if def.groups.bagslots then - local list_name = "bag"..i.."contents" + local list_name = "bag" .. i .. "contents" local size = inv:get_size(list_name) local used = 0 for si = 1, size do @@ -78,14 +87,13 @@ for i = 1, 4 do end end local img = def.inventory_image - local label = F(S("Bag @1", i)).."\n"..used.."/"..size - button = "image_button["..(i+1)..",0;1,1;"..img..";bag"..i..";"..label.."]" - else - button = "" + local label = F(S("Bag @1", i)) .. "\n" .. used .. "/" .. size + formspec[n] = string.format("image_button[%f,0.4;1,1;%s;bag%i;%s]", + (i + 1.35)*1.25, img, i, label) + n = n + 1 end - formspec = formspec..button end - return {formspec=formspec} + return { formspec = table.concat(formspec) } end, }) end @@ -95,12 +103,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) return end for i = 1, 4 do - if fields["bag"..i] then + if fields["bag" .. i] then local stack = get_player_bag_stack(player, i) if not stack:get_definition().groups.bagslots then return end - unified_inventory.set_inventory_formspec(player, "bag"..i) + ui.set_inventory_formspec(player, "bag" .. i) return end end @@ -110,30 +118,32 @@ local function save_bags_metadata(player, bags_inv) local is_empty = true local bags = {} for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i if not bags_inv:is_empty(bag) then -- Stack limit is 1, otherwise use stack:to_string() bags[i] = bags_inv:get_stack(bag, 1):get_name() is_empty = false end end + local meta = player:get_meta() if is_empty then - player:set_attribute("unified_inventory:bags", nil) + meta:set_string("unified_inventory:bags", nil) else - player:set_attribute("unified_inventory:bags", + meta:set_string("unified_inventory:bags", minetest.serialize(bags)) end end local function load_bags_metadata(player, bags_inv) local player_inv = player:get_inventory() - local bags_meta = player:get_attribute("unified_inventory:bags") + local meta = player:get_meta() + local bags_meta = meta:get("unified_inventory:bags") local bags = bags_meta and minetest.deserialize(bags_meta) or {} local dirty_meta = false if not bags_meta then -- Backwards compatiblity for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i if not player_inv:is_empty(bag) then -- Stack limit is 1, otherwise use stack:to_string() bags[i] = player_inv:get_stack(bag, 1):get_name() @@ -143,7 +153,7 @@ local function load_bags_metadata(player, bags_inv) end -- Fill detached slots for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i bags_inv:set_size(bag, 1) bags_inv:set_stack(bag, 1, bags[i] or "") end @@ -155,17 +165,16 @@ local function load_bags_metadata(player, bags_inv) -- Clean up deprecated garbage after saving for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i player_inv:set_size(bag, 0) end end minetest.register_on_joinplayer(function(player) - local player_inv = player:get_inventory() local player_name = player:get_player_name() - local bags_inv = minetest.create_detached_inventory(player_name.."_bags",{ + local bags_inv = minetest.create_detached_inventory(player_name .. "_bags",{ on_put = function(inv, listname, index, stack, player) - player:get_inventory():set_size(listname.."contents", + player:get_inventory():set_size(listname .. "contents", stack:get_definition().groups.bagslots) save_bags_metadata(player, inv) end, @@ -175,14 +184,14 @@ minetest.register_on_joinplayer(function(player) return 0 end local player_inv = player:get_inventory() - local old_slots = player_inv:get_size(listname.."contents") + local old_slots = player_inv:get_size(listname .. "contents") if new_slots >= old_slots then return 1 end -- using a smaller bag, make sure it fits - local old_list = player_inv:get_list(listname.."contents") + local old_list = player_inv:get_list(listname .. "contents") local new_list = {} local slots_used = 0 local use_new_list = false @@ -196,7 +205,7 @@ minetest.register_on_joinplayer(function(player) end if new_slots >= slots_used then if use_new_list then - player_inv:set_list(listname.."contents", new_list) + player_inv:set_list(listname .. "contents", new_list) end return 1 end @@ -204,13 +213,13 @@ minetest.register_on_joinplayer(function(player) return 0 end, allow_take = function(inv, listname, index, stack, player) - if player:get_inventory():is_empty(listname.."contents") then + if player:get_inventory():is_empty(listname .. "contents") then return stack:get_count() end return 0 end, on_take = function(inv, listname, index, stack, player) - player:get_inventory():set_size(listname.."contents", 0) + player:get_inventory():set_size(listname .. "contents", 0) save_bags_metadata(player, inv) end, allow_move = function() @@ -245,7 +254,7 @@ if minetest.get_modpath("farming") ~= nil then minetest.register_craft({ output = "unified_inventory:bag_small", recipe = { - {"", "farming:cotton", ""}, + {"", "farming:string", ""}, {"group:wool", "group:wool", "group:wool"}, {"group:wool", "group:wool", "group:wool"}, }, @@ -255,8 +264,8 @@ if minetest.get_modpath("farming") ~= nil then output = "unified_inventory:bag_medium", recipe = { {"", "", ""}, - {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, - {"farming:cotton", "unified_inventory:bag_small", "farming:cotton"}, + {"farming:string", "unified_inventory:bag_small", "farming:string"}, + {"farming:string", "unified_inventory:bag_small", "farming:string"}, }, }) @@ -264,8 +273,8 @@ if minetest.get_modpath("farming") ~= nil then output = "unified_inventory:bag_large", recipe = { {"", "", ""}, - {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, - {"farming:cotton", "unified_inventory:bag_medium", "farming:cotton"}, + {"farming:string", "unified_inventory:bag_medium", "farming:string"}, + {"farming:string", "unified_inventory:bag_medium", "farming:string"}, }, }) end diff --git a/unified_inventory/callbacks.lua b/unified_inventory/callbacks.lua index e6ea3e7..bc90237 100644 --- a/unified_inventory/callbacks.lua +++ b/unified_inventory/callbacks.lua @@ -28,7 +28,6 @@ minetest.register_on_joinplayer(function(player) -- Refill slot local refill = minetest.create_detached_inventory(player_name.."refill", { allow_put = function(inv, listname, index, stack, player) - local player_name = player:get_player_name() if unified_inventory.is_creative(player_name) then return stack:get_count() else @@ -36,7 +35,6 @@ minetest.register_on_joinplayer(function(player) end end, on_put = function(inv, listname, index, stack, player) - local player_name = player:get_player_name() local handle_refill = (minetest.registered_items[stack:get_name()] or {}).on_refill or default_refill stack = handle_refill(stack) inv:set_stack(listname, index, stack) @@ -47,6 +45,15 @@ minetest.register_on_joinplayer(function(player) refill:set_size("main", 1) end) +local function apply_new_filter(player, search_text, new_dir) + local player_name = player:get_player_name() + minetest.sound_play("click", {to_player=player_name, gain = 0.1}) + unified_inventory.apply_filter(player, search_text, new_dir) + unified_inventory.current_searchbox[player_name] = search_text + unified_inventory.set_inventory_formspec(player, + unified_inventory.current_page[player_name]) +end + minetest.register_on_player_receive_fields(function(player, formname, fields) local player_name = player:get_player_name() @@ -60,7 +67,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if fields.searchbox and fields.searchbox ~= unified_inventory.current_searchbox[player_name] then unified_inventory.current_searchbox[player_name] = fields.searchbox - unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) end for i, def in pairs(unified_inventory.buttons) do @@ -112,21 +118,18 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) unified_inventory.current_page[player_name]) end + -- Check clicked item image button local clicked_item for name, value in pairs(fields) do - if string.sub(name, 1, 12) == "item_button_" then - local new_dir, mangled_item = string.match(name, "^item_button_([a-z]+)_(.*)$") + local new_dir, mangled_item = string.match(name, "^item_button_([a-z]+)_(.*)$") + if new_dir and mangled_item then clicked_item = unified_inventory.demangle_for_formspec(mangled_item) if string.sub(clicked_item, 1, 6) == "group:" then - minetest.sound_play("click", {to_player=player_name, gain = 0.1}) - unified_inventory.apply_filter(player, clicked_item, new_dir) - unified_inventory.current_searchbox[player_name] = clicked_item - unified_inventory.set_inventory_formspec(player, - unified_inventory.current_page[player_name]) + -- Change search filter to this group + apply_new_filter(player, clicked_item, new_dir) return end - if new_dir == "recipe" - or new_dir == "usage" then + if new_dir == "recipe" or new_dir == "usage" then unified_inventory.current_craft_direction[player_name] = new_dir end break @@ -145,6 +148,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) unified_inventory.alternate[player_name] = 1 unified_inventory.set_inventory_formspec(player, "craftguide") elseif player_creative then + -- Creative page: Add entire stack to inventory local inv = player:get_inventory() local stack = ItemStack(clicked_item) stack:set_count(stack:get_stack_max()) @@ -162,12 +166,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.sound_play("paperflip2", {to_player=player_name, gain = 1.0}) elseif fields.searchresetbutton then - unified_inventory.apply_filter(player, "", "nochange") - unified_inventory.current_searchbox[player_name] = "" - unified_inventory.set_inventory_formspec(player, - unified_inventory.current_page[player_name]) - minetest.sound_play("click", - {to_player=player_name, gain = 0.1}) + apply_new_filter(player, "", "nochange") end -- alternate buttons diff --git a/unified_inventory/depends.txt b/unified_inventory/depends.txt deleted file mode 100644 index 20eb8b0..0000000 --- a/unified_inventory/depends.txt +++ /dev/null @@ -1,6 +0,0 @@ -default -creative? -sfinv? -intllib? -datastorage? -farming? diff --git a/unified_inventory/description.txt b/unified_inventory/description.txt deleted file mode 100644 index b541fdf..0000000 --- a/unified_inventory/description.txt +++ /dev/null @@ -1 +0,0 @@ -Unified Inventory replaces the default survival and creative inventory. It adds a nicer interface and a number of features, such as a crafting guide. diff --git a/unified_inventory/doc/mod_api.txt b/unified_inventory/doc/mod_api.txt new file mode 100644 index 0000000..0d100a0 --- /dev/null +++ b/unified_inventory/doc/mod_api.txt @@ -0,0 +1,103 @@ +unified_inventory API +===================== + +This file provides information about the API of unified_inventory. + +API revisions within unified_inventory can be checked using: + + (unified_inventory.version or 1) + +**Revision history** + +* Version `1`: Classic formspec layout (no real_coordinates) +* Version `2`: Force formspec version 4 (includes real_coordinates) + +Misc functions +-------------- +Grouped by use-case, afterwards sorted alphabetically. + +* `unified_inventory.is_creative(name)` + * Checks whether creative is enabled or the player has `creative` + + +Pages +----- + +Register a new page: The callback inside this function is called on user input. + + unified_inventory.register_page("pagename", { + get_formspec = function(player) + -- ^ `player` is an `ObjectRef` + -- Compute the formspec string here + return { + formspec = "button[2,2;2,1;mybutton;Press me]", + -- ^ Final form of the formspec to display + draw_inventory = false, -- default `true` + -- ^ Optional. Hides the player's `main` inventory list + draw_item_list = false, -- default `true` + -- ^ Optional. Hides the item list on the right side + formspec_prepend = false, -- default `false` + -- ^ Optional. When `false`: Disables the formspec prepend + } + end, + }) + + +Buttons +------- + +Register a new button for the bottom row: + + unified_inventory.register_button("skins", { + type = "image", + image = "skins_skin_button.png", + tooltip = "Skins", + hide_lite = true + -- ^ Button is hidden when following two conditions are met: + -- Configuration line `unified_inventory_lite = true` + -- Player does not have the privilege `ui_full` + }) + + + +Crafting +-------- + +The code blocks below document each possible parameter using exemplary values. + +Provide information to display custom craft types: + + unified_inventory.register_craft_type("mytype", { + -- ^ Unique identifier for `register_craft` + description = "Sample Craft", + -- ^ Text shown below the crafting arrow + icon = "dummy.png", + -- ^ Image shown above the crafting arrow + width = 3, + height = 3, + -- ^ Maximal input dimensions of the recipes + dynamic_display_size = function(craft) + -- ^ `craft` is the definition from `register_craft` + return { + width = 2, + height = 3 + } + end, + -- ^ Optional callback to change the displayed recipe size + uses_crafting_grid = true, + }) + +Register a non-standard craft recipe: + + unified_inventory.register_craft({ + output = "default:foobar", + type = "mytype", + -- ^ Standard craft type or custom (see `register_craft_type`) + items = { + { "default:foo" }, + { "default:bar" } + }, + width = 3, + -- ^ Same as `minetest.register_recipe` + }) + diff --git a/unified_inventory/group.lua b/unified_inventory/group.lua index 23e2587..3864267 100644 --- a/unified_inventory/group.lua +++ b/unified_inventory/group.lua @@ -1,20 +1,22 @@ -local S = unified_inventory.gettext +local S = minetest.get_translator("unified_inventory") function unified_inventory.canonical_item_spec_matcher(spec) local specname = ItemStack(spec):get_name() - if specname:sub(1, 6) == "group:" then - local group_names = specname:sub(7):split(",") + if specname:sub(1, 6) ~= "group:" then return function (itemname) - local itemdef = minetest.registered_items[itemname] - for _, group_name in ipairs(group_names) do - if (itemdef.groups[group_name] or 0) == 0 then - return false - end - end - return true + return itemname == specname end - else - return function (itemname) return itemname == specname end + end + + local group_names = specname:sub(7):split(",") + return function (itemname) + local itemdef = minetest.registered_items[itemname] + for _, group_name in ipairs(group_names) do + if (itemdef.groups[group_name] or 0) == 0 then + return false + end + end + return true end end @@ -25,23 +27,11 @@ end function unified_inventory.extract_groupnames(groupname) local specname = ItemStack(groupname):get_name() - if specname:sub(1, 6) == "group:" then - local group_names = specname:sub(7):split(",") - if #group_names == 1 then - return group_names[1], 1 - end - local s = "" - for g=1,#group_names do - if g > 1 then - -- List connector - s = s .. S(" and ") - end - s = s .. group_names[g] - end - return s, #group_names - else + if specname:sub(1, 6) ~= "group:" then return nil, 0 end + local group_names = specname:sub(7):split(",") + return table.concat(group_names, S(" and ")), #group_names end unified_inventory.registered_group_items = { diff --git a/unified_inventory/init.lua b/unified_inventory/init.lua index 1c73fad..231da9e 100644 --- a/unified_inventory/init.lua +++ b/unified_inventory/init.lua @@ -3,9 +3,6 @@ local modpath = minetest.get_modpath(minetest.get_current_modname()) local worldpath = minetest.get_worldpath() --- Intllib -local S, NS = dofile(modpath .. "/intllib.lua") - -- Data tables definitions unified_inventory = { activefilter = {}, @@ -33,26 +30,106 @@ unified_inventory = { -- Default inventory page default = "craft", - -- intllib - gettext = S, - -- "Lite" mode lite_mode = minetest.settings:get_bool("unified_inventory_lite"), -- Trash enabled trash_enabled = (minetest.settings:get_bool("unified_inventory_trash") ~= false), + imgscale = 1.25, + list_img_offset = 0.13, + standard_background = "background9[0,0;1,1;ui_formbg_9_sliced.png;true;16]", + version = 2 +} +local ui = unified_inventory + +-- These tables establish position and layout for the two UI styles. +-- UI doesn't use formspec_[xy] anymore, but other mods may need them. + +ui.style_full = { + formspec_x = 1, + formspec_y = 1, pagecols = 8, pagerows = 10, - page_y = 0, - formspec_y = 1, - main_button_x = 0, - main_button_y = 9, - craft_result_x = 0.3, - craft_result_y = 0.5, - form_header_y = 0 + page_x = 10.75, + page_y = 1.45, + craft_x = 2.8, + craft_y = 1.15, + craftresult_x = 7.8, + craft_arrow_x = 6.55, + craft_guide_x = 3.3, + craft_guide_y = 1.15, + craft_guide_arrow_x = 7.05, + craft_guide_result_x = 8.3, + craft_guide_resultstr_x = 0.3, + craft_guide_resultstr_y = 0.6, + give_btn_x = 0.25, + main_button_x = 0.4, + main_button_y = 11.0, + page_buttons_x = 11.60, + page_buttons_y = 10.15, + searchwidth = 3.4, + form_header_x = 0.4, + form_header_y = 0.4, + btn_spc = 0.85, + btn_size = 0.75, + std_inv_x = 0.3, + std_inv_y = 5.75, } +ui.style_lite = { + formspec_x = 0.6, + formspec_y = 0.6, + pagecols = 4, + pagerows = 6, + page_x = 10.5, + page_y = 1.25, + craft_x = 2.6, + craft_y = 0.75, + craftresult_x = 5.75, + craft_arrow_x = 6.35, + craft_guide_x = 3.1, + craft_guide_y = 0.75, + craft_guide_arrow_x = 7.05, + craft_guide_result_x = 8.3, + craft_guide_resultstr_x = 0.15, + craft_guide_resultstr_y = 0.35, + give_btn_x = 0.15, + main_button_x = 10.5, + main_button_y = 7.9, + page_buttons_x = 10.5, + page_buttons_y = 6.3, + searchwidth = 1.6, + form_header_x = 0.2, + form_header_y = 0.2, + btn_spc = 0.8, + btn_size = 0.7, + std_inv_x = 0.1, + std_inv_y = 4.6, +} + +dofile(modpath.."/api.lua") + +for _, style in ipairs({ui.style_full, ui.style_lite}) do + style.items_per_page = style.pagecols * style.pagerows + style.standard_inv = string.format("list[current_player;main;%f,%f;8,4;]", + style.std_inv_x + ui.list_img_offset, style.std_inv_y + ui.list_img_offset) + + style.standard_inv_bg = ui.make_inv_img_grid(style.std_inv_x, style.std_inv_y, 8, 1, true).. + ui.make_inv_img_grid(style.std_inv_x, style.std_inv_y + ui.imgscale, 8, 3) + + style.craft_grid = table.concat({ + ui.make_inv_img_grid(style.craft_x, style.craft_y, 3, 3), + ui.single_slot(style.craft_x + ui.imgscale*4, style.craft_y), -- the craft result slot + string.format("image[%f,%f;%f,%f;ui_crafting_arrow.png]", + style.craft_arrow_x, style.craft_y, ui.imgscale, ui.imgscale), + string.format("list[current_player;craft;%f,%f;3,3;]", + style.craft_x + ui.list_img_offset, style.craft_y + ui.list_img_offset), + string.format("list[current_player;craftpreview;%f,%f;1,1;]", + style.craftresult_x + ui.list_img_offset, style.craft_y + ui.list_img_offset) + }) +end + -- Disable default creative inventory local creative = rawget(_G, "creative") or rawget(_G, "creative_inventory") if creative then @@ -68,9 +145,9 @@ if sfinv then end dofile(modpath.."/group.lua") -dofile(modpath.."/api.lua") dofile(modpath.."/internal.lua") dofile(modpath.."/callbacks.lua") +dofile(modpath.."/match_craft.lua") dofile(modpath.."/register.lua") if minetest.settings:get_bool("unified_inventory_bags") ~= false then diff --git a/unified_inventory/internal.lua b/unified_inventory/internal.lua index 3fad275..d92b932 100644 --- a/unified_inventory/internal.lua +++ b/unified_inventory/internal.lua @@ -1,5 +1,6 @@ -local S = unified_inventory.gettext +local S = minetest.get_translator("unified_inventory") local F = minetest.formspec_escape +local ui = unified_inventory -- This pair of encoding functions is used where variable text must go in -- button names, where the text might contain formspec metacharacters. @@ -9,78 +10,50 @@ local F = minetest.formspec_escape -- This is a game engine bug, and in the anticipation that it might be -- fixed some day we don't want to rely on it. So for safety we apply -- an encoding that avoids all formspec metacharacters. -function unified_inventory.mangle_for_formspec(str) + +function ui.mangle_for_formspec(str) return string.gsub(str, "([^A-Za-z0-9])", function (c) return string.format("_%d_", string.byte(c)) end) end -function unified_inventory.demangle_for_formspec(str) +function ui.demangle_for_formspec(str) return string.gsub(str, "_([0-9]+)_", function (v) return string.char(v) end) end -function unified_inventory.get_per_player_formspec(player_name) - local lite = unified_inventory.lite_mode and not minetest.check_player_privs(player_name, {ui_full=true}) - local ui = {} - ui.pagecols = unified_inventory.pagecols - ui.pagerows = unified_inventory.pagerows - ui.page_y = unified_inventory.page_y - ui.formspec_y = unified_inventory.formspec_y - ui.main_button_x = unified_inventory.main_button_x - ui.main_button_y = unified_inventory.main_button_y - ui.craft_result_x = unified_inventory.craft_result_x - ui.craft_result_y = unified_inventory.craft_result_y - ui.form_header_y = unified_inventory.form_header_y +function ui.get_per_player_formspec(player_name) + local draw_lite_mode = ui.lite_mode and not minetest.check_player_privs(player_name, {ui_full=true}) - if lite then - ui.pagecols = 4 - ui.pagerows = 6 - ui.page_y = 0.25 - ui.formspec_y = 0.47 - ui.main_button_x = 8.2 - ui.main_button_y = 6.5 - ui.craft_result_x = 2.8 - ui.craft_result_y = 3.4 - ui.form_header_y = -0.1 - end - - ui.items_per_page = ui.pagecols * ui.pagerows - return ui, lite + return table.copy(draw_lite_mode and ui.style_lite or ui.style_full), draw_lite_mode end -function unified_inventory.get_formspec(player, page) +function ui.get_formspec(player, page) if not player then return "" end local player_name = player:get_player_name() - local ui_peruser,draw_lite_mode = unified_inventory.get_per_player_formspec(player_name) + local ui_peruser,draw_lite_mode = ui.get_per_player_formspec(player_name) - unified_inventory.current_page[player_name] = page - local pagedef = unified_inventory.pages[page] + ui.current_page[player_name] = page + local pagedef = ui.pages[page] - local formspec = { - "size[14,10]", - "background[-0.19,-0.25;14.4,10.75;ui_form_bg.png]" -- Background - } - local n = 3 - - if draw_lite_mode then - formspec[1] = "size[11,7.7]" - formspec[2] = "background[-0.19,-0.2;11.4,8.4;ui_form_bg.png]" - end - - if unified_inventory.is_creative(player_name) - and page == "craft" then - formspec[n] = "background[0,"..(ui_peruser.formspec_y + 2)..";1,1;ui_single_slot.png]" - n = n+1 - end - - -- Current page - if not unified_inventory.pages[page] then + if not pagedef then return "" -- Invalid page name end - local perplayer_formspec = unified_inventory.get_per_player_formspec(player_name) + local formspec = { + "formspec_version[4]size[17.75,12.25]", + pagedef.formspec_prepend and "" or "no_prepend[]", + ui.standard_background -- Background + } + local n = 4 + + if draw_lite_mode then + formspec[1] = "formspec_version[4]size[14,9.75]" + formspec[3] = ui.standard_background + end + + local perplayer_formspec = ui.get_per_player_formspec(player_name) local fsdata = pagedef.get_formspec(player, perplayer_formspec) formspec[n] = fsdata.formspec @@ -93,7 +66,7 @@ function unified_inventory.get_formspec(player, page) local filtered_inv_buttons = {} - for i, def in pairs(unified_inventory.buttons) do + for i, def in pairs(ui.buttons) do if not (draw_lite_mode and def.hide_lite) then table.insert(filtered_inv_buttons, def) end @@ -108,21 +81,20 @@ function unified_inventory.get_formspec(player, page) if def.type == "image" then if (def.condition == nil or def.condition(player) == true) then - formspec[n] = "image_button[" - formspec[n+1] = ( ui_peruser.main_button_x + 0.65 * (i - 1) - button_col * 0.65 * 4) - formspec[n+2] = ","..(ui_peruser.main_button_y + button_row * 0.7)..";0.8,0.8;" - formspec[n+3] = F(def.image)..";" - formspec[n+4] = F(def.name)..";]" - formspec[n+5] = "tooltip["..F(def.name) - formspec[n+6] = ";"..(def.tooltip or "").."]" - n = n+7 + formspec[n] = string.format("image_button[%f,%f;%f,%f;%s;%s;]", + ui_peruser.main_button_x + ui_peruser.btn_spc * (i - 1) - button_col * ui_peruser.btn_spc * 4, + ui_peruser.main_button_y + button_row * ui_peruser.btn_spc, + ui_peruser.btn_size,ui_peruser.btn_size, + F(def.image), + F(def.name)) + formspec[n+1] = "tooltip["..F(def.name)..";"..(def.tooltip or "").."]" + n = n+2 else - formspec[n] = "image[" - formspec[n+1] = ( ui_peruser.main_button_x + 0.65 * (i - 1) - button_col * 0.65 * 4) - formspec[n+2] = ","..(ui_peruser.main_button_y + button_row * 0.7)..";0.8,0.8;" - formspec[n+3] = F(def.image).."^[colorize:#808080:alpha]" - n = n+4 - + formspec[n] = string.format("image[%f,%f;%f,%f;%s^[colorize:#808080:alpha]", + ui_peruser.main_button_x + ui_peruser.btn_spc * (i - 1) - button_col * ui_peruser.btn_spc * 4, + ui_peruser.main_button_y + button_row * ui_peruser.btn_spc, + ui_peruser.btn_size,ui_peruser.btn_size,def.image) + n = n+1 end end end @@ -130,7 +102,7 @@ function unified_inventory.get_formspec(player, page) if fsdata.draw_inventory ~= false then -- Player inventory formspec[n] = "listcolors[#00000000;#00000000]" - formspec[n+1] = "list[current_player;main;0,"..(ui_peruser.formspec_y + 3.5)..";8,4;]" + formspec[n+1] = ui_peruser.standard_inv n = n+2 end @@ -138,71 +110,52 @@ function unified_inventory.get_formspec(player, page) return table.concat(formspec, "") end - -- Controls to flip items pages - local start_x = 9.2 - - if not draw_lite_mode then - formspec[n] = - "image_button[" .. (start_x + 0.6 * 0) - .. ",9;.8,.8;ui_skip_backward_icon.png;start_list;]" - .. "tooltip[start_list;" .. F(S("First page")) .. "]" - - .. "image_button[" .. (start_x + 0.6 * 1) - .. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;]" - .. "tooltip[rewind3;" .. F(S("Back three pages")) .. "]" - .. "image_button[" .. (start_x + 0.6 * 2) - .. ",9;.8,.8;ui_left_icon.png;rewind1;]" - .. "tooltip[rewind1;" .. F(S("Back one page")) .. "]" - - .. "image_button[" .. (start_x + 0.6 * 3) - .. ",9;.8,.8;ui_right_icon.png;forward1;]" - .. "tooltip[forward1;" .. F(S("Forward one page")) .. "]" - .. "image_button[" .. (start_x + 0.6 * 4) - .. ",9;.8,.8;ui_doubleright_icon.png;forward3;]" - .. "tooltip[forward3;" .. F(S("Forward three pages")) .. "]" - - .. "image_button[" .. (start_x + 0.6 * 5) - .. ",9;.8,.8;ui_skip_forward_icon.png;end_list;]" - .. "tooltip[end_list;" .. F(S("Last page")) .. "]" - else - formspec[n] = - "image_button[" .. (8.2 + 0.65 * 0) - .. ",5.8;.8,.8;ui_skip_backward_icon.png;start_list;]" - .. "tooltip[start_list;" .. F(S("First page")) .. "]" - .. "image_button[" .. (8.2 + 0.65 * 1) - .. ",5.8;.8,.8;ui_left_icon.png;rewind1;]" - .. "tooltip[rewind1;" .. F(S("Back one page")) .. "]" - .. "image_button[" .. (8.2 + 0.65 * 2) - .. ",5.8;.8,.8;ui_right_icon.png;forward1;]" - .. "tooltip[forward1;" .. F(S("Forward one page")) .. "]" - .. "image_button[" .. (8.2 + 0.65 * 3) - .. ",5.8;.8,.8;ui_skip_forward_icon.png;end_list;]" - .. "tooltip[end_list;" .. F(S("Last page")) .. "]" - end - n = n+1 - -- Search box formspec[n] = "field_close_on_enter[searchbox;false]" - n = n+1 - if not draw_lite_mode then - formspec[n] = "field[9.5,8.325;3,1;searchbox;;" - .. F(unified_inventory.current_searchbox[player_name]) .. "]" - formspec[n+1] = "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]" - .. "tooltip[searchbutton;" ..F(S("Search")) .. "]" - formspec[n+2] = "image_button[12.9,8.1;.8,.8;ui_reset_icon.png;searchresetbutton;]" - .. "tooltip[searchbutton;" ..F(S("Search")) .. "]" - .. "tooltip[searchresetbutton;" ..F(S("Reset search and display everything")) .. "]" - else - formspec[n] = "field[8.5,5.225;2.2,1;searchbox;;" - .. F(unified_inventory.current_searchbox[player_name]) .. "]" - formspec[n+1] = "image_button[10.3,5;.8,.8;ui_search_icon.png;searchbutton;]" - .. "tooltip[searchbutton;" ..F(S("Search")) .. "]" - formspec[n+2] = "image_button[11,5;.8,.8;ui_reset_icon.png;searchresetbutton;]" - .. "tooltip[searchbutton;" ..F(S("Search")) .. "]" - .. "tooltip[searchresetbutton;" ..F(S("Reset search and display everything")) .. "]" + formspec[n+1] = string.format("field[%f,%f;%f,%f;searchbox;;%s]", + ui_peruser.page_buttons_x, ui_peruser.page_buttons_y, + ui_peruser.searchwidth - 0.1, ui_peruser.btn_size, + F(ui.current_searchbox[player_name])) + formspec[n+2] = string.format("image_button[%f,%f;%f,%f;ui_search_icon.png;searchbutton;]", + ui_peruser.page_buttons_x + ui_peruser.searchwidth, ui_peruser.page_buttons_y, + ui_peruser.btn_size,ui_peruser.btn_size) + formspec[n+3] = "tooltip[searchbutton;" ..F(S("Search")) .. "]" + formspec[n+4] = string.format("image_button[%f,%f;%f,%f;ui_reset_icon.png;searchresetbutton;]", + ui_peruser.page_buttons_x + ui_peruser.searchwidth + ui_peruser.btn_spc, + ui_peruser.page_buttons_y, + ui_peruser.btn_size, ui_peruser.btn_size) + formspec[n+5] = "tooltip[searchresetbutton;"..F(S("Reset search and display everything")).."]" + + n = n + 6 + + -- Controls to flip items pages + + local btnlist = { + { "ui_skip_backward_icon.png", "start_list", S("First page") }, + { "ui_doubleleft_icon.png", "rewind3", S("Back three pages") }, + { "ui_left_icon.png", "rewind1", S("Back one page") }, + { "ui_right_icon.png", "forward1", S("Forward one page") }, + { "ui_doubleright_icon.png", "forward3", S("Forward three pages") }, + { "ui_skip_forward_icon.png", "end_list", S("Last page") }, + } + + if draw_lite_mode then + btnlist[5] = nil + btnlist[2] = nil + end + + local bn = 0 + for _, b in pairs(btnlist) do + formspec[n] = string.format("image_button[%f,%f;%f,%f;%s;%s;]", + ui_peruser.page_buttons_x + ui_peruser.btn_spc*bn, + ui_peruser.page_buttons_y + ui_peruser.btn_spc, + ui_peruser.btn_size, ui_peruser.btn_size, + b[1],b[2]) + formspec[n+1] = "tooltip["..b[2]..";"..F(b[3]).."]" + bn = bn + 1 + n = n + 2 end - n = n+3 local no_matches = S("No matching items") if draw_lite_mode then @@ -210,24 +163,23 @@ function unified_inventory.get_formspec(player, page) end -- Items list - if #unified_inventory.filtered_items_list[player_name] == 0 then - formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";" .. F(no_matches) .. "]" + if #ui.filtered_items_list[player_name] == 0 then + formspec[n] = "label["..ui_peruser.page_x..","..(ui_peruser.page_y+0.15)..";" .. F(no_matches) .. "]" else - local dir = unified_inventory.active_search_direction[player_name] - local list_index = unified_inventory.current_index[player_name] - local page = math.floor(list_index / (ui_peruser.items_per_page) + 1) + local dir = ui.active_search_direction[player_name] + local list_index = ui.current_index[player_name] + local page2 = math.floor(list_index / (ui_peruser.items_per_page) + 1) local pagemax = math.floor( - (#unified_inventory.filtered_items_list[player_name] - 1) + (#ui.filtered_items_list[player_name] - 1) / (ui_peruser.items_per_page) + 1) - local item = {} for y = 0, ui_peruser.pagerows - 1 do for x = 0, ui_peruser.pagecols - 1 do - local name = unified_inventory.filtered_items_list[player_name][list_index] + local name = ui.filtered_items_list[player_name][list_index] local item = minetest.registered_items[name] if item then -- Clicked on current item: Flip crafting direction - if name == unified_inventory.current_item[player_name] then - local cdir = unified_inventory.current_craft_direction[player_name] + if name == ui.current_item[player_name] then + local cdir = ui.current_craft_direction[player_name] if cdir == "recipe" then dir = "usage" elseif cdir == "usage" then @@ -235,13 +187,15 @@ function unified_inventory.get_formspec(player, page) end else -- Default: use active search direction by default - dir = unified_inventory.active_search_direction[player_name] + dir = ui.active_search_direction[player_name] end local button_name = "item_button_" .. dir .. "_" - .. unified_inventory.mangle_for_formspec(name) - formspec[n] = ("item_image_button[%f,%f;.81,.81;%s;%s;]"):format( - 8.2 + x * 0.7, ui_peruser.formspec_y + ui_peruser.page_y + y * 0.7, + .. ui.mangle_for_formspec(name) + formspec[n] = ("item_image_button[%f,%f;%f,%f;%s;%s;]"):format( + ui_peruser.page_x + x * ui_peruser.btn_spc, + ui_peruser.page_y + y * ui_peruser.btn_spc, + ui_peruser.btn_size, ui_peruser.btn_size, name, button_name ) formspec[n + 1] = ("tooltip[%s;%s \\[%s\\]]"):format( @@ -253,26 +207,29 @@ function unified_inventory.get_formspec(player, page) end end end - formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";"..F(S("Page")) .. ": " - .. S("%s of %s"):format(page,pagemax).."]" + formspec[n] = string.format("label[%f,%f;%s: %s]", + ui_peruser.page_x, ui_peruser.form_header_y, + F(S("Page")), S("@1 of @2",page2,pagemax)) end n= n+1 - if unified_inventory.activefilter[player_name] ~= "" then - formspec[n] = "label[8.2,"..(ui_peruser.form_header_y + 0.4)..";" .. F(S("Filter")) .. ":]" - formspec[n+1] = "label[9.1,"..(ui_peruser.form_header_y + 0.4)..";"..F(unified_inventory.activefilter[player_name]).."]" + if ui.activefilter[player_name] ~= "" then + formspec[n] = string.format("label[%f,%f;%s:]", + ui_peruser.page_x, ui_peruser.page_y - 0.65, F(S("Filter"))) + formspec[n+1] = string.format("label[%f,%f;%s]", + ui_peruser.page_x, ui_peruser.page_y - 0.25, F(ui.activefilter[player_name])) end return table.concat(formspec, "") end -function unified_inventory.set_inventory_formspec(player, page) +function ui.set_inventory_formspec(player, page) if player then - player:set_inventory_formspec(unified_inventory.get_formspec(player, page)) + player:set_inventory_formspec(ui.get_formspec(player, page)) end end --apply filter to the inventory list (create filtered copy of full one) -function unified_inventory.apply_filter(player, filter, search_dir) +function ui.apply_filter(player, filter, search_dir) if not player then return false end @@ -291,34 +248,36 @@ function unified_inventory.apply_filter(player, filter, search_dir) return true end else + local lang = minetest.get_player_information(player_name).lang_code ffilter = function(name, def) local lname = string.lower(name) local ldesc = string.lower(def.description) + local llocaldesc = minetest.get_translated_string + and string.lower(minetest.get_translated_string(lang, def.description)) return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true) + or llocaldesc and string.find(llocaldesc, lfilter, 1, true) end end - local is_creative = unified_inventory.is_creative(player_name) - unified_inventory.filtered_items_list[player_name]={} + ui.filtered_items_list[player_name]={} for name, def in pairs(minetest.registered_items) do if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0) and def.description and def.description ~= "" - and ffilter(name, def) - and (is_creative or unified_inventory.crafts_for.recipe[def.name]) then - table.insert(unified_inventory.filtered_items_list[player_name], name) + and ffilter(name, def) then + table.insert(ui.filtered_items_list[player_name], name) end end - table.sort(unified_inventory.filtered_items_list[player_name]) - unified_inventory.filtered_items_list_size[player_name] = #unified_inventory.filtered_items_list[player_name] - unified_inventory.current_index[player_name] = 1 - unified_inventory.activefilter[player_name] = filter - unified_inventory.active_search_direction[player_name] = search_dir - unified_inventory.set_inventory_formspec(player, - unified_inventory.current_page[player_name]) + table.sort(ui.filtered_items_list[player_name]) + ui.filtered_items_list_size[player_name] = #ui.filtered_items_list[player_name] + ui.current_index[player_name] = 1 + ui.activefilter[player_name] = filter + ui.active_search_direction[player_name] = search_dir + ui.set_inventory_formspec(player, + ui.current_page[player_name]) end -function unified_inventory.items_in_group(groups) +function ui.items_in_group(groups) local items = {} for name, item in pairs(minetest.registered_items) do for _, group in pairs(groups:split(',')) do @@ -330,7 +289,7 @@ function unified_inventory.items_in_group(groups) return items end -function unified_inventory.sort_inventory(inv) +function ui.sort_inventory(inv) local inlist = inv:get_list("main") local typecnt = {} local typekeys = {} diff --git a/unified_inventory/intllib.lua b/unified_inventory/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/unified_inventory/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/unified_inventory/item_names.lua b/unified_inventory/item_names.lua index d374b14..a1368f8 100644 --- a/unified_inventory/item_names.lua +++ b/unified_inventory/item_names.lua @@ -1,25 +1,25 @@ -- Based on 4itemnames mod by 4aiman -local item_names = {} -- [player_name] = { hud, dtime, itemname } +local item_names = {} -- [player_name] = { hud, dtime, itemname } local dlimit = 3 -- HUD element will be hidden after this many seconds -local air_hud_mod = minetest.get_modpath("4air") -local hud_mod = minetest.get_modpath("hud") local hudbars_mod = minetest.get_modpath("hudbars") local function set_hud(player) local player_name = player:get_player_name() - local off = {x=0, y=-70} - if air_hud_mod or hud_mod then - off.y = off.y - 20 - elseif hudbars_mod then - off.y = off.y + 13 + local off = {x=0, y=-65} + if hudbars_mod then + -- Assume no alignment (2 per line) + off.y = off.y - math.ceil(hb.hudbars_count / 2) * 25 + else + off.y = off.y - 25 end + item_names[player_name] = { hud = player:hud_add({ hud_elem_type = "text", position = {x=0.5, y=1}, offset = off, - alignment = {x=0, y=0}, + alignment = {x=0, y=-1}, number = 0xFFFFFF, text = "", }), diff --git a/unified_inventory/locale/de.po b/unified_inventory/locale/de.po deleted file mode 100644 index 1231f1a..0000000 --- a/unified_inventory/locale/de.po +++ /dev/null @@ -1,366 +0,0 @@ -# German translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# Xanthin -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 13:41+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "Fertigung" - -#: api.lua -msgid "Mixing" -msgstr "Mischen" - -#: api.lua -msgid "Cooking" -msgstr "Kochen" - -#: api.lua -msgid "Digging" -msgstr "Graben" - -#: bags.lua -msgid "Bags" -msgstr "Taschen" - -#: bags.lua -msgid "Bag @1" -msgstr "Tasche @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Kleine Tasche" - -#: bags.lua -msgid "Medium Bag" -msgstr "Mittelgroße Tasche" - -#: bags.lua -msgid "Large Bag" -msgstr "Große Tasche" - -#: group.lua -msgid " and " -msgstr " und " - -#: internal.lua -msgid "First page" -msgstr "Erste Seite" - -#: internal.lua -msgid "Back three pages" -msgstr "3 Seiten zurückblättern" - -#: internal.lua -msgid "Back one page" -msgstr "1 Seite zurückblättern" - -#: internal.lua -msgid "Forward one page" -msgstr "1 Seite vorblättern" - -#: internal.lua -msgid "Forward three pages" -msgstr "3 Seiten vorblättern" - -#: internal.lua -msgid "Last page" -msgstr "Letzte Seite" - -#: internal.lua -msgid "Search" -msgstr "Suchen" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "Suche zurücksetzen und alles anzeigen" - -#: internal.lua -msgid "No matching items" -msgstr "Keine passenden Gegenstände" - -#: internal.lua -msgid "No matches." -msgstr "Keine Treffer" - -#: internal.lua -msgid "Page" -msgstr "Seite" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s von %s" - -#: internal.lua -msgid "Filter" -msgstr "Filter" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Kann das Kreativinventar nutzen" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" - -#: register.lua -msgid "Crafting Grid" -msgstr "Fertigungsraster" - -#: register.lua -msgid "Crafting Guide" -msgstr "Fertigungsführer" - -#: register.lua -msgid "Set home position" -msgstr "Heimatposition setzen" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Heimatposition nach: %s gesetzt" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "Du hast das \"home\"-Privileg nicht!" - -#: register.lua -msgid "Go home" -msgstr "Nach Hause gehen" - -#: register.lua -msgid "Set time to day" -msgstr "Zur Tageszeit wechseln" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Tageszeit auf 6 Uhr gesetzt" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "Du hast das \"settime\"-Privileg nicht!" - -#: register.lua -msgid "Set time to night" -msgstr "Zur Nachtzeit wechseln" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Tageszeit auf 21 Uhr gesetzt" - -#: register.lua -msgid "Clear inventory" -msgstr "Inventar leeren" - -#: register.lua -#, fuzzy -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" -"Diese Funktion ist außerhalb des Kreativmodus deaktiviert, um ein " -"versehentliches Löschen des ganzen Inventars zu verhindern.\n" -"Nutze stattdessen das Müllfeld." - -#: register.lua -msgid "Inventory cleared!" -msgstr "Inventar geleert!" - -#: register.lua -msgid "Trash:" -msgstr "Müll:" - -#: register.lua -msgid "Refill:" -msgstr "Nachfüllen:" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "Irgendein Gegenstand, der zur Gruppe %s gehört" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "Irgendein Gegenstand, der zu den Gruppen %s gehört" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Rezept %d von %d" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "Verwendung %d von %d" - -#: register.lua -msgid "No recipes" -msgstr "Keine Rezepte" - -#: register.lua -msgid "No usages" -msgstr "Keine Verwendungen" - -#: register.lua -msgid "Result" -msgstr "Ergebnis" - -#: register.lua -msgid "Ingredient" -msgstr "Zutat" - -#: register.lua -msgid "Show next recipe" -msgstr "Nächstes Rezept zeigen" - -#: register.lua -msgid "Show next usage" -msgstr "Nächste Verwendung zeigen" - -#: register.lua -msgid "Show previous recipe" -msgstr "Vorheriges Rezept zeigen" - -#: register.lua -msgid "Show previous usage" -msgstr "Vorherige Verwendung zeigen" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "Gib mir:" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" -"Dieses Rezept ist zu\n" -"groß, um angezeigt\n" -"zu werden." - -#: register.lua -msgid "To craft grid:" -msgstr "Ins Fertigungsraster:" - -#: register.lua -msgid "All" -msgstr "Alles" - -#: waypoints.lua -msgid "White" -msgstr "Weiß" - -#: waypoints.lua -msgid "Yellow" -msgstr "Gelb" - -#: waypoints.lua -msgid "Red" -msgstr "Rot" - -#: waypoints.lua -msgid "Green" -msgstr "Grün" - -#: waypoints.lua -msgid "Blue" -msgstr "Blau" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Wegpunkte" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "Wegpunkt Nr. %d auswählen" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Wegpunkt Nr. %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Setze Wegpunkt zur derzeitigen Position" - -#: waypoints.lua -msgid "invisible" -msgstr "unsichtbar" - -#: waypoints.lua -msgid "visible" -msgstr "sichtbar" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "Wegpunkt @1 machen" - -#: waypoints.lua -msgid "Disable" -msgstr "ausschalten" - -#: waypoints.lua -msgid "Enable" -msgstr "einschalten" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "Anzeige der Wegpunktkoordinaten @1" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Farbe der Darstellung der Wegpunkte ändern" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Name des Wegpunkts ändern" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Wegpunkt aktiv" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Wegpunkt inaktiv" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Bearbeitung abschließen" - -#: waypoints.lua -msgid "World position" -msgstr "Weltposition" - -#: waypoints.lua -msgid "Name" -msgstr "Name" - -#: waypoints.lua -msgid "HUD text color" -msgstr "HUD-Textfarbe" diff --git a/unified_inventory/locale/es.po b/unified_inventory/locale/es.po deleted file mode 100644 index a49a76d..0000000 --- a/unified_inventory/locale/es.po +++ /dev/null @@ -1,366 +0,0 @@ -# Spanish translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# Diego Martínez -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 16:15+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: es\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "Elaboración" - -#: api.lua -msgid "Mixing" -msgstr "" - -#: api.lua -#, fuzzy -msgid "Cooking" -msgstr "hornear" - -#: api.lua -msgid "Digging" -msgstr "" - -#: bags.lua -msgid "Bags" -msgstr "Bolsas" - -#: bags.lua -msgid "Bag @1" -msgstr "Bolsa @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Bolsa Pequeña" - -#: bags.lua -msgid "Medium Bag" -msgstr "Bolsa Mediana" - -#: bags.lua -msgid "Large Bag" -msgstr "Bolsa Grande" - -#: group.lua -msgid " and " -msgstr "" - -#: internal.lua -msgid "First page" -msgstr "" - -#: internal.lua -msgid "Back three pages" -msgstr "" - -#: internal.lua -msgid "Back one page" -msgstr "" - -#: internal.lua -msgid "Forward one page" -msgstr "" - -#: internal.lua -msgid "Forward three pages" -msgstr "" - -#: internal.lua -msgid "Last page" -msgstr "" - -#: internal.lua -msgid "Search" -msgstr "" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "" - -#: internal.lua -msgid "No matching items" -msgstr "" - -#: internal.lua -msgid "No matches." -msgstr "" - -#: internal.lua -msgid "Page" -msgstr "Página" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s de %s" - -#: internal.lua -msgid "Filter" -msgstr "Filtro" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Puede usar el inventario creativo" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" - -#: register.lua -msgid "Crafting Grid" -msgstr "" - -#: register.lua -msgid "Crafting Guide" -msgstr "Guía de Elaboración" - -#: register.lua -#, fuzzy -msgid "Set home position" -msgstr "Posición en el mundo" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Posición de hogar cambiada a: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "¡No tienes el privilegio \"home\"!" - -#: register.lua -msgid "Go home" -msgstr "" - -#: register.lua -msgid "Set time to day" -msgstr "" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Hora del día cambiada a 6AM" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "¡No tienes el privilegio \"settime\"!" - -#: register.lua -msgid "Set time to night" -msgstr "" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Hora del día cambiada a 9PM" - -#: register.lua -msgid "Clear inventory" -msgstr "" - -#: register.lua -#, fuzzy -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" -"Éste botón ha sido deshabilitado para prevenir la destrucción accidental del " -"inventario.\n" -"Usa la ranura para basura en su lugar." - -#: register.lua -msgid "Inventory cleared!" -msgstr "¡Inventario limpio!" - -#: register.lua -msgid "Trash:" -msgstr "Basura:" - -#: register.lua -msgid "Refill:" -msgstr "Rellenar:" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Receta %d de %d" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "" - -#: register.lua -msgid "No recipes" -msgstr "" - -#: register.lua -msgid "No usages" -msgstr "" - -#: register.lua -msgid "Result" -msgstr "Resultado" - -#: register.lua -msgid "Ingredient" -msgstr "" - -#: register.lua -msgid "Show next recipe" -msgstr "" - -#: register.lua -msgid "Show next usage" -msgstr "" - -#: register.lua -msgid "Show previous recipe" -msgstr "" - -#: register.lua -msgid "Show previous usage" -msgstr "" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" - -#: register.lua -#, fuzzy -msgid "To craft grid:" -msgstr "Copiar al cuadro de elaboración" - -#: register.lua -msgid "All" -msgstr "Todos" - -#: waypoints.lua -msgid "White" -msgstr "Blanco" - -#: waypoints.lua -msgid "Yellow" -msgstr "Amarillo" - -#: waypoints.lua -msgid "Red" -msgstr "Rojo" - -#: waypoints.lua -msgid "Green" -msgstr "Verde" - -#: waypoints.lua -msgid "Blue" -msgstr "Azul" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Puntos de paso" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Puntos de paso %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "" - -#: waypoints.lua -msgid "invisible" -msgstr "" - -#: waypoints.lua -msgid "visible" -msgstr "" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "" - -#: waypoints.lua -msgid "Disable" -msgstr "" - -#: waypoints.lua -msgid "Enable" -msgstr "" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Punto de paso activo" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Punto de paso inactivo" - -#: waypoints.lua -msgid "Finish editing" -msgstr "" - -#: waypoints.lua -msgid "World position" -msgstr "Posición en el mundo" - -#: waypoints.lua -msgid "Name" -msgstr "Nombre" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Color del HUD" diff --git a/unified_inventory/locale/fr.po b/unified_inventory/locale/fr.po deleted file mode 100644 index f6af706..0000000 --- a/unified_inventory/locale/fr.po +++ /dev/null @@ -1,364 +0,0 @@ -# French translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# kilbith -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 16:15+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "Création" - -#: api.lua -msgid "Mixing" -msgstr "" - -#: api.lua -msgid "Cooking" -msgstr "Cuisson" - -#: api.lua -msgid "Digging" -msgstr "Creuser" - -#: bags.lua -msgid "Bags" -msgstr "Sacs" - -#: bags.lua -msgid "Bag @1" -msgstr "Sac @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Petit sac" - -#: bags.lua -msgid "Medium Bag" -msgstr "Sac moyen" - -#: bags.lua -msgid "Large Bag" -msgstr "Grand sac" - -#: group.lua -msgid " and " -msgstr " et " - -#: internal.lua -msgid "First page" -msgstr "1ère page" - -#: internal.lua -msgid "Back three pages" -msgstr "3 pages en arrière" - -#: internal.lua -msgid "Back one page" -msgstr "Page précédente" - -#: internal.lua -msgid "Forward one page" -msgstr "Page suivante" - -#: internal.lua -msgid "Forward three pages" -msgstr "3 pages en avant" - -#: internal.lua -msgid "Last page" -msgstr "Dernière page" - -#: internal.lua -msgid "Search" -msgstr "Rechercher" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "" - -#: internal.lua -msgid "No matching items" -msgstr "Aucun élément correspondant" - -#: internal.lua -msgid "No matches." -msgstr "Aucun match" - -#: internal.lua -msgid "Page" -msgstr "Page" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s de %s" - -#: internal.lua -msgid "Filter" -msgstr "Filtre" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Vous pouvez utiliser l'inventaire créatif" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" - -#: register.lua -msgid "Crafting Grid" -msgstr "Grille de création" - -#: register.lua -msgid "Crafting Guide" -msgstr "Guide de création" - -#: register.lua -#, fuzzy -msgid "Set home position" -msgstr "Position dans le monde" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Position de votre base fixée à: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "Vous n'avez pas le privilège \"home\"!" - -#: register.lua -msgid "Go home" -msgstr "" - -#: register.lua -msgid "Set time to day" -msgstr "" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Heure fixée à 6h" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "Vous n'avez pas le privilège \"settime\"!" - -#: register.lua -msgid "Set time to night" -msgstr "" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Heure fixée à 21h" - -#: register.lua -msgid "Clear inventory" -msgstr "" - -#: register.lua -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" -"Ce bouton a été désactivé en dehors du mode créatif pour éviter des saccages " -"dans l'inventaire.\n" -"Utilisez plutôt la case poubelle." - -#: register.lua -msgid "Inventory cleared!" -msgstr "Inventaire vidé !" - -#: register.lua -msgid "Trash:" -msgstr "Poubelle :" - -#: register.lua -msgid "Refill:" -msgstr "Remplir :" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Recette %d de %d" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "" - -#: register.lua -msgid "No recipes" -msgstr "" - -#: register.lua -msgid "No usages" -msgstr "" - -#: register.lua -msgid "Result" -msgstr "Résultat" - -#: register.lua -msgid "Ingredient" -msgstr "" - -#: register.lua -msgid "Show next recipe" -msgstr "" - -#: register.lua -msgid "Show next usage" -msgstr "" - -#: register.lua -msgid "Show previous recipe" -msgstr "" - -#: register.lua -msgid "Show previous usage" -msgstr "" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" - -#: register.lua -msgid "To craft grid:" -msgstr "Sur de création:" - -#: register.lua -msgid "All" -msgstr "Tout" - -#: waypoints.lua -msgid "White" -msgstr "Blanc" - -#: waypoints.lua -msgid "Yellow" -msgstr "Jaune" - -#: waypoints.lua -msgid "Red" -msgstr "Rouge" - -#: waypoints.lua -msgid "Green" -msgstr "Vert" - -#: waypoints.lua -msgid "Blue" -msgstr "Bleu" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Point de passage" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "Choisir un point de passage #%d" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Point de passage %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Marquer un point de passage à la position actuelle" - -#: waypoints.lua -msgid "invisible" -msgstr "" - -#: waypoints.lua -msgid "visible" -msgstr "" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "Rendre @1 le point de passage" - -#: waypoints.lua -msgid "Disable" -msgstr "" - -#: waypoints.lua -msgid "Enable" -msgstr "" - -#: waypoints.lua -#, fuzzy -msgid "@1 display of waypoint coordinates" -msgstr "@1 montrer les coordonnées des points de passages" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Changer la couleur du point de passage" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Editer le nom du point de passage" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Point de passage actif" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Point de passage inactif" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Terminer l'édition" - -#: waypoints.lua -msgid "World position" -msgstr "Position dans le monde" - -#: waypoints.lua -msgid "Name" -msgstr "Nom" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Couleur de texte du HUD" diff --git a/unified_inventory/locale/ms.po b/unified_inventory/locale/ms.po deleted file mode 100644 index 518fcb3..0000000 --- a/unified_inventory/locale/ms.po +++ /dev/null @@ -1,369 +0,0 @@ -# Malay translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# muhdnurhidayat , 2018. -# -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 03:34+0200\n" -"PO-Revision-Date: 2018-07-17 20:14+0800\n" -"Language-Team: muhdnurhidayat \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.9\n" -"Last-Translator: muhdnurhidayat \n" -"Plural-Forms: nplurals=1; plural=0;\n" -"Language: ms\n" -"X-Poedit-Flags-xgettext: --add-comments\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "Pertukangan" - -#: api.lua -msgid "Mixing" -msgstr "Pencampuran" - -#: api.lua -msgid "Cooking" -msgstr "Pemasakan" - -#: api.lua -msgid "Digging" -msgstr "Penggalian" - -#: bags.lua -msgid "Bags" -msgstr "Beg" - -#: bags.lua -msgid "Bag @1" -msgstr "Beg @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Beg Kecil" - -#: bags.lua -msgid "Medium Bag" -msgstr "Beg Sederhana" - -#: bags.lua -msgid "Large Bag" -msgstr "Beg Besar" - -#: group.lua -msgid " and " -msgstr " dan " - -#: internal.lua -msgid "First page" -msgstr "Halaman pertama" - -#: internal.lua -msgid "Back three pages" -msgstr "Tiga halaman sebelumnya" - -#: internal.lua -msgid "Back one page" -msgstr "Halaman sebelumnya" - -#: internal.lua -msgid "Forward one page" -msgstr "Halaman seterusnya" - -#: internal.lua -msgid "Forward three pages" -msgstr "Tiga halaman seterusnya" - -#: internal.lua -msgid "Last page" -msgstr "Halaman terakhir" - -#: internal.lua -msgid "Search" -msgstr "Cari" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "Set semula carian dan tunjukkan semua benda" - -#: internal.lua -msgid "No matching items" -msgstr "Tiada item sepadan" - -#: internal.lua -msgid "No matches." -msgstr "Tiada padanan." - -#: internal.lua -msgid "Page" -msgstr "Halaman" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s drpd %s" - -#: internal.lua -msgid "Filter" -msgstr "Tapis" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Boleh guna inventori kreatif" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" -"Memaksa Unified Inventory untuk dipaparkan dalam mod Full jika mod Lite " -"ditetapkan secara global" - -#: register.lua -msgid "Crafting Grid" -msgstr "Grid Pertukangan" - -#: register.lua -msgid "Crafting Guide" -msgstr "Panduan Pertukangan" - -#: register.lua -msgid "Set home position" -msgstr "Tetapkan kedudukan rumah" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Kedudukan rumah ditetapkan ke: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "Anda tidak ada keistimewaan \"home\"!" - -#: register.lua -msgid "Go home" -msgstr "Balik rumah" - -#: register.lua -msgid "Set time to day" -msgstr "Tetapkan masa jadi siang" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Masa ditetapkan ke 6 pagi" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "Anda tidak ada keistimewaan settime!" - -#: register.lua -msgid "Set time to night" -msgstr "Tetapkan masa jadi malam" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Masa ditetapkan ke 9 malam" - -#: register.lua -msgid "Clear inventory" -msgstr "Kosongkan inventori" - -#: register.lua -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" -"Butang ini dilumpuhkan di luar mod kreatif untuk mengelakkan pengosongan " -"inventori secara tidak sengaja.\n" -"Sebaliknya, gunakan slot tong sampah." - -#: register.lua -msgid "Inventory cleared!" -msgstr "Inventori dikosongkan!" - -#: register.lua -msgid "Trash:" -msgstr "Buang:" - -#: register.lua -msgid "Refill:" -msgstr "Isi balik:" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "Sebarang item dari kumpulan %s" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "Sebarang item dari kumpulan %s" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Resipi %d drpd %d" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "Kegunaan %d drpd %d" - -#: register.lua -msgid "No recipes" -msgstr "Tiada resipi" - -#: register.lua -msgid "No usages" -msgstr "Tiada kegunaan" - -#: register.lua -msgid "Result" -msgstr "Hasil" - -#: register.lua -msgid "Ingredient" -msgstr "Bahan" - -#: register.lua -msgid "Show next recipe" -msgstr "Tunjuk resipi seterusnya" - -#: register.lua -msgid "Show next usage" -msgstr "Tunjuk kegunaan seterusnya" - -#: register.lua -msgid "Show previous recipe" -msgstr "Tunjuk resipi sebelumnya" - -#: register.lua -msgid "Show previous usage" -msgstr "Tunjuk kegunaan sebelumnya" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "%s (%s)" - -#: register.lua -msgid "Give me:" -msgstr "Beri saya:" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" -"Resipi ini terlalu\n" -"besar untuk paparan." - -#: register.lua -msgid "To craft grid:" -msgstr "Ke grid pertukangan:" - -#: register.lua -msgid "All" -msgstr "" -"SE\n" -"MUA" - -#: waypoints.lua -msgid "White" -msgstr "Putih" - -#: waypoints.lua -msgid "Yellow" -msgstr "Kuning" - -#: waypoints.lua -msgid "Red" -msgstr "Merah" - -#: waypoints.lua -msgid "Green" -msgstr "Hijau" - -#: waypoints.lua -msgid "Blue" -msgstr "Biru" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Titik Arah" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "Pilih Titik Arah #%d" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Titik Arah %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Tetapkan titik arah ke lokasi semasa" - -#: waypoints.lua -msgid "invisible" -msgstr "Sembunyikan" - -#: waypoints.lua -msgid "visible" -msgstr "Paparkan" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "@1 titik arah" - -#: waypoints.lua -msgid "Disable" -msgstr "Sembunyikan" - -#: waypoints.lua -msgid "Enable" -msgstr "Paparkan" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "@1 koordinat untuk titik arah" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Tukar warna paparan titik arah" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Edit nama titik arah" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Titik arah aktif" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Titik arah tidak aktif" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Selesai edit" - -#: waypoints.lua -msgid "World position" -msgstr "Kedudukan dunia" - -#: waypoints.lua -msgid "Name" -msgstr "Nama" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Warna tulisan HUD" diff --git a/unified_inventory/locale/pl.po b/unified_inventory/locale/pl.po deleted file mode 100644 index 5a3f412..0000000 --- a/unified_inventory/locale/pl.po +++ /dev/null @@ -1,359 +0,0 @@ -# Polish translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# RealBadAngel -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 16:30+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: pl\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "" - -#: api.lua -msgid "Mixing" -msgstr "" - -#: api.lua -msgid "Cooking" -msgstr "" - -#: api.lua -msgid "Digging" -msgstr "" - -#: bags.lua -msgid "Bags" -msgstr "Plecaki" - -#: bags.lua -msgid "Bag @1" -msgstr "Plecak @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Maly plecak" - -#: bags.lua -msgid "Medium Bag" -msgstr "Sredni plecak" - -#: bags.lua -msgid "Large Bag" -msgstr "Duzy plecak" - -#: group.lua -msgid " and " -msgstr " i " - -#: internal.lua -msgid "First page" -msgstr "Pierwsza strona" - -#: internal.lua -msgid "Back three pages" -msgstr "3 strony w tyl" - -#: internal.lua -msgid "Back one page" -msgstr "1 strona w tyl" - -#: internal.lua -msgid "Forward one page" -msgstr "1 strona do przodu" - -#: internal.lua -msgid "Forward three pages" -msgstr "3 strony do przodu" - -#: internal.lua -msgid "Last page" -msgstr "Ostatnia strona" - -#: internal.lua -msgid "Search" -msgstr "Szukaj" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "" - -#: internal.lua -msgid "No matching items" -msgstr "Brak pasujacych przedmiotow" - -#: internal.lua -msgid "No matches." -msgstr "Brak wyników" - -#: internal.lua -msgid "Page" -msgstr "Strona" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s z %s" - -#: internal.lua -msgid "Filter" -msgstr "Filtr" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" - -#: register.lua -msgid "Crafting Grid" -msgstr "" - -#: register.lua -msgid "Crafting Guide" -msgstr "" - -#: register.lua -msgid "Set home position" -msgstr "Ustaw pozycję wyjściową" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Pozycja domowa ustawiona na: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "Nie masz uprawnien do zmiany czasu \"home\"!" - -#: register.lua -msgid "Go home" -msgstr "Idź do domu" - -#: register.lua -msgid "Set time to day" -msgstr "Ustaw czas na dzień" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Czas ustawiony na 6:00" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "Nie masz uprawnien do zmiany czasu \"settime\"!" - -#: register.lua -msgid "Set time to night" -msgstr "Ustaw czas na noc" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Czas ustawiony na 21:00" - -#: register.lua -msgid "Clear inventory" -msgstr "Wyczyść zapasy" - -#: register.lua -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" - -#: register.lua -msgid "Inventory cleared!" -msgstr "Zapasy zostały wyczyszczone!" - -#: register.lua -msgid "Trash:" -msgstr "Smietnik:" - -#: register.lua -msgid "Refill:" -msgstr "Uzupelnianie:" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Recepta %d z %d" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "Użycie %d z %d" - -#: register.lua -msgid "No recipes" -msgstr "Brak recepty" - -#: register.lua -msgid "No usages" -msgstr "Bez użycia" - -#: register.lua -msgid "Result" -msgstr "Wynik" - -#: register.lua -msgid "Ingredient" -msgstr "Składnik" - -#: register.lua -msgid "Show next recipe" -msgstr "" - -#: register.lua -msgid "Show next usage" -msgstr "" - -#: register.lua -msgid "Show previous recipe" -msgstr "" - -#: register.lua -msgid "Show previous usage" -msgstr "" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "Daj mi:" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" - -#: register.lua -msgid "To craft grid:" -msgstr "" - -#: register.lua -msgid "All" -msgstr "Wszystko" - -#: waypoints.lua -msgid "White" -msgstr "Bialy" - -#: waypoints.lua -msgid "Yellow" -msgstr "Zolty" - -#: waypoints.lua -msgid "Red" -msgstr "Czerwony" - -#: waypoints.lua -msgid "Green" -msgstr "Zielony" - -#: waypoints.lua -msgid "Blue" -msgstr "Niebieski" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Punkty orientacyjne" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "Wybierz punkt #%d" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Punkty orientacyjne %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Ustaw punkt orientacyjny na biezacej pozycji" - -#: waypoints.lua -msgid "invisible" -msgstr "niewidzialny" - -#: waypoints.lua -msgid "visible" -msgstr "widomy" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "Robić punkt @1" - -#: waypoints.lua -msgid "Disable" -msgstr "" - -#: waypoints.lua -msgid "Enable" -msgstr "" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "@1 koordynatow punktu" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Zmien kolor punktu" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Edytuj nazwe punktu" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Punkt wlaczony" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Punkt wylaczony" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Zakoncz edycje" - -#: waypoints.lua -msgid "World position" -msgstr "Pozycja" - -#: waypoints.lua -msgid "Name" -msgstr "Nazwa" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Kolor tekstu HUD" diff --git a/unified_inventory/locale/pt.po b/unified_inventory/locale/pt.po deleted file mode 100644 index ff9cc3a..0000000 --- a/unified_inventory/locale/pt.po +++ /dev/null @@ -1,366 +0,0 @@ -# Portuguese translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# Lunovox -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 16:48+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: pt\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "Artesanato" - -#: api.lua -msgid "Mixing" -msgstr "Muistura" - -#: api.lua -msgid "Cooking" -msgstr "Cozimento" - -#: api.lua -msgid "Digging" -msgstr "Escavação" - -#: bags.lua -msgid "Bags" -msgstr "Bolsas" - -#: bags.lua -msgid "Bag @1" -msgstr "Bolsa @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Bolsa Pequena" - -#: bags.lua -msgid "Medium Bag" -msgstr "Bolsa Média" - -#: bags.lua -msgid "Large Bag" -msgstr "Bolsa Grande" - -#: group.lua -msgid " and " -msgstr " e " - -#: internal.lua -msgid "First page" -msgstr "Primeira Página" - -#: internal.lua -msgid "Back three pages" -msgstr "Voltar 3 Páginas" - -#: internal.lua -msgid "Back one page" -msgstr "Voltar 1 Página" - -#: internal.lua -msgid "Forward one page" -msgstr "Avançar 1 Página" - -#: internal.lua -msgid "Forward three pages" -msgstr "Avançar 3 Páginas" - -#: internal.lua -msgid "Last page" -msgstr "Ultima Página" - -#: internal.lua -msgid "Search" -msgstr "Pesquisar" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "Redefinir pesquisa e exibir tudo" - -#: internal.lua -msgid "No matching items" -msgstr "Nenhum item correspondente" - -#: internal.lua -msgid "No matches." -msgstr "Sem correspondências" - -#: internal.lua -msgid "Page" -msgstr "Página" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s de %s" - -#: internal.lua -msgid "Filter" -msgstr "Filtro" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Pode usar o inventário do criativo" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" -"Força o Unified Inventory a ser exibido no modo Full se o modo Lite estiver " -"configurado globalmente" - -#: register.lua -msgid "Crafting Grid" -msgstr "Grade de Artesanato" - -#: register.lua -msgid "Crafting Guide" -msgstr "Guia de Artesanato" - -#: register.lua -msgid "Set home position" -msgstr "Definir posição de casa" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Posição inicial definida para: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "Você não tem o privilégio de \"home\"!" - -#: register.lua -msgid "Go home" -msgstr "Transportar para Casa" - -#: register.lua -msgid "Set time to day" -msgstr "Definir turno para dia" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Hora do dia definida para 06h" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "Você não tem o privilégio de \"settime\"!" - -#: register.lua -msgid "Set time to night" -msgstr "Definir turno para noite" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Hora do dia ajustada para 21h" - -#: register.lua -msgid "Clear inventory" -msgstr "Limpar Inventário" - -#: register.lua -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" -"Este botão foi desativado fora do modo de criativo para evitar o descarte " -"acidental de inventário. \n" -"Use o slot de lixo em vez disso." - -#: register.lua -msgid "Inventory cleared!" -msgstr "Inventário Apagado!" - -#: register.lua -msgid "Trash:" -msgstr "Lixo:" - -#: register.lua -msgid "Refill:" -msgstr "Recarga:" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "Qualquer item pertencente ao grupo '%s'." - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "Qualquer item pertencente aos grupos '%s'." - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Receita %d de %d" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "Utilização %d de %d" - -#: register.lua -msgid "No recipes" -msgstr "Sem Receita" - -#: register.lua -msgid "No usages" -msgstr "Sem Utilização" - -#: register.lua -msgid "Result" -msgstr "Resultado" - -#: register.lua -msgid "Ingredient" -msgstr "Ingrediente" - -#: register.lua -msgid "Show next recipe" -msgstr "Exibir Próxima Receita" - -#: register.lua -msgid "Show next usage" -msgstr "Mostrar Próxima Utilização" - -#: register.lua -msgid "Show previous recipe" -msgstr "Exibir Receita Anterior" - -#: register.lua -msgid "Show previous usage" -msgstr "Exibir Utilização Anterior" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "Gerado:" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" -"Esta receita é grande \n" -"demais para ser apresentada." - -#: register.lua -msgid "To craft grid:" -msgstr "Para Grade de Artesanato" - -#: register.lua -msgid "All" -msgstr "MAX" - -#: waypoints.lua -msgid "White" -msgstr "Branco" - -#: waypoints.lua -msgid "Yellow" -msgstr "Amarelo" - -#: waypoints.lua -msgid "Red" -msgstr "Vermelho" - -#: waypoints.lua -msgid "Green" -msgstr "Verde" - -#: waypoints.lua -msgid "Blue" -msgstr "Azul" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Apontador de Direção" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "Seleção de Apontador de Direção #%02d" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Apontador de Direção %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Configurar localização atual do Apontador de Direção" - -#: waypoints.lua -msgid "invisible" -msgstr "invisível" - -#: waypoints.lua -msgid "visible" -msgstr "visível" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "Fazer Apontador de Direção @1" - -#: waypoints.lua -msgid "Disable" -msgstr "" - -#: waypoints.lua -msgid "Enable" -msgstr "" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "@1 exibição de coordenadas de Fazer Apontador de Direção" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Mudar cor exibida do Apontador de Direção" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Editar Nome de Apontador de Direção" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Apontador de Direção Ativo" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Apontador de Direção Inativo" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Edição Finalizada" - -#: waypoints.lua -msgid "World position" -msgstr "Posição Mundial" - -#: waypoints.lua -msgid "Name" -msgstr "Nome" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Cor de HUD" diff --git a/unified_inventory/locale/ru.po b/unified_inventory/locale/ru.po deleted file mode 100644 index 7cf6144..0000000 --- a/unified_inventory/locale/ru.po +++ /dev/null @@ -1,366 +0,0 @@ -# Russian translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# eternal_sorrow -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 03:34+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -#, fuzzy -msgid "Crafting" -msgstr "Крафт" - -#: api.lua -msgid "Mixing" -msgstr "Мешать" - -#: api.lua -msgid "Cooking" -msgstr "Варить" - -#: api.lua -msgid "Digging" -msgstr "Копать" - -#: bags.lua -msgid "Bags" -msgstr "Сумки" - -#: bags.lua -msgid "Bag @1" -msgstr "Сумка @1" - -#: bags.lua -msgid "Small Bag" -msgstr "Малая сумка" - -#: bags.lua -msgid "Medium Bag" -msgstr "Средняя сумка" - -#: bags.lua -msgid "Large Bag" -msgstr "Большая сумка" - -#: group.lua -msgid " and " -msgstr " и " - -#: internal.lua -msgid "First page" -msgstr "Первая страница" - -#: internal.lua -msgid "Back three pages" -msgstr "3 страницы назад" - -#: internal.lua -msgid "Back one page" -msgstr "1 страницу назад" - -#: internal.lua -msgid "Forward one page" -msgstr "1 страницу вперёд" - -#: internal.lua -msgid "Forward three pages" -msgstr "3 страницы вперёд" - -#: internal.lua -msgid "Last page" -msgstr "Последняя страница" - -#: internal.lua -msgid "Search" -msgstr "Поиск" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "Сброс поиска, показать всё" - -#: internal.lua -msgid "No matching items" -msgstr "Нет подходящих элементов" - -#: internal.lua -msgid "No matches." -msgstr "Ничего не найдено" - -#: internal.lua -msgid "Page" -msgstr "Страница" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s из %s" - -#: internal.lua -msgid "Filter" -msgstr "Фильтр" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Можно использовать инвентарь творческого режима" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" - -#: register.lua -msgid "Crafting Grid" -msgstr "Решетка крафта" - -#: register.lua -msgid "Crafting Guide" -msgstr "Книга рецептов" - -#: register.lua -msgid "Set home position" -msgstr "Установить позицию дома" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Дом теперь расположен по коодинатам: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "У вас нет привилегии \"home\"!" - -#: register.lua -msgid "Go home" -msgstr "Отправиться домой" - -#: register.lua -msgid "Set time to day" -msgstr "День" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Установлено время 6 утра" - -#: register.lua -#, fuzzy -msgid "You don't have the settime privilege!" -msgstr "Вам не разрешено устанавливать время! (нет привилегии \"settime\")" - -#: register.lua -msgid "Set time to night" -msgstr "Ночь" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Установлено время 9 вечера" - -#: register.lua -msgid "Clear inventory" -msgstr "Очистить инвентарь" - -#: register.lua -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "" -"Эта кнопка отключена вне творческого режима, чтобы предотвратить случайное " -"уничтожение предметов.\n" -"Используйте слот корзины вместо нее." - -#: register.lua -msgid "Inventory cleared!" -msgstr "Инвентарь очищен!" - -#: register.lua -msgid "Trash:" -msgstr "Мусор:" - -#: register.lua -msgid "Refill:" -msgstr "Наполнить:" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "Любой элемент из группы: %s" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "Любой элемент из группы: %s" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "Рецепт %s из %s" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "Вариант %d of %d" - -#: register.lua -msgid "No recipes" -msgstr "Рецептов нет" - -#: register.lua -msgid "No usages" -msgstr "Не используется" - -#: register.lua -msgid "Result" -msgstr "Результат" - -#: register.lua -msgid "Ingredient" -msgstr "Состав" - -#: register.lua -msgid "Show next recipe" -msgstr "Следующий рецепт" - -#: register.lua -msgid "Show next usage" -msgstr "Следующее использование" - -#: register.lua -msgid "Show previous recipe" -msgstr "Прошлый рецепт" - -#: register.lua -msgid "Show previous usage" -msgstr "Прошлая страница" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "Дай мне:" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" -"Этот рецепт не\n" -"помещается в решетку." - -#: register.lua -msgid "To craft grid:" -msgstr "На решeтку крафта:" - -#: register.lua -msgid "All" -msgstr "Все" - -#: waypoints.lua -msgid "White" -msgstr "Белый" - -#: waypoints.lua -msgid "Yellow" -msgstr "Желтый" - -#: waypoints.lua -msgid "Red" -msgstr "Красный" - -#: waypoints.lua -msgid "Green" -msgstr "Зелёный" - -#: waypoints.lua -msgid "Blue" -msgstr "Синий" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Путевые точки" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "Выбрать путевую точку №%d" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "Путевая точка %d" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Установить путевую точку по текущей позиции" - -#: waypoints.lua -msgid "invisible" -msgstr "невидимой" - -#: waypoints.lua -msgid "visible" -msgstr "видимой" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "Сделать путевую точку @1" - -#: waypoints.lua -msgid "Disable" -msgstr "Выключить" - -#: waypoints.lua -msgid "Enable" -msgstr "Включить" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "@1 показ координат путевых точек" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Поменять цвет путевой точки" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Переименовать путевую точку" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Путевая точка включена" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Путевая точка выключена" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Закончить редакцию" - -#: waypoints.lua -msgid "World position" -msgstr "Позиция мира" - -#: waypoints.lua -msgid "Name" -msgstr "Имя" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Цвет текста HUDа" diff --git a/unified_inventory/locale/tr.po b/unified_inventory/locale/tr.po deleted file mode 100644 index 2b6211f..0000000 --- a/unified_inventory/locale/tr.po +++ /dev/null @@ -1,360 +0,0 @@ -# Turkish translation for the unified_inventory mod. -# Copyright (C) 2018 Maciej Kasatkin (RealBadAngel) -# This file is distributed under the same license as the unified_inventory package. -# Mahmutelmas06@hotmail.com -# CodeXP , 2018. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: unified_inventory\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-04-02 13:41+0200\n" -"PO-Revision-Date: \n" -"Last-Translator: CodeXP \n" -"Language-Team: \n" -"Language: tr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: api.lua register.lua -msgid "Crafting" -msgstr "Üretim" - -#: api.lua -msgid "Mixing" -msgstr "Karıştırma" - -#: api.lua -msgid "Cooking" -msgstr "Pişirme" - -#: api.lua -msgid "Digging" -msgstr "Kazma" - -#: bags.lua -msgid "Bags" -msgstr "Çantalarım" - -#: bags.lua -msgid "Bag @1" -msgstr "@1. Çanta" - -#: bags.lua -msgid "Small Bag" -msgstr "Küçük Çanta" - -#: bags.lua -msgid "Medium Bag" -msgstr "Çanta" - -#: bags.lua -msgid "Large Bag" -msgstr "Büyük Çanta" - -#: group.lua -msgid " and " -msgstr " ve " - -#: internal.lua -msgid "First page" -msgstr "İlk Sayfa" - -#: internal.lua -msgid "Back three pages" -msgstr "3 Sayfa Gerile" - -#: internal.lua -msgid "Back one page" -msgstr "Geri" - -#: internal.lua -msgid "Forward one page" -msgstr "İleri" - -#: internal.lua -msgid "Forward three pages" -msgstr "3 Sayfa İlerile" - -#: internal.lua -msgid "Last page" -msgstr "Son Sayfa" - -#: internal.lua -msgid "Search" -msgstr "Ara" - -#: internal.lua -msgid "Reset search and display everything" -msgstr "" - -#: internal.lua -msgid "No matching items" -msgstr "Eşleşme yok" - -#: internal.lua -msgid "No matches." -msgstr "Eşleşme yok" - -#: internal.lua -msgid "Page" -msgstr "Sayfa" - -#: internal.lua -#, lua-format -msgid "%s of %s" -msgstr "%s dan %s" - -#: internal.lua -msgid "Filter" -msgstr "Süzgeç" - -#: register.lua -msgid "Can use the creative inventory" -msgstr "Yaratıcı envanteri kullanabilir" - -#: register.lua -msgid "" -"Forces Unified Inventory to be displayed in Full mode if Lite mode is " -"configured globally" -msgstr "" - -#: register.lua -msgid "Crafting Grid" -msgstr "Üretim tablosu" - -#: register.lua -msgid "Crafting Guide" -msgstr "Kılavuz" - -#: register.lua -msgid "Set home position" -msgstr "Set ev pozisyon" - -#: register.lua -#, lua-format -msgid "Home position set to: %s" -msgstr "Yeni eviniz: %s" - -#: register.lua -msgid "You don't have the \"home\" privilege!" -msgstr "\"home\" yetkiniz yok!" - -#: register.lua -msgid "Go home" -msgstr "Eve git" - -#: register.lua -msgid "Set time to day" -msgstr "Güne zaman ayarla" - -#: register.lua -msgid "Time of day set to 6am" -msgstr "Saat 06:00 olarak ayarlandı" - -#: register.lua -msgid "You don't have the settime privilege!" -msgstr "\"settime\" yetkiniz yok!" - -#: register.lua -msgid "Set time to night" -msgstr "Geceye zaman ayarla" - -#: register.lua -msgid "Time of day set to 9pm" -msgstr "Saat 19:00 olarak ayarlandı" - -#: register.lua -msgid "Clear inventory" -msgstr "" - -#: register.lua -msgid "" -"This button has been disabled outside of creative mode to prevent accidental " -"inventory trashing.\n" -"Use the trash slot instead." -msgstr "Yaratıcı modu dışında iken bu tuş kullanılamaz." - -#: register.lua -msgid "Inventory cleared!" -msgstr "Envanter temizlendi!" - -#: register.lua -msgid "Trash:" -msgstr "Çöp" - -#: register.lua -msgid "Refill:" -msgstr "Doldur" - -#: register.lua -#, lua-format -msgid "Any item belonging to the %s group" -msgstr "" - -#: register.lua -#, lua-format -msgid "Any item belonging to the groups %s" -msgstr "" - -#: register.lua -#, lua-format -msgid "Recipe %d of %d" -msgstr "%d dan %d tarifi" - -#: register.lua -#, lua-format -msgid "Usage %d of %d" -msgstr "Kullanım %d/%d" - -#: register.lua -msgid "No recipes" -msgstr "Tarifi yok" - -#: register.lua -msgid "No usages" -msgstr "Kullanım yok" - -#: register.lua -msgid "Result" -msgstr "Çıktı" - -#: register.lua -msgid "Ingredient" -msgstr "Bileşen" - -#: register.lua -msgid "Show next recipe" -msgstr "" - -#: register.lua -msgid "Show next usage" -msgstr "" - -#: register.lua -msgid "Show previous recipe" -msgstr "" - -#: register.lua -msgid "Show previous usage" -msgstr "" - -#: register.lua -#, lua-format -msgid "%s (%s)" -msgstr "" - -#: register.lua -msgid "Give me:" -msgstr "Ver bana:" - -#: register.lua -msgid "" -"This recipe is too\n" -"large to be displayed." -msgstr "" - -#: register.lua -#, fuzzy -msgid "To craft grid:" -msgstr "Üretim tablosuna kopyala" - -#: register.lua -msgid "All" -msgstr "Tümü" - -#: waypoints.lua -msgid "White" -msgstr "Beyaz" - -#: waypoints.lua -msgid "Yellow" -msgstr "Sarı" - -#: waypoints.lua -msgid "Red" -msgstr "Kırmızı" - -#: waypoints.lua -msgid "Green" -msgstr "Yeşil" - -#: waypoints.lua -msgid "Blue" -msgstr "Mavi" - -#: waypoints.lua -msgid "Waypoints" -msgstr "Konum Noktaları" - -#: waypoints.lua -#, lua-format -msgid "Select Waypoint #%d" -msgstr "#%d konum noktası seç" - -#: waypoints.lua -#, lua-format -msgid "Waypoint %d" -msgstr "%d Konum Noktaları" - -#: waypoints.lua -msgid "Set waypoint to current location" -msgstr "Bulunduğun noktayı işaretle" - -#: waypoints.lua -msgid "invisible" -msgstr "görünmez" - -#: waypoints.lua -msgid "visible" -msgstr "görünür" - -#: waypoints.lua -msgid "Make waypoint @1" -msgstr "Yol noktası @1" - -#: waypoints.lua -msgid "Disable" -msgstr "" - -#: waypoints.lua -msgid "Enable" -msgstr "" - -#: waypoints.lua -msgid "@1 display of waypoint coordinates" -msgstr "Yol noktası koordinatlarının görüntülenmesini @1" - -#: waypoints.lua -msgid "Change color of waypoint display" -msgstr "Konum Gösterge Rengi" - -#: waypoints.lua -msgid "Edit waypoint name" -msgstr "Konum Noktasını Düzenle" - -#: waypoints.lua -msgid "Waypoint active" -msgstr "Konum Etkin" - -#: waypoints.lua -msgid "Waypoint inactive" -msgstr "Konum Devredışı" - -#: waypoints.lua -msgid "Finish editing" -msgstr "Düzenleme bitti" - -#: waypoints.lua -msgid "World position" -msgstr "Dünya konumu" - -#: waypoints.lua -msgid "Name" -msgstr "İsim" - -#: waypoints.lua -msgid "HUD text color" -msgstr "Metin rengi" diff --git a/unified_inventory/locale/unified_inventory.de.tr b/unified_inventory/locale/unified_inventory.de.tr new file mode 100644 index 0000000..e2a05be --- /dev/null +++ b/unified_inventory/locale/unified_inventory.de.tr @@ -0,0 +1,79 @@ +# textdomain: unified_inventory +Crafting=Fertigung +Mixing=Mischen +Cooking=Kochen +Digging=Graben +Bags=Taschen +Bag @1=Tasche @1 +Small Bag=Kleine Tasche +Medium Bag=Mittelgroße Tasche +Large Bag=Große Tasche + and = und +First page=Erste Seite +Back three pages=3 Seiten zurückblättern +Back one page=1 Seite zurückblättern +Forward one page=1 Seite vorblättern +Forward three pages=3 Seiten vorblättern +Last page=Letzte Seite +Search=Suchen +Reset search and display everything=Suche zurücksetzen und alles anzeigen +No matching items=Keine passenden Gegenstände +No matches.=Keine Treffer +Page=Seite +@1 of @2=@1 von @2 +Filter=Filter +Can use the creative inventory=Kann das Kreativinventar nutzen +Crafting Grid=Fertigungsraster +Crafting Guide=Fertigungsführer +Set home position=Heimatposition setzen +Home position set to: @1=Heimatposition nach @1 gesetzt +You don't have the "home" privilege!=Du hast das „home“-Privileg nicht! +Go home=Nach Hause gehen +Set time to day=Zur Tageszeit wechseln +Time of day set to 6am=Tageszeit auf 6 Uhr gesetzt +You don't have the settime privilege!=Du hast das „settime“-Privileg nicht! +Set time to night=Zur Nachtzeit wechseln +Time of day set to 9pm=Tageszeit auf 21 Uhr gesetzt +Clear inventory=Inventar leeren +Inventory cleared!=Inventar geleert! +Trash:=Müll: +Refill:=Nachfüllen: +Any item belonging to the @1 group=Irgendein Gegenstand, der zur Gruppe @1 gehört +Any item belonging to the groups @1=Irgendein Gegenstand, der zu den Gruppen @1 gehört +Recipe @1 of @2=Rezept @1 von @2 +Usage @1 of @2=Verwendung @1 von @2 +No recipes=Keine Rezepte +No usages=Keine Verwendungen +Result=Ergebnis +Ingredient=Zutat +Show next recipe=Nächstes Rezept zeigen +Show next usage=Nächste Verwendung zeigen +Show previous recipe=Vorheriges Rezept zeigen +Show previous usage=Vorherige Verwendung zeigen +Give me:=Gib mir: +To craft grid:=Ins Fertigungsraster: +All=Alles +White=Weiß +Yellow=Gelb +Red=Rot +Green=Grün +Blue=Blau +Waypoints=Wegpunkte +Select Waypoint #@1=Wegpunkt Nr. @1 auswählen +Waypoint @1=Wegpunkt Nr. @1 +Set waypoint to current location=Setze Wegpunkt zur derzeitigen Position +invisible=unsichtbar +visible=sichtbar +Make waypoint @1=Wegpunkt @1 machen +Disable=ausschalten +Enable=einschalten +@1 display of waypoint coordinates=Anzeige der Wegpunktkoordinaten @1 +Change color of waypoint display=Farbe der Darstellung der Wegpunkte ändern +Edit waypoint name=Name des Wegpunkts ändern +Waypoint active=Wegpunkt aktiv +Waypoint inactive=Wegpunkt inaktiv +Finish editing=Bearbeitung abschließen +World position=Weltposition +Name=Name +HUD text color=HUD-Textfarbe +Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Zwingt Unified Inventory, im Vollmodus angezeigt zu werden, wenn der Minimalmodus global eingestellt ist diff --git a/unified_inventory/locale/unified_inventory.es.tr b/unified_inventory/locale/unified_inventory.es.tr new file mode 100644 index 0000000..18b6c77 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.es.tr @@ -0,0 +1,100 @@ +# textdomain: unified_inventory + +# waypoints.lua + +White=Blanco +Yellow=Amarillo +Red=Rojo +Green=Verde +Blue=Azul +Waypoints=Puntos +Select Waypoint #@1=Seleccionar Punto #@1 +Waypoint @1=Punto @1 +Set waypoint to current location=Establecer el punto a la ubicación actual +Make waypoint @1=Hacer punto @1 +invisible=invisible +visible=visible +@1 display of waypoint coordinates=Visualizar coordenadas del punto @1 +Disable=Deshabilitado +Enable=Habilitado +Change color of waypoint display=Cambiar el color del punto +Edit waypoint name=Editar nombre del punto +Waypoint active=Punto activo +Waypoint inactive=Punto inactivo +Finish editing=Terminar edición +World position=Posición en el mundo +Name=Nombre +HUD text color=Color del texto de la Interfaz + +# group.lua + + and = y + +# register.lua + +Can use the creative inventory=Puede usar el inventario creativo +Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Obliga al Inventario Unificado a mostrarse en modo Completo si el modo Simple está configurado globalmente +Crafting Grid=Cuadricula de Elaboración +Crafting Guide=Guía de Elaboración +Set home position=Establecer posición de la casa +Home position set to: @1=Posición de la casa cambiada a: @1 +You don't have the \"home\" privilege!=¡No tienes el privilegio \"home\"! +Go home=Ir a casa +Set time to day=Cambiar a dia +Set time to night=Cambiar a noche +Time of day set to 6am=Hora del día cambiada a 6 AM +Time of day set to 9pm=Hora del día cambiada a 9 PM +You don't have the settime privilege!=¡No tienes el privilegio "settime"! +Clear inventory=Limpiar inventario +Inventory cleared!=¡Inventario limpio! +This button has been disabled outside=Este botón ha sido deshabilitado +Crafting=Elaboración +Trash:=Basura: +Refill:=Rellenar: +Any item belonging to the @1 group=Cualquier elemento que pertenezca al grupo @1 +Any item belonging to the groups @1=Cualquier elemento perteneciente a los grupos @1 +Recipe @1 of @2=Receta @1 de @2 +Usage @1 of @2=Uso @1 de @2 +No recipes=No tiene receta +No usages=No tiene uso +Result=Resultado +Ingredient=Ingrediente +Show next recipe=Mostrar la siguiente receta +Show next usage=Mostrar el siguiente uso +Show previous recipe=Mostrar la receta anterior +Show previous usage=Mostrar el uso anterior +@1 (@2)=@1 (@2) +Give me:=Dame: +This recipe is too@nlarge to be displayed.=Esta receta es demasiado@ngrande para ser mostrada. +To craft grid:=Construir: +All=Todos + +# api.lua + +Mixing=Mezclar +Cooking=Hornear +Digging=Recoger + +# internal.lua + +First page=Primera página +Back three pages=Volver tres páginas +Back one page=Volver una página +Forward one page=Avanzar una página +Forward three pages=Avanzar tres páginas +Last page=Ultima Pagina +Search=Buscar +Reset search and display everything=Limpiar la busqueda y mostrar todo +No matching items=No se encontraron elementos +No matches.=No hay resultados. +Page=Página +@1 of @2=@1 de @2 +Filter=Filtro + +# bags.lua + +Bags=Bolsos +Bag @1=Bolso @1 +Small Bag=Bolso Pequeño +Medium Bag=Bolso Mediano +Large Bag=Bolso Grande diff --git a/unified_inventory/locale/unified_inventory.fr.tr b/unified_inventory/locale/unified_inventory.fr.tr new file mode 100644 index 0000000..5367ddb --- /dev/null +++ b/unified_inventory/locale/unified_inventory.fr.tr @@ -0,0 +1,57 @@ +# textdomain: unified_inventory +Crafting=Création +Cooking=Cuisson +Digging=Creuser +Bags=Sacs +Bag @1=Sac @1 +Small Bag=Petit sac +Medium Bag=Sac moyen +Large Bag=Grand sac + and = et +First page=1ère page +Back three pages=3 pages en arrière +Back one page=Page précédente +Forward one page=Page suivante +Forward three pages=3 pages en avant +Last page=Dernière page +Search=Rechercher +No matching items=Aucun élément correspondant +No matches.=Aucun match +Page=Page +@1 of @2=@1 de @2 +Filter=Filtre +Can use the creative inventory=Vous pouvez utiliser l'inventaire créatif +Crafting Grid=Grille de création +Crafting Guide=Guide de création +Set home position=Position dans le monde +Home position set to: @1=Position de votre base fixée à: @1 +You don't have the "home" privilege!=Vous n'avez pas le privilège "home"! +Time of day set to 6am=Heure fixée à 6h +You don't have the settime privilege!=Vous n'avez pas le privilège "settime"! +Time of day set to 9pm=Heure fixée à 21h +Inventory cleared!=Inventaire vidé ! +Trash:=Poubelle : +Refill:=Remplir : +Recipe @1 of @2=Recette @1 de @2 +Result=Résultat +To craft grid:=Sur de création: +All=Tout +White=Blanc +Yellow=Jaune +Red=Rouge +Green=Vert +Blue=Bleu +Waypoints=Point de passage +Select Waypoint #@1=Choisir un point de passage #@1 +Waypoint @1=Point de passage @1 +Set waypoint to current location=Marquer un point de passage à la position actuelle +Make waypoint @1=Rendre @1 le point de passage +@1 display of waypoint coordinates=@1 montrer les coordonnées des points de passages +Change color of waypoint display=Changer la couleur du point de passage +Edit waypoint name=Editer le nom du point de passage +Waypoint active=Point de passage actif +Waypoint inactive=Point de passage inactif +Finish editing=Terminer l'édition +World position=Position dans le monde +Name=Nom +HUD text color=Couleur de texte du HUD diff --git a/unified_inventory/locale/unified_inventory.it.tr b/unified_inventory/locale/unified_inventory.it.tr new file mode 100644 index 0000000..1bf7660 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.it.tr @@ -0,0 +1,79 @@ +# textdomain: unified_inventory +Crafting=Assemblaggio +Mixing=Unione +Cooking=Cottura +Digging=Scavo +Bags=Borse +Bag @1=Borsa @1 +Small Bag=Borsa piccola +Medium Bag=Borsa media +Large Bag=Borsa grande + and = e +First page=Prima pagina +Back three pages=Indietro di tre pagine +Back one page=Indietro di una pagina +Forward one page=Avanti di una pagina +Forward three pages=Avanti di tre pagine +Last page=Ultima pagina +Search=Cerca +Reset search and display everything=Azzera la ricerca e mostra tutto +No matching items=Nessun oggetto corrispondente +No matches.=Nessuna corrispondenza. +Page=Pagina +@1 of @2=@1 di @2 +Filter=Filtro +Can use the creative inventory=Può usare l'inventario creativo +Crafting Grid=Griglia di assemblaggio +Crafting Guide=Guida di assemblaggio +Set home position=Imposta la residenza +Home position set to: @1=Residenza impostata su: @1 +You don't have the "home" privilege!=Non hai il privilegio "home"! +Go home=Torna a casa +Set time to day=Imposta l'orario sul giorno +Time of day set to 6am=Orario impostato sulle 6am +You don't have the settime privilege!=Non hai il privilegio "time"! +Set time to night=Imposta l'orario sulla notte +Time of day set to 9pm=Orario impostato sulle 9am +Clear inventory=Ripulisci l'inventario +Inventory cleared!=Inventario ripulito! +Trash:=Butta: +Refill:=Riempi: +Any item belonging to the @1 group=Qualunque oggetto appartenente al gruppo @1 +Any item belonging to the groups @1=Qualunque oggetto appartenente ai gruppi @1 +Recipe @1 of @2=Ricetta @1 di @2 +Usage @1 of @2=Uso @1 di @2 +No recipes=Nessuna ricetta +No usages=Nessun utilizzo +Result=Risultato +Ingredient=Ingrediente +Show next recipe=Mostra la prossima ricetta +Show next usage=Mostra il prossimo utilizzo +Show previous recipe=Mostra la ricetta precedente +Show previous usage=Mostra l'utilizzo precedente +Give me:=Dammi: +To craft grid:=Alla griglia di assemblaggio: +All=Tutto +White=Bianco +Yellow=Giallo +Red=Rosso +Green=Verde +Blue=Blu +Waypoints=Tappe +Select Waypoint #@1=Seleziona tappa n°@1 +Waypoint @1=Tappa @1 +Set waypoint to current location=Imposta tappa alla posizione attuale +invisible=invisibile +visible=visibile +Make waypoint @1=Crea tappa @1 +Disable=Disabilita +Enable=Abilita +@1 display of waypoint coordinates=@1 la visualizzazione delle coordinate della tappa +Change color of waypoint display=Modifica il colore della visualizzazione della tappa +Edit waypoint name=Modifica il nome della tappa +Waypoint active=Tappa attiva +Waypoint inactive=Tappa inattiva +Finish editing=Termina la modifica +World position=Posizione del mondo +Name=Nome +HUD text color=Colore del testo del visore +Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Forza la visualizzazione di Unified Inventory in modalità completa se è configurata globalmente la visualizzazione semplice diff --git a/unified_inventory/locale/unified_inventory.ms.tr b/unified_inventory/locale/unified_inventory.ms.tr new file mode 100644 index 0000000..25fc853 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.ms.tr @@ -0,0 +1,78 @@ +# textdomain: unified_inventory +Crafting=Pertukangan +Mixing=Pencampuran +Cooking=Pemasakan +Digging=Penggalian +Bags=Beg +Bag @1=Beg @1 +Small Bag=Beg Kecil +Medium Bag=Beg Sederhana +Large Bag=Beg Besar + and = dan +First page=Halaman pertama +Back three pages=Tiga halaman sebelumnya +Back one page=Halaman sebelumnya +Forward one page=Halaman seterusnya +Forward three pages=Tiga halaman seterusnya +Last page=Halaman terakhir +Search=Cari +Reset search and display everything=Set semula carian dan tunjukkan semua benda +No matching items=Tiada item sepadan +No matches.=Tiada padanan. +Page=Halaman +@1 of @2=@1 drpd @2 +Filter=Tapis +Can use the creative inventory=Boleh guna inventori kreatif +Crafting Grid=Grid Pertukangan +Crafting Guide=Panduan Pertukangan +Set home position=Tetapkan kedudukan rumah +Home position set to: @1=Kedudukan rumah ditetapkan ke: @1 +You don't have the "home" privilege!=Anda tidak ada keistimewaan "home"! +Go home=Balik rumah +Set time to day=Tetapkan masa jadi siang +Time of day set to 6am=Masa ditetapkan ke 6 pagi +You don't have the settime privilege!=Anda tidak ada keistimewaan settime! +Set time to night=Tetapkan masa jadi malam +Time of day set to 9pm=Masa ditetapkan ke 9 malam +Clear inventory=Kosongkan inventori +Inventory cleared!=Inventori dikosongkan! +Trash:=Buang: +Refill:=Isi balik: +Any item belonging to the @1 group=Sebarang item dari kumpulan @1 +Any item belonging to the groups @1=Sebarang item dari kumpulan @1 +Recipe @1 of @2=Resipi @1 drpd @2 +Usage @1 of @2=Kegunaan @1 drpd @2 +No recipes=Tiada resipi +No usages=Tiada kegunaan +Result=Hasil +Ingredient=Bahan +Show next recipe=Tunjuk resipi seterusnya +Show next usage=Tunjuk kegunaan seterusnya +Show previous recipe=Tunjuk resipi sebelumnya +Show previous usage=Tunjuk kegunaan sebelumnya +@1 (@2)=@1 (@2) +Give me:=Beri saya: +To craft grid:=Ke grid pertukangan: +White=Putih +Yellow=Kuning +Red=Merah +Green=Hijau +Blue=Biru +Waypoints=Titik Arah +Select Waypoint #@1=Pilih Titik Arah #@1 +Waypoint @1=Titik Arah @1 +Set waypoint to current location=Tetapkan titik arah ke lokasi semasa +invisible=Sembunyikan +visible=Paparkan +Make waypoint @1=@1 titik arah +Disable=Sembunyikan +Enable=Paparkan +@1 display of waypoint coordinates=@1 koordinat untuk titik arah +Change color of waypoint display=Tukar warna paparan titik arah +Edit waypoint name=Edit nama titik arah +Waypoint active=Titik arah aktif +Waypoint inactive=Titik arah tidak aktif +Finish editing=Selesai edit +World position=Kedudukan dunia +Name=Nama +HUD text color=Warna tulisan HUD diff --git a/unified_inventory/locale/unified_inventory.pl.tr b/unified_inventory/locale/unified_inventory.pl.tr new file mode 100644 index 0000000..19121d8 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.pl.tr @@ -0,0 +1,61 @@ +# textdomain: unified_inventory +Bags=Plecaki +Bag @1=Plecak @1 +Small Bag=Maly plecak +Medium Bag=Sredni plecak +Large Bag=Duzy plecak + and = i +First page=Pierwsza strona +Back three pages=3 strony w tyl +Back one page=1 strona w tyl +Forward one page=1 strona do przodu +Forward three pages=3 strony do przodu +Last page=Ostatnia strona +Search=Szukaj +No matching items=Brak pasujacych przedmiotow +No matches.=Brak wyników +Page=Strona +@1 of @2=@1 z @2 +Filter=Filtr +Set home position=Ustaw pozycję wyjściową +Home position set to: @1=Pozycja domowa ustawiona na: @1 +You don't have the "home" privilege!=Nie masz uprawnien do zmiany czasu "home"! +Go home=Idź do domu +Set time to day=Ustaw czas na dzień +Time of day set to 6am=Czas ustawiony na 6:00 +You don't have the settime privilege!=Nie masz uprawnien do zmiany czasu "settime"! +Set time to night=Ustaw czas na noc +Time of day set to 9pm=Czas ustawiony na 21:00 +Clear inventory=Wyczyść zapasy +Inventory cleared!=Zapasy zostały wyczyszczone! +Trash:=Smietnik: +Refill:=Uzupelnianie: +Recipe @1 of @2=Recepta @1 z @2 +Usage @1 of @2=Użycie @1 z @2 +No recipes=Brak recepty +No usages=Bez użycia +Result=Wynik +Ingredient=Składnik +Give me:=Daj mi: +All=Wszystko +White=Bialy +Yellow=Zolty +Red=Czerwony +Green=Zielony +Blue=Niebieski +Waypoints=Punkty orientacyjne +Select Waypoint #@1=Wybierz punkt #@1 +Waypoint @1=Punkty orientacyjne @1 +Set waypoint to current location=Ustaw punkt orientacyjny na biezacej pozycji +invisible=niewidzialny +visible=widomy +Make waypoint @1=Robić punkt @1 +@1 display of waypoint coordinates=@1 koordynatow punktu +Change color of waypoint display=Zmien kolor punktu +Edit waypoint name=Edytuj nazwe punktu +Waypoint active=Punkt wlaczony +Waypoint inactive=Punkt wylaczony +Finish editing=Zakoncz edycje +World position=Pozycja +Name=Nazwa +HUD text color=Kolor tekstu HUD diff --git a/unified_inventory/locale/unified_inventory.pt.tr b/unified_inventory/locale/unified_inventory.pt.tr new file mode 100644 index 0000000..3b0b902 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.pt.tr @@ -0,0 +1,76 @@ +# textdomain: unified_inventory +Crafting=Artesanato +Mixing=Muistura +Cooking=Cozimento +Digging=Escavação +Bags=Bolsas +Bag @1=Bolsa @1 +Small Bag=Bolsa Pequena +Medium Bag=Bolsa Média +Large Bag=Bolsa Grande + and = e +First page=Primeira Página +Back three pages=Voltar 3 Páginas +Back one page=Voltar 1 Página +Forward one page=Avançar 1 Página +Forward three pages=Avançar 3 Páginas +Last page=Ultima Página +Search=Pesquisar +Reset search and display everything=Redefinir pesquisa e exibir tudo +No matching items=Nenhum item correspondente +No matches.=Sem correspondências +Page=Página +@1 of @2=@1 de @2 +Filter=Filtro +Can use the creative inventory=Pode usar o inventário do criativo +Crafting Grid=Grade de Artesanato +Crafting Guide=Guia de Artesanato +Set home position=Definir posição de casa +Home position set to: @1=Posição inicial definida para: @1 +You don't have the "home" privilege!=Você não tem o privilégio de "home"! +Go home=Transportar para Casa +Set time to day=Definir turno para dia +Time of day set to 6am=Hora do dia definida para 06h +You don't have the settime privilege!=Você não tem o privilégio de "settime"! +Set time to night=Definir turno para noite +Time of day set to 9pm=Hora do dia ajustada para 21h +Clear inventory=Limpar Inventário +Inventory cleared!=Inventário Apagado! +Trash:=Lixo: +Refill:=Recarga: +Any item belonging to the @1 group=Qualquer item pertencente ao grupo '@1'. +Any item belonging to the groups @1=Qualquer item pertencente aos grupos '@1'. +Recipe @1 of @2=Receita @1 de @2 +Usage @1 of @2=Utilização @1 de @2 +No recipes=Sem Receita +No usages=Sem Utilização +Result=Resultado +Ingredient=Ingrediente +Show next recipe=Exibir Próxima Receita +Show next usage=Mostrar Próxima Utilização +Show previous recipe=Exibir Receita Anterior +Show previous usage=Exibir Utilização Anterior +Give me:=Gerado: +To craft grid:=Para Grade de Artesanato +All=MAX +White=Branco +Yellow=Amarelo +Red=Vermelho +Green=Verde +Blue=Azul +Waypoints=Apontador de Direção +Select Waypoint #@1=Seleção de Apontador de Direção #@1 +Waypoint @1=Apontador de Direção @1 +Set waypoint to current location=Configurar localização atual do Apontador de Direção +invisible=invisível +visible=visível +Make waypoint @1=Fazer Apontador de Direção @1 +@1 display of waypoint coordinates=@1 exibição de coordenadas de Fazer Apontador de Direção +Change color of waypoint display=Mudar cor exibida do Apontador de Direção +Edit waypoint name=Editar Nome de Apontador de Direção +Waypoint active=Apontador de Direção Ativo +Waypoint inactive=Apontador de Direção Inativo +Finish editing=Edição Finalizada +World position=Posição Mundial +Name=Nome +HUD text color=Cor de HUD diff --git a/unified_inventory/locale/unified_inventory.ru.tr b/unified_inventory/locale/unified_inventory.ru.tr new file mode 100644 index 0000000..f2a2300 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.ru.tr @@ -0,0 +1,78 @@ +# textdomain: unified_inventory +Crafting=Крафт +Mixing=Мешать +Cooking=Варить +Digging=Копать +Bags=Сумки +Bag @1=Сумка @1 +Small Bag=Малая сумка +Medium Bag=Средняя сумка +Large Bag=Большая сумка + and = и +First page=Первая страница +Back three pages=3 страницы назад +Back one page=1 страницу назад +Forward one page=1 страницу вперёд +Forward three pages=3 страницы вперёд +Last page=Последняя страница +Search=Поиск +Reset search and display everything=Сброс поиска, показать всё +No matching items=Нет подходящих элементов +No matches.=Ничего не найдено +Page=Страница +@1 of @2=@1 из @2 +Filter=Фильтр +Can use the creative inventory=Можно использовать инвентарь творческого режима +Crafting Grid=Решетка крафта +Crafting Guide=Книга рецептов +Set home position=Установить позицию дома +Home position set to: @1=Дом теперь расположен по коодинатам: @1 +You don't have the "home" privilege!=У вас нет привилегии "home"! +Go home=Отправиться домой +Set time to day=День +Time of day set to 6am=Установлено время 6 утра +You don't have the settime privilege!=Вам не разрешено устанавливать время! (нет привилегии "settime") +Set time to night=Ночь +Time of day set to 9pm=Установлено время 9 вечера +Clear inventory=Очистить инвентарь +Inventory cleared!=Инвентарь очищен! +Trash:=Мусор: +Refill:=Наполнить: +Any item belonging to the @1 group=Любой элемент из группы: @1 +Any item belonging to the groups @1=Любой элемент из группы: @1 +Recipe @1 of @2=Рецепт @1 из @2 +Usage @1 of @2=Вариант @1 of @2 +No recipes=Рецептов нет +No usages=Не используется +Result=Результат +Ingredient=Состав +Show next recipe=Следующий рецепт +Show next usage=Следующее использование +Show previous recipe=Прошлый рецепт +Show previous usage=Прошлая страница +Give me:=Дай мне: +To craft grid:=На решeтку крафта: +All=Все +White=Белый +Yellow=Желтый +Red=Красный +Green=Зелёный +Blue=Синий +Waypoints=Путевые точки +Select Waypoint #@1=Выбрать путевую точку №@1 +Waypoint @1=Путевая точка @1 +Set waypoint to current location=Установить путевую точку по текущей позиции +invisible=невидимой +visible=видимой +Make waypoint @1=Сделать путевую точку @1 +Disable=Выключить +Enable=Включить +@1 display of waypoint coordinates=@1 показ координат путевых точек +Change color of waypoint display=Поменять цвет путевой точки +Edit waypoint name=Переименовать путевую точку +Waypoint active=Путевая точка включена +Waypoint inactive=Путевая точка выключена +Finish editing=Закончить редакцию +World position=Позиция мира +Name=Имя +HUD text color=Цвет текста HUDа diff --git a/unified_inventory/locale/unified_inventory.template.tr b/unified_inventory/locale/unified_inventory.template.tr new file mode 100644 index 0000000..2ea4fca --- /dev/null +++ b/unified_inventory/locale/unified_inventory.template.tr @@ -0,0 +1,100 @@ +# textdomain: unified_inventory + +# waypoints.lua + +White= +Yellow= +Red= +Green= +Blue= +Waypoints= +Select Waypoint #@1= +Waypoint @1= +Set waypoint to current location= +Make waypoint @1= +invisible= +visible= +@1 display of waypoint coordinates= +Disable= +Enable= +Change color of waypoint display= +Edit waypoint name= +Waypoint active= +Waypoint inactive= +Finish editing= +World position= +Name= +HUD text color= + +# group.lua + + and = + +# register.lua + +Can use the creative inventory= +Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally= +Crafting Grid= +Crafting Guide= +Set home position= +Home position set to: @1= +You don't have the \"home\" privilege!= +Go home= +Set time to day= +Set time to night= +Time of day set to 6am= +Time of day set to 9pm= +You don't have the settime privilege!= +Clear inventory= +Inventory cleared!= +This button has been disabled outside= +Crafting= +Trash:= +Refill:= +Any item belonging to the @1 group= +Any item belonging to the groups @1= +Recipe @1 of @2= +Usage @1 of @2= +No recipes= +No usages= +Result= +Ingredient= +Show next recipe= +Show next usage= +Show previous recipe= +Show previous usage= +@1 (@2)= +Give me:= +This recipe is too@nlarge to be displayed.= +To craft grid:= +All= + +# api.lua + +Mixing= +Cooking= +Digging= + +# internal.lua + +First page= +Back three pages= +Back one page= +Forward one page= +Forward three pages= +Last page= +Search= +Reset search and display everything= +No matching items= +No matches.= +Page= +@1 of @2= +Filter= + +# bags.lua + +Bags= +Bag @1= +Small Bag= +Medium Bag= +Large Bag= diff --git a/unified_inventory/locale/unified_inventory.tr.tr b/unified_inventory/locale/unified_inventory.tr.tr new file mode 100644 index 0000000..93246cc --- /dev/null +++ b/unified_inventory/locale/unified_inventory.tr.tr @@ -0,0 +1,69 @@ +# textdomain: unified_inventory +Crafting=Üretim +Mixing=Karıştırma +Cooking=Pişirme +Digging=Kazma +Bags=Çantalarım +Bag @1=@1. Çanta +Small Bag=Küçük Çanta +Medium Bag=Çanta +Large Bag=Büyük Çanta + and = ve +First page=İlk Sayfa +Back three pages=3 Sayfa Gerile +Back one page=Geri +Forward one page=İleri +Forward three pages=3 Sayfa İlerile +Last page=Son Sayfa +Search=Ara +No matching items=Eşleşme yok +No matches.=Eşleşme yok +Page=Sayfa +@1 of @2=@1 dan @2 +Filter=Süzgeç +Can use the creative inventory=Yaratıcı envanteri kullanabilir +Crafting Grid=Üretim tablosu +Crafting Guide=Kılavuz +Set home position=Set ev pozisyon +Home position set to: @1=Yeni eviniz: @1 +You don't have the "home" privilege!="home" yetkiniz yok! +Go home=Eve git +Set time to day=Güne zaman ayarla +Time of day set to 6am=Saat 06:00 olarak ayarlandı +You don't have the settime privilege!="settime" yetkiniz yok! +Set time to night=Geceye zaman ayarla +Time of day set to 9pm=Saat 19:00 olarak ayarlandı +msgid ""=Yaratıcı modu dışında iken bu tuş kullanılamaz. +Inventory cleared!=Envanter temizlendi! +Trash:=Çöp +Refill:=Doldur +Recipe @1 of @2=@1 dan @2 tarifi +Usage @1 of @2=Kullanım @1/@2 +No recipes=Tarifi yok +No usages=Kullanım yok +Result=Çıktı +Ingredient=Bileşen +Give me:=Ver bana: +To craft grid:=Üretim tablosuna kopyala +All=Tümü +White=Beyaz +Yellow=Sarı +Red=Kırmızı +Green=Yeşil +Blue=Mavi +Waypoints=Konum Noktaları +Select Waypoint #@1=#@1 konum noktası seç +Waypoint @1=@1 Konum Noktaları +Set waypoint to current location=Bulunduğun noktayı işaretle +invisible=görünmez +visible=görünür +Make waypoint @1=Yol noktası @1 +@1 display of waypoint coordinates=Yol noktası koordinatlarının görüntülenmesini @1 +Change color of waypoint display=Konum Gösterge Rengi +Edit waypoint name=Konum Noktasını Düzenle +Waypoint active=Konum Etkin +Waypoint inactive=Konum Devredışı +Finish editing=Düzenleme bitti +World position=Dünya konumu +Name=İsim +HUD text color=Metin rengi diff --git a/unified_inventory/locale/unified_inventory.zh_CN.tr b/unified_inventory/locale/unified_inventory.zh_CN.tr new file mode 100644 index 0000000..30e15e3 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.zh_CN.tr @@ -0,0 +1,79 @@ +# textdomain: unified_inventory +# traslation by: IFRFSX(BingFengFSX) +#Email: IFRFSX@Protonmail.com + +Crafting=合成 +Mixing=混合 +Cooking=烹饪 +Digging=挖出 +Bags=背包 +Bag @1=背包@1 +Small Bag=小背包 +Medium Bag=中背包 +Large Bag=大背包 + and = 和 +First page=第一页 +Back three pages=后退三页 +Back one page=后退一页 +Forward one page=前进一页 +Forward three pages=前进三页 +Last page=最后一页 +Search=搜索 +No matching items=没有匹配物品 +No matches.=没有匹配 +Page=页面 +@1 of @2=第@1页,共@2页 +Filter=过滤器 +Can use the creative inventory=可以使用创造背包 +Crafting Grid=合成表 +Crafting Guide=合成指南 +Set home position=设置家的位置 +Home position set to: @1=家的位置设置到: @1 +You don't have the "home" privilege!=你没有“home”权限! +Go home=回家 +Set time to day=设置时间到白天 +Time of day set to 6am=时间设置到早晨6点 +You don't have the settime privilege!=你没有“settime”权限! +Set time to night=设置时间到晚上 +Time of day set to 9pm=时间设置到晚上9点 + +Inventory cleared!=清空背包 +Clear inventory=清空背包 + +Trash:=丢弃: +Refill:=填满: +Recipe @1 of @2=第@1配方,共@2个 +Usage @1 of @2=第@1用法,共@2个 +No recipes=没有配方 +No usages=没有用法 +Result=结果 +Ingredient=原料 +Give me:=给予: +To craft grid:=填充物品到合成表 +All=全部 +White=白 +Yellow=黄 +Red=红 +Green=绿 +Blue=蓝 +Waypoints=航路点 +Select Waypoint #@1=查询航路点 #@1 +Waypoint @1=航路点 @1 +Set waypoint to current location=将航路点设置到当前位置 +invisible=不可见的 +visible=可见的 +Make waypoint @1=设置航路点 @1 +@1 display of waypoint coordinates=显示航路点@1坐标 +Change color of waypoint display=改变航路点显示的颜色 +Edit waypoint name=编辑航路点名称 +Waypoint active=航路点已激活 +Waypoint inactive=航路点未激活 +Finish editing=完成编辑 +World position=世界位置 +Name=名称 +HUD text color=HUD文本颜色 + +Reset search and display everything=重置搜索并显示所有物品 + +Any item belonging to the @1 group=属于@1组的任何项目 +Any item belonging to the groups @1=属于组@1的任何项目 diff --git a/unified_inventory/locale/unified_inventory.zh_TW.tr b/unified_inventory/locale/unified_inventory.zh_TW.tr new file mode 100644 index 0000000..3e8d1a1 --- /dev/null +++ b/unified_inventory/locale/unified_inventory.zh_TW.tr @@ -0,0 +1,79 @@ +# textdomain: unified_inventory +# traslation by: IFRFSX(BingFengFSX) +#Email: IFRFSX@Protonmail.com + +Crafting=合成 +Mixing=混合 +Cooking=烹飪 +Digging=挖出 +Bags=揹包 +Bag @1=揹包@1 +Small Bag=小揹包 +Medium Bag=中揹包 +Large Bag=大揹包 + and = 和 +First page=第一頁 +Back three pages=後退三頁 +Back one page=後退一頁 +Forward one page=前進一頁 +Forward three pages=前進三頁 +Last page=最後一頁 +Search=搜索 +No matching items=沒有匹配物品 +No matches.=沒有匹配 +Page=頁面 +@1 of @2=第@1頁,共@2頁 +Filter=過濾器 +Can use the creative inventory=可以使用創造揹包 +Crafting Grid=合成表 +Crafting Guide=合成指南 +Set home position=設置家的位置 +Home position set to: @1=家的位置設置到: @1 +You don't have the "home" privilege!=你沒有“home”權限! +Go home=回家 +Set time to day=設置時間到白天 +Time of day set to 6am=時間設置到早晨6點 +You don't have the settime privilege!=你沒有“settime”權限! +Set time to night=設置時間到晚上 +Time of day set to 9pm=時間設置到晚上9點 + +Inventory cleared!=清空揹包 +Clear inventory=清空揹包 + +Trash:=丟棄: +Refill:=填滿: +Recipe @1 of @2=第@1配方,共@2個 +Usage @1 of @2=第@1用法,共@2個 +No recipes=沒有配方 +No usages=沒有用法 +Result=結果 +Ingredient=原料 +Give me:=給予: +To craft grid:=填充物品到合成表 +All=全部 +White=白 +Yellow=黃 +Red=紅 +Green=綠 +Blue=藍 +Waypoints=航路點 +Select Waypoint #@1=查詢航路點 #@1 +Waypoint @1=航路點 @1 +Set waypoint to current location=將航路點設置到當前位置 +invisible=不可見的 +visible=可見的 +Make waypoint @1=設置航路點 @1 +@1 display of waypoint coordinates=顯示航路點@1座標 +Change color of waypoint display=改變航路點顯示的顏色 +Edit waypoint name=編輯航路點名稱 +Waypoint active=航路點已激活 +Waypoint inactive=航路點未激活 +Finish editing=完成編輯 +World position=世界位置 +Name=名稱 +HUD text color=HUD文本顏色 + +Reset search and display everything=重置搜索並顯示所有物品 + +Any item belonging to the @1 group=屬於@1組的任何項目 +Any item belonging to the groups @1=屬於組@1的任何項目 diff --git a/unified_inventory/match_craft.lua b/unified_inventory/match_craft.lua new file mode 100644 index 0000000..2dd40b0 --- /dev/null +++ b/unified_inventory/match_craft.lua @@ -0,0 +1,409 @@ +-- match_craft.lua +-- Find and automatically move inventory items to the crafting grid +-- according to the recipe. + +--[[ +Retrieve items from inventory lists and calculate their total count. +Return a table of "item name" - "total count" pairs. + +Arguments: + inv: minetest inventory reference + lists: names of inventory lists to use + +Example usage: + -- Count items in "main" and "craft" lists of player inventory + unified_inventory.count_items(player_inv_ref, {"main", "craft"}) + +Example output: + { + ["default:pine_wood"] = 2, + ["default:acacia_wood"] = 4, + ["default:chest"] = 3, + ["default:axe_diamond"] = 2, -- unstackable item are counted too + ["wool:white"] = 6 + } +]]-- +function unified_inventory.count_items(inv, lists) + local counts = {} + + for i = 1, #lists do + local name = lists[i] + local size = inv:get_size(name) + local list = inv:get_list(name) + + for j = 1, size do + local stack = list[j] + + if not stack:is_empty() then + local item = stack:get_name() + local count = stack:get_count() + + counts[item] = (counts[item] or 0) + count + end + end + end + + return counts +end + +--[[ +Retrieve craft recipe items and their positions in the crafting grid. +Return a table of "craft item name" - "set of positions" pairs. + +Note that if craft width is not 3 then positions are recalculated as +if items were placed on a 3x3 grid. Also note that craft can contain +groups of items with "group:" prefix. + +Arguments: + craft: minetest craft recipe + +Example output: + -- Bed recipe + { + ["wool:white"] = {[1] = true, [2] = true, [3] = true} + ["group:wood"] = {[4] = true, [5] = true, [6] = true} + } +--]] +function unified_inventory.count_craft_positions(craft) + local positions = {} + local craft_items = craft.items + local craft_type = unified_inventory.registered_craft_types[craft.type] + or unified_inventory.craft_type_defaults(craft.type, {}) + local display_width = craft_type.dynamic_display_size + and craft_type.dynamic_display_size(craft).width + or craft_type.width + local craft_width = craft_type.get_shaped_craft_width + and craft_type.get_shaped_craft_width(craft) + or display_width + local i = 0 + + for y = 1, 3 do + for x = 1, craft_width do + i = i + 1 + local item = craft_items[i] + + if item ~= nil then + local pos = 3 * (y - 1) + x + local set = positions[item] + + if set ~= nil then + set[pos] = true + else + positions[item] = {[pos] = true} + end + end + end + end + + return positions +end + +--[[ +For every craft item find all matching inventory items. +- If craft item is a group then find all inventory items that matches + this group. +- If craft item is not a group (regular item) then find only this item. + +If inventory doesn't contain needed item then found set is empty for +this item. + +Return a table of "craft item name" - "set of matching inventory items" +pairs. + +Arguments: + inv_items: table with items names as keys + craft_items: table with items names or groups as keys + +Example output: + { + ["group:wood"] = { + ["default:pine_wood"] = true, + ["default:acacia_wood"] = true + }, + ["wool:white"] = { + ["wool:white"] = true + } + } +--]] +function unified_inventory.find_usable_items(inv_items, craft_items) + local get_group = minetest.get_item_group + local result = {} + + for craft_item in pairs(craft_items) do + local group = craft_item:match("^group:(.+)") + local found = {} + + if group ~= nil then + for inv_item in pairs(inv_items) do + if get_group(inv_item, group) > 0 then + found[inv_item] = true + end + end + else + if inv_items[craft_item] ~= nil then + found[craft_item] = true + end + end + + result[craft_item] = found + end + + return result +end + +--[[ +Match inventory items with craft grid positions. +For every position select the matching inventory item with maximum +(total_count / (times_matched + 1)) value. + +If for some position matching item cannot be found or match count is 0 +then return nil. + +Return a table of "matched item name" - "set of craft positions" pairs +and overall match count. + +Arguments: + inv_counts: table of inventory items counts from "count_items" + craft_positions: table of craft positions from "count_craft_positions" + +Example output: + match_table = { + ["wool:white"] = {[1] = true, [2] = true, [3] = true} + ["default:acacia_wood"] = {[4] = true, [6] = true} + ["default:pine_wood"] = {[5] = true} + } + match_count = 2 +--]] +function unified_inventory.match_items(inv_counts, craft_positions) + local usable = unified_inventory.find_usable_items(inv_counts, craft_positions) + local match_table = {} + local match_count + local matches = {} + + for craft_item, pos_set in pairs(craft_positions) do + local use_set = usable[craft_item] + + for pos in pairs(pos_set) do + local pos_item + local pos_count + + for use_item in pairs(use_set) do + local count = inv_counts[use_item] + local times_matched = matches[use_item] or 0 + local new_pos_count = math.floor(count / (times_matched + 1)) + + if pos_count == nil or pos_count < new_pos_count then + pos_item = use_item + pos_count = new_pos_count + end + end + + if pos_item == nil or pos_count == 0 then + return nil + end + + local set = match_table[pos_item] + + if set ~= nil then + set[pos] = true + else + match_table[pos_item] = {[pos] = true} + end + + matches[pos_item] = (matches[pos_item] or 0) + 1 + end + end + + for match_item, times_matched in pairs(matches) do + local count = inv_counts[match_item] + local item_count = math.floor(count / times_matched) + + if match_count == nil or item_count < match_count then + match_count = item_count + end + end + + return match_table, match_count +end + +--[[ +Remove item from inventory lists. +Return stack of actually removed items. + +This function replicates the inv:remove_item function but can accept +multiple lists. + +Arguments: + inv: minetest inventory reference + lists: names of inventory lists + stack: minetest item stack +--]] +function unified_inventory.remove_item(inv, lists, stack) + local removed = ItemStack(nil) + local leftover = ItemStack(stack) + + for i = 1, #lists do + if leftover:is_empty() then + break + end + + local cur_removed = inv:remove_item(lists[i], leftover) + removed:add_item(cur_removed) + leftover:take_item(cur_removed:get_count()) + end + + return removed +end + +--[[ +Add item to inventory lists. +Return leftover stack. + +This function replicates the inv:add_item function but can accept +multiple lists. + +Arguments: + inv: minetest inventory reference + lists: names of inventory lists + stack: minetest item stack +--]] +function unified_inventory.add_item(inv, lists, stack) + local leftover = ItemStack(stack) + + for i = 1, #lists do + if leftover:is_empty() then + break + end + + leftover = inv:add_item(lists[i], leftover) + end + + return leftover +end + +--[[ +Move items from source list to destination list if possible. +Skip positions specified in exclude set. + +Arguments: + inv: minetest inventory reference + src_list: name of source list + dst_list: name of destination list + exclude: set of positions to skip +--]] +function unified_inventory.swap_items(inv, src_list, dst_list, exclude) + local size = inv:get_size(src_list) + local empty = ItemStack(nil) + + for i = 1, size do + if exclude == nil or exclude[i] == nil then + local stack = inv:get_stack(src_list, i) + + if not stack:is_empty() then + inv:set_stack(src_list, i, empty) + local leftover = inv:add_item(dst_list, stack) + + if not leftover:is_empty() then + inv:set_stack(src_list, i, leftover) + end + end + end + end +end + +--[[ +Move matched items to the destination list. + +If destination list position is already occupied with some other item +then function tries to (in that order): +1. Move it to the source list +2. Move it to some other unused position in destination list itself +3. Drop it to the ground if nothing else is possible. + +Arguments: + player: minetest player object + src_list: name of source list + dst_list: name of destination list + match_table: table of matched items + amount: amount of items per every position +--]] +function unified_inventory.move_match(player, src_list, dst_list, match_table, amount) + local inv = player:get_inventory() + local item_drop = minetest.item_drop + local src_dst_list = {src_list, dst_list} + local dst_src_list = {dst_list, src_list} + + local needed = {} + local moved = {} + + -- Remove stacks needed for craft + for item, pos_set in pairs(match_table) do + local stack = ItemStack(item) + local stack_max = stack:get_stack_max() + local bounded_amount = math.min(stack_max, amount) + stack:set_count(bounded_amount) + + for pos in pairs(pos_set) do + needed[pos] = unified_inventory.remove_item(inv, dst_src_list, stack) + end + end + + -- Add already removed stacks + for pos, stack in pairs(needed) do + local occupied = inv:get_stack(dst_list, pos) + inv:set_stack(dst_list, pos, stack) + + if not occupied:is_empty() then + local leftover = unified_inventory.add_item(inv, src_dst_list, occupied) + + if not leftover:is_empty() then + inv:set_stack(dst_list, pos, leftover) + local oversize = unified_inventory.add_item(inv, src_dst_list, stack) + + if not oversize:is_empty() then + item_drop(oversize, player, player:get_pos()) + end + end + end + + moved[pos] = true + end + + -- Swap items from unused positions to src (moved positions excluded) + unified_inventory.swap_items(inv, dst_list, src_list, moved) +end + +--[[ +Find craft match and move matched items to the destination list. + +If match cannot be found or match count is smaller than the desired +amount then do nothing. + +If amount passed is -1 then amount is defined by match count itself. +This is used to indicate "craft All" case. + +Arguments: + player: minetest player object + src_list: name of source list + dst_list: name of destination list + craft: minetest craft recipe + amount: desired amount of output items +--]] +function unified_inventory.craftguide_match_craft(player, src_list, dst_list, craft, amount) + local inv = player:get_inventory() + local src_dst_list = {src_list, dst_list} + + local counts = unified_inventory.count_items(inv, src_dst_list) + local positions = unified_inventory.count_craft_positions(craft) + local match_table, match_count = unified_inventory.match_items(counts, positions) + + if match_table == nil or match_count < amount then + return + end + + if amount == -1 then + amount = match_count + end + + unified_inventory.move_match(player, src_list, dst_list, match_table, amount) +end diff --git a/unified_inventory/mod.conf b/unified_inventory/mod.conf index 26a8af6..89be528 100644 --- a/unified_inventory/mod.conf +++ b/unified_inventory/mod.conf @@ -1 +1,8 @@ name = unified_inventory +depends = default +optional_depends = creative, sfinv, datastorage, farming +description = """ +Unified Inventory replaces the default survival and creative inventory. +It adds a nicer interface and a number of features, such as a crafting guide. +""" +min_minetest_version = 5.4.0 diff --git a/unified_inventory/register.lua b/unified_inventory/register.lua index dd2b3cc..3cb5f59 100644 --- a/unified_inventory/register.lua +++ b/unified_inventory/register.lua @@ -1,5 +1,7 @@ -local S = unified_inventory.gettext +local S = minetest.get_translator("unified_inventory") +local NS = function(s) return s end local F = minetest.formspec_escape +local ui = unified_inventory minetest.register_privilege("creative", { description = S("Can use the creative inventory"), @@ -11,10 +13,9 @@ minetest.register_privilege("ui_full", { give_to_singleplayer = false, }) - local trash = minetest.create_detached_inventory("trash", { --allow_put = function(inv, listname, index, stack, player) - -- if unified_inventory.is_creative(player:get_player_name()) then + -- if ui.is_creative(player:get_player_name()) then -- return stack:get_count() -- else -- return 0 @@ -28,19 +29,19 @@ local trash = minetest.create_detached_inventory("trash", { }) trash:set_size("main", 1) -unified_inventory.register_button("craft", { +ui.register_button("craft", { type = "image", image = "ui_craft_icon.png", tooltip = S("Crafting Grid") }) -unified_inventory.register_button("craftguide", { +ui.register_button("craftguide", { type = "image", image = "ui_craftguide_icon.png", tooltip = S("Crafting Guide") }) -unified_inventory.register_button("home_gui_set", { +ui.register_button("home_gui_set", { type = "image", image = "ui_sethome_icon.png", tooltip = S("Set home position"), @@ -48,18 +49,18 @@ unified_inventory.register_button("home_gui_set", { action = function(player) local player_name = player:get_player_name() if minetest.check_player_privs(player_name, {home=true}) then - unified_inventory.set_home(player, player:getpos()) - local home = unified_inventory.home_pos[player_name] + ui.set_home(player, player:get_pos()) + local home = ui.home_pos[player_name] if home ~= nil then minetest.sound_play("dingdong", {to_player=player_name, gain = 1.0}) minetest.chat_send_player(player_name, - S("Home position set to: %s"):format(minetest.pos_to_string(home))) + S("Home position set to: @1", minetest.pos_to_string(home))) end else minetest.chat_send_player(player_name, S("You don't have the \"home\" privilege!")) - unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) + ui.set_inventory_formspec(player, ui.current_page[player_name]) end end, condition = function(player) @@ -67,7 +68,7 @@ unified_inventory.register_button("home_gui_set", { end, }) -unified_inventory.register_button("home_gui_go", { +ui.register_button("home_gui_go", { type = "image", image = "ui_gohome_icon.png", tooltip = S("Go home"), @@ -75,13 +76,13 @@ unified_inventory.register_button("home_gui_go", { action = function(player) local player_name = player:get_player_name() if minetest.check_player_privs(player_name, {home=true}) then - minetest.sound_play("teleport", - {to_player=player:get_player_name(), gain = 1.0}) - unified_inventory.go_home(player) + if ui.go_home(player) then + minetest.sound_play("teleport", {to_player = player_name}) + end else minetest.chat_send_player(player_name, S("You don't have the \"home\" privilege!")) - unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) + ui.set_inventory_formspec(player, ui.current_page[player_name]) end end, condition = function(player) @@ -89,7 +90,7 @@ unified_inventory.register_button("home_gui_go", { end, }) -unified_inventory.register_button("misc_set_day", { +ui.register_button("misc_set_day", { type = "image", image = "ui_sun_icon.png", tooltip = S("Set time to day"), @@ -105,7 +106,7 @@ unified_inventory.register_button("misc_set_day", { else minetest.chat_send_player(player_name, S("You don't have the settime privilege!")) - unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) + ui.set_inventory_formspec(player, ui.current_page[player_name]) end end, condition = function(player) @@ -113,7 +114,7 @@ unified_inventory.register_button("misc_set_day", { end, }) -unified_inventory.register_button("misc_set_night", { +ui.register_button("misc_set_night", { type = "image", image = "ui_moon_icon.png", tooltip = S("Set time to night"), @@ -129,7 +130,7 @@ unified_inventory.register_button("misc_set_night", { else minetest.chat_send_player(player_name, S("You don't have the settime privilege!")) - unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) + ui.set_inventory_formspec(player, ui.current_page[player_name]) end end, condition = function(player) @@ -137,19 +138,19 @@ unified_inventory.register_button("misc_set_night", { end, }) -unified_inventory.register_button("clear_inv", { +ui.register_button("clear_inv", { type = "image", image = "ui_trash_icon.png", tooltip = S("Clear inventory"), action = function(player) local player_name = player:get_player_name() - if not unified_inventory.is_creative(player_name) then + if not ui.is_creative(player_name) then minetest.chat_send_player(player_name, S("This button has been disabled outside" .." of creative mode to prevent" .." accidental inventory trashing." .."\nUse the trash slot instead.")) - unified_inventory.set_inventory_formspec(player, unified_inventory.current_page[player_name]) + ui.set_inventory_formspec(player, ui.current_page[player_name]) return end player:get_inventory():set_list("main", {}) @@ -158,35 +159,42 @@ unified_inventory.register_button("clear_inv", { {to_player=player_name, gain = 1.0}) end, condition = function(player) - return unified_inventory.is_creative(player:get_player_name()) + return ui.is_creative(player:get_player_name()) end, }) -unified_inventory.register_page("craft", { +ui.register_page("craft", { get_formspec = function(player, perplayer_formspec) - local formspecy = perplayer_formspec.formspec_y - local formheadery = perplayer_formspec.form_header_y + local formheaderx = perplayer_formspec.form_header_x + local formheadery = perplayer_formspec.form_header_y + local craftx = perplayer_formspec.craft_x + local crafty = perplayer_formspec.craft_y local player_name = player:get_player_name() - local formspec = "background[2,"..formspecy..";6,3;ui_crafting_form.png]" - formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]" - formspec = formspec.."label[0,"..formheadery..";" ..F(S("Crafting")).."]" - formspec = formspec.."listcolors[#00000000;#00000000]" - formspec = formspec.."list[current_player;craftpreview;6,"..formspecy..";1,1;]" - formspec = formspec.."list[current_player;craft;2,"..formspecy..";3,3;]" - if unified_inventory.trash_enabled or unified_inventory.is_creative(player_name) or minetest.get_player_privs(player_name).give then - formspec = formspec.."label[7,"..(formspecy + 1.5)..";" .. F(S("Trash:")) .. "]" - formspec = formspec.."background[7,"..(formspecy + 2)..";1,1;ui_single_slot.png]" - formspec = formspec.."list[detached:trash;main;7,"..(formspecy + 2)..";1,1;]" + local formspec = { + perplayer_formspec.standard_inv_bg, + perplayer_formspec.craft_grid, + "label["..formheaderx..","..formheadery..";" ..F(S("Crafting")).."]", + "listcolors[#00000000;#00000000]", + "listring[current_name;craft]", + "listring[current_player;main]" + } + local n=#formspec+1 + + if ui.trash_enabled or ui.is_creative(player_name) or minetest.get_player_privs(player_name).give then + formspec[n] = string.format("label[%f,%f;%s]", craftx + 6.45, crafty + 2.4, F(S("Trash:"))) + formspec[n+1] = ui.make_trash_slot(craftx + 6.25, crafty + 2.5) + n=n + 2 end - formspec = formspec.."listring[current_name;craft]" - formspec = formspec.."listring[current_player;main]" - if unified_inventory.is_creative(player_name) then - formspec = formspec.."label[0,"..(formspecy + 1.5)..";" .. F(S("Refill:")) .. "]" - formspec = formspec.."list[detached:"..F(player_name).."refill;main;0,"..(formspecy +2)..";1,1;]" + + if ui.is_creative(player_name) then + formspec[n] = ui.single_slot(craftx - 2.5, crafty + 2.5) + formspec[n+1] = string.format("label[%f,%f;%s]", craftx - 2.3, crafty + 2.4,F(S("Refill:"))) + formspec[n+2] = string.format("list[detached:%srefill;main;%f,%f;1,1;]", + F(player_name), craftx - 2.5 + ui.list_img_offset, crafty + 2.5 + ui.list_img_offset) end - return {formspec=formspec} + return {formspec=table.concat(formspec)} end, }) @@ -205,23 +213,23 @@ local function stack_image_button(x, y, w, h, buttonname_prefix, item) local selectitem = name if name:sub(1, 6) == "group:" then local group_name = name:sub(7) - local group_item = unified_inventory.get_group_item(group_name) + local group_item = ui.get_group_item(group_name) show_is_group = not group_item.sole displayitem = group_item.item or "unknown" selectitem = group_item.sole and displayitem or name end local label = show_is_group and "G" or "" - local buttonname = F(buttonname_prefix..unified_inventory.mangle_for_formspec(selectitem)) + local buttonname = F(buttonname_prefix..ui.mangle_for_formspec(selectitem)) local button = string.format("item_image_button[%f,%f;%f,%f;%s;%s;%s]", x, y, w, h, F(displayitem), buttonname, label) if show_is_group then - local groupstring, andcount = unified_inventory.extract_groupnames(name) + local groupstring, andcount = ui.extract_groupnames(name) local grouptip if andcount == 1 then - grouptip = string.format(S("Any item belonging to the %s group"), groupstring) + grouptip = S("Any item belonging to the @1 group", groupstring) elseif andcount > 1 then - grouptip = string.format(S("Any item belonging to the groups %s"), groupstring) + grouptip = S("Any item belonging to the groups @1", groupstring) end grouptip = F(grouptip) if andcount >= 1 then @@ -232,8 +240,8 @@ local function stack_image_button(x, y, w, h, buttonname_prefix, item) end local recipe_text = { - recipe = S("Recipe %d of %d"), - usage = S("Usage %d of %d"), + recipe = NS("Recipe @1 of @2"), + usage = NS("Usage @1 of @2"), } local no_recipe_text = { recipe = S("No recipes"), @@ -256,83 +264,112 @@ local other_dir = { usage = "recipe", } -unified_inventory.register_page("craftguide", { +ui.register_page("craftguide", { get_formspec = function(player, perplayer_formspec) - local formspecy = perplayer_formspec.formspec_y - local formheadery = perplayer_formspec.form_header_y - local craftresultx = perplayer_formspec.craft_result_x - local craftresulty = perplayer_formspec.craft_result_y + local craftguidex = perplayer_formspec.craft_guide_x + local craftguidey = perplayer_formspec.craft_guide_y + local craftguidearrowx = perplayer_formspec.craft_guide_arrow_x + local craftguideresultx = perplayer_formspec.craft_guide_result_x + local formheaderx = perplayer_formspec.form_header_x + local formheadery = perplayer_formspec.form_header_y + local give_x = perplayer_formspec.give_btn_x local player_name = player:get_player_name() local player_privs = minetest.get_player_privs(player_name) - local formspec = "" - formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]" - formspec = formspec.."label[0,"..formheadery..";" .. F(S("Crafting Guide")) .. "]" - formspec = formspec.."listcolors[#00000000;#00000000]" - local item_name = unified_inventory.current_item[player_name] - if not item_name then return {formspec=formspec} end + + local formspec = { + perplayer_formspec.standard_inv_bg, + "label["..formheaderx..","..formheadery..";" .. F(S("Crafting Guide")) .. "]", + "listcolors[#00000000;#00000000]" + } + + local item_name = ui.current_item[player_name] + if not item_name then + return { formspec = table.concat(formspec) } + end + + local n = 4 + local item_name_shown - if minetest.registered_items[item_name] and minetest.registered_items[item_name].description then - item_name_shown = string.format(S("%s (%s)"), minetest.registered_items[item_name].description, item_name) + if minetest.registered_items[item_name] + and minetest.registered_items[item_name].description then + item_name_shown = S("@1 (@2)", + minetest.registered_items[item_name].description, item_name) else item_name_shown = item_name end - local dir = unified_inventory.current_craft_direction[player_name] - local rdir - if dir == "recipe" then rdir = "usage" end - if dir == "usage" then rdir = "recipe" end - local crafts = unified_inventory.crafts_for[dir][item_name] - local alternate = unified_inventory.alternate[player_name] + local dir = ui.current_craft_direction[player_name] + local rdir = dir == "recipe" and "usage" or "recipe" + + local crafts = ui.crafts_for[dir][item_name] + local alternate = ui.alternate[player_name] local alternates, craft - if crafts ~= nil and #crafts > 0 then + if crafts and #crafts > 0 then alternates = #crafts craft = crafts[alternate] end - local has_creative = player_privs.give or player_privs.creative or - minetest.settings:get_bool("creative_mode") + local has_give = player_privs.give or ui.is_creative(player_name) - formspec = formspec.."background[0.5,"..(formspecy + 0.2)..";8,3;ui_craftguide_form.png]" - formspec = formspec.."textarea["..craftresultx..","..craftresulty - ..";10,1;;"..F(role_text[dir])..": "..item_name_shown..";]" - formspec = formspec..stack_image_button(0, formspecy, 1.1, 1.1, "item_button_" - .. rdir .. "_", ItemStack(item_name)) + formspec[n] = string.format("image[%f,%f;%f,%f;ui_crafting_arrow.png]", + craftguidearrowx, craftguidey, ui.imgscale, ui.imgscale) + + formspec[n+1] = string.format("textarea[%f,%f;10,1;;%s: %s;]", + perplayer_formspec.craft_guide_resultstr_x, perplayer_formspec.craft_guide_resultstr_y, + F(role_text[dir]), item_name_shown) + n = n + 2 + + local giveme_form = table.concat({ + "label[".. (give_x+0.1)..",".. (craftguidey + 2.7) .. ";" .. F(S("Give me:")) .. "]", + "button["..(give_x)..",".. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_1;1]", + "button["..(give_x+0.8)..",".. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_10;10]", + "button["..(give_x+1.6)..",".. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_99;99]" + }) if not craft then - formspec = formspec.."label[5.5,"..(formspecy + 2.35)..";" - ..F(no_recipe_text[dir]).."]" - local no_pos = dir == "recipe" and 4.5 or 6.5 - local item_pos = dir == "recipe" and 6.5 or 4.5 - formspec = formspec.."image["..no_pos..","..formspecy..";1.1,1.1;ui_no.png]" - formspec = formspec..stack_image_button(item_pos, formspecy, 1.1, 1.1, "item_button_" - ..other_dir[dir].."_", ItemStack(item_name)) - if has_creative then - formspec = formspec.."label[0,"..(formspecy + 2.10)..";" .. F(S("Give me:")) .. "]" - .."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]" - .."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]" - .."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]" + -- No craft recipes available for this item. + formspec[n] = string.format("label[%f,%f;%s]", craftguidex+2.5, craftguidey+1.5, F(no_recipe_text[dir])) + local no_pos = dir == "recipe" and (craftguidex+2.5) or craftguideresultx + local item_pos = dir == "recipe" and craftguideresultx or (craftguidex+2.5) + formspec[n+1] = "image["..no_pos..","..craftguidey..";1.2,1.2;ui_no.png]" + formspec[n+2] = stack_image_button(item_pos, craftguidey, 1.2, 1.2, + "item_button_" .. other_dir[dir] .. "_", ItemStack(item_name)) + if has_give then + formspec[n+3] = giveme_form end - return {formspec = formspec} + return { formspec = table.concat(formspec) } + else + formspec[n] = stack_image_button(craftguideresultx, craftguidey, 1.2, 1.2, + "item_button_" .. rdir .. "_", ItemStack(craft.output)) + n = n + 1 end - local craft_type = unified_inventory.registered_craft_types[craft.type] or - unified_inventory.craft_type_defaults(craft.type, {}) + local craft_type = ui.registered_craft_types[craft.type] or + ui.craft_type_defaults(craft.type, {}) if craft_type.icon then - formspec = formspec..string.format(" image[%f,%f;%f,%f;%s]",5.7,(formspecy + 0.05),0.5,0.5,craft_type.icon) + formspec[n] = string.format("image[%f,%f;%f,%f;%s]", + craftguidearrowx+0.35, craftguidey, 0.5, 0.5, craft_type.icon) + n = n + 1 end - formspec = formspec.."label[5.5,"..(formspecy + 1)..";" .. F(craft_type.description).."]" - formspec = formspec..stack_image_button(6.5, formspecy, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output)) - local display_size = craft_type.dynamic_display_size and craft_type.dynamic_display_size(craft) or { width = craft_type.width, height = craft_type.height } - local craft_width = craft_type.get_shaped_craft_width and craft_type.get_shaped_craft_width(craft) or display_size.width + formspec[n] = string.format("label[%f,%f;%s]", craftguidearrowx + 0.15, craftguidey + 1.4, F(craft_type.description)) + n = n + 1 + + local display_size = craft_type.dynamic_display_size + and craft_type.dynamic_display_size(craft) + or { width = craft_type.width, height = craft_type.height } + local craft_width = craft_type.get_shaped_craft_width + and craft_type.get_shaped_craft_width(craft) + or display_size.width -- This keeps recipes aligned to the right, -- so that they're close to the arrow. - local xoffset = 5.5 + local xoffset = craftguidex+3.75 + local bspc = 1.25 -- Offset factor for crafting grids with side length > 4 local of = (3/math.max(3, math.max(display_size.width, display_size.height))) local od = 0 - -- Minimum grid size at which size optimazation measures kick in + -- Minimum grid size at which size optimization measures kick in local mini_craft_size = 6 if display_size.width >= mini_craft_size then od = math.max(1, display_size.width - 2) @@ -341,12 +378,12 @@ unified_inventory.register_page("craftguide", { -- Size modifier factor local sf = math.min(1, of * (1.05 + 0.05*od)) -- Button size - local bsize_h = 1.1 * sf - local bsize_w = bsize_h - if display_size.width >= mini_craft_size then - bsize_w = 1.175 * sf + local bsize = 1.2 * sf + + if display_size.width >= mini_craft_size then -- it's not a normal 3x3 grid + bsize = 0.8 * sf end - if (bsize_h > 0.35 and display_size.width) then + if (bsize > 0.35 and display_size.width) then for y = 1, display_size.height do for x = 1, display_size.width do local item @@ -356,67 +393,76 @@ unified_inventory.register_page("craftguide", { -- Flipped x, used to build formspec buttons from right to left local fx = display_size.width - (x-1) -- x offset, y offset - local xof = (fx-1) * of + of - local yof = (y-1) * of + 1 + local xof = ((fx-1) * of + of) * bspc + local yof = ((y-1) * of + 1) * bspc if item then - formspec = formspec..stack_image_button( - xoffset - xof, formspecy - 1 + yof, bsize_w, bsize_h, + formspec[n] = stack_image_button( + xoffset - xof, craftguidey - 1.25 + yof, bsize, bsize, "item_button_recipe_", ItemStack(item)) else -- Fake buttons just to make grid - formspec = formspec.."image_button[" - ..tostring(xoffset - xof)..","..tostring(formspecy - 1 + yof) - ..";"..bsize_w..","..bsize_h..";ui_blank_image.png;;]" + formspec[n] = string.format("image_button[%f,%f;%f,%f;ui_blank_image.png;;]", + xoffset - xof, craftguidey - 1.25 + yof, bsize, bsize) end + n = n + 1 end end else -- Error - formspec = formspec.."label[" - ..tostring(2)..","..tostring(formspecy) - ..";"..F(S("This recipe is too\nlarge to be displayed.")).."]" + formspec[n] = string.format("label[2,%f;%s]", + craftguidey, F(S("This recipe is too@nlarge to be displayed."))) + n = n + 1 end if craft_type.uses_crafting_grid and display_size.width <= 3 then - formspec = formspec.."label[0,"..(formspecy + 0.9)..";" .. F(S("To craft grid:")) .. "]" - .."button[0, "..(formspecy + 1.5)..";0.6,0.5;craftguide_craft_1;1]" - .."button[0.6,"..(formspecy + 1.5)..";0.7,0.5;craftguide_craft_10;10]" - .."button[1.3,"..(formspecy + 1.5)..";0.8,0.5;craftguide_craft_max;" .. F(S("All")) .. "]" + formspec[n] = "label["..(give_x+0.1)..",".. (craftguidey + 1.7) .. ";" .. F(S("To craft grid:")) .. "]" + formspec[n+1] = "button[".. (give_x)..",".. (craftguidey + 1.9) .. ";0.75,0.5;craftguide_craft_1;1]" + formspec[n+2] = "button[".. (give_x+0.8)..",".. (craftguidey + 1.9) .. ";0.75,0.5;craftguide_craft_10;10]" + formspec[n+3] = "button[".. (give_x+1.6)..",".. (craftguidey + 1.9) .. ";0.75,0.5;craftguide_craft_max;" .. F(S("All")) .. "]" + n = n + 4 end - if has_creative then - formspec = formspec.."label[0,"..(formspecy + 2.1)..";" .. F(S("Give me:")) .. "]" - .."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]" - .."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]" - .."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]" + + if has_give then + formspec[n] = giveme_form + n = n + 1 end if alternates and alternates > 1 then - formspec = formspec.."label[5.5,"..(formspecy + 1.6)..";" - ..string.format(F(recipe_text[dir]), alternate, alternates).."]" - .."image_button[5.5,"..(formspecy + 2)..";1,1;ui_left_icon.png;alternate_prev;]" - .."image_button[6.5,"..(formspecy + 2)..";1,1;ui_right_icon.png;alternate;]" - .."tooltip[alternate_prev;"..F(prev_alt_text[dir]).."]" - .."tooltip[alternate;"..F(next_alt_text[dir]).."]" + formspec[n] = string.format("label[%f,%f;%s]", + craftguidex+4, craftguidey + 2.3, F(S(recipe_text[dir], alternate, alternates))) + formspec[n+1] = string.format("image_button[%f,%f;1.1,1.1;ui_left_icon.png;alternate_prev;]", + craftguidearrowx+0.2, craftguidey + 2.6) + formspec[n+2] = string.format("image_button[%f,%f;1.1,1.1;ui_right_icon.png;alternate;]", + craftguidearrowx+1.35, craftguidey + 2.6) + formspec[n+3] = "tooltip[alternate_prev;" .. F(prev_alt_text[dir]) .. "]" + formspec[n+4] = "tooltip[alternate;" .. F(next_alt_text[dir]) .. "]" end - return {formspec = formspec} + + return { formspec = table.concat(formspec) } end, }) local function craftguide_giveme(player, formname, fields) + local player_name = player:get_player_name() + local player_privs = minetest.get_player_privs(player_name) + if not player_privs.give and + not ui.is_creative(player_name) then + minetest.log("action", "[unified_inventory] Denied give action to player " .. + player_name) + return + end + local amount for k, v in pairs(fields) do amount = k:match("craftguide_giveme_(.*)") if amount then break end end - if not amount then return end - amount = tonumber(amount) + amount = tonumber(amount) or 0 if amount == 0 then return end - local player_name = player:get_player_name() - - local output = unified_inventory.current_item[player_name] + local output = ui.current_item[player_name] if (not output) or (output == "") then return end local player_inv = player:get_inventory() @@ -424,80 +470,6 @@ local function craftguide_giveme(player, formname, fields) player_inv:add_item("main", {name = output, count = amount}) end --- tells if an item can be moved and returns an index if so -local function item_fits(player_inv, craft_item, needed_item) - local need_group = string.sub(needed_item, 1, 6) == "group:" - if need_group then - need_group = string.sub(needed_item, 7) - end - if craft_item - and not craft_item:is_empty() then - local ciname = craft_item:get_name() - - -- abort if the item there isn't usable - if ciname ~= needed_item - and not need_group then - return - end - - -- abort if no item fits onto it - if craft_item:get_count() >= craft_item:get_definition().stack_max then - return - end - - -- use the item there if it's in the right group and a group item is needed - if need_group then - if minetest.get_item_group(ciname, need_group) == 0 then - return - end - needed_item = ciname - need_group = false - end - end - - if need_group then - -- search an item of the specific group - for i,item in pairs(player_inv:get_list("main")) do - if not item:is_empty() - and minetest.get_item_group(item:get_name(), need_group) > 0 then - return i - end - end - - -- no index found - return - end - - -- search an item with a the name needed_item - for i,item in pairs(player_inv:get_list("main")) do - if not item:is_empty() - and item:get_name() == needed_item then - return i - end - end - - -- no index found -end - --- modifies the player inventory and returns the changed craft_item if possible -local function move_item(player_inv, craft_item, needed_item) - local stackid = item_fits(player_inv, craft_item, needed_item) - if not stackid then - return - end - local wanted_stack = player_inv:get_stack("main", stackid) - local taken_item = wanted_stack:take_item() - player_inv:set_stack("main", stackid, wanted_stack) - - if not craft_item - or craft_item:is_empty() then - return taken_item - end - - craft_item:add_item(taken_item) - return craft_item -end - local function craftguide_craft(player, formname, fields) local amount for k, v in pairs(fields) do @@ -505,63 +477,34 @@ local function craftguide_craft(player, formname, fields) if amount then break end end if not amount then return end + + amount = tonumber(amount) or -1 -- fallback for "all" + if amount == 0 or amount < -1 or amount > 99 then return end + local player_name = player:get_player_name() - local output = unified_inventory.current_item[player_name] - if (not output) or (output == "") then return end + local output = ui.current_item[player_name] or "" + if output == "" then return end - local player_inv = player:get_inventory() + local crafts = ui.crafts_for[ + ui.current_craft_direction[player_name]][output] or {} + if #crafts == 0 then return end - local crafts = unified_inventory.crafts_for[unified_inventory.current_craft_direction[player_name]][output] - if (not crafts) or (#crafts == 0) then return end - - local alternate = unified_inventory.alternate[player_name] + local alternate = ui.alternate[player_name] local craft = crafts[alternate] if craft.width > 3 then return end - local needed = craft.items + ui.craftguide_match_craft(player, "main", "craft", craft, amount) - local craft_list = player_inv:get_list("craft") - - local width = craft.width - if width == 0 then - -- Shapeless recipe - width = 3 - end - - amount = tonumber(amount) or 99 - --[[ - if amount == "max" then - amount = 99 -- Arbitrary; need better way to do this. - else - amount = tonumber(amount) - end--]] - - for iter = 1, amount do - local index = 1 - for y = 1, 3 do - for x = 1, width do - local needed_item = needed[index] - if needed_item then - local craft_index = ((y - 1) * 3) + x - local craft_item = craft_list[craft_index] - local newitem = move_item(player_inv, craft_item, needed_item) - if newitem then - craft_list[craft_index] = newitem - end - end - index = index + 1 - end - end - end - - player_inv:set_list("craft", craft_list) - - unified_inventory.set_inventory_formspec(player, "craft") + ui.set_inventory_formspec(player, "craft") end minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "" then + return + end + for k, v in pairs(fields) do if k:match("craftguide_craft_") then craftguide_craft(player, formname, fields) diff --git a/unified_inventory/textures/bags_large.png b/unified_inventory/textures/bags_large.png index 6d56299..187021c 100644 Binary files a/unified_inventory/textures/bags_large.png and b/unified_inventory/textures/bags_large.png differ diff --git a/unified_inventory/textures/bags_medium.png b/unified_inventory/textures/bags_medium.png index 59ba11d..d908883 100644 Binary files a/unified_inventory/textures/bags_medium.png and b/unified_inventory/textures/bags_medium.png differ diff --git a/unified_inventory/textures/bags_small.png b/unified_inventory/textures/bags_small.png index d48ffcb..9e4f4f6 100644 Binary files a/unified_inventory/textures/bags_small.png and b/unified_inventory/textures/bags_small.png differ diff --git a/unified_inventory/textures/ui_1_icon.png b/unified_inventory/textures/ui_1_icon.png index f4e85a0..ed4ceb9 100644 Binary files a/unified_inventory/textures/ui_1_icon.png and b/unified_inventory/textures/ui_1_icon.png differ diff --git a/unified_inventory/textures/ui_2_icon.png b/unified_inventory/textures/ui_2_icon.png index 96175a6..f4566d8 100644 Binary files a/unified_inventory/textures/ui_2_icon.png and b/unified_inventory/textures/ui_2_icon.png differ diff --git a/unified_inventory/textures/ui_3_icon.png b/unified_inventory/textures/ui_3_icon.png index 1db2916..ff6ebbb 100644 Binary files a/unified_inventory/textures/ui_3_icon.png and b/unified_inventory/textures/ui_3_icon.png differ diff --git a/unified_inventory/textures/ui_4_icon.png b/unified_inventory/textures/ui_4_icon.png index f344af4..3a12bfd 100644 Binary files a/unified_inventory/textures/ui_4_icon.png and b/unified_inventory/textures/ui_4_icon.png differ diff --git a/unified_inventory/textures/ui_5_icon.png b/unified_inventory/textures/ui_5_icon.png index e5dc4b0..c389152 100644 Binary files a/unified_inventory/textures/ui_5_icon.png and b/unified_inventory/textures/ui_5_icon.png differ diff --git a/unified_inventory/textures/ui_bags_icon.png b/unified_inventory/textures/ui_bags_icon.png index 6d56299..2882a23 100644 Binary files a/unified_inventory/textures/ui_bags_icon.png and b/unified_inventory/textures/ui_bags_icon.png differ diff --git a/unified_inventory/textures/ui_bags_lg_form.png b/unified_inventory/textures/ui_bags_lg_form.png deleted file mode 100644 index 713cacc..0000000 Binary files a/unified_inventory/textures/ui_bags_lg_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_bags_main_form.png b/unified_inventory/textures/ui_bags_main_form.png deleted file mode 100644 index 37450f3..0000000 Binary files a/unified_inventory/textures/ui_bags_main_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_bags_med_form.png b/unified_inventory/textures/ui_bags_med_form.png deleted file mode 100644 index 33e922e..0000000 Binary files a/unified_inventory/textures/ui_bags_med_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_bags_sm_form.png b/unified_inventory/textures/ui_bags_sm_form.png deleted file mode 100644 index b3b66bb..0000000 Binary files a/unified_inventory/textures/ui_bags_sm_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_bags_trash.png b/unified_inventory/textures/ui_bags_trash.png deleted file mode 100644 index 6338999..0000000 Binary files a/unified_inventory/textures/ui_bags_trash.png and /dev/null differ diff --git a/unified_inventory/textures/ui_blank_image.png b/unified_inventory/textures/ui_blank_image.png index a8735b8..83d9d1a 100644 Binary files a/unified_inventory/textures/ui_blank_image.png and b/unified_inventory/textures/ui_blank_image.png differ diff --git a/unified_inventory/textures/ui_blue_icon_background.png b/unified_inventory/textures/ui_blue_icon_background.png index 9434217..2f872a4 100644 Binary files a/unified_inventory/textures/ui_blue_icon_background.png and b/unified_inventory/textures/ui_blue_icon_background.png differ diff --git a/unified_inventory/textures/ui_circular_arrows_icon.png b/unified_inventory/textures/ui_circular_arrows_icon.png index d687bbf..c6846e6 100644 Binary files a/unified_inventory/textures/ui_circular_arrows_icon.png and b/unified_inventory/textures/ui_circular_arrows_icon.png differ diff --git a/unified_inventory/textures/ui_craft_icon.png b/unified_inventory/textures/ui_craft_icon.png index fbe4cc7..a2283e3 100644 Binary files a/unified_inventory/textures/ui_craft_icon.png and b/unified_inventory/textures/ui_craft_icon.png differ diff --git a/unified_inventory/textures/ui_craftgrid_icon.png b/unified_inventory/textures/ui_craftgrid_icon.png index 6731327..5111f1e 100644 Binary files a/unified_inventory/textures/ui_craftgrid_icon.png and b/unified_inventory/textures/ui_craftgrid_icon.png differ diff --git a/unified_inventory/textures/ui_craftguide_form.png b/unified_inventory/textures/ui_craftguide_form.png deleted file mode 100644 index 3cd8643..0000000 Binary files a/unified_inventory/textures/ui_craftguide_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_craftguide_icon.png b/unified_inventory/textures/ui_craftguide_icon.png index 5866b7b..d6c89e6 100644 Binary files a/unified_inventory/textures/ui_craftguide_icon.png and b/unified_inventory/textures/ui_craftguide_icon.png differ diff --git a/unified_inventory/textures/ui_crafting_arrow.png b/unified_inventory/textures/ui_crafting_arrow.png new file mode 100644 index 0000000..6901c58 Binary files /dev/null and b/unified_inventory/textures/ui_crafting_arrow.png differ diff --git a/unified_inventory/textures/ui_crafting_form.png b/unified_inventory/textures/ui_crafting_form.png deleted file mode 100644 index 8c980ac..0000000 Binary files a/unified_inventory/textures/ui_crafting_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_doubleleft_icon.png b/unified_inventory/textures/ui_doubleleft_icon.png index 587bb25..64d50c0 100644 Binary files a/unified_inventory/textures/ui_doubleleft_icon.png and b/unified_inventory/textures/ui_doubleleft_icon.png differ diff --git a/unified_inventory/textures/ui_doubleright_icon.png b/unified_inventory/textures/ui_doubleright_icon.png index f552acc..af20930 100644 Binary files a/unified_inventory/textures/ui_doubleright_icon.png and b/unified_inventory/textures/ui_doubleright_icon.png differ diff --git a/unified_inventory/textures/ui_form_bg.png b/unified_inventory/textures/ui_form_bg.png deleted file mode 100644 index 74a6a3b..0000000 Binary files a/unified_inventory/textures/ui_form_bg.png and /dev/null differ diff --git a/unified_inventory/textures/ui_formbg_9_sliced.png b/unified_inventory/textures/ui_formbg_9_sliced.png new file mode 100644 index 0000000..0b8463c Binary files /dev/null and b/unified_inventory/textures/ui_formbg_9_sliced.png differ diff --git a/unified_inventory/textures/ui_gohome_icon.png b/unified_inventory/textures/ui_gohome_icon.png index b3397ef..c5126ae 100644 Binary files a/unified_inventory/textures/ui_gohome_icon.png and b/unified_inventory/textures/ui_gohome_icon.png differ diff --git a/unified_inventory/textures/ui_green_icon_background.png b/unified_inventory/textures/ui_green_icon_background.png index b06c29c..ea28c82 100644 Binary files a/unified_inventory/textures/ui_green_icon_background.png and b/unified_inventory/textures/ui_green_icon_background.png differ diff --git a/unified_inventory/textures/ui_group.png b/unified_inventory/textures/ui_group.png index 2e4714a..b6b8d28 100644 Binary files a/unified_inventory/textures/ui_group.png and b/unified_inventory/textures/ui_group.png differ diff --git a/unified_inventory/textures/ui_home_icon.png b/unified_inventory/textures/ui_home_icon.png index e44419d..b9ce4f3 100644 Binary files a/unified_inventory/textures/ui_home_icon.png and b/unified_inventory/textures/ui_home_icon.png differ diff --git a/unified_inventory/textures/ui_left_icon.png b/unified_inventory/textures/ui_left_icon.png index 68cffb8..373b71e 100644 Binary files a/unified_inventory/textures/ui_left_icon.png and b/unified_inventory/textures/ui_left_icon.png differ diff --git a/unified_inventory/textures/ui_main_inventory.png b/unified_inventory/textures/ui_main_inventory.png deleted file mode 100644 index 3d380de..0000000 Binary files a/unified_inventory/textures/ui_main_inventory.png and /dev/null differ diff --git a/unified_inventory/textures/ui_misc_form.png b/unified_inventory/textures/ui_misc_form.png deleted file mode 100644 index e74a605..0000000 Binary files a/unified_inventory/textures/ui_misc_form.png and /dev/null differ diff --git a/unified_inventory/textures/ui_moon_icon.png b/unified_inventory/textures/ui_moon_icon.png index b2d7b44..cec7009 100644 Binary files a/unified_inventory/textures/ui_moon_icon.png and b/unified_inventory/textures/ui_moon_icon.png differ diff --git a/unified_inventory/textures/ui_off_icon.png b/unified_inventory/textures/ui_off_icon.png index 319fc6e..187e59a 100644 Binary files a/unified_inventory/textures/ui_off_icon.png and b/unified_inventory/textures/ui_off_icon.png differ diff --git a/unified_inventory/textures/ui_ok_icon.png b/unified_inventory/textures/ui_ok_icon.png index dcbda1d..4073899 100644 Binary files a/unified_inventory/textures/ui_ok_icon.png and b/unified_inventory/textures/ui_ok_icon.png differ diff --git a/unified_inventory/textures/ui_on_icon.png b/unified_inventory/textures/ui_on_icon.png index a9884cf..0f5c48f 100644 Binary files a/unified_inventory/textures/ui_on_icon.png and b/unified_inventory/textures/ui_on_icon.png differ diff --git a/unified_inventory/textures/ui_pencil_icon.png b/unified_inventory/textures/ui_pencil_icon.png index a73b740..dfcc19b 100644 Binary files a/unified_inventory/textures/ui_pencil_icon.png and b/unified_inventory/textures/ui_pencil_icon.png differ diff --git a/unified_inventory/textures/ui_red_icon_background.png b/unified_inventory/textures/ui_red_icon_background.png index 67f5dcc..8d4d807 100644 Binary files a/unified_inventory/textures/ui_red_icon_background.png and b/unified_inventory/textures/ui_red_icon_background.png differ diff --git a/unified_inventory/textures/ui_reset_icon.png b/unified_inventory/textures/ui_reset_icon.png index ec9ef62..e966685 100644 Binary files a/unified_inventory/textures/ui_reset_icon.png and b/unified_inventory/textures/ui_reset_icon.png differ diff --git a/unified_inventory/textures/ui_right_icon.png b/unified_inventory/textures/ui_right_icon.png index 1f11868..cbdab76 100644 Binary files a/unified_inventory/textures/ui_right_icon.png and b/unified_inventory/textures/ui_right_icon.png differ diff --git a/unified_inventory/textures/ui_search_icon.png b/unified_inventory/textures/ui_search_icon.png index b529e43..2934bdc 100644 Binary files a/unified_inventory/textures/ui_search_icon.png and b/unified_inventory/textures/ui_search_icon.png differ diff --git a/unified_inventory/textures/ui_sethome_icon.png b/unified_inventory/textures/ui_sethome_icon.png index 5c56d64..4c0f6e5 100644 Binary files a/unified_inventory/textures/ui_sethome_icon.png and b/unified_inventory/textures/ui_sethome_icon.png differ diff --git a/unified_inventory/textures/ui_single_slot.png b/unified_inventory/textures/ui_single_slot.png index ef2a246..2451623 100644 Binary files a/unified_inventory/textures/ui_single_slot.png and b/unified_inventory/textures/ui_single_slot.png differ diff --git a/unified_inventory/textures/ui_single_slot_bright.png b/unified_inventory/textures/ui_single_slot_bright.png new file mode 100644 index 0000000..c66365c Binary files /dev/null and b/unified_inventory/textures/ui_single_slot_bright.png differ diff --git a/unified_inventory/textures/ui_skip_backward_icon.png b/unified_inventory/textures/ui_skip_backward_icon.png index fde4fea..eac6e4c 100644 Binary files a/unified_inventory/textures/ui_skip_backward_icon.png and b/unified_inventory/textures/ui_skip_backward_icon.png differ diff --git a/unified_inventory/textures/ui_skip_forward_icon.png b/unified_inventory/textures/ui_skip_forward_icon.png index 182e7ed..3f85a9f 100644 Binary files a/unified_inventory/textures/ui_skip_forward_icon.png and b/unified_inventory/textures/ui_skip_forward_icon.png differ diff --git a/unified_inventory/textures/ui_sun_icon.png b/unified_inventory/textures/ui_sun_icon.png index 262b1f3..11c7eef 100644 Binary files a/unified_inventory/textures/ui_sun_icon.png and b/unified_inventory/textures/ui_sun_icon.png differ diff --git a/unified_inventory/textures/ui_trash_icon.png b/unified_inventory/textures/ui_trash_icon.png index 081bac7..c5ac97c 100644 Binary files a/unified_inventory/textures/ui_trash_icon.png and b/unified_inventory/textures/ui_trash_icon.png differ diff --git a/unified_inventory/textures/ui_trash_slot_icon.png b/unified_inventory/textures/ui_trash_slot_icon.png new file mode 100644 index 0000000..5fc4de1 Binary files /dev/null and b/unified_inventory/textures/ui_trash_slot_icon.png differ diff --git a/unified_inventory/textures/ui_waypoint_set_icon.png b/unified_inventory/textures/ui_waypoint_set_icon.png index 6eb9d19..4649a4d 100644 Binary files a/unified_inventory/textures/ui_waypoint_set_icon.png and b/unified_inventory/textures/ui_waypoint_set_icon.png differ diff --git a/unified_inventory/textures/ui_waypoints_icon.png b/unified_inventory/textures/ui_waypoints_icon.png index 530c1d7..91d6e3b 100644 Binary files a/unified_inventory/textures/ui_waypoints_icon.png and b/unified_inventory/textures/ui_waypoints_icon.png differ diff --git a/unified_inventory/textures/ui_xyz_icon.png b/unified_inventory/textures/ui_xyz_icon.png index 9b48acb..003ea63 100644 Binary files a/unified_inventory/textures/ui_xyz_icon.png and b/unified_inventory/textures/ui_xyz_icon.png differ diff --git a/unified_inventory/textures/ui_xyz_off_icon.png b/unified_inventory/textures/ui_xyz_off_icon.png deleted file mode 100644 index 3c1836e..0000000 Binary files a/unified_inventory/textures/ui_xyz_off_icon.png and /dev/null differ diff --git a/unified_inventory/textures/ui_xyz_on_icon.png b/unified_inventory/textures/ui_xyz_on_icon.png deleted file mode 100644 index 9b48acb..0000000 Binary files a/unified_inventory/textures/ui_xyz_on_icon.png and /dev/null differ diff --git a/unified_inventory/waypoints.lua b/unified_inventory/waypoints.lua index 3f9ee58..2a8ead4 100644 --- a/unified_inventory/waypoints.lua +++ b/unified_inventory/waypoints.lua @@ -1,5 +1,6 @@ -local S = unified_inventory.gettext +local S = minetest.get_translator("unified_inventory") local F = minetest.formspec_escape +local ui = unified_inventory local hud_colors = { {"#FFFFFF", 0xFFFFFF, S("White")}, @@ -14,102 +15,98 @@ local hud_colors_max = #hud_colors -- Stores temporary player data (persists until player leaves) local waypoints_temp = {} -unified_inventory.register_page("waypoints", { +ui.register_page("waypoints", { get_formspec = function(player) local player_name = player:get_player_name() + local wp_info_x = ui.style_full.form_header_x + 1.25 + local wp_info_y = ui.style_full.form_header_y + 0.5 + local wp_bottom_row = ui.style_full.std_inv_y - 1 + local wp_buttons_rj = ui.style_full.std_inv_x + 10.1 - ui.style_full.btn_spc + local wp_edit_w = ui.style_full.btn_spc * 4 - 0.1 -- build a "fake" temp entry if the server took too long -- during sign-on and returned an empty entry if not waypoints_temp[player_name] then waypoints_temp[player_name] = {hud = 1} end local waypoints = datastorage.get(player_name, "waypoints") - local formspec = "background[0,4.5;8,4;ui_main_inventory.png]" .. - "image[0,0;1,1;ui_waypoints_icon.png]" .. - "label[1,0;" .. F(S("Waypoints")) .. "]" + local formspec = { ui.style_full.standard_inv_bg, + string.format("label[%f,%f;%s]", + ui.style_full.form_header_x, ui.style_full.form_header_y, + F(S("Waypoints"))), + "image["..wp_info_x..","..wp_info_y..";1,1;ui_waypoints_icon.png]" + } + local n=4 -- Tabs buttons: - for i = 1, 5, 1 do - formspec = formspec .. - "image_button[0.0," .. 0.2 + i * 0.7 .. ";.8,.8;" .. - (i == waypoints.selected and "ui_blue_icon_background.png^" or "") .. - "ui_" .. i .. "_icon.png;" .. - "select_waypoint" .. i .. ";]" .. - "tooltip[select_waypoint" .. i .. ";" - .. (S("Select Waypoint #%d"):format(i)).."]" + for i = 1, 5 do + local sw="select_waypoint"..i + formspec[n] = string.format("image_button[%f,%f;%f,%f;%sui_%i_icon.png;%s;]", + ui.style_full.main_button_x, wp_bottom_row - (5-i) * ui.style_full.btn_spc, + ui.style_full.btn_size, ui.style_full.btn_size, + (i == waypoints.selected) and "ui_blue_icon_background.png^" or "", + i, sw) + formspec[n+1] = "tooltip["..sw..";"..S("Select Waypoint #@1", i).."]" + n = n + 2 end local i = waypoints.selected or 1 local waypoint = waypoints[i] or {} local temp = waypoints_temp[player_name][i] or {} - local default_name = string.format(S("Waypoint %d"), i) + local default_name = S("Waypoint @1", i) -- Main buttons: - formspec = formspec .. - "image_button[4.5,3.7;.8,.8;".. - "ui_waypoint_set_icon.png;".. - "set_waypoint"..i..";]".. - "tooltip[set_waypoint" .. i .. ";" - .. F(S("Set waypoint to current location")).."]" + local btnlist = { + { "ui_waypoint_set_icon.png", "set_waypoint", S("Set waypoint to current location") }, + { waypoint.active and "ui_on_icon.png" or "ui_off_icon.png", "toggle_waypoint", S("Make waypoint @1", waypoint.active and "invisible" or "visible") }, + { waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or "ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)", "toggle_display_pos", S("@1 display of waypoint coordinates", waypoint.display_pos and "Disable" or "Enable") }, + { "ui_circular_arrows_icon.png", "toggle_color", S("Change color of waypoint display") }, + { "ui_pencil_icon.png", "rename_waypoint", S("Edit waypoint name") } + } - formspec = formspec .. - "image_button[5.2,3.7;.8,.8;".. - (waypoint.active and "ui_on_icon.png" or "ui_off_icon.png")..";".. - "toggle_waypoint"..i..";]".. - "tooltip[toggle_waypoint" .. i .. ";" - .. F(S("Make waypoint @1", - waypoint.active and S("invisible") or S("visible"))).."]" - - formspec = formspec .. - "image_button[5.9,3.7;.8,.8;".. - (waypoint.display_pos and "ui_green_icon_background.png" or "ui_red_icon_background.png").."^ui_xyz_icon.png;".. - "toggle_display_pos" .. i .. ";]".. - "tooltip[toggle_display_pos" .. i .. ";" - .. F(S("@1 display of waypoint coordinates", - waypoint.display_pos and S("Disable") or S("Enable"))) .."]" - - formspec = formspec .. - "image_button[6.6,3.7;.8,.8;".. - "ui_circular_arrows_icon.png;".. - "toggle_color"..i..";]".. - "tooltip[toggle_color" .. i .. ";" - .. F(S("Change color of waypoint display")).."]" - - formspec = formspec .. - "image_button[7.3,3.7;.8,.8;".. - "ui_pencil_icon.png;".. - "rename_waypoint"..i..";]".. - "tooltip[rename_waypoint" .. i .. ";" - .. F(S("Edit waypoint name")).."]" + local x = 4 + for _, b in pairs(btnlist) do + formspec[n] = string.format("image_button[%f,%f;%f,%f;%s;%s%i;]", + wp_buttons_rj - ui.style_full.btn_spc * x, wp_bottom_row, + ui.style_full.btn_size, ui.style_full.btn_size, + b[1], b[2], i) + formspec[n+1] = "tooltip["..b[2]..i..";"..F(b[3]).."]" + x = x - 1 + n = n + 2 + end -- Waypoint's info: + formspec[n] = "label["..wp_info_x..","..(wp_info_y+1.1)..";" if waypoint.active then - formspec = formspec .. "label[1,0.8;"..F(S("Waypoint active")).."]" + formspec[n+1] = F(S("Waypoint active")).."]" else - formspec = formspec .. "label[1,0.8;"..F(S("Waypoint inactive")).."]" + formspec[n+1] = F(S("Waypoint inactive")).."]" end + n = n + 2 if temp.edit then - formspec = formspec .. - "field[1.3,3.2;6,.8;rename_box" .. i .. ";;" - ..(waypoint.name or default_name).."]" .. - "image_button[7.3,2.9;.8,.8;".. - "ui_ok_icon.png;".. - "confirm_rename"..i.. ";]".. - "tooltip[confirm_rename" .. i .. ";" - .. F(S("Finish editing")).."]" + formspec[n] = string.format("field[%f,%f;%f,%f;rename_box%i;;%s]", + wp_buttons_rj - wp_edit_w - 0.1, wp_bottom_row - ui.style_full.btn_spc, + wp_edit_w, ui.style_full.btn_size, i, (waypoint.name or default_name)) + formspec[n+1] = string.format("image_button[%f,%f;%f,%f;ui_ok_icon.png;confirm_rename%i;]", + wp_buttons_rj, wp_bottom_row - ui.style_full.btn_spc, + ui.style_full.btn_size, ui.style_full.btn_size, i) + formspec[n+2] = "tooltip[confirm_rename"..i..";"..F(S("Finish editing")).."]" + n = n + 3 end - formspec = formspec .. "label[1,1.3;"..F(S("World position"))..": " .. - minetest.pos_to_string(waypoint.world_pos or vector.new()) .. "]" .. - "label[1,1.8;"..F(S("Name"))..": ".. (waypoint.name or default_name) .. "]" .. - "label[1,2.3;"..F(S("HUD text color"))..": " .. - hud_colors[waypoint.color or 1][3] .. "]" + formspec[n] = string.format("label[%f,%f;%s: %s]", + wp_info_x, wp_info_y+1.6, F(S("World position")), + minetest.pos_to_string(waypoint.world_pos or vector.new())) + formspec[n+1] = string.format("label[%f,%f;%s: %s]", + wp_info_x, wp_info_y+2.10, F(S("Name")), (waypoint.name or default_name)) + formspec[n+2] = string.format("label[%f,%f;%s: %s]", + wp_info_x, wp_info_y+2.60, F(S("HUD text color")), hud_colors[waypoint.color or 1][3]) - return {formspec=formspec} + return {formspec=table.concat(formspec)} end, }) -unified_inventory.register_button("waypoints", { +ui.register_button("waypoints", { type = "image", image = "ui_waypoints_icon.png", tooltip = S("Waypoints"), @@ -174,7 +171,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if fields["set_waypoint"..i] then hit = true - local pos = player:getpos() + local pos = player:get_pos() pos.x = math.floor(pos.x) pos.y = math.floor(pos.y) pos.z = math.floor(pos.z) @@ -224,7 +221,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) update_hud(player, waypoints, temp, i) end if update_formspec then - unified_inventory.set_inventory_formspec(player, "waypoints") + ui.set_inventory_formspec(player, "waypoints") end if hit then return end end