TF-8 Last-Modified: Wed, 02 Dec 2026 08:01:30 GMT Expires: Sat, 29 Nov 2036 08:01:30 GMT advtrains.git - Advtrains mod for minetest.
aboutsummaryrefslogtreecommitdiff
path: root/advtrains/advtrains/settingtypes.txt
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains/advtrains/settingtypes.txt')
-rw-r--r--advtrains/advtrains/settingtypes.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/advtrains/advtrains/settingtypes.txt b/advtrains/advtrains/settingtypes.txt
new file mode 100644
index 0000000..60f8477
--- /dev/null
+++ b/advtrains/advtrains/settingtypes.txt
@@ -0,0 +1,8 @@
+# Disable the train collision behavior. Trains will never collide and just drive through each other.
+# Note that this makes coupling trains impossible, and introduces 'interesting' behavior with detector and ATC rails.
+# Also, it is very hard to separate two subway trains that are stuck inside each other, since it can be impossible to access the driver seat.
+advtrains_disable_collisions (Disable train collisions) bool false
+# Enable the debug ring buffer
+# This has no effect on the user experience, except decreased performance. Debug outputs are saved in a ring buffer to be printed when an error occurs.
+# You probably want to leave this setting set to false.
+advtrains_enable_debugging (Enable debugging) bool false \ No newline at end of file
lass="hl opt">.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.text.InputType; import android.view.KeyEvent; import android.view.View; import android.view.View.OnKeyListener; import android.widget.EditText; public class MinetestTextEntry extends Activity { private final int MultiLineTextInput = 1; private final int SingleLineTextInput = 2; private final int SingleLinePasswordInput = 3; public AlertDialog mTextInputDialog; public EditText mTextInputWidget; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle b = getIntent().getExtras(); String acceptButton = b.getString("EnterButton"); String hint = b.getString("hint"); String current = b.getString("current"); int editType = b.getInt("editType"); AlertDialog.Builder builder = new AlertDialog.Builder(this); mTextInputWidget = new EditText(this); mTextInputWidget.setHint(hint); mTextInputWidget.setText(current); mTextInputWidget.setMinWidth(300); if (editType == SingleLinePasswordInput) { mTextInputWidget.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); } else { mTextInputWidget.setInputType(InputType.TYPE_CLASS_TEXT); } builder.setView(mTextInputWidget); if (editType == MultiLineTextInput) { builder.setPositiveButton(acceptButton, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { pushResult(mTextInputWidget.getText().toString()); } }); } builder.setOnCancelListener(new DialogInterface.OnCancelListener() { public void onCancel(DialogInterface dialog) { cancelDialog(); } }); mTextInputWidget.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View view, int KeyCode, KeyEvent event) { if (KeyCode == KeyEvent.KEYCODE_ENTER) { pushResult(mTextInputWidget.getText().toString()); return true; } return false; } }); mTextInputDialog = builder.create(); mTextInputDialog.show(); } public void pushResult(String text) { Intent resultData = new Intent(); resultData.putExtra("text", text); setResult(Activity.RESULT_OK, resultData); mTextInputDialog.dismiss(); finish(); } public void cancelDialog() { setResult(Activity.RESULT_CANCELED); mTextInputDialog.dismiss(); finish(); } }