Instead of ANAND's suggestion to put this function in the `player` API,
I feel it belongs in the `boxes` API instead, other than that it's
mostly similar to his MR#18.
Boxes need to be tested. Untested boxes can not be submitted.
For small edits, re-testing isn't required (<150sec). Lots of
messaging to the builder as well to make sure it doesn't go
unnoticed.
Using the inspector, I found that the teleport-into-box code
overwrites and deletes the gravity and speed values for each
player. This was never intentional.
This fixes that problem. However, that means that my physics estimates
are completely off and I will need to redo the custom physics
values to match the expectations on the server and to make
sure this doesn't massively nerf those values.
oops :(
I don't 100% trust this code just yet, so make it an admin command
that can be issued while editing a box. The recount seems to work
well and fixes up meta and current count, and stores meta. If edits
are done to the box, these will get the right count as well.
Verified tested with a node creator placing air over creators.
Our spawn pos is already .5 above the ground. We want only
to correct players that fall through the floow. At -0.95 they
can still walk normal, but instead we correct them at -0.45
which almost always hits them.
Some of these are copies from the respective origins from mtg,
to make sure we have headers everywhere listing the proper code.
I've relicensed spectator_mode from WT*PL to LGPL-2.1. No other
licenses were changed.
We log the event, so we get some history and data on it as
well. The time check is 2.0seconds, which would potentially
allow someone to walk down to the lobby exit, but it would
be really uncommon.
It appears we're fixing light, which then immediately gets
overwritten with broken light from the write_to_map() VM method.
We postpone this 1+ server tick to assure that the write_to_map()
has committed entirely. This may result in more block data being
sent to the client.
Without this protection, we'd allow builders to put nodes outside
boxes and detect if nodes are on the outside of boxes.
We use an AreaStore for editing/playing boxes to quickly find
box coordinates and see if affected positions are in a box
or not.
The detector node is then restricted from looking at nodes
outside a box if itself is within a box. The creator node is
similarly restricted from creating a node outside a box if
itself is inside a box.
This does not affect nodes in the lobby as they are not within
an area definition, and therefore those will work normally.
Adjust luacheckrc to account for the new globally used symbol.
This is a start to limit box creation. It counts the number of
boxes for each status and if too many unsubmitted boxes exist,
the create button is removed from the UI.
The create UI element is now a button and no longer a list entry
which had awkward workaround code. The button is much cleaner.
This still has gaps. The /create command is still entirely
unrestricted, so we should stop using that and reduce that to
server priv only.
Restrict making boxes through the GUI only.
server priv still gives access to /create.
Box builder name is shown to admins, so you can easily discern
whether the author is a troll and doesn't deserve your time
reviewing the box, or not.
Slight yellow color for boxes that you didn't make that are in
editing mode.
If a box is started with a "tag", then the music track code will
now continuously play tag_add songs (a table) after as long as the
player is in the box.
I've added a `create` tag as well so we can have music while editing
boxes.
Defaults to one song every 7 minutes.
This removes the forced teleport to the lobby when you
step on a plate. Just like with the creator plate, I nudge
the player back a node to make sure we don't trigger a ton
of plate events.
The formspec explains what resetting means, and why players
likely do not want this - they should just come back for new
entries to the list at a later time.
Once reset the plate immediately puts the player in the first
box of the series again.