Radicade Public Code

This commit is contained in:
JogmansonReal
2026-10-16 23:33:13 -07:00
commit 55175acdf6
832 changed files with 363261 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RadicadeServer.RecNet.DB
{
public class PlaylistDB
{
[Key]
public long PlaylistId { get; set; }
public string Keywords { get; set; } = string.Empty;
public string[] GetKeywords()
{
return Keywords.Split(',', StringSplitOptions.TrimEntries);
}
}
public class TagDB
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long TagId { get; set; }
public string Tag { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace RadicadeServer.RecNet.Enums
{
public enum Accessibility
{
Private,
Public,
Unlised
}
}
+11
View File
@@ -0,0 +1,11 @@
namespace RadicadeServer.RecNet.Enums
{
public enum EventResponses
{
None = -1,
Yes,
Interested,
No,
Pending
}
}
+20
View File
@@ -0,0 +1,20 @@
namespace RadicadeServer.RecNet.Enums
{
public enum InventionTagResult
{
Success,
TooManyTags,
TagUseRestricted,
InvalidTag,
InappropriateTag,
TagTooLong,
TagNotFound,
TagAlreadyExists,
NoChange,
TagRepeated,
LacksPermission,
RoomDoesNotExist,
InventionDoesNotExist,
RoomPlaylistDoesNotExist
}
}
@@ -0,0 +1,39 @@
namespace RadicadeServer.RecNet.Enums.Messages
{
public enum MessageType
{
GameInvite,
GameInviteDeclined,
GameJoinFailed,
PartyActivitySwitch,
FriendInvite,
VoteToKick,
GameInviteV2,
PartyActivitySwitchV2,
RequestGameInvite = 10,
RequestGameInviteDeclined,
FriendStatusOnline = 20,
TextMessage = 30,
FriendRequestAccepted = 40,
PlayerCheer = 50,
PlayerCheerAnonymous,
RoomCoOwnerAdded = 60,
RoomCoOwnerRemoved,
RoomCoOwnerInvited,
CreatorPublishedNewRoom = 70,
PlayerAttendingEvent = 80,
PlayerEventInvitation,
DEPRECATED_GroupInvitation = 90,
DEPRECATED_PlayerJoinedGroup,
CoachMessage = 100,
NewRoomComments = 110,
PartyUpRequest = 120,
ClubMemberInvited = 200,
ClubModeratorInvited,
ClubCoownerInvited,
VirtualCreatorAnnouncementRoomPublished = 100000,
VirtualCreatorAnnouncementInventionPublished,
VirtualCreatorAnnouncementGeneric,
VirtualCreatorAnnouncementPlayerEventPublished
}
}
@@ -0,0 +1,49 @@
namespace RadicadeServer.RecNet.Enums.Messages
{
public enum NotificationType
{
RelationshipChanged = 1,
MessageReceived,
MessageDeleted,
PresenceHeartbeatResponse,
RefreshLogin,
Logout,
SubscriptionUpdateProfile = 11,
SubscriptionUpdatePresence,
SubscriptionUpdateGameSession,
SubscriptionUpdateRoom = 15,
SubscriptionUpdateRoomPlaylist,
ModerationQuitGame = 20,
ModerationUpdateRequired,
ModerationKick,
ModerationKickAttemptFailed,
ModerationRoomBan,
ServerMaintenance,
AnnouncementText,
AnnouncementGameUpdate,
GiftPackageReceived = 30,
GiftPackageReceivedImmediate,
GiftPackageRewardSelectionReceived,
ProfileJuniorStatusUpdate = 40,
RelationshipsInvalid = 50,
StorefrontBalanceAdd = 60,
StorefrontBalanceUpdate,
StorefrontBalancePurchase,
ConsumableMappingAdded = 70,
ConsumableMappingRemoved,
PlayerEventCreated = 80,
PlayerEventUpdated,
PlayerEventDeleted,
PlayerEventResponseChanged,
PlayerEventResponseDeleted,
PlayerEventStateChanged,
ChatMessageReceived = 90,
CommunityBoardUpdate = 95,
CommunityBoardAnnouncementUpdate,
InventionModerationStateChanged = 100,
FreeGiftButtonItemsAdded = 110,
LocalRoomKeyCreated = 120,
LocalRoomKeyDeleted
}
}
@@ -0,0 +1,46 @@
namespace RadicadeServer.RecNet.Enums.Messages
{
public enum Notifs
{
RelationshipChanged = 1,
MessageReceived,
MessageDeleted,
PresenceHeartbeatResponse,
RefreshLogin,
Logout,
SubscriptionUpdateProfile = 11,
SubscriptionUpdatePresence,
SubscriptionUpdateGameSession,
SubscriptionUpdateRoom = 15,
SubscriptionUpdateRoomPlaylist,
ModerationQuitGame = 20,
ModerationUpdateRequired,
ModerationKick,
ModerationKickAttemptFailed,
ModerationRoomBan,
ServerMaintenance,
GiftPackageReceived = 30,
GiftPackageReceivedImmediate,
GiftPackageRewardSelectionReceived,
ProfileJuniorStatusUpdate = 40,
RelationshipsInvalid = 50,
StorefrontBalanceAdd = 60,
StorefrontBalanceUpdate,
StorefrontBalancePurchase,
ConsumableMappingAdded = 70,
ConsumableMappingRemoved,
PlayerEventCreated = 80,
PlayerEventUpdated,
PlayerEventDeleted,
PlayerEventResponseChanged,
PlayerEventResponseDeleted,
PlayerEventStateChanged,
ChatMessageReceived = 90,
CommunityBoardUpdate = 95,
CommunityBoardAnnouncementUpdate,
InventionModerationStateChanged = 100,
FreeGiftButtonItemsAdded = 110,
LocalRoomKeyCreated = 120,
LocalRoomKeyDeleted
}
}
@@ -0,0 +1,15 @@
namespace RadicadeServer.RecNet.Enums.Moderation
{
public enum CheerCategory
{
General = 0,
Helpful = 10,
Sportsman = 20,
GreatHost = 30,
Creative = 40,
RecRoomDeveloper = 9000,
Credit = 50
}
}
@@ -0,0 +1,24 @@
namespace RadicadeServer.RecNet.Enums.Moderation
{
public enum ReportCategory
{
Moderator = -1,
Unknown,
DEPRECATED_MicrophoneAbuse,
Harassment,
Cheating,
DEPRECATED_ImmatureBehavior,
AFK,
Misc,
Underage,
VoteKick = 10,
MisleadingPurchases,
CoC_Underage = 100,
CoC_Sexual,
CoC_Discrimination,
CoC_Trolling,
CoC_NameOrProfile,
InappropriateClothing = 200,
IssuingInaccurateReports = 1000
}
}
@@ -0,0 +1,8 @@
namespace RadicadeServer.RecNet.Enums.Players.Avatar
{
public enum AvatarItemType
{
Outfit,
HairDye
}
}
@@ -0,0 +1,12 @@
namespace RadicadeServer.RecNet.Enums.Players
{
public enum DeviceClass
{
Unknown,
VR,
Screen,
Mobile,
VRLow,
Quest2
}
}
@@ -0,0 +1,9 @@
namespace RadicadeServer.RecNet.Enums.Players
{
public enum JuniorState
{
BasedOnBirthday,
ModerationOverride,
PendingOverride
}
}
+15
View File
@@ -0,0 +1,15 @@
namespace RadicadeServer.RecNet.Enums.Players
{
public enum Platforms
{
All = -1,
Steam,
Oculus,
PlayStation,
Xbox,
HeadlessBot,
IOS,
GooglePlay,
Standalone = 7
}
}
@@ -0,0 +1,10 @@
namespace RadicadeServer.RecNet.Enums.Players
{
public enum StatusVisibility
{
Public,
FriendsOnly,
FavoriteFriendsOnly,
Offline
}
}
@@ -0,0 +1,8 @@
namespace RadicadeServer.RecNet.Enums.Players
{
public enum VRMovementModes
{
TELEPORT,
WALK
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum JoinMode
{
PublicMatchmaking,
PublicNewInstance,
PrivateNewInstance
}
}
+54
View File
@@ -0,0 +1,54 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum JoinStatus
{
UnknownError = -1,
Success,
NoSuchGame,
PlayerNotOnline,
InsufficientSpace,
EventNotStarted,
EventAlreadyFinished,
BlockedFromRoom = 7,
JuniorNotAllowed = 11,
Banned,
AlreadyInBestInstance,
InsufficientRelationship,
UpdateRequired = 16,
AlreadyInTargetInstance,
UGCNotAllowed = 19,
NoSuchRoom,
RoomIsNotActive = 22,
RoomBlockedByCreator,
RoomIsPrivate = 25,
RoomInstanceIsPrivate,
DeviceClassNotSupported = 30,
DeviceClassNotSupportedByRoomOwner,
MovementModeNotSupportedByRoomOwner,
EventIsPrivate = 35,
EventIsFull,
RoomInviteExpired = 40,
NoAvailableRegion = 45,
NotorietyTooPoor = 50,
BannedFromRoom = 55,
NoSuchRoomPlaylist = 60,
RoomPlaylistIsNotActive,
RoomPlaylistIsPrivate,
NoSuchClub = 70,
ClubHasNoClubhouse,
ClubIsNotActive = 73,
NotAMemberOfClub,
BannedFromClub,
InstanceJoinNotPermitted,
LevelTooLow,
ChatPartyInviteNotFound = 78,
ChatPartyInviteModerated,
ChatMessageNotAnInvite,
DeveloperOnly,
RRPlusRequired,
MetaJuniorAccountRestriction,
NotExclusivelyLoggedIn,
AccountDoesNotExist
}
}
@@ -0,0 +1,8 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum MaxPlayerMode
{
AllSubrooms,
OnlyEntrySubrooms
}
}
@@ -0,0 +1,25 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum RolePermissions
{
INVALID = -1,
CAN_EDIT_ROOM_ROLES = 1,
VOTE_KICK_PERMISSION = 3,
CAN_INVITE = 4,
CAN_TALK = 6,
CAN_PRINT_PHOTOS = 7,
CAN_START_GAMES = 8,
CAN_SELF_REVIVE = 9,
AUTO_ASSIGNED_GAME_ROLES = 11,
CAN_CHANGE_GAME_MODE = 12,
CAN_USE_MAKER_PEN = 13,
CAN_USE_DELETE_ALL_BUTTON = 14,
CAN_SAVE_INVENTIONS = 15,
DISABLE_MIC_AUTO_MUTE = 16,
CAN_END_GAMES_EARLY = 17,
CAN_USE_SHARE_CAM = 18,
DEPRECATED_CAN_EDIT_CIRCUITS = 19,
CAN_SPAWN_INVENTIONS = 20,
CAN_SPAWN_CONSUMABLES = 21
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum RoleType
{
None,
Banned,
Host = 10,
Moderator = 20,
CoOwner = 30,
TemporaryCoOwner,
Creator = 255
}
}
@@ -0,0 +1,14 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum RoomInstanceType
{
Public,
Private,
Dormroom,
Event,
Meetup,
Clubhouse,
MultiInstanceEvent = 6
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
public enum RoomState
{
Active,
Junior_Pending = 11,
Moderator_Pending = 100,
Moderator_Closed,
Moderator_Banned,
MarkedForDelete = 255
}
}
+15
View File
@@ -0,0 +1,15 @@
namespace RadicadeServer.RecNet.Enums.Rooms
{
[Flags]
public enum WarningMask
{
None,
Scary,
Mature,
FlashingLights = 4,
IntenseMotion = 8,
Violence = 16,
Custom = 32,
Reports = 64
}
}
@@ -0,0 +1,14 @@
namespace RadicadeServer.RecNet.Enums.Store
{
public enum ConsumableCategories
{
Invalid = -1,
CameraFilter,
Potion_Head = 2,
Potion_Hand,
Food,
KO_Customization,
Potion_HairDye,
Coupon
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace RadicadeServer.RecNet.Enums.Store
{
public enum CurrencyType
{
Invalid,
LaserTagTickets,
RecCenterTokens,
LostSkullsGold = 100,
DraculaSilver,
RecRoyale_Season1 = 200
}
}
+123
View File
@@ -0,0 +1,123 @@
namespace RadicadeServer.RecNet.Enums.Store
{
public enum RewardType
{
FirstActivityOfDay,
DailyChallengesComplete,
PostGameActivity,
PostQuestActivity,
WeeklyCompleteButHaveSkin,
Levelup,
ReferralReward
}
public enum GiftContext
{
None = -1,
Default,
First_Activity,
Game_Drop,
All_Daily_Challenges_Complete,
All_Weekly_Challenge_Complete,
Daily_Challenge_Complete,
Weekly_Challenge_Complete,
Unassigned_Equipment = 10,
Unassigned_Avatar,
Unassigned_Consumable,
Reacquisition = 20,
Membership,
NUX_TokensAndDressUp = 30,
NUX_Experiment1,
NUX_Experiment2,
NUX_Experiment3,
NUX_Experiment4,
NUX_Experiment5,
GameRewards = 50,
GameRewards_Tokens,
LevelUp = 100,
Purchased_Gift_A = 500,
Purchased_Gift_B,
Purchased_Gift_C,
Purchased_Gift_D,
Holiday = 1000,
Contest,
Promotion,
SubscribersOnly,
Deprecated = 1100,
RecRoyale = 1200,
Friendotron_Gift = 1300,
DEPRECATED_Paintball_ClearCut = 2000,
DEPRECATED_Paintball_Homestead,
DEPRECATED_Paintball_Quarry,
DEPRECATED_Paintball_River,
DEPRECATED_Paintball_Dam,
DEPRECATED_Paintball_DriveIn,
Paintball_ClearCut = 2010,
Paintball_Homestead,
Paintball_Quarry,
Paintball_River,
Paintball_Dam,
Paintball_DriveIn,
DEPRECATED_Discgolf_Propulsion = 3000,
DEPRECATED_Discgolf_Lake,
Discgolf_Propulsion = 3010,
Discgolf_Lake,
Discgolf_Mode_CoopCatch = 3500,
Quest_Goblin_A = 4000,
Quest_Goblin_B,
Quest_Goblin_C,
Quest_Goblin_S,
Quest_Goblin_Consumable,
Quest_Cauldron_A = 4010,
Quest_Cauldron_B,
Quest_Cauldron_C,
Quest_Cauldron_S,
Quest_Cauldron_Consumable,
Quest_Pirate1_A = 4100,
Quest_Pirate1_B,
Quest_Pirate1_C,
Quest_Pirate1_S,
Quest_Pirate1_X,
Quest_Pirate1_Consumable,
Quest_Dracula1_A = 4200,
Quest_Dracula1_B,
Quest_Dracula1_C,
Quest_Dracula1_S,
Quest_Dracula1_X,
Quest_Dracula1_Consumable,
Quest_Dracula1_SS,
Quest_SciFi_A = 4500,
Quest_SciFi_B,
Quest_SciFi_C,
Quest_SciFi_S,
Quest_Scifi_Consumable,
DEPRECATED_Charades = 5000,
Charades,
DEPRECATED_Soccer = 6000,
Soccer,
DEPRECATED_Paddleball = 7000,
Paddleball,
DEPRECATED_Dodgeball = 8000,
Dodgeball,
DEPRECATED_Lasertag = 9000,
Lasertag,
DEPRECATED_Bowling = 10000,
Bowling,
StuntRunner_TheMainEvent_A = 11000,
StuntRunner_TheMainEvent_B,
StuntRunner_TheMainEvent_C,
StuntRunner_TheMainEvent_D,
StuntRunner_TheMainEvent_S,
StuntRunner_TheMainEvent_X,
StuntRunner_TheMainEvent_Consumable,
StuntRunner_TheMainEvent_SS,
Store_LaserTag = 100000,
Store_RecCenter = 100010,
Consumable = 110000,
Token = 110100,
Punchcard_Challenge_Complete = 110200,
All_Punchcard_Challenges_Complete,
Commerce_Purchase = 200000
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace RadicadeServer.RecNet.Enums.Store
{
public enum Rarity
{
None = -1,
Common,
Uncommon = 10,
Rare = 20,
Epic = 30,
Legendary = 50
}
}
+9
View File
@@ -0,0 +1,9 @@
namespace RadicadeServer.RecNet.Enums.Store
{
public enum ReferralStatus
{
Locked,
Unlocked,
Claimed
}
}
@@ -0,0 +1,27 @@
namespace RadicadeServer.RecNet.Enums.Store.SKU
{
public enum CampusCardStatus
{
Started,
Reactivated,
AutoRenewed,
UserCancelledAutoRenewals,
UserReactivatedAutoRenewalsBeforeExpiration = 10,
ManuallyRenewed = 5,
ExpiredAutoRenewalFailed = 4,
Expired = 6,
Upgrade,
Downgrade,
Rollback
}
public enum CampusCardLevel
{
Gold,
Platinum
}
public enum CampusCardPeriod
{
Month,
Year
}
}
@@ -0,0 +1,27 @@
namespace RadicadeServer.RecNet.Enums.Store.SKU
{
public enum PurchaseType
{
NonPurchasedNotUsableInP2P = -2,
NonPurchasedDefault,
SteamPurchased,
OculusPurchased,
PlayStationPurchased,
MicrosoftPurchased,
IOSPurchased = 5,
[Obsolete]
PlayStationNonPurchasedP2P = 100,
[Obsolete]
NonPlayStationNonPurchasedP2P,
NonPurchasedEarnedByP2P = 1000
}
}
@@ -0,0 +1,28 @@
namespace RadicadeServer.RecNet.Enums.Store
{
public enum StorefrontBalanceAddTypes
{
Invalid,
DirectBalanceWithMultiplier,
FromGiftBox,
NUXChallenge = 10,
AllNUXChallenges,
DailyChallenge = 100,
AllDailyChallenges,
FinishActivity = 200,
RecRoyaleMatchFinished = 250,
ChecklistCredit = 303,
WonGame = 1000,
LostGame,
WonGameRateLimited,
WonGamePartial,
LevelUp = 1100,
Registered = 1200,
CreatorReward = 1300,
CommercePurchase = 1400,
CommercePurchaseRevoked,
Manual_Refund = 2000,
Manual_Thanks = 2010,
Manual_Apology = 2020
}
}
@@ -0,0 +1,9 @@
namespace RadicadeServer.RecNet.Enums.Store
{
}
+10
View File
@@ -0,0 +1,10 @@
namespace RadicadeServer.RecNet.Enums
{
public enum TagType
{
General,
Auto,
AGOnly,
Banned
}
}
@@ -0,0 +1,13 @@
namespace RadicadeServer.RecNet.Enums
{
public enum UpdateResponseTypes
{
OK = 0,
TooManyRequests = 1,
NotEnoughCredit = 2,
AlreadyOwned = 3,
NoItemAvailable = 4,
CouponNotApplicable = 5,
RequestedPriceDoesNotMatch = 6
}
}
+87
View File
@@ -0,0 +1,87 @@
namespace RadicadeServer.RecNet
{
public class Generators
{
public readonly static string[] Adjectives = [
"Brilliant",
"Calm",
"Curious",
"Delightful",
"Elegant",
"Fierce",
"Gentle",
"Honest",
"Imaginative",
"Joyful",
"Keen",
"Lively",
"Mysterious",
"Nimble",
"Optimistic",
"Playful",
"Quiet",
"Resilient",
"Thoughtful",
"Vivid",
"Adventurous",
"Bold",
"Charming",
"Confident",
"Creative",
"Daring",
"Energetic",
"Friendly",
"Graceful",
"Humble",
"Insightful",
"Loyal",
"Motivated",
"Patient",
"Reliable",
"Smart",
"Strong",
"Versatile",
"Warm",
"Wise"
];
public readonly static string[] Animals = [
"Bear",
"Cat",
"Dolphin",
"Eagle",
"Fox",
"Giraffe",
"Horse",
"Kangaroo",
"Lion",
"Monkey",
"Narwhal",
"Owl",
"Panda",
"Rabbit",
"Shark",
"Tiger",
"Vulture",
"Wolf",
"Zebra",
"Alligator",
"Cheetah",
"Elephant",
"Falcon",
"Goat",
"Koala",
"Leopard",
"Penguin",
"Raccoon",
"Seal",
"Turtle"
];
public static string GenerateUsername()
{
string adjective = Adjectives[Random.Shared.Next(0, Adjectives.Length - 1)];
string animal = Animals[Random.Shared.Next(0, Animals.Length - 1)];
return adjective + animal + Random.Shared.Next(0, 9999).ToString();
}
}
}
+12
View File
@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RadicadeServer.RecNet
{
public class GenericData
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public long AccountId { get; set; }
public string Data { get; set; } = null!;
}
}
+10
View File
@@ -0,0 +1,10 @@
using RadicadeServer.RecNet.Enums;
namespace RadicadeServer.RecNet
{
public class ItemTag
{
public string Tag { get; set; } = null!;
public TagType Type { get; set; }
}
}
@@ -0,0 +1,7 @@
namespace RadicadeServer.RecNet.Maintenance
{
public class ServerMaintenance
{
public int StartsInMinutes { get; set; }
}
}
+10
View File
@@ -0,0 +1,10 @@
using RadicadeServer.RecNet.Events;
namespace RadicadeServer.RecNet.Responses
{
public class AllEvents
{
public List<PlayerEvent> Created { get; set; } = new();
public List<EventResponse> Responses { get; set; } = new();
}
}
+26
View File
@@ -0,0 +1,26 @@
namespace RadicadeServer.RecNet.Responses
{
public class AuthResponse
{
public string error { get; set; } = string.Empty;
public string error_description { get; set; } = string.Empty;
public string access_token { get; set; } = null!;
public string refresh_token { get; set; } = null!;
public string key { get; set; } = null!;
public string eac_nonce { get; set; } = null!;
public AuthResponse(string Error, string ErrorDescription)
{
error = Error;
error_description = ErrorDescription;
}
public AuthResponse() {}
}
}
@@ -0,0 +1,12 @@
using RadicadeServer.RecNet.Enums.Store;
namespace RadicadeServer.RecNet.Responses
{
public class BalanceResponse
{
public long Balance { get; set; }
public CurrencyType CurrencyType { get; set; }
public int BalanceType { get; set; } = 0;
}
}
+13
View File
@@ -0,0 +1,13 @@
namespace RadicadeServer.RecNet.Responses
{
public class ClientAction
{
public bool ALOCDGMHFKA { get; set; }
public string FBILGKFKFJE { get; set; } = string.Empty;
public static ClientAction Ok() => new() { ALOCDGMHFKA = true };
public static ClientAction Failure(string why) => new() { ALOCDGMHFKA = false, FBILGKFKFJE = why };
}
}
+15
View File
@@ -0,0 +1,15 @@
namespace RadicadeServer.RecNet.Responses
{
public class Failure
{
public bool success { get; set; } = false;
public string error { get; set; } = string.Empty;
public Failure(string why)
{
success = false;
error = string.IsNullOrWhiteSpace(why) ? "request failed" : why;
}
}
}
+26
View File
@@ -0,0 +1,26 @@
using RadicadeServer.RecNet.Accounts;
using RadicadeServer.RecNet.Enums.Rooms;
using RadicadeServer.RecNet.Rooms;
namespace RadicadeServer.RecNet.Responses
{
public class MatchResponse
{
public JoinStatus errorCode { get; set; }
public RoomInstance? roomInstance { get; set; }
public static MatchResponse Error(JoinStatus status)
{
return new MatchResponse { errorCode = status, roomInstance = null };
}
public MatchResponse()
{
}
public MatchResponse(JoinStatus status, RoomInstance instance)
{
this.errorCode = status;
this.roomInstance = instance;
}
}
}
@@ -0,0 +1,22 @@
using RadicadeServer.RecNet.Leveling;
using RadicadeServer.RecNet.Progression;
using RadicadeServer.Utils;
namespace RadicadeServer.RecNet.Responses
{
public class ProgressionResponse
{
public long Id { get; set; }
public long PlayerId { get; set; }
public int Level { get; set; }
public int XP { get; set; }
public ProgressionResponse() {}
public ProgressionResponse(ProgressionData data) {
this.Id = data.PlayerId;
this.PlayerId = data.PlayerId;
this.Level = LevelUpGiftService.DisplayLevel(data.Level);
this.XP = LevelUpGiftService.XpIntoCurrentLevel(data);
}
}
}
+20
View File
@@ -0,0 +1,20 @@
namespace RadicadeServer.RecNet.Responses
{
public class Success
{
internal static readonly Success Ok = new Success(true, null, null);
internal static Success Error(string why) => new Success(false, why, null);
public bool success { get; set; }
public string error { get; set; } = string.Empty;
public object? value { get; set; }
public Success(bool success, string? error, object? value) {
this.success = success;
this.error = error ?? string.Empty;
this.value = value;
}
}
}
+15
View File
@@ -0,0 +1,15 @@
using RadicadeServer.RecNet.Enums;
namespace RadicadeServer.RecNet.Responses
{
public class TagResponse
{
public int Results { get { return Tags.Count; } }
public List<ItemTag> Tags { get; set; } = null!;
}
public class InventionTagResponse
{
public InventionTagResult Result { get; set; }
public List<string> Tags { get; set; } = new();
}
}