mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-15 08:01:53 +00:00
MainForm - Remove check for clock and compass texture
This commit is contained in:
@@ -251,14 +251,15 @@ namespace PckStudio.Forms.Editor
|
||||
public AnimationEditor(PCKFile.FileData file)
|
||||
{
|
||||
InitializeComponent();
|
||||
isItem = file.filepath.Split('/').Contains("items");
|
||||
|
||||
isItem = file.filepath.Split('/').Contains("items");
|
||||
TileName = Path.GetFileNameWithoutExtension(file.filepath);
|
||||
animationFile = file;
|
||||
|
||||
using MemoryStream textureMem = new MemoryStream(animationFile.data);
|
||||
var texture = new Bitmap(textureMem);
|
||||
currentAnimation = animationFile.properties.HasProperty("ANIM")
|
||||
? new Animation(texture, animationFile.properties.GetProperty("ANIM").Item2)
|
||||
? new Animation(texture, animationFile.properties.GetPropertyValue("ANIM"))
|
||||
: new Animation(texture);
|
||||
player = new AnimationPlayer(pictureBoxWithInterpolationMode1);
|
||||
|
||||
@@ -281,7 +282,7 @@ namespace PckStudio.Forms.Editor
|
||||
// $"Frame: {i}, Frame Time: {Animation.MinimumFrameTime}"
|
||||
TextureIcons.Images.Clear();
|
||||
TextureIcons.Images.AddRange(currentAnimation.GetFrameTextures().ToArray());
|
||||
currentAnimation.GetFrames().ForEach(f => frameTreeView.Nodes.Add("", $"for {f.Ticks} frame" + (f.Ticks > 1 ? "s" : "" ), currentAnimation.GetFrameIndex(f.Texture), currentAnimation.GetFrameIndex(f.Texture)));
|
||||
currentAnimation.GetFrames().ForEach(f => frameTreeView.Nodes.Add("", $"for {f.Ticks} frames", currentAnimation.GetFrameIndex(f.Texture), currentAnimation.GetFrameIndex(f.Texture)));
|
||||
player.SelectFrame(currentAnimation, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -340,9 +340,7 @@ namespace PckStudio
|
||||
|
||||
private void HandleTextureFile(PCKFile.FileData file)
|
||||
{
|
||||
if (file.filepath.StartsWith("res/textures/blocks/") || file.filepath.StartsWith("res/textures/items/") &&
|
||||
!file.filepath.EndsWith("clock.png") && !file.filepath.EndsWith("compass.png"))
|
||||
{
|
||||
|
||||
if (IsFilePathMipMapped(file.filepath) &&
|
||||
currentPCK.Files.Find(pckfile =>
|
||||
// todo write cleaner ?
|
||||
@@ -353,6 +351,7 @@ namespace PckStudio
|
||||
{
|
||||
file = originalAnimationFile;
|
||||
}
|
||||
|
||||
using (AnimationEditor animationEditor = new AnimationEditor(file))
|
||||
{
|
||||
if (animationEditor.ShowDialog(this) == DialogResult.OK)
|
||||
@@ -362,7 +361,6 @@ namespace PckStudio
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleGameRuleFile(PCKFile.FileData file)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user