Working map generator

This commit is contained in:
2024-01-21 00:42:57 +01:00
parent cd80ab3357
commit 405b374b9a
17 changed files with 240 additions and 38 deletions

View File

@ -0,0 +1,7 @@
[plugin]
name="Glitch Tools"
description=""
author="Layla Manley"
version=""
script="plugin.gd"

View File

@ -0,0 +1,19 @@
@tool
extends EditorPlugin
func _enter_tree() -> void:
# This doesn't function in Godot4
# get_editor_interface().get_editor_data().connect("scene_saved", self, "_on_scene_saved")
pass
func _exit_tree() -> void:
# get_editor_interface().get_editor_data().disconnect("scene_saved", self, "_on_scene_saved")
pass
func _on_scene_saved(scene: PackedScene) -> void:
var instance: Node = scene.instantiate()
instance.queue_free.call_deferred()
for node in instance.get_children():
if node is StandardRoom:
node._validate()