ItemTypeMap, NPCTypeMap

This commit is contained in:
2023-07-07 00:38:13 +02:00
parent 13920d66b7
commit 415a564317
5 changed files with 44 additions and 0 deletions

View File

@@ -5,6 +5,8 @@ type DomainBaseFields struct {
DialogMap DialogMap
Levels []Level
ObjectTypeMap ObjectTypeMap
ItemTypeMap ItemTypeMap
NPCTypeMap NPCTypeMap
}
type DomainInterface interface {
@@ -24,6 +26,12 @@ type DomainInterface interface {
GetObjectTypeMap() ObjectTypeMap
GetObjectType(name string) ObjectType
GetItemTypeMap() ItemTypeMap
GetItemType(name string) ItemType
GetNPCTypeMap() NPCTypeMap
GetNPCType(name string) NPCType
AddToInventory(item *Item) bool
RemoveFromInventory(item *Item) bool
UseInventoryItem(item *Item) bool

View File

@@ -1,5 +1,7 @@
package konstructor
type ItemTypeMap map[string]ItemType
type ItemType struct {
ID string
Render Render

View File

@@ -1,5 +1,7 @@
package konstructor
type NPCTypeMap map[string]NPCType
type NPCType struct {
ID string
Render Render