I was thinking that it might be a good addition to allow players to name their rail dockers. It would work in a similar way to how we can name inner ship remotes. This way you knew if you were firing the right docker from your hot bar or not.
We already have display modules which schema could use to name adjacent blocks.
[named]BlockType => "[xyz]±XXX±YYY±ZZZ"
If you want to name a rail-block with an adjacent display module you should be able to do it with:Renaming anything via a linked or adjacent display block is a great idea. I'd recommend creating a whole new suggestion thread for this, and see how it flies.
Code:
display module:
input/text (example): "[named above]myRailDocker"
content/text (auto): "[named ±±±]myRailDocker@±XXX±YYY±ZZZ"
displays/text (auto): "myRailDocker@±XXX±YYY±ZZZ" (similar to an email address so that regex can filter it)
another display module:
input+content/text: "[xyz]myRailDocker:enable"
displays/text (auto): "myRailDocker@±XXX±YYY±ZZZ"
as long as there is a display module containing "[named*]myRailDocker@±XXX±YYY±ZZZ"
displays/text (fail): "myRailDocker@unavailable"
use "above", "below", "right", "left", "behind", "infront" for "±±±" in "[named ±±±]" (or "ABRLHF" as alias)
And this is "What The Cat" needs to implement it:
(It might sound complicated, but it's standard for experienced developers)
(the text/string operations only run once when the block contents change, not constantly)
For user-friendly coordinates:
Theoretically, this is possible with regex, but it's not newbie-friendly and requires quite a few blocks (maybe 5-8 instead of 2) to do so, which is less time spent for building. You would also need to enter the coordinates manually.- check for "[named]" or "[named "
- check for lowercase and check "above]", "below]", …
- or check for uppercase and check "ABRLHF"
- or check for +++, --- and === for which a/bel/r/l/beh/i and ABRLHF are aliases for.
- check for a following "]"
- check for a non-alphanumeric (0..9, a..z, A..Z) name length delimiter and use java's .substring()
- check for a "@" and if not existent, add a text like "@+0-3+65" before saving it
- check for "[xyz]"
- check for a alphanumeric (0..9, a..z, A..Z) name
- check for a ±num±num±num (±x±y±z) coordinate (± being + or -)
- search a wordbook for the name/coordinate (the wordbook can be a standard binary tree or anything with a reference to a class-instance storing the blocks position-3int/name-string and contents)
- check for ":"
- search a wordbook for alphanumerics in place of "enable" to get the command-number from it's entry
- search the non-alphanumeric delimiter
- do commands[number].run(x, y, z, ACTIVATE_LOGIC) this action only changes when the block text changes, thus not as often as it is used.
- commands[] implement the interface runable.run(int, int, int, enum)
Last edited: