Commit graph

2438 commits

Author SHA1 Message Date
Pentarctagon
50afb6ead9 column typo. 2023-02-21 13:51:57 -06:00
Steve Cotton
49ebbb9709 Make fix_whitespace complain about mixing tabs and spaces
Ensures that files either use tabs for indentation or spaces for indentation,
but don't switch between the two within the same file.

This doesn't fix the whitespace, it's a simple check to flag it up
on the assumption that it's better to use an editor or code formatter
to clean up the file.

Elsewhere in the CI we use the luacheck tool - while that can detect
mixing tabs and spaces in a single line's indent, it doesn't check for
inconsistent indentation within a file.
2023-02-05 02:22:53 +01:00
Celtic Minstrel
cbbd34a79e
Add new attacks_used key to [attack] (#7351) 2023-02-04 19:55:04 +01:00
Pentarctagon
d1465a9eb9
Add basic achievements functionality. (#7237)
* Add basic achievements functionality.

This reads the mainline achievements.cfg and then all the achievements of each installed add-on.

This is intentionally handled separately from other WML loading so that:
a) All achievements and their status are able to be displayed on the main menu right after Wesnoth starts and regardless of which add-ons are active.
b) Add-ons can add additional achievements to other content, whether UMC or mainline. For example, a modification that adds more achievements for mainline campaigns.

Marking something as achieved is handled by the new [set_achieved] tag and whether an achievement has been completed can be checked via [has_achievement].

There is no attempt to prevent people from manually editing which achievements they've accomplished.

NOTE: These are *not* in any way related to Steam achievements!
2023-01-21 10:32:45 -06:00
Pentarctagon
ceb05f3d9f Enable logging to file by default. 2023-01-13 12:51:03 +01:00
Pentarctagon
3d7d5dbdbf
Add ability to allow secondary authors to upload an add-on. (#7268)
* Add ability to allow secondary authors to upload an add-on.

The secondary_authors attribute is a comma-delimited list of forum accounts that can also upload updates to an add-on. Secondary authors can't change the primary/secondary authors and can't delete the add-on.

The primary author can also make someone else the primary author by:
* Putting their username in the secondary_authors attribute
* Putting someone else's username in the author attribute
* Uploading the add-on while selecting themselves
This works since they are still (until the upload is done) the primary author in the database, so they are allowed to change the authors list, including in this case.
2023-01-11 10:21:55 -06:00
Pentarctagon
bc26194e5b Add era to faction query. 2023-01-09 09:05:44 -06:00
Pentarctagon
fbeae32002 Rename database column SOURCE to ADDON_ID.
Also rename VERSION to ADDON_VERSION.
2023-01-06 19:59:26 -06:00
Pentarctagon
18d1f235ca Noticed I changed the wrong column but forgot to save the file after... 2023-01-06 10:48:42 -06:00
Pentarctagon
859a56f4c2 Shrink max column length.
Required for the updated primary key - the max allowed primary key length is 3072 bytes which isn't enough when there are three VARCHAR(255) columns and each character uses 4 bytes. The max length of the data in these columns so far is also well under 100 characters.
2023-01-06 10:42:21 -06:00
Pentarctagon
e5023e40db Skip inserting rows that would cause a duplicate primary key error.
The cause is that somehow, during regular play, MP campaigns can end up with duplicate values in the [content] data for each [addon]. A very similar issue was fixed in 6c980d12dc, but there's apparently some other way to trigger it that I haven't been able to reproduce. Since the error itself is harmless, it'll just be avoided server-side to avoid the spurious errors in the server log file.
2023-01-06 10:22:04 -06:00
Celtic Minstrel
e482be048b Minor LuaDoc fix 2022-12-28 15:03:53 -05:00
loonycyborg
27cb68b769
Update msys2 base docker image 2022-11-05 19:32:52 +03:00
Pentarctagon
bd306a5aa9 Update flatpak runtime to freedesktop 22.08. 2022-09-03 11:53:56 -05:00
Pentarctagon
2db4add386 Fix column label name. 2022-09-03 02:22:29 -05:00
Pentarctagon
06b29d460d Add query for new users by download source. 2022-09-03 02:21:37 -05:00
Pentarctagon
135e16e853 Fixup previous renaming. 2022-09-02 22:37:02 -05:00
Pentarctagon
9d5266d624 Add query fetching count of users playing their first game. 2022-08-29 23:27:31 -05:00
macabeus
612cca3594 map-diff: throw error if the image is missing 2022-08-09 14:54:13 +02:00
macabeus
3128987810 map-diff: crop notes 2022-08-09 14:54:13 +02:00
macabeus
92bd69ae67 map-diff: add comment on the parser 2022-08-09 14:54:13 +02:00
macabeus
3e8ed56ffd small code review fixes 2022-08-09 14:54:13 +02:00
macabeus
ed4f648cb0 map-diff: add axis and changes notes 2022-08-09 14:54:13 +02:00
macabeus
643b2fec37 map-diff: change focus color to pink 2022-08-09 14:54:13 +02:00
macabeus
77a7b1fa2f map-diff: move get tile logic to images module 2022-08-09 14:54:13 +02:00
macabeus
3bb7f887b6 map-diff: fix paint tile when there is no only-base version 2022-08-09 14:54:13 +02:00
macabeus
2d00b7ebd4 map-diff: fix when reading attributes with comments 2022-08-09 14:54:13 +02:00
Pentarctagon
6e357ea8b3 Enable LTO for steam-linux builds. 2022-08-03 17:19:44 -05:00
Pentarctagon
e6f0ffa556 Use the Sniper runtime. 2022-08-03 17:19:44 -05:00
Celtic Minstrel
6c30ef4b20 Document some missing map functions 2022-07-26 00:02:27 -04:00
Pentarctagon
9e94f090e6 Use start.sh to enable logging to file for Steam Linux. 2022-07-24 13:43:41 -05:00
Celtic Minstrel
22ad4d7137 A few missing details in wesnoth.game_events.add LuaDoc 2022-07-19 02:10:29 -04:00
Celtic Minstrel
8eb7a70a63 Add luadoc for the new event functions 2022-07-18 21:56:42 -04:00
Tommy
8144c06389
Add new [screen_fade] WML action (#6864)
* Add new [screen_fade] WML action

It takes (for now) the arguments:
 * red, green, blue = values between 0 and 255
 * alpha = value between 0 and 255
 * duration = time in ms over which to fade

The game display is faded to the given colour over the duration.
It will be left with an overlay of that colour and alpha until
a screen_fade to 0 alpha is performed.
2022-07-15 09:32:19 -04:00
Celtic Minstrel
e613010b4b Lua: Document wesnoth.units.teleport and wesnoth.units.create_weapon 2022-07-02 11:22:28 -04:00
loonycyborg
e6d67c89fd
Updated msys2 Dockerfile 2022-06-21 20:24:05 +03:00
Celtic Minstrel
e2875f34b2 Fix a bunch of luadoc errors 2022-06-11 00:15:18 -04:00
Celtic Minstrel
1c13b34bb6 Fix map methods not being detected 2022-06-10 23:47:43 -04:00
Tommy
18f0de5d6e Boost tests: tee to error.log for SDL init failure check. 2022-06-11 03:38:58 +12:00
Gunter Labes
a63e6c47c2
Color more schema validation messages
Also simplified the implementation a bit and made it POSIX conform since it didn't really need any bash features.
2022-06-10 15:39:22 +02:00
Tommy
65102111e7 CI: Display boost unit test error output while running, not after. 2022-06-10 16:45:38 +12:00
Tommy
fcf7ca3b28 CI: Report which boost test suite is being executed. 2022-06-10 16:45:38 +12:00
Tommy
fed8f6cbcb CI: Colour some failure messages, and make test sections stand out. 2022-06-10 16:45:38 +12:00
Tommy
80c914cd81 CI: Enable coloured output for gdb backtraces. 2022-06-10 16:45:38 +12:00
Tommy
74649f4966 CI: Force colour diagnostics for compilation errors. 2022-06-10 16:45:38 +12:00
Pentarctagon
337894ac7b Store add-on download count in the database.
The idea being that this could then also be included as a sheet in the multiplayer activity report, which would then be an easy way to view add-on downloads over time. This would of course not be especially useful until 1.18, since for 1.17 the database count would be starting at 0 even though existing add-ons would have a non-zero download count.
2022-06-04 11:21:00 -05:00
Pentarctagon
f5dfdd71b0
Remove CI caching - hasn't worked for a while. 2022-05-07 22:46:05 -05:00
Pentarctagon
52ad51ab25
Looks like on 1.14 the afterlife bot doesn't always populate client source and version. 2022-05-06 16:41:14 -05:00
Pentarctagon
c9523e809c
Query fixup. 2022-05-06 16:28:40 -05:00
Eric Gallager
3344241e6a Update woptipng.py
add encoding comment
see: https://peps.python.org/pep-0263/
2022-05-06 19:10:58 +02:00