Add several irregular arrangements of 80:
- Roboctoblock (both standing and squatting) from Numberblocks episode
"Sixty's High Score".
- Spidoctoblock from Numberblocks episode "Heroes With Zeroes".
- Dinoctoblock from Numberblocks episode "Sixty's High Score".
Signed-off-by: James Hogan <james@albanarts.com>
Add an irregular arrangement of 31 in the shape of a calendar, based on
Numberblocks episode "Figure It Out".
Signed-off-by: James Hogan <james@albanarts.com>
Add an original square arrangement for 144, with 4 in the middle, 4 tens
layed out around it like so:
A B
AAAABBBB
AAABBB
AA BB
CC DD
CCCDDD
CCCCDDDD
C D
And the remaining 100 filling out the rest of the square.
Signed-off-by: James Hogan <james@albanarts.com>
Add support for explicit layouts of irregular non-rectangular shapes.
Note the floating number placement algorithm is unchanged, which may
result in wrong placement.
Signed-off-by: James Hogan <james@albanarts.com>
Based on the Numberblocks episode "Figure it out", add an arrangement
for 32 (4 across, 8 high), with 2 2x5 10s at the bottom, and 2 in the
middle at the top.
Signed-off-by: James Hogan <james@albanarts.com>
Update the square 81 arrangement to match Numberblock 81, as seen in the
Numberblocks episode "Square on the Moon".
Signed-off-by: James Hogan <james@albanarts.com>
Add a custom arrangement for 11x11 square, with 1 in the middle, 10
around it in the following pattern:
XX XX
XXXXX
X X
XXXXX
XX XX
And 100 filling out the rest of the square.
Signed-off-by: James Hogan <james@albanarts.com>
Changes since 0.2:
* Fix for F-Droid Minetest (with Lua < 5.2)
* Add square arrangements 25-81
* Darken sides of 40, 50, 90, and all the hundreds blocks
* Basic support for numbers 1000-10000
Signed-off-by: James Hogan <james@albanarts.com>
Add support for numbers 1000 to 10000. Numbers 1000-9000 look like the
numbers 1-9 but are defined separately as they group together. Number
10000 is a special case for now, which looks like 10 but grouped into
1000s.
This is only of practical value when combined with worldedit! It
probably isn't worth going beyond 10000 without some optimisation to
make sure it doesn't cause excessive lag on slow machines.
Signed-off-by: James Hogan <james@albanarts.com>
Emphasise the sides of the 3 shades of 90s blocks (which weren't darker
than the front) and the 3 shades of 900s blocks (which were only a bit
darker than the front).
Signed-off-by: James Hogan <james@albanarts.com>
It looks far better to have darkened sides of all 10s (40 and 50 were
missed) and hundreds blocks, as it makes the borders around the
groupings stand out from an angle.
Signed-off-by: James Hogan <james@albanarts.com>
Add an arrangement for square 9x9=81, based on our own design. It has
the 1 in the center, with 8 triangles of 10 in a rotationally
symmetrical pattern a bit like a pinwheel.
Signed-off-by: James Hogan <james@albanarts.com>
The use of Lua 5.2 features such as goto don't work on older builds such
as the rather out of date Minetest 5.2.0.26 in F-Droid (added
15/06/2020), presumably due to the use of Lua 5.1.
In this case it was completely unnecessary as Lua 5.1 supports a break
statement, so use that instead.
Signed-off-by: James Hogan <james@albanarts.com>
Changes since 0.1:
* Basic support for numbers 100-999
* Stop overlap of 10 blocks
* Several internal code cleanups
Signed-off-by: James Hogan <james@albanarts.com>
I can't find a clear license for the sample code on the lua-users.org
wiki, so reimplement numeracy_ordered_pairs() from scratch.
Signed-off-by: James Hogan <james@albanarts.com>
Currently ten and hundred blocks extend slightly beyond the block in
order to achieve the bordered effect. Unfortunately this doesn't work
well when neighbouring blocks are different colours as they flicker due
to depth buffering.
Therefore reduce the dimentions to fit within the block, and add fixed
and connected node boxes so that the insides aren't visible (and also
this should allow versions prior to 5.0.0 to show something for these
blocks).
Signed-off-by: James Hogan <james@albanarts.com>
Add support for groups of blocks up to 999. New nodes are defined for
groups of 100 blocks, similar to 10s but with colours encoded in param2
using 3 separate palettes (4 groups per palette, since each group of 100
is checkered with light and dark).
Also add multipart number nodes support, including improved finding of
number nodes and determination of which set of blocks each belongs to
(using 2 upper bits of param2 to encode the direction the number is
extended from the central block).
Signed-off-by: James Hogan <james@albanarts.com>
Put the mid level rear edges in different groups of 10 to maintain the
"2 edges on face in different groups" pattern.
Signed-off-by: James Hogan <james@albanarts.com>
Don't allow the numbers above blocks to replace other nodes, and ignore
blocks with nodes above them when calculating the best place to put the
number.
Signed-off-by: James Hogan <james@albanarts.com>
Make numbers unpointable so their node box can't be seen, and unwalkable
so they can't be collided with (which eliminates the need for an empty
collision box).
Signed-off-by: James Hogan <james@albanarts.com>
I forgot to regenerate facedir from the adjusted doer direction for 1
dimentional horizontal block arrangements.
Signed-off-by: James Hogan <james@albanarts.com>
Fix warnings about missing use_texture_alpha on number nodes:
WARNING[Main]: Texture "numeracy_blank.png" of numeracy:number_centre_1 has transparency, assuming use_texture_alpha = "clip".
...
Signed-off-by: James Hogan <james@albanarts.com>
Fix warning due to missing sum_pos declaration (it got lost during a
confused fixup after a mispelling):
WARNING[Server]: Assignment to undeclared global "sum_pos" inside a function at update.lua:559.
Signed-off-by: James Hogan <james@albanarts.com>
Add a reduced file size JPEG version of screenshot.png for use by the
README, since PNG files tend to be significantly larger.
Signed-off-by: James Hogan <james@albanarts.com>
Apparently the former are deprecated. Tweak description a little too to
keep first sentence under 100 characters.
Signed-off-by: James Hogan <james@albanarts.com>