mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	added slots.currencyFontColor to gambling.yml
This commit is contained in:
		@@ -3,6 +3,7 @@ using System.Collections.Generic;
 | 
			
		||||
using Cloneable;
 | 
			
		||||
using NadekoBot.Common;
 | 
			
		||||
using NadekoBot.Common.Yml;
 | 
			
		||||
using SixLabors.ImageSharp.PixelFormats;
 | 
			
		||||
using YamlDotNet.Serialization;
 | 
			
		||||
 | 
			
		||||
namespace NadekoBot.Modules.Gambling.Common
 | 
			
		||||
@@ -20,6 +21,7 @@ namespace NadekoBot.Modules.Gambling.Common
 | 
			
		||||
            Generation = new GenerationConfig();
 | 
			
		||||
            Timely = new TimelyConfig();
 | 
			
		||||
            Decay = new DecayConfig();
 | 
			
		||||
            Slots = new SlotsConfig();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [Comment(@"DO NOT CHANGE")]
 | 
			
		||||
@@ -64,6 +66,9 @@ Set 0 for unlimited")]
 | 
			
		||||
        [Comment(@"Currency reward per vote.
 | 
			
		||||
This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting")]
 | 
			
		||||
        public long VoteReward { get; set; } = 100;
 | 
			
		||||
        
 | 
			
		||||
        [Comment(@"Slot config")]
 | 
			
		||||
        public SlotsConfig Slots { get; set; }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class CurrencyConfig
 | 
			
		||||
@@ -273,6 +278,12 @@ Example: If a waifu is worth 1000, and she receives a negative gift worth 100, h
 | 
			
		||||
        public decimal NegativeGiftEffect { get; set; } = 0.50M;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public sealed partial class SlotsConfig
 | 
			
		||||
    {
 | 
			
		||||
        [Comment(@"Hex value of the color which the numbers on the slot image will have.")]
 | 
			
		||||
        public Rgba32 CurrencyFontColor { get; set; } = SixLabors.ImageSharp.Color.Red;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    [Cloneable]
 | 
			
		||||
    public sealed partial class WaifuItemModel
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -72,6 +72,14 @@ namespace NadekoBot.Modules.Gambling.Services
 | 
			
		||||
                    c.VoteReward = 100;
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (_data.Version < 4)
 | 
			
		||||
            {
 | 
			
		||||
                ModifyConfig(c =>
 | 
			
		||||
                {
 | 
			
		||||
                    c.Version = 4;
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -19,6 +19,7 @@ using SixLabors.ImageSharp.Processing;
 | 
			
		||||
using SixLabors.ImageSharp;
 | 
			
		||||
using SixLabors.ImageSharp.Drawing.Processing;
 | 
			
		||||
using SixLabors.ImageSharp.PixelFormats;
 | 
			
		||||
using Color = SixLabors.ImageSharp.Color;
 | 
			
		||||
 | 
			
		||||
namespace NadekoBot.Modules.Gambling
 | 
			
		||||
{
 | 
			
		||||
@@ -186,6 +187,8 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                       var numbers = new int[3];
 | 
			
		||||
                       result.Rolls.CopyTo(numbers, 0);
 | 
			
		||||
 | 
			
		||||
                       Color fontColor = _config.Slots.CurrencyFontColor;
 | 
			
		||||
                       
 | 
			
		||||
                       bgImage.Mutate(x => x.DrawText(new TextGraphicsOptions
 | 
			
		||||
                           {
 | 
			
		||||
                               TextOptions = new TextOptions()
 | 
			
		||||
@@ -194,9 +197,11 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                                   VerticalAlignment = VerticalAlignment.Center,
 | 
			
		||||
                                   WrapTextWidth = 140,
 | 
			
		||||
                               }
 | 
			
		||||
                           }, result.Won.ToString(), _fonts.DottyFont.CreateFont(65), SixLabors.ImageSharp.Color.Red,
 | 
			
		||||
                           }, result.Won.ToString(), _fonts.DottyFont.CreateFont(65), fontColor,
 | 
			
		||||
                           new PointF(227, 92)));
 | 
			
		||||
 | 
			
		||||
                       var bottomFont = _fonts.DottyFont.CreateFont(50);
 | 
			
		||||
                       
 | 
			
		||||
                       bgImage.Mutate(x => x.DrawText(new TextGraphicsOptions
 | 
			
		||||
                           {
 | 
			
		||||
                               TextOptions = new TextOptions()
 | 
			
		||||
@@ -205,7 +210,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                                   VerticalAlignment = VerticalAlignment.Center,
 | 
			
		||||
                                   WrapTextWidth = 135,
 | 
			
		||||
                               }
 | 
			
		||||
                           }, amount.ToString(), _fonts.DottyFont.CreateFont(50), SixLabors.ImageSharp.Color.Red,
 | 
			
		||||
                           }, amount.ToString(), bottomFont, fontColor,
 | 
			
		||||
                           new PointF(129, 472)));
 | 
			
		||||
 | 
			
		||||
                       bgImage.Mutate(x => x.DrawText(new TextGraphicsOptions
 | 
			
		||||
@@ -216,7 +221,7 @@ namespace NadekoBot.Modules.Gambling
 | 
			
		||||
                                   VerticalAlignment = VerticalAlignment.Center,
 | 
			
		||||
                                   WrapTextWidth = 135,
 | 
			
		||||
                               }
 | 
			
		||||
                           }, ownedAmount.ToString(), _fonts.DottyFont.CreateFont(50), SixLabors.ImageSharp.Color.Red,
 | 
			
		||||
                           }, ownedAmount.ToString(), bottomFont, fontColor,
 | 
			
		||||
                           new PointF(325, 472)));
 | 
			
		||||
                       //sw.PrintLap("drew red text");
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# DO NOT CHANGE
 | 
			
		||||
version: 3
 | 
			
		||||
version: 4
 | 
			
		||||
# Currency settings
 | 
			
		||||
currency:
 | 
			
		||||
# What is the emoji/character which represents the currency
 | 
			
		||||
@@ -240,3 +240,7 @@ patreonCurrencyPerCent: 1
 | 
			
		||||
# Currency reward per vote.
 | 
			
		||||
# This will work only if you've set up VotesApi and correct credentials for topgg and/or discords voting
 | 
			
		||||
voteReward: 100
 | 
			
		||||
# Slot config
 | 
			
		||||
slots:
 | 
			
		||||
# Hex value of the color which the numbers on the slot image will have.
 | 
			
		||||
  currencyFontColor: ff0000
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user