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
4c3914390b
Add MineClone blast compatibility
2021-08-16 09:27:06 -04:00
Jude Melton-Houghton
87e98d19f6
Remove the repeated light check
...
The wall light setting is pretty niche, and changing it after the game
starts seems unlikely. You can just use /fixlight if needed.
2021-08-14 20:42:37 -04:00
Jude Melton-Houghton
a8a9342d7e
Add container locking
2021-08-14 20:28:36 -04:00
Jude Melton-Houghton
998013b706
Correct comment
2021-08-11 17:27:04 -04:00
Jude Melton-Houghton
29af8ee6cd
Check for some pipeworks API functions
...
They aren't present in Hades Revisited. This mod still doesn't work with
Hades Revisited due to some mapgen thing.
2021-08-11 10:50:31 -04:00
Jude Melton-Houghton
f8c140dba3
Use pipeworks more safely
2021-08-10 17:56:14 -04:00
Jude Melton-Houghton
c375f84fca
Check Lua more strictly
...
The shutdown handler now works in LuaJIT. I've actually tested it.
2021-08-10 12:12:58 -04:00
Jude Melton-Houghton
1830d4a86e
Copy a position vector using vector.new
2021-08-10 12:09:28 -04:00
Jude Melton-Houghton
e7cd4b4c13
Make container_is_empty local for now
...
There's no public API at the moment.
2021-08-10 08:48:56 -04:00
Jude Melton-Houghton
67b2a03de5
Use plain tables for rules
...
It's probably safer. Maybe I should do it for the positions too, but
that would be more of a pain.
2021-08-09 20:54:13 -04:00
Jude Melton-Houghton
f0a9c1eb63
Improve VoxelManip code a bit
2021-08-09 17:09:53 -04:00
Jude Melton-Houghton
d62125f4ea
Wait for mapgen when constructing containers
...
This prevents them from messing with param1. mapgen_rivers still doesn't
work. I think this has something to do with its call to set_lighting.
2021-08-09 13:54:05 -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
19323c7e63
Note digiline node restriction in comment
2021-07-29 07:27:33 -04:00
Jude Melton-Houghton
b570931cf8
Use CONTENT_AIR
2021-07-27 13:15:19 -04:00
Jude Melton-Houghton
ba8518fd52
Capitalize labels
2021-07-27 09:48:59 -04:00
Jude Melton-Houghton
74c143e4b4
Allow non-players to use containers
...
The restriction seemed unnecessary.
2021-07-26 17:18:30 -04:00
Jude Melton-Houghton
3b3dc666ae
Add some security
...
Outside the chambers is now protected, and you have to be inside
to use the exit.
2021-07-26 16:50:04 -04:00
Jude Melton-Houghton
9387095f53
Reduce digiline node connections
...
It won't make a difference in functionality. It should prevent
digilines from having to check the block below the inside whenever
a message is sent in, thus requiring one less block be loaded.
2021-07-23 09:27:02 -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
ffbc9c95ab
Prevent items passing through disconnected ports
...
This makes the behavior like that of the filter injector of
Pipeworks. This also fixes an issue with an object not being
counted: Before, if you sent an item into an empty container
through a tube then broke the container, you would succeed, since
the item object wouldn't be counted. Now, that situation is just
impossible
2021-07-20 21:56:36 -04:00
Jude Melton-Houghton
9997049963
Teleport players closer to the ground
2021-07-20 21:52:17 -04:00
Jude Melton-Houghton
731890d1cc
Let the mod run without get_block_status
...
The call should be redundant anyway. I didn't realize
get_block_status was added after Minetest 5.4.
2021-07-20 12:33:19 -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
7bc9ef913c
Update the object count after the player leaves
...
I don't know how attachments work, but if they're counted separately,
a player's attachments could increase the non-player count and prevent
the container from being destroyed.
2021-07-19 19:45:39 -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
0a2e486180
Handle allocation failure better
2021-07-17 16:36:11 -04:00
Jude Melton-Houghton
66c4f5189f
Make node getting safer
2021-07-17 15:56:05 -04:00
Jude Melton-Houghton
f0c470ccc5
Add missing pipeworks callbacks
2021-07-17 13:06:13 -04:00
Jude Melton-Houghton
ef8b99b1fe
Remove unused variable
2021-07-17 12:40:22 -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
a55bdd130e
Replace tab
2021-07-16 20:51:40 -04:00
Jude Melton-Houghton
59511b9090
Remove params_are_null
...
The function was a false abstraction.
2021-07-15 18:18:41 -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
3e8db295da
Make the exit and digiline use the common way
2021-07-15 18:10:29 -04:00
Jude Melton-Houghton
416b992193
Use port_name_prefix in another place
2021-07-15 17:36:31 -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
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
3c59bef8df
Fix pipe offset iteration
2021-07-14 09:24:08 -04:00
Jude Melton-Houghton
e37be9ffe6
Fix piping?
...
I'm not sure how pipeworks.tube_inject_item works. It seems like
the item should be inserted right back into the receiver with the
way I'm using the function, but apparently not.
2021-07-13 19:18:31 -04:00
Jude Melton-Houghton
523e3ee368
Add rough pipeworks integration
2021-07-13 17:15:36 -04:00
Jude Melton-Houghton
9940fabe2f
Properly detect players in containers
...
I also made the emptiness check its own public function since it
seems like a useful thing to have.
2021-07-13 14:25:27 -04:00