Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a4202ac
Remove test copy entries
Mamotromico Aug 20, 2025
cc7baa8
Move TestPath definition to end of code block
Mamotromico Aug 20, 2025
83608f4
Make GUI strings const
Mamotromico Aug 20, 2025
0ac25bf
apply private field naming scheme and prefer var isntead of type
Mamotromico Aug 20, 2025
3740b5e
Add direct Import function instead of copy for spr/act, formatting
Mamotromico Aug 20, 2025
ca2c650
Add throws instead of logs for faster performance and interruption
Mamotromico Aug 20, 2025
1405384
Rework ActImporter so that it can be used directly
Mamotromico Aug 20, 2025
a106799
Formatting changes and conventions
Mamotromico Aug 20, 2025
fcb9def
Code styling, simplify some checks and add throws instead of logs
Mamotromico Aug 20, 2025
f2b2faa
Null protection on parent access
Mamotromico Aug 20, 2025
9e2e8f2
Remove superfluous typing, replace logs with throws, readability
Mamotromico Aug 20, 2025
1ebcee4
Add initializers, remove redundant variables/keywords
Mamotromico Aug 20, 2025
6fe681c
Revert naming/typingscheme changes
Mamotromico Aug 21, 2025
8948e1a
Revert TextureImportHelper
Mamotromico Aug 21, 2025
c882eb2
Moved expected paths and translations to RagnarokDirectory
Mamotromico Aug 25, 2025
d3d16e5
Repurpose ActImporter to RoDataImportManager
Mamotromico Aug 25, 2025
1bed98b
Create a revamped import menu
Mamotromico Aug 25, 2025
581045f
Initial Implementation for native spr support
Mamotromico Aug 25, 2025
335954b
Update new classes
Mamotromico Aug 25, 2025
23cd032
RoSprite refactor
Mamotromico Sep 5, 2025
8dbe0e4
Revise Spr support
Mamotromico Oct 23, 2025
7eecef7
Further spr file support.
Mamotromico Oct 27, 2025
38fdc3b
Merge remote-tracking branch 'upstream/master' into import_revision
Mamotromico Oct 27, 2025
4314368
Fix new RagnarokDirectory imports
Mamotromico Oct 27, 2025
6c654b4
Add .spr file support
Mamotromico Oct 27, 2025
ff05ecf
Reordering things
Mamotromico Oct 27, 2025
0222d1a
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 27, 2025
8b19888
Reorganize some files, fix namespace naming to follow current convention
Mamotromico Oct 28, 2025
cd3a2d9
Remove SprImporter (it was wholly commented and seems obsolete now?)
Mamotromico Oct 28, 2025
266d73f
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 28, 2025
5511821
Add base Act classes
Mamotromico Oct 28, 2025
8ae2a13
Rename file to match class
Mamotromico Oct 28, 2025
3a1e423
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 28, 2025
ec9a100
Fix namespace (again)
Mamotromico Oct 28, 2025
2a2e9bd
Fix namespace (again)
Mamotromico Oct 28, 2025
c149c3b
Extract structs and interfaces to a separate file for readability
Mamotromico Oct 28, 2025
ed4ed0b
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 28, 2025
9c423ce
Struct layout ended up being irrelevant. Removed.
Mamotromico Oct 28, 2025
8976b6f
Struct layout ended up being irrelevant. Removed.
Mamotromico Oct 28, 2025
d504f89
Adjustments on RpSpr
Mamotromico Oct 28, 2025
4880201
Adjustments on RpSpr
Mamotromico Oct 28, 2025
83b9455
Initial .act file handling rework
Mamotromico Oct 28, 2025
d73f6d7
Reformat and simplify
Mamotromico Oct 29, 2025
5e7f39d
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 29, 2025
dff3adb
Editing data structure
Mamotromico Oct 29, 2025
5574f62
Reorganize data structure
Mamotromico Oct 29, 2025
4b2da29
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 29, 2025
1264ca4
Reorder structure
Mamotromico Oct 29, 2025
080ed66
Unify data structure
Mamotromico Oct 29, 2025
774b94f
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Oct 29, 2025
d624641
Rename some structs/classes to avoid any confusion with base Unity
Mamotromico Oct 29, 2025
573e101
Rename some structs/classes to avoid any confusion with base Unity
Mamotromico Oct 29, 2025
1aa68a7
Merge branch 'add_spr_file_support' into import_revision
Mamotromico Dec 7, 2025
de88bd6
Initial .act support
Mamotromico Dec 7, 2025
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
3 changes: 3 additions & 0 deletions RebuildClient/Assets/Scripts/Editor/ActHandling.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
using System.Collections.Generic;
using System.Linq;
using Assets.Scripts.Sprites;
using UnityEditor;
using UnityEditor.AssetImporters;
using UnityEngine;

namespace Assets.Scripts.Editor.ActHandling
{
[ScriptedImporter(1, ext:"act", AllowCaching = true)]
public class RoActAssetImporter : ScriptedImporter
{
public string actVersion;
public string filePath;
public string actFileName;
public List<AnimationClip> animationClips;

private static void TryIncludeActExtension()
{
if (EditorSettings.projectGenerationUserExtensions.Contains(ActExtension)) return;
var list = EditorSettings.projectGenerationUserExtensions.ToList();
list.Add(ActExtension);
EditorSettings.projectGenerationUserExtensions = list.ToArray();
}

private RoActAsset asset;
private const string ActExtension = "act";

public override void OnImportAsset(AssetImportContext ctx)
{
asset = ScriptableObject.CreateInstance<RoActAsset>();
Debug.Log($"Loading asset on {ctx.assetPath}");
asset.Load(ctx.assetPath);

PopulateImporterFields();

ctx.AddObjectToAsset(GUID.Generate().ToString(), asset);
ctx.SetMainObject(asset);

TryIncludeActExtension();
}

private void PopulateImporterFields()
{
actVersion = asset.actVersion;
filePath = asset.filePath;
actFileName = asset.actFileName;
animationClips = asset.animationClips;
}

// [CustomEditor(typeof(RoActAssetImporter))]
// public sealed class RoActAssetImporterEditor : ScriptedImporterEditor
// {
// public override bool showImportedObject
// {
// get { return false; }
// }
// }
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions RebuildClient/Assets/Scripts/Editor/ActHandling/RoActInspector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Assets.Scripts.Sprites;
using UnityEditor;
using UnityEngine;

namespace Assets.Scripts.Editor.ActHandling
{
[CustomEditor(typeof(RoActAsset))]
public class RoActInspector : UnityEditor.Editor
{
private SerializedProperty actName;
private SerializedProperty actVersion;
private SerializedProperty animationClips;

private void OnEnable()
{
actName = serializedObject.FindProperty("actName");
actVersion = serializedObject.FindProperty("actVersion");
animationClips = serializedObject.FindProperty("animationClips");
}

public override void OnInspectorGUI()
{
DrawImporterGUI();
serializedObject.ApplyModifiedProperties();
}

private void DrawImporterGUI()
{
EditorGUILayout.PropertyField(actName, new GUIContent("Act Name"));
EditorGUILayout.PropertyField(actVersion, new GUIContent("Act Version"));
EditorGUILayout.PropertyField(animationClips, new GUIContent("Animation Clips"));

}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

254 changes: 0 additions & 254 deletions RebuildClient/Assets/Scripts/Editor/ActImporter.cs

This file was deleted.

1 change: 1 addition & 0 deletions RebuildClient/Assets/Scripts/Editor/EffectStrImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Assets.Scripts.MapEditor.Editor;
using Assets.Scripts.Objects;
using RebuildSharedData.ClientTypes;
using Scripts.Editor;
using UnityEditor;
using UnityEditor.U2D;
using UnityEngine;
Expand Down
1 change: 1 addition & 0 deletions RebuildClient/Assets/Scripts/Editor/ItemIconImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Assets.Scripts.MapEditor.Editor;
using Assets.Scripts.Sprites;
using RebuildSharedData.ClientTypes;
using Scripts.Editor;
using UnityEditor;
using UnityEditor.U2D;
using UnityEngine;
Expand Down
Loading