From 106a74589e5c78be3c91ea9eed2319a0bbc1c846 Mon Sep 17 00:00:00 2001 From: noobour Date: Thu, 20 Aug 2026 21:54:32 -0400 Subject: [PATCH 1/2] chore: hide video button on map info container its not used so --- prefabs/map_info_container.tscn | 1 + 1 file changed, 1 insertion(+) diff --git a/prefabs/map_info_container.tscn b/prefabs/map_info_container.tscn index 23f39bb..db3771d 100644 --- a/prefabs/map_info_container.tscn +++ b/prefabs/map_info_container.tscn @@ -382,6 +382,7 @@ icon = ExtResource("5_1m5pv") icon_alignment = 1 [node name="Video" type="Button" parent="Info/ScrollContainer/HBoxContainer/Subholder/Buttons" unique_id=1985048325] +visible = false layout_mode = 2 tooltip_text = "Add Video" focus_mode = 0 From 1c7bdae1a86b8f5f3d838d36f888585960efd21b Mon Sep 17 00:00:00 2001 From: noobour Date: Fri, 28 Aug 2026 13:46:22 -0400 Subject: [PATCH 2/2] fix: PHXM import duplicates and metadata failing Weird potential side effect of this is that it caches duplicate maps now, oh and it MAY not be able to update maps by just dragging in newer copies, you might have to delete it, but idk i havent tested that someone else can --- scripts/map/Map.cs | 2 +- scripts/map/MapParser.cs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/map/Map.cs b/scripts/map/Map.cs index 15218a2..22374ce 100644 --- a/scripts/map/Map.cs +++ b/scripts/map/Map.cs @@ -147,7 +147,7 @@ public Map(string folderPath, Note[] data = null, string id = null, string artis VideoBuffer = videoBuffer; Notes = data ?? []; Length = length ?? Notes[^1].Millisecond; - Name = id?.Replace(" ", "_") ?? new Regex("[^a-zA-Z0-9_-]").Replace($"{Mappers.Stringify()}_{PrettyTitle}".Replace(" ", "_"), ""); + Name = Path.GetFileNameWithoutExtension(FolderPath); AudioExt = (AudioBuffer != null && Encoding.UTF8.GetString(AudioBuffer[0..4]) == "OggS") ? "ogg" : "mp3"; MapManager.Sanitize(this); diff --git a/scripts/map/MapParser.cs b/scripts/map/MapParser.cs index f1a2b32..66325a6 100644 --- a/scripts/map/MapParser.cs +++ b/scripts/map/MapParser.cs @@ -70,12 +70,12 @@ await Task.Run(() => public static void ExportEncode(Map map) { /* - The reason we re-decode it is because the cut down map cache's map list does not - have the buffers to save time and memory. So if we decode it, we can get the - buffers without having to deal with other annoying shit + The reason we re-decode it is because the cut down map cache's map list does not + have the buffers to save time and memory. So if we decode it, we can get the + buffers without having to deal with other annoying shit - -fog - */ + -fog + */ Map decodedMap = Decode(map.FolderPath); string exportPath = $"{Constants.USER_FOLDER}/export/"; @@ -157,7 +157,6 @@ public static void Encode(Map map, bool logBenchmark = false) 1 byte OR int32; y */ - File.WriteAllText(Path.Combine(mapFolderPath, "metadata.json"), map.EncodeMeta()); using var stream = File.Create(Path.Combine(mapFolderPath, "objects.phxmo")); // using BinaryWriter bw = new BinaryWriter(stream); @@ -209,6 +208,8 @@ void addAsset(string name, byte[] buffer) if (map.CoverBuffer != null) addAsset($"cover.png", map.CoverBuffer); if (map.VideoBuffer != null) addAsset($"video.mp4", map.VideoBuffer); + File.WriteAllText(Path.Combine(mapFolderPath, "metadata.json"), map.EncodeMeta()); + byte[] hash = Misc.HashFiles([Path.Combine(mapFolderPath, "metadata.json"), Path.Combine(mapFolderPath, "objects.phxmo")]); map.MetadataObjectHash = BitConverter.ToString(hash).Replace("-", "").ToLower();