Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复: CaiBot 查看地图命令小、中世界的图片尺寸偏大的问题 #523

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/CaiBot/MapGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// 来自:https://github.com/UnrealMultiple/MorMor/blob/master/MorMor/TShock/Map/

using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using System.IO.Compression;
using Terraria;
using Terraria.ID;
using Terraria.IO;
using Terraria.Map;
using Color = Microsoft.Xna.Framework.Color;
using Image = SixLabors.ImageSharp.Image;

namespace CaiBot;
Expand All @@ -16,9 +13,9 @@ public static class MapGenerator
{
public static Image Create()
{
Image<Rgba32> image = new(Main.tile.Width, Main.tile.Height);
Image<Rgba32> image = new(Main.maxTilesX, Main.maxTilesY);
MapHelper.Initialize();
Main.Map = new(Main.tile.Width, Main.tile.Height);
Main.Map = new(Main.maxTilesX, Main.maxTilesY);
for (var x = 0; x < Main.maxTilesX; x++)
{
for (var y = 0; y < Main.maxTilesY; y++)
Expand Down
2 changes: 1 addition & 1 deletion src/CaiBot/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Plugin : TerrariaPlugin
public override string Author => "Cai,羽学,西江";
public override string Description => "CaiBot机器人的适配插件";
public override string Name => "CaiBotPlugin";
public static readonly Version VersionNum = new(2024, 10, 19 , 1); //日期+版本号(0,1,2...)
public static readonly Version VersionNum = new(2024, 10, 20 , 1); //日期+版本号(0,1,2...)
public override Version Version => VersionNum;

public Plugin(Main game) : base(game)
Expand Down
1 change: 1 addition & 0 deletions src/CaiBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## 更新日志

```
v2024.10.20.1 修复`查看地图`命令小、中世界的图片尺寸偏大的问题
v2024.10.19.1 重写白名单登录,修复卡死WebSocket的问题
v2024.10.12.3 修复卡号Bug
v2024.10.12.1 修改白名单查询机制
Expand Down
Loading