Auke Kok
06c900120e
Add category
series.
...
These can be accessed using enter teleporters where is_series==2.
At that point, the `box` meta value determines the category, not
the box id. Then the next box that is unplayed in that category
is offered for play.
For now, the player is sent a message if there are no more
unplayed boxes in a category.
2019-01-18 15:50:53 -08:00
Auke Kok
c668ee2352
Add better asserts explaining lack of insecure env, or lsqlite3.
2018-10-28 11:40:22 -07: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
fec7f4a25b
Color boxes in the random order selection formspec.
...
white/gray: not yet completed boxes
green: completed boxes
Display the box numbers, since the order numbers may be confusing.
2017-12-11 22:16:37 -08:00
Ekdohibs
699e4e0bba
Add random access series type, which shows a formspec to player to choose box to enter.
2017-12-07 22:22:03 +01:00
Auke Kok
c3ea83516f
Do not REPLACE INTO without id
...
this causes `id` to constantly roll a new key value.
Since we now pre-seed meta, this is no longer needed and should
be an UPDATE for the meta value, always.
2017-10-31 23:32:11 -07:00
Auke Kok
1f881ec64b
Generate new player record when needed.
...
This is badly needed since the score table is now getting bogus
entries for incorrect player ids, that we'll have to remove.
This automatically creates the proper records when they're requested
and prevents several warnings that we've been ignoring.
2017-10-31 22:04:01 -07:00
Auke Kok
d36de7f42d
Consistency of variable naming.
...
Use series_id, box_id and player_id everywhere.
2017-10-25 09:28:04 -07:00
Auke Kok
b99b365e62
Add a small log
helper mod so all mods can use log.fs_data()
2017-10-24 10:29:11 -07:00
Auke Kok
9260eaf54f
Make a generic points query entry point.
...
Pass a filter table to get specific points for a player, a box and/or
a score type. Returns a table with full point data.
2017-10-22 23:34:13 -07:00
Auke Kok
2b6af1074f
Add helper to retrieve all known players.
2017-10-22 00:07:07 -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
7d29ce6fad
Admin: Manage series.
...
The creator interface now shows a "Manage Series" button which
opens the series maintenance UI.
In the series maintenance UI, the admins can quickly see boxes
that are not in any series, or not in the current selected series,
and add or remove boxes from series.
Only accepted boxes can be added. One can move and see boxes that
are not accepted but that are in a series, so it's easy to spot
where a series includes a bad box.
2017-10-07 17:01:48 -07:00
Auke Kok
44afcd1381
Downgrade these log messages to warning.
...
Since get_meta for player is so common (new players) let's not
make it an error.
2017-09-29 19:51:48 -07:00
Ekdohibs
55206ff256
Add box status
2017-05-04 04:49:12 +02:00
Ekdohibs
6d0b481cc0
Fix crash with star_positions and category_positions sometimes being incorrectly set.
2017-04-15 18:29:36 +02:00
Ekdohibs
9a0ffdb97c
Count ratings by players, don't store anything yet
2017-04-15 18:14:16 +02:00
Auke Kok
d69b74294b
Skyboxes: select when editing!
...
Modified (stripped down) skybox mod. No priv or chat command,
hard coded 0 is default (off) skybox. Store by numerical value
in box meta.
2017-04-13 21:30:44 -07:00
Ekdohibs
a411648a6c
Very basic admin interface for boxes; make some signs update on box exit to disaply player time
2017-04-12 05:20:16 +02:00
Ekdohibs
5268f9328b
Add /series_remove command
2017-03-21 02:54:38 +01:00
Auke Kok
27f52b3002
Fix rename of sid -> series_id
2017-02-24 12:04:14 -08:00
Auke Kok
2e83a5f6c0
Series: improve handling of series
...
- renamed commands to series_create|destroy so they fit with add|remove logically
- fixed backend to support everything needed to make it work easily
- avoid `SELECT *`
- add `series_list` command to make it complete
2017-02-23 23:45:46 -08:00
Auke Kok
44d2e7c604
Remove a print.
2017-02-13 22:35:47 -08:00
Auke Kok
68daf327fc
Make debug prints all log messages.
2017-02-13 22:01:33 -08:00
Ekdohibs
3155e1cef3
Allow player to edit box name
2017-02-12 11:29:25 +01:00
Ekdohibs
a1965cdcc2
Add builder and build time
2017-02-12 11:10:01 +01:00
Ekdohibs
666bcd2794
Add special handling to sign text; handle box name (not yet settable).
2017-02-10 10:38:44 +01:00
Ekdohibs
53c0a27caa
Fix crash
2017-02-03 16:06:44 +01:00
Ekdohibs
31fc7f7185
Add a few functions to db to avoid small hacks
2017-02-03 14:14:17 +01:00
Ekdohibs
1571dada8a
Get stats on number of deaths & damage as well.
2017-02-03 13:35:52 +01:00
Ekdohibs
7f1fa31ea0
Expose players_in_boxes and players_editing_boxes; remove luacheck warnings.
2017-02-03 10:12:27 +01:00
Ekdohibs
bbf18c49ba
Gather stats on the time the player spent in a box
2017-02-03 09:49:51 +01:00
Ekdohibs
cafaddcb30
Add working series
2017-02-01 22:40:44 +01:00
Ekdohibs
177eb19b38
Add box series (can't be created yet)
2017-02-01 21:06:20 +01:00
Ekdohibs
dad9f7b95a
Add code to handle collected items by the player. All nodes and textures are still placeholders.
2017-01-30 13:07:29 +01:00
Auke Kok
88d3ba6f6c
Console banner.
2017-01-28 21:13:06 -08:00
Ekdohibs
cf168c7ab1
Save edited boxes at restart. Make the shutdown of the db a function that is called at the end of the boxes shutdown procedure.
2017-01-27 15:41:02 +01:00
Ekdohibs
f6594383b5
Put entry & exit lobbies in db, entry box id is hardcoded as 0 and exit as 1 for now.
2017-01-27 10:20:58 +01:00
Ekdohibs
ecc9968348
Avoid "loop is executed at most once" warning
2017-01-27 09:25:05 +01:00
Ekdohibs
9eaabbf5ae
db: fix potential SQL injection
2017-01-26 22:29:29 +01:00
Ekdohibs
d5585d20b8
Add load/save box to db, cleanup a bit boxes and add chatcommands
2017-01-26 20:47:09 +01:00
Ekdohibs
ac137e1484
Add comments in db about SQL injection needing to be fixed
2017-01-26 19:17:28 +01:00
Ekdohibs
3c0bda80be
Make db compatible with mod security
2017-01-26 09:58:37 +01:00
Auke Kok
475ce277fd
Initial checkin.
2017-01-25 23:06:00 -08:00