Commit Graph

121 Commits

Author SHA1 Message Date
Lars Mueller
e064873012 PNG reader: Use bit library if available 2023-07-21 18:11:20 +02:00
Lars Mueller
15ad69b0fe Add highly experimental texture generation 2023-06-10 15:02:51 +02:00
Lars Mueller
14de9219b7 Remove unnecessary arguments 2023-06-02 16:24:13 +02:00
Lars Mueller
b56f030127 texmod.read: Unescaped ^ in (...) laxness 2023-06-02 16:19:56 +02:00
Lars Mueller
98e452bb6a Refactor minetest.schematic
Fixes a `size` off-by-one error, breaking backwards compatibility.
Also changes `self` to `params` in `schematic.create` to modify the passed table.
Furthermore gets rid of the dirty do-undo for writing.
2023-06-01 13:28:38 +02:00
Lars Mueller
2b1c9cff7c Add support for new texture modifiers
https://github.com/minetest/minetest/pull/10100
has introduced a few inconsistencies with the formats of previous texture modifiers:

`[fill` is the first texture modifier to have a modifying and a generating variant.
Thus `texmod` "constructors" and `texmod` "modifiers" / methods had to be separated;
`texmod.fill` is not the same as `tm.fill` where `tm` is `texmod` instance.
It is rather dirty that the generating variant would ignore
extraneous parameters of the modifying variant, so this is not replicated by the parser.

`[hsl`, `[colorizehsl`, `[contrast` and `[screen` are pretty standard texture modifiers
as far as the DSL is concerned. `[hsl` and `[colorizehsl` are very similar.

`[hardlight` is the first texture modifier to exist just for swapping the base and parameter.
`a^[overlay:b` and `b^[hardlight:a` are both normalized to `b:[hardlight:a` by the DSL.
`[overlay` (called "overlay blend" in the docs) creates a naming conflict with
literal overlaying (`^`). This is resolved by renaming `:overlay` to `:blit`.
2023-05-31 20:12:18 +02:00
Lars Mueller
a9b5d80ca8 Fix [multiply missing from texmod:calc_dims 2023-05-31 18:59:35 +02:00
Lars Mueller
9911442977 texmod: Fix :mask(...) and .mask name collision 2023-05-29 21:22:59 +02:00
Lars Mueller
5fbb159a41 texmod: Fix broken [sheet assertions 2023-05-28 12:30:13 +02:00
Lars Mueller
50bd3d8a07 Make colorspec.from_string case-insensitive 2023-05-28 10:59:51 +02:00
Lars Mueller
520ecc641b texmod.read: Fix [transform followed by a lowercase letter 2023-05-27 19:12:49 +02:00
Lars Mueller
5dc6307661 Fix texmod.colorize crash if ratio is nil 2023-05-27 17:21:41 +02:00
Lars Mueller
73640f11d1 texmod: Stricter file name validation 2023-05-27 14:33:46 +02:00
Lars Mueller
8e5bdc817c Fix handling of multiple texmod transforms 2023-05-27 14:24:54 +02:00
Lars Mueller
e07d646203 texmod.read: Make transforms case-insensitive 2023-05-26 19:27:47 +02:00
Lars Mueller
741746613b Move local var to appropriate scope 2023-05-24 22:42:38 +02:00
Lars Mueller
0b521bbb61 Fix texmod:write emitting unnecessary parens 2023-05-24 22:37:55 +02:00
Lars Mueller
95159c48e8 Refactor texmod:read to pass reader around 2023-05-24 22:27:25 +02:00
Lars Mueller
fe7fb6aeec Remove unused variable in texmod:calc_dims 2023-05-24 22:25:46 +02:00
Lars Mueller
d4ca847b0e Add support for [png to texmod:calc_dims 2023-05-24 21:28:46 +02:00
Lars Mueller
b169077a40 Refactor texmod:calc_dims to use a dispatch table 2023-05-24 21:09:24 +02:00
Lars Mueller
9fc4aaf3b8 Add experimental texture modifier DSL 2023-05-24 19:39:20 +02:00
Lars Mueller
785dcb80f4 Fix lack of defaults for wallmounted boxes 2023-04-01 11:29:23 +02:00
Lars Mueller
a6aaf9938c Add minetest.media.overridden_mods 2023-03-04 15:00:33 +01:00
Lars Mueller
cc49af0ae6 Fix collecting media from subfolders 2023-03-04 15:00:09 +01:00
Lars Mueller
72ca08ed3a Add basic minetest.mod.require 2022-11-05 11:42:01 +01:00
Lars Mueller
26d9b131a5 Minetest: Boxes: pairs -> ipairs
Proposed by Gregor Parzefall in 1d2b103abe
2022-10-29 17:25:16 +02:00
Lars Mueller
2eaaca5de4 Minetest: Boxes: Fix connect_sides handling
Bug reported & similar fix proposed by Gregor Parzefall in 1d2b103abe
2022-10-29 17:25:03 +02:00
Lars Mueller
e6c5860cb9 Minetest: Boxes: Fix walkable/pointable check
Bug reported by Gregor Parzefall in https://github.com/appgurueu/modlib/pull/8#issuecomment-1295793962
2022-10-29 16:45:04 +02:00
Lars Mueller
2d056e72ae PNG: Fix call vs. assignment ambiguity 2022-10-07 17:54:01 +02:00
Lars Mueller
b688f49632 Remove modlib.conf module 2022-10-03 18:27:34 +02:00
Lars Mueller
cc0c11edb4 Add Minetest .obj model reader 2022-10-03 13:46:40 +02:00
Lars Mueller
cefa8e64b9 Add TODO for mod.require 2022-09-30 12:45:15 +02:00
Lars Mueller
a5c49754d9 text.split[_unlimited]: Use pattern by default 2022-09-28 20:50:25 +02:00
Lars Mueller
1244f1eba0 Move setting tree building from conf to mod module 2022-09-28 20:45:00 +02:00
Lars Mueller
644c00aae1 Remove deprecated modlib.log module 2022-09-17 20:07:00 +02:00
Lars Mueller
8a8f30f2aa Remove deprecated modlib.player module 2022-09-17 19:34:57 +02:00
Lars Mueller
e0a6406566 Remove deprecated minetest.player.get_color_int 2022-09-17 18:47:03 +02:00
Lars Mueller
b2bbabe3e0 Experimental modules have matured 2022-09-09 14:45:54 +02:00
Lars Mueller
baecb79eda Add TODO for proper after job cancellation 2022-09-06 12:09:17 +02:00
Lars Mueller
7297852127 Cache mod info & load order 2022-09-06 12:08:38 +02:00
Lars Mueller
7eb5f09752 Remove deprecated minetest.mod.extend_string 2022-07-10 16:27:15 +02:00
Lars Mueller
6d87228f4f Generalize node box getting 2022-07-10 14:20:45 +02:00
Lars Mueller
c50410a81e Fix raycast crash 2022-06-16 16:11:07 +02:00
Lars Mueller
9d221a890d mod.configuration: Return schema 2022-06-08 09:40:08 +02:00
Lars Mueller
b974113fa9 Turn conf.build_tree error into warning 2022-06-01 11:31:15 +02:00
Lars Mueller
0a6d3b9848 Media: Expose more information (mods, overrides) 2022-05-13 11:35:32 +02:00
Lars Mueller
3877e339c6 Support CSS Color Module Level 4 (see minetest/minetest#12204) 2022-04-28 10:31:09 +02:00
Lars Mueller
da0fc453cd Colorspec: Support name#%x 2022-04-21 11:16:57 +02:00
Lars Mueller
5dd5e50704 Colorspec: Use hex numbers to improve readability 2022-04-21 11:10:32 +02:00