Cleanup. Trivia can't be ran with less than 3 quesitons. (>t 3)

This commit is contained in:
Kwoth 2016-09-18 18:29:38 +02:00
parent bc7bc724ec
commit 957dcd7482
9 changed files with 12 additions and 25 deletions

View File

@ -33,8 +33,11 @@ namespace NadekoBot.Modules.Games.Commands
int num;
return new Tuple<bool, int>(int.TryParse(s, out num), num);
}).Where(t => t.Item1).Select(t => t.Item2).FirstOrDefault();
if (number < 0)
if (number < 3)
{
await e.Channel.SendMessage("Number too small.");
return;
}
var triviaGame = new TriviaGame(e, showHints, number == 0 ? 10 : number);
if (RunningTrivias.TryAdd(e.Server.Id, triviaGame))
await e.Channel.SendMessage($"**Trivia game started! {triviaGame.WinRequirement} points needed to win.**").ConfigureAwait(false);

View File

@ -204,7 +204,7 @@ namespace NadekoBot
return;
}
#if NADEKO_RELEASE
await Task.Delay(220000).ConfigureAwait(false);
await Task.Delay(300000).ConfigureAwait(false);
#else
await Task.Delay(1000).ConfigureAwait(false);
#endif

View File

@ -204,6 +204,11 @@
<Compile Include="Modules\Searches\Commands\OsuCommands.cs" />
<Compile Include="Modules\Searches\Commands\PokemonSearchCommands.cs" />
<Compile Include="Modules\Utility\UtilityModule.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="SQLite.cs" />
<Compile Include="_Models\DataModels\TestDataModel.cs" />
<Compile Include="_Models\DataModels\Incident.cs" />
@ -294,11 +299,6 @@
<Compile Include="Modules\Trello\TrelloModule.cs" />
<Compile Include="NadekoBot.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Classes\NadekoStats.cs" />
</ItemGroup>
<ItemGroup>
@ -324,13 +324,10 @@
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="resources\images\hidden.png" />
</ItemGroup>
<ItemGroup>
<None Include="resources\images\rip.png" />
</ItemGroup>

View File

@ -580,16 +580,6 @@ namespace NadekoBot.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap hidden {
get {
object obj = ResourceManager.GetObject("hidden", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -136,9 +136,6 @@
<data name="heads" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\images\coins\heads.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="hidden" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\images\hidden.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="jack_of_clubs" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\images\cards\jack_of_clubs.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB