extends RefCounted class_name ItemGenerationUtils const ashScript = preload("res://Items/Ash/Ash.gd") const juiceScript = preload("res://Items/Juice/Juice.gd") const basketScript = preload("res://Items/Basket/BaseItem/Basket.gd") const puppetScript = preload("res://Items/Toys/Puppets/Puppet.gd") const candyScript = preload("res://Items/Candy/Candy.gd") static func base_item_check(item): if Item.types.Reformable in item.itemTypes: return item if Item.types.Ash in item.itemTypes: return ashScript.new() if Item.types.Juice in item.itemTypes: return juiceScript.new() if Item.types.Basket in item.itemTypes: return basketScript.new() if Item.types.Puppet in item.itemTypes: return puppetScript.new() if Item.types.Candy in item.itemTypes: return candyScript.new() return item