143 Commits

Author SHA1 Message Date
Auke Kok
cd3c598f25 perks: Fix undefined variable access
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.
2019-12-17 10:55:33 -08:00
Auke Kok
3be634fa58 Force testing requirement on all boxes.
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.
2019-11-05 21:07:40 -08:00
Auke Kok
2a87ac818d Replace :[gs]etpos with :[gs]et_pos globally. 2019-10-07 09:08:08 -07:00
Auke Kok
5a0cbbc844 Fix unit of these (os.clock returns 's'). 2019-09-15 21:07:48 -07:00
Auke Kok
6f82f9a8b8 Announce messages are like logs: Server language, not localized.
These were malforming IRC and log output messages, so I'm reverting
this.

`(T@boxes)Flerker100E completed box F27E!E`
2019-09-12 08:47:34 -07:00
Wuzzy
207de4dc2c Add I18N support
This adds I18N support for ITB by using Minetest 5.0.0's locale system.
2019-09-11 21:06:59 -07:00
Auke Kok
ea80c7658b Fix debug printing. 2019-09-06 22:43:29 -07:00
Auke Kok
0a5cefdb21 Add some timing data here. 2019-09-06 22:41:19 -07:00
Auke Kok
faff22dd8b Bring down jump to normal. Problems hitting ceilings. 2019-08-31 23:37:34 -07:00
Auke Kok
04dc57066e Actually preserve custom physics parameters.
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 :(
2019-08-30 17:29:20 -07:00
Auke Kok
190f12412e Perks.
`zoom` and `sprint` perks. These are not yet obtainable by playing,
but I intend to roll that out soon.
2019-08-23 23:41:38 -07:00
Auke Kok
f274254b34 Add some better logging for these infrequent events. 2019-08-21 22:50:50 -07:00
Auke Kok
55254a65e5 More liberal IRC and server announcements.
glob all announcements through a single function that
relays the info to IRC, all player chat and logs.
2019-04-20 14:06:45 -07:00
Auke Kok
257539b22b Add pedestal recount code.
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.
2019-04-16 20:32:56 -07:00
Wuzzy
e7e0357926 Rename both "Admin" tabs to disambiguate them 2019-04-13 23:50:18 -07:00
Auke Kok
642a40f43a Print result of send_mapblock, and don't wait as long. 2019-01-29 19:52:15 -08:00
Auke Kok
84e2a427f0 If available, send mapblock before teleport.
This relies on minetest PR #8140.
2019-01-28 23:19:25 -08:00
Auke Kok
ff881a175b Weird? I managed to series teleport myself in the sky.
Somehow the correction didn't set my proper spawn_pos. And
it flung me to my death. Don't just modify Y unless we're
actually near the box spawn.
2019-01-25 22:58:00 -08:00
Auke Kok
80738b06b7 I've always had the math all wrong here.
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.
2019-01-25 22:46:19 -08:00
Auke Kok
f547987974 Don't look. 2019-01-25 22:21:11 -08:00
Auke Kok
f486a956e0 Debug. 2019-01-25 22:19:00 -08:00
Auke Kok
ebf18592cb Again, try and fix falling correction. 2019-01-25 22:12:28 -08:00
Auke Kok
b7ae89b58d Try and make the fall/nudge up smarter. 2019-01-25 22:10:37 -08:00
Auke Kok
80cbd6d34a Add license headers to all lua files.
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.
2018-06-21 22:56:48 -07:00
Auke Kok
d38ab250b7 Add some extra logging. 2018-04-01 12:07:49 -07:00
Auke Kok
877d057cda Up the spawn position just a little bit to prevent more falls. 2018-02-17 11:46:42 -08:00
Auke Kok
6a778d8ba6 Allow placement anywhere, just adjust pos on the fly to fit.
- removed 2 prints.
- prevents making signs outside the +x side of the box.
2017-12-06 23:14:13 -08:00
Ekdohibs
99b27daa94 Make set door tool able to move digits in a box 2017-12-06 23:52:01 +01:00
Ekdohibs
c73678a4fb Boxes creation: make top row barrier instead of marble. 2017-12-05 20:44:23 +01:00
Auke Kok
3174a17f8b Don't let name be missing from box data. 2017-10-27 11:51:50 -07:00
Auke Kok
43e9829ec4 Prep for box score migration, fix up loose meta table ends. 2017-10-21 14:28:28 -07:00
Auke Kok
c6fa3b4585 Use points table to score players/boxes.
Adds an icon UI for the category signs.

No longer stores scoring info in box_meta.
2017-10-21 11:21:16 -07:00
Auke Kok
4853bb65ed Add some minor FIXME's 2017-10-09 16:23:01 -07:00
Auke Kok
26c52aa52e Make sure to verify player is still present. 2017-09-29 15:00:47 -07:00
Auke Kok
df9c64682e Box spawning: try a bit harder to detect falling players.
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.
2017-09-27 22:41:22 -07:00
Auke Kok
f4335f74ef Postpone light fixing.
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.
2017-09-27 14:39:11 -07:00
Auke Kok
9000479b68 Protect detector and creator from crossing box walls.
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.
2017-09-21 13:26:40 -07:00
Auke Kok
e1d25cd533 Add function to check if pos is within a current box.
Does not check whether the box is an editing or playing box.
2017-09-18 17:10:56 -07:00
Auke Kok
6d86ff9204 Use symbols for box status 2017-09-11 22:16:43 -07:00
Auke Kok
46628fce95 Creator menu: limit box creation.
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.
2017-09-11 21:16:56 -07:00
Auke Kok
6edd984251 Don't allow /edite on published or pending boxes. 2017-09-10 15:17:39 -07:00
Ekdohibs
8d1bd76047 boxes.make_new: clear existing metadata 2017-09-10 21:48:21 +02:00
Ekdohibs
1d9420e9ed Always allow a player to play their own box 2017-09-10 17:40:11 +02:00
Auke Kok
3e25f92991 Only allow /enter into published boxes, or admins. 2017-09-09 13:08:56 -07:00
Auke Kok
8709441ec7 Always log box entry and exit (could be play or edit). 2017-09-07 15:38:23 -07:00
Auke Kok
0db063dedd Stop music at these interactions as well. 2017-09-06 16:44:29 -07:00
Auke Kok
6d68976ccb Loop music after entering a box.
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.
2017-09-05 23:48:46 -07:00
Auke Kok
57f34f6885 Ask the player before resetting series progress.
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.
2017-09-04 16:24:26 -07:00
Ekdohibs
79b0e39a04 Add status to admin edit tab 2017-05-04 04:51:47 +02:00
Auke Kok
0451c7324a Retain old privs when granting create. 2017-04-30 12:32:35 -07:00