Feature/evolution #1
@@ -7,7 +7,7 @@ signal unlock_item(item_id: String)
|
||||
|
||||
var current_year: float = 0
|
||||
var current_speed: int = 1
|
||||
var current_speed_in_years:float = 1
|
||||
var current_speed_in_years: float = 1
|
||||
|
||||
var entities: Dictionary[String, OwniverseEntity] = {}
|
||||
var entity_groups: Dictionary[String, Array] = {}
|
||||
@@ -79,7 +79,7 @@ func produce(item_id: String, amount: float) -> void:
|
||||
return
|
||||
if _entity.cost[elem] == 0: continue
|
||||
|
||||
entity_transaction[elem] = -amount * _entity.cost[elem]
|
||||
entity_transaction[elem] = - amount * _entity.cost[elem]
|
||||
|
||||
for elem in entity_transaction:
|
||||
_process_enitity(elem, entity_transaction[elem])
|
||||
@@ -124,7 +124,7 @@ func _count_amount(entity_id: String, amount: float) -> void:
|
||||
items_to_update[entity_id] = current_amount[entity_id]
|
||||
|
||||
func _check_locked_items() -> void:
|
||||
for entity:OwniverseEntity in locked_entities:
|
||||
for entity: OwniverseEntity in locked_entities:
|
||||
for elem in entity.unlock:
|
||||
if cumulative_amount[elem] < entity.unlock[elem]:
|
||||
continue
|
||||
@@ -156,7 +156,6 @@ func change_speed(delta: int) -> int:
|
||||
|
||||
func load_data() -> bool:
|
||||
#var _is_succesfull = false
|
||||
|
||||
var game_data: Dictionary = SaveManager.load_data("owniverse", "qwerty")
|
||||
if game_data == {}:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user