Commit Graph

79 Commits

Author SHA1 Message Date
Peter Nerlich 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
Peter Nerlich 2df1d2f52d
simplify split function for our usecase 2020-12-07 14:25:09 +01:00
Peter Nerlich 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
Peter Nerlich b73fc28f11
less confusing code
Co-authored-by: Christopher Head <chead@chead.ca>
2020-12-07 14:18:15 +01:00
Peter Nerlich d3fecd94e4
better readable condition
Co-authored-by: Christopher Head <chead@chead.ca>
2020-12-07 14:17:39 +01:00
Peter Nerlich c5aeb9e8c5 rework the whole line breaking algorithm and indicate its rules in the function 2020-11-23 16:02:49 +01:00
Peter Nerlich 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
Peter Nerlich 3c0900c115
don't swallow multiple spaces
(only at line breaks)
2020-11-17 23:44:58 +01:00
Peter Nerlich 8c1ba6714e
fix doubled padding
was leading to offset of lcd content to the right
2020-11-12 10:11:08 +01:00
Peter Nerlich e777c20b41
fix constant naming 2020-11-12 10:05:34 +01:00
Peter Nerlich 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
David Leal 021c521c65
Use mod.conf for dependencies and description (#59) 2020-10-30 15:50:26 +01:00
Christopher Head 434010bdd0 Implement slot tracking
Whenever putting or taking items, tell the listeners which slot they
were put into or taken from. Also tell listeners when the user moves
items from one slot to another.
2019-03-05 22:04:56 -08:00
Christopher Head 9e4f1a5bab Rework Digilines chest
Fix various bugs regarding spurious messages being sent, item stack
swapping not being reported properly, etc.. Change from sending strings
to sending tables. Enhance Pipeworks tube support by reporting which
side an item is added or removed via tube or filter-injector.
2019-03-05 22:04:56 -08:00
DS 925b318800 change digiline to digilines in nodedef (#47)
* change digiline to digilines in nodedef

* choose the other variant
2019-03-05 22:01:12 -08:00
Auke Kok 930ca4779a Update .luacheckrc 2019-03-05 22:00:20 -08:00
GreenXenith 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
12Me21 c7f4185e92 Fix duplicate messages (#52)
* Fixes duplicate messages
2019-03-05 21:41:50 -08:00
HybridDog a5e2f05d92 Use new minetest.settings (#51)
Use new minetest.settings.
2019-03-05 21:35:36 -08:00
DS 8b73f9e11d add listring to chest (#46)
* add listring to chest
2018-02-16 17:31:53 -08:00
DS-Minetest fceb4bb696 lcd: make lettering nearer to display 2017-03-14 21:57:52 -07:00
Diego Martínez 7530df494f Backwards compat code. 2017-03-14 21:57:01 -07:00
Diego Martínez 196a6da26c Remove unused args. 2017-03-14 21:57:01 -07:00
Diego Martínez 5caacf3019 Add `.luacheckrc` and fix warnings. 2017-03-14 21:57:01 -07:00
Diego Martínez f5e6a7d181 Change to `.`. 2017-03-14 21:57:01 -07:00
Diego Martínez 6a2fa5a3e4 Rename global table to `digilines`.
This also adds a backwards compat alias so other mods
shouldn't break.
2017-03-14 21:57:01 -07:00
Diego Martínez 54b1b3fe91 Add `settingtypes.txt`.
This allows configuring the mod from the GUI.
2017-03-06 13:58:47 -08:00
Christopher Head 84133a10df Use `minetest.hash_node_position` for searches.
Previously, Digilines used concatenations of X/Y/Z coordinates into
strings as keys to check for repeatedly visiting the same node during a
graph search. Replace them with integer keys generated by
`minetest.hash_node_position`, which should be more efficient.
2017-02-28 22:13:19 -08:00
Christopher Head 25ea72270d Use VoxelManipulators to force-load nodes.
If a node needed during wire traversal is not currently loaded, it is
loaded from disk using a VoxelManipulator.
2017-02-28 22:13:19 -08:00
Christopher Head 514fb2e289 Replace DFS with BFS.
Replace the recursive depth-first search of a wire network with an
iterative breadth-first search, primarily to reduce memory footprint and
eliminate the possibility of stack overflow.
2017-02-28 22:13:19 -08:00
Auke Kok 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
cheapie 4c743f9c4d Add protection support to channel fields (#33) 2016-05-23 11:13:24 -07:00
Auke Kok b6e8913901 Adding a screenshot and description.txt
This is for the toplevel folder alone. Subfolders could each use
a separate one, but I feel they are not needed atm.
2016-04-11 21:30:40 -07:00
Auke Kok 2a0e0d6b73 Merge pull request #30 from Rui914/master
Fix undeclared global variable "rules"
2016-04-11 21:24:47 -07:00
Rui914 00deb0c3fc Fix undeclared global variable "rules" 2016-04-10 11:02:01 +09:00
Florian Euchner 60c3e608a9 Merge pull request #28 from electrodude/bugs
Add missing local variable
2016-01-19 17:09:40 +01:00
electrodude dcb25cbe2f Removed redundant minetest.get_meta(pos) 2016-01-18 11:54:05 -05:00
electrodude aabf7ec575 Added missing local variable
The on_metadata_inventory_take method of digiline_inventory:chest was
broken, since it used a `channel` local variable that was never defined,
but should have been fetched from the node's meta
2016-01-18 11:44:10 -05:00
Jeija 69e1d1ba9b Merge branch 'Rui914-patch-1' 2015-08-23 10:43:11 +02:00
Rui914 bedfa58672 Fix digilines_lcd problems 2015-08-21 01:28:51 +09:00
Florian Euchner e2b9141ccc Merge pull request #23 from MT-Modder/infotext-lcd
Add infotext to lcd, like signs
2015-02-14 20:17:40 +01:00
MT-Modder bb523af0de Add infotext to lcd like signs 2015-02-14 13:21:44 -05:00
Florian Euchner 1dfc602eca Merge pull request #22 from MT-Modder/chest-craft
Add craft recipe for digiline chest
2015-02-13 22:38:24 +01:00
MT-Modder 81ffa957d2 Add craft recipe for digiline chest 2015-02-05 15:24:22 -05:00
Jeija 1bf3151320 Fix #21, undeclared variables 2015-01-12 18:51:49 +01:00
Florian Euchner a121bc0b12 Merge pull request #20 from 163140/master
Added signal "empty"
2014-12-08 12:38:20 +01:00
163140 c2f74cd42a Added signal "empty"
"Empty" signal useful for automated factories
2014-12-08 01:31:06 +00:00
Jeija 241a7ed75f Fix minetest-mod-mesecons issue #188: Use digiline:tablecopy 2014-11-22 19:26:04 +01:00
Jeija 93135be10c Define digiline chest from scratch by Zefram, posted in #16 2014-11-19 19:27:58 +01:00
Florian Euchner 1bb2230163 Merge pull request #3 from lordcirth/master
Added crafting recipes for digiline and lcd.
2014-11-19 18:59:52 +01:00