mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-23 05:31:29 +00:00
Clean up warnings/hints in solution
This commit is contained in:
parent
5fcd8a00a6
commit
6c97a0cd39
7 changed files with 21 additions and 6 deletions
|
@ -1,8 +1,13 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=Method/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Braaains/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ezoiar/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=farc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=lbpme/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=lolcatftw/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Swingy/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=thumbsup/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unpublish/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=yourthumb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
|
@ -1,3 +1,4 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ProjectLighthouse.Types;
|
||||
|
||||
|
@ -7,6 +8,7 @@ namespace ProjectLighthouse.Controllers {
|
|||
[Produces("text/plain")]
|
||||
public class ClientConfigurationController : ControllerBase {
|
||||
[HttpGet("network_settings.nws")]
|
||||
[SuppressMessage("ReSharper", "StringLiteralTypo")]
|
||||
public IActionResult NetworkSettings() {
|
||||
return this.Ok("ProbabilityOfPacketDelay 0.0\nMinPacketDelayFrames 0\nMaxPacketDelayFrames 3\nProbabilityOfPacketDrop 0.0\nEnableFakeConditionsForLoopback true\nNumberOfFramesPredictionAllowedForNonLocalPlayer 1000\nEnablePrediction true\nMinPredictedFrames 0\nMaxPredictedFrames 10\nAllowGameRendCameraSplit true\nFramesBeforeAgressiveCatchup 30\nPredictionPadSides 200\nPredictionPadTop 200\nPredictionPadBottom 200\nShowErrorNumbers true\nAllowModeratedLevels true\nAllowModeratedPoppetItems true\nShowLevelBoos true\nTIMEOUT_WAIT_FOR_JOIN_RESPONSE_FROM_PREV_PARTY_HOST 50.0\nTIMEOUT_WAIT_FOR_CHANGE_LEVEL_PARTY_HOST 30.0\nTIMEOUT_WAIT_FOR_CHANGE_LEVEL_PARTY_MEMBER 45.0\nTIMEOUT_WAIT_FOR_REQUEST_JOIN_FRIEND 15.0\nTIMEOUT_WAIT_FOR_CONNECTION_FROM_HOST 30.0\nTIMEOUT_WAIT_FOR_ROOM_ID_TO_JOIN 60.0\nTIMEOUT_WAIT_FOR_GET_NUM_PLAYERS_ONLINE 60.0\nTIMEOUT_WAIT_FOR_SIGNALLING_CONNECTIONS 120.0\nTIMEOUT_WAIT_FOR_PARTY_DATA 60.0\nTIME_TO_WAIT_FOR_LEAVE_MESSAGE_TO_COME_BACK 20.0\nTIME_TO_WAIT_FOR_FOLLOWING_REQUESTS_TO_ARRIVE 30.0\nTIMEOUT_WAIT_FOR_FINISHED_MIGRATING_HOST 30.0\nTIMEOUT_WAIT_FOR_PARTY_LEADER_FINISH_JOINING 45.0\nTIMEOUT_WAIT_FOR_QUICKPLAY_LEVEL 60.0\nTIMEOUT_WAIT_FOR_PLAYERS_TO_JOIN 30.0\nTIMEOUT_WAIT_FOR_DIVE_IN_PLAYERS 120.0\nTIMEOUT_WAIT_FOR_FIND_BEST_ROOM 30.0\nTIMEOUT_DIVE_IN_TOTAL 1000000.0\nTIMEOUT_WAIT_FOR_SOCKET_CONNECTION 120.0\nTIMEOUT_WAIT_FOR_REQUEST_RESOURCE_MESSAGE 120.0\nTIMEOUT_WAIT_FOR_LOCAL_CLIENT_TO_GET_RESOURCE_LIST 120.0\nTIMEOUT_WAIT_FOR_CLIENT_TO_LOAD_RESOURCES 120.0\nTIMEOUT_WAIT_FOR_LOCAL_CLIENT_TO_SAVE_GAME_STATE 30.0\nTIMEOUT_WAIT_FOR_ADD_PLAYERS_TO_TAKE 30.0\nTIMEOUT_WAIT_FOR_UPDATE_FROM_CLIENT 90.0\nTIMEOUT_WAIT_FOR_HOST_TO_GET_RESOURCE_LIST 60.0\nTIMEOUT_WAIT_FOR_HOST_TO_SAVE_GAME_STATE 60.0\nTIMEOUT_WAIT_FOR_HOST_TO_ADD_US 30.0\nTIMEOUT_WAIT_FOR_UPDATE 60.0\nTIMEOUT_WAIT_FOR_REQUEST_JOIN 50.0\nTIMEOUT_WAIT_FOR_AUTOJOIN_PRESENCE 60.0\nTIMEOUT_WAIT_FOR_AUTOJOIN_CONNECTION 120.0\nSECONDS_BETWEEN_PINS_AWARDED_UPLOADS 300.0\nEnableKeepAlive true\nAllowVoIPRecordingPlayback true\nCDNHostName localhost\nTelemetryServer localhost\nOverheatingThresholdDisallowMidgameJoin 0.95\nMaxCatchupFrames 3\nMaxLagBeforeShowLoading 23\nMinLagBeforeHideLoading 30\nLagImprovementInflectionPoint -1.0\nFlickerThreshold 2.0\nClosedDemo2014Version 1\nClosedDemo2014Expired false\nEnablePlayedFilter true\nEnableCommunityDecorations true\nGameStateUpdateRate 10.0\nGameStateUpdateRateWithConsumers 1.0\nDisableDLCPublishCheck false\nEnableDiveIn true\nEnableHackChecks false");
|
||||
}
|
||||
|
|
|
@ -35,12 +35,13 @@ namespace ProjectLighthouse.Controllers {
|
|||
User poster = await database.Users.FirstOrDefaultAsync(u => u.Username == "jvyden");
|
||||
User target = await database.Users.FirstOrDefaultAsync(u => u.Username == username);
|
||||
|
||||
if(comment == null) return this.BadRequest();
|
||||
|
||||
comment.PosterUserId = poster.UserId;
|
||||
comment.TargetUserId = target.UserId;
|
||||
|
||||
database.Comments.Add(comment);
|
||||
await database.SaveChangesAsync();
|
||||
|
||||
return this.Ok();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ namespace ProjectLighthouse.Controllers {
|
|||
using(XmlReader reader = XmlReader.Create(Request.Body, settings)) {
|
||||
List<string> path = new(); // you can think of this as a file path in the XML, like <updateUser> -> <location> -> <x>
|
||||
while(await reader.ReadAsync()) {
|
||||
// ReSharper disable once SwitchStatementMissingSomeEnumCasesNoDefault
|
||||
switch(reader.NodeType) {
|
||||
case XmlNodeType.Element:
|
||||
path.Add(reader.Name);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
|
||||
namespace ProjectLighthouse.Serialization {
|
||||
|
@ -6,6 +7,7 @@ namespace ProjectLighthouse.Serialization {
|
|||
/// LBP doesn't like the XML serializer by C# that much, and it cant be controlled that much (cant have two root elements),
|
||||
/// so I wrote my own crappy one.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
public static class LbpSerializer {
|
||||
public static string BlankElement(string key) => $"<{key}></{key}>";
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace ProjectLighthouse.Types {
|
||||
/// <summary>
|
||||
/// A series of tags that can be applied to a level
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||
public enum LevelTags {
|
||||
Brilliant,
|
||||
Beautiful,
|
||||
|
|
|
@ -37,13 +37,13 @@ namespace ProjectLighthouse.Types {
|
|||
|
||||
public int FavouriteSlotCount { get; set; }
|
||||
public int FavouriteUserCount { get; set; }
|
||||
public int lolcatftwCount { get; set; }
|
||||
public int LolCatFtwCount { get; set; }
|
||||
public string Pins { get; set; }
|
||||
public int StaffChallengeGoldCount { get; set; }
|
||||
public int StaffChallengeSilverCount { get; set; }
|
||||
public int StaffChallengeBronzeCount { get; set; }
|
||||
// [NotMapped]
|
||||
public ClientsConnected ClientsConnected = new();
|
||||
public readonly ClientsConnected ClientsConnected = new();
|
||||
|
||||
#region Slots
|
||||
|
||||
|
@ -57,7 +57,7 @@ namespace ProjectLighthouse.Types {
|
|||
/// </summary>
|
||||
public int FreeSlots => ServerSettings.EntitledSlots - this.UsedSlots;
|
||||
|
||||
private static string[] slotTypes = {
|
||||
private static readonly string[] slotTypes = {
|
||||
// "lbp1",
|
||||
"lbp2",
|
||||
"lbp3",
|
||||
|
@ -102,7 +102,7 @@ namespace ProjectLighthouse.Types {
|
|||
LbpSerializer.StringElement("location", this.Location.Serialize()) +
|
||||
LbpSerializer.StringElement("favouriteSlotCount", this.FavouriteSlotCount) +
|
||||
LbpSerializer.StringElement("favouriteUserCount", this.FavouriteUserCount) +
|
||||
LbpSerializer.StringElement("lolcatftwCount", this.lolcatftwCount) +
|
||||
LbpSerializer.StringElement("lolcatftwCount", this.LolCatFtwCount) +
|
||||
LbpSerializer.StringElement("pins", this.Pins) +
|
||||
LbpSerializer.StringElement("staffChallengeGoldCount", this.StaffChallengeGoldCount) +
|
||||
LbpSerializer.StringElement("staffChallengeSilverCount", this.StaffChallengeSilverCount) +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue