2020-03-29 11:29:57 +00:00
|
|
|
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-03-29 11:29:57 +00:00
|
|
|
|
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 )
|
|
|
|
|
2020-03-29 11:29:57 +00:00
|
|
|
self.scene = datas.get( "scene", self.scene )
|
|
|
|
self.attachment = datas.get( "attachment", self.attachment )
|