diff options
author | Y. Wang <yw05@forksworld.de> | 2023-06-02 13:30:54 +0200 |
---|---|---|
committer | gpcf <gpcf@gpcf.eu> | 2024-08-08 22:48:23 +0200 |
commit | 0bfc7bbe099c7bba20cf1194b3ffad9471d0c7a4 (patch) | |
tree | ef8d8f3914b32fc29d9b46652861b854b4cb6844 /advtrains/init.lua | |
parent | 4cfd07e992ae44ac9d06c4936df9dc8d71ac905b (diff) | |
download | advtrains-0bfc7bbe099c7bba20cf1194b3ffad9471d0c7a4.tar.gz advtrains-0bfc7bbe099c7bba20cf1194b3ffad9471d0c7a4.tar.bz2 advtrains-0bfc7bbe099c7bba20cf1194b3ffad9471d0c7a4.zip |
Rework graphical train HUD code
- A basic texture manipulation API is added; currently this is only a
(selected) subset of texture modifiers provided by MT; the goal is to
avoid writing (potentially incorrect) texture strings by hand;
- The graphical HUD code is cleaned up; in particular, most code used
for generating texture patterns are moved to texture.lua so that the
code can be used outside of the HUD;
- Inactive elements are given the darkslategray background.
A basic unittest is added; however, it needs to be expanded for better
coverage.
Reported-by: Lars Müller <appgurulars@gmx.de>
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r-- | advtrains/init.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index cc8f8d1..33e5b1d 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -202,6 +202,7 @@ advtrains.meseconrules = advtrains.fpath=minetest.get_worldpath().."/advtrains" advtrains.speed = dofile(advtrains.modpath.."/speed.lua") +advtrains.texture = dofile(advtrains.modpath.."/texture.lua") dofile(advtrains.modpath.."/path.lua") dofile(advtrains.modpath.."/trainlogic.lua") |