équilibrage des quota et du jeu, changement du GUI pour rendre les objectifs de quotas plus visibles #72

This commit is contained in:
2025-09-19 10:25:15 +02:00
parent 43bdbc3581
commit 42edc97401
24 changed files with 316 additions and 102 deletions

View File

@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="IncreaseDayLimitReward" load_steps=2 format=3 uid="uid://b11qyyi8k0mua"]
[ext_resource type="Script" uid="uid://df6i1hivw4ymn" path="res://entities/objectives/scripts/rewards/increase_day_limit_reward.gd" id="1_gt31s"]
[resource]
script = ExtResource("1_gt31s")
day_limit_increase = 5
metadata/_custom_type_script = "uid://df6i1hivw4ymn"

View File

@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="LootRandomSeedsReward" load_steps=2 format=3 uid="uid://ca62vcsijbxgc"]
[ext_resource type="Script" uid="uid://bcdilfb4j7f6d" path="res://entities/objectives/scripts/rewards/loot_random_seeds_reward.gd" id="1_yjhoy"]
[resource]
script = ExtResource("1_yjhoy")
seeds_number = 5
metadata/_custom_type_script = "uid://bcdilfb4j7f6d"

View File

@@ -16,4 +16,4 @@ func get_text() -> String:
return "+"+str(day_limit_increase)
func get_description() -> String:
return "Increase the day limitation by " + str(day_limit_increase)
return "Increase the day limitation by " + str(day_limit_increase) + "."

View File

@@ -0,0 +1,19 @@
extends ObjectiveReward
class_name RechargePlayerReward
@export var recharge_amount = 1
func _init(_recharge_amount : int = 1):
recharge_amount = _recharge_amount
func reward(objective : Objective):
objective.planet.player.recharge(recharge_amount)
func get_icon() -> Texture:
return preload("res://common/icons/bolt.svg")
func get_text() -> String:
return "+"+str(recharge_amount)+" "
func get_description() -> String:
return "Recharge player energy by " + str(recharge_amount) + "."

View File

@@ -0,0 +1 @@
uid://4ak4kre3emnd

View File

@@ -16,4 +16,4 @@ func get_text() -> String:
return "+"+str(upgrade_amount)+" max"
func get_description() -> String:
return "Increase player max energy by " + str(upgrade_amount)
return "Increase player max energy by " + str(upgrade_amount) + "."

View File

@@ -26,5 +26,4 @@ growing_texture = ExtResource("2_l2hi3")
mature_texture = ExtResource("3_y8qve")
cyclic_effect = SubResource("Resource_5hyy8")
harvest_types_path = Array[String](["uid://cxrc5wchpqm18"])
harvest_number = Array[int]([1, 2])
metadata/_custom_type_script = "uid://jnye5pe1bgqw"

View File

@@ -9,8 +9,7 @@
[sub_resource type="Resource" id="Resource_c76qk"]
script = ExtResource("2_cky1j")
impact_radius = 150
improve_by_lifetime = false
improve_by_lifetime_value = 20
improve_by_lifetime_max = 300
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
[sub_resource type="AtlasTexture" id="AtlasTexture_qt76e"]
@@ -26,6 +25,6 @@ seed_texture = SubResource("AtlasTexture_qt76e")
growing_texture = ExtResource("1_prk5s")
mature_texture = ExtResource("3_40c3e")
mature_effect = SubResource("Resource_c76qk")
harvest_types_path = Array[String]([])
harvest_types_path = Array[String](["uid://b04vho33bl52b"])
harvest_number = Array[int]([1, 2, 1])
metadata/_custom_type_script = "uid://jnye5pe1bgqw"

View File

@@ -9,8 +9,6 @@
[sub_resource type="Resource" id="Resource_q4pje"]
script = ExtResource("2_vyplc")
impact_radius = 20
improve_by_lifetime = false
improve_by_lifetime_value = 20
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
[sub_resource type="AtlasTexture" id="AtlasTexture_sri3b"]

View File

@@ -8,9 +8,10 @@
[sub_resource type="Resource" id="Resource_eytxu"]
script = ExtResource("1_8wi4i")
impact_radius = 0
impact_radius = 50
improve_by_lifetime = true
improve_by_lifetime_value = 50
improve_by_lifetime_max = 300
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
[sub_resource type="AtlasTexture" id="AtlasTexture_kidty"]
@@ -27,5 +28,4 @@ growing_texture = ExtResource("2_k4b1k")
mature_texture = ExtResource("3_8fstu")
cyclic_effect = SubResource("Resource_eytxu")
harvest_types_path = Array[String](["uid://c5oxxif3h5yxo"])
harvest_number = Array[int]([1, 2])
metadata/_custom_type_script = "uid://jnye5pe1bgqw"

View File

@@ -4,13 +4,14 @@ class_name DecontaminateTerrainEffect
@export var impact_radius = 100
@export var improve_by_lifetime := false
@export var improve_by_lifetime_value := 20
@export var improve_by_lifetime_max := 200
func effect(plant):
var radius = impact_radius
if improve_by_lifetime:
radius += improve_by_lifetime_value * plant.day
radius = min(radius + improve_by_lifetime_value * plant.day, improve_by_lifetime_max)
plant.planet.impact_contamination(
plant.global_position,

View File

@@ -103,10 +103,11 @@ func can_interact(interactable : Interactable):
return interactable.can_interact(self)
func try_interact(interactable : Interactable):
has_just_received_instruction = true
instruction = InteractableInstruction.new(
interactable
)
if interactable:
has_just_received_instruction = true
instruction = InteractableInstruction.new(
interactable
)
func try_move(move_to : Vector2):
instruction = MoveInstruction.new(move_to)