mirror of
https://git.recroomarchive.org/RecRoomArchive/RRAC.git
synced 2026-09-08 06:31:25 -07:00
189 lines
7.4 KiB
C#
189 lines
7.4 KiB
C#
using RecRoomArchive.Models.API.Config;
|
|
|
|
namespace RecRoomArchive.Services
|
|
{
|
|
/// <summary>
|
|
/// I don't even want to explain this one. I'm sorry
|
|
/// </summary>
|
|
public class ConfigService(MessageOfTheDayService motdService, IHttpContextAccessor httpContextAccessor)
|
|
{
|
|
private readonly MessageOfTheDayService _motdService = motdService;
|
|
private readonly IHttpContextAccessor _httpContextAccessor = httpContextAccessor;
|
|
|
|
/// <summary>
|
|
/// I'm only doing this because I think that having the full Rec Room config in a controller would be very very ugly.
|
|
/// </summary>
|
|
/// <returns>RecRoomConfig</returns>
|
|
public async Task<RecRoomConfig> GetRecRoomConfig()
|
|
{
|
|
var request = _httpContextAccessor.HttpContext?.Request;
|
|
var cdnHost = $"{request!.Scheme}://{request.Host}";
|
|
var motd = await _motdService.GetMessageOfTheDay();
|
|
|
|
return new RecRoomConfig()
|
|
{
|
|
MessageOfTheDay = motd,
|
|
CdnBaseUri = cdnHost,
|
|
MatchmakingParams = new MatchmakingParams(),
|
|
LevelProgressionMaps =
|
|
[
|
|
new LevelProgressionMap(0, 0),
|
|
new LevelProgressionMap(1, 10),
|
|
new LevelProgressionMap(2, 10),
|
|
new LevelProgressionMap(3, 10),
|
|
new LevelProgressionMap(4, 20),
|
|
new LevelProgressionMap(5, 20),
|
|
new LevelProgressionMap(6, 20),
|
|
new LevelProgressionMap(7, 20),
|
|
new LevelProgressionMap(8, 20),
|
|
new LevelProgressionMap(9, 20),
|
|
new LevelProgressionMap(10, 20),
|
|
new LevelProgressionMap(11, 45),
|
|
new LevelProgressionMap(12, 45),
|
|
new LevelProgressionMap(13, 45),
|
|
new LevelProgressionMap(14, 45),
|
|
new LevelProgressionMap(15, 45),
|
|
new LevelProgressionMap(16, 45),
|
|
new LevelProgressionMap(17, 45),
|
|
new LevelProgressionMap(18, 45),
|
|
new LevelProgressionMap(19, 45),
|
|
new LevelProgressionMap(20, 45),
|
|
new LevelProgressionMap(21, 115),
|
|
new LevelProgressionMap(22, 115),
|
|
new LevelProgressionMap(23, 115),
|
|
new LevelProgressionMap(24, 115),
|
|
new LevelProgressionMap(25, 115),
|
|
new LevelProgressionMap(26, 115),
|
|
new LevelProgressionMap(27, 115),
|
|
new LevelProgressionMap(28, 115),
|
|
new LevelProgressionMap(29, 115),
|
|
new LevelProgressionMap(30, 115)
|
|
],
|
|
DailyObjectives =
|
|
[
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.QuestGames_Scifi1,
|
|
Score = 1
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.QuestEnemyKills_Scifi1,
|
|
Score = 10
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.ArenaGames,
|
|
Score = 1
|
|
}
|
|
],
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.PaintballCTFGames,
|
|
Score = 2
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.FinishActivity,
|
|
Score = 1
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.CheerAPlayer,
|
|
Score = 1
|
|
}
|
|
],
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.DodgeballGames,
|
|
Score = 2
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.DodgeballWins,
|
|
Score = 2
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.CheerAPlayer,
|
|
Score = 1
|
|
}
|
|
],
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.PaintballTeamBattleWins,
|
|
Score = 2
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.PaintballTeamBattleGames,
|
|
Score = 20
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.FinishActivity,
|
|
Score = 1
|
|
}
|
|
],
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.QuestGames_Goblin1,
|
|
Score = 1
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.QuestEnemyKills_Goblin1,
|
|
Score = 10
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.CheerAPlayer,
|
|
Score = 1
|
|
}
|
|
],
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.PaintballAnyModeGames,
|
|
Score = 2
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.PaintballAnyModeHits,
|
|
Score = 20
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.ArenaGames,
|
|
Score = 1
|
|
}
|
|
],
|
|
[
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.QuestGames_Goblin2,
|
|
Score = 1
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.QuestEnemyKills_Goblin2,
|
|
Score = 10
|
|
},
|
|
new DailyObjective()
|
|
{
|
|
Type = ObjectiveType.FinishActivity,
|
|
Score = 1
|
|
}
|
|
]
|
|
],
|
|
ConfigTable = [],
|
|
PhotonConfig = new PhotonConfig()
|
|
};
|
|
}
|
|
}
|
|
} |