Only a single program was used to safely compress all textures in MTG.
This was done using optipng with the following settings:
```
optipng -o7 -zm1-9 -nc -strip all -clobber %%f
```
The key command used is -nc, which stops color mode changes. I.e. any RGBA textures will remain RGBA textures, with none being changes to 8-bit indexed mode.
The resulting compression:
| type | size (Bytes) | % of original texture size |
| --- | --- | --- |
| Original | 247,571 | 100% |
| Compressed | 152,189 | 61.5% |
**Summary: Saves 93.14 KB**
A script has been added: utils/optimize_textures.sh which will perform this compression automatically, assuming optipng is installed.
· Fixes players sleeping in an occupied bed (Wuzzys code)
· Fixes 'sleepwalking' by checking players velocity (Wuzzys code)
· Fixes sleeping player flying off the bed when damaged and flying far away from the bed after death
· Fixes sleeping player being immobilized and bed undiggable after death
The on_rotate function now checks the new param2 value to determine if a rotation is valid, rather than checking the rotation mode.
This is so screwdriver-like items with different rotation modes will not be able to rotate the bed into invalid orientations.
- beds
- boats
- carts
- key/skeleton key
- seeds
All these had on_place handlers that did not allow nodes with
an on_rightclick() handler to be used first (if not using
sneak). This code is taken from the torches mod and applied
everywhere.
This allows all these items to e.g. be inserted into the `frame`
mod's item frames.
Currently all minetest_game PR's are failing travis since the
upstream luacheck now also warns about whitespace issues, and
there are a few of those in the code. This fixes all of them
so we can yet again rely on luacheck.