Add full custom content & modding system 🎨

MASSIVE FEATURE: Turn RR3 into a moddable community platform!

Controllers:
- ModdingController: Upload/manage custom cars & tracks
  - POST /modding/api/cars/upload (custom car upload)
  - POST /modding/api/tracks/upload (custom track upload)
  - GET /modding/api/cars (list custom content)
  - GET /modding/api/content (search & filter)
  - POST /modding/api/modpack/create (bundle mods)
  - GET /modding/api/modpacks (browse packs)
  - DELETE /modding/api/content/{id} (moderation)

Database:
- Added ModPack entity for mod bundles
- Extended Car with IsCustom, CustomAuthor, CustomVersion
- Extended GameAsset with IsCustomContent, CustomAuthor
- Supports versioning, ratings, download tracking

Configuration:
- CustomAssetsPath & ModsPath settings
- EnableModding flag
- Upload size limits (100MB cars, 200MB tracks)

Documentation:
- MODDING_GUIDE.md: Complete modding system guide
  - API endpoints & examples
  - Content creation workflow
  - Tools & resources
  - Community guidelines
  - Example scripts

Features:
 Upload custom cars (models, textures, audio)
 Upload custom tracks (layouts, scenery)
 Create & share mod packs
 Version control & ratings
 Community content discovery
 Automatic MD5 verification
 Organized file storage

This makes RR3 a COMMUNITY-DRIVEN platform that can
live forever with user-generated content! 🎮🏎️

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 01:04:31 -08:00
parent 0c8ed952db
commit a7d33090ad
4 changed files with 1030 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ public class RR3DbContext : DbContext
public DbSet<CarUpgrade> CarUpgrades { get; set; }
public DbSet<CareerProgress> CareerProgress { get; set; }
public DbSet<GameAsset> GameAssets { get; set; }
public DbSet<ModPack> ModPacks { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
@@ -315,6 +316,14 @@ public class Car
public int CashPrice { get; set; }
public int GoldPrice { get; set; }
public bool Available { get; set; } = true;
public int Year { get; set; }
public string? Description { get; set; }
// Custom content fields
public bool IsCustom { get; set; }
public string? CustomAuthor { get; set; }
public string? CustomVersion { get; set; }
public DateTime? CreatedAt { get; set; }
}
public class OwnedCar
@@ -383,4 +392,32 @@ public class GameAsset
public string? CarId { get; set; }
public string? TrackId { get; set; }
public string Category { get; set; } = "misc"; // models, textures, audio, etc.
public long? CompressedSize { get; set; }
public string? Md5Hash { get; set; }
// Custom content support
public bool IsCustomContent { get; set; }
public string? CustomAuthor { get; set; }
}
// Mod Pack entity - bundles of custom content
public class ModPack
{
public int Id { get; set; }
public string PackId { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Author { get; set; } = string.Empty;
public string? Description { get; set; }
public string Version { get; set; } = "1.0";
// Comma-separated IDs
public string? CarIds { get; set; }
public string? TrackIds { get; set; }
// Statistics
public int DownloadCount { get; set; }
public double Rating { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
}