From c28d6858b2e1da623df003eeeb9d5b8d62d44401 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Sun, 7 Feb 2021 14:37:07 +0100 Subject: [PATCH] built on 07/02/2021 14:37:07 --- basic_materials/locale/basic_materials.it.tr | 34 ++ compost/init.lua | 100 ++-- hyperloop/elevator.lua | 10 + hyperloop/i18n.py | 458 ++++++++++++++++++ hyperloop/init.lua | 6 +- hyperloop/intllib.sh | 3 - hyperloop/locale/de.mo | Bin 5253 -> 0 bytes hyperloop/locale/de.po | 314 ------------ hyperloop/locale/hyperloop.de.tr | 115 +++-- hyperloop/locale/template.pot | 304 ------------ hyperloop/locale/template.txt | 90 ++-- hyperloop/seat.lua | 9 +- hyperloop/tubecrowbar.lua | 8 + minecart/lib.lua | 12 +- minecart/monitoring.lua | 13 +- signs_bot/README.md | 13 +- signs_bot/bot_sensor.lua | 2 +- signs_bot/cmd_item.lua | 6 +- signs_bot/cmd_move.lua | 2 +- signs_bot/cmd_pattern.lua | 4 +- signs_bot/cmd_place.lua | 10 +- signs_bot/cmd_sign.lua | 4 +- signs_bot/commands.lua | 4 +- signs_bot/extender.lua | 2 +- signs_bot/init.lua | 11 +- signs_bot/interpreter.lua | 4 +- signs_bot/lib.lua | 21 +- signs_bot/node_sensor.lua | 6 +- signs_bot/robot.lua | 10 +- signs_bot/signal.lua | 6 +- signs_bot/techage.lua | 2 +- signs_bot/tool.lua | 2 +- ta4_paraglider/README.md | 3 +- ta4_paraglider/init.lua | 1 + techage/basic_machines/consumer.lua | 4 +- techage/basic_machines/distributor.lua | 15 +- techage/basic_machines/forceload.lua | 1 + techage/basic_machines/itemsource.lua | 100 ++++ techage/basic_machines/recycler.lua | 345 +++++++++++++ techage/basis/lib.lua | 14 +- techage/basis/recipe_lib.lua | 16 +- techage/doc/guide.lua | 6 +- techage/doc/items.lua | 2 + techage/doc/manual_DE.lua | 28 +- techage/doc/manual_EN.lua | 27 +- techage/doc/plans.lua | 63 ++- techage/energy_storage/inlet.lua | 49 +- techage/icta_controller/commands.lua | 49 ++ techage/icta_controller/display.lua | 4 +- techage/init.lua | 3 + techage/iron_age/coalburner.lua | 24 +- techage/iron_age/gravelsieve.lua | 4 +- techage/liquids/silo.lua | 21 +- techage/locale/techage.de.tr | 25 +- techage/locale/template.txt | 22 +- techage/logic/doorcontroller.lua | 2 +- techage/logic/doorcontroller2.lua | 352 ++++++++++++++ techage/logic/sequencer.lua | 2 + techage/lua_controller/commands.lua | 13 + techage/lua_controller/controller.lua | 14 +- techage/lua_controller/server.lua | 2 + techage/lua_controller/terminal.lua | 2 +- techage/manuals/manual_ta3_DE.md | 10 +- techage/manuals/manual_ta3_EN.md | 10 +- techage/manuals/manual_ta4_DE.md | 14 + techage/manuals/manual_ta4_EN.md | 16 + techage/manuals/toc_DE.md | 30 +- techage/manuals/toc_EN.md | 4 +- techage/power/electric_cable.lua | 2 +- techage/power/formspecs.lua | 2 +- techage/power/node_api.lua | 2 +- techage/textures/shrink.py | 6 +- techage/textures/techage_aluminum_inv.png | Bin 1332 -> 1227 bytes techage/textures/techage_appl_arrow.png | Bin 163 -> 122 bytes techage/textures/techage_appl_arrowXL.png | Bin 175 -> 154 bytes techage/textures/techage_appl_arrow_white.png | Bin 172 -> 151 bytes techage/textures/techage_appl_autocrafter.png | Bin 238 -> 139 bytes .../textures/techage_appl_autocrafter4.png | Bin 388 -> 217 bytes techage/textures/techage_appl_blackhole.png | Bin 156 -> 135 bytes techage/textures/techage_appl_button.png | Bin 173 -> 152 bytes .../textures/techage_appl_cartdetector.png | Bin 223 -> 161 bytes .../textures/techage_appl_cartdetector_on.png | Bin 227 -> 165 bytes .../textures/techage_appl_chest_back_ta3.png | Bin 303 -> 164 bytes .../textures/techage_appl_chest_back_ta4.png | Bin 290 -> 167 bytes .../textures/techage_appl_chest_front_ta3.png | Bin 430 -> 229 bytes techage/textures/techage_appl_color_top.png | Bin 226 -> 164 bytes techage/textures/techage_appl_color_top4.png | Bin 204 -> 183 bytes techage/textures/techage_appl_compressor.png | Bin 284 -> 263 bytes techage/textures/techage_appl_compressor4.png | Bin 477 -> 456 bytes techage/textures/techage_appl_cooler.png | Bin 383 -> 313 bytes techage/textures/techage_appl_ctrl_unit.png | Bin 233 -> 208 bytes techage/textures/techage_appl_ctrl_unit4.png | Bin 425 -> 210 bytes techage/textures/techage_appl_defect.png | Bin 297 -> 235 bytes techage/textures/techage_appl_detector.png | Bin 215 -> 194 bytes techage/textures/techage_appl_detector_on.png | Bin 215 -> 194 bytes techage/textures/techage_appl_distri_blue.png | Bin 212 -> 191 bytes .../textures/techage_appl_distri_green.png | Bin 212 -> 191 bytes techage/textures/techage_appl_distri_red.png | Bin 212 -> 191 bytes .../textures/techage_appl_distri_yellow.png | Bin 212 -> 191 bytes .../textures/techage_appl_doorcontroller.png | Bin 203 -> 182 bytes .../techage_appl_electric_gen_front.png | Bin 382 -> 225 bytes .../techage_appl_electric_gen_front4.png | Bin 572 -> 278 bytes .../techage_appl_electric_gen_side.png | Bin 215 -> 194 bytes .../techage_appl_electric_gen_top.png | Bin 251 -> 154 bytes .../textures/techage_appl_electrolyzer.png | Bin 223 -> 202 bytes .../textures/techage_appl_electrolyzer4.png | Bin 245 -> 224 bytes .../textures/techage_appl_electronic_fab.png | Bin 191 -> 170 bytes .../textures/techage_appl_electronic_fab4.png | Bin 220 -> 199 bytes techage/textures/techage_appl_explosive.png | Bin 217 -> 141 bytes techage/textures/techage_appl_filler.png | Bin 888 -> 432 bytes techage/textures/techage_appl_firehole.png | Bin 312 -> 178 bytes techage/textures/techage_appl_firehole4.png | Bin 1034 -> 405 bytes techage/textures/techage_appl_forceload.png | Bin 656 -> 638 bytes techage/textures/techage_appl_fuelcell.png | Bin 248 -> 138 bytes techage/textures/techage_appl_fuelcell4.png | Bin 354 -> 154 bytes techage/textures/techage_appl_funnel.png | Bin 200 -> 179 bytes techage/textures/techage_appl_funnel_top.png | Bin 273 -> 149 bytes techage/textures/techage_appl_furnace.png | Bin 296 -> 275 bytes techage/textures/techage_appl_generator.png | Bin 385 -> 211 bytes .../textures/techage_appl_generator_red.png | Bin 2673 -> 297 bytes .../textures/techage_appl_generator_red4.png | Bin 5430 -> 815 bytes techage/textures/techage_appl_grinder.png | Bin 1874 -> 984 bytes techage/textures/techage_appl_grinder2.png | Bin 468 -> 387 bytes techage/textures/techage_appl_grinder4.png | Bin 3430 -> 2090 bytes techage/textures/techage_appl_heater.png | Bin 180 -> 159 bytes techage/textures/techage_appl_heater_on.png | Bin 218 -> 197 bytes techage/textures/techage_appl_hole_pipe.png | Bin 228 -> 166 bytes techage/textures/techage_appl_hole_tube.png | Bin 309 -> 165 bytes techage/textures/techage_appl_hopper.png | Bin 159 -> 138 bytes .../textures/techage_appl_hopper_right.png | Bin 169 -> 148 bytes techage/textures/techage_appl_hopper_top.png | Bin 203 -> 182 bytes techage/textures/techage_appl_injector.png | Bin 273 -> 155 bytes techage/textures/techage_appl_injector14.png | Bin 473 -> 209 bytes techage/textures/techage_appl_inp.png | Bin 208 -> 187 bytes techage/textures/techage_appl_inverter.png | Bin 318 -> 168 bytes techage/textures/techage_appl_inverterDC.png | Bin 180 -> 159 bytes .../textures/techage_appl_liquid_hopper.png | Bin 248 -> 227 bytes .../textures/techage_appl_liquidsampler.png | Bin 216 -> 175 bytes techage/textures/techage_appl_logic.png | Bin 183 -> 162 bytes .../techage_appl_mesecons_converter.png | Bin 301 -> 243 bytes .../textures/techage_appl_nodedetector.png | Bin 265 -> 203 bytes .../textures/techage_appl_nodedetector_on.png | Bin 265 -> 203 bytes techage/textures/techage_appl_oildrill.png | Bin 185 -> 164 bytes techage/textures/techage_appl_oilexplorer.png | Bin 451 -> 235 bytes .../textures/techage_appl_oilexplorer_top.png | Bin 168 -> 147 bytes .../techage_appl_oilexplorer_top4.png | Bin 262 -> 240 bytes techage/textures/techage_appl_open.png | Bin 351 -> 235 bytes techage/textures/techage_appl_outp.png | Bin 213 -> 192 bytes .../textures/techage_appl_playerdetector.png | Bin 273 -> 157 bytes .../techage_appl_playerdetector_on.png | Bin 248 -> 186 bytes techage/textures/techage_appl_pump.png | Bin 175 -> 154 bytes techage/textures/techage_appl_pump8.png | Bin 250 -> 229 bytes techage/textures/techage_appl_pump_up.png | Bin 179 -> 158 bytes techage/textures/techage_appl_pump_up8.png | Bin 215 -> 194 bytes techage/textures/techage_appl_pumpjack.png | Bin 234 -> 167 bytes techage/textures/techage_appl_pumpjack14.png | Bin 382 -> 321 bytes techage/textures/techage_appl_pusher.png | Bin 272 -> 158 bytes techage/textures/techage_appl_pusher14.png | Bin 512 -> 491 bytes techage/textures/techage_appl_quarry.png | Bin 208 -> 187 bytes techage/textures/techage_appl_reboiler.png | Bin 204 -> 183 bytes techage/textures/techage_appl_reboiler4.png | Bin 324 -> 303 bytes techage/textures/techage_appl_recycler.png | Bin 0 -> 2013 bytes techage/textures/techage_appl_repeater.png | Bin 252 -> 194 bytes techage/textures/techage_appl_ribsB.png | Bin 219 -> 157 bytes techage/textures/techage_appl_ribsM.png | Bin 424 -> 170 bytes techage/textures/techage_appl_ribsT.png | Bin 217 -> 155 bytes techage/textures/techage_appl_rinser.png | Bin 230 -> 209 bytes techage/textures/techage_appl_rinser4_top.png | Bin 2591 -> 931 bytes techage/textures/techage_appl_rinser_top.png | Bin 704 -> 262 bytes techage/textures/techage_appl_sensor.png | Bin 1289 -> 597 bytes techage/textures/techage_appl_sequencer.png | Bin 254 -> 196 bytes techage/textures/techage_appl_sieve.png | Bin 243 -> 222 bytes techage/textures/techage_appl_sieve_top.png | Bin 171 -> 150 bytes techage/textures/techage_appl_silo.png | Bin 211 -> 190 bytes techage/textures/techage_appl_source.png | Bin 299 -> 181 bytes techage/textures/techage_appl_switch_inv.png | Bin 459 -> 223 bytes techage/textures/techage_appl_switch_off.png | Bin 555 -> 381 bytes techage/textures/techage_appl_switch_on.png | Bin 446 -> 370 bytes techage/textures/techage_appl_ta4_cable.png | Bin 248 -> 143 bytes techage/textures/techage_appl_tank.png | Bin 226 -> 205 bytes techage/textures/techage_appl_tes_core.png | Bin 175 -> 154 bytes techage/textures/techage_appl_tes_turb.png | Bin 169 -> 148 bytes techage/textures/techage_appl_timer.png | Bin 272 -> 214 bytes techage/textures/techage_appl_turbine.png | Bin 410 -> 237 bytes techage/textures/techage_appl_turbine4.png | Bin 751 -> 367 bytes techage/textures/techage_appl_warehouse.png | Bin 167 -> 146 bytes techage/textures/techage_ash.png | Bin 268 -> 186 bytes techage/textures/techage_ash_side.png | Bin 263 -> 177 bytes techage/textures/techage_axle.png | Bin 1080 -> 341 bytes techage/textures/techage_axle4.png | Bin 438 -> 367 bytes techage/textures/techage_axle4R.png | Bin 512 -> 410 bytes techage/textures/techage_axleR.png | Bin 1157 -> 370 bytes techage/textures/techage_axle_clutch.png | Bin 400 -> 187 bytes techage/textures/techage_axle_clutch4.png | Bin 358 -> 296 bytes techage/textures/techage_axle_gearbox.png | Bin 787 -> 320 bytes techage/textures/techage_axle_gearbox4.png | Bin 643 -> 573 bytes techage/textures/techage_baborium.png | Bin 251 -> 189 bytes techage/textures/techage_baborium_ingot.png | Bin 248 -> 171 bytes techage/textures/techage_baborium_lump.png | Bin 729 -> 341 bytes techage/textures/techage_barrel_inv.png | Bin 343 -> 281 bytes techage/textures/techage_basalt_glass.png | Bin 403 -> 358 bytes techage/textures/techage_basalt_glass3.png | Bin 403 -> 358 bytes techage/textures/techage_battery_green.png | Bin 322 -> 182 bytes .../textures/techage_battery_inventory.png | Bin 260 -> 163 bytes techage/textures/techage_battery_red.png | Bin 322 -> 194 bytes techage/textures/techage_bauxit_overlay.png | Bin 203 -> 129 bytes techage/textures/techage_bitumen_inv.png | Bin 308 -> 246 bytes techage/textures/techage_boiler.png | Bin 1684 -> 576 bytes techage/textures/techage_boiler2.png | Bin 698 -> 624 bytes techage/textures/techage_box_back.png | Bin 436 -> 395 bytes techage/textures/techage_bucket_oil.png | Bin 314 -> 184 bytes techage/textures/techage_button_off.png | Bin 168 -> 147 bytes techage/textures/techage_button_on.png | Bin 168 -> 147 bytes techage/textures/techage_canister_filling.png | Bin 201 -> 139 bytes techage/textures/techage_canister_frame.png | Bin 281 -> 219 bytes techage/textures/techage_carbon_fiber.png | Bin 858 -> 135 bytes techage/textures/techage_ceilinglamp.png | Bin 551 -> 335 bytes .../textures/techage_ceilinglamp_bottom.png | Bin 591 -> 322 bytes techage/textures/techage_ceilinglamp_top.png | Bin 158 -> 137 bytes techage/textures/techage_charcoal.png | Bin 762 -> 557 bytes .../textures/techage_chest_cart_bottom.png | Bin 306 -> 210 bytes techage/textures/techage_chest_cart_front.png | Bin 575 -> 262 bytes techage/textures/techage_chest_cart_side.png | Bin 603 -> 279 bytes techage/textures/techage_chest_cart_top.png | Bin 653 -> 248 bytes techage/textures/techage_coal_boiler.png | Bin 513 -> 451 bytes techage/textures/techage_coal_boiler4.png | Bin 540 -> 479 bytes .../techage_coal_boiler_fire_hole.png | Bin 341 -> 192 bytes techage/textures/techage_coal_boiler_hole.png | Bin 269 -> 122 bytes .../techage_coal_boiler_mesh_base.png | Bin 1393 -> 1331 bytes .../textures/techage_coal_boiler_mesh_top.png | Bin 1400 -> 1337 bytes techage/textures/techage_color16.png | Bin 153 -> 83 bytes .../textures/techage_compressed_gravel.png | Bin 753 -> 455 bytes techage/textures/techage_concrete.png | Bin 477 -> 276 bytes techage/textures/techage_concrete4.png | Bin 597 -> 425 bytes techage/textures/techage_constr_plan.png | Bin 809 -> 359 bytes techage/textures/techage_constr_plan_inv.png | Bin 387 -> 325 bytes techage/textures/techage_cooler.png | Bin 325 -> 263 bytes techage/textures/techage_cube_mark.png | Bin 216 -> 195 bytes techage/textures/techage_cylinder.png | Bin 242 -> 180 bytes techage/textures/techage_cylinder4.png | Bin 412 -> 353 bytes techage/textures/techage_display.png | Bin 148 -> 127 bytes techage/textures/techage_displayXL.png | Bin 151 -> 130 bytes .../textures/techage_display_inventory.png | Bin 241 -> 220 bytes .../textures/techage_display_inventoryXL.png | Bin 229 -> 208 bytes techage/textures/techage_electric_button.png | Bin 143 -> 122 bytes .../textures/techage_electric_button_off.png | Bin 160 -> 113 bytes .../textures/techage_electric_button_on.png | Bin 160 -> 113 bytes techage/textures/techage_electric_cable.png | Bin 247 -> 226 bytes .../textures/techage_electric_cable_end.png | Bin 269 -> 248 bytes .../textures/techage_electric_cable_inv.png | Bin 198 -> 177 bytes techage/textures/techage_electric_plug.png | Bin 164 -> 143 bytes techage/textures/techage_electric_switch.png | Bin 229 -> 208 bytes techage/textures/techage_electric_trowel.png | Bin 806 -> 297 bytes techage/textures/techage_fc_stack_inv.png | Bin 175 -> 154 bytes techage/textures/techage_fermenter_foil.png | Bin 134 -> 113 bytes techage/textures/techage_filling4_ta2.png | Bin 346 -> 324 bytes techage/textures/techage_filling4_ta3.png | Bin 1680 -> 429 bytes techage/textures/techage_filling8_ta2.png | Bin 353 -> 331 bytes techage/textures/techage_filling8_ta3.png | Bin 422 -> 400 bytes techage/textures/techage_filling_ta2.png | Bin 320 -> 301 bytes techage/textures/techage_filling_ta3.png | Bin 1535 -> 399 bytes techage/textures/techage_filling_ta4.png | Bin 220 -> 167 bytes techage/textures/techage_filter_inv.png | Bin 202 -> 181 bytes techage/textures/techage_flame.png | Bin 253 -> 201 bytes techage/textures/techage_form_add_arrow.png | Bin 182 -> 161 bytes techage/textures/techage_form_arrow.png | Bin 219 -> 198 bytes techage/textures/techage_form_arrow_bg.png | Bin 201 -> 180 bytes techage/textures/techage_form_arrow_fg.png | Bin 201 -> 180 bytes techage/textures/techage_form_gear_bg.png | Bin 469 -> 407 bytes techage/textures/techage_form_get_arrow.png | Bin 183 -> 162 bytes techage/textures/techage_form_grey.png | Bin 175 -> 113 bytes techage/textures/techage_form_input.png | Bin 206 -> 185 bytes techage/textures/techage_form_input_arrow.png | Bin 191 -> 170 bytes techage/textures/techage_form_inventory.png | Bin 181 -> 160 bytes techage/textures/techage_form_level_bg.png | Bin 213 -> 151 bytes .../textures/techage_form_level_charge.png | Bin 234 -> 172 bytes techage/textures/techage_form_level_fg.png | Bin 213 -> 151 bytes techage/textures/techage_form_level_off.png | Bin 221 -> 159 bytes .../textures/techage_form_level_red_fg.png | Bin 219 -> 157 bytes .../textures/techage_form_level_unload.png | Bin 234 -> 172 bytes techage/textures/techage_form_mask.png | Bin 185 -> 97 bytes .../textures/techage_form_output_arrow.png | Bin 191 -> 170 bytes techage/textures/techage_form_temp_bg.png | Bin 326 -> 264 bytes techage/textures/techage_form_temp_fg.png | Bin 325 -> 263 bytes techage/textures/techage_formspec_bg.png | Bin 124 -> 84 bytes techage/textures/techage_frame14_ta2.png | Bin 480 -> 432 bytes techage/textures/techage_frame14_ta3.png | Bin 1436 -> 426 bytes techage/textures/techage_frame14_ta4.png | Bin 552 -> 214 bytes techage/textures/techage_frame14_ta4_hp.png | Bin 3171 -> 214 bytes techage/textures/techage_frame4_ta3.png | Bin 1142 -> 380 bytes techage/textures/techage_frame4_ta3_top.png | Bin 1142 -> 380 bytes techage/textures/techage_frame4_ta4.png | Bin 337 -> 180 bytes techage/textures/techage_frame4_ta4_hp.png | Bin 1736 -> 180 bytes techage/textures/techage_frame4_ta4_top.png | Bin 209 -> 188 bytes .../textures/techage_frame4_ta4_top_hp.png | Bin 2060 -> 159 bytes techage/textures/techage_frame8_ta2.png | Bin 431 -> 410 bytes techage/textures/techage_frame8_ta4.png | Bin 404 -> 199 bytes techage/textures/techage_frame8_ta4_hp.png | Bin 1784 -> 199 bytes techage/textures/techage_frameB_ta4.png | Bin 242 -> 140 bytes techage/textures/techage_frameM_ta4.png | Bin 162 -> 141 bytes techage/textures/techage_frameT_ta4.png | Bin 266 -> 160 bytes techage/textures/techage_frame_small_ta3.png | Bin 418 -> 357 bytes techage/textures/techage_frame_ta2_top.png | Bin 399 -> 327 bytes techage/textures/techage_frame_ta4.png | Bin 260 -> 162 bytes techage/textures/techage_frame_ta4_hp.png | Bin 1318 -> 162 bytes techage/textures/techage_frame_ta4_top.png | Bin 238 -> 141 bytes techage/textures/techage_frame_ta4_top_hp.png | Bin 1347 -> 141 bytes techage/textures/techage_frame_waterpump.png | Bin 339 -> 286 bytes .../textures/techage_frame_waterpump_top.png | Bin 278 -> 254 bytes techage/textures/techage_framexl_ta3.png | Bin 792 -> 269 bytes techage/textures/techage_framexl_ta3_top.png | Bin 583 -> 270 bytes .../textures/techage_gas_cylinder_large.png | Bin 343 -> 281 bytes .../textures/techage_gas_cylinder_small.png | Bin 391 -> 329 bytes techage/textures/techage_gas_inv.png | Bin 1689 -> 664 bytes techage/textures/techage_gaspipe.png | Bin 591 -> 199 bytes techage/textures/techage_gaspipe_hole.png | Bin 499 -> 233 bytes techage/textures/techage_gaspipe_hole2.png | Bin 830 -> 288 bytes techage/textures/techage_gaspipe_junction.png | Bin 474 -> 400 bytes techage/textures/techage_gaspipe_knee.png | Bin 332 -> 253 bytes techage/textures/techage_gaspipe_knee2.png | Bin 356 -> 277 bytes .../textures/techage_gaspipe_valve_closed.png | Bin 225 -> 163 bytes .../textures/techage_gaspipe_valve_hole.png | Bin 274 -> 134 bytes .../textures/techage_gaspipe_valve_open.png | Bin 225 -> 163 bytes techage/textures/techage_gate.png | Bin 2233 -> 508 bytes techage/textures/techage_gravel4.png | Bin 496 -> 280 bytes techage/textures/techage_growlight_back.png | Bin 214 -> 150 bytes techage/textures/techage_growlight_off.png | Bin 358 -> 141 bytes techage/textures/techage_growlight_on.png | Bin 337 -> 143 bytes techage/textures/techage_growlight_side.png | Bin 247 -> 125 bytes .../textures/techage_heat_exchanger_inv.png | Bin 613 -> 592 bytes techage/textures/techage_hole_ta4.png | Bin 180 -> 159 bytes techage/textures/techage_hydrogen_inv.png | Bin 338 -> 317 bytes techage/textures/techage_industlight4_on.png | Bin 204 -> 144 bytes techage/textures/techage_industriallamp1.png | Bin 268 -> 246 bytes .../textures/techage_industriallamp1_on.png | Bin 327 -> 229 bytes techage/textures/techage_industriallamp2.png | Bin 229 -> 208 bytes .../textures/techage_industriallamp2_on.png | Bin 201 -> 180 bytes techage/textures/techage_industriallamp3.png | Bin 192 -> 171 bytes .../textures/techage_industriallamp3_on.png | Bin 191 -> 170 bytes .../textures/techage_industriallamp_inv1.png | Bin 429 -> 408 bytes .../textures/techage_industriallamp_inv2.png | Bin 657 -> 636 bytes .../textures/techage_industriallamp_inv3.png | Bin 789 -> 633 bytes .../textures/techage_inv_button_nopower.png | Bin 467 -> 418 bytes techage/textures/techage_inv_button_on.png | Bin 477 -> 380 bytes .../textures/techage_inv_button_warning.png | Bin 361 -> 300 bytes techage/textures/techage_inv_powerT2.png | Bin 380 -> 320 bytes techage/textures/techage_inv_powerT3.png | Bin 250 -> 188 bytes techage/textures/techage_iron_ingot.png | Bin 249 -> 191 bytes techage/textures/techage_liquid1_inv.png | Bin 228 -> 166 bytes techage/textures/techage_liquid2_inv.png | Bin 308 -> 246 bytes .../textures/techage_liquid_filter_filler.png | Bin 583 -> 183 bytes .../techage_liquid_filter_filler_bottom.png | Bin 641 -> 281 bytes techage/textures/techage_liquidsampler.png | Bin 385 -> 301 bytes techage/textures/techage_liquidsampler4.png | Bin 1547 -> 662 bytes .../techage_lua_controller_inventory.png | Bin 838 -> 410 bytes techage/textures/techage_lua_server_back.png | Bin 351 -> 183 bytes techage/textures/techage_lua_server_front.png | Bin 326 -> 166 bytes techage/textures/techage_lua_server_side.png | Bin 224 -> 166 bytes techage/textures/techage_lua_server_top.png | Bin 265 -> 135 bytes techage/textures/techage_meltingpot.png | Bin 255 -> 188 bytes .../techage_meltingpot_top_active.png | Bin 634 -> 551 bytes techage/textures/techage_meridium_ingot.png | Bin 266 -> 185 bytes techage/textures/techage_meridiumaxe.png | Bin 248 -> 162 bytes techage/textures/techage_meridiumpick.png | Bin 261 -> 181 bytes techage/textures/techage_meridiumshovel.png | Bin 257 -> 181 bytes techage/textures/techage_meridiumsword.png | Bin 230 -> 170 bytes techage/textures/techage_oil.png | Bin 213 -> 155 bytes techage/textures/techage_oil_animated.png | Bin 478 -> 457 bytes techage/textures/techage_oil_drillbit.png | Bin 167 -> 139 bytes techage/textures/techage_oil_drillbit_inv.png | Bin 205 -> 184 bytes techage/textures/techage_oil_tower1.png | Bin 437 -> 329 bytes techage/textures/techage_oil_tower2.png | Bin 769 -> 313 bytes techage/textures/techage_oil_tower3.png | Bin 550 -> 258 bytes techage/textures/techage_oil_tower4.png | Bin 485 -> 211 bytes techage/textures/techage_oil_tower_top.png | Bin 596 -> 265 bytes techage/textures/techage_pipe_wrench.png | Bin 366 -> 261 bytes techage/textures/techage_powder_inv.png | Bin 1680 -> 827 bytes techage/textures/techage_power_line.png | Bin 209 -> 188 bytes techage/textures/techage_power_line_inv.png | Bin 607 -> 563 bytes techage/textures/techage_power_pole.png | Bin 190 -> 168 bytes techage/textures/techage_power_pole_top.png | Bin 241 -> 220 bytes .../textures/techage_power_terminal_back.png | Bin 185 -> 123 bytes .../textures/techage_power_terminal_front.png | Bin 550 -> 346 bytes .../textures/techage_power_terminal_side.png | Bin 370 -> 168 bytes .../textures/techage_power_terminal_top.png | Bin 188 -> 126 bytes techage/textures/techage_programmer_wield.png | Bin 698 -> 558 bytes techage/textures/techage_quarry_left.png | Bin 248 -> 149 bytes techage/textures/techage_quarry_left14.png | Bin 442 -> 378 bytes techage/textures/techage_ramchip.png | Bin 650 -> 593 bytes .../textures/techage_reactor_filler_side.png | Bin 423 -> 187 bytes .../textures/techage_reactor_filler_top.png | Bin 324 -> 246 bytes .../textures/techage_reactor_stand_back.png | Bin 464 -> 390 bytes .../textures/techage_reactor_stand_bottom.png | Bin 745 -> 321 bytes .../textures/techage_reactor_stand_front.png | Bin 857 -> 353 bytes .../textures/techage_reactor_stand_side.png | Bin 351 -> 269 bytes .../textures/techage_reactor_stand_top.png | Bin 823 -> 344 bytes techage/textures/techage_repairkit.png | Bin 649 -> 545 bytes techage/textures/techage_rotor.png | Bin 203 -> 134 bytes techage/textures/techage_rotor_blades.png | Bin 737 -> 719 bytes techage/textures/techage_rotor_lamp_off.png | Bin 347 -> 195 bytes techage/textures/techage_rotor_lamp_on.png | Bin 286 -> 224 bytes techage/textures/techage_rotor_top.png | Bin 251 -> 200 bytes techage/textures/techage_server_back.png | Bin 351 -> 183 bytes techage/textures/techage_server_front.png | Bin 326 -> 166 bytes techage/textures/techage_server_side.png | Bin 224 -> 166 bytes techage/textures/techage_server_top.png | Bin 265 -> 135 bytes techage/textures/techage_sieve_gravel_ta1.png | Bin 2253 -> 529 bytes techage/textures/techage_sieve_sieve_ta1.png | Bin 452 -> 369 bytes techage/textures/techage_sieve_top_ta1.png | Bin 315 -> 296 bytes techage/textures/techage_signal_lamp.png | Bin 264 -> 247 bytes techage/textures/techage_signaltower.png | Bin 486 -> 222 bytes .../textures/techage_signaltower_amber.png | Bin 462 -> 212 bytes .../textures/techage_signaltower_green.png | Bin 478 -> 195 bytes techage/textures/techage_signaltower_red.png | Bin 467 -> 210 bytes techage/textures/techage_signaltower_top.png | Bin 193 -> 135 bytes techage/textures/techage_silicon_wafer.png | Bin 2553 -> 1559 bytes .../techage_smart_button_inventory.png | Bin 421 -> 236 bytes techage/textures/techage_smart_button_off.png | Bin 500 -> 274 bytes techage/textures/techage_smart_button_on.png | Bin 498 -> 268 bytes techage/textures/techage_smartline.png | Bin 320 -> 213 bytes .../textures/techage_smartline_button_inv.png | Bin 323 -> 261 bytes .../textures/techage_smartline_button_off.png | Bin 256 -> 198 bytes .../textures/techage_smartline_button_on.png | Bin 256 -> 198 bytes .../textures/techage_smartline_collector.png | Bin 311 -> 249 bytes .../techage_smartline_collector_inv.png | Bin 410 -> 348 bytes .../textures/techage_smartline_detector.png | Bin 283 -> 206 bytes .../techage_smartline_detector_inv.png | Bin 304 -> 247 bytes .../techage_smartline_detector_on.png | Bin 264 -> 206 bytes techage/textures/techage_smoke.png | Bin 291 -> 256 bytes .../techage_solar_cell_mini_bottom.png | Bin 322 -> 208 bytes .../textures/techage_solar_cell_mini_side.png | Bin 269 -> 125 bytes .../textures/techage_solar_cell_mini_top.png | Bin 261 -> 134 bytes .../textures/techage_solar_module_bottom.png | Bin 186 -> 124 bytes techage/textures/techage_solar_module_top.png | Bin 238 -> 118 bytes techage/textures/techage_steam_hole.png | Bin 233 -> 171 bytes techage/textures/techage_steam_hole2.png | Bin 428 -> 158 bytes techage/textures/techage_steam_knee.png | Bin 646 -> 242 bytes techage/textures/techage_steam_knee2.png | Bin 495 -> 201 bytes techage/textures/techage_steam_pipe.png | Bin 256 -> 189 bytes techage/textures/techage_steelmat.png | Bin 462 -> 259 bytes techage/textures/techage_streetlamp.png | Bin 286 -> 165 bytes .../textures/techage_streetlamp2_housing.png | Bin 262 -> 200 bytes .../techage_streetlamp2_housing_on.png | Bin 262 -> 200 bytes techage/textures/techage_streetlamp2_off.png | Bin 224 -> 162 bytes techage/textures/techage_streetlamp2_on.png | Bin 221 -> 159 bytes techage/textures/techage_streetlamp_off.png | Bin 606 -> 288 bytes techage/textures/techage_streetlamp_top.png | Bin 216 -> 195 bytes techage/textures/techage_symbol_liquid.png | Bin 248 -> 186 bytes techage/textures/techage_symbol_powder.png | Bin 265 -> 203 bytes techage/textures/techage_ta4.png | Bin 4703 -> 3902 bytes techage/textures/techage_ta4_cable.png | Bin 211 -> 190 bytes techage/textures/techage_ta4_cable_end.png | Bin 221 -> 200 bytes techage/textures/techage_ta4_cable_inv.png | Bin 178 -> 125 bytes techage/textures/techage_ta4_controller.png | Bin 556 -> 265 bytes .../techage_ta4_controller_inventory.png | Bin 835 -> 410 bytes techage/textures/techage_ta4_filter.png | Bin 20707 -> 16984 bytes .../textures/techage_ta4_junctionbox_side.png | Bin 204 -> 183 bytes .../textures/techage_ta4_junctionbox_top.png | Bin 221 -> 200 bytes techage/textures/techage_ta4_streetlamp.png | Bin 821 -> 769 bytes techage/textures/techage_tank_cart_bottom.png | Bin 306 -> 210 bytes techage/textures/techage_tank_cart_front.png | Bin 367 -> 256 bytes techage/textures/techage_tank_cart_side.png | Bin 355 -> 246 bytes techage/textures/techage_tank_cart_top.png | Bin 300 -> 198 bytes techage/textures/techage_terminal1_bottom.png | Bin 261 -> 113 bytes techage/textures/techage_terminal1_front.png | Bin 248 -> 186 bytes techage/textures/techage_terminal1_side.png | Bin 209 -> 147 bytes techage/textures/techage_terminal1_top.png | Bin 369 -> 200 bytes techage/textures/techage_terminal2_back.png | Bin 206 -> 144 bytes techage/textures/techage_terminal2_front.png | Bin 646 -> 224 bytes techage/textures/techage_terminal2_side.png | Bin 197 -> 135 bytes techage/textures/techage_terminal2_top.png | Bin 371 -> 191 bytes techage/textures/techage_tes_inlet.png | Bin 387 -> 183 bytes .../textures/techage_tool_hammer_bronze.png | Bin 1454 -> 647 bytes .../textures/techage_tool_hammer_diamond.png | Bin 689 -> 628 bytes .../textures/techage_tool_hammer_meridium.png | Bin 693 -> 626 bytes techage/textures/techage_tool_hammer_mese.png | Bin 1418 -> 639 bytes .../textures/techage_tool_hammer_steel.png | Bin 697 -> 627 bytes techage/textures/techage_top_ta4.png | Bin 464 -> 235 bytes techage/textures/techage_trowel.png | Bin 806 -> 297 bytes techage/textures/techage_tubeta4_hole2.png | Bin 488 -> 233 bytes techage/textures/techage_tubeta4_knee.png | Bin 725 -> 323 bytes techage/textures/techage_tubeta4_knee2.png | Bin 579 -> 239 bytes techage/textures/techage_tubeta4_tube.png | Bin 541 -> 233 bytes techage/textures/techage_usmium_nuggets.png | Bin 315 -> 253 bytes techage/textures/techage_vacuum_tube.png | Bin 406 -> 319 bytes techage/textures/techage_wind_turbine_inv.png | Bin 7431 -> 1643 bytes towercrane/init.lua | 12 +- tubelib2/README.md | 15 +- tubelib2/internal1.lua | 5 + tubelib2/internal2.lua | 23 +- tubelib2/textures/tubelib2_marker_cube.png | Bin 0 -> 195 bytes tubelib2/tube_api.lua | 122 ++++- tubelib2/tube_test.lua | 227 +++++++-- .../locale/unified_inventory.zh_CN.tr | 5 +- .../locale/unified_inventory.zh_TW.tr | 5 +- 495 files changed, 2276 insertions(+), 1032 deletions(-) create mode 100644 basic_materials/locale/basic_materials.it.tr create mode 100644 hyperloop/i18n.py delete mode 100755 hyperloop/intllib.sh delete mode 100644 hyperloop/locale/de.mo delete mode 100644 hyperloop/locale/de.po delete mode 100644 hyperloop/locale/template.pot create mode 100644 techage/basic_machines/itemsource.lua create mode 100644 techage/basic_machines/recycler.lua create mode 100644 techage/logic/doorcontroller2.lua create mode 100644 techage/textures/techage_appl_recycler.png create mode 100644 tubelib2/textures/tubelib2_marker_cube.png diff --git a/basic_materials/locale/basic_materials.it.tr b/basic_materials/locale/basic_materials.it.tr new file mode 100644 index 0000000..aae0b3b --- /dev/null +++ b/basic_materials/locale/basic_materials.it.tr @@ -0,0 +1,34 @@ +# textdomain: basic_materials +# Author: Salvo 'LtWorf' Tomaselli +Silicon lump=Grumo di silicio +Simple Integrated Circuit=Circuito integrato semplice +Simple Motor=Motore semplice +Heating element=Elemento riscaldante +Simple energy crystal=Cristallo di energia semplice + +Spool of steel wire=Bobina di filo d'acciaio +Spool of copper wire=Bobina di filo di rame +Spool of silver wire=Bobina di filo d'argento +Spool of gold wire=Bobina di filo d'oro +Steel Strip=Striscia d'acciaio +Copper Strip=Striscia di rame +Steel Bar=Barra d'acciaio +Chainlinks (brass)=Catena (ottone) +Chainlinks (steel)=Catena (acciaio) +Brass Ingot=Lingotto di ottone +Steel gear=Ingranaggio d'acciaio +Padlock=Catenaccio +Chain (steel, hanging)=Catena (acciaio, pendente) +Chain (brass, hanging)=Catena (ottone, pendente) +Brass Block=Blocco di ottone + +Oil extract=Estratto d'olio +Unprocessed paraffin=Paraffina grezza +Uncooked Terracotta Base=Argilla cruda +Wet Cement=Cemento umido +Cement=Cemento +Concrete Block=Blocco di calcestruzzo + +Plastic sheet=Foglio di plastica +Plastic strips=Striscia di plastica +Empty wire spool=Rocchetto vuoto diff --git a/compost/init.lua b/compost/init.lua index 71fc59d..561e1c9 100644 --- a/compost/init.lua +++ b/compost/init.lua @@ -2,6 +2,8 @@ local S = minetest.get_translator("compost") compost = {} +local CYCLE_TIME = 10 + -- Version for compatibility checks compost.version = 1.0 @@ -74,43 +76,58 @@ end) local function next_state(pos, elapsed) local node = minetest.get_node(pos) + if node.name == "compost:wood_barrel_1" then - minetest.set_node(pos, {name = "compost:wood_barrel_2"}) - return true - end - if node.name == "compost:wood_barrel_2" then - minetest.set_node(pos, {name = "compost:wood_barrel_3"}) + minetest.swap_node(pos, {name = "compost:wood_barrel_2"}) + elseif node.name == "compost:wood_barrel_2" then + minetest.swap_node(pos, {name = "compost:wood_barrel_3"}) + elseif node.name == "compost:wood_barrel_3" then return false end - return false + return true +end + +local function start_composter(pos) + local meta = minetest.get_meta(pos) + local num = meta:get_int("num") or 0 + if num >= 4 then + -- 4 leaves for one compost node + meta:set_int("num", num - 4) + minetest.swap_node(pos, {name = "compost:wood_barrel_1"}) + minetest.get_node_timer(pos):start(CYCLE_TIME) + end +end + +local function add_item(pos, stack) + local meta = minetest.get_meta(pos) + local num = meta:get_int("num") or 0 + + if num < 4 then + -- add futher leaves + meta:set_int("num", num + stack:get_count()) + stack:set_count(0) + end + + start_composter(pos) + return stack end local function minecart_hopper_additem(pos, stack) if compost.can_compost(stack:get_name()) then - local meta = minetest.get_meta(pos) - -- 4 leaves for one compost node - local num = (meta:get_int("num") or 0) + stack:get_count() - if num >= 4 then - num = num - 4 - minetest.set_node(pos, {name = "compost:wood_barrel_1"}) - -- speed up the process by means of a timer - minetest.get_node_timer(pos):start(10) - end - meta:set_int("num", num) - stack:set_count(0) - return stack + return add_item(pos, stack) end return stack end local function minecart_hopper_takeitem(pos, num) local node = minetest.get_node(pos) - minetest.set_node(pos, {name = "compost:wood_barrel"}) + minetest.swap_node(pos, {name = "compost:wood_barrel"}) + start_composter(pos) return ItemStack("compost:compost") end local function minecart_hopper_untakeitem(pos, in_dir, stack) - minetest.set_node(pos, {name = "compost:wood_barrel_2"}) + minetest.swap_node(pos, {name = "compost:wood_barrel_2"}) end minetest.register_node("compost:wood_barrel", { @@ -132,14 +149,16 @@ minetest.register_node("compost:wood_barrel", { on_punch = function(pos, node, puncher, pointed_thing) local wielded_item = puncher:get_wielded_item():get_name() if compost.can_compost(wielded_item) then - minetest.set_node(pos, {name = "compost:wood_barrel_1"}) + minetest.swap_node(pos, {name = "compost:wood_barrel_1"}) local w = puncher:get_wielded_item() if not(minetest.setting_getbool("creative_mode")) then w:take_item(1) puncher:set_wielded_item(w) end + minetest.get_node_timer(pos):start(CYCLE_TIME) end end, + on_timer = next_state, minecart_hopper_additem = minecart_hopper_additem, minecart_hopper_untakeitem = minecart_hopper_untakeitem, }) @@ -206,30 +225,13 @@ minetest.register_node("compost:wood_barrel_3", { on_punch = function(pos, node, player, pointed_thing) local p = {x = pos.x + math.random(0, 5)/5 - 0.5, y = pos.y+1, z = pos.z + math.random(0, 5)/5 - 0.5} minetest.add_item(p, {name = "compost:compost"}) - minetest.set_node(pos, {name = "compost:wood_barrel"}) + minetest.swap_node(pos, {name = "compost:wood_barrel"}) end, + on_timer = next_state, minecart_hopper_takeitem = minecart_hopper_takeitem, minecart_hopper_untakeitem = minecart_hopper_untakeitem, }) -minetest.register_abm({ - nodenames = {"compost:wood_barrel_1"}, - interval = 40, - chance = 5, - action = function(pos, node, active_object_count, active_object_count_wider) - minetest.set_node(pos, {name = "compost:wood_barrel_2"}) - end, -}) - -minetest.register_abm({ - nodenames = {"compost:wood_barrel_2"}, - interval = 40, - chance = 5, - action = function(pos, node, active_object_count, active_object_count_wider) - minetest.set_node(pos, {name = "compost:wood_barrel_3"}) - end, -}) - minetest.register_craft({ output = "compost:wood_barrel", recipe = { @@ -279,7 +281,8 @@ if minetest.global_exists("techage") then on_pull_item = function(pos, in_dir, num) local node = minetest.get_node(pos) if node.name == "compost:wood_barrel_3" then - minetest.set_node(pos, {name = "compost:wood_barrel"}) + minetest.swap_node(pos, {name = "compost:wood_barrel"}) + start_composter(pos) return ItemStack("compost:compost") end return nil @@ -287,22 +290,13 @@ if minetest.global_exists("techage") then on_push_item = function(pos, in_dir, stack) local node = minetest.get_node(pos) if node.name == "compost:wood_barrel" and compost.can_compost(stack:get_name()) then - local meta = minetest.get_meta(pos) - -- 4 leaves for one compost node - local num = (meta:get_int("num") or 0) + 1 - if num >= 4 then - num = 0 - minetest.set_node(pos, {name = "compost:wood_barrel_1"}) - -- speed up the process by means of a timer - minetest.get_node_timer(pos):start(10) - end - meta:set_int("num", num) - return true + stack = add_item(pos, stack) + return stack:get_count() == 0 end return false end, on_unpull_item = function(pos, in_dir, stack) - minetest.set_node(pos, {name = "compost:wood_barrel_2"}) + minetest.swap_node(pos, {name = "compost:wood_barrel_2"}) return true end, }) diff --git a/hyperloop/elevator.lua b/hyperloop/elevator.lua index c07b551..3b26b42 100644 --- a/hyperloop/elevator.lua +++ b/hyperloop/elevator.lua @@ -368,6 +368,9 @@ local function on_arrival_floor(tDeparture, tArrival, player_name, snd) if player ~= nil then tArrival.pos.y = tArrival.pos.y - kPLAYER_OVER_GROUND player:set_pos(tArrival.pos) + if tArrival.attributes then + player:set_nametag_attributes(tArrival.attributes) + end tArrival.pos.y = tArrival.pos.y + kPLAYER_OVER_GROUND end minetest.sound_stop(snd) @@ -375,8 +378,15 @@ local function on_arrival_floor(tDeparture, tArrival, player_name, snd) end local function on_travel(tDeparture, tArrival, player_name, seconds) + local player = minetest.get_player_by_name(player_name) door_command(tDeparture.pos, tDeparture.facedir, "darken", false) door_command(tArrival.pos, tArrival.facedir, "darken", false) + if player ~= nil then + tArrival.attributes = player:get_nametag_attributes() + player:set_nametag_attributes({text = " "}) + else + tArrival.attributes = nil + end local snd = minetest.sound_play("ele_norm", { pos = tDeparture.pos, gain = 0.5, diff --git a/hyperloop/i18n.py b/hyperloop/i18n.py new file mode 100644 index 0000000..ece4e4c --- /dev/null +++ b/hyperloop/i18n.py @@ -0,0 +1,458 @@ +#!/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, + "break-long-lines": False, + "sort": False +} +# Available CLI options +options = {"recursive": ['--recursive', '-r'], + "help": ['--help', '-h'], + "mods": ['--installed-mods', '-m'], + "verbose": ['--verbose', '-v'], + "no-old-file": ['--no-old-file', '-O'], + "break-long-lines": ['--break-long-lines', '-b'], + "sort": ['--sort', '-s'] +} + +# 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 = 80 + +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["sort"])} + sort output strings alphabetically + {', '.join(options["break-long-lines"])} + add extra line breaks before and after long strings + {', '.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]) + if params["sort"]: + 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] + if params["sort"]: + 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 params["break-long-lines"] and len(localizedString) > doublespace_threshold and not lOut[-1] == "": + lOut.append("") + if comment != None: + lOut.append(comment) + lOut.append(f"{localizedString}={translation}") + if params["break-long-lines"] and 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 params["break-long-lines"] and len(key) > doublespace_threshold and not lOut[-1] == "": + lOut.append("") + if comment != None: + lOut.append(comment) + lOut.append(f"{key}={translation}") + if params["break-long-lines"] and 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): + 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() diff --git a/hyperloop/init.lua b/hyperloop/init.lua index 7c5f73a..2d4cff9 100644 --- a/hyperloop/init.lua +++ b/hyperloop/init.lua @@ -40,10 +40,10 @@ hyperloop = {} -- Version for compatibility checks, see history -hyperloop.version = 2.05 +hyperloop.version = 2.06 if minetest.global_exists("techage") and techage.version < 0.06 then - minetest.log("error", "[hyperloop] Hyperloop requires techage version 0.06 or newer!") + error("[hyperloop] Hyperloop requires techage version 0.06 or newer!") return end @@ -59,7 +59,7 @@ else end if tubelib2.version < 1.7 then - minetest.log("error", "Hyperloop requires tubelib2 version 1.7 or newer!!!") + error("Hyperloop requires tubelib2 version 1.7 or newer!!!") else -- Configuration settings hyperloop.wifi_enabled = minetest.settings:get_bool("hyperloop_wifi_enabled") diff --git a/hyperloop/intllib.sh b/hyperloop/intllib.sh deleted file mode 100755 index b831fc2..0000000 --- a/hyperloop/intllib.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../intllib/tools/xgettext.sh ./booking.lua ./door.lua ./lcd.lua ./tube.lua ./booking_node.lua ./elevator.lua ./map.lua ./seat.lua ./utils.lua ./data_base.lua ./init.lua ./waypoint.lua ./network.lua ./station.lua ./wifi.lua ./deco.lua ./junction.lua ./recipes.lua ./tubecrowbar.lua ./recipes.lua diff --git a/hyperloop/locale/de.mo b/hyperloop/locale/de.mo deleted file mode 100644 index b3e4892bdce4b2abffed33c1dc7576ea1d7075cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5253 zcmb7`TZ|-C8Gw&+QAU)Df}kL05ailDmqlEf>-NsqcK??j3)Smkq|W*^-W`9$iDf44@CFL#26DF{Ql~yp4!>jL@QnW z)j4%;|GoZl{pH_LTt~QX;r`i|1~J*dl`y6 zKZCRI7w|LiJt*>C!^;JD1C;TnpseGe==}_o^M3^*s(Ka9!5e})gz{yUU)Z^sCa zz$KWU1IjsHhO+#tDs z@gFGubuCI0Irc%eP{*Li`ApG%4zi?r0dizDf~Z1$6^gvyfHMADQ0)EPqWu#nQxA%rGbr=E32X3Ia6dc`#V_vU&^)T6P}BAh%H3l5_{tBhq%RW#P;I%N^`|# zJv4M`2FZreF6o%5ygRksUfw^9Y^p=nGBdsxtp^=jCqvF?evdq&k8BQ28Yjt6KlT_s zEu$m1IqI3z$e1+~x03;VfyNoF?rvvkYFyC6#M@vKcaJ*I>EusQtbK^2Pg}R1q=Wof z9Y{^2t=Gde38o!PXPU0mZZO=shH6IMsAilQy_O`gYGyX>=#}w0>R_Dk_F&>%U5{+& zsRiSMb>oFA&yD;=nru#HE?6JxO8z6)Hj@ViCVDf;P*)Vkn|c%>N=W43Y0!~&X2cyv zN!ovWS}nR@Qr+%F&KVIdwXUlUp{sQKuU#}S>Tn!+uXfbfOp-nW_3^0PL)Dcx9A_9u zo0Xo$*la|B^>(J0U3x{VReACG%(ZjvHshq-ue?~caU4~bSWZx(iK>(HuAYhG>bx`= zBzigVB4wq&(7xWi&!is#_ZTi)UasQEyPEo7 znv7Z(Xkabc946LPC$8B;R`1M4Xl%OVx=Bz=4sW!biTjFKr&X!%$%6#JPNR)i=Kh>} zrdG$2HZHw{=c^M*(8eWMw}*>w5G_f%sckR=FTU2wT|D$mx!-hkf*(e0bBSS3jvTsO zjtw!x24c3#GPyT0b86JH?H+Fkx>n(fgRw6X-Erc&zFsb3oi{lCy7=_in{kIcn$=3Q zVbqF=kx?Qh)tyT06;@THb;%LK*bv-xeIglYyj+Ap#9hHKU72yA`pT6$QOMIpJ4w@Q zn6Fp}oSHo}S5E6iUPm!e-Pt6JcZt2TD=Hy@#IbHk49Rhe#RC?Kx{;OK#RBW(0dFvI z$L~zeqrKR0X5t;Iq=$ZjExxpfkESI|99k=p<_HQq-^I3({P(CH#z z^br#epPf>tC#QQB^G&pudzj?wfRjYEPTgvwuTRoixKF4YlLGYdf`O*7dd3 zgzn`hYbVWyl|i+ID42$xpPk!Zo13rA&+ECl#{9nfX6I&Sr;bHF)K=5T`B)MlGmk~C zn?+qyTQ$+3(r(~+Q^%K%FYatUSD&4tDg;hgTcv(AbTD5EGq{~~4@<&My$O##wR)(w ze`lQRwQkbdqH8A|6x-1ITQ*ERQ#))3tMMV06GJi6^Yz*KgX1!a8T-B=(Z*bdLyO}S z71p$Sfp@7HMyVAWo!ox2mztRsPQa`Gy~yH`{bVpO4o|`V#+5eehYU9|lA()Idn)tW zXTw%Ze4Db=;Ukk`YaEr%=%VBX-8H`5+kQK21&XfgXO8k;6kY47x=~(s*@H67W8vG1 z^T*a~|A^(VcdL#o26f7sIR9&?Q#e7`eiMPq8H=c=F7;BBlu;#j9vf;6@qEyoj9^In za(Hc!(wWS7eat#*NCjbwsl03QZGl2;I;eCW$kw;A?nND*fnvn!3rAm^c~9*SolT+!HHeZg=&@m| zGT>;`;#0u!xzVZguAy9_=o0nUU#bB6R@UxSmMM(j^&)1GlkHJ|{gx4@*`oxPZ{)kM zU;U0Lmn~-E=Hl*^eaGHj>1fIjWBmo&teNgGbN#9!*X+72Vr4vgT#TEMd|IlfTzC8J zIM^=btvtiHA|KdgfL(1I$ZGuj0xRhal$^N^v4t0FMF>S@@G`6KLo?!UaWgD5)G{o^1)@j-hjPBYNna!1} zdy&zJzfZAG$K+d6o%KZ?O<4DcKE7`cPnIZRW3q-SlZILu=F+83t!*ntOKVZXk%Yw5!6aB?`)tQ{LtT&Mu4% zM31km7Rl5GFUnw{Jq{pQuAIO(K9!NAlGk+d@MI^B=Lr>(h?le~au1^juQH@UQT@o8 zj!7r-uYbkJxzK?5g`m^KF}`i}XFtx_RE6 GR{sT)zLSvv diff --git a/hyperloop/locale/de.po b/hyperloop/locale/de.po deleted file mode 100644 index 24228a2..0000000 --- a/hyperloop/locale/de.po +++ /dev/null @@ -1,314 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-12-22 11:22+0100\n" -"PO-Revision-Date: 2018-12-22 11:23+0100\n" -"Last-Translator: \n" -"Language-Team: \n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.6\n" - -#: booking.lua -msgid "Station data is corrupted. Please rebuild the station!" -msgstr "Stationsdaten sind beschädigt. Bitte die Station neu bauen!" - -#: booking.lua -msgid "Station is still blocked. Please try again in a few seconds!" -msgstr "" -"Die Station ist noch blockiert. Bitte versuche es in ein paar Sekunden " -"wieder!" - -#: door.lua -msgid "The Booking Machine for this station is missing!" -msgstr "Der Fahrkartenautomat für die Station fehlt!" - -#: lcd.lua -msgid "Hyperloop Display" -msgstr "Hyperloop Bildschirm" - -#: lcd.lua seat.lua -msgid " | | << Hyperloop >> | be anywhere" -msgstr " | | << Hyperloop >> | be anywhere" - -#: tube.lua -msgid "Junction at " -msgstr "Anschlussstelle bei " - -#: tube.lua -msgid "There is no station/junction on this level. " -msgstr "Es gibt keine Station/Anschlussstelle auf dieser Höhe. " - -#: tube.lua -msgid "Do you really want to start a new network?!" -msgstr "Willst du wirklich ein neues Liniennetz beginnen?!" - -#: tube.lua -msgid "Hyperloop Tube" -msgstr "Hyperloop Röhre" - -#: booking_node.lua elevator.lua -msgid "Select your destination" -msgstr "Wähle dein Ziel" - -#: booking_node.lua elevator.lua -msgid "Destination" -msgstr "Ziel" - -#: booking_node.lua -msgid "Distance" -msgstr "Entfernung" - -#: booking_node.lua -msgid "Local Info" -msgstr "Zusatzinfo" - -#: booking_node.lua -msgid "" -"Please enter the station name to\n" -"which this booking machine belongs." -msgstr "" -"Bitte gib den Stationsnamen ein\n" -"zu dem dieser Fahrkartenautomat gehört." - -#: booking_node.lua -msgid "Station name" -msgstr "Stationsname" - -#: booking_node.lua -msgid "Additional station information" -msgstr "Zusätzliche Stationsinformationen" - -#: booking_node.lua -msgid "Station has already a booking machine!" -msgstr "Station hat bereits einen Fahrkartenautomat!" - -#: booking_node.lua -msgid "Invalid station name!" -msgstr "Ungültiger Stationsname!" - -#: booking_node.lua -msgid "Hyperloop Booking Machine" -msgstr "Hyperloop Fahrkartenautomat" - -#: elevator.lua -msgid "Hyperloop Elevator Shaft" -msgstr "Hyperloop Aufzugsschacht" - -#: elevator.lua -msgid "Floor" -msgstr "Stockwerk" - -#: elevator.lua -msgid "(current position)" -msgstr "(aktuelle Position)" - -#: elevator.lua -msgid "Hyperloop Elevator" -msgstr "Hyperloop Aufzug" - -#: elevator.lua -msgid "Please insert floor name" -msgstr "Gib den Stockwerknamen ein" - -#: elevator.lua -msgid "Floor name" -msgstr "Stockwerkname" - -#: elevator.lua -msgid "Base" -msgstr "Basis" - -#: elevator.lua wifi.lua -msgid "Save" -msgstr "Speichern" - -#: map.lua -msgid "Dist." -msgstr "Entf." - -#: map.lua -msgid "Station/Junction" -msgstr "Station/Anschlussstelle" - -#: map.lua -msgid "Position" -msgstr "Position" - -#: map.lua -msgid "Owner" -msgstr "Besitzer" - -#: map.lua -msgid "Conn. with" -msgstr "Verb. mit" - -#: map.lua -msgid "Close" -msgstr "Schließen" - -#: map.lua -msgid "Hyperloop Station Book" -msgstr "Hyperloop Stationsbuch" - -#: seat.lua -msgid "Thank you | for | travelling | with | Hyperloop." -msgstr "Thank you | for | travelling | with | Hyperloop." - -#: seat.lua -msgid " | Welcome at | | " -msgstr " | Willkommen | in | | " - -#: seat.lua -msgid "[Hyperloop] No booking entered!" -msgstr "[Hyperloop] Keine Buchung eingegeben!" - -#: seat.lua -msgid "Destination:" -msgstr "Ziel:" - -#: seat.lua -msgid "Distance:" -msgstr "Entfernung:" - -#: seat.lua -msgid "Arrival in:" -msgstr "Ankunft in:" - -#: seat.lua -msgid "Hyperloop Pod Seat" -msgstr "Hyperloop Sitz" - -#: waypoint.lua -msgid "Hyperloop Waypoint" -msgstr "Hyperloop Wegpunkt" - -#: station.lua -msgid "Station completed. Now place the Booking Machine!" -msgstr "Station fertig. Setze nun den Fahrkartenautomat!" - -#: station.lua -msgid "Area is protected!" -msgstr "Die Area ist geschützt!" - -#: station.lua -msgid "Not enough space to build the station!" -msgstr "Nicht ausreichend Platz um die Station zu errichten!" - -#: station.lua -msgid "Hyperloop Station Pod Builder" -msgstr "Hyperloop Stations Ersteller" - -#: station.lua -msgid "Hyperloop Pod Shell" -msgstr "Hyperloop Kabinenwand" - -#: station.lua recipes.lua -msgid "Hypersteel Ingot" -msgstr "Hypersteel Barren" - -#: station.lua -msgid "Blue Wool" -msgstr "Blaue Wolle" - -#: station.lua -msgid "Glass" -msgstr "Glas" - -#: station.lua -msgid "Not enough inventory items to build the station!" -msgstr "Nicht ausreichend Inventory Items um die Station zu bauen!" - -#: station.lua -msgid "Destroy Station" -msgstr "Zerstöre Station" - -#: station.lua -msgid "Build Station" -msgstr "Baue Station" - -#: station.lua -msgid "Hyperloop Station Block" -msgstr "Hyperloop Stations Block" - -#: station.lua -msgid "Station" -msgstr "Station" - -#: wifi.lua -msgid "Enter channel string" -msgstr "Kanalname eingeben" - -#: wifi.lua -msgid "Hyperloop WiFi Tube" -msgstr "Hyperloop Wifi Röhre" - -#: deco.lua -msgid "Hyperloop Promo Poster " -msgstr "Hyperloop Werbeposter " - -#: deco.lua -msgid "Hyperloop Station Sign" -msgstr "Hyperloop Stationszeichen" - -#: deco.lua -msgid "Hyperloop Station Sign Right" -msgstr "Hyperloop Stationszeichen rechts" - -#: deco.lua -msgid "Hyperloop Station Sign Left" -msgstr "Hyperloop Stationszeichen links" - -#: junction.lua -msgid "Station connected with " -msgstr "Station verbunden mit " - -#: junction.lua -msgid "Junction connected with " -msgstr "Anschlussstelle verbunden mit " - -#: junction.lua -msgid "Hyperloop Junction Block" -msgstr "Hyperloop Anschlussstelle" - -#: junction.lua -msgid "Junction" -msgstr "Anschlussstelle" - -#: junction.lua -msgid "Hyperloop Pillar" -msgstr "Hyperloop Stütze" - -#: tubecrowbar.lua -msgid "[Crowbar Help]\n" -msgstr "[Brecheisen Hilfe]\n" - -#: tubecrowbar.lua -msgid " left: remove node\n" -msgstr " links: entferne Block\n" - -#: tubecrowbar.lua -msgid " right: repair tube/shaft line\n" -msgstr " rechts: repariere Röhre/Schacht\n" - -#: tubecrowbar.lua -msgid "You don't have the necessary privs!" -msgstr "Du hast nicht die notwendigen Rechte!" - -#: tubecrowbar.lua -msgid "Hyperloop Tube Crowbar" -msgstr "Hyperloop Brecheisen" - -#~ msgid "Tube connection missing!" -#~ msgstr "Anschluss an eine Röhre fehlt!" - -#~ msgid "Hypersteel Pod Shell" -#~ msgstr "Hyperloop Kabinenwand" diff --git a/hyperloop/locale/hyperloop.de.tr b/hyperloop/locale/hyperloop.de.tr index 77eccaa..fc27f03 100644 --- a/hyperloop/locale/hyperloop.de.tr +++ b/hyperloop/locale/hyperloop.de.tr @@ -1,111 +1,142 @@ # textdomain: hyperloop + ### booking.lua ### + Station data is corrupted. Please rebuild the station!=Stationsdaten sind beschädigt. Bitte die Station neu bauen! Station is still blocked. Please try again in a few seconds!=Die Station ist noch blockiert. Bitte versuche es in ein paar Sekunden wieder! ### booking_node.lua ### -Additional station information=Zusätzliche Stationsinformationen -Hyperloop Booking Machine=Hyperloop Fahrkartenautomat -Invalid station name!=Ungültiger Stationsname! -Please enter the station name to@nwhich this booking machine belongs.=Bitte gib den Stationsnamen ein@nzu dem dieser Fahrkartenautomat gehört. -Station has already a booking machine!=Station hat bereits einen Fahrkartenautomat! -Station name=Stationsname +Please enter the station name to@nwhich this booking machine belongs.=Bitte gib den Stationsnamen ein@nzu dem dieser Fahrkartenautomat gehört. +Station name=Stationsname +Additional station information=Zusätzliche Stationsinformationen +Station has already a booking machine!=Station hat bereits einen Fahrkartenautomat! +Invalid station name!=Ungültiger Stationsname! +Hyperloop Booking Machine=Hyperloop Fahrkartenautomat + +### booking_node.lua ### ### elevator.lua ### + Select your destination=Wähle dein Ziel +### booking_node.lua ### ### migrate.lua ### + = ### deco.lua ### + Hyperloop Promo Poster =Hyperloop Werbeposter Hyperloop Station Sign=Hyperloop Stationszeichen -Hyperloop Station Sign Left=Hyperloop Stationszeichen links Hyperloop Station Sign Right=Hyperloop Stationszeichen rechts +Hyperloop Station Sign Left=Hyperloop Stationszeichen links ### door.lua ### -Hyperloop Door Bottom=Hyperloop Tür Unterteil -Hyperloop Door Top=Hyperloop Tür Oberteil + The Booking Machine for this station is missing!=Der Fahrkartenautomat für die Station fehlt! +Hyperloop Door Top=Hyperloop Tür Oberteil +Hyperloop Door Bottom=Hyperloop Tür Unterteil ### elevator.lua ### -(current position)=(aktuelle Position) -Base=Basis + +Hyperloop Elevator Shaft=Hyperloop Aufzugsschacht Destination=Ziel Floor=Stockwerk -Floor name=Stockwerkname +(current position)=(aktuelle Position) Hyperloop Elevator=Hyperloop Aufzug -Hyperloop Elevator Shaft=Hyperloop Aufzugsschacht Please insert floor name=Gib den Stockwerknamen ein +Floor name=Stockwerkname +Base=Basis +### elevator.lua ### ### wifi.lua ### + Save=Speichern ### junction.lua ### + +Station connected with =Station verbunden mit +Junction connected with =Anschlussstelle verbunden mit Hyperloop Junction Block=Hyperloop Anschlussstelle Hyperloop Pillar=Hyperloop Stütze -Junction connected with =Anschlussstelle verbunden mit -Station connected with =Station verbunden mit +### junction.lua ### ### migrate.lua ### + Junction=Anschlussstelle -Hyperloop Legacy Tube=Hyperloop veraltetes Rohr -unknown=unbekant ### lcd.lua ### + Hyperloop Display=Hyperloop Bildschirm ### map.lua ### -Close=Schließen -Conn. with=Verb. mit + Dist.=Entf. -Hyperloop Station Book=Hyperloop Stationsbuch -Owner=Besitzer -Position=Position Station/Junction=Station/Anschlussstelle +Position=Position +Owner=Besitzer +Conn. with=Verb. mit +Close=Schließen +Hyperloop Station Book=Hyperloop Stationsbuch + +### migrate.lua ### + +Hyperloop Legacy Tube=Hyperloop veraltetes Rohr +unknown=unbekant + +### recipes.lua ### +### station.lua ### + +Hypersteel Ingot=Hyperstahl Barren ### seat.lua ### -Hyperloop Pod Seat=Hyperloop Sitz + [Hyperloop] No booking entered!=[Hyperloop] Keine Buchung eingegeben! +Hyperloop Pod Seat=Hyperloop Sitz ### station.lua ### -Hypersteel Ingot=Hyperstahl Barren -Area is protected!=Die Area ist geschützt! -Blue Wool=Blaue Wolle -Build Station=Baue Station -Destroy Station=Zerstöre Station -Glass=Glas -Hyperloop Pod Shell=Hyperloop Kabinenwand -Hyperloop Station Block=Hyperloop Stations Block -Hyperloop Station Pod Builder=Hyperloop Stations Ersteller -Not enough inventory items to build the station!=Nicht ausreichend Inventory Items um die Station zu bauen! -Not enough space to build the station!=Nicht ausreichend Platz um die Station zu errichten! -Station=Station + Station completed. Now place the Booking Machine!=Station fertig. Setze nun den Fahrkartenautomat! +Area is protected!=Die Area ist geschützt! +Not enough space to build the station!=Nicht ausreichend Platz um die Station zu errichten! +Hyperloop Station Pod Builder=Hyperloop Stations Ersteller +Hyperloop Pod Shell=Hyperloop Kabinenwand +Blue Wool=Blaue Wolle +Glass=Glas +Not enough inventory items to build the station!=Nicht ausreichend Inventory Items um die Station zu bauen! +Destroy Station=Zerstöre Station +Build Station=Baue Station +Hyperloop Station Block=Hyperloop Stations Block +Station=Station ### tube.lua ### -Do you really want to start a new network?!=Willst du wirklich ein neues Liniennetz beginnen?! -Hyperloop Tube=Hyperloop Röhre + Junction at =Anschlussstelle bei -Open end at =Offenes Ende bei Station '=Station ' Station at =Station bei +Open end at =Offenes Ende bei There is no station/junction on this level. =Es gibt keine Station/Anschlussstelle auf dieser Höhe. +Do you really want to start a new network?!=Willst du wirklich ein neues Liniennetz beginnen?! +Hyperloop Tube=Hyperloop Röhre ### tubecrowbar.lua ### + +[Hyperloop] Error: Tube is too long!=[Hyperloop] Fehler: Röhre ist zu lang! +[Crowbar Help]@n=[Brecheisen Hilfe]@n left: remove node@n= links: entferne Block@n right: repair tube/shaft line@n= rechts: repariere Röhre/Schacht@n -Hyperloop Tube Crowbar=Hyperloop Brecheisen -Repair via WorldEdit placed Hyperloop tubes by reusing WorldEdit pos1/pos2=Reparatur über WorldEdit platzierte Hyperloop-Röhren durch Wiederverwendung von WorldEdit pos1/pos2 -Rights to remove tube nodes by means of the crowbar=Rechte zur Entfernung von Rohrknoten mit Hilfe der Brechstange You don't have the necessary privs!=Du hast nicht die notwendigen Rechte! -[Crowbar Help]@n=[Brecheisen Hilfe]@n +Hyperloop Tube Crowbar=Hyperloop Brecheisen +Rights to remove tube nodes by means of the crowbar=Rechte zur Entfernung von Rohrknoten mit Hilfe der Brechstange +Repair via WorldEdit placed Hyperloop tubes by reusing WorldEdit pos1/pos2=Reparatur über WorldEdit platzierte Hyperloop-Röhren durch Wiederverwendung von WorldEdit pos1/pos2 ### waypoint.lua ### + Hyperloop Waypoint=Hyperloop Wegpunkt ### wifi.lua ### + Enter channel string=Kanalname eingeben Hyperloop WiFi Tube=Hyperloop Wifi Röhre diff --git a/hyperloop/locale/template.pot b/hyperloop/locale/template.pot deleted file mode 100644 index e477bf9..0000000 --- a/hyperloop/locale/template.pot +++ /dev/null @@ -1,304 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-12-22 11:22+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: booking.lua -msgid "Station data is corrupted. Please rebuild the station!" -msgstr "" - -#: booking.lua -msgid "Station is still blocked. Please try again in a few seconds!" -msgstr "" - -#: door.lua -msgid "The Booking Machine for this station is missing!" -msgstr "" - -#: lcd.lua -msgid "Hyperloop Display" -msgstr "" - -#: lcd.lua seat.lua -msgid " | | << Hyperloop >> | be anywhere" -msgstr "" - -#: tube.lua -msgid "Junction at " -msgstr "" - -#: tube.lua -msgid "There is no station/junction on this level. " -msgstr "" - -#: tube.lua -msgid "Do you really want to start a new network?!" -msgstr "" - -#: tube.lua -msgid "Hyperloop Tube" -msgstr "" - -#: booking_node.lua elevator.lua -msgid "Select your destination" -msgstr "" - -#: booking_node.lua elevator.lua -msgid "Destination" -msgstr "" - -#: booking_node.lua -msgid "Distance" -msgstr "" - -#: booking_node.lua -msgid "Local Info" -msgstr "" - -#: booking_node.lua -msgid "" -"Please enter the station name to\n" -"which this booking machine belongs." -msgstr "" - -#: booking_node.lua -msgid "Station name" -msgstr "" - -#: booking_node.lua -msgid "Additional station information" -msgstr "" - -#: booking_node.lua -msgid "Station has already a booking machine!" -msgstr "" - -#: booking_node.lua -msgid "Invalid station name!" -msgstr "" - -#: booking_node.lua -msgid "Hyperloop Booking Machine" -msgstr "" - -#: elevator.lua -msgid "Hyperloop Elevator Shaft" -msgstr "" - -#: elevator.lua -msgid "Floor" -msgstr "" - -#: elevator.lua -msgid "(current position)" -msgstr "" - -#: elevator.lua -msgid "Hyperloop Elevator" -msgstr "" - -#: elevator.lua -msgid "Please insert floor name" -msgstr "" - -#: elevator.lua -msgid "Floor name" -msgstr "" - -#: elevator.lua -msgid "Base" -msgstr "" - -#: elevator.lua wifi.lua -msgid "Save" -msgstr "" - -#: map.lua -msgid "Dist." -msgstr "" - -#: map.lua -msgid "Station/Junction" -msgstr "" - -#: map.lua -msgid "Position" -msgstr "" - -#: map.lua -msgid "Owner" -msgstr "" - -#: map.lua -msgid "Conn. with" -msgstr "" - -#: map.lua -msgid "Close" -msgstr "" - -#: map.lua -msgid "Hyperloop Station Book" -msgstr "" - -#: seat.lua -msgid "Thank you | for | travelling | with | Hyperloop." -msgstr "" - -#: seat.lua -msgid " | Welcome at | | " -msgstr "" - -#: seat.lua -msgid "[Hyperloop] No booking entered!" -msgstr "" - -#: seat.lua -msgid "Destination:" -msgstr "" - -#: seat.lua -msgid "Distance:" -msgstr "" - -#: seat.lua -msgid "Arrival in:" -msgstr "" - -#: seat.lua -msgid "Hyperloop Pod Seat" -msgstr "" - -#: waypoint.lua -msgid "Hyperloop Waypoint" -msgstr "" - -#: station.lua -msgid "Station completed. Now place the Booking Machine!" -msgstr "" - -#: station.lua -msgid "Area is protected!" -msgstr "" - -#: station.lua -msgid "Not enough space to build the station!" -msgstr "" - -#: station.lua -msgid "Hyperloop Station Pod Builder" -msgstr "" - -#: station.lua -msgid "Hyperloop Pod Shell" -msgstr "" - -#: station.lua recipes.lua -msgid "Hypersteel Ingot" -msgstr "" - -#: station.lua -msgid "Blue Wool" -msgstr "" - -#: station.lua -msgid "Glass" -msgstr "" - -#: station.lua -msgid "Not enough inventory items to build the station!" -msgstr "" - -#: station.lua -msgid "Destroy Station" -msgstr "" - -#: station.lua -msgid "Build Station" -msgstr "" - -#: station.lua -msgid "Hyperloop Station Block" -msgstr "" - -#: station.lua -msgid "Station" -msgstr "" - -#: wifi.lua -msgid "Enter channel string" -msgstr "" - -#: wifi.lua -msgid "Hyperloop WiFi Tube" -msgstr "" - -#: deco.lua -msgid "Hyperloop Promo Poster " -msgstr "" - -#: deco.lua -msgid "Hyperloop Station Sign" -msgstr "" - -#: deco.lua -msgid "Hyperloop Station Sign Right" -msgstr "" - -#: deco.lua -msgid "Hyperloop Station Sign Left" -msgstr "" - -#: junction.lua -msgid "Station connected with " -msgstr "" - -#: junction.lua -msgid "Junction connected with " -msgstr "" - -#: junction.lua -msgid "Hyperloop Junction Block" -msgstr "" - -#: junction.lua -msgid "Junction" -msgstr "" - -#: junction.lua -msgid "Hyperloop Pillar" -msgstr "" - -#: tubecrowbar.lua -msgid "[Crowbar Help]\n" -msgstr "" - -#: tubecrowbar.lua -msgid " left: remove node\n" -msgstr "" - -#: tubecrowbar.lua -msgid " right: repair tube/shaft line\n" -msgstr "" - -#: tubecrowbar.lua -msgid "You don't have the necessary privs!" -msgstr "" - -#: tubecrowbar.lua -msgid "Hyperloop Tube Crowbar" -msgstr "" diff --git a/hyperloop/locale/template.txt b/hyperloop/locale/template.txt index 8b7b478..e35c7e3 100644 --- a/hyperloop/locale/template.txt +++ b/hyperloop/locale/template.txt @@ -1,6 +1,7 @@ # textdomain: hyperloop + ### booking.lua ### Station data is corrupted. Please rebuild the station!= @@ -8,14 +9,12 @@ Station is still blocked. Please try again in a few seconds!= ### booking_node.lua ### -Additional station information= -Hyperloop Booking Machine= -Invalid station name!= - Please enter the station name to@nwhich this booking machine belongs.= - -Station has already a booking machine!= Station name= +Additional station information= +Station has already a booking machine!= +Invalid station name!= +Hyperloop Booking Machine= ### booking_node.lua ### ### elevator.lua ### @@ -31,25 +30,25 @@ Select your destination= Hyperloop Promo Poster = Hyperloop Station Sign= -Hyperloop Station Sign Left= Hyperloop Station Sign Right= +Hyperloop Station Sign Left= ### door.lua ### -Hyperloop Door Bottom= -Hyperloop Door Top= The Booking Machine for this station is missing!= +Hyperloop Door Top= +Hyperloop Door Bottom= ### elevator.lua ### -(current position)= -Base= +Hyperloop Elevator Shaft= Destination= Floor= -Floor name= +(current position)= Hyperloop Elevator= -Hyperloop Elevator Shaft= Please insert floor name= +Floor name= +Base= ### elevator.lua ### ### wifi.lua ### @@ -58,10 +57,10 @@ Save= ### junction.lua ### +Station connected with = +Junction connected with = Hyperloop Junction Block= Hyperloop Pillar= -Junction connected with = -Station connected with = ### junction.lua ### ### migrate.lua ### @@ -72,20 +71,15 @@ Junction= Hyperloop Display= -### lcd.lua ### -### seat.lua ### - - | | << Hyperloop >> | be anywhere= - ### map.lua ### -Close= -Conn. with= Dist.= -Hyperloop Station Book= -Owner= -Position= Station/Junction= +Position= +Owner= +Conn. with= +Close= +Hyperloop Station Book= ### migrate.lua ### @@ -99,50 +93,44 @@ Hypersteel Ingot= ### seat.lua ### - | Welcome at | | = -Arrival in:= -Destination:= -Distance:= -Hyperloop Pod Seat= -Thank you | for | travelling | with | Hyperloop.= [Hyperloop] No booking entered!= +Hyperloop Pod Seat= ### station.lua ### -Area is protected!= -Blue Wool= -Build Station= -Destroy Station= -Glass= -Hyperloop Pod Shell= -Hyperloop Station Block= -Hyperloop Station Pod Builder= -Not enough inventory items to build the station!= -Not enough space to build the station!= -Station= Station completed. Now place the Booking Machine!= +Area is protected!= +Not enough space to build the station!= +Hyperloop Station Pod Builder= +Hyperloop Pod Shell= +Blue Wool= +Glass= +Not enough inventory items to build the station!= +Destroy Station= +Build Station= +Hyperloop Station Block= +Station= ### tube.lua ### -Do you really want to start a new network?!= -Hyperloop Tube= Junction at = -Open end at = Station '= Station at = +Open end at = There is no station/junction on this level. = +Do you really want to start a new network?!= +Hyperloop Tube= ### tubecrowbar.lua ### +[Hyperloop] Error: Tube is too long!= +[Crowbar Help]@n= left: remove node@n= right: repair tube/shaft line@n= -Hyperloop Tube Crowbar= - -Repair via WorldEdit placed Hyperloop tubes by reusing WorldEdit pos1/pos2= - -Rights to remove tube nodes by means of the crowbar= You don't have the necessary privs!= -[Crowbar Help]@n= +Hyperloop Tube Crowbar= +Rights to remove tube nodes by means of the crowbar= +Repair via WorldEdit placed Hyperloop tubes by reusing WorldEdit pos1/pos2= ### waypoint.lua ### diff --git a/hyperloop/seat.lua b/hyperloop/seat.lua index 839d9ff..95ee396 100644 --- a/hyperloop/seat.lua +++ b/hyperloop/seat.lua @@ -75,6 +75,10 @@ local function on_arrival(tDeparture, tArrival, player_name, sound) local yaw = hyperloop.facedir_to_rad(tArrival.facedir) - offs player:set_look_yaw(yaw) end + -- set player name again + if tArrival.attributes then + player:set_nametag_attributes(tArrival.attributes) + end end -- play arrival sound minetest.sound_stop(sound) @@ -156,7 +160,10 @@ local function on_start_travel(pos, node, clicker) clicker:set_pos(pos) -- rotate player to look in move direction clicker:set_look_horizontal(hyperloop.facedir_to_rad(tDeparture.facedir)) - + -- hide player name + tArrival.attributes = clicker:get_nametag_attributes() + clicker:set_nametag_attributes({text = " "}) + -- activate display local dist = hyperloop.distance(pos, tArrival.pos) local text = I("Destination:").." | "..string.sub(tArrival.name, 1, 13).." | "..I("Distance:").." | ".. diff --git a/hyperloop/tubecrowbar.lua b/hyperloop/tubecrowbar.lua index 4e9f1ee..a359e9e 100644 --- a/hyperloop/tubecrowbar.lua +++ b/hyperloop/tubecrowbar.lua @@ -39,6 +39,10 @@ local function repair_tubes(itemstack, placer, pointed_thing) local dir1, dir2, fpos1, fpos2, fdir1, fdir2, cnt1, cnt2 = Shaft:tool_repair_tube(pos, placer, pointed_thing) if fpos1 and fpos2 then + if cnt1 + cnt2 >= Shaft.max_tube_length then + minetest.chat_send_player(placer:get_player_name(), string.char(0x1b) .. + "(c@#ff0000)" .. S("[Hyperloop] Error: Tube is too long!")) + end minetest.chat_send_player(placer:get_player_name(), chat_message(dir1, cnt1, fpos1, fdir1)) minetest.chat_send_player(placer:get_player_name(), chat_message(dir2, cnt2, fpos2, fdir2)) minetest.sound_play({ @@ -51,6 +55,10 @@ local function repair_tubes(itemstack, placer, pointed_thing) local dir1, dir2, fpos1, fpos2, fdir1, fdir2, cnt1, cnt2 = Tube:tool_repair_tube(pos, placer, pointed_thing) if fpos1 and fpos2 then + if cnt1 + cnt2 >= Shaft.max_tube_length then + minetest.chat_send_player(placer:get_player_name(), string.char(0x1b) .. + "(c@#ff0000)" .. S("[Hyperloop] Error: Tube is too long!")) + end minetest.chat_send_player(placer:get_player_name(), chat_message(dir1, cnt1, fpos1, fdir1)) minetest.chat_send_player(placer:get_player_name(), chat_message(dir2, cnt2, fpos2, fdir2)) minetest.sound_play({ diff --git a/minecart/lib.lua b/minecart/lib.lua index 9d78e51..efdcf72 100644 --- a/minecart/lib.lua +++ b/minecart/lib.lua @@ -62,11 +62,13 @@ function minecart.get_node_lvm(pos) local param2_data = vm:get_param2_data() local area = VoxelArea:new({MinEdge = MinEdge, MaxEdge = MaxEdge}) local idx = area:indexp(pos) - node = { - name = minetest.get_name_from_content_id(data[idx]), - param2 = param2_data[idx] - } - return node + if data[idx] and param2_data[idx] then + return { + name = minetest.get_name_from_content_id(data[idx]), + param2 = param2_data[idx] + } + end + return {name="ignore", param2=0} end function minecart.stopped(vel, tolerance) diff --git a/minecart/monitoring.lua b/minecart/monitoring.lua index daeb2e4..a77d89e 100644 --- a/minecart/monitoring.lua +++ b/minecart/monitoring.lua @@ -133,13 +133,14 @@ local function monitoring() local pos = entity.object:get_pos() local vel = entity.object:get_velocity() local rot = entity.object:get_rotation() - if not minetest.get_node_or_nil(pos) then -- unloaded area - lib.unload_cart(pos, vel, entity, item) - item.stopped = minecart.stopped(vel) + if pos and vel and rot then + if not minetest.get_node_or_nil(pos) then -- unloaded area + lib.unload_cart(pos, vel, entity, item) + item.stopped = minecart.stopped(vel) + end + -- store last pos from cart + item.last_pos, item.last_vel, item.last_pitch, item.last_yaw = pos, vel, rot.x, rot.y end - -- store last pos from cart - item.last_pos, item.last_vel, item.last_pitch, item.last_yaw = pos, vel, rot.x, rot.y - else -- no cart running local pos, vel, pitch, yaw = get_pos_vel_pitch_yaw(item) if pos and vel then diff --git a/signs_bot/README.md b/signs_bot/README.md index ce5abfa..b7831c5 100644 --- a/signs_bot/README.md +++ b/signs_bot/README.md @@ -3,9 +3,9 @@ Signs Bot [signs_bot] **A robot controlled by signs.** -Browse on: ![GitHub](https://github.com/joe7575/signs_bot) +Browse on: [GitHub](https://github.com/joe7575/signs_bot) -Download: ![GitHub](https://github.com/joe7575/signs_bot/archive/master.zip) +Download: [GitHub](https://github.com/joe7575/signs_bot/archive/master.zip) ![Signs Bot](https://github.com/joe7575/signs_bot/blob/master/screenshot.png) @@ -105,7 +105,7 @@ For all Inventory commands applies: If the inventory stack specified by i repeat -- start of a loop block, is a number 1..999 end -- end of a loop block call