From 4f1cdde9b2f825bb737c0a1e0cf3dcabe677eb11 Mon Sep 17 00:00:00 2001
From: Toastie <toastie@toastiet0ast.com>
Date: Tue, 11 Feb 2025 13:59:12 +1300
Subject: [PATCH] fixed build, fixed dockerfile not building properly

---
 Dockerfile                                    |  9 ++-
 .../Modules/Games/Fish/Db/UserFishStats.cs    | 23 +++---
 src/EllieBot/Modules/Games/Fish/FishConfig.cs | 73 +++++++++----------
 3 files changed, 52 insertions(+), 53 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index eb546e8..d092145 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,9 +8,10 @@ COPY src/EllieBot/*.csproj src/EllieBot/
 COPY src/EllieBot.Coordinator/*.csproj src/EllieBot.Coordinator/
 COPY src/EllieBot.Generators/*.csproj src/EllieBot.Generators/
 COPY src/EllieBot.Voice/*.csproj src/EllieBot.Voice/
+COPY src/EllieBot.GrpcApiBase/*.csproj src/EllieBot.GrpcApiBase/
 
 # Restore the dependencies for the EllieBot project
-RUN dotnet restore src/EllieBot/
+RUN dotnet restore src/EllieBot/ -r linux-x64
 
 # Copy the rest of the source code
 COPY . .
@@ -19,7 +20,6 @@ COPY . .
 WORKDIR /source/src/EllieBot
 
 # Build and publish the EllieBot project, then clean up unnecessary files
-RUN dotnet restore
 RUN dotnet publish -c Release -o /app --self-contained -r linux-x64 --no-restore; \
     mv /app/data /app/data_init; \
     chmod +x /app/EllieBot
@@ -30,10 +30,11 @@ WORKDIR /app
 
 # Create a new user, install dependencies, and set up sudoers file
 RUN apt update; \
-    apt install -y curl ffmpeg python3; \
+    apt install -y --no-install-recommends curl ffmpeg python3; \
     curl -Lo /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp; \
     chmod a+rx /usr/local/bin/yt-dlp; \
-    apt autoremove -y;
+    apt autoremove -y; \
+    apt clean -y;
 
 # Copy the built application and the entrypoint script from the build stage
 COPY --from=build /app ./
diff --git a/src/EllieBot/Modules/Games/Fish/Db/UserFishStats.cs b/src/EllieBot/Modules/Games/Fish/Db/UserFishStats.cs
index caf3af8..db90125 100644
--- a/src/EllieBot/Modules/Games/Fish/Db/UserFishStats.cs
+++ b/src/EllieBot/Modules/Games/Fish/Db/UserFishStats.cs
@@ -1,6 +1,6 @@
 using System.ComponentModel.DataAnnotations;
 
-namespace EllieBot.Modules.Games;
+namespace NadekoBot.Modules.Games;
 
 public sealed class UserFishStats
 {
@@ -14,16 +14,15 @@ public sealed class UserFishStats
     public int? Bait { get; set; }
 }
 
-public sealed class FishingPole
-{
-    [Key]
-    public int Id { get; set; }
+// public sealed class FishingPole
+// {
+    // [Key]
+    // public int Id { get; set; }
+    
+    // public string Name { get; set; } = string.Empty;
+    
+    // public long Price { get; set; }
 
-    public string Name { get; set; } = string.Empty;
+    // public string Emoji { get; set; } = string.Empty;
 
-    public long Price { get; set; }
-
-    public string Emoji { get; set; } = string.Empty;
-
-
-}
\ No newline at end of file
+// }
\ No newline at end of file
diff --git a/src/EllieBot/Modules/Games/Fish/FishConfig.cs b/src/EllieBot/Modules/Games/Fish/FishConfig.cs
index 05bb381..d2ec929 100644
--- a/src/EllieBot/Modules/Games/Fish/FishConfig.cs
+++ b/src/EllieBot/Modules/Games/Fish/FishConfig.cs
@@ -13,44 +13,43 @@ public sealed partial class FishConfig : ICloneable<FishConfig>
     public List<string> StarEmojis { get; set; } = new();
     public List<string> SpotEmojis { get; set; } = new();
     public FishChance Chance { get; set; } = new FishChance();
-
-    public List<FishBait> Baits { get; set; } = new();
-    public List<FishingPole> Poles { get; set; } = new();
+    // public List<FishBait> Baits { get; set; } = new();
+    // public List<FishingPole> Poles { get; set; } = new();
     public List<FishData> Fish { get; set; } = new();
     public List<FishData> Trash { get; set; } = new();
 }
 
-public sealed class FishBait : ICloneable<FishBait>
-{
-    public int Id { get; set; }
-    public string Name { get; set; } = string.Empty;
-    public long Price { get; set; }
-    public string Emoji { get; set; } = string.Empty;
-    public int StackSize { get; set; } = 100;
-
-    public string? OnlyWeather { get; set; }
-    public string? OnlySpot { get; set; }
-    public string? OnlyTime { get; set; }
-
-    public double FishMulti { get; set; } = 1;
-    public double TrashMulti { get; set; } = 1;
-    public double NothingMulti { get; set; } = 1;
-
-    public double RareFishMulti { get; set; } = 1;
-    public double RareTrashMulti { get; set; } = 1;
-
-    public double MaxStarMulti { get; set; } = 1;
-}
-
-public sealed class FishingPole : ICloneable<FishingPole>
-{
-    public int Id { get; set; }
-    public string Name { get; set; } = string.Empty;
-    public long Price { get; set; }
-    public string Emoji { get; set; } = string.Empty;
-    public string Img { get; set; } = string.Empty;
-
-    public double FishMulti { get; set; } = 1;
-    public double TrashMulti { get; set; } = 1;
-    public double NothingMulti { get; set; } = 1;
-}
+// public sealed class FishBait : ICloneable<FishBait>
+// {
+//     public int Id { get; set; }
+//     public string Name { get; set; } = string.Empty;
+//     public long Price { get; set; }
+//     public string Emoji { get; set; } = string.Empty;
+//     public int StackSize { get; set; } = 100;
+//
+//     public string? OnlyWeather { get; set; }
+//     public string? OnlySpot { get; set; }
+//     public string? OnlyTime { get; set; }
+//
+//     public double FishMulti { get; set; } = 1;
+//     public double TrashMulti { get; set; } = 1;
+//     public double NothingMulti { get; set; } = 1;
+//
+//     public double RareFishMulti { get; set; } = 1;
+//     public double RareTrashMulti { get; set; } = 1;
+//     
+//     public double MaxStarMulti { get; set; } = 1;
+// }
+//
+// public sealed class FishingPole : ICloneable<FishingPole>
+// {
+//     public int Id { get; set; }
+//     public string Name { get; set; } = string.Empty;
+//     public long Price { get; set; }
+//     public string Emoji { get; set; } = string.Empty;
+//     public string Img { get; set; } = string.Empty;
+//
+//     public double FishMulti { get; set; } = 1;
+//     public double TrashMulti { get; set; } = 1;
+//     public double NothingMulti { get; set; } = 1;
+// }
\ No newline at end of file