29 Commits

Author SHA1 Message Date
Giuseppe Bilotta
44a537e705 Fix placement of eggcorns on top of shelves
Right-clicking on the top of a shelf would place a legacy plantlike
eggcorn. This was due to the storebox right-click override
unconditionally calling `item_place_node` when placing an item against an
inaccessible side of a storebox.

The solution would be to call `item_place` instead, since that function
has the logic to handle `place_as_item` correctly. However, this cannot
be called from the storebox right-click override directly because
`item_place` calls the `pointed_thing` `on_rightclick`, which would
cause an infinite recursion.

Solve this by refactoring the placement logic into a new
`minetest.item_place_node_or_stack` which is called by `item_place`,
as well as by the storebox right-click override when placing items.
2022-03-25 19:15:02 +01:00
Aaron Suen
96b4947c13 Simplify node/stack change optic notification
Instead of adding a special hook for storeboxes, just treat all
stack changes as node changes and notify all update listeners.
2022-03-14 07:13:43 -04:00
Aaron Suen
c433b36f2b Formatting, add contributor to license 2022-03-14 07:03:44 -04:00
Giuseppe Bilotta
925de33418 Make storebox_on_stack_change extensible 2022-03-13 23:24:17 +01:00
Aaron Suen
73868f205b Storeboxes: don't fall in unless you can fall thru
There isn't always a surface below to catch items
that fall into a storebox, so we can't guarantee an
item that falls into a storebox won't just fall out
the bottom.  Only allow falling in the top if falling
out the bottom is allowed too.

This fixes glass cases not catching items if the
case is floating in air with nothing solid below it.

There are still some cases it doesn't handle
correctly, like a bare stack node underneath a
form, wherein the item should be allowed to fall
out of the form and combine into the stack.
2022-01-16 13:06:33 -05:00
Aaron Suen
b9d9efe0c1 Make stack columns work with catapult from forms 2021-12-01 20:51:37 -05:00
Aaron Suen
d0edf8bc38 Fix crash: item settling must always return stacks 2021-11-27 19:57:38 -05:00
Aaron Suen
2e13a95e82 Standardize items falling out of shelves 2021-11-27 15:38:03 -05:00
Aaron Suen
ce99412270 Item entities properly fall thru forms 2021-11-27 15:08:40 -05:00
Aaron Suen
3233b7e32e Rework stack settling API 2021-11-27 11:27:56 -05:00
Aaron Suen
69889ee292 Start reforming stacks falling in/thru boxes
- Retire items_fall_thru group
- Add on_settle_item callback
- Open-topped storeboxes automatically capture
  items settling on top of them
- Start converting form into storebox
2021-11-27 09:59:27 -05:00
Aaron Suen
01b3867c81 Stackapply recipes work on storeboxes too 2021-11-27 08:57:03 -05:00
Aaron Suen
b73d1d1290 Pre-clean-transparent filter on all textures
Some users may use filtering but not have the "clean transparent"
filter enabled in the Minetest engine config.  Bake this filter
into all images to (1) avoid the consequences of this (i.e. black
halos), and (2) possibly speed up startup time (the filter will
converge immediately).
2021-09-23 07:36:21 -04:00
Aaron Suen
c3519ca37c Fix backface culling on most mesh nodes 2021-03-15 19:17:25 -04:00
Aaron Suen
c706163bc1 Model object file optimization
https://github.com/ExeVirus/Compress-Obj
2021-03-09 08:25:01 -05:00
Aaron Suen
410ebd5d8d Recompression using ECT
https://github.com/fhanau/Efficient-Compression-Tool
2021-03-09 08:16:23 -05:00
Aaron Suen
c10e80ef87 Set name in mod.conf as demanded by 5.5+ 2021-03-01 20:10:27 -05:00
Aaron Suen
dabf8ac697 Fix node registration alpha for 5.4+ 2021-02-07 12:40:10 -05:00
Aaron Suen
502192b6ab Presses can eject items out of shelves 2020-09-29 20:52:18 -04:00
Aaron Suen
94401942ee Protect doors, standardize protection 2020-07-01 00:30:40 -04:00
Aaron Suen
70efb016af Add auditing for player stack movement 2020-06-18 07:20:15 -04:00
Aaron Suen
e9b9bd43d9 Protection support for storeboxes, pummel 2020-06-09 18:10:44 -04:00
Aaron Suen
f37a918f0f Scaling and touch-hurt reforms
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
  group (percent of original scaling time)
2020-03-29 07:55:54 -04:00
Aaron Suen
dcfc80b367 Remove explicit names in mod.confs. 2020-01-05 12:38:45 -05:00
Aaron Suen
89020e8340 Major rebuild of item_entity.
This created a ton of dependency inversions, which
necessitated moving a number of API functions up into
higher layers, and restructuring dependency lists for
a number of mods.

BOLO: non-deterministic load errors due to missed
dependencies.
2020-01-05 11:42:22 -05:00
Aaron Suen
e48722e731 Add a little color to living sponges.
Make them visually distinguishable, and allow
players to tell when their living sponges have died.
2019-12-18 20:21:54 -05:00
Aaron Suen
7050568938 Dammit dammit z-fighting hacks.
- Unbake the scaling tweak from models, apply it
  using mesh scaling in MT instead.
- Standardize ratio definition in one place.
- Default all nodeboxes to winning z-fights.
2019-12-08 23:14:56 -05:00
Aaron Suen
44a431df61 Overhaul tote visual.
- Convert to mesh node.
- Make handle/frame look more like recipe.
- Visual difference for totes with slots.
2019-12-08 22:28:20 -05:00
Aaron Suen
ce58f8294c Refactor shelf API/assets into its own module. 2019-12-08 16:41:59 -05:00