Commit Graph

16 Commits

Author SHA1 Message Date
473b9088d8 fix placement for real this time
we don't use the padding constant for calculations anymore, but to assert the values are set correctly at loadtime
2020-12-07 18:20:31 +01:00
2df1d2f52d simplify split function for our usecase 2020-12-07 14:25:09 +01:00
6651949665 save string.len() call
default for third parameter of string.sub() is already to use the rest of the string

Co-authored-by: Christopher Head <chead@chead.ca>
2020-12-07 14:19:39 +01:00
b73fc28f11 less confusing code
Co-authored-by: Christopher Head <chead@chead.ca>
2020-12-07 14:18:15 +01:00
d3fecd94e4 better readable condition
Co-authored-by: Christopher Head <chead@chead.ca>
2020-12-07 14:17:39 +01:00
c5aeb9e8c5 rework the whole line breaking algorithm and indicate its rules in the function 2020-11-23 16:02:49 +01:00
98349028eb if a words fits the screen width exactly, don't put it on the next line 2020-11-17 23:46:40 +01:00
3c0900c115 don't swallow multiple spaces
(only at line breaks)
2020-11-17 23:44:58 +01:00
8c1ba6714e fix doubled padding
was leading to offset of lcd content to the right
2020-11-12 10:11:08 +01:00
e777c20b41 fix constant naming 2020-11-12 10:05:34 +01:00
45aa9c4a67 display unknown symbols as spaces
old behaviour: unknown symbols are ignored
new behaviour: unknown symbols are not displayed but can be used for formatting
2020-11-12 10:02:34 +01:00
a2230bdeb1 Fix entity overloading and add missing entity check
- Remove bad clear_screen()
- Use minetest.is_player()
- Fix entity with rotated LCD
- Use on_rotate and ad new rotate function, refactor code
2019-03-05 22:00:20 -08:00
fceb4bb696 lcd: make lettering nearer to display 2017-03-14 21:57:52 -07:00
196a6da26c Remove unused args. 2017-03-14 21:57:01 -07:00
5caacf3019 Add .luacheckrc and fix warnings. 2017-03-14 21:57:01 -07:00
7ecb29e87f Convert digilines to a mod (not modpack). (#32)
Digilines is probably used by most people in its entirety.

I've retained the ability to disable inventory, rtc, lightsensor and
LCD by the minetest settings "diglines_enable_rtc" etc.. If set to
"false", these components will not be loaded. It is assumed by default
that these are enabled.

In the conversion the digilines_lcd:lcd node was renamed to
digilines:lcd (same for all the other nodes). To retain backwards
compatibility I've provided aliases for each of these nodes.
2016-05-27 16:08:53 -07:00