Working map generator
This commit is contained in:
7
addons/glitch_tools/plugin.cfg
Normal file
7
addons/glitch_tools/plugin.cfg
Normal file
@ -0,0 +1,7 @@
|
||||
[plugin]
|
||||
|
||||
name="Glitch Tools"
|
||||
description=""
|
||||
author="Layla Manley"
|
||||
version=""
|
||||
script="plugin.gd"
|
19
addons/glitch_tools/plugin.gd
Normal file
19
addons/glitch_tools/plugin.gd
Normal 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()
|
Reference in New Issue
Block a user