Commit graph

194 commits

Author SHA1 Message Date
73e07eb013
bit polyfill: tiny tweak 2021-07-19 00:26:52 +01:00
9020948dc5
bit polyfill: fix undeclared global accessed warning 2021-07-19 00:26:19 +01:00
VorTechnix
0b01520118 sets (not working) 2021-07-18 12:39:48 -07:00
5c7b5432d9
Add bit polyfill from https://github.com/Rabios/polyfill.lua 2021-07-17 21:31:31 +01:00
VorTechnix
c57e8e6558 Merge branch 'main' into VorTechnix 2021-07-15 13:27:30 -07:00
0fef39d707
Vector3: Implement __concat operator overloading
Now you can do this:

local v = wea.Vector3.new(3, 4, 5)
print(v.."yay")
2021-07-15 02:18:21 +01:00
aeea17524d
benchmark the new LRU cache implementation 2021-07-13 23:42:19 +01:00
81957070f9
Implement an LRU cache 2021-07-13 23:42:08 +01:00
e799a2ea61
Refactor Queue implementation into separate file 2021-07-13 22:02:34 +01:00
8891c47e98
wea.parse.map: fix crash if keywords isn't specified 2021-07-13 00:22:35 +01:00
40173b2647
Vector3: default to 0 for unspecified args 2021-07-04 23:30:29 +01:00
30f7927af4
Delete failed test :-( :-( :-( :-( :-( :-( :-( :-( :-( :-( :-( 2021-07-04 16:13:55 +01:00
457f436a09
Failed implementation of xoshiro256++ becaause Lua doesn't have an integer type :-( :-( :-( :-( :-( :-( :-( 2021-07-04 16:13:32 +01:00
0b0595a1d3
Remove a whole bunch of stray debug print statements 2021-07-04 14:35:02 +01:00
0212950d87
wea.apply_heightmap_changes: fix loop 2021-07-04 14:30:22 +01:00
1d82013d86
//noise2d: add sin; sort out apply_mode as number 2021-07-04 13:21:13 +01:00
b2eb76d280
//noise2d works!
...just.

Next up more engines and documentation
2021-07-03 22:53:16 +01:00
ad8d8eab6b
wea.format.map: use tostring on values to avoid crashes 2021-07-03 14:44:59 +01:00
ee2e5716eb
Implement more of the noise command backend
It's still not hooked up yet though, and there's no command parsing 
logic either
2021-07-03 01:44:36 +01:00
cae75ec5a2
Add moar comments 2021-07-03 00:42:19 +01:00
VorTechnix
f709d12b75 Update table_tostring.lua 2021-06-30 22:11:34 -07:00
VorTechnix
484b7532eb fixed table.tostring 2021-06-30 11:59:19 -07:00
1984c67295
Vector3, Face, Mesh: unconditionally return class 2021-06-28 01:00:38 +01:00
db7b20d485
Refactor table functions into subtable of wea
Also, you can return a value from dofile()!!!!

This changes everything.
2021-06-28 00:56:29 +01:00
624abc899b
node_distribution: add missing \n 2021-06-27 23:52:16 +01:00
810d3049ee
format.make_ascii_table: make filename match function name 2021-06-27 23:52:05 +01:00
VorTechnix
3467f9c5b6
fixed min and max 2021-06-26 21:39:16 -07:00
f32d8588e0
Add Mesh & Face classes for #59
Together, these classes provide a way to represent a mesh of faces
generated from the Minetest world. This way, the generation of a mesh
can be abstracted away from any potential output file writers, thereby
allowing for multiple different output file formats to be supported.
2021-06-26 22:03:55 +01:00
65c07d59ea
Vector3: add sort, is_contained, expand_region, mean, min, and max 2021-06-26 17:48:39 +01:00
91b77c981b
Vector3: add abs 2021-06-26 17:06:53 +01:00
88214aef57
Vector3: add min_component, max_component 2021-06-26 17:02:35 +01:00
0a3680aa7d
Vector3: add unit / normalise 2021-06-26 16:56:26 +01:00
c76a049286
Vector3: tweak 2021-06-26 16:47:22 +01:00
112bb96e99
Vector3: add equals, equality operator 2021-06-26 16:28:39 +01:00
cfa086ce46
Vector3: add dot product 2021-06-26 15:47:53 +01:00
dc5645cfeb
Vector3: add set_to 2021-06-26 15:43:42 +01:00
133cae587c
Vector3: add move_towards 2021-06-26 15:39:47 +01:00
773e6354ad
Vector3: add limit_to 2021-06-26 15:32:47 +01:00
6d0447a02f
Vector3: add clone 2021-06-26 15:23:16 +01:00
7549b0eaea
Vector3: add length, length_squared, sqrt 2021-06-26 15:15:32 +01:00
cde3c3360c
Vector3: add snap_to 2021-06-26 14:44:40 +01:00
8ae0d92e3d
Vector3/tests: flip assert orderings 2021-06-26 14:40:14 +01:00
57df2d045f
Vector3: add area 2021-06-26 14:26:40 +01:00
1e1112c34a
Vector3: Add round 2021-06-26 14:22:26 +01:00
06e19248c7
Vector3: add floor/ceil 2021-06-26 14:19:18 +01:00
9d197aefd2
Start implementing vector3.
Currently we have the 4 basic operations down, plus tostring.
2021-06-26 14:10:28 +01:00
90b456a687
Merge branch 'main' into vortechnix 2021-06-26 02:18:48 +01:00
afce954306
Test the rest of the sring polyfills 2021-06-26 02:17:49 +01:00
6a42aa6838
Set out the basics of automated tests for str_padend 2021-06-26 02:05:01 +01:00
VorTechnix
2d6bd676d6
Update --remove tocharset testing tags
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-06-25 17:25:09 -07:00
VorTechnix
a6a858046f
Update tochars.lua grammar
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-06-25 16:30:38 -07:00
VorTechnix
a40b65af3e
Update --remove old tochars syntax
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-06-25 16:29:47 -07:00
VorTechnix
efef201fde //smake added 2021-06-22 09:33:49 -07:00
VorTechnix
7553163e11 split tochars to separate file 2021-06-03 10:02:17 -07:00
VorTechnix
622ea7a683 added worldeditadditions.tochars 2021-06-02 21:29:36 -07:00
VorTechnix
3c7cd38459 initialized worldeditadditions.tables 2021-06-02 19:27:23 -07:00
VorTechnix
3dff6fe66c added PARSE header 2021-06-02 19:27:04 -07:00
VorTechnix
0026bcdab7 added sets.lua, reordered dofiles in /tables/init.luas 2021-06-02 19:18:49 -07:00
VorTechnix
38335e291f Merge branch 'main' into vortechnix 2021-06-02 18:03:16 -07:00
VorTechnix
8bffeda5b5 Merge branch 'main' into vortechnix 2021-06-02 17:59:06 -07:00
1f44e240fb
utils/tables: refactor into separate files
..it was getting rather long, because Lua doesn't exactly come with 
batteries included :-/
2021-06-03 01:57:46 +01:00
VorTechnix
6e04b11e18 added vector.abs 2021-05-30 14:34:57 -07:00
0474f5a0ee
wea.table_filter: also pass i as the 2nd argument 2021-05-30 16:17:19 +01:00
8bc2e543da
polyfill str_starts: make less dense and mroe readable 2021-05-30 13:06:47 +01:00
ccf27c8629
Bugfix new //erode river implementation
next stop: docs!
2021-05-30 01:42:06 +01:00
dc7ccf49f3
wea.parse.map: support bools 2021-05-30 01:40:18 +01:00
0498125ca7
Bugfix table_map: avoid infinite loop 2021-05-30 00:12:13 +01:00
a5c6e82ef3
Bugfix table_map: return result 2021-05-30 00:11:13 +01:00
a8ddc7831a
wea.table_filter: add API function
Really, Lua should have this already. At this rate, I'll be implementing 
the entire Javascript standard library... :P
2021-05-29 23:20:11 +01:00
b23f353b19
wea.min, wea.max: add API functions 2021-05-29 23:13:10 +01:00
c7c6a848dc
wea.table_unique(): Add API function 2021-05-29 22:49:50 +01:00
8eb9a8ed0f
wea.table_map(): Add api function 2021-05-29 22:49:35 +01:00
1e677c1f3f
wea.split: Standardise comment 2021-05-29 22:49:14 +01:00
98a04b12db
tokenise_commands: fix ordering 2021-05-29 00:57:42 +01:00
46eaf10884
tokenise_commands: improve comments 2021-05-29 00:54:30 +01:00
50da328c67
fixup 2021-05-29 00:44:17 +01:00
a937740275
Implement tokenise_commands utility function
This function is intended for use in //multi.
2021-05-29 00:43:09 +01:00
97aa24bcd3
wea.parse.weighted_nodes: comment out debug 2021-05-21 02:11:03 +01:00
81f3a87180
wea.parse.chance: add weight mode 2021-05-11 22:12:04 +01:00
040d7fbfde
wea.parse.chance: use not 2021-05-11 21:59:43 +01:00
4ec04c03b3
worldeditadditions.parse.chance: add API function 2021-05-11 21:55:44 +01:00
d6d11c6b1a
README: Update quick reference 2021-03-20 02:17:56 +00:00
7639bd2c2b
worldeditadditions.apply_heightmap_changes: properly comment it
It's a pretty complicated function, so it's probably a good idea to 
document how it works.
2021-03-20 02:09:28 +00:00
1f273e4b13
comment worldeditadditions.eta 2021-03-20 01:56:14 +00:00
6af8bba987
selector_helps → axes
It makes sense to me at least that we should keep stuff to do with 
parsing axes together.
2021-03-20 01:53:01 +00:00
8877e356f0
refactor: refactor utils/strings.lua into multiple files 2021-03-20 01:48:56 +00:00
VorTechnix
866748a5c3 dir function rename 2021-03-19 16:25:26 -07:00
VorTechnix
d4edeaeff7 renamed translation function 2021-03-18 09:37:53 -07:00
VorTechnix
00b9a1f517 srel stable? 2021-03-17 11:36:12 -07:00
VorTechnix
20a879a7af scentre and some sorting 2021-03-15 20:51:23 -07:00
VorTechnix
a671f742e9 scol and srect refactor 2021-03-09 11:05:03 -08:00
587d430e48
vector.floor: add resilience 2021-03-09 18:45:04 +00:00
feb4d6a4bf
//overlay: Don't place nodes above water
Fixes #38
2021-03-02 00:09:46 +00:00
e8d97959b2
Add //spush, //spop, and //sstack 2021-03-01 22:23:36 +00:00
2acc6b3470
Merge pull request #34 from VorTechnix/master
Added //srect and //basename
2021-03-01 20:54:13 +00:00
VorTechnix
727ee41e72 Simplify srect function 2021-02-28 09:59:09 -08:00
VorTechnix
e82c8b1e81
error handling
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-02-28 07:25:31 -08:00
VorTechnix
cb1d54c665 Added getsign, fixed srect glitch 2021-02-25 20:22:39 -08:00
56380f149b
heightmap_size: refactor to use { x, z } instead of [0] / [1] 2021-02-26 02:20:53 +00:00
VorTechnix
b62e4f706d added description 2021-02-24 19:42:24 -08:00