mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
change: sar rework, improved
This commit is contained in:
@@ -6,9 +6,9 @@ namespace NadekoBot.Modules.Gambling.Common.AnimalRacing;
|
||||
|
||||
public sealed class AnimalRace : IDisposable
|
||||
{
|
||||
public const double BASE_MULTIPLIER = 0.82;
|
||||
public const double BASE_MULTIPLIER = 0.87;
|
||||
public const double MAX_MULTIPLIER = 0.94;
|
||||
public const double MULTI_PER_USER = 0.01;
|
||||
public const double MULTI_PER_USER = 0.005;
|
||||
|
||||
public enum Phase
|
||||
{
|
||||
|
@@ -154,16 +154,16 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
{
|
||||
var password = _service.GeneratePassword();
|
||||
|
||||
var img = new Image<Rgba32>(70, 35);
|
||||
var img = new Image<Rgba32>(60, 30);
|
||||
|
||||
var font = _fonts.NotoSans.CreateFont(30);
|
||||
var font = _fonts.NotoSans.CreateFont(25);
|
||||
var outlinePen = new SolidPen(Color.Black, 1f);
|
||||
var strikeoutRun = new RichTextRun
|
||||
{
|
||||
Start = 0,
|
||||
End = password.GetGraphemeCount(),
|
||||
Font = font,
|
||||
StrikeoutPen = new SolidPen(Color.White, 3),
|
||||
StrikeoutPen = new SolidPen(Color.White, 4),
|
||||
TextDecorations = TextDecorations.Strikeout
|
||||
};
|
||||
// draw password on the image
|
||||
|
92
src/NadekoBot/Modules/Gambling/Loan/LoanCommands.cs
Normal file
92
src/NadekoBot/Modules/Gambling/Loan/LoanCommands.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
// namespace NadekoBot.Modules.Gambling;
|
||||
// public sealed class Loan
|
||||
// {
|
||||
// public int Id { get; set; }
|
||||
// public ulong LenderId { get; set; }
|
||||
// public string LenderName { get; set; }
|
||||
// public ulong BorrowerId { get; set; }
|
||||
// public string BorrowerName { get; set; }
|
||||
// public long Amount { get; set; }
|
||||
// public decimal Interest { get; set; }
|
||||
// public DateTime DueDate { get; set; }
|
||||
// public bool Repaid { get; set; }
|
||||
// }
|
||||
//
|
||||
// public sealed class LoanService : INService
|
||||
// {
|
||||
// public async Task<IReadOnlyList<Loan>> GetLoans(ulong userId)
|
||||
// {
|
||||
// }
|
||||
//
|
||||
// public async Task<object> RepayAsync(object loandId)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public partial class Gambling
|
||||
// {
|
||||
// public partial class LoanCommands : NadekoModule<LoanService>
|
||||
// {
|
||||
// [Cmd]
|
||||
// public async Task Loan(
|
||||
// IUser lender,
|
||||
// long amount,
|
||||
// decimal interest = 0,
|
||||
// TimeSpan dueIn = default)
|
||||
// {
|
||||
// var eb = _sender.CreateEmbed()
|
||||
// .WithOkColor()
|
||||
// .WithDescription("User 0 Requests a loan from User {1}")
|
||||
// .AddField("Amount", amount, true)
|
||||
// .AddField("Interest", (interest * 0.01m).ToString("P2"), true);
|
||||
// }
|
||||
//
|
||||
// public Task Loans()
|
||||
// => Loans(ctx.User);
|
||||
//
|
||||
// public async Task Loans([Leftover] IUser user)
|
||||
// {
|
||||
// var loans = await _service.GetLoans(user.Id);
|
||||
//
|
||||
// Response()
|
||||
// .Paginated()
|
||||
// .PageItems(loans)
|
||||
// .Page((items, page) =>
|
||||
// {
|
||||
// var eb = _sender.CreateEmbed()
|
||||
// .WithOkColor()
|
||||
// .WithDescription("Current Loans");
|
||||
//
|
||||
// foreach (var item in items)
|
||||
// {
|
||||
// eb.AddField(new kwum(item.id).ToString(),
|
||||
// $"""
|
||||
// To: {item.LenderName}
|
||||
// Amount: {}
|
||||
// """,
|
||||
// true);
|
||||
// }
|
||||
//
|
||||
// return eb;
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// [Cmd]
|
||||
// public async Task Repay(kwum loanId)
|
||||
// {
|
||||
// var res = await _service.RepayAsync(loandId);
|
||||
//
|
||||
// if (res.TryPickT0(out var _, out var err))
|
||||
// {
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var errStr = err.Match(
|
||||
// _ => "Not enough funds",
|
||||
// _ => "Loan not found");
|
||||
//
|
||||
// await Response().Error(errStr).SendAsync();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
Reference in New Issue
Block a user