Merge pull request 'develop' (#20) from develop into master

Reviewed-on: #20
This commit is contained in:
Milan Meduna 2020-11-22 09:46:14 +01:00
commit 7218437fc2
127 changed files with 3750 additions and 1208 deletions

View File

@ -3,7 +3,7 @@ allow_defined_top = true
max_line_length = 999
globals = {
"default", "minetest",
"default", "minetest", "core",
}
read_globals = {
@ -13,5 +13,5 @@ read_globals = {
"armor", "PseudoRandom", "toolranks",
"stairs", "worldedit", "stairsplus",
"multitools", "vehicle_mash",
"multitools", "vehicle_mash", "lib_mount",
}

View File

@ -6,6 +6,8 @@ Copyright (C) Various other Minetest developers/contributors
[David Leal](https://github.com/Panquesito7) ([CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)):
- `screenshot.png`
- `cloud_items_cloud_ship.obj`
- `cloud_items_cloud_ship_inventory.png`
[BlockMen](https://github.com/BlockMen) ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)):

View File

@ -45,6 +45,14 @@ Medium schematic
Big schematic
![Big schematic](https://user-images.githubusercontent.com/51391473/87363085-03bf5c80-c536-11ea-8ab5-155a931e7400.png)
### Vehicles
There are some nice-craftable vehicles you can ride on.\
Here is one screenshot for each of the available vehicles:
![Cloud car](https://user-images.githubusercontent.com/51391473/99441120-13ccbb80-28dd-11eb-9eb1-8af7aa699b02.png)
![Cloud ship](https://user-images.githubusercontent.com/51391473/99441264-424a9680-28dd-11eb-8dba-fb8297fef92b.png)
### Cloud house
If you go above 1500 blocks up, you may find a cloud house!\
@ -92,6 +100,7 @@ There are 4 types of cloud:
- `default` (included in [Minetest Game](https://github.com/minetest/minetest_game))
- [`worldedit`](https://github.com/Uberi/Minetest-WorldEdit)
- This is required due to the `worldedit.deserialize` function.
- [`vehicle_mash`](https://github.com/minetest-mods/vehicle_mash)
### Optional dependencies
@ -103,7 +112,7 @@ There are 4 types of cloud:
## Requirements
Cloud Items is currently tested with Minetest 5.3.0.\
Cloud Items is currently tested with Minetest 5.4.0-dev.\
Issues may arise if you use older or newer versions.
It shall work with MT 5.0.0 and above, though.

View File

@ -500,49 +500,80 @@ if minetest.get_modpath("multitools") then
)
end
------------------
-- Cloud ship --
------------------
-- Code is taken and modified from the Vehicle Mash (https://github.com/minetest-mods/vehicle_mash) mod (WTFPL license).
-- See the mod license (https://github.com/minetest-mods/vehicle_mash/blob/master/LICENSE.md) for more information.
local ship_def = {
terrain_type = 3,
max_speed_forward = 10,
max_speed_reverse = 7,
accel = 4,
braking = 5,
turn_speed = 6,
stepheight = 1.5,
-- model specific stuff
visual = "mesh",
visual_size = {x=1, y=1},
wield_scale = {x=1, y=1, z=1},
collisionbox = {-2.3, -0.3, -2, 2.5, 1.9, 2},
can_fly = true,
enable_crash = false,
onplace_position_adj = 0,
textures = {"default_cloud.png"},
-- player specific stuff
player_rotation = {x=0, y=0, z=0},
driver_attach_at = {x=-0.6, y=19, z=0},
driver_eye_offset = {x=-0.6, y=19, z=0},
number_of_passengers = 0
}
-- Cloud ship (based on the Vehicle Mash boat)
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/ship.lua")(table.copy(ship_def))
----------------
-- Cloud car --
----------------
-- Code is taken and modified from the Vehicle Mash (https://github.com/minetest-mods/vehicle_mash) mod (WTFPL license).
-- See the mod license (https://github.com/minetest-mods/vehicle_mash/blob/master/LICENSE.md) for more information.
if minetest.get_modpath("vehicle_mash") then
local car_def = {
terrain_type = 1,
max_speed_forward = 13,
max_speed_reverse = 10,
accel = 4,
braking = 6,
turn_speed = 4,
stepheight = 1.3,
local car_def = {
terrain_type = 1,
max_speed_forward = 13,
max_speed_reverse = 10,
accel = 4,
braking = 6,
turn_speed = 4,
stepheight = 1.3,
visual = "mesh",
mesh = "car.x", -- Model is from the Vehicle Mash mod; licensed under CC BY-NC-SA 3.0
visual_size = {x=1, y=1},
wield_scale = {x=1, y=1, z=1},
collisionbox = {-0.6, -0.05, -0.6, 0.6, 1, 0.6},
onplace_position_adj = -0.45,
visual = "mesh",
mesh = "car.x", -- Model is from the Vehicle Mash mod; licensed under CC BY-NC-SA 3.0
visual_size = {x=1, y=1},
wield_scale = {x=1, y=1, z=1},
collisionbox = {-0.6, -0.05, -0.6, 0.6, 1, 0.6},
onplace_position_adj = -0.45,
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=3.5,y=3.7,z=3.5},
driver_eye_offset = {x=-4, y=0, z=0},
number_of_passengers = 3,
passenger_attach_at = {x=3.5,y=3.7,z=-3.5},
passenger_eye_offset = {x=4, y=0, z=0},
player_rotation = {x=0,y=90,z=0},
driver_attach_at = {x=3.5,y=3.7,z=3.5},
driver_eye_offset = {x=-4, y=0, z=0},
number_of_passengers = 3,
passenger_attach_at = {x=3.5,y=3.7,z=-3.5},
passenger_eye_offset = {x=4, y=0, z=0},
passenger2_attach_at = {x=-4,y=3.7,z=3.5},
passenger2_eye_offset = {x=-4, y=3, z=0},
passenger2_attach_at = {x=-4,y=3.7,z=3.5},
passenger2_eye_offset = {x=-4, y=3, z=0},
passenger3_attach_at = {x=-4,y=3.7,z=-3.5},
passenger3_eye_offset = {x=4, y=3, z=0},
passenger3_attach_at = {x=-4,y=3.7,z=-3.5},
passenger3_eye_offset = {x=4, y=3, z=0},
drop_on_destroy = {"vehicle_mash:tire 2", "vehicle_mash:windshield",
"vehicle_mash:battery", "vehicle_mash:motor"},
}
drop_on_destroy = {"vehicle_mash:tire 2", "vehicle_mash:windshield",
"vehicle_mash:battery", "vehicle_mash:motor"},
}
-- Cloud car (similar from the CAR01 from Vehicle Mash)
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/car.lua")(table.copy(car_def))
end
-- Cloud car (similar from the CAR01 from Vehicle Mash)
loadfile(minetest.get_modpath(minetest.get_current_modname()) .. "/car.lua")(table.copy(car_def))
-------------
-- Crafts --

View File

@ -1,6 +1,6 @@
name = cloud_items
depends = default, worldedit
optional_depends = 3d_armor, toolranks, stairs, moreblocks, multitools, vehicle_mash
depends = default, worldedit, vehicle_mash
optional_depends = 3d_armor, toolranks, stairs, moreblocks, multitools
description = Adds powerful cloud tools for Minetest.
min_minetest_version = 5.0.0
license = LGPLv2.1

View File

@ -0,0 +1,714 @@
# Blender v2.90.0 OBJ File: 'cloud_ship.blend'
# www.blender.org
mtllib cloud_items_cloud_ship.mtl
o model.001
v -2.622902 4.532114 25.737923
v -2.622902 4.532117 18.585796
v -9.775026 4.532117 18.585796
v -9.775026 4.532114 25.737923
v -2.622902 -2.620008 18.585794
v -2.622902 -2.620012 25.737919
v -9.775026 -2.620012 25.737919
v -9.775026 -2.620008 18.585794
v 4.529223 4.532114 25.737923
v 4.529223 4.532117 18.585796
v 4.529223 -2.620008 18.585794
v 4.529223 -2.620012 25.737919
v 11.681349 4.532114 25.737923
v 11.681349 4.532117 18.585796
v 11.681349 -2.620008 18.585794
v 11.681349 -2.620012 25.737919
v -9.775026 4.532120 11.433672
v -16.927151 4.532120 11.433672
v -16.927151 4.532117 18.585796
v -9.775026 -2.620004 11.433670
v -16.927151 -2.620008 18.585794
v -16.927151 -2.620004 11.433670
v -2.622902 -2.620004 11.433670
v 4.529223 -2.620004 11.433670
v 11.681349 -2.620004 11.433670
v 18.833469 4.532117 18.585796
v 18.833469 4.532120 11.433672
v 11.681349 4.532120 11.433672
v 18.833469 -2.620004 11.433670
v 18.833469 -2.620008 18.585794
v -2.622902 11.684240 18.585800
v -2.622902 11.684244 11.433678
v -9.775026 11.684244 11.433678
v -9.775026 11.684240 18.585800
v 4.529223 11.684240 18.585800
v 4.529223 11.684244 11.433678
v 11.681349 11.684240 18.585800
v 11.681349 11.684244 11.433678
v -16.927151 4.532124 4.281550
v -24.079273 4.532124 4.281550
v -24.079273 4.532120 11.433672
v -16.927151 -2.620001 4.281545
v -24.079273 -2.620004 11.433670
v -24.079273 -2.620001 4.281545
v -9.775026 -2.620001 4.281545
v -2.622902 -2.620001 4.281545
v 4.529223 -2.620001 4.281545
v 11.681349 -2.620001 4.281545
v 18.833469 -2.620001 4.281545
v 25.985596 4.532120 11.433672
v 25.985596 4.532124 4.281550
v 18.833469 4.532124 4.281550
v 25.985596 -2.620001 4.281545
v 25.985596 -2.620004 11.433670
v -9.775026 11.684248 4.281552
v -16.927151 11.684248 4.281552
v -16.927151 11.684244 11.433678
v 18.833469 11.684244 11.433678
v 18.833469 11.684248 4.281552
v 11.681349 11.684248 4.281552
v -2.622902 18.836369 11.433681
v -2.622902 18.836372 4.281562
v -9.775026 18.836372 4.281562
v -9.775026 18.836369 11.433681
v 4.529223 18.836369 11.433681
v 4.529223 18.836372 4.281562
v 11.681349 18.836369 11.433681
v 11.681349 18.836372 4.281562
v -16.927151 4.532135 -2.870575
v -24.079273 4.532135 -2.870575
v -16.927151 -2.619990 -2.870580
v -24.079273 -2.619990 -2.870580
v -9.775026 -2.619990 -2.870580
v -2.622902 -2.619990 -2.870580
v 4.529223 -2.619990 -2.870580
v 11.681349 -2.619990 -2.870580
v 18.833469 -2.619990 -2.870580
v 25.985596 4.532135 -2.870575
v 18.833469 4.532135 -2.870575
v 25.985596 -2.619990 -2.870580
v -9.775026 11.684258 -2.870574
v -16.927151 11.684258 -2.870574
v 18.833469 11.684258 -2.870574
v 11.681349 11.684258 -2.870574
v -2.622902 18.836382 -2.870563
v -9.775026 18.836382 -2.870563
v 4.529223 18.836382 -2.870563
v 11.681349 18.836382 -2.870563
v -16.927151 4.532138 -10.022700
v -24.079273 4.532138 -10.022700
v -16.927151 -2.619987 -10.022707
v -24.079273 -2.619987 -10.022707
v -9.775026 -2.619987 -10.022707
v -2.622902 -2.619987 -10.022707
v 4.529223 -2.619987 -10.022707
v 11.681349 -2.619987 -10.022707
v 18.833469 -2.619987 -10.022707
v 25.985596 4.532138 -10.022700
v 18.833469 4.532138 -10.022700
v 25.985596 -2.619987 -10.022707
v -9.775026 11.684261 -10.022699
v -16.927151 11.684261 -10.022699
v -9.775026 4.532138 -10.022700
v 18.833469 11.684261 -10.022699
v 11.681349 11.684261 -10.022699
v 11.681349 4.532138 -10.022700
v -2.622902 18.836386 -10.022689
v -9.775026 18.836386 -10.022689
v -2.622902 11.684261 -10.022699
v 4.529223 18.836386 -10.022689
v 4.529223 11.684261 -10.022699
v 11.681349 18.836386 -10.022689
v -9.775026 4.532141 -17.174822
v -16.927151 4.532141 -17.174822
v -9.775026 -2.619983 -17.174824
v -16.927151 -2.619983 -17.174824
v -2.622902 -2.619983 -17.174824
v 4.529223 -2.619983 -17.174824
v 11.681349 -2.619983 -17.174824
v 18.833469 4.532141 -17.174822
v 11.681349 4.532141 -17.174822
v 18.833469 -2.619983 -17.174824
v -2.622902 11.684265 -17.174822
v -9.775026 11.684265 -17.174822
v -2.622902 4.532141 -17.174822
v 4.529223 11.684265 -17.174822
v 4.529223 4.532141 -17.174822
v 11.681349 11.684265 -17.174822
v -2.622902 4.532145 -24.326946
v -9.775026 4.532145 -24.326946
v -2.622902 -2.619980 -24.326948
v -9.775026 -2.619980 -24.326948
v 4.529223 4.532145 -24.326946
v 4.529223 -2.619980 -24.326948
v 11.681349 4.532145 -24.326946
v 11.681349 -2.619980 -24.326948
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 1.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vn 0.0000 1.0000 0.0000
vn 0.0000 -1.0000 -0.0000
vn -1.0000 -0.0000 0.0000
vn 0.0000 -0.0000 1.0000
vn 1.0000 -0.0000 0.0000
vn 0.0000 0.0000 -1.0000
usemtl default_cloud.png.001
s 1
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/2 6/6/2 7/7/2 8/8/2
f 7/9/3 4/10/3 3/3/3 8/8/3
f 6/11/4 1/12/4 4/13/4 7/14/4
f 9/15/1 10/16/1 2/17/1 1/18/1
f 11/19/2 12/20/2 6/21/2 5/22/2
f 12/23/4 9/24/4 1/25/4 6/26/4
f 13/27/1 14/28/1 10/29/1 9/30/1
f 15/31/2 16/32/2 12/33/2 11/34/2
f 15/31/5 14/28/5 13/35/5 16/36/5
f 16/37/4 13/38/4 9/39/4 12/40/4
f 3/41/1 17/42/1 18/43/1 19/44/1
f 20/45/2 8/46/2 21/47/2 22/48/2
f 21/49/3 19/50/3 18/43/3 22/48/3
f 8/51/4 3/52/4 19/53/4 21/54/4
f 23/55/2 5/56/2 8/57/2 20/58/2
f 24/59/2 11/60/2 5/61/2 23/62/2
f 25/63/2 15/64/2 11/65/2 24/66/2
f 26/67/1 27/68/1 28/69/1 14/70/1
f 29/71/2 30/72/2 15/73/2 25/74/2
f 29/71/5 27/68/5 26/75/5 30/76/5
f 30/77/4 26/78/4 14/79/4 15/80/4
f 31/81/1 32/82/1 33/83/1 34/84/1
f 3/41/3 34/85/3 33/83/3 17/86/3
f 2/87/4 31/88/4 34/89/4 3/90/4
f 35/91/1 36/92/1 32/93/1 31/94/1
f 10/95/4 35/96/4 31/97/4 2/98/4
f 37/99/1 38/100/1 36/101/1 35/102/1
f 28/103/5 38/100/5 37/104/5 14/70/5
f 14/105/4 37/106/4 35/107/4 10/108/4
f 18/109/1 39/110/1 40/111/1 41/112/1
f 42/113/2 22/114/2 43/115/2 44/116/2
f 43/117/3 41/118/3 40/111/3 44/116/3
f 22/119/4 18/120/4 41/121/4 43/122/4
f 45/123/2 20/124/2 22/125/2 42/126/2
f 46/127/2 23/128/2 20/129/2 45/130/2
f 47/131/2 24/132/2 23/133/2 46/134/2
f 48/135/2 25/136/2 24/137/2 47/138/2
f 49/139/2 29/140/2 25/141/2 48/142/2
f 50/143/1 51/144/1 52/145/1 27/146/1
f 53/147/2 54/148/2 29/149/2 49/150/2
f 53/147/5 51/144/5 50/151/5 54/152/5
f 54/153/4 50/154/4 27/155/4 29/156/4
f 33/157/1 55/158/1 56/159/1 57/160/1
f 18/109/3 57/161/3 56/159/3 39/162/3
f 17/163/4 33/164/4 57/165/4 18/166/4
f 58/167/1 59/168/1 60/169/1 38/170/1
f 52/171/5 59/168/5 58/172/5 27/146/5
f 27/173/4 58/174/4 38/175/4 28/176/4
f 61/177/1 62/178/1 63/179/1 64/180/1
f 33/157/3 64/181/3 63/179/3 55/182/3
f 32/183/4 61/184/4 64/185/4 33/186/4
f 65/187/1 66/188/1 62/189/1 61/190/1
f 36/191/4 65/192/4 61/193/4 32/194/4
f 67/195/1 68/196/1 66/197/1 65/198/1
f 60/199/5 68/196/5 67/200/5 38/170/5
f 38/201/4 67/202/4 65/203/4 36/204/4
f 39/205/1 69/206/1 70/207/1 40/208/1
f 71/209/2 42/210/2 44/211/2 72/212/2
f 44/213/3 40/214/3 70/207/3 72/212/3
f 73/215/2 45/216/2 42/217/2 71/218/2
f 74/219/2 46/220/2 45/221/2 73/222/2
f 75/223/2 47/224/2 46/225/2 74/226/2
f 76/227/2 48/228/2 47/229/2 75/230/2
f 77/231/2 49/232/2 48/233/2 76/234/2
f 51/235/1 78/236/1 79/237/1 52/238/1
f 80/239/2 53/240/2 49/241/2 77/242/2
f 80/239/5 78/236/5 51/243/5 53/244/5
f 55/245/1 81/246/1 82/247/1 56/248/1
f 39/205/3 56/249/3 82/247/3 69/250/3
f 59/251/1 83/252/1 84/253/1 60/254/1
f 79/255/5 83/252/5 59/256/5 52/238/5
f 62/257/1 85/258/1 86/259/1 63/260/1
f 55/245/3 63/261/3 86/259/3 81/262/3
f 66/263/1 87/264/1 85/265/1 62/266/1
f 68/267/1 88/268/1 87/269/1 66/270/1
f 84/271/5 88/268/5 68/272/5 60/254/5
f 69/273/1 89/274/1 90/275/1 70/276/1
f 91/277/2 71/278/2 72/279/2 92/280/2
f 72/281/3 70/282/3 90/275/3 92/280/3
f 92/283/6 90/284/6 89/285/6 91/286/6
f 93/287/2 73/288/2 71/289/2 91/286/2
f 94/290/2 74/291/2 73/292/2 93/293/2
f 95/294/2 75/295/2 74/296/2 94/297/2
f 96/298/2 76/299/2 75/300/2 95/301/2
f 97/302/2 77/303/2 76/304/2 96/305/2
f 78/306/1 98/307/1 99/308/1 79/309/1
f 100/310/2 80/311/2 77/312/2 97/313/2
f 100/310/5 98/307/5 78/314/5 80/315/5
f 97/302/6 99/316/6 98/317/6 100/318/6
f 81/319/1 101/320/1 102/321/1 82/322/1
f 69/273/3 82/323/3 102/321/3 89/324/3
f 89/325/6 102/326/6 101/327/6 103/328/6
f 83/329/1 104/330/1 105/331/1 84/332/1
f 99/333/5 104/330/5 83/334/5 79/309/5
f 106/335/6 105/336/6 104/337/6 99/338/6
f 85/339/1 107/340/1 108/341/1 86/342/1
f 81/319/3 86/343/3 108/341/3 101/344/3
f 101/345/6 108/346/6 107/347/6 109/348/6
f 87/349/1 110/350/1 107/347/1 85/351/1
f 109/352/6 107/340/6 110/353/6 111/354/6
f 88/355/1 112/356/1 110/353/1 87/357/1
f 105/358/5 112/356/5 88/359/5 84/332/5
f 111/360/6 110/350/6 112/361/6 105/362/6
f 103/363/1 113/364/1 114/365/1 89/324/1
f 115/366/2 93/367/2 91/368/2 116/369/2
f 91/277/3 89/274/3 114/365/3 116/369/3
f 116/370/6 114/371/6 113/372/6 115/373/6
f 117/374/2 94/375/2 93/376/2 115/373/2
f 118/377/2 95/378/2 94/379/2 117/380/2
f 119/381/2 96/382/2 95/383/2 118/384/2
f 99/333/1 120/385/1 121/386/1 106/387/1
f 122/388/2 97/389/2 96/390/2 119/391/2
f 122/388/5 120/385/5 99/308/5 97/313/5
f 119/381/6 121/392/6 120/393/6 122/394/6
f 109/352/1 123/395/1 124/396/1 101/344/1
f 103/363/3 101/320/3 124/396/3 113/397/3
f 113/398/6 124/399/6 123/400/6 125/401/6
f 111/360/1 126/402/1 123/400/1 109/348/1
f 125/403/6 123/395/6 126/404/6 127/405/6
f 105/358/1 128/406/1 126/404/1 111/354/1
f 121/407/5 128/406/5 105/331/5 106/387/5
f 127/408/6 126/402/6 128/409/6 121/410/6
f 125/403/1 129/411/1 130/412/1 113/397/1
f 131/413/2 117/414/2 115/415/2 132/416/2
f 115/366/3 113/364/3 130/412/3 132/416/3
f 132/417/6 130/418/6 129/419/6 131/420/6
f 127/408/1 133/421/1 129/419/1 125/401/1
f 134/422/2 118/423/2 117/424/2 131/420/2
f 131/413/6 129/411/6 133/425/6 134/426/6
f 121/407/1 135/427/1 133/425/1 127/405/1
f 136/428/2 119/429/2 118/430/2 134/426/2
f 136/428/5 135/427/5 121/386/5 119/391/5
f 134/422/6 133/421/6 135/431/6 136/432/6

18
mods/cloud_items/ship.lua Normal file
View File

@ -0,0 +1,18 @@
-- Code from the Vehicle Mash mod (WTFPL license)
local name = "cloud_ship"
local definition = ...
definition.description = "Cloud ship"
definition.inventory_image = "cloud_items_cloud_ship_inventory.png"
definition.wield_image = "cloud_items_cloud_ship_inventory.png"
definition.mesh = "cloud_items_cloud_ship.obj"
definition.drop_on_destroy = {"cloud_items:cloudblock", "cloud_items:cloud_ingot 2"}
definition.can_go_down = true
definition.can_go_up = true
definition.recipe = {
{"cloud_items:cloud_ingot", "cloud_items:cloudblock", "cloud_items:cloud_ingot"},
{"cloud_items:cloudblock", "cloud_items:cloudblock", "cloud_items:cloudblock"},
{"cloud_items:cloud_ingot", "cloud_items:cloudblock", "cloud_items:cloud_ingot"}
}
vehicle_mash.register_vehicle("cloud_items:" .. name, definition)

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

View File

@ -161,7 +161,7 @@ minetest.register_craft( {
minetest.register_craft( {
output = "homedecor:doorbell",
recipe = {
{ "homedecor:light_switch", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
{ "homedecor:light_switch_off", "basic_materials:energy_crystal_simple", "homedecor:speaker_driver" }
},
})

View File

@ -27,19 +27,20 @@ local word_to_bright = {
}
local rules_alldir = {
{x = 0, y = 0, z = -1}, -- borrowed from lightstones
{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 = -1, y = 0, z = 0},
{x = 1, y = 0, z = 0},
{x = 0, y = 0, z = -1}, -- borrowed from lightstones
{x = 0, y = 1, z = 1},
{x = 0, y = -1, z = 1},
{x = -1, y = 1, z = 0},
{x = 0, 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 = -1, y = -1, z = 0},
{x = 0, y = -1, z = 0},
{x = 1, y = -1, z = 0},
{x = 0, y = -1, z = -1},
}
-- mesecons compatibility

View File

@ -177,6 +177,7 @@ moretrees.cedar_biome = {
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 10,
seed_diff = 336,
min_elevation = 0, --Added to solve an issue where cedar trees would sometimes spawn deep underground
near_nodes = {"default:water_source"},
near_nodes_size = 15,
near_nodes_count = 5,

View File

@ -0,0 +1,3 @@
Tails_The_Fox
Tails
CC BY-SA 3.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -1,28 +0,0 @@
The TechPack Modpack for Minetest is
Copyright (C) 2017-2018 Joachim Stolberg
License of source code
----------------------
This program is free software; you can redistribute and/or
modify it under the terms of the GNU Lesser General Public License version 2.1 or later
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)
-----------------------------------------------------
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/

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# TechPack V2.03
# TechPack V2.04
TechPack, a Mining, Crafting, & Farming Modpack for Minetest.
@ -115,8 +115,8 @@ The value 200 (default) results in a lifetime for standard machines of about 200
### License
Copyright (C) 2017-2020 Joachim Stolberg
Code: Licensed under the GNU LGPL version 2.1 or later. See LICENSE.txt
Textures: CC BY-SA 3.0
Code: Licensed under the GNU AGPL version 3 or later. See LICENSE.txt
Textures: CC BY-SA 3.0
### Dependencies
@ -151,6 +151,7 @@ tubelib_addons1 optional: unified_inventory
- 2019-01-27 V2.01 * SaferLua Controller Terminal added
- 2019-01-28 V2.02 * Logic Not added, output reduction on Harvester, Fermenter, and Gravel Sieve
- 2019-04-23 V2.03 * Piston/WorldEdit/replacer detection added, farming and grinder recipes added
- 2020-11-20 V2.04 * Switch to AGPL v3, adapt to minetest 5.3, add translation support, fix minor bugs
## New in v2 (from players point of view)

View File

@ -5,6 +5,8 @@
]]--
-- Load support for I18n
local S = gravelsieve.S
gravelsieve.disallow = function(pos, node, user, mode, new_param2)
return false
@ -40,7 +42,7 @@ gravelsieve.handler = function(itemstack, user, pointed_thing)
end
minetest.register_tool("gravelsieve:hammer", {
description = "Hammer converts Cobblestone into Gravel",
description = S("Hammer converts Cobblestone into Gravel"),
inventory_image = "gravelsieve_hammer.png",
on_use = function(itemstack, user, pointed_thing)
return gravelsieve.handler(itemstack, user, pointed_thing)

View File

@ -7,11 +7,11 @@
Derived from the work of celeron55, Perttu Ahola (furnace)
Pipeworks support added by FiftySix
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
Copyright (C) 2011-2016 celeron55, Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2011-2016 Various Minetest developers and contributors
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
History:
@ -42,6 +42,10 @@
gravelsieve = {
}
-- Load support for I18n
gravelsieve.S = minetest.get_translator("gravelsieve")
local S = gravelsieve.S
dofile(minetest.get_modpath("gravelsieve") .. "/hammer.lua")
local settings_get
@ -320,7 +324,7 @@ for idx = 0,4 do
local tube_info
if automatic == 0 then
node_name = "gravelsieve:sieve"
description = "Gravel Sieve"
description = S("Gravel Sieve")
tiles_data = {
-- up, down, right, left, back, front
"gravelsieve_gravel.png",
@ -332,7 +336,7 @@ for idx = 0,4 do
}
else
node_name = "gravelsieve:auto_sieve"
description = "Automatic Gravel Sieve"
description = S("Automatic Gravel Sieve")
tiles_data = {
-- up, down, right, left, back, front
"gravelsieve_gravel.png",
@ -366,6 +370,7 @@ for idx = 0,4 do
}
end
local not_in_creative_inventory
if idx == 3 then
tiles_data[1] = "gravelsieve_top.png"
not_in_creative_inventory = 0
@ -522,7 +527,7 @@ if minetest.global_exists("tubelib") then
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Gravel Sieve")
meta:set_string("infotext", S("Gravel Sieve"))
end,
on_dig = function(pos, node, puncher, pointed_thing)
@ -581,14 +586,14 @@ if minetest.global_exists("tubelib") then
end
minetest.register_node("gravelsieve:sieved_gravel", {
description = "Sieved Gravel",
description = S("Sieved Gravel"),
tiles = {"default_gravel.png"},
groups = {crumbly=2, falling_node=1, not_in_creative_inventory=1},
sounds = default.node_sound_gravel_defaults(),
})
minetest.register_node("gravelsieve:compressed_gravel", {
description = "Compressed Gravel",
description = S("Compressed Gravel"),
tiles = {"gravelsieve_compressed_gravel.png"},
groups = {cracky=2, crumbly = 2, cracky = 2},
sounds = default.node_sound_gravel_defaults(),
@ -654,7 +659,7 @@ end
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("gravelsieve", "compressed_gravel", "gravelsieve:compressed_gravel", {
description="Compressed Gravel",
description=S("Compressed Gravel"),
groups={cracky=2, crumbly=2, choppy=2, not_in_creative_inventory=1},
tiles = {"gravelsieve_compressed_gravel.png"},
sounds = default.node_sound_stone_defaults(),

View File

@ -0,0 +1,14 @@
# textdomain: gravelsieve
### hammer.lua ###
Hammer converts Cobblestone into Gravel=Hammer, Zertrümmert Pflasterstein in Kies
### init.lua ###
Automatic Gravel Sieve=Automatisches Kiessieb
Compressed Gravel=Komprimiertes Kies
Gravel Sieve=Kiessieb
Sieved Gravel=Gesiebtes Kies

View File

@ -0,0 +1,14 @@
# textdomain: gravelsieve
### hammer.lua ###
Hammer converts Cobblestone into Gravel=
### init.lua ###
Automatic Gravel Sieve=
Compressed Gravel=
Gravel Sieve=
Sieved Gravel=

450
mods/techpack/i18n.py Normal file
View File

@ -0,0 +1,450 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Script to generate the template file and update the translation files.
# Copy the script into the mod or modpack root folder and run it there.
#
# Copyright (C) 2019 Joachim Stolberg, 2020 FaceDeer, 2020 Louis Royer
# LGPLv2.1+
#
# See https://github.com/minetest-tools/update_translations for
# potential future updates to this script.
from __future__ import print_function
import os, fnmatch, re, shutil, errno
from sys import argv as _argv
from sys import stderr as _stderr
# Running params
params = {"recursive": False,
"help": False,
"mods": False,
"verbose": False,
"folders": [],
"no-old-file": False
}
# Available CLI options
options = {"recursive": ['--recursive', '-r'],
"help": ['--help', '-h'],
"mods": ['--installed-mods'],
"verbose": ['--verbose', '-v'],
"no-old-file": ['--no-old-file']
}
# Strings longer than this will have extra space added between
# them in the translation files to make it easier to distinguish their
# beginnings and endings at a glance
doublespace_threshold = 60
def set_params_folders(tab: list):
'''Initialize params["folders"] from CLI arguments.'''
# Discarding argument 0 (tool name)
for param in tab[1:]:
stop_param = False
for option in options:
if param in options[option]:
stop_param = True
break
if not stop_param:
params["folders"].append(os.path.abspath(param))
def set_params(tab: list):
'''Initialize params from CLI arguments.'''
for option in options:
for option_name in options[option]:
if option_name in tab:
params[option] = True
break
def print_help(name):
'''Prints some help message.'''
print(f'''SYNOPSIS
{name} [OPTIONS] [PATHS...]
DESCRIPTION
{', '.join(options["help"])}
prints this help message
{', '.join(options["recursive"])}
run on all subfolders of paths given
{', '.join(options["mods"])}
run on locally installed modules
{', '.join(options["no-old-file"])}
do not create *.old files
{', '.join(options["verbose"])}
add output information
''')
def main():
'''Main function'''
set_params(_argv)
set_params_folders(_argv)
if params["help"]:
print_help(_argv[0])
elif params["recursive"] and params["mods"]:
print("Option --installed-mods is incompatible with --recursive")
else:
# Add recursivity message
print("Running ", end='')
if params["recursive"]:
print("recursively ", end='')
# Running
if params["mods"]:
print(f"on all locally installed modules in {os.path.abspath('~/.minetest/mods/')}")
run_all_subfolders("~/.minetest/mods")
elif len(params["folders"]) >= 2:
print("on folder list:", params["folders"])
for f in params["folders"]:
if params["recursive"]:
run_all_subfolders(f)
else:
update_folder(f)
elif len(params["folders"]) == 1:
print("on folder", params["folders"][0])
if params["recursive"]:
run_all_subfolders(params["folders"][0])
else:
update_folder(params["folders"][0])
else:
print("on folder", os.path.abspath("./"))
if params["recursive"]:
run_all_subfolders(os.path.abspath("./"))
else:
update_folder(os.path.abspath("./"))
#group 2 will be the string, groups 1 and 3 will be the delimiters (" or ')
#See https://stackoverflow.com/questions/46967465/regex-match-text-in-either-single-or-double-quote
pattern_lua_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
pattern_lua_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*(["\'])((?:\\\1|(?:(?!\1)).)*)(\1)[\s,\)]', re.DOTALL)
pattern_lua_bracketed_s = re.compile(r'[\.=^\t,{\(\s]N?S\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
pattern_lua_bracketed_fs = re.compile(r'[\.=^\t,{\(\s]N?FS\(\s*\[\[(.*?)\]\][\s,\)]', re.DOTALL)
# Handles "concatenation" .. " of strings"
pattern_concat = re.compile(r'["\'][\s]*\.\.[\s]*["\']', re.DOTALL)
pattern_tr = re.compile(r'(.*?[^@])=(.*)')
pattern_name = re.compile(r'^name[ ]*=[ ]*([^ \n]*)')
pattern_tr_filename = re.compile(r'\.tr$')
pattern_po_language_code = re.compile(r'(.*)\.po$')
#attempt to read the mod's name from the mod.conf file. Returns None on failure
def get_modname(folder):
try:
with open(os.path.join(folder, "mod.conf"), "r", encoding='utf-8') as mod_conf:
for line in mod_conf:
match = pattern_name.match(line)
if match:
return match.group(1)
except FileNotFoundError:
pass
return None
#If there are already .tr files in /locale, returns a list of their names
def get_existing_tr_files(folder):
out = []
for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
for name in files:
if pattern_tr_filename.search(name):
out.append(name)
return out
# A series of search and replaces that massage a .po file's contents into
# a .tr file's equivalent
def process_po_file(text):
# The first three items are for unused matches
text = re.sub(r'#~ msgid "', "", text)
text = re.sub(r'"\n#~ msgstr ""\n"', "=", text)
text = re.sub(r'"\n#~ msgstr "', "=", text)
# comment lines
text = re.sub(r'#.*\n', "", text)
# converting msg pairs into "=" pairs
text = re.sub(r'msgid "', "", text)
text = re.sub(r'"\nmsgstr ""\n"', "=", text)
text = re.sub(r'"\nmsgstr "', "=", text)
# various line breaks and escape codes
text = re.sub(r'"\n"', "", text)
text = re.sub(r'"\n', "\n", text)
text = re.sub(r'\\"', '"', text)
text = re.sub(r'\\n', '@n', text)
# remove header text
text = re.sub(r'=Project-Id-Version:.*\n', "", text)
# remove double-spaced lines
text = re.sub(r'\n\n', '\n', text)
return text
# Go through existing .po files and, if a .tr file for that language
# *doesn't* exist, convert it and create it.
# The .tr file that results will subsequently be reprocessed so
# any "no longer used" strings will be preserved.
# Note that "fuzzy" tags will be lost in this process.
def process_po_files(folder, modname):
for root, dirs, files in os.walk(os.path.join(folder, 'locale/')):
for name in files:
code_match = pattern_po_language_code.match(name)
if code_match == None:
continue
language_code = code_match.group(1)
tr_name = modname + "." + language_code + ".tr"
tr_file = os.path.join(root, tr_name)
if os.path.exists(tr_file):
if params["verbose"]:
print(f"{tr_name} already exists, ignoring {name}")
continue
fname = os.path.join(root, name)
with open(fname, "r", encoding='utf-8') as po_file:
if params["verbose"]:
print(f"Importing translations from {name}")
text = process_po_file(po_file.read())
with open(tr_file, "wt", encoding='utf-8') as tr_out:
tr_out.write(text)
# from https://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python/600612#600612
# Creates a directory if it doesn't exist, silently does
# nothing if it already exists
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else: raise
# Converts the template dictionary to a text to be written as a file
# dKeyStrings is a dictionary of localized string to source file sets
# dOld is a dictionary of existing translations and comments from
# the previous version of this text
def strings_to_text(dkeyStrings, dOld, mod_name, header_comments):
lOut = [f"# textdomain: {mod_name}\n"]
if header_comments is not None:
lOut.append(header_comments)
dGroupedBySource = {}
for key in dkeyStrings:
sourceList = list(dkeyStrings[key])
sourceList.sort()
sourceString = "\n".join(sourceList)
listForSource = dGroupedBySource.get(sourceString, [])
listForSource.append(key)
dGroupedBySource[sourceString] = listForSource
lSourceKeys = list(dGroupedBySource.keys())
lSourceKeys.sort()
for source in lSourceKeys:
localizedStrings = dGroupedBySource[source]
localizedStrings.sort()
lOut.append("")
lOut.append(source)
lOut.append("")
for localizedString in localizedStrings:
val = dOld.get(localizedString, {})
translation = val.get("translation", "")
comment = val.get("comment")
if len(localizedString) > doublespace_threshold and not lOut[-1] == "":
lOut.append("")
if comment != None:
lOut.append(comment)
lOut.append(f"{localizedString}={translation}")
if len(localizedString) > doublespace_threshold:
lOut.append("")
unusedExist = False
for key in dOld:
if key not in dkeyStrings:
val = dOld[key]
translation = val.get("translation")
comment = val.get("comment")
# only keep an unused translation if there was translated
# text or a comment associated with it
if translation != None and (translation != "" or comment):
if not unusedExist:
unusedExist = True
lOut.append("\n\n##### not used anymore #####\n")
if len(key) > doublespace_threshold and not lOut[-1] == "":
lOut.append("")
if comment != None:
lOut.append(comment)
lOut.append(f"{key}={translation}")
if len(key) > doublespace_threshold:
lOut.append("")
return "\n".join(lOut) + '\n'
# Writes a template.txt file
# dkeyStrings is the dictionary returned by generate_template
def write_template(templ_file, dkeyStrings, mod_name):
# read existing template file to preserve comments
existing_template = import_tr_file(templ_file)
text = strings_to_text(dkeyStrings, existing_template[0], mod_name, existing_template[2])
mkdir_p(os.path.dirname(templ_file))
with open(templ_file, "wt", encoding='utf-8') as template_file:
template_file.write(text)
# Gets all translatable strings from a lua file
def read_lua_file_strings(lua_file):
lOut = []
with open(lua_file, encoding='utf-8') as text_file:
text = text_file.read()
#TODO remove comments here
text = re.sub(pattern_concat, "", text)
strings = []
for s in pattern_lua_s.findall(text):
strings.append(s[1])
for s in pattern_lua_bracketed_s.findall(text):
strings.append(s)
for s in pattern_lua_fs.findall(text):
strings.append(s[1])
for s in pattern_lua_bracketed_fs.findall(text):
strings.append(s)
for s in strings:
s = re.sub(r'"\.\.\s+"', "", s)
s = re.sub("@[^@=0-9]", "@@", s)
s = s.replace('\\"', '"')
s = s.replace("\\'", "'")
s = s.replace("\n", "@n")
s = s.replace("\\n", "@n")
s = s.replace("=", "@=")
lOut.append(s)
return lOut
# Gets strings from an existing translation file
# returns both a dictionary of translations
# and the full original source text so that the new text
# can be compared to it for changes.
# Returns also header comments in the third return value.
def import_tr_file(tr_file):
dOut = {}
text = None
header_comment = None
if os.path.exists(tr_file):
with open(tr_file, "r", encoding='utf-8') as existing_file :
# save the full text to allow for comparison
# of the old version with the new output
text = existing_file.read()
existing_file.seek(0)
# a running record of the current comment block
# we're inside, to allow preceeding multi-line comments
# to be retained for a translation line
latest_comment_block = None
for line in existing_file.readlines():
line = line.rstrip('\n')
if line[:3] == "###":
if header_comment is None:
# Save header comments
header_comment = latest_comment_block
# Stip textdomain line
tmp_h_c = ""
for l in header_comment.split('\n'):
if not l.startswith("# textdomain:"):
tmp_h_c += l + '\n'
header_comment = tmp_h_c
# Reset comment block if we hit a header
latest_comment_block = None
continue
if line[:1] == "#":
# Save the comment we're inside
if not latest_comment_block:
latest_comment_block = line
else:
latest_comment_block = latest_comment_block + "\n" + line
continue
match = pattern_tr.match(line)
if match:
# this line is a translated line
outval = {}
outval["translation"] = match.group(2)
if latest_comment_block:
# if there was a comment, record that.
outval["comment"] = latest_comment_block
latest_comment_block = None
dOut[match.group(1)] = outval
return (dOut, text, header_comment)
# Walks all lua files in the mod folder, collects translatable strings,
# and writes it to a template.txt file
# Returns a dictionary of localized strings to source file sets
# that can be used with the strings_to_text function.
def generate_template(folder, mod_name):
dOut = {}
for root, dirs, files in os.walk(folder):
for name in files:
if fnmatch.fnmatch(name, "*.lua"):
fname = os.path.join(root, name)
found = read_lua_file_strings(fname)
if params["verbose"]:
print(f"{fname}: {str(len(found))} translatable strings")
for s in found:
sources = dOut.get(s, set())
sources.add(f"### {os.path.basename(fname)} ###")
dOut[s] = sources
if len(dOut) == 0:
return None
templ_file = os.path.join(folder, "locale/template.txt")
write_template(templ_file, dOut, mod_name)
return dOut
# Updates an existing .tr file, copying the old one to a ".old" file
# if any changes have happened
# dNew is the data used to generate the template, it has all the
# currently-existing localized strings
def update_tr_file(dNew, mod_name, tr_file):
if params["verbose"]:
print(f"updating {tr_file}")
tr_import = import_tr_file(tr_file)
dOld = tr_import[0]
textOld = tr_import[1]
textNew = strings_to_text(dNew, dOld, mod_name, tr_import[2])
if textOld and textOld != textNew:
print(f"{tr_file} has changed.")
if not params["no-old-file"]:
shutil.copyfile(tr_file, f"{tr_file}.old")
with open(tr_file, "w", encoding='utf-8') as new_tr_file:
new_tr_file.write(textNew)
# Updates translation files for the mod in the given folder
def update_mod(folder):
print(folder)
modname = get_modname(folder)
if modname is not None:
process_po_files(folder, modname)
print(f"Updating translations for {modname}")
data = generate_template(folder, modname)
if data == None:
print(f"No translatable strings found in {modname}")
else:
for tr_file in get_existing_tr_files(folder):
update_tr_file(data, modname, os.path.join(folder, "locale/", tr_file))
else:
print(f"\033[31mUnable to find modname in folder {folder}.\033[0m", file=_stderr)
#exit(1)
# Determines if the folder being pointed to is a mod or a mod pack
# and then runs update_mod accordingly
def update_folder(folder):
is_modpack = os.path.exists(os.path.join(folder, "modpack.txt")) or os.path.exists(os.path.join(folder, "modpack.conf"))
if is_modpack:
subfolders = [f.path for f in os.scandir(folder) if f.is_dir()]
for subfolder in subfolders:
update_mod(subfolder + "/")
else:
update_mod(folder)
print("Done.")
def run_all_subfolders(folder):
for modfolder in [f.path for f in os.scandir(folder) if f.is_dir()]:
update_folder(modfolder + "/")
main()

View File

@ -0,0 +1 @@
name=lcdlib

View File

@ -2,6 +2,23 @@
## V2.04.00 (2020-11-20)
### Additions
- Add minetest.translator support (issue #56)
- Add German translation
- Add new minetest v5 nodes
### Removals
### Changes
- Switch from LGPL to AGPL v3
### Fixes
- tubelib_addons2:doorblock works incorrectly (issue #55)
## V2.03.12 (2020-07-23)
### Additions

View File

@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
data_struct.lua:

View File

@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
environ.lua:

View File

@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
environ.lua:

View File

@ -3,9 +3,9 @@
SaferLua [safer_lua]
====================
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
scanner.lua:

View File

@ -3,9 +3,9 @@
sl_controller
=============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
battery.lua:

View File

@ -3,9 +3,9 @@
sl_controller
=============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
commands.lua:

View File

@ -3,9 +3,9 @@
sl_controller
=============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
controller.lua:

View File

@ -3,9 +3,9 @@
sl_controller
=============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
]]--
@ -17,4 +17,4 @@ dofile(minetest.get_modpath("sl_controller") .. "/controller.lua")
dofile(minetest.get_modpath("sl_controller") .. "/commands.lua")
dofile(minetest.get_modpath("sl_controller") .. "/battery.lua")
dofile(minetest.get_modpath("sl_controller") .. "/server.lua")
dofile(minetest.get_modpath("sl_controller") .. "/terminal.lua")
dofile(minetest.get_modpath("sl_controller") .. "/terminal.lua")

View File

@ -3,9 +3,9 @@
sl_controller
=============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
server.lua:

View File

@ -3,9 +3,9 @@
sl_controller
=============
Copyright (C) 2018-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
terminal.lua:

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
button.lua:
@ -13,9 +13,11 @@
]]--
-- Load support for I18n
local S = smartline.S
local function switch_on(pos, node)
if tubelib.data_not_corrupted(pos) then
if tubelib.data_not_corrupted(pos, true) then
node.name = "smartline:button_active"
minetest.swap_node(pos, node)
minetest.sound_play("button", {
@ -40,7 +42,7 @@ local function switch_on(pos, node)
end
local function switch_off(pos)
if tubelib.data_not_corrupted(pos) then
if tubelib.data_not_corrupted(pos, true) then
local node = minetest.get_node(pos)
node.name = "smartline:button"
minetest.swap_node(pos, node)
@ -64,7 +66,7 @@ end
minetest.register_node("smartline:button", {
description = "SmartLine Button/Switch",
description = S("SmartLine Button/Switch"),
inventory_image = "smartline_button_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -89,22 +91,23 @@ minetest.register_node("smartline:button", {
local own_num = tubelib.add_node(pos, "smartline:button")
meta:set_string("own_num", own_num)
meta:set_string("formspec", "size[5,6]"..
"dropdown[0.2,0;3;type;switch,button 2s,button 4s,button 8s,button 16s;1]"..
"field[0.5,2;3,1;numbers;Insert destination block number(s);]" ..
"dropdown[0.2,0;3;type;"..S("switch,button 2s,button 4s,button 8s,button 16s")..";1]"..
"field[0.5,2;3,1;numbers;"..S("Insert destination block number(s)")..";]" ..
"checkbox[1,3;public;public;false]"..
"button_exit[1,4;2,1;exit;Save]")
"button_exit[1,4;2,1;exit;"..S("Save").."]")
meta:set_string("placer_name", placer:get_player_name())
meta:set_string("public", "false")
meta:set_int("cycle_time", 0)
meta:set_string("infotext", "SmartLine Button "..own_num)
meta:set_string("infotext", S("SmartLine Button").." "..own_num)
end,
on_receive_fields = function(pos, formname, fields, player)
local meta = minetest.get_meta(pos)
print(dump(fields))
if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers)
local own_num = meta:get_string("own_num")
meta:set_string("infotext", "SmartLine Button "..own_num..", connected with block "..fields.numbers)
meta:set_string("infotext", S("SmartLine Button").." "..own_num..", "..S("connected with block").." "..fields.numbers)
else
return
end
@ -153,7 +156,7 @@ minetest.register_node("smartline:button", {
minetest.register_node("smartline:button_active", {
description = "SmartLine Button/Switch",
description = S("SmartLine Button/Switch"),
tiles = {
-- up, down, right, left, back, front
"smartline.png",

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
collector.lua:
@ -14,6 +14,9 @@
]]--
-- Load support for I18n
local S = smartline.S
local CYCLE_TIME = 1
local tStates = {stopped = 0, running = 0, standby = 1, blocked = 2, fault = 3, defect = 4}
@ -30,11 +33,11 @@ local function formspec(meta)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"field[0.3,0.6;9,1;poll_numbers;Node numbers to read the states from:;"..poll_numbers.."]" ..
"field[0.3,2;9,1;event_number;Node number to send the events to:;"..event_number.."]" ..
"label[1.3,2.8;Send an event if state is equal or larget than:]"..
"field[0.3,0.6;9,1;poll_numbers;"..S("Node numbers to read the states from:")..";"..poll_numbers.."]" ..
"field[0.3,2;9,1;event_number;"..S("Node number to send the events to:")..";"..event_number.."]" ..
"label[1.3,2.8;"..S("Send an event if state is equal or larget than:").."]"..
"dropdown[1.2,3.4;7,4;severity;1 standby,2 blocked,3 fault,4 defect;"..dropdown_pos.."]"..
"button_exit[3,5;2,1;exit;Save]"
"button_exit[3,5;2,1;exit;"..S("Save").."]"
end
@ -50,7 +53,7 @@ local function send_event(meta)
else
tubelib.send_message(event_number, owner, nil, "off", own_number)
end
meta:set_string("infotext", "SmartLine State Collector "..own_number..': "'..lStates[state]..'"')
meta:set_string("infotext", S("SmartLine State Collector").." "..own_number..': "'..lStates[state]..'"')
meta:set_int("stored_state", state)
meta:set_int("state", 0)
end
@ -74,7 +77,7 @@ local function on_timer(pos,elapsed)
if poll_numbers == "" then
local own_number = meta:get_string("own_number")
meta:set_string("infotext", "SmartLine State Collector "..own_number..": stopped")
meta:set_string("infotext", S("SmartLine State Collector").." "..own_number..": stopped")
meta:set_int("state", 0)
meta:set_int("stored_state", 0)
return false
@ -94,7 +97,7 @@ local function on_timer(pos,elapsed)
end
minetest.register_node("smartline:collector", {
description = "SmartLine State Collector",
description = S("SmartLine State Collector"),
inventory_image = "smartline_collector_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -121,7 +124,7 @@ minetest.register_node("smartline:collector", {
meta:set_string("poll_numbers", "")
meta:set_string("event_number", "")
meta:set_string("formspec", formspec(meta))
meta:set_string("infotext", "SmartLine State Collector "..own_number)
meta:set_string("infotext", S("SmartLine State Collector").." "..own_number)
meta:set_string("owner", placer:get_player_name())
end,
@ -145,7 +148,7 @@ minetest.register_node("smartline:collector", {
if not timer:is_started() then
timer:start(CYCLE_TIME)
end
meta:set_string("infotext", "SmartLine State Collector "..own_number..": running")
meta:set_string("infotext", S("SmartLine State Collector").." "..own_number..": running")
else
if timer:is_started() then
timer:stop()

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
command.lua:

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
controller.lua:

View File

@ -3,15 +3,17 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
display.lua:
]]--
-- Load support for I18n
local S = smartline.S
lcdlib.register_display_entity("smartline:entity")
@ -42,7 +44,7 @@ local lcd_box = {
}
minetest.register_node("smartline:display", {
description = "SmartLine Display",
description = S("SmartLine Display"),
inventory_image = 'smartline_display_inventory.png',
tiles = {"smartline_display.png"},
drawtype = "nodebox",

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
action.lua

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
balancer.lua

View File

@ -3,9 +3,9 @@
ICTA Controller
===============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
battery.lua

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
command.lua:

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
condition.lua

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
controller.lua

View File

@ -3,9 +3,9 @@
ICTA Controller
===============
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
edit.lua

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
formspec.lua:

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
stopwatch.lua

View File

@ -5,9 +5,9 @@
Part of the SmartLine mod
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
submenu.lua

View File

@ -3,15 +3,18 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
]]--
smartline = {}
-- Load support for I18n
smartline.S = minetest.get_translator("smartline")
local MP = minetest.get_modpath("smartline")
dofile(MP.."/display.lua")

View File

@ -0,0 +1,85 @@
# textdomain: smartline
### button.lua ###
Insert destination block number(s)=Zielblocknummer(n) eingeben
SmartLine Button=SmartLine Taster
SmartLine Button/Switch=SmartLine Taster/Schalter
connected with block=verbunden mit Block
switch,button 2s,button 4s,button 8s,button 16s=Schalter,Taster 2s,Taster 4s,Taster 8s,Taster 16s
### button.lua ###
### collector.lua ###
### playerdetector.lua ###
### repeater.lua ###
Save=Speichern
### collector.lua ###
Node number to send the events to:=Knotennummer, an den die Events gesendet werden sollen:
Node numbers to read the states from:=Knotennummers, von wo der Status gelesen werden soll:
Send an event if state is equal or larget than:=Sende einen Event, wenn der Status gleich oder größer ist als:
SmartLine State Collector=SmartLine Status Sammler
### display.lua ###
SmartLine Display=SmartLine Display
### playerdetector.lua ###
Input the number(s) of the receiving node(s).=Gib die Nummer(n) der Empfangsblöcke ein.
Input the player name(s) separated by blanks,=Gebe sie Spielernamen getrennt durch Leerzeichen ein,
Player Detector=Spieler Detektor
Player Detector Help=Spieler Detektor Hilfe
Player name(s):=Spielername(n):
Receiver node numbers:=Empfangsblocknummer(n):
Separate numbers via blanks, like '0123 0234'.=Separiere die Nummern mit Leerzeichen, wie '0123 0234'.
SmartLine Player Detector=SmartLine Spieler Detektor
or leave it blank for all players.=oder lasse es leer für alle Spieler.
### playerdetector.lua ###
### sequencer.lua ###
### timer.lua ###
close=schließen
help=Hilfe
### repeater.lua ###
Destination node numbers=Zielknotennummern
SmartLine Repeater=SmartLine Wiederholer
connected with=verbunden mit
fault (overloaded)=Fehler (überlastet)
not connected=nicht verbunden
### sequencer.lua ###
Offset/s=Offset/s
Run endless=Laufe endlos
SmartLine Sequencer=SmartLine Sequenzer
SmartLine Sequencer Help@n @nDefine a sequence of commands to control other machines.@nNumbers(s) are the node numbers, the command shall sent to.@nThe commands 'on'/'off' are used for machines and other nodes.@nOffset is the time to the next line in seconds (1..999).@nIf endless is set, the Sequencer restarts again and again.@nThe command ' ' does nothing, only consuming the offset time.@n=SmartLine Sequenzer Hilfe@n @nDefiniere eine Sequenz von Kommandos um andere Maschinen zu steuern.@nNummern sind Blocknummern, wo die Kommandos hingesendet werden sollen@nDas Kommando 'on'/'off' wird für Maschinen und andere Blöcke verwendet@nOffset ist die Zeit zur nächsten Zeile in Sekunden (1..999).@nWird 'endlos' angeklickt, startet der Sequenzer immer wieder neu.@nDas Kommando ' ' macht nichts, die die Zeit zu verbrauchen.@n
running=läuft
stopped=gestoppt
### sequencer.lua ###
### timer.lua ###
Command=Kommando
Number(s)=Nummer(m)
### signaltower.lua ###
SmartLine Signal Tower=SmartLine Signalturm
### timer.lua ###
SmartLine Timer=SmartLine Timer
SmartLine Timer Help@n@nThe Timer is for a daytime controlled sending of commands@ne.g. to turn street lights on/off. The timer checks the @ntime every few seconds. If the block was just loaded, @nthe timer will check the last 4 hours for commands@nthat still need to be executed.=SmartLine Timer Hilfe@n@nDer Timer st zum Tageszeit abhängigem Senden von Kommandos@nDer Timer prüft die regeln alle paar Sekunden.@nFalls die Block gerade erst aktiviert wurde (Spieler kommt in die Nähe),@nwerden auch die Kommandos der letzten 4 Spielstunden@ngeprüft und ggf. ausgeführt.
Time=Zeit

View File

@ -0,0 +1,85 @@
# textdomain: smartline
### button.lua ###
Insert destination block number(s)=
SmartLine Button=
SmartLine Button/Switch=
connected with block=
switch,button 2s,button 4s,button 8s,button 16s=
### button.lua ###
### collector.lua ###
### playerdetector.lua ###
### repeater.lua ###
Save=
### collector.lua ###
Node number to send the events to:=
Node numbers to read the states from:=
Send an event if state is equal or larget than:=
SmartLine State Collector=
### display.lua ###
SmartLine Display=
### playerdetector.lua ###
Input the number(s) of the receiving node(s).=
Input the player name(s) separated by blanks,=
Player Detector=
Player Detector Help=
Player name(s):=
Receiver node numbers:=
Separate numbers via blanks, like '0123 0234'.=
SmartLine Player Detector=
or leave it blank for all players.=
### playerdetector.lua ###
### sequencer.lua ###
### timer.lua ###
close=
help=
### repeater.lua ###
Destination node numbers=
SmartLine Repeater=
connected with=
fault (overloaded)=
not connected=
### sequencer.lua ###
Offset/s=
Run endless=
SmartLine Sequencer=
SmartLine Sequencer Help@n @nDefine a sequence of commands to control other machines.@nNumbers(s) are the node numbers, the command shall sent to.@nThe commands 'on'/'off' are used for machines and other nodes.@nOffset is the time to the next line in seconds (1..999).@nIf endless is set, the Sequencer restarts again and again.@nThe command ' ' does nothing, only consuming the offset time.@n=
running=
stopped=
### sequencer.lua ###
### timer.lua ###
Command=
Number(s)=
### signaltower.lua ###
SmartLine Signal Tower=
### timer.lua ###
SmartLine Timer=
SmartLine Timer Help@n@nThe Timer is for a daytime controlled sending of commands@ne.g. to turn street lights on/off. The timer checks the @ntime every few seconds. If the block was just loaded, @nthe timer will check the last 4 hours for commands@nthat still need to be executed.=
Time=

View File

@ -3,15 +3,18 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
playerdetector.lua:
]]--
-- Load support for I18n
local S = smartline.S
local function switch_on(pos)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
@ -56,15 +59,19 @@ local function scan_for_player(pos)
end
local function formspec_help()
local help = table.concat({
S("Input the number(s) of the receiving node(s)."),
S("Separate numbers via blanks, like '0123 0234'."),
S("Input the player name(s) separated by blanks,"),
S("or leave it blank for all players.")
}, "\n")
return "size[10,9]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"label[3,0;Player Detector Help]"..
"label[0,1;Input the number(s) of the receiving node(s).\n"..
"Separate numbers via blanks, like '0123 0234'.\n\n"..
"Input the player name(s) separated by blanks,\nor empty for all players.]"..
"button_exit[4,8;2,1;exit;close]"
"label[3,0;"..S("Player Detector Help").."]"..
"label[0,1;"..help.."]"..
"button_exit[4,8;2,1;exit2;"..S("close").."]"
end
@ -73,26 +80,27 @@ local function formspec(numbers, names)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"label[2,0;Player Detector]"..
"field[0.3,1;8,1;numbers;Receiver node numbers:;"..numbers.."]" ..
"field[0.3,2.5;8,1;names;Player name(s):;"..names.."]" ..
"button_exit[5,3.5;2,1;exit;Save]"..
"button[1,3.5;1,1;help;help]"
"label[2,0;"..S("Player Detector").."]"..
"field[0.3,1;8,1;numbers;"..S("Receiver node numbers:")..";"..numbers.."]" ..
"field[0.3,2.5;8,1;names;"..S("Player name(s):")..";"..names.."]" ..
"button_exit[5,3.5;2,1;exit1;"..S("Save").."]"..
"button[1,3.5;1,1;help;"..S("help").."]"
end
local function on_receive_fields(pos, formname, fields, player)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
if player:get_player_name() == owner then
if fields.exit == "Save" then
print(dump(fields))
if fields.exit1 then
if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers)
end
meta:set_string("names", fields.names)
meta:set_string("formspec", formspec(fields.numbers, fields.names))
elseif fields.help ~= nil then
elseif fields.help then
meta:set_string("formspec", formspec_help())
elseif fields.exit == "close" then
elseif fields.exit2 then
local numbers = meta:get_string("numbers")
local names = meta:get_string("names")
meta:set_string("formspec", formspec(numbers, names))
@ -101,7 +109,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("smartline:playerdetector", {
description = "SmartLine Player Detector",
description = S("SmartLine Player Detector"),
inventory_image = "smartline_detector_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -127,7 +135,7 @@ minetest.register_node("smartline:playerdetector", {
local numbers = meta:get_string("numbers") or ""
local names = meta:get_string("names") or ""
meta:set_string("formspec", formspec(numbers, names))
meta:set_string("infotext", "SmartLine Player Detector "..number)
meta:set_string("infotext", S("SmartLine Player Detector").." "..number)
meta:set_string("owner", placer:get_player_name())
minetest.get_node_timer(pos):start(1)
end,
@ -159,7 +167,7 @@ minetest.register_node("smartline:playerdetector", {
})
minetest.register_node("smartline:playerdetector_active", {
description = "SmartLine Player Detector",
description = S("SmartLine Player Detector"),
tiles = {
-- up, down, right, left, back, front
"smartline.png",

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
repeater.lua:
@ -13,17 +13,20 @@
]]--
-- Load support for I18n
local S = smartline.S
local OVER_LOAD_MAX = 5
local function formspec(meta)
local numbers = meta:get_string("numbers")
return "size[7,5]"..
"field[0.5,2;6,1;number;Destination node numbers;"..numbers.."]" ..
"button_exit[1,3;2,1;exit;Save]"
"field[0.5,2;6,1;number;"..S("Destination node numbers")..";"..numbers.."]" ..
"button_exit[1,3;2,1;exit;"..S("Save").."]"
end
minetest.register_node("smartline:repeater", {
description = "SmartLine Repeater",
description = S("SmartLine Repeater"),
inventory_image = "smartline_repeater_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -48,7 +51,7 @@ minetest.register_node("smartline:repeater", {
local own_number = tubelib.add_node(pos, "smartline:repeater")
meta:set_string("own_number", own_number)
meta:set_string("formspec", formspec(meta))
meta:set_string("infotext", "SmartLine Repeater "..own_number..": not connected")
meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("not connected"))
meta:set_string("owner", placer:get_player_name())
meta:set_int("overload_cnt", 0)
minetest.get_node_timer(pos):start(1)
@ -64,7 +67,7 @@ minetest.register_node("smartline:repeater", {
if tubelib.check_numbers(fields.number) then
meta:set_string("numbers", fields.number)
local own_number = meta:get_string("own_number")
meta:set_string("infotext", "SmartLine Repeater "..own_number..": connected with "..fields.number)
meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("connected with").." "..fields.number)
meta:set_string("formspec", formspec(meta))
end
@ -114,12 +117,12 @@ tubelib.register_node("smartline:repeater", {}, {
meta:set_int("overload_cnt", overload_cnt)
if overload_cnt > OVER_LOAD_MAX then
local own_number = meta:get_string("own_number")
meta:set_string("infotext", "SmartLine Repeater "..own_number..": fault (overloaded)")
meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("fault (overloaded)"))
minetest.get_node_timer(pos):stop()
return false
elseif topic == "set_numbers" then
local own_number = meta:get_string("own_number")
meta:set_string("infotext", "SmartLine Repeater "..own_number..": connected with "..payload)
meta:set_string("infotext", S("SmartLine Repeater").." "..own_number..": "..S("connected with").." "..payload)
meta:set_string("numbers", payload)
meta:set_string("formspec", formspec(meta))
return true

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
sequencer.lua:
@ -13,20 +13,24 @@
]]--
-- Load support for I18n
local S = smartline.S
local RUNNING_STATE = 1
local STOP_STATE = 0
local NUM_SLOTS = 8
local sHELP = [[label[0,0;SmartLine Sequencer Help
local sHELP = "label[0,0;"..
S([[SmartLine Sequencer Help
Define a sequence of commands to control other machines.
Numbers(s) are the node numbers, the command shall sent to.
The commands 'on'/'off' are used for machines and other nodes.
Offset is the time to the next line in seconds (1..999).
If endless is set, the Sequencer restarts again and again.
The command ' ' does nothing, only consuming the offset time.
]
]]
]])..
"]"
local sAction = ",on,off"
@ -39,15 +43,15 @@ local function formspec(state, rules, endless)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"label[0,0;Number(s)]label[2.1,0;Command]label[6.4,0;Offset/s]"}
"label[0,0;"..S("Number(s)").."]label[2.1,0;"..S("Command").."]label[6.4,0;"..S("Offset/s").."]"}
for idx, rule in ipairs(rules or {}) do
tbl[#tbl+1] = "field[0.2,"..(-0.2+idx)..";2,1;num"..idx..";;"..(rule.num or "").."]"
tbl[#tbl+1] = "dropdown[2,"..(-0.4+idx)..";3.9,1;act"..idx..";"..sAction..";"..(rule.act or "").."]"
tbl[#tbl+1] = "field[6.2,"..(-0.2+idx)..";2,1;offs"..idx..";;"..(rule.offs or "").."]"
end
tbl[#tbl+1] = "checkbox[0,8.5;endless;Run endless;"..endless.."]"
tbl[#tbl+1] = "button[4.5,8.5;1.5,1;help;help]"
tbl[#tbl+1] = "checkbox[0,8.5;endless;"..S("Run endless")..";"..endless.."]"
tbl[#tbl+1] = "button[4.5,8.5;1.5,1;help;"..S("help").."]"
tbl[#tbl+1] = "image_button[6.5,8.5;1,1;".. tubelib.state_button(state) ..";button;]"
return table.concat(tbl)
@ -58,10 +62,10 @@ local function formspec_help()
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"field[0,0;0,0;_type_;;help]"..
"field[0,0;0,0;_type_;;"..S("help").."]"..
sHELP..
--"label[0.2,0;test]"..
"button[11.5,9;1.5,1;close;close]"
"button[11.5,9;1.5,1;close;"..S("close").."]"
end
local function stop_the_sequencer(pos)
@ -69,7 +73,7 @@ local function stop_the_sequencer(pos)
local meta = minetest.get_meta(pos)
local number = meta:get_string("number")
meta:set_int("running", STOP_STATE)
meta:set_string("infotext", "SmartLine Sequencer "..number..": stopped")
meta:set_string("infotext", S("SmartLine Sequencer").." "..number..": "..S("stopped"))
local rules = minetest.deserialize(meta:get_string("rules"))
local endless = meta:get_int("endless") or 0
meta:set_string("formspec", formspec(tubelib.STOPPED, rules, endless))
@ -120,7 +124,7 @@ local function check_rules(pos, elapsed)
if index == 1 and offs < 1 then
offs = 2
end
meta:set_string("infotext", "SmartLine Sequencer "..number..": running ("..index.."/"..NUM_SLOTS..")")
meta:set_string("infotext", S("SmartLine Sequencer").." "..number..": "..S("running").." ("..index.."/"..NUM_SLOTS..")")
meta:set_int("index", index)
if offs > 0 then
minetest.after(0, restart_timer, pos, offs)
@ -142,7 +146,7 @@ local function start_the_sequencer(pos)
local number = meta:get_string("number")
meta:set_int("running", RUNNING_STATE)
meta:set_int("index", 1)
meta:set_string("infotext", "SmartLine Sequencer "..number..": running (1/"..NUM_SLOTS..")")
meta:set_string("infotext", S("SmartLine Sequencer").." "..number..": "..S("running").." (1/"..NUM_SLOTS..")")
local rules = minetest.deserialize(meta:get_string("rules"))
local endless = meta:get_int("endless") or 0
meta:set_string("formspec", formspec(tubelib.RUNNING, rules, endless))
@ -202,7 +206,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("smartline:sequencer", {
description = "SmartLine Sequencer",
description = S("SmartLine Sequencer"),
inventory_image = "smartline_sequencer_inventory.png",
wield_image = "smartline_sequencer_inventory.png",
stack_max = 1,
@ -237,7 +241,7 @@ minetest.register_node("smartline:sequencer", {
meta:set_int("endless", 0)
meta:get_int("running", STOP_STATE)
meta:set_string("formspec", formspec(tubelib.STOPPED, rules, 0))
meta:set_string("infotext", "SmartLine Sequencer "..number)
meta:set_string("infotext", S("SmartLine Sequencer").." "..number)
end,
on_receive_fields = on_receive_fields,

View File

@ -3,15 +3,17 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
signaltower.lua:
]]--
-- Load support for I18n
local S = smartline.S
local function switch_on(pos, node, color)
local meta = minetest.get_meta(pos)
@ -28,7 +30,7 @@ local function switch_off(pos, node)
end
minetest.register_node("smartline:signaltower", {
description = "SmartLine Signal Tower",
description = S("SmartLine Signal Tower"),
tiles = {
'smartline_signaltower_top.png',
'smartline_signaltower_top.png',
@ -47,7 +49,7 @@ minetest.register_node("smartline:signaltower", {
local number = tubelib.add_node(pos, "smartline:signaltower")
local meta = minetest.get_meta(pos)
meta:set_string("state", "off")
meta:set_string("infotext", "SmartLine Signal Tower "..number)
meta:set_string("infotext", S("SmartLine Signal Tower").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@ -71,7 +73,7 @@ minetest.register_node("smartline:signaltower", {
for _,color in ipairs({"green", "amber", "red"}) do
minetest.register_node("smartline:signaltower_"..color, {
description = "SmartLine Signal Tower",
description = S("SmartLine Signal Tower"),
tiles = {
'smartline_signaltower_top.png',
'smartline_signaltower_top.png',

View File

@ -3,9 +3,9 @@
SmartLine
=========
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
timer.lua:
@ -13,13 +13,20 @@
]]--
-- Load support for I18n
local S = smartline.S
local CYCLE_TIME = 8
local sHELP = [[label[0,0;SmartLine Timer Help
local sHELP = "label[0,0;"..
S([[SmartLine Timer Help
tbd
]
]]
The Timer is for a daytime controlled sending of commands
e.g. to turn street lights on/off. The timer checks the
time every few seconds. If the block was just loaded,
the timer will check the last 4 hours for commands
that still need to be executed.]])..
"]"
local tTime = {
@ -45,7 +52,7 @@ local function formspec(events, numbers, actions)
default.gui_bg_img..
default.gui_slots..
"label[0,0;Time]label[2.3,0;Number(s)]label[4.5,0;Command]"..
"label[0,0;"..S("Time").."]label[2.3,0;"..S("Number(s)").."]label[4.5,0;"..S("Command").."]"..
"dropdown[0,1;2,1;e1;"..sTime..";"..events[1].."]"..
"field[2.3,1.2;2,1;n1;;"..numbers[1].."]" ..
"dropdown[4.5,1;3,1;a1;"..sAction..";"..tAction[actions[1]].."]"..
@ -70,8 +77,8 @@ local function formspec(events, numbers, actions)
"field[2.3,6.2;2,1;n6;;"..numbers[6].."]" ..
"dropdown[4.5,6;3,1;a6;"..sAction..";"..tAction[actions[6]].."]"..
"button[4.5,7;1.5,1;help;help]"..
"button_exit[6.5,7;1.5,1;exit;close]"
"button[4.5,7;1.5,1;help;"..S("help").."]"..
"button_exit[6.5,7;1.5,1;exit;"..S("close").."]"
end
local function formspec_help()
@ -79,10 +86,10 @@ local function formspec_help()
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"field[0,0;0,0;_type_;;help]"..
"field[0,0;0,0;_type_;;"..S("help").."]"..
sHELP..
--"label[0.2,0;test]"..
"button[11.5,9;1.5,1;close;close]"
"button[11.5,9;1.5,1;close;"..S("close").."]"
end
local function check_rules(pos,elapsed)
@ -120,7 +127,7 @@ local function check_rules(pos,elapsed)
done = {false,false,false,false,false,false}
end
meta:set_string("done", minetest.serialize(done))
meta:set_string("infotext","SmartLine Timer ("..own_num..")"..hour..":00")
meta:set_string("infotext", S("SmartLine Timer").." "..own_num..": "..hour..":00")
return true
end
return false
@ -128,7 +135,7 @@ end
minetest.register_node("smartline:timer", {
description = "SmartLine Timer",
description = S("SmartLine Timer"),
inventory_image = "smartline_timer_inventory.png",
wield_image = "smartline_timer_inventory.png",
stack_max = 1,

View File

@ -3,16 +3,19 @@
TechPack Stairway
=================
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2019-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
init.lua
]]--
S = minetest.get_translator("techpack_stairway")
minetest.register_node("techpack_stairway:grating", {
description = "TechPack Grating",
description = S("TechPack Grating"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -43,7 +46,7 @@ minetest.register_node("techpack_stairway:grating", {
})
minetest.register_node("techpack_stairway:handrail1", {
description = "TechPack Handrail 1",
description = S("TechPack Handrail 1"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -74,7 +77,7 @@ minetest.register_node("techpack_stairway:handrail1", {
})
minetest.register_node("techpack_stairway:handrail2", {
description = "TechPack Handrail 2",
description = S("TechPack Handrail 2"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -107,7 +110,7 @@ minetest.register_node("techpack_stairway:handrail2", {
})
minetest.register_node("techpack_stairway:handrail3", {
description = "TechPack Handrail 3",
description = S("TechPack Handrail 3"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -140,7 +143,7 @@ minetest.register_node("techpack_stairway:handrail3", {
})
minetest.register_node("techpack_stairway:handrail4", {
description = "TechPack Handrail 4",
description = S("TechPack Handrail 4"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -175,7 +178,7 @@ minetest.register_node("techpack_stairway:handrail4", {
})
minetest.register_node("techpack_stairway:bridge1", {
description = "TechPack Bridge 1",
description = S("TechPack Bridge 1"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -207,7 +210,7 @@ minetest.register_node("techpack_stairway:bridge1", {
})
minetest.register_node("techpack_stairway:bridge2", {
description = "TechPack Bridge 2",
description = S("TechPack Bridge 2"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -240,7 +243,7 @@ minetest.register_node("techpack_stairway:bridge2", {
})
minetest.register_node("techpack_stairway:bridge3", {
description = "TechPack Bridge 3",
description = S("TechPack Bridge 3"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -273,7 +276,7 @@ minetest.register_node("techpack_stairway:bridge3", {
})
minetest.register_node("techpack_stairway:bridge4", {
description = "TechPack Bridge 4",
description = S("TechPack Bridge 4"),
tiles = {
'techpack_stairway_bottom.png',
'techpack_stairway_bottom.png',
@ -307,7 +310,7 @@ minetest.register_node("techpack_stairway:bridge4", {
})
minetest.register_node("techpack_stairway:stairway", {
description = "TechPack Stairway",
description = S("TechPack Stairway"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@ -345,7 +348,7 @@ minetest.register_node("techpack_stairway:stairway", {
})
minetest.register_node("techpack_stairway:ladder1", {
description = "TechPack Ladder 1",
description = S("TechPack Ladder 1"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@ -376,7 +379,7 @@ minetest.register_node("techpack_stairway:ladder1", {
})
minetest.register_node("techpack_stairway:ladder2", {
description = "TechPack Ladder 2",
description = S("TechPack Ladder 2"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@ -408,7 +411,7 @@ minetest.register_node("techpack_stairway:ladder2", {
})
minetest.register_node("techpack_stairway:ladder3", {
description = "TechPack Ladder 3",
description = S("TechPack Ladder 3"),
tiles = {
'techpack_stairway_steps.png',
'techpack_stairway_steps.png',
@ -439,8 +442,39 @@ minetest.register_node("techpack_stairway:ladder3", {
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("techpack_stairway:ladder4", {
description = S("TechPack Ladder 4"),
tiles = {
'techpack_stairway_ladder.png',
},
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-17/32, -17/32, 15/32, 17/32, 17/32, 17/32},
--{-17/32, -17/32, -17/32, -15/32, 17/32, 17/32},
--{-17/32, -17/32, -17/32, 17/32, 17/32, -15/32},
--{ 15/32, -17/32, -17/32, 17/32, 17/32, 17/32},
},
},
selection_box = {
type = "fixed",
fixed = {-8/16, -8/16, 6/16, 8/16, 8/16, 8/16},
},
climbable = true,
paramtype2 = "facedir",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 2},
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("techpack_stairway:lattice", {
description = "TechPack Lattice",
description = S("TechPack Lattice"),
tiles = {
'techpack_stairway_lattice.png',
},
@ -470,6 +504,53 @@ minetest.register_node("techpack_stairway:lattice", {
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("techpack_stairway:lattice_slop", {
description = S("TechPack Lattice Slope"),
tiles = {
'techpack_stairway_lattice.png',
},
drawtype = "mesh",
mesh="techpack_stairway_slope.obj",
selection_box = {
type = "fixed",
fixed = {
{-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
{-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
{-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
{-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
},
},
collision_box = {
type = "fixed",
fixed = {
{-8/16, 4/16, 4/16, 8/16, 8/16, 8/16},
{-8/16, 0/16, 0/16, 8/16, 4/16, 8/16},
{-8/16, -4/16, -4/16, 8/16, 0/16, 8/16},
{-8/16, -8/16, -8/16, 8/16, -4/16, 8/16},
},
},
after_place_node = function(pos, placer, itemstack, pointed_thing)
local node = minetest.get_node(pos)
local dir = minetest.facedir_to_dir(node.param2)
if pointed_thing.under.y >= pointed_thing.above.y then
local newparam2 = ({[0] = 8, [1] = 17, [2] = 22, [3] = 15})[node.param2]
if newparam2 then
node.param2 = newparam2
minetest.swap_node(pos, node)
end
end
end,
paramtype2 = "facedir",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 2},
sounds = default.node_sound_metal_defaults(),
})
minetest.register_craft({
output = "techpack_stairway:grating 4",
@ -516,6 +597,15 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "techpack_stairway:ladder4 8",
recipe = {
{"dye:dark_grey", "default:tin_ingot", "default:coal_lump"},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
},
})
minetest.register_craft({
output = "techpack_stairway:lattice 2",
recipe = {
@ -525,6 +615,10 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "techpack_stairway:lattice_slop 2",
recipe = {{"techpack_stairway:lattice"}},
})
minetest.register_craft({
output = "techpack_stairway:handrail2",

View File

@ -0,0 +1,22 @@
# textdomain: techpack_stairway
### init.lua ###
TechPack Bridge 1=TechPack Brücke 1
TechPack Bridge 2=TechPack Brücke 2
TechPack Bridge 3=TechPack Brücke 3
TechPack Bridge 4=TechPack Brücke 4
TechPack Grating=TechPack Gitterrost
TechPack Handrail 1=TechPack Geländer 1
TechPack Handrail 2=TechPack Geländer 2
TechPack Handrail 3=TechPack Geländer 3
TechPack Handrail 4=TechPack Geländer 4
TechPack Ladder 1=TechPack Leiter 1
TechPack Ladder 2=TechPack Leiter 2
TechPack Ladder 3=TechPack Leiter 3
TechPack Ladder 4=TechPack Leiter 4
TechPack Lattice=TechPack Gitterrahmen
TechPack Lattice Slope=TechPack Gitterrahmenrampe
TechPack Stairway=TechPack Treppe

View File

@ -0,0 +1,22 @@
# textdomain: techpack_stairway
### init.lua ###
TechPack Bridge 1=
TechPack Bridge 2=
TechPack Bridge 3=
TechPack Bridge 4=
TechPack Grating=
TechPack Handrail 1=
TechPack Handrail 2=
TechPack Handrail 3=
TechPack Handrail 4=
TechPack Ladder 1=
TechPack Ladder 2=
TechPack Ladder 3=
TechPack Ladder 4=
TechPack Lattice=
TechPack Lattice Slope=
TechPack Stairway=

View File

@ -3,23 +3,25 @@
TechPack Warehouse
==================
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
box_copper.lua
]]--
-- Load support for I18n
local S = techpack_warehouse.S
--- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local wh = techpack_warehouse
local NODE_NAME = "techpack_warehouse:box_copper"
local DESCRIPTION = "Warehouse Box Copper"
local DESCRIPTION = S("Warehouse Box Copper")
local INV_SIZE = 1200
local BACKGROUND_IMG = "default_copper_block.png"

View File

@ -3,23 +3,25 @@
TechPack Warehouse
==================
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
box_gold.lua
]]--
-- Load support for I18n
local S = techpack_warehouse.S
--- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local wh = techpack_warehouse
local NODE_NAME = "techpack_warehouse:box_gold"
local DESCRIPTION = "Warehouse Box Gold"
local DESCRIPTION = S("Warehouse Box Gold")
local INV_SIZE = 3600
local BACKGROUND_IMG = "default_gold_block.png"

View File

@ -3,23 +3,25 @@
TechPack Warehouse
==================
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
box_steel.lua
]]--
-- Load support for I18n
local S = techpack_warehouse.S
--- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
local wh = techpack_warehouse
local NODE_NAME = "techpack_warehouse:box_steel"
local DESCRIPTION = "Warehouse Box Steel"
local DESCRIPTION = S("Warehouse Box Steel")
local INV_SIZE = 400
local BACKGROUND_IMG = "default_steel_block.png"

View File

@ -3,17 +3,19 @@
TechPack Warehouse
==================
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
common.lua
]]--
-- Load support for I18n
local S = techpack_warehouse.S
--- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -49,10 +51,10 @@ local function formspec(self, pos, meta)
"list[context;input;1,3.6;8,1;]"..
"image_button[9,3.6;1,1;techpack_warehouse_input_inv.png;input;;true;false;]"..
"tooltip[shift;Pass-through storage for unconfigured items (turn on/off)]"..
"tooltip[filter;Filter: To configure the 8 storages]"..
"tooltip[storage;Storage: All items will be stored here]"..
"tooltip[input;Input: Put items will be moved to the storage, if configured]"..
"tooltip[shift;"..S("Pass-through storage for unconfigured items (turn on/off)").."]"..
"tooltip[filter;"..S("Filter: To configure the 8 storages").."]"..
"tooltip[storage;"..S("Storage: All items will be stored here").."]"..
"tooltip[input;"..S("Input: Put items will be moved to the storage, if configured").."]"..
"list[current_player;main;1,5.3;8,4;]"..
"listring[context;shift]"..

View File

@ -3,9 +3,9 @@
TechPack Warehouse
==================
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
init.lua
@ -14,6 +14,10 @@
techpack_warehouse = {}
-- Load support for I18n
techpack_warehouse.S = minetest.get_translator("techpack_warehouse")
dofile(minetest.get_modpath("techpack_warehouse") .. "/common.lua")
dofile(minetest.get_modpath("techpack_warehouse") .. "/box_steel.lua")
dofile(minetest.get_modpath("techpack_warehouse") .. "/box_copper.lua")

View File

@ -0,0 +1,22 @@
# textdomain: techpack_warehouse
### box_copper.lua ###
Warehouse Box Copper=
### box_gold.lua ###
Warehouse Box Gold=
### box_steel.lua ###
Warehouse Box Steel=
### common.lua ###
Filter: To configure the 8 storages=
Input: Put items will be moved to the storage, if configured=
Pass-through storage for unconfigured items (turn on/off)=
Storage: All items will be stored here=

View File

@ -3,15 +3,18 @@
Tube Library
============
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
basalt.lua:
]]--
-- Load support for I18n
local S = tubelib.S
if tubelib.basalt_stone_enabled then
-- Replace default:stone with tubelib:basalt which is useless for ore generation.
default.cool_lava = function(pos, node)
@ -25,14 +28,14 @@ if tubelib.basalt_stone_enabled then
end
minetest.register_node("tubelib:basalt_stone", {
description = "Basalt Stone",
description = S("Basalt Stone"),
tiles = {"default_stone.png^[brighten"},
groups = {cracky = 3, stone = 1},
drop = "default:silver_sand",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("tubelib:basalt_stone_brick", {
description = "Basalt Stone Brick",
description = S("Basalt Stone Brick"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_stone_brick.png^[brighten"},
@ -42,7 +45,7 @@ if tubelib.basalt_stone_enabled then
})
minetest.register_node("tubelib:basalt_stone_block", {
description = "Basalt Stone Block",
description = S("Basalt Stone Block"),
tiles = {"default_stone_block.png^[brighten"},
is_ground_content = false,
groups = {cracky = 2, stone = 1},

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
blackhole.lua:
@ -24,9 +24,11 @@
-- | |/
-- +--------+
-- Load support for I18n
local S = tubelib.S
minetest.register_node("tubelib:blackhole", {
description = "Tubelib Black Hole",
description = S("Tubelib Black Hole"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -42,7 +44,7 @@ minetest.register_node("tubelib:blackhole", {
local number = tubelib.add_node(pos, "tubelib:blackhole") -- <<=== tubelib
meta:set_string("number", number)
meta:set_int("disappeared", 0)
meta:set_string("infotext","0 items disappeared")
meta:set_string("infotext", "0 "..S("items disappeared"))
end,
after_dig_node = function(pos)
@ -79,7 +81,7 @@ tubelib.register_node("tubelib:blackhole", {}, {
local meta = minetest.get_meta(pos)
local disappeared = meta:get_int("disappeared") + item:get_count()
meta:set_int("disappeared", disappeared)
meta:set_string("infotext", disappeared.." items disappeared")
meta:set_string("infotext", disappeared.." "..S("items disappeared"))
return true
end
return false

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
button.lua:
@ -14,9 +14,11 @@
]]--
-- Load support for I18n
local S = tubelib.S
local function switch_on(pos, node)
if tubelib.data_not_corrupted(pos) then
if tubelib.data_not_corrupted(pos, true) then
node.name = "tubelib:button_active"
minetest.swap_node(pos, node)
minetest.sound_play("button", {
@ -41,7 +43,7 @@ local function switch_on(pos, node)
end
local function switch_off(pos)
if tubelib.data_not_corrupted(pos) then
if tubelib.data_not_corrupted(pos, true) then
local node = minetest.get_node(pos)
node.name = "tubelib:button"
minetest.swap_node(pos, node)
@ -65,7 +67,7 @@ end
minetest.register_node("tubelib:button", {
description = "Tubelib Button/Switch",
description = S("Tubelib Button/Switch"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -81,14 +83,14 @@ minetest.register_node("tubelib:button", {
local own_num = tubelib.add_node(pos, "tubelib:button")
meta:set_string("own_num", own_num)
meta:set_string("formspec", "size[7.5,6]"..
"dropdown[0.2,0;3;type;switch,button 2s,button 4s,button 8s,button 16s;1]"..
"field[0.5,2;7,1;numbers;Insert destination node number(s);]" ..
"checkbox[1,3;public;public;false]"..
"button_exit[2,4;3,1;exit;Save]")
"dropdown[0.2,0;3;type;"..S("switch,button 2s,button 4s,button 8s,button 16s")..";1]"..
"field[0.5,2;7,1;numbers;"..S("Insert destination node number(s)")..";]" ..
"checkbox[1,3;public;"..S("public")..";false]"..
"button_exit[2,4;3,1;exit;"..S("Save").."]")
meta:set_string("placer_name", placer:get_player_name())
meta:set_string("public", "false")
meta:set_int("cycle_time", 0)
meta:set_string("infotext", "Tubelib Button "..own_num)
meta:set_string("infotext", S("Tubelib Button").." "..own_num)
end,
on_receive_fields = function(pos, formname, fields, player)
@ -96,7 +98,7 @@ minetest.register_node("tubelib:button", {
if tubelib.check_numbers(fields.numbers) then -- <<=== tubelib
meta:set_string("numbers", fields.numbers)
local own_num = meta:get_string("own_num")
meta:set_string("infotext", "Tubelib Button "..own_num..", connected with block "..fields.numbers)
meta:set_string("infotext", S("Tubelib Button").." "..own_num..", "..S("connected with block").." "..fields.numbers)
else
return
end
@ -142,7 +144,7 @@ minetest.register_node("tubelib:button", {
minetest.register_node("tubelib:button_active", {
description = "Tubelib Button/Switch",
description = S("Tubelib Button/Switch"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
command.lua:
@ -607,9 +607,11 @@ function tubelib.temporary_remove_node(pos, number, name, add_data)
add_data.name = name
TemporaryRemovedNodes[key] = add_data
else
local data = table.copy(TemporaryRemovedNodes[key])
TemporaryRemovedNodes[key] = nil
return data
if TemporaryRemovedNodes[key] then
local data = table.copy(TemporaryRemovedNodes[key])
TemporaryRemovedNodes[key] = nil
return data
end
end
end

View File

@ -1,5 +1,8 @@
-- Load support for I18n
local S = tubelib.S
minetest.register_node("tubelib:defect_dummy", {
description = "Corrupted Tubelib Node",
description = S("Corrupted Tubelib Node"),
tiles = {
"tubelib_front.png",
"tubelib_front.png",
@ -22,7 +25,7 @@ local function already_reported(pos)
end
function tubelib.data_not_corrupted(pos)
function tubelib.data_not_corrupted(pos, has_no_info)
if minetest.pos_to_string(pos) ~= minetest.get_meta(pos):get_string("my_pos") then
-- node number corrupt?
local meta = minetest.get_meta(pos)
@ -42,6 +45,13 @@ function tubelib.data_not_corrupted(pos)
report(pos)
end
end
-- button like odes
if has_no_info then
minetest.get_meta(pos):get_string("my_pos", minetest.pos_to_string(pos))
return true
end
-- node moved?
local info = tubelib.get_node_info(number)
if not info or not vector.equals(info.pos, pos) then

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
distributor.lua:
@ -19,8 +19,10 @@
response is "running", "stopped", "standby", "defect", or "not supported"
]]--
-- Load support for I18n
local S = tubelib.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -62,7 +64,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib:distributor",
node_name_active = "tubelib:distributor_active",
node_name_defect = "tubelib:distributor_defect",
infotext_name = "Tubelib Distributor",
infotext_name = S("Tubelib Distributor"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
aging_factor = 10,
@ -353,7 +355,7 @@ local function change_filter_settings(pos, slot, val)
end
minetest.register_node("tubelib:distributor", {
description = "Tubelib Distributor",
description = S("Tubelib Distributor"),
tiles = {
-- up, down, right, left, back, front
'tubelib_distributor.png',
@ -413,7 +415,7 @@ minetest.register_node("tubelib:distributor", {
minetest.register_node("tubelib:distributor_active", {
description = "Tubelib Distributor",
description = S("Tubelib Distributor"),
tiles = {
-- up, down, right, left, back, front
{
@ -451,7 +453,7 @@ minetest.register_node("tubelib:distributor_active", {
})
minetest.register_node("tubelib:distributor_defect", {
description = "Tubelib Distributor",
description = S("Tubelib Distributor"),
tiles = {
-- up, down, right, left, back, front
'tubelib_distributor.png',

View File

@ -3,17 +3,20 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
forceload.lua:
]]--
-- Load support for I18n
local S = tubelib.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -109,22 +112,22 @@ local function formspec(player)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"label[0,0;List of your Forceload Blocks:]"
"label[0,0;"..S("List of your Forceload Blocks")..":]"
for idx,pos in ipairs(lPos) do
local pos1, pos2 = calc_area(pos)
local ypos = 0.2 + idx * 0.4
tRes[#tRes+1] = "label[0,"..ypos..";"..idx.."]"
tRes[#tRes+1] = "label[0.8,"..ypos..";"..S(pos1).."]"
tRes[#tRes+1] = "label[3.2,"..ypos..";to]"
tRes[#tRes+1] = "label[4,"..ypos..";"..S(pos2).."]"
tRes[#tRes+1] = "label[0.8,"..ypos..";"..P2S(pos1).."]"
tRes[#tRes+1] = "label[3.2,"..ypos..";"..S("to").."]"
tRes[#tRes+1] = "label[4,"..ypos..";"..P2S(pos2).."]"
end
return table.concat(tRes)
end
minetest.register_node("tubelib:forceload", {
description = "Tubelib Forceload Block",
description = S("Tubelib Forceload Block"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -145,13 +148,13 @@ minetest.register_node("tubelib:forceload", {
if add_pos(pos, placer) then
minetest.forceload_block(pos, true)
local pos1, pos2, num, max = get_data(pos, placer)
M(pos):set_string("infotext", "Area "..S(pos1).." to "..S(pos2).." loaded!\n"..
"Punch the block to make the area visible.")
chat(placer, "Area ("..num.."/"..max..") "..S(pos1).." to "..S(pos2).." loaded!")
M(pos):set_string("infotext", S("Area").." "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!").."\n"..
S("Punch the block to make the area visible."))
chat(placer, S("Area").." ("..num.."/"..max..") "..P2S(pos1).." "..S("to").." "..P2S(pos2).." "..S("loaded!"))
tubelib.mark_region(placer:get_player_name(), pos1, pos2)
M(pos):set_string("owner", placer:get_player_name())
else
chat(placer, "Area already loaded or max. number of Forceload Blocks reached!")
chat(placer, S("Area already loaded or max. number of Forceload Blocks reached!"))
minetest.remove_node(pos)
return itemstack
end

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
History:
@ -34,6 +34,10 @@ tubelib = {
NodeDef = {}, -- node registration info
}
-- Load support for I18n
tubelib.S = minetest.get_translator("tubelib")
local S = tubelib.S
tubelib.version = 2.00
tubelib.max_num_forceload_blocks = tonumber(minetest.setting_get("tubelib_max_num_forceload_blocks")) or 10
@ -78,7 +82,7 @@ minetest.register_lbm({
})
minetest.register_craftitem("tubelib:wlanchip", {
description = "Tubelib WLAN Chip",
description = S("Tubelib WLAN Chip"),
inventory_image = "tubelib_wlanchip.png",
})

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
lamp.lua:
@ -18,6 +18,9 @@
]]--
-- Load support for I18n
local S = tubelib.S
local function switch_on(pos, node)
node.name = "tubelib:lamp_on"
minetest.swap_node(pos, node)
@ -29,7 +32,7 @@ local function switch_off(pos, node)
end
minetest.register_node("tubelib:lamp", {
description = "Tubelib Lamp",
description = S("Tubelib Lamp"),
tiles = {
'tubelib_lamp.png',
},
@ -37,7 +40,7 @@ minetest.register_node("tubelib:lamp", {
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib:lamp") -- <<=== tubelib
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Tubelib Lamp "..number)
meta:set_string("infotext", S("Tubelib Lamp").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@ -60,7 +63,7 @@ minetest.register_node("tubelib:lamp", {
})
minetest.register_node("tubelib:lamp_on", {
description = "Tubelib Lamp",
description = S("Tubelib Lamp"),
tiles = {
'tubelib_lamp.png',
},

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
legacy_nodes.lua:

View File

@ -0,0 +1,69 @@
# textdomain: tubelib
### basalt.lua ###
Basalt Stone=
Basalt Stone Block=
Basalt Stone Brick=
### blackhole.lua ###
Tubelib Black Hole=
items disappeared=
### button.lua ###
Insert destination node number(s)=
Save=
Tubelib Button=
Tubelib Button/Switch=
connected with block=
public=
switch,button 2s,button 4s,button 8s,button 16s=
### defect.lua ###
Corrupted Tubelib Node=
### distributor.lua ###
Tubelib Distributor=
### forceload.lua ###
Area=
Area already loaded or max. number of Forceload Blocks reached!=
List of your Forceload Blocks=
Punch the block to make the area visible.=
Tubelib Forceload Block=
loaded!=
to=
### init.lua ###
Tubelib WLAN Chip=
### lamp.lua ###
Tubelib Lamp=
### pusher.lua ###
Tubelib Pusher=
### repairkit.lua ###
Tubelib End Wrench (use @= read status, place @= destroy)=
Tubelib Repair Kit=
[Tubelib] Node repaired=
[Tubelib] state=
aging=
counter=
### tubes.lua ###
Tubelib Tube=

View File

@ -0,0 +1,69 @@
# textdomain: tubelib
### basalt.lua ###
Basalt Stone=Basaltstein
Basalt Stone Block=Basaltsteinblock
Basalt Stone Brick=Basaltsteinziegel
### blackhole.lua ###
Tubelib Black Hole=Tubelib Schwarzes Loch
items disappeared=Gegenstände verschwunden
### button.lua ###
Insert destination node number(s)=Zielblocknummer(n) eingeben
Save=Speichern
Tubelib Button=Tubelib Taster
Tubelib Button/Switch=Tubelib Taster/Schalter
connected with block=verbunden mit Block
public=öffentlich
switch,button 2s,button 4s,button 8s,button 16s=Schalter,Taster 2s,Taster 4s,Taster 8s,Taster 16s
### defect.lua ###
Corrupted Tubelib Node=beschädigter Tubelib Block
### distributor.lua ###
Tubelib Distributor=Tubelib Verteiler
### forceload.lua ###
Area=Bereich
Area already loaded or max. number of Forceload Blocks reached!=Bereich bereits geladen oder max. Anzahl von Forceload Blöcken erreicht!
List of your Forceload Blocks=Liste deiner Forceload Blöcke
Punch the block to make the area visible.=Schlage den Block um den Bereich anzuzeigen
Tubelib Forceload Block=Tubelib Forceload Block
loaded!=geladen!
to=bis
### init.lua ###
Tubelib WLAN Chip=Tubelib WLAN Chip
### lamp.lua ###
Tubelib Lamp=Tubelib Lampe
### pusher.lua ###
Tubelib Pusher=Tubelib Schieber
### repairkit.lua ###
Tubelib End Wrench (use @= read status, place @= destroy)=Tubelib Gabelschlüssel (benutzen @= Status lesen, platzieren @= zerstören)
Tubelib Repair Kit=Tubelib Reparatur Kit
[Tubelib] Node repaired=[Tubelib] Block repariert
[Tubelib] state=Tubelib Zustand
aging=altern
counter=Zähler
### tubes.lua ###
Tubelib Tube=Tubelib Röhre

View File

@ -3,10 +3,10 @@
Tube Library
============
Copyright (C) 2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
Code derived from wordedit (sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote))
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
mark.lua:

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
node_states.lua:

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
pusher.lua:
@ -29,8 +29,10 @@
-- | |/
-- +--------+
-- Load support for I18n
local S = tubelib.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -42,7 +44,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib:pusher",
node_name_active = "tubelib:pusher_active",
node_name_defect = "tubelib:pusher_defect",
infotext_name = "Tubelib Pusher",
infotext_name = S("Tubelib Pusher"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -75,7 +77,7 @@ local function keep_running(pos, elapsed)
end
minetest.register_node("tubelib:pusher", {
description = "Tubelib Pusher",
description = S("Tubelib Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png',
@ -117,7 +119,7 @@ minetest.register_node("tubelib:pusher", {
minetest.register_node("tubelib:pusher_active", {
description = "Tubelib Pusher",
description = S("Tubelib Pusher"),
tiles = {
-- up, down, right, left, back, front
{
@ -182,7 +184,7 @@ minetest.register_node("tubelib:pusher_active", {
})
minetest.register_node("tubelib:pusher_defect", {
description = "Tubelib Pusher",
description = S("Tubelib Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_pusher1.png',

View File

@ -3,16 +3,18 @@
Tube Library
============
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
repairkit.lua:
]]--
-- Load support for I18n
local S = tubelib.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -29,7 +31,7 @@ local function repair_node(itemstack, user, pointed_thing)
local pos = pointed_thing.under
if pos then
if tubelib.repair_node(pos) then
minetest.chat_send_player(user:get_player_name(), "[Tubelib] Node repaired")
minetest.chat_send_player(user:get_player_name(), S("[Tubelib] Node repaired"))
itemstack:take_item()
return itemstack
end
@ -47,14 +49,14 @@ local function read_state(itemstack, user, pointed_thing)
local aging = tubelib.send_request(number, "aging", nil)
if state and counter and aging then
if type(counter) ~= "number" then counter = "unknown" end
minetest.chat_send_player(user:get_player_name(), "[Tubelib] state ="..state..", counter = "..counter..", aging = "..aging)
minetest.chat_send_player(user:get_player_name(), S("[Tubelib] state").." ="..state..", "..S("counter").." = "..counter..", "..S("aging").." = "..aging)
end
end
end
end
minetest.register_craftitem("tubelib:repairkit", {
description = "Tubelib Repair Kit",
description = S("Tubelib Repair Kit"),
inventory_image = "tubelib_repairkit.png",
wield_image = "tubelib_repairkit.png^[transformR270",
groups = {cracky=1, book=1},
@ -64,7 +66,7 @@ minetest.register_craftitem("tubelib:repairkit", {
minetest.register_node("tubelib:end_wrench", {
description = "Tubelib End Wrench (use = read status, place = destroy)",
description = S("Tubelib End Wrench (use = read status, place = destroy)"),
inventory_image = "tubelib_end_wrench.png",
wield_image = "tubelib_end_wrench.png",
groups = {cracky=1, book=1},

View File

@ -3,9 +3,9 @@
Tube Library
============
Copyright (C) 2017 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
states.lua:

View File

@ -3,15 +3,18 @@
Tubes based on tubelib2
=======================
Copyright (C) 2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
tubes.lua: Node registration and API functions to move items via tubes
]]--
-- Load support for I18n
local S = tubelib.S
-- used for registered nodes
tubelib.KnownNodes = {
["tubelib:tubeS"] = true,
@ -33,7 +36,7 @@ local Tube = tubelib2.Tube:new({
tubelib.Tube = Tube
minetest.register_node("tubelib:tubeS", {
description = "Tubelib Tube",
description = S("Tubelib Tube"),
tiles = { -- Top, base, right, left, front, back
"tubelib_tube.png^[transformR90",
"tubelib_tube.png^[transformR90",
@ -80,7 +83,7 @@ minetest.register_node("tubelib:tubeS", {
})
minetest.register_node("tubelib:tubeA", {
description = "Tubelib Tube",
description = S("Tubelib Tube"),
tiles = { -- Top, base, right, left, front, back
"tubelib_knee2.png",
"tubelib_hole2.png^[transformR180",

View File

@ -3,9 +3,9 @@
Tubelib Addons
==============
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
The autocrafter is derived from pipeworks:
@ -15,8 +15,10 @@
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -47,7 +49,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:autocrafter",
node_name_active = "tubelib_addons1:autocrafter_active",
node_name_defect = "tubelib_addons1:autocrafter_defect",
infotext_name = "Tubelib Autocrafter",
infotext_name = S("Tubelib Autocrafter"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -287,7 +289,7 @@ end
minetest.register_node("tubelib_addons1:autocrafter", {
description = "Tubelib Autocrafter",
description = S("Tubelib Autocrafter"),
drawtype = "normal",
tiles = {
'tubelib_front.png',
@ -335,7 +337,7 @@ minetest.register_node("tubelib_addons1:autocrafter", {
})
minetest.register_node("tubelib_addons1:autocrafter_active", {
description = "Tubelib Autocrafter",
description = S("Tubelib Autocrafter"),
drawtype = "normal",
tiles = {
'tubelib_front.png',
@ -368,7 +370,7 @@ minetest.register_node("tubelib_addons1:autocrafter_active", {
})
minetest.register_node("tubelib_addons1:autocrafter_defect", {
description = "Tubelib Autocrafter",
description = S("Tubelib Autocrafter"),
drawtype = "normal",
tiles = {
'tubelib_front.png',

View File

@ -3,15 +3,18 @@
Tubelib Addons 1
================
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
chest.lua
]]--
-- Load support for I18n
local S = tubelib_addons1.S
local PlayerActions = {}
local InventoryState = {}
@ -74,7 +77,7 @@ local function formspec()
end
minetest.register_node("tubelib_addons1:chest", {
description = "Tubelib Protected Chest",
description = S("Tubelib Protected Chest"),
tiles = {
-- up, down, right, left, back, front
"default_chest_top.png^tubelib_addons1_frame.png",
@ -97,7 +100,7 @@ minetest.register_node("tubelib_addons1:chest", {
meta:set_string("number", number)
meta:set_string("owner", placer:get_player_name())
meta:set_string("formspec", formspec())
meta:set_string("infotext", "Tubelib Protected Chest "..number)
meta:set_string("infotext", S("Tubelib Protected Chest").." "..number)
end,
can_dig = function(pos, player)
@ -157,7 +160,7 @@ tubelib.register_node("tubelib_addons1:chest", {}, {
local meta = minetest.get_meta(pos)
meta:set_string("dest_num", payload)
local number = meta:get_string("number")
meta:set_string("infotext", "Tubelib Protected Chest "..number.." connected with "..payload)
meta:set_string("infotext", S("Tubelib Protected Chest").." "..number.." "..S("connected with").." "..payload)
return true
end
else

View File

@ -3,15 +3,17 @@
Tubelib Addons 1
================
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
detector.lua:
]]--
-- Load support for I18n
local S = tubelib_addons1.S
local function switch_on(pos)
if tubelib.data_not_corrupted(pos) then
@ -42,7 +44,7 @@ end
minetest.register_node("tubelib_addons1:detector", {
description = "Tubelib Detector",
description = S("Tubelib Detector"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -58,10 +60,10 @@ minetest.register_node("tubelib_addons1:detector", {
local own_num = tubelib.add_node(pos, "tubelib_addons1:detector")
meta:set_string("own_num", own_num)
meta:set_string("formspec", "size[7.5,3]"..
"field[0.5,1;7,1;numbers;Insert destination node number(s);]" ..
"button_exit[2,2;3,1;exit;Save]")
"field[0.5,1;7,1;numbers;"..S("Insert destination node number(s)")..";]" ..
"button_exit[2,2;3,1;exit;"..S("Save").."]")
meta:set_string("placer_name", placer:get_player_name())
meta:set_string("infotext", "Tubelib Detector, unconfigured")
meta:set_string("infotext", S("Tubelib Detector, unconfigured"))
end,
on_receive_fields = function(pos, formname, fields, player)
@ -69,10 +71,10 @@ minetest.register_node("tubelib_addons1:detector", {
if tubelib.check_numbers(fields.numbers) then
meta:set_string("numbers", fields.numbers)
local own_num = meta:get_string("own_num")
meta:set_string("infotext", "Tubelib Detector, connected")
meta:set_string("infotext", S("Tubelib Detector, connected"))
meta:set_string("formspec", "size[7.5,3]"..
"field[0.5,1;7,1;numbers;Insert destination node number(s);"..fields.numbers.."]" ..
"button_exit[2,2;3,1;exit;Save]")
"field[0.5,1;7,1;numbers;"..S("Insert destination node number(s)")..";"..fields.numbers.."]" ..
"button_exit[2,2;3,1;exit;"..S("Save").."]")
end
end,
@ -91,7 +93,7 @@ minetest.register_node("tubelib_addons1:detector", {
minetest.register_node("tubelib_addons1:detector_active", {
description = "Tubelib Detector",
description = S("Tubelib Detector"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',

View File

@ -3,9 +3,9 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
fermenter.lua
@ -15,8 +15,10 @@
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -46,7 +48,7 @@ end
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:fermenter",
node_name_defect = "tubelib_addons1:fermenter_defect",
infotext_name = "Tubelib Fermenter",
infotext_name = S("Tubelib Fermenter"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -161,7 +163,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:fermenter", {
description = "Tubelib Fermenter",
description = S("Tubelib Fermenter"),
inventory_image = "tubelib_addons1_fermenter_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -192,7 +194,7 @@ minetest.register_node("tubelib_addons1:fermenter", {
State:node_init(pos, number)
else
minetest.remove_node(pos)
minetest.chat_send_player(placer:get_player_name(), "Fermenter will not fit there")
minetest.chat_send_player(placer:get_player_name(), S("Fermenter will not fit there"))
return true
end
end,
@ -231,7 +233,7 @@ minetest.register_node("tubelib_addons1:fermenter", {
})
minetest.register_node("tubelib_addons1:fermenter_defect", {
description = "Tubelib Fermenter defect",
description = S("Tubelib Fermenter defect"),
inventory_image = "tubelib_addons1_fermenter_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -263,7 +265,7 @@ minetest.register_node("tubelib_addons1:fermenter_defect", {
State:defect(pos, M(pos))
else
minetest.remove_node(pos)
minetest.chat_send_player(placer:get_player_name(), "Fermenter will not fit there")
minetest.chat_send_player(placer:get_player_name(), S("Fermenter will not fit there"))
return true
end
end,
@ -303,7 +305,7 @@ minetest.register_node("tubelib_addons1:fermenter_defect", {
})
minetest.register_node("tubelib_addons1:fermenter_top", {
description = "Tubelib Fermenter Top",
description = S("Tubelib Fermenter Top"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -323,19 +325,19 @@ minetest.register_node("tubelib_addons1:fermenter_top", {
})
minetest.register_craftitem("tubelib_addons1:biogas", {
description = "Bio Gas",
description = S("Bio Gas"),
inventory_image = "tubelib_addons1_biogas.png",
})
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("fermenting", {
description = "Fermenter",
description = S("Fermenter"),
icon = "tubelib_addons1_fermenter_inventory.png",
width = 2,
height = 2,
})
unified_inventory.register_craft_type("reforming", {
description = "Reformer",
description = S("Reformer"),
icon = "tubelib_addons1_reformer_inventory.png",
width = 2,
height = 2,

View File

@ -3,15 +3,18 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
funnel.lua
]]--
-- Load support for I18n
local S = tubelib_addons1.S
local function allow_metadata_inventory_put(pos, listname, index, stack, player)
if minetest.is_protected(pos, player:get_player_name()) then
return 0
@ -60,7 +63,7 @@ local function scan_for_objects(pos, elapsed)
end
minetest.register_node("tubelib_addons1:funnel", {
description = "Tubelib Funnel",
description = S("Tubelib Funnel"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_funnel_top.png',

View File

@ -3,9 +3,9 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
grinder.lua
@ -14,8 +14,10 @@
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -49,7 +51,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:grinder",
node_name_active = "tubelib_addons1:grinder_active",
node_name_defect = "tubelib_addons1:grinder_defect",
infotext_name = "Tubelib Grinder",
infotext_name = S("Tubelib Grinder"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -120,7 +122,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:grinder", {
description = "Tubelib Grinder",
description = S("Tubelib Grinder"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_grinder.png',
@ -170,7 +172,7 @@ minetest.register_node("tubelib_addons1:grinder", {
minetest.register_node("tubelib_addons1:grinder_active", {
description = "Tubelib Grinder",
description = S("Tubelib Grinder"),
tiles = {
-- up, down, right, left, back, front
{
@ -207,7 +209,7 @@ minetest.register_node("tubelib_addons1:grinder_active", {
})
minetest.register_node("tubelib_addons1:grinder_defect", {
description = "Tubelib Grinder",
description = S("Tubelib Grinder"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_grinder.png',
@ -296,7 +298,7 @@ tubelib.register_node("tubelib_addons1:grinder",
if minetest.global_exists("unified_inventory") then
unified_inventory.register_craft_type("grinding", {
description = "Grinding",
description = S("Grinding"),
icon = 'tubelib_addons1_grinder.png',
width = 1,
height = 1,

View File

@ -3,9 +3,9 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
harvester.lua
@ -19,8 +19,10 @@
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -56,8 +58,8 @@ local function formspec(self, pos, meta)
default.gui_bg_img..
default.gui_slots..
"dropdown[0,0;1.5;radius;4,6,8,10,12,14,16;"..radius.."]"..
"label[1.6,0.2;Area radius]"..
"checkbox[0,1;endless;Run endless;"..endless.."]"..
"label[1.6,0.2;"..S("Area radius").."]"..
"checkbox[0,1;endless;"..S("Run endless")..";"..endless.."]"..
"list[context;main;5,0;4,4;]"..
"list[context;fuel;1.5,3;1,1;]"..
"item_image[1.5,3;1,1;tubelib_addons1:biofuel]"..
@ -72,7 +74,7 @@ end
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:harvester_base",
node_name_defect = "tubelib_addons1:harvester_defect",
infotext_name = "Tubelib Harvester",
infotext_name = S("Tubelib Harvester"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -254,8 +256,8 @@ local function keep_running(pos, elapsed)
if harvest_field(this, meta) then
meta:set_string("this", minetest.serialize(this))
meta:set_string("infotext",
"Tubelib Harvester "..this.number..
": running ("..this.idx.."/"..this.max..")")
S("Tubelib Harvester").." "..this.number..
S(": running (")..this.idx.."/"..this.max..")")
State:keep_running(pos, meta, COUNTDOWN_TICKS, this.num_items)
else
State:blocked(pos, meta)
@ -300,7 +302,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:harvester_base", {
description = "Tubelib Harvester Base",
description = S("Tubelib Harvester Base"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -356,7 +358,7 @@ minetest.register_node("tubelib_addons1:harvester_base", {
})
minetest.register_node("tubelib_addons1:harvester_defect", {
description = "Tubelib Harvester Base",
description = S("Tubelib Harvester Base"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',

View File

@ -3,13 +3,17 @@
Tubelib Addons 1
================
Copyright (C) 2017,2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
]]--
tubelib_addons1 = {}
-- Load support for I18n
tubelib_addons1.S = minetest.get_translator("tubelib_addons1")
dofile(minetest.get_modpath("tubelib_addons1") .. "/quarry.lua")
dofile(minetest.get_modpath("tubelib_addons1") .. "/grinder.lua")

View File

@ -3,17 +3,19 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
liquidsampler.lua
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -43,7 +45,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:liquidsampler",
node_name_active = "tubelib_addons1:liquidsampler_active",
node_name_defect = "tubelib_addons1:liquidsampler_defect",
infotext_name = "Liquid Sampler",
infotext_name = S("Liquid Sampler"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -128,7 +130,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:liquidsampler", {
description = "Liquid Sampler",
description = S("Liquid Sampler"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -180,7 +182,7 @@ minetest.register_node("tubelib_addons1:liquidsampler", {
})
minetest.register_node("tubelib_addons1:liquidsampler_active", {
description = "Liquid Sampler",
description = S("Liquid Sampler"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -216,7 +218,7 @@ minetest.register_node("tubelib_addons1:liquidsampler_active", {
})
minetest.register_node("tubelib_addons1:liquidsampler_defect", {
description = "Liquid Sampler",
description = S("Liquid Sampler"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',

View File

@ -0,0 +1,75 @@
# textdomain: tubelib_addons1
### autocrafter.lua ###
Tubelib Autocrafter=
### chest.lua ###
Tubelib Protected Chest=
connected with=
### detector.lua ###
Insert destination node number(s)=
Save=
Tubelib Detector=
Tubelib Detector, connected=
Tubelib Detector, unconfigured=
### fermenter.lua ###
Bio Gas=
Fermenter=
Fermenter will not fit there=
Reformer=
Tubelib Fermenter=
Tubelib Fermenter Top=
Tubelib Fermenter defect=
### funnel.lua ###
Tubelib Funnel=
### grinder.lua ###
Grinding=
Tubelib Grinder=
### harvester.lua ###
: running (=
Area radius=
Tubelib Harvester=
Tubelib Harvester Base=
### harvester.lua ###
### quarry.lua ###
Run endless=
### liquidsampler.lua ###
Liquid Sampler=
### pusher_fast.lua ###
Fast Pusher=
### quarry.lua ###
Digging depth=
Start level=
Tubelib Quarry=
[Tubelib Quarry] Area is protected!=
running=
### reformer.lua ###
Bio Fuel=
Reformer will not fit there=
Tubelib Reformer=
Tubelib Reformer Top=
Tubelib Reformer defect=

View File

@ -0,0 +1,75 @@
# textdomain: tubelib_addons1
### autocrafter.lua ###
Tubelib Autocrafter=Tubelib Autocrafter
### chest.lua ###
Tubelib Protected Chest=Tubelib geschützte Kiste
connected with=verbunden mit
### detector.lua ###
Insert destination node number(s)=Geben Sie die Zielknotennummer(n) ein.
Save=Speichern
Tubelib Detector=Tubelib Detektor
Tubelib Detector, connected=Tubelib Detektor, verbunden
Tubelib Detector, unconfigured=Tubelib Detektor, nicht konfiguriert
### fermenter.lua ###
Bio Gas=Biogas
Fermenter=Fermenter
Fermenter will not fit there=Fermenter wird dort nicht passen
Reformer=Reformer
Tubelib Fermenter=Tubelib Fermenter
Tubelib Fermenter Top=Tubelib Fermenter Oberteil
Tubelib Fermenter defect=Tubelib Fermenter defekt
### funnel.lua ###
Tubelib Funnel=Tubelib Trichter
### grinder.lua ###
Grinding=Mahlen
Tubelib Grinder=Tubelib Mühle
### harvester.lua ###
: running (=: läuft (
Area radius=Flächenradius
Tubelib Harvester=Tubelib Ernter
Tubelib Harvester Base=Tubelib Ernter Basis
### harvester.lua ###
### quarry.lua ###
Run endless=endlos laufen
### liquidsampler.lua ###
Liquid Sampler=Flüssigkeitsaufnehmer
### pusher_fast.lua ###
Fast Pusher=Schneller Schieber
### quarry.lua ###
Digging depth=Grabetiefe
Start level=Startebene
Tubelib Quarry=Tubelib Steinbrecher
[Tubelib Quarry] Area is protected!=[Tubelib Steinbrecher] Gebiet ist geschützt!
running=läuft
### reformer.lua ###
Bio Fuel=Biotreibstoff
Reformer will not fit there=Reformer wird dort nicht passen
Tubelib Reformer=Tubelib Reformer
Tubelib Reformer Top=Tubelib Reformer Oberteil
Tubelib Reformer defect=Tubelib Reformer defekt

View File

@ -3,15 +3,13 @@
Tubelib Addons 1
================
Copyright (C) 2017,2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
]]--
tubelib_addons1 = {}
-- tables needed for Harvester
tubelib_addons1.FarmingNodes = {}
tubelib_addons1.Flowers = {}
@ -68,6 +66,7 @@ fn("default:jungleleaves")
fn("default:bush_leaves")
fn("default:acacia_bush_leaves")
fn("default:blueberry_bush_leaves")
fn("default:cactus", "default:cactus", "default:cactus")
fn("default:papyrus", "default:papyrus", "default:papyrus")
@ -77,6 +76,7 @@ fn("default:apple")
if farming.mod ~= "redo" then
dn("farming:wheat_8", "farming:wheat", "farming:wheat_1")
dn("farming:cotton_8", "farming:cotton", "farming:cotton_1")
dn("farming:blueberry_bush_leaves_with_berries", "default:blueberries", "farming:blueberry_bush_leaves")
end
-------------------------------------------------------------------------------
@ -117,7 +117,7 @@ end
-- Ethereal Farming
-------------------------------------------------------------------------------
fn("ethereal:strawberry_8", "ethereal:strawberry 2", "ethereal:strawberry 1")
fn("ethereal:onion_5", "ethereal:wild_onion_plant 2", "ethereal:onion_1")
fn("ethereal:onion_5", "ethereal:wild_onion_plant 2", "ethereal:onion_1")
fn("ethereal:willow_trunk", "ethereal:willow_trunk", "ethereal:willow_sapling")
@ -162,24 +162,28 @@ gn("default:ice")
gn("default:snowblock")
gn("default:snow")
gn("default:obsidian")
gn("default:mese")
gn("stairs:stair_cobble")
gn("stairs:stair_mossycobble")
gn("stairs:stair_desert_cobble")
gn("default:permafrost")
gn("default:permafrost_with_moss")
gn("default:permafrost_with_stones")
gn("default:stone", "default:cobble")
gn("default:desert_stone", "default:desert_cobble")
gn("default:sandstone", "default:sandstone")
gn("default:desert_sandstone", "default:desert_sandstone")
gn("default:silver_sandstone", "default:silver_sandstone")
gn("default:clay", "default:clay_lump")
gn("default:stone_with_coal", "default:coal_lump")
gn("default:stone_with_iron", "default:iron_lump")
gn("default:stone_with_copper", "default:copper_lump")
gn("default:stone_with_gold", "default:gold_lump")
gn("default:stone_with_tin", "default:tin_lump")
gn("default:stone_with_mese", "default:mese_crystal")
gn("default:stone_with_diamond", "default:diamond")
gn("default:dirt_with_grass", "default:dirt")
@ -188,6 +192,13 @@ gn("default:dirt_with_dry_grass", "default:dirt")
gn("default:dirt_with_snow", "default:dirt")
gn("default:dirt_with_rainforest_litter", "default:dirt")
gn("default:dirt_with_grass", "default:dirt")
gn("default:dirt_with_coniferous_litter", "default:dirt")
gn("default:dry_dirt", "default:dry_dirt")
gn("default:dry_dirt_with_dry_grass", "default:dry_dirt")
gn("default:dirt_with_coniferous_litter")
gn("default:dirt_with_coniferous_litter")
gn("default:dirt_with_coniferous_litter")
gn("default:coral_skeleton", "default:coral_skeleton")
gn("default:coral_orange", "default:coral_skeleton")

View File

@ -3,9 +3,9 @@
Tubelib Addons 1
================
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
pusher_fast.lua:
@ -29,8 +29,10 @@
-- | |/
-- +--------+
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -42,7 +44,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:pusher_fast",
node_name_active = "tubelib_addons1:pusher_fast_active",
node_name_defect = "tubelib_addons1:pusher_fast_defect",
infotext_name = "Fast Pusher",
infotext_name = S("Fast Pusher"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -75,7 +77,7 @@ local function keep_running(pos, elapsed)
end
minetest.register_node("tubelib_addons1:pusher_fast", {
description = "Fast Pusher",
description = S("Fast Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_pusher.png',
@ -117,7 +119,7 @@ minetest.register_node("tubelib_addons1:pusher_fast", {
minetest.register_node("tubelib_addons1:pusher_fast_active", {
description = "Fast Pusher",
description = S("Fast Pusher"),
tiles = {
-- up, down, right, left, back, front
{
@ -182,7 +184,7 @@ minetest.register_node("tubelib_addons1:pusher_fast_active", {
})
minetest.register_node("tubelib_addons1:pusher_fast_defect", {
description = "Fast Pusher",
description = S("Fast Pusher"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons1_pusher.png',

View File

@ -3,9 +3,9 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
quarry.lua
@ -20,8 +20,11 @@
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P2S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -55,10 +58,10 @@ local function formspec(self, pos, meta)
default.gui_bg_img..
default.gui_slots..
"dropdown[0,0;1.5;level;2,1,0,-1,-2,-3,-5,-10,-15,-20;"..Level2Idx[start_level].."]"..
"label[1.6,0.2;Start level]"..
"label[1.6,0.2;"..S("Start level").."]"..
"dropdown[0,1;1.5;depth;1,2,3,5,10,15,20,25,50,100;"..Depth2Idx[depth].."]"..
"label[1.6,1.2;Digging depth]"..
"checkbox[0,2;endless;Run endless;"..endless.."]"..
"label[1.6,1.2;"..S("Digging depth").."]"..
"checkbox[0,2;endless;"..S("Run endless")..";"..endless.."]"..
"list[context;main;5,0;4,4;]"..
"list[context;fuel;1.5,3;1,1;]"..
"item_image[1.5,3;1,1;tubelib_addons1:biofuel]"..
@ -74,7 +77,7 @@ local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:quarry",
node_name_active = "tubelib_addons1:quarry_active",
node_name_defect = "tubelib_addons1:quarry_defect",
infotext_name = "Tubelib Quarry",
infotext_name = S("Tubelib Quarry"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -209,10 +212,10 @@ local function quarry_next_node(pos, meta)
return
end
meta:set_int("idx", idx)
meta:set_string("quarry_pos", S(quarry_pos))
meta:set_string("quarry_pos", P2S(quarry_pos))
if minetest.is_protected(quarry_pos, owner) then
minetest.chat_send_player(owner, "[Tubelib Quarry] Area is protected!")
minetest.chat_send_player(owner, S("[Tubelib Quarry] Area is protected!"))
State:fault(pos, meta)
return
end
@ -226,15 +229,15 @@ local function quarry_next_node(pos, meta)
if inv:room_for_item("main", ItemStack(order.drop)) then
minetest.remove_node(quarry_pos)
inv:add_item("main", ItemStack(order.drop))
meta:set_string("infotext", "Tubelib Quarry "..number..
": running "..idx.."/"..(start_y-quarry_pos.y+1))
meta:set_string("infotext", S("Tubelib Quarry").." "..number..
": "..S("running").." "..idx.."/"..(start_y-quarry_pos.y+1))
State:keep_running(pos, meta, COUNTDOWN_TICKS, 1)
else
State:blocked(pos, meta)
end
else
meta:set_string("infotext", "Tubelib Quarry "..number..
": running "..idx.."/"..(start_y-quarry_pos.y+1))
meta:set_string("infotext", S("Tubelib Quarry").." "..number..
": "..S("running").." "..idx.."/"..(start_y-quarry_pos.y+1))
end
end
end
@ -284,7 +287,7 @@ local function on_receive_fields(pos, formname, fields, player)
end
minetest.register_node("tubelib_addons1:quarry", {
description = "Tubelib Quarry",
description = S("Tubelib Quarry"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -336,7 +339,7 @@ minetest.register_node("tubelib_addons1:quarry", {
})
minetest.register_node("tubelib_addons1:quarry_active", {
description = "Tubelib Quarry",
description = S("Tubelib Quarry"),
tiles = {
-- up, down, right, left, back, front
@ -374,7 +377,7 @@ minetest.register_node("tubelib_addons1:quarry_active", {
})
minetest.register_node("tubelib_addons1:quarry_defect", {
description = "Tubelib Quarry",
description = S("Tubelib Quarry"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',

View File

@ -3,9 +3,9 @@
Tubelib Addons 1
================
Copyright (C) 2017-2019 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
reformer.lua
@ -15,8 +15,10 @@
]]--
-- Load support for I18n
local S = tubelib_addons1.S
-- for lazy programmers
local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
local P = minetest.string_to_pos
local M = minetest.get_meta
@ -46,7 +48,7 @@ end
local State = tubelib.NodeStates:new({
node_name_passive = "tubelib_addons1:reformer",
node_name_defect = "tubelib_addons1:reformer_defect",
infotext_name = "Tubelib Reformer",
infotext_name = S("Tubelib Reformer"),
cycle_time = CYCLE_TIME,
standby_ticks = STANDBY_TICKS,
has_item_meter = true,
@ -157,7 +159,7 @@ end
minetest.register_node("tubelib_addons1:reformer", {
description = "Tubelib Reformer",
description = S("Tubelib Reformer"),
inventory_image = "tubelib_addons1_reformer_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -188,7 +190,7 @@ minetest.register_node("tubelib_addons1:reformer", {
State:node_init(pos, number)
else
minetest.remove_node(pos)
minetest.chat_send_player(placer:get_player_name(), "Reformer will not fit there")
minetest.chat_send_player(placer:get_player_name(), S("Reformer will not fit there"))
return true
end
end,
@ -227,7 +229,7 @@ minetest.register_node("tubelib_addons1:reformer", {
})
minetest.register_node("tubelib_addons1:reformer_defect", {
description = "Tubelib Reformer defect",
description = S("Tubelib Reformer defect"),
inventory_image = "tubelib_addons1_reformer_inventory.png",
tiles = {
-- up, down, right, left, back, front
@ -259,7 +261,7 @@ minetest.register_node("tubelib_addons1:reformer_defect", {
State:defect(pos, M(pos))
else
minetest.remove_node(pos)
minetest.chat_send_player(placer:get_player_name(), "Reformer will not fit there")
minetest.chat_send_player(placer:get_player_name(), S("Reformer will not fit there"))
return true
end
end,
@ -300,7 +302,7 @@ minetest.register_node("tubelib_addons1:reformer_defect", {
minetest.register_node("tubelib_addons1:reformer_top", {
description = "Tubelib Reformer Top",
description = S("Tubelib Reformer Top"),
tiles = {
-- up, down, right, left, back, front
'tubelib_front.png',
@ -320,7 +322,7 @@ minetest.register_node("tubelib_addons1:reformer_top", {
})
minetest.register_craftitem("tubelib_addons1:biofuel", {
description = "Bio Fuel",
description = S("Bio Fuel"),
inventory_image = "tubelib_addons1_biofuel.png",
})

View File

@ -3,15 +3,18 @@
Tubelib Addons 2
================
Copyright (C) 2017 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
accesscontrol.lua:
]]--
-- Load support for I18n
local S = tubelib_addons2.S
local function switch_on(pos, meta)
if tubelib.data_not_corrupted(pos) then
minetest.sound_play("tubelib_addons2_door", {
@ -47,9 +50,9 @@ local function formspec1(numbers)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"field[0.5,1;5,1;numbers;Door block numbers:;"..numbers.."]" ..
"field[0.5,2.5;5,1;code;Access code (4 digits):;]" ..
"button_exit[1.5,3.5;2,1;exit;Save]"
"field[0.5,1;5,1;numbers;"..S("Door block numbers:")..";"..numbers.."]" ..
"field[0.5,2.5;5,1;code;"..S("Access code (4 digits):")..";]" ..
"button_exit[1.5,3.5;2,1;exit;"..S("Save").."]"
end
local function formspec2(code)
@ -57,7 +60,7 @@ local function formspec2(code)
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"field[0.5,1;3.6,1;code;Enter access code;"..code.."]" ..
"field[0.5,1;3.6,1;code;"..S("Enter access code")..";"..code.."]" ..
"button[0.4,2;1,1;b1;1]" ..
"button[1.6,2;1,1;b2;2]" ..
"button[2.8,2;1,1;b3;3]" ..
@ -67,11 +70,11 @@ local function formspec2(code)
"button[0.4,4;1,1;b7;7]" ..
"button[1.6,4;1,1;b8;8]" ..
"button[2.8,4;1,1;b9;9]" ..
"button_exit[1.6,5;1,1;ok;OK]"
"button_exit[1.6,5;1,1;ok;"..S("OK").."]"
end
minetest.register_node("tubelib_addons2:accesscontrol", {
description = "Tubelib Access Lock",
description = S("Tubelib Access Lock"),
tiles = {
-- up, down, right, left, back, front
'default_steel_block.png',
@ -99,7 +102,7 @@ minetest.register_node("tubelib_addons2:accesscontrol", {
meta:set_string("numbers", fields.numbers)
meta:set_string("code", fields.code)
meta:mark_as_private("code")
meta:set_string("infotext", "Tubelib Access Lock, Enter access code")
meta:set_string("infotext", S("Tubelib Access Lock, Enter access code"))
meta:set_string("formspec", formspec2(""))
end
end

View File

@ -3,15 +3,17 @@
Tubelib Addons 2
================
Copyright (C) 2017-2018 Joachim Stolberg
Copyright (C) 2017-2020 Joachim Stolberg
LGPLv2.1+
AGPL v3
See LICENSE.txt for more information
ceilinglamp.lua:
]]--
-- Load support for I18n
local S = tubelib_addons2.S
local function switch_on(pos, node)
node.name = "tubelib_addons2:ceilinglamp_on"
@ -27,7 +29,7 @@ local function switch_off(pos, node)
end
minetest.register_node("tubelib_addons2:ceilinglamp", {
description = "Tubelib Ceiling Lamp",
description = S("Tubelib Ceiling Lamp"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons2_ceilinglamp_top.png',
@ -53,7 +55,7 @@ minetest.register_node("tubelib_addons2:ceilinglamp", {
after_place_node = function(pos, placer)
local number = tubelib.add_node(pos, "tubelib_addons2:ceilinglamp")
local meta = minetest.get_meta(pos)
meta:set_string("infotext", "Tubelib Ceiling Lamp "..number)
meta:set_string("infotext", S("Tubelib Ceiling Lamp").." "..number)
end,
on_rightclick = function(pos, node, clicker)
@ -76,7 +78,7 @@ minetest.register_node("tubelib_addons2:ceilinglamp", {
})
minetest.register_node("tubelib_addons2:ceilinglamp_on", {
description = "Tubelib Ceiling Lamp",
description = S("Tubelib Ceiling Lamp"),
tiles = {
-- up, down, right, left, back, front
'tubelib_addons2_ceilinglamp_top.png',

Some files were not shown because too many files have changed in this diff Show More