aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2017-03-09 13:22:11 +0100
committerorwell96 <mono96.mml@gmail.com>2017-03-09 13:22:11 +0100
commit4187d2504cf00bc321ae57f50e3feeb911987d06 (patch)
tree8d996531f504cf4c30f01bd94a0de2840396b17a /advtrains
parent1137dad2fe82aa6776bc8e489e1ec96e363dd3ef (diff)
downloadadvtrains-4187d2504cf00bc321ae57f50e3feeb911987d06.tar.gz
advtrains-4187d2504cf00bc321ae57f50e3feeb911987d06.tar.bz2
advtrains-4187d2504cf00bc321ae57f50e3feeb911987d06.zip
"Sneak" instead of "Shift" for the sneak key
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/advtrains/api_doc.txt7
-rw-r--r--advtrains/advtrains/locale/de.txt6
-rw-r--r--advtrains/advtrains/wagons.lua6
3 files changed, 9 insertions, 10 deletions
diff --git a/advtrains/advtrains/api_doc.txt b/advtrains/advtrains/api_doc.txt
index db72dda..20f285f 100644
--- a/advtrains/advtrains/api_doc.txt
+++ b/advtrains/advtrains/api_doc.txt
@@ -114,7 +114,7 @@ On a train, right-clicking the wagon will make you get off the train unless:
In case there's no possibility, does nothing.
In case there are multiple possibilities, will show a form.
-If you can't enter a train because the doors are closed, any of the train's wagon owners or people authorized by them can open the doors(on the side they are standing) with shift-click.
+If you can't enter or leave a train because the doors are closed, holding the Sneak key while right-clicking bypasses the "doors have to be open" enforcement.
### Tracks
Most modders will be satisfied with the built-in tracks. If cog railways, maglev trains and mine trains are added, it is necessary to understand the definition of tracks. Although the tracks API is there, explaining it would require more effort than me creating the wanted definitions myself. Contact me if you need to register your own rails using my registration functions.
@@ -141,11 +141,10 @@ minetest.register_node(nodename, {
return not advtrains.get_train_at_pos(pos)
end,
after_dig_node=function(pos)
- advtrains.invalidate_all_paths()
- advtrains.reset_trackdb_position(pos)
+ advtrains.ndb.update(pos)
end,
after_place_node=function(pos)
- advtrains.reset_trackdb_position(pos)
+ advtrains.ndb.update(pos)
end,
^- the code in these 3 default minetest API functions is required for advtrains to work, however you can add your own code
diff --git a/advtrains/advtrains/locale/de.txt b/advtrains/advtrains/locale/de.txt
index c8aaab7..fe770d8 100644
--- a/advtrains/advtrains/locale/de.txt
+++ b/advtrains/advtrains/locale/de.txt
@@ -1,5 +1,5 @@
This wagon is owned by @1, you can't destroy it. = Dieser Waggon gehört @1, du kannst ihn nicht abbauen.
-Warning: If you destroy this wagon, you only get some steel back! If you are sure, shift-leftclick the wagon. = Warnung: Du erhältst nur etwas Stahl zurück. Wenn du sicher bist, dass du den Waggon zerstören willst, halte 'Schleichen' und klicke links.
+Warning: If you destroy this wagon, you only get some steel back! If you are sure, hold Sneak and left-click the wagon. = Warnung: Du erhältst nur etwas Stahl zurück. Wenn du sicher bist, dass du den Waggon zerstören willst, halte 'Schleichen' und klicke links.
Show Inventory = Zeige Inventar
Select seat: = Wähle einen Sitzplatz aus:
ATC controller, unconfigured. = Zugbeeinflussungsschiene, nicht konfiguiert.
@@ -38,10 +38,10 @@ Speed: = Geschw.:
Target: = Zielges.:
@1 Slope = @1 Steigung
Can't get on: wagon full or doors closed! = Kann nicht einsteigen: Waggon voll oder Türen geschlossen.
-Use shift+click to open doors forcefully! = Nutze Sneak+Rechtsklick, um die Türnotöffnung zu aktivieren und trotzdem einzusteigen.
+Use Sneak+rightclick to bypass closed doors! = Nutze Sneak+Rechtsklick, um die Türnotöffnung zu aktivieren und trotzdem einzusteigen.
Lock couples = Kupplungen sperren
Save wagon properties = Waggon-Einstellungen speichern
-Doors are closed! Use shift-rightclick to open doors with force and get off! = Türen sind geschlossen! Sneak+Rechtsklick, um die Türnotöffnung zu aktivieren und trotzdem auszusteigen.
+Doors are closed! Use Sneak+rightclick to ignore the closed doors and get off! = Türen sind geschlossen! Sneak+Rechtsklick, um die Türnotöffnung zu aktivieren und trotzdem auszusteigen.
Wagon properties = Waggon-Einstellungen
Get off = Aussteigen
Get off (forced) = Aussteigen (erzwingen)
diff --git a/advtrains/advtrains/wagons.lua b/advtrains/advtrains/wagons.lua
index e87b50a..5f7e3de 100644
--- a/advtrains/advtrains/wagons.lua
+++ b/advtrains/advtrains/wagons.lua
@@ -161,7 +161,7 @@ function wagon:on_punch(puncher, time_from_last_punch, tool_capabilities, direct
else
local pc=puncher:get_player_control()
if not pc.sneak then
- minetest.chat_send_player(puncher:get_player_name(), attrans("Warning: If you destroy this wagon, you only get some steel back! If you are sure, shift-leftclick the wagon."))
+ minetest.chat_send_player(puncher:get_player_name(), attrans("Warning: If you destroy this wagon, you only get some steel back! If you are sure, hold Sneak and left-click the wagon."))
return
end
@@ -543,7 +543,7 @@ function wagon:on_rightclick(clicker)
end
end
minetest.chat_send_player(pname, attrans("Can't get on: wagon full or doors closed!"))
- minetest.chat_send_player(pname, attrans("Use shift+click to open doors forcefully!"))
+ minetest.chat_send_player(pname, attrans("Use Sneak+rightclick to bypass closed doors!"))
else
self:show_get_on_form(pname)
end
@@ -761,7 +761,7 @@ function wagon:seating_from_key_helper(pname, fields, no)
self:show_wagon_properties(pname)
end
if fields.dcwarn then
- minetest.chat_send_player(pname, attrans("Doors are closed! Use shift-rightclick to open doors with force and get off!"))
+ minetest.chat_send_player(pname, attrans("Doors are closed! Use Sneak+rightclick to ignore the closed doors and get off!"))
end
if fields.off then
self:get_off(no)