Commit graph

95 commits

Author SHA1 Message Date
Slendy
f0a1826b85
Only update score timestamps when you get more points 2023-08-28 16:32:58 -05:00
Josh
70a66e6034
Migrate scores to use proper relationships (#830)
* Initial work for score migration

* Finish score migration

* Implement suggested changes from code review

* Make Score Timestamp default the current time

* Chunk insertions to reduce packet size and give all scores the same Timestamp

* Fix serialization of GameScore

* Break score ties by time then scoreId

* Make lighthouse score migration not dependent on current score implementation
2023-08-19 07:32:38 +00:00
koko
25bb2ecfc1
Add the ability for moderators to forcibly lock levels (#831)
* Add the ability for moderators to forcibly lock levels

* Prevent forcibly locking an already locked level

I had to rollback and re-commit this because I was getting some weird error within Rider.

* Correct moderation notice header styling & remove errant text
2023-07-07 22:44:05 +00:00
Slendy
3b0c0c9b0e
Fix score parsing for versus scores 2023-06-26 18:50:38 -05:00
Slendy
ab98da42c3
Fix LBP2 recently played for story levels 2023-06-20 02:16:48 -05:00
Josh
e43397ac6a
Implement property dependency injection for the website (#806)
* Remove most non DI usages of DbContext

* Optimize website queries and refactor startup to use top level statements

* Remove unused functions in UserEntity and SlotEntity

* Optimize LBP1 LevelTags
2023-06-20 05:02:24 +00:00
Slendy
91e792aea0
Fix level ordering in busiest slots 2023-06-14 11:16:16 -05:00
Slendy
d4b9ca666b
Add ordering to LBP2 search 2023-06-06 23:16:54 -05:00
Josh
a69d94054b
Simplify filters and make cross control slots not show by default (#782)
* Simplify filters and make cross control slots not show by default
Also sort author levels by oldest levels first rather than newest levels first.

* Fix unit test expecting slots to sorted by timestamp descending

* Remove errant whitespace
2023-06-05 22:53:41 +00:00
Slendy
c9784cf8c9
Fix hearted profiles being sorted in reverse order 2023-05-31 21:25:35 -05:00
Slendy
0b936d3e5d
Implement deleting playlists
Also fixes playlists visually not updating in-game when modifying them
2023-05-31 20:37:17 -05:00
Slendy
cd926a8415
Refactor LBP3 text search to use the category system 2023-05-31 20:35:39 -05:00
Josh
0c1e350fa3
Rewrite gameserver slot filter system (#763)
* Initial implementation of new slot sorting and filtering system

* Initial implementation of filtering for lbp3 community tab

* Add support for organization on lbp3

* Add playlist and user categories

* Implement unit tests for all filters
Refactor more systems to use PaginationData

* Fix PlayerCountFilter test

* Add more unit tests and integration tests for the filter system

* Fix LBP2 move filter and gameFilterType

* Fix sort by likes in LBP3 category

* Add sort for total plays

* Remove extra whitespace and make styling more consistent

* Order hearted and queued levels by primary key ID

* Fix query without order warnings
2023-05-31 21:33:39 +00:00
jackcaver
9deff7ce63
Implement basic filters and LBP2 CrossController fixes (#758)
* implement basic filters and lbp2cc fixes

* lbp3 hide lbp2cc slots

* hide lbp2cc levels from hearted and most played categories in lbp3 and basic filters for lbp3

---------

Co-authored-by: jackcaver <jackcaver@users.noreply.github.com>
Co-authored-by: koko <koko@drones.gay>
2023-05-04 14:42:31 +00:00
Josh
3aa9033b67
Rewrite captcha system (#754)
Rewrite captcha and remove many unused directives
2023-04-29 04:32:42 +00:00
W0lf4llo
aefecc7b12
Make LBP2 lucky dip prefer newer levels and make player count more accurate (#744)
* Lucky Dip, Newest Levels, & Recently Played change

* almost broke prod :disaster:

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

I forgor lol

Co-authored-by: koko <koko@drones.gay>

* Remove TimestampMicros and add random slot selection with bias

* playersInPod count filters by platform

* Hope this actually commits now, idk github

* Apply suggestions from code review

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs

Co-authored-by: Josh <josh@slendy.pw>

* Fix random bias ordering

---------

Co-authored-by: koko <joebiden@kitgaming67.com>
Co-authored-by: koko <koko@drones.gay>
Co-authored-by: Slendy <josh@slendy.pw>
2023-04-29 04:32:36 +00:00
Josh
eb79d7cf48
Optimize slot endpoints (#750)
* Remove AsEnumerable usage in SlotsController

* Remove AsEnumerable usages from LBP3 categories

* Fix typo in OrderBy statement
2023-04-26 20:13:27 +00:00
Slendy
5fbaa5df20
Fix level republishing not updating resource or rootLevel 2023-04-11 20:23:43 -05:00
Josh
2210541894
Fix memory leak in GameServer (#731)
* Convert entities to serializable after aggregating rather before

* Cache instances of CustomXmlSerializer and create readonly constants for reused settings

* Change CustomXmlSerializer and serializer cache to work with deserializer
2023-04-02 23:45:19 +00:00
Josh
0253864f5e
Add LBP1 level scoreboards (#728)
* Add missing lbp1 scoreboard endpoint

* Allow all score types to be fetched

* Make lbp1 scores start at highest

* Fix query to use ScoreType from options

* Implement multi-type scoreboard response
2023-03-31 21:08:27 +00:00
Josh
50d1d9c7e5
Fix doubly sanitized strings (#727)
* Add migration to de-sanitize database strings

* Remove SanitizationHelper functions related to XML sanitization

* Remove sanitization usage from website

* Implement suggested changes
2023-03-30 23:03:08 +00:00
Slendy
ff470bcb34
Fix certain scores not being uploaded 2023-03-29 23:36:47 -05:00
Slendy
b0858448c8
Fix LBP3 playlist editing 2023-03-29 19:34:16 -05:00
Slendy
8376928a6c
Fix score uploading on story levels 2023-03-29 13:32:48 -05:00
Slendy
6fcc51fca3
Make BackgroundHash not nullable 2023-03-29 13:06:01 -05:00
Slendy
3ebdc03951
Properly serialize slot resources 2023-03-28 15:19:25 -05:00
Slendy
90f79d67c4
Fix level publishing 2023-03-28 14:26:09 -05:00
Slendy
deac39ef97
Fix ScoreboardResponse returning points as count 2023-03-28 14:03:35 -05:00
Slendy
1e8ef8c679
Serialization refactor hotfixes
Fixes user heart count
Fixes searches not working
Fixes text/plain content not outputting
2023-03-28 10:33:03 -05:00
Josh
329ab66043
Refactor serialization system (#702)
* Initial work for serialization refactor

* Experiment with new naming conventions

* Mostly implement user and slot serialization.
Still needs to be fine tuned to match original implementation
Many things are left in a broken state like website features/api endpoints/lbp3 categories

* Fix release building

* Migrate scores, reviews, and more to new serialization system.
Many things are still broken but progress is steadily being made

* Fix Api responses and migrate serialization for most types

* Make serialization better and fix bugs
Fix recursive PrepareSerialization when recursive item is set during root item's PrepareSerialization, items, should be properly indexed in order but it's only tested to 1 level of recursion

* Fix review serialization

* Fix user serialization producing malformed SQL query

* Remove DefaultIfEmpty query

* MariaDB doesn't like double nested queries

* Fix LBP1 tag counter

* Implement lbp3 categories and add better deserialization handling

* Implement expression tree caching to speed up reflection and write new serializer tests

* Remove Game column from UserEntity and rename DatabaseContextModelSnapshot.cs back to DatabaseModelSnapshot.cs

* Make UserEntity username not required

* Fix recursive serialization of lists and add relevant unit tests

* Actually commit the migration

* Fix LocationTests to use new deserialization class

* Fix comments not serializing the right author username

* Replace all occurrences of StatusCode with their respective ASP.NET named result
instead of StatusCode(403) everything is now in the form of Forbid()

* Fix SlotBase.ConvertToEntity and LocationTests

* Fix compilation error

* Give Location a default value in GameUserSlot and GameUser

* Reimplement stubbed website functions

* Convert grief reports to new serialization system

* Update DatabaseModelSnapshot and bump dotnet tool version

* Remove unused directives

* Fix broken type reference

* Fix rated comments on website

* Don't include banned users in website comments

* Optimize score submission

* Fix slot id calculating in in-game comment posting

* Move serialization interfaces to types folder and add more documentation

* Allow uploading of versus scores
2023-03-28 00:39:54 +00:00
W0lf4llo
9b014fa01c
StasticsHelper + Community Tab Performance Fix (#713)
* Player count shows per game

* Fixed LBP3 categories lagigng & StatisticsHelper

Co-authored-by: koko <sudokoko@users.noreply.github.com>

* Fixed "planetStats" mmPicksCount

* Hopefully the final update to this PR!
(Bug fixes)

* Update ProjectLighthouse/Types/Entities/Level/Slot.cs

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

I'm trusting you that nothing breaks here lol

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse.Servers.GameServer/Controllers/Slots/SlotsController.cs

bad slendy >:(

Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>

---------

Co-authored-by: koko <sudokoko@users.noreply.github.com>
Co-authored-by: koko <68549366+sudokoko@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2023-03-17 03:51:55 +00:00
Slendy
9d25f56e64
Fix hearted and queued levels on LBP Vita 2023-03-04 21:41:49 -06:00
Josh
017dcd6888
Make PhotoSubjects use a one to many relationship (#687)
* Attempt to remodel PhotoSubject and Photo relationship

* Fix migration name

* Use exactName for migration lock

* Revert "Use exactName for migration lock"

This reverts commit 76cee6a3ff.

* Set command timeout to 5 minutes for database migrations

* Delete unused PhotoSubjects in migration

* Clean up website queries and finalize subject refactor

* Add migration to remove PhotoSubjectCollection

* Add grace period for container startup and optimize startup

* Make config backup copy original file

* Allow docker entrypoint to fix data permissions
2023-02-24 04:20:55 +00:00
Josh
35ea2682b9
Replace Location table with packed 64-bit int (#679)
* Replace Location table with packed 64 bit int

* Remove double Include and fix Slot documentation

* Fix compilation errors from merge

* Fix namespaces and add expected values to unit tests
2023-02-21 14:53:38 -06:00
Josh
64b95e807d
Refactor Database class (#616)
Refactor Database into DatabaseContext
Moved into separate folder so it actually has a namespace instead sitting in the root
2023-02-15 23:54:30 -06:00
Josh
f1c5ad4002
Major refactor and reorganization of types (#652)
* Start of reorganization and cleanup

* Remove duplicate title id

* Refactor types

* Fix Release building

* Move classes in /Types to a Types namespace

* Fix compilation error (RoomVisualizerPage strikes again)

* Fix bugs created from auto merge

* Fix auto-merge compilation error

* Changes from review/fix failed merge
2023-02-13 22:02:58 -06:00
Slendy
84325596ee
Clamp minimum and maximum players on slot publish 2023-02-11 19:13:01 -06:00
Slendy
14fa5e9328
Properly dispose of StreamReaders 2023-02-11 19:08:44 -06:00
HomicidalChicken
326b9e5529
Move filter to separate config and add more scanning (#603)
* Create .gitattributes

Added a .gitattributes file that excludes the local customWordFilter.txt file from merged updates, allowing server operators to maintain their own word filter list and not have it overwritten.

* Update .gitignore

Added chatCensoredList to gitignore

* Update .gitignore

* Dynamic censor list file changes

Removed .gitattributes file, attempted to make chatCensoredList.txt into a dynamic file loaded at runtime instead.

* Added additional censorship coverage

Censorship now covers:
Level titles
Level descriptions
Reviews
Comments

* Delete chatCensoredList.txt

* Update .gitignore

Co-authored-by: Josh <josh@slendy.pw>

* Update filter verbiage

* Update ProjectLighthouse.Servers.GameServer/Controllers/CommentController.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ProjectLighthouse/Helpers/CensorHelper.cs

Co-authored-by: Josh <josh@slendy.pw>

* Add CensorConfiguration and add more filters

Co-authored-by: Josh <josh@slendy.pw>
2023-01-19 21:24:45 -06:00
Josh
b5877bc10c
Remove duplicate scores (#622)
* Remove duplicate scores

* Optimize score migration
2023-01-10 17:36:43 -06:00
Josh
6024d44508
Fix bugs and bump dependencies (#590)
Fixes a bug with yourReview where the slot type wouldn't be included
Fixes a bug with crossControllerPlanet where it would be included even if it was null or empty
2022-12-13 18:39:24 -06:00
W0lf4llo
b896aee51a
Prevent other players scores from showing up as yours (#566)
* Fix ScoreController making scores of other players

* Split playerIds when looking for friends too

Co-authored-by: Josh <josh@slendy.pw>
2022-11-27 17:46:50 -06:00
Slendy
75de1d0faa
Add workaround for weird score bug 2022-11-13 17:28:04 -06:00
Slendy
e5cafb1e02
Add missing null checks to CollectionController 2022-11-10 22:20:28 -06:00
Slendy
f1a6eb48b1
Add Authorize tag to ScoreController and add more verbose logging 2022-11-10 22:11:03 -06:00
Josh
b3a00da554
Refactor deserialization and authentication (#550)
* Refactor deserialization and more

* Refactor authentication flow

* Fix unit tests

* Make deserialization better
2022-11-10 21:14:16 -06:00
Slendy
b0d780b91e
Fix score uploading exploit 2022-11-05 22:37:16 -05:00
Slendy
f46bd4fc87
Fix playlist descriptions and pirate bug 2022-09-27 21:52:56 -05:00
Slendy
2217c20803
Fix favouritePlaylists logic 2022-09-24 21:34:05 -05:00
Slendy
a15ff2c886
Fix typo in unfavourite route 2022-09-24 21:28:05 -05:00