37 Commits

Author SHA1 Message Date
Jude Melton-Houghton
b9199fb097 Consistently capitalize constants
This should make the code more understandable. Hopefully I didn't miss
anything. Non-function variables that do not change and are used outside
their immediate surroundings should generally be capitalized.
2021-08-26 08:38:51 -04:00
Jude Melton-Houghton
7ffe9da10b Light up more inside nodes
The port nodes are the only ones for which this is impossible.
2021-08-25 19:10:55 -04:00
Jude Melton-Houghton
952a1b2ab0 Clean up some code and improve some comments 2021-08-24 15:47:10 -04:00
Jude Melton-Houghton
6f43372823 Refactor again for better dependencies (WIP) 2021-08-23 18:49:20 -04:00
Jude Melton-Houghton
e15234d77c Do a really big refactor
This is WIP since I haven't done much testing yet.
2021-08-23 09:20:24 -04:00
Jude Melton-Houghton
f390e163d1 Make area containers immovable
This is the only way to (mostly?) fix their mesecons functionality
without overhauling everything and making it more complicated.

The movement detection is kept in for the teleporter_tool mod.
2021-08-22 17:19:39 -04:00
Jude Melton-Houghton
2642a8d8d4 Fix luacheck warnings
I ran this command:

    luacheck container.lua crafts.lua init.lua nodes.lua protection.lua relation.lua --globals minetest mesecon vector VoxelArea digiline pipeworks ItemStack table.copy default --ignore 21/_.*
2021-08-09 07:53:46 -04:00
Jude Melton-Houghton
ba8518fd52 Capitalize labels 2021-07-27 09:48:59 -04:00
Jude Melton-Houghton
48c2945d33 Make the light inside configurable
This wasn't completely trivial since the light needs to be updated.
2021-07-22 10:09:10 -04:00
Jude Melton-Houghton
51e802ff5c Make text translatable 2021-07-21 18:28:59 -04:00
Jude Melton-Houghton
580e36edc7 Remove a space from the license notice indentation
This makes the indentation consistent with that of other comments.
2021-07-19 19:50:33 -04:00
Jude Melton-Houghton
746a6c7b60 Make all the shared functions private for now
I could expose some as a public API later. Maybe this will speed things
up, or something.
2021-07-19 17:53:26 -04:00
Jude Melton-Houghton
b165120c79 Add more comments
The code still may be a bit messy.
2021-07-19 17:35:32 -04:00
Jude Melton-Houghton
a34f74db81 Block digging of containers holding any objects
If a space is freed without objects being removed, they might show up
later in a new container.

This way isn't ideal since it relies on continuously checking active
insides. It won't always catch all the entities. However, it should work
almost all the time, and the results of failure are not terrible. I
can't find a way to just detect static objects.
2021-07-18 21:37:12 -04:00
Jude Melton-Houghton
dd9648a12e Add a README and licenses
That was a surprising amount of work.
2021-07-17 22:29:20 -04:00
Jude Melton-Houghton
706cfb6e8f Copy tables when merging, for safety
Things can break if multiple registered nodes share tables in their
definitions.
2021-07-17 13:05:27 -04:00
Jude Melton-Houghton
6259ad403d Label ports in their textures
The outside wire labels are consistent with the luacontroller.
2021-07-17 11:59:34 -04:00
Jude Melton-Houghton
905f4398a4 Fix node drops 2021-07-16 21:36:14 -04:00
Jude Melton-Houghton
14873a1f9a Add container node sounds 2021-07-15 22:03:36 -04:00
Jude Melton-Houghton
46fb4baedc Improve container damage groups 2021-07-15 21:53:49 -04:00
Jude Melton-Houghton
862bf8ffed Give the container a better texture 2021-07-15 21:19:02 -04:00
Jude Melton-Houghton
6ee59aea0e Hide the digiline when the mod isn't installed
I also removed the infotext, which seemed probably unnecessary and
which would hinder the hiding.
2021-07-15 18:12:18 -04:00
Jude Melton-Houghton
ad7390ee53 Add node descriptions
The container now shows up in the creative inventory.
2021-07-15 17:33:23 -04:00
Jude Melton-Houghton
486ae3915c Use only the horizontal faces with mesecons
The top and bottom were causing problems for some reason. Now there are
two remaining mesecons issues:
1. The container can't have its own output fed back into it in the same
   activation. These seems to be a bug in mesecons, since it also occurs
   for the crossover wire.
2. When I place a switch, turn it on, then place a container next to it,
   the initial activation of the container is incorrect. I have no idea
   why. It could be a bug with mesecons too, who knows.
2021-07-15 17:24:56 -04:00
Jude Melton-Houghton
5e12a55154 Implement mesecons integration functionality 2021-07-15 15:04:16 -04:00
Jude Melton-Houghton
3f1e9c7b7b Make merged_table local 2021-07-15 09:03:13 -04:00
Jude Melton-Houghton
a1f0c72d05 Fix register_wall 2021-07-14 22:19:27 -04:00
Jude Melton-Houghton
8e43fef231 Make register_wall local 2021-07-14 22:10:35 -04:00
Jude Melton-Houghton
3bd12ff1f4 Register walls as mvps stoppers
I also cleaned up the registration code somewhat.
2021-07-14 22:09:06 -04:00
Jude Melton-Houghton
031940b253 WIP refactor to use params for the inside position
Other stuff is done, like improving the allocator. I haven't tested
pipes yet. The reason this was done was to allow mesecons
conduction, but it's possible that that won't actually work. If so,
I still might keep this patch.
2021-07-14 20:35:47 -04:00
Jude Melton-Houghton
7da8a7b438 Prevent undeclared global warning 2021-07-14 09:12:44 -04:00
Jude Melton-Houghton
523e3ee368 Add rough pipeworks integration 2021-07-13 17:15:36 -04:00
Jude Melton-Houghton
dc259b1462 Keep walls from the creative inventory 2021-07-13 14:33:05 -04:00
Jude Melton-Houghton
b582e5a7ae Prevent pistons pushing containers
Right now, the containers are assumed to stay in one position.
2021-07-12 20:11:03 -04:00
Jude Melton-Houghton
63ea80ef3f Add digiline integration 2021-07-12 16:53:09 -04:00
Jude Melton-Houghton
2c10bb7ab9 Improve wall invincibility specification 2021-07-12 16:51:36 -04:00
Jude Melton-Houghton
5cae94e096 Initial commit 2021-07-11 21:37:13 -04:00