mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-21 12:12:48 +00:00
feat(ugc): how many triangles each model saved, on the UGC page
The UGC server stores a model's most detailed level's triangles before it removed the faces that can't be seen (ugc.triangle_count_before; migrations sqlite 75, mysql 92), from stats.json when it makes a model and, once, for the models made before. The UGC page's models list has a Saved column (the share and number of triangles removed, before/after in its tooltip), sortable by the share (sort=savings), and the gallery can sort by most triangles saved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
7
migrations/dlu/mysql/92_ugc_triangles_before.sql
Normal file
7
migrations/dlu/mysql/92_ugc_triangles_before.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
/* UGC server: ugc.triangle_count_before is the most detailed level's triangles before the UGC server removed the faces
|
||||
that can't be seen (0 until known), so the dashboard can show how much each model saved (with triangle_count). */
|
||||
SET @dlu_column = (SELECT IF(COUNT(*) = 0, 'ALTER TABLE ugc ADD COLUMN triangle_count_before INT UNSIGNED NOT NULL DEFAULT 0', 'DO 0') FROM information_schema.columns
|
||||
WHERE table_schema = DATABASE() AND table_name = 'ugc' AND column_name = 'triangle_count_before');
|
||||
PREPARE dlu_column_stmt FROM @dlu_column;
|
||||
EXECUTE dlu_column_stmt;
|
||||
DEALLOCATE PREPARE dlu_column_stmt;
|
||||
2
migrations/dlu/sqlite/75_ugc_triangles_before.sql
Normal file
2
migrations/dlu/sqlite/75_ugc_triangles_before.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
/* UGC server: a model's triangles before hidden faces were removed. See the MySQL migration. */
|
||||
ALTER TABLE ugc ADD COLUMN triangle_count_before INTEGER NOT NULL DEFAULT 0;
|
||||
Reference in New Issue
Block a user