Merge branch 'beta'

master
David G 2019-03-06 11:22:53 -07:00
commit 045e5dcbc3
14 changed files with 1091 additions and 749 deletions

101
README.md
View File

@ -1,29 +1,54 @@
Tunnelmaker 2.0
===============
A Minetest Mod to easily create arbitrarily curved tunnels, pathways, and bridges.
![Tunnelmaker Screenshot](screenshot.png "Tunnelmaker")
A Minetest Mod to easily create arbitrarily curved tunnels.
Especially designed to make laying track for the advtrains mod easier.
by David G (kestral246@gmail.com)
By David G (kestral246@gmail.com), with significant contributions by Mikola.
Warning: Version 2 only supports Minetest 5.0+.
-----------------------------------------------
In addition there's been a MAJOR change with controls.
------------------------------------------------------
For Minetest 0.4.x, use the git branch legacy, or the following zip file: [tunnelmaker-legacy.zip](https://github.com/kestral246/tunnelmaker/archive/legacy.zip).
Features
--------
- Digs "arched" tunnels (5 nodes wide and 5 nodes tall) in all sixteen possible advtrains track directions with one click. Also digs up or down in the eight possible advtrains slope track directions.
- Fills in tunnel floor (central 3 nodes wide) with stone. Outside of tunnels this can be used to clear ground, provide cuts and fills, and build simple stone bridges. However, bridge supports will need to be added manually.
- **New:** Tunneling through water has been enabled by default. This will add a glass enclosure around the tunnel as you go. Configuration variable to disable, if desired.
- **New:** Height of tunnel and whether to use "arches" are now configuration options. (Defaults to height of 5 with "arches", which matches previous release.)
- Requires "tunneling" privilege, checks protections, and only works in creative mode.
- Create paths, bridges, and tunnels in all sixteen possible advtrains track directions with one click.
- Also digs up or down in the eight possible advtrains slope track directions.
- Digging mode and options can be set using new User Options menu.
- Supports Advanced trains mod with gravel embankment, arched and optionally lined tunnels, and two widths of bridges.
- Supports Bike mod with two widths of cobblestone pathways and bridges, along with unlined tunnels.
- Supports general excavation with unlined and lined tunnels.
- Adds reference nodes to help digging and laying advtrains track—now easy to remove when done.
- Adds glass enclosure when in water to create water tunnels.
- Requires "tunneling" privilege, and checks protections before digging.
- No crafting recipe, so needs to be given to player.
- Works in both creative and survival modes, but tunneling does not place any nodes into user's inventory.
- Supports client-side translation files. Currently only have Russian and my attempt at a French translation. **Other languages will be gratefully accepted.** Reference template file is available in locale directory.
![Simple Stone Bridge](images/simple_stone_bridge.png "Simple Stone Bridge")
![Bike path up mountain](images/bike_path.png "Bike path up mountain")
Controls (Caution MAJOR change!)
--------------------------------
- **Left-click:** Super dig one node. One click digs any node (non-repeating) and places it in player's inventory. However, it can't be used to pick up dropped items.
- **Shift-left-click:** Dig tunnel in direction player pointed. Note that this won't place any of the dug nodes in player's inventory.
- **Right-click:** Cycle through vertical digging modes, up, down, and horizontal.
- **Shift-right-click:** Bring up User Options menu (see below).
In addition:
- **Aux-left-click:** Also digs tunnel (useful if flying).
- **Aux-right-click:** Also digs tunnel (needed for Android).
The reason for this change is that while updating this mod I had to test it a lot, and I've lost track of the number of times I've accidentally pressed right-click and dug a tunnel when I didn't want to. The only solution was to move tunnel digging to another key combination.
How to enable
-------------
- Enable creative mode. This mod is too overpowered for survival mode.
- Give player "tunneling" privilege (/grant <player> tunneling).
- To give player a tunnelmaker tool use (/give <player> tunnelmaker:1). *Or see below for crafting recipe.*
- Install tunnelmaker mod, requires default and stairs. For nicer bike path ramps, I recommend installing the angledstairs mod, which was used for the picture above, but it's not required.
- Grant player "tunneling" privilege (/grant <player> tunneling).
- To give player a tunnelmaker tool use (/give <player> tunnelmaker:tool1).
How to dig
----------
@ -31,7 +56,7 @@ How to dig
- Move to digging location and highlight node at ground level. (Gray node in diagrams marked with an '×'.)
- Point player in desired digging direction. (Inventory icon will change to show current direction.)
- Right-click mouse to dig tunnel.
- Hold down shift key while left-clicking mouse to dig tunnel.
Digging for slopes
@ -40,12 +65,26 @@ Digging for slopes
- Move to digging location and highlight node at ground level.
- Point player in desired digging direction.
- Hold sneak key (shift on pc) and right-click mouse to select digging mode. Inventory icon will cycle through possible modes with each click: 'U' for digging up, 'D' for digging down, and no letter for default horizontal.
- Release sneak key and right-click mouse to dig tunnel.
- *Mode will reset after each dig. It will also reset if player turns or moves.*
- Right-click mouse to select digging mode. Inventory icon will cycle through possible modes with each click: 'U' for digging up, 'D' for digging down, and no letter for default horizontal.
- Shift-left-click mouse to dig tunnel.
- There is a user option to control whether to reset direction after each dig or not (see below).
![Tunnelmaker Icons](images/icons.png "Tunnelmaker Icons")
User Options menu
----------------
Use shift-right-click to bring up this menu.
![Tunnelmaker User Options](images/user_options.gif "Tunnelmaker User Options")
Descriptions of all the options:
- **Digging mode** Select one of the three digging modes: General purpose, Advanced trains, or Bike paths.
- **Wide paths / lined tunnels** Select between narrow and wide paths, and whether tunnels are lined with stone or not.
- **Continuous up/down digging** Don't reset up/down after each dig.
- **Clear tree cover** Remove all plant material above dig up to 30 nodes above ground. CPU intensive, so shuts off after two minutes.
- **Remove reference nodes** Easily remove reference nodes by walking over them. Also shuts off after two minutes.
- **Lock desert mode to: either "Desert" or "Non-desert"** Option only available when "add_desert_material = true" has been added to minetest.conf. Overrides use of desert materials in desert biomes. Useful for transition regions.
Advtrains digging reference
---------------------------
@ -60,36 +99,12 @@ The following diagrams show how to make curved tunnels that support the differen
![Turns from 45°](images/dir45.png "Turns from 45")
Other details
-------------
- Using left-click digs similarly to a steel pickaxe, which is useful for making minor adjustments.
- Cobblestone references are placed to show where to continue digging for laying advtrains track. (Configuration variable to disable.)
- If the ceiling is going to be a falling node, it is replaced with cobblestone before digging out below it.
- Torches are placed only if ceiling is stone or desert_stone. (Torch configuration options added.)
- Continuous up/down digging configuration option added.
- For minetest version 5.0+, when in desert biomes the fills will change to the desert versions of stone or cobble.
- Won't dig advtrains track. Highlighting track will dig based on ground below it. However, be careful with slope track, since this probably isn't what you want. Also this won't work with ATC track, since it also uses right-click.
Crafting guide
--------------
```
diamondblock mese_block diamondblock
mese_block diamondblock mese_block
diamondblock mese_block diamondblock
```
![Crafting guide](images/crafting.png "Crafting guide")
License
-------
- **textures:** License CC0-1.0
- **code:** My changes to original code are CC0-1.0
- **original compassgps license:** Original code by Echo, PilzAdam, and TeTpaAka is WTFPL. Kilarin (Donald Hines) changes are CC0 (No rights reserved)
Thanks
------
- [advtrains](https://github.com/orwell96/advtrains/) / orwell96, et.

View File

@ -1,100 +0,0 @@
tunnelmaker change log
-- Version 1.0
-- Add two additional user configurations:
-- Set height of tunnels.
-- Optionally disable "arches".
-- Fixed bug in one reference block placement.
-- Version 0.9.9
-- Add additional user configurations.
-- Optionally disable adding torches.
-- Optionally change search distance for torches.
-- Optionally allow continuous up/down digging, without resetting each time.
-- Version 0.9.8
-- Optionally add back in water tunnels.
-- Optionally disable placing cobblestone references on the ground.
-- Edit init.lua to change these configuration variables (near top of file).
-- Version 0.9.7
-- Revert back to checking for dtrack by name, instead of groups.advtrains_track.
-- Groups doesn't work in latest versions of advtrains.
-- Changed left-click digging to steel_pick equivalent instead of wood_pick.
-- Version 0.9.6
-- Delete player's global state when player leaves.
-- Version 0.9.5
-- Add cobble braces for bridges if they would be air.
-- Version 0.9.4
-- Major update to build in support for digging up and down.
-- Digging up and down only supports orthogonal and 45deg directions to match advtrains track.
-- (Note: advtrains track requires at least one horizontal track matching slope before making any turns.)
-- To select updown direction, hold sneak key (shift) while right-clicking tunnelmaker.
-- One click selects up (Yellow 'U' on icon), second click selects down (Yellow 'D' on icon),
-- third click returns back to horizontal (no letter on icon).
-- Updown state can also be reset by rotating to different icon, or moving by some amount (still tuning this).
-- Once updown state is selected, release sneak key and use right-click like normal.
-- After digging, updown state will also be reset to horizontal.
-- Known changes/issues caused by using sneak key:
-- • Can't dig up or down while flying.
-- • Digall won't apply its function when right-clicking tunnelmaker.
-- • Can't sneak right-click on ATC track to dig below them.
-- Version 0.9.3
-- Tweak cdir == 2 (nw) digging pattern.
-- Clean up some old debug statements.
-- Version 0.9.2
-- Continue work making tunnelmaker play nice with advtrains track.
-- Per Orwell's request, changed method for determining if node is advtrains track.
-- Instead of searching for dtrack in name of node,
-- I check whether the node belongs to the advtrains_track group using:
-- if minetest.registered_nodes[name].groups.advtrains_track == 1 then
--
-- Note that one can't right click ATC track with tunnelmaker, that track overrides right click.
-- Trying to right click on slope track probably won't do what is wanted. Right now it treats
-- it like any other track, and digs the ground level.
-- Version 0.9.1
-- 1. Try to play nicer with already placed advtrains track (dtrack*).
-- A. Don't dig dtrack nodes.
-- This allows expanding or extending tunnels where track has already been laid.
-- However this causes issues when using tunnelmaker to raise or lower track.
-- Trying to dig tunnel one node above track won't fill where placed track exists.
-- Trying to dig tunnel one node below track will cause existing track to drop.
-- B. If pointing to dtrack node, assume user actually wants to point to ground below track.
-- Lower positions of pointed_thing by one node, while keeping name the same.
-- This assumes that existing track is sitting on valid node.
-- 2. Restruction direction code to make it much shorter.
-- 3. Fixed bug in implementation of SSW digging pattern.
--
-- Version 0.9.0
-- 1. Updated digging patterns to fix minor irregularities.
-- 2. Added protections for tunneling in water.
-- Adds glass walls around tunnel whenever there is water.
-- Adds glass endcap at end to protect from flooding while tunneling.
-- Note that this can place undesired glass when digging next to ground-level water. This
-- won't happen as long as you're one node higher than the water.
-- 3. Restructured code again. Code is longer, but simpler to understand.
-- Version 0.8.1
-- Test if air before digging. Cleans up air not diggable INFO messages.
-- Added test for desert-type biomes, which lets me start using biome-appropriate fill.
-- needs minetest 0.5.0+ to correctly flag desert biomes
-- however, if api doesn't exist (using 0.4.x), test just always returns false
-- Version 0.8.0
-- Changed from dig_node to node_dig (based on what matyilona200 did for the Tunneltest mod)
-- Places only a single instance of each type of block dug in inventory
-- Doesn't cause blocks to drop in 0.5.0-dev
-- Works with digall mod, but make sure it's deactivated before tunneling!
-- Version 0.7.0
-- Added test for fallable blocks in ceiling and replace them with cobblestone.
-- Fixed bug where I was digging from lower blocks to higher blocks.
-- Simplified and cleaned up tunneling code.
-- Version 0.6.0
-- Increased width and height of tunnel created.

View File

@ -1 +1,3 @@
default
stairs
angledstairs?

BIN
images/bike_path.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
images/user_config.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
images/user_options.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

1556
init.lua

File diff suppressed because it is too large Load Diff

15
locale/tunnelmaker.fr.tr Normal file
View File

@ -0,0 +1,15 @@
# textdomain: tunnelmaker
# Translated by kestral
Tunnelmaker - User Options=Tunnelmaker - Options utilisateur
General purpose mode=Usage général
Advanced trains mode=Trains avancés
Bike path mode=Pistes cyclables
Wide paths / lined tunnels=Chemins larges / tunnels doublés
Continuous up/down digging=Creuser en haut/en bas continuellment
Clear tree cover=Enlever la couverture d'arbre
Remove reference nodes=Enlever les nodes de références
Lock desert mode to:=Fixer le mode de désert à:
Desert=Désert
Non-desert=Non-désert
Exit=Quitter
Automatically disabled after 2 min.=Désactiver automatiquement après 2 min.

15
locale/tunnelmaker.ru.tr Normal file
View File

@ -0,0 +1,15 @@
# textdomain: tunnelmaker
# Translated by Mikola
Tunnelmaker - User Options=Настройки туннелепроходчика
General purpose mode=Обычный туннель
Advanced trains mode=Железнодорожный туннель
Bike path mode=Сглаженный туннель
Wide paths / lined tunnels=Широкие дорожки / облицованные туннели
Continuous up/down digging=Непрерывное копание вверх / вниз
Clear tree cover=Спилить растительность над дорогой
Remove reference nodes=Убрать разметку на дороге
Lock desert mode to:=Блокировка режима пустыни для:
Desert=Пустыня
Non-desert=Вне пустыни
Exit=Закрыть
Automatically disabled after 2 min.=Автоматически отключается через 2 минуты.

View File

@ -0,0 +1,15 @@
# textdomain: tunnelmaker
# Translated by your_name
Tunnelmaker - User Options=
General purpose mode=
Advanced trains mode=
Bike path mode=
Wide paths / lined tunnels=
Continuous up/down digging=
Clear tree cover=
Remove reference nodes=
Lock desert mode to:=
Desert=
Non-desert=
Exit=
Automatically disabled after 2 min.=

View File

@ -1,3 +1,4 @@
name = tunnelmaker
description = Easily dig arbitrarily curved tunnels.
depends = default
description = Easily create arbitrarily curved tunnels and paths.
depends = default, stairs
optional_depends = angledstairs

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 311 KiB

31
settingtypes.txt Normal file
View File

@ -0,0 +1,31 @@
# This file contains settings of tunnelmaker that can be changed in
# minetest.conf
# Default for digging mode in User config menu.
# (default = 2)
tunnel_digging_mode (Tunnel digging mode) int 2 1 3
# Default for width/lined tunnels option in User config menu.
# (default = false)
add_lined_tunnels (Add lined tunnels) bool false
# Default for up/down digging option in User config menu.
# (default = false)
continuous_updown_digging (Continuous updown digging) bool false
# Allow the use of other materials in desert biomes.
# Material changes in "Marking desert" and "Coating desert"
# (default = false)
add_desert_material (Add desert material) bool false
# Type of light to use in tunnels.
# (default = default:torch)
tunnel_lights (Tunnel lights) string default:torch
# Set height for train tunnels.
# (default = 5)
train_tunnel_height (Train tunnel height) int 5 5 8
# Define if train tunnels have arches.
# (default = true)
train_tunnel_arches (Train tunnel arches) bool true