seedpackets and handlers
This commit is contained in:
parent
2a7c402cd0
commit
73a2fe42ad
16 changed files with 157 additions and 58 deletions
15
scripts/resources/game_identifiable_resource.gd
Normal file
15
scripts/resources/game_identifiable_resource.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends Resource
|
||||
|
||||
## Class that has unique GID specified by its filename.
|
||||
|
||||
class_name GameIdentifiableResource
|
||||
|
||||
## Game identifactor. Generates from resource filename. Should be unique.
|
||||
var gid : StringName = ""
|
||||
|
||||
## Gets GID. If resource has none, generates one.
|
||||
func get_gid() -> StringName:
|
||||
if gid == "":
|
||||
var split_path = resource_path.split("/")
|
||||
gid = split_path[split_path.size()].trim_suffix(".tres").to_lower()
|
||||
return gid
|
||||
Loading…
Add table
Add a link
Reference in a new issue