Skip to content

Commit

Permalink
不超模玩家专属标志
Browse files Browse the repository at this point in the history
  • Loading branch information
LorisYounger committed Aug 25, 2023
1 parent 9bd505a commit e1bfd98
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 12 deletions.
4 changes: 2 additions & 2 deletions VPet-Simulator.Core/Display/ToolBar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<Border x:Name="BdrPanel" Margin="0,0,0,55" VerticalAlignment="Bottom" x:FieldModifier="public"
Background="{DynamicResource DARKPrimaryText}" BorderBrush="{DynamicResource DARKPrimaryDarker}"
BorderThickness="1" CornerRadius="5" MouseLeave="MenuPanel_MouseLeave" TextBlock.FontSize="24"
TextElement.FontSize="24" Visibility="Collapsed">
<Grid Margin="15">
TextElement.FontSize="24" >
<Grid Margin="15" x:Name="gdPanel" x:FieldModifier="public">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="5" />
Expand Down
7 changes: 5 additions & 2 deletions VPet-Simulator.Windows.Interface/IMainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ public interface IMainWindow
/// 关闭指示器,默认为true
/// </summary>
bool CloseConfirm { get; }


/// <summary>
/// 关闭该玩家的HashCheck检查
/// 如果你的mod属于作弊mod/有作弊内容,请在作弊前调用这个方法
/// </summary>
void HashCheckOff();
}

}
45 changes: 43 additions & 2 deletions VPet-Simulator.Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
using System.Timers;
using System.Web;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using VPet_Simulator.Core;
using VPet_Simulator.Windows.Interface;
using static VPet_Simulator.Core.GraphHelper;
Expand Down Expand Up @@ -46,7 +48,7 @@ public partial class MainWindow : IMainWindow
/// <summary>
/// 版本号
/// </summary>
public int version { get; } = 101;
public int version { get; } = 102;
/// <summary>
/// 版本号
/// </summary>
Expand Down Expand Up @@ -98,10 +100,47 @@ public ClickText GetClickText()
return null;
return list[Function.Rnd.Next(list.Count)];
}
private Image hashcheckimg;
public void HashCheckOff()
{
HashCheck = false;
}
/// <summary>
/// 存档 Hash检查 是否通过
/// </summary>
public bool HashCheck { get; set; } = true;
public bool HashCheck
{
get => hashCheck;
set
{
hashCheck = value;
Main?.Dispatcher.Invoke(() =>
{
if (hashCheck)
{
if (hashcheckimg == null)
{
hashcheckimg = new Image();
hashcheckimg.Source = new BitmapImage(new Uri("pack://application:,,,/Res/hash.png"));
hashcheckimg.HorizontalAlignment = HorizontalAlignment.Right;
hashcheckimg.ToolTip = "是没有修改过存档/使用超模MOD的玩家专属标志".Translate();
Grid.SetColumn(hashcheckimg, 4);
Grid.SetRowSpan(hashcheckimg, 2);
Main.ToolBar.gdPanel.Children.Add(hashcheckimg);
}
}
else
{
if (hashcheckimg != null)
{
Main.ToolBar.gdPanel.Children.Remove(hashcheckimg);
hashcheckimg = null;
}
}
});

}
}
public void SetZoomLevel(double zl)
{
Set.ZoomLevel = zl;
Expand Down Expand Up @@ -703,6 +742,8 @@ private void MusicTimer_Elapsed(object sender, ElapsedEventArgs e)
public bool? CurrMusicType { get; private set; }

int LastDiagnosisTime = 0;
private bool hashCheck = true;

/// <summary>
/// 上传遥测文件
/// </summary>
Expand Down
2 changes: 2 additions & 0 deletions VPet-Simulator.Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ await Dispatcher.InvokeAsync(new Action(() =>
Main.Event_TouchHead += Main_Event_TouchHead;
Main.Event_TouchBody += Main_Event_TouchBody;

HashCheck = hashCheck;

if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + @"\Tutorial.html") && Set["SingleTips"].GetDateTime("tutorial") <= new DateTime(2023, 6, 20))
{
Set["SingleTips"].SetDateTime("tutorial", DateTime.Now);
Expand Down
Binary file added VPet-Simulator.Windows/Res/hash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions VPet-Simulator.Windows/VPet-Simulator.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -323,5 +323,8 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="Res\hash.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
6 changes: 3 additions & 3 deletions VPet-Simulator.Windows/WinDesign/winGameSetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ public winGameSetting(MainWindow mw)
SliderResolution.Value = mw.Set.Resolution;

#if X64
GameVerison.Content = "游戏版本".Translate() + $"v{mw.version} x64";
GameVerison.Content = "游戏版本".Translate() + $"v{mw.Version} x64";
#else
GameVerison.Content = "游戏版本".Translate() + $"v{mw.version} x86";
GameVerison.Content = "游戏版本".Translate() + $"v{mw.Version} x86";
#endif
//关于ui
if (mw.IsSteamUser)
Expand Down Expand Up @@ -182,7 +182,7 @@ public winGameSetting(MainWindow mw)
BtnCGPTReSet.Content = "聊天框已关闭".Translate();
break;
}
runabVer.Text = $"v{mw.version} ({mw.version})";
runabVer.Text = $"v{mw.Version} ({mw.version})";

//mod列表
ShowModList();
Expand Down
3 changes: 2 additions & 1 deletion VPet-Simulator.Windows/mod/0000_core/lang/en/Prog2308.lps
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}#The current food/item attribute supermodel, whether to continue to use?\nUsing supermodel food may cause the game to have unexpected errors\nUsing supermodel food does not affect most of the achievements to unlock\nThe recommended price for this item is {0:f0}:|
超模食物/物品使用提醒#Supermodel food/item use reminder:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2}\n推荐比率<1.5#The current work data attribute supermodel, whether to continue to work?\nSupermodel work may cause the game to have unexpected errors\nSupermodel work does not affect most of the achievements to unlock\nCurrent data ratio {0:f2}\nRecommended ratio <1.5:|
超模工作提醒#Supermodel work reminder:|
超模工作提醒#Supermodel work reminder:|
是没有修改过存档/使用超模MOD的玩家专属标志#Is there no modified archive/supermodel MOD player exclusive logo:|
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}#当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}:|
超模食物/物品使用提醒#超模食物/物品使用提醒:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2}\n推荐比率<1.5#当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2}\n推荐比率<1.5:|
超模工作提醒#超模工作提醒:|
超模工作提醒#超模工作提醒:|
是没有修改过存档/使用超模MOD的玩家专属标志#是没有修改过存档/使用超模MOD的玩家专属标志:|
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
当前食物/物品属性超模,是否继续使用?\n使用超模食物可能会导致游戏发生不可预料的错误\n使用超模食物不影响大部分成就解锁\n本物品推荐价格为{0:f0}#當前食物/物品屬性超模,是否繼續使用?\n使用超模食物可能會導致遊戲發生不可預料的錯誤\n使用超模食物不影響大部分成就解鎖\n本物品推薦價格為{0:f0}:|
超模食物/物品使用提醒#超模食物/物品使用提醒:|
当前工作数据属性超模,是否继续工作?\n超模工作可能会导致游戏发生不可预料的错误\n超模工作不影响大部分成就解锁\n当前数据比率 {0:f2}\n推荐比率<1.5#當前工作數據屬性超模,是否繼續工作?\n超模工作可能會導致遊戲發生不可預料的錯誤\n超模工作不影響大部分成就解鎖\n當前數據比率 {0:f2}\n推薦比率<1.5:|
超模工作提醒#超模工作提醒:|
超模工作提醒#超模工作提醒:|
是没有修改过存档/使用超模MOD的玩家专属标志#是沒有修改過存檔/使用超模MOD的玩家專屬標誌:|

0 comments on commit e1bfd98

Please sign in to comment.