fix et amélioration diverses
This commit is contained in:
@@ -283,7 +283,7 @@ func reach_quota():
|
||||
next_quota = planet_data.get_quota(planet_data.quota_number)
|
||||
days_on_last_quota = day
|
||||
|
||||
# ask_quota_reward()
|
||||
new_quota_started.emit(self)
|
||||
|
||||
func ask_quota_reward():
|
||||
quota_reward_asked.emit(
|
||||
@@ -292,7 +292,6 @@ func ask_quota_reward():
|
||||
generate_quota_reward()
|
||||
)
|
||||
|
||||
|
||||
func generate_quota_reward() -> Item:
|
||||
var random_level = randi_range(
|
||||
max(planet_data.quota_number - 1, 1),
|
||||
@@ -308,6 +307,9 @@ func get_garden_score():
|
||||
score += e.calculate_plant_score()
|
||||
return score
|
||||
|
||||
func update_garden_score():
|
||||
garden_score = get_garden_score()
|
||||
|
||||
func choose_quota_reward(item : Item):
|
||||
drop_item(item, player.global_position, 100)
|
||||
if decontamination_surface >= next_quota:
|
||||
|
||||
@@ -28,12 +28,12 @@ func get_compost_rewards() -> Array[Compost.Reward]:
|
||||
return rewards
|
||||
|
||||
func get_random_reward_cost() -> int:
|
||||
return randi_range(1 + rewarded_times * 2, 3 + rewarded_times * 2)
|
||||
return randi_range(1 + rewarded_times * 2, 2 + rewarded_times * 2)
|
||||
|
||||
func get_possible_rewards() -> Array[Compost.Reward]:
|
||||
return [
|
||||
Compost.UpgradeMaxEnergyReward.new(get_random_reward_cost() + 5),
|
||||
Compost.UpgradeMaxInventoryReward.new(get_random_reward_cost() + 2),
|
||||
Compost.UpgradeMaxInventoryReward.new(get_random_reward_cost()),
|
||||
Compost.GiveItemReward.new(
|
||||
get_random_reward_cost(),
|
||||
Blueprint.new(preload("res://entities/interactables/machines/solar_pannel/solar_pannel.tres"))
|
||||
|
||||
Reference in New Issue
Block a user