khanat-client/ressources/scripts/items/equippable.gd

18 lines
466 B
GDScript3
Raw Normal View History

extends "res://ressources/scripts/items/item.gd"
class_name Equippable
var scene = ""
var attachment = ""
func from_dict( datas ):
2020-04-01 19:02:49 +00:00
.from_dict( datas )
2020-04-01 19:02:49 +00:00
var icon_filename = datas.get( "icon", null )
if icon_filename:
print( icon_filename )
self.icon = load( "res://assets/items/equippables/"+icon_filename )
self.scene = datas.get( "scene", self.scene )
self.attachment = datas.get( "attachment", self.attachment )