Commit graph

133 commits

Author SHA1 Message Date
VorTechnix
e6712d9bf6
Update path.lua 2024-10-25 16:58:36 -07:00
VorTechnix
82d8fd8c31
path.new ==> path.norm & fixed errors 2024-10-25 16:57:49 -07:00
VorTechnix
3c88ae9e23
wea_core.path added 2024-10-25 09:06:15 -07:00
VorTechnix
9f85a7ca0d
Update init.lua 2024-10-23 16:12:19 -07:00
VorTechnix
cbfd695d72
created wea_core.path 2024-10-23 16:11:43 -07:00
VorTechnix
97e8bd1361
added format.file_path 2024-10-23 15:19:25 -07:00
VorTechnix
8f54522e20
Create file_path.lua 2024-10-23 15:18:35 -07:00
VorTechnix
2354e51ba6
moved handle_fn_result 2024-10-17 17:01:39 -07:00
VorTechnix
f6b072237b
tweak to test handling 2024-10-17 11:12:53 -07:00
VorTechnix
8ef1d348d2
added anti-nil safety measure 2024-10-17 09:06:10 -07:00
VorTechnix
9efaecc13a
first usage of handle_fn_result 2024-10-17 09:02:49 -07:00
VorTechnix
0076010f35
WE compatibility for Notify 2024-10-17 08:50:57 -07:00
VorTechnix
ae5d18248f
sorted init and added handle_fn_result 2024-10-17 08:49:14 -07:00
VorTechnix
0ffdb47b54
more doc refixes 2024-10-16 19:57:55 -07:00
VorTechnix
63bdbdfac9
switched to unpack method 2024-10-16 19:53:10 -07:00
VorTechnix
644510a9ca
documentation redo... again 2024-10-16 19:22:09 -07:00
VorTechnix
440dae68a1
Notify.suppress_for_function now actually returns results! 2024-10-16 19:13:22 -07:00
6ef17fed27
core/notify: fix crash in suppression system
`local globalstate` is initialised to have the field `suppressed_players`, but the non-existent field `suppress` is requested, resulting in operations on nil rather than the expected table. This causes the aforementioned crash.

This commit fixes this issue.
2024-10-17 02:25:31 +01:00
a06136812f
split_shell: use @example 2024-10-17 00:34:42 +01:00
36a6bf6b49
weac.notify: fix __call
When you do weac.notify(player_name, "info", "msg"), Lua auto-inserts a `self` table which refers to the main `Notify` table there.

This is because `local function call()` is registered via `setmetatable(Notify, ...)`, which auto-inserts `self` as the 1st argument.

To this end, this command adds a dummy 1st argument `_self` to capture this extra table to avoid all args being shifted by 1.
2024-10-17 00:21:42 +01:00
VorTechnix
41577de416
doc updates 2024-10-16 12:04:20 -07:00
VorTechnix
66dcd6bbd7
added suppression 2024-10-15 17:31:40 -07:00
fbb3d5096c
tokenise_commands: use @example 2024-10-16 01:00:01 +01:00
c84fa5f152
Notify, Notify.validate: correct docblock comments so they work with moondoc
moondoc is the system we use for auto-generating Lua API docs

Ref https://github.com/sbrl/moondoc
2024-10-15 22:36:47 +01:00
57d09a766b
Merge branch 'feature/pcall-protection' into dev 2024-10-15 20:15:17 +01:00
VorTechnix
e0f6d9d9ce
Update notify.lua 2024-10-14 19:13:47 -07:00
VorTechnix
a9307d3725
Update validate.lua 2024-10-14 19:13:20 -07:00
VorTechnix
a0f3fb5a3d
folderized notify 2024-10-14 15:41:43 -07:00
b6c41395f6
core: tidy up new safe_function implementation; bugfix 2024-10-14 20:46:26 +01:00
c01eb23488
newline 2024-10-14 18:53:32 +01:00
938a617dc3
run_command: add prototype wrapper around command parsing. 2024-10-14 18:51:33 +01:00
VorTechnix
5381c31abb
Update notify.lua 2024-10-13 21:18:57 -07:00
VorTechnix
ef1189e6db
Update notify.lua 2024-10-13 14:23:05 -07:00
VorTechnix
5e54d112ce
added wea_c.notify 2024-10-13 13:52:27 -07:00
cd22c710b2
start working on implementing some kind of system to catch error messages
....it works, but:
- We can't capture stack traces like this
- It's messy
- We need to implement an escape/encodeURIComponent function ourselves from scratch 'cause the one I ripped from Stack Overflow sucks
2024-10-12 01:04:27 +01:00
86fd6a560d
split_shell: document properly
it should appear in the Lua API docs now.

Cody AI was actually v helpful with this, and it helped that I already had tests for it o/
2024-10-11 03:19:31 +01:00
270cbd5aae
split_shell: remove unused argument 2024-10-11 03:12:14 +01:00
VorTechnix
269a73be48
Fixed CLRF Issues (I hope) 2024-10-07 16:11:35 -07:00
7b43e4b201
weac.parse.map: add nil check via assertion 2024-10-07 19:07:49 +01:00
717a651bd8
typos in comments 2024-10-02 01:20:08 +01:00
d74427e017
Fix some luacheck errors
the others are because rotate.lua isn't finished
Unfortunately I don't have the time to fix it now, because it will require a lot of time
2024-10-02 01:17:41 +01:00
VorTechnix
b319baae16
Merge branch 'dev' into selection-tools-refactor 2024-10-01 11:44:01 -07:00
VorTechnix
a794429961
Show default values in param
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2024-10-01 06:50:48 -07:00
VorTechnix
61bfab240a
axes parser re-refactor tests passed 2024-09-18 21:25:42 -07:00
d29b037675
orientation: refactor a bit, docs 2024-09-17 23:23:09 +01:00
d49f6d2131
Lift orientation functions from screwdriver2 mod
Ref @12Me21 https://github.com/12Me21/screwdriver2/blob/master/init.lua#L75-L79
Ref @khonkhortisan https://forum.minetest.net/viewtopic.php?p=73195&sid=1d2d2e4e76ce2ef9c84646481a4b84bc#p73195

....if either of you have an issue with this, please get in touch! The licence seems to allow this lifting and relicencing like this (given it's WTFPL as of the time of typing), but correct me if I'm wrong.

For reference, WorldEditAdditions is currently licenced under the Mozilla Public License Version 2.0.
2024-09-17 23:18:37 +01:00
0915a137f8
weac.table: dofile() table_find 2024-09-17 23:13:00 +01:00
6290c61e2f
typo 2024-09-17 22:56:02 +01:00
163f4fc0fd
weac.table*: fix documentation, table.find 2024-09-17 22:51:04 +01:00
da97890e0c
Make weac.table* appear in API docs 2024-09-17 22:13:01 +01:00