chore: install gut quality suite

This commit is contained in:
Rijad Zuzo
2026-07-10 15:59:46 +02:00
parent ce8f71082b
commit 2ed93de6d1
266 changed files with 23057 additions and 21 deletions
+39
View File
@@ -0,0 +1,39 @@
@tool
# ------------------------------------------------------------------------------
# Static
# ------------------------------------------------------------------------------
static var usage_counter = load('res://addons/gut/thing_counter.gd').new()
static var WarningsManager = load('res://addons/gut/warnings_manager.gd')
static func load_all():
for key in usage_counter.things:
key.get_loaded()
static func print_usage():
for key in usage_counter.things:
print(key._path, ' (', usage_counter.things[key], ')')
static func clear():
usage_counter.things.clear()
# ------------------------------------------------------------------------------
# Class
# ------------------------------------------------------------------------------
var _loaded = null
var _path = null
func _init(path):
_path = path
usage_counter.add_thing_to_count(self)
func get_loaded():
if(_loaded == null):
_loaded = WarningsManager.load_script_ignoring_all_warnings(_path)
usage_counter.add(self)
return _loaded