feat: Oier does not speak to Eneko at startup, now the game has no story and is very boring
fix: remember picked items to avoid appering in scene again fix: counting potatoes
This commit is contained in:
@@ -5,19 +5,18 @@ class_name ESCItemCountManager
|
||||
|
||||
func add(global_id: String, value:= 1) -> void:
|
||||
var item = get_item(global_id)
|
||||
item.count = item.count + value
|
||||
updateSprite(item)
|
||||
set(global_id, item.count + value)
|
||||
|
||||
|
||||
func remove(global_id: String, value:= 1) -> void:
|
||||
var item = get_item(global_id)
|
||||
item.count = item.count - value
|
||||
updateSprite(item)
|
||||
set(global_id, item.count - value)
|
||||
|
||||
|
||||
func set(global_id: String, value: int) -> void:
|
||||
var item = get_item(global_id)
|
||||
item.count = value
|
||||
escoria.globals_manager.set_global("count/%s" % global_id, value)
|
||||
updateSprite(item)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user