équilibrages, fix et évolutions
* résolution du bug de disparition des items #94 * améliorations définitives dans le camion via compost #88 * ajout de plus d'aléatoire dans le zone de départ * suppression des récompenses de quota (pour l'instant) * équilibrage du gain en graine * ajout de la clarté dans les actions
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://fnv0qhkh40mv"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://fnv0qhkh40mv"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_0ssee"]
|
||||
[ext_resource type="Script" uid="uid://bvb4v66bqteuc" path="res://gui/game/announce/scripts/announce.gd" id="1_4evne"]
|
||||
[ext_resource type="FontFile" uid="uid://cpnsnrqhfkj3k" path="res://gui/ressources/fonts/spincycle_ot.otf" id="2_yrhd4"]
|
||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_7nrno"]
|
||||
[ext_resource type="AudioStream" uid="uid://dxu6yqmaxxmmc" path="res://gui/game/announce/assets/sfx/alarm.wav" id="5_iwcrn"]
|
||||
[ext_resource type="AudioStream" uid="uid://ccq04ahrwr3bv" path="res://gui/game/announce/assets/sfx/alarm.wav" id="5_iwcrn"]
|
||||
[ext_resource type="AudioStream" uid="uid://d1cpi438ep0ys" path="res://gui/game/announce/assets/sfx/quota_announcement.wav" id="6_oh30d"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_vbart"]
|
||||
font = ExtResource("2_yrhd4")
|
||||
@@ -165,4 +166,9 @@ libraries = {
|
||||
[node name="Alarm" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("5_iwcrn")
|
||||
pitch_scale = 2.0
|
||||
volume_db = -7.668
|
||||
|
||||
[node name="Announce" type="AudioStreamPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
stream = ExtResource("6_oh30d")
|
||||
volume_db = -7.668
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dxu6yqmaxxmmc"
|
||||
uid="uid://ccq04ahrwr3bv"
|
||||
path="res://.godot/imported/alarm.wav-e0f6b7b4874e69f8a83b072a97c636f4.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c5ccma3y6gqtw"
|
||||
uid="uid://d1cpi438ep0ys"
|
||||
path="res://.godot/imported/quota_announcement.wav-ebdd79fb160b0596cac5cfcd6835a186.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
@@ -9,4 +9,4 @@ func announce(title : String, text : String, band_color : Color = YELLOW_COLOR):
|
||||
%AnnounceText.text = text
|
||||
%AnnounceTexture.modulate = band_color
|
||||
%AnimationPlayer.play("pass")
|
||||
%Alarm.play()
|
||||
%Announce.play()
|
||||
|
||||
@@ -4,6 +4,7 @@ signal inspected_changed(info : Inspector.Info)
|
||||
|
||||
const DEFAULT_ACTION_COLOR = Color.WHITE
|
||||
const ENERGY_ACTION_COLOR = Color("ffff2b")
|
||||
const NO_ENERGY_ACTION_COLOR = Color.RED
|
||||
const ZONE_OPACITY = 0.4
|
||||
const ZONE_ACTIVATED_COLOR = Color.TURQUOISE
|
||||
const ZONE_DEACTIVATED_COLOR = Color.REBECCA_PURPLE
|
||||
@@ -15,6 +16,8 @@ var inspected_info : Inspector.Info = null
|
||||
var player : Player # renseigné par Player
|
||||
var can_interact : bool = false
|
||||
var current_selected_item : Item = null
|
||||
var have_energy_to_use_item : bool = false
|
||||
var could_use_item : bool = false
|
||||
var can_use_item : bool = false
|
||||
|
||||
func _ready():
|
||||
@@ -53,11 +56,18 @@ func _process(_delta):
|
||||
|
||||
current_selected_item = player.inventory.get_item()
|
||||
|
||||
can_use_item = (
|
||||
could_use_item = (
|
||||
current_selected_item
|
||||
and player.preview_can_use_item(current_selected_item)
|
||||
and player.preview_could_use_item(current_selected_item)
|
||||
)
|
||||
|
||||
have_energy_to_use_item = (
|
||||
current_selected_item
|
||||
and player.has_energy_to_use_item(current_selected_item)
|
||||
)
|
||||
|
||||
can_use_item = could_use_item and have_energy_to_use_item
|
||||
|
||||
if current_selected_item:
|
||||
%ActionZone.radius = current_selected_item.usage_zone_radius
|
||||
%ActionZone.color = ZONE_ACTIVATED_COLOR if can_use_item else ZONE_DEACTIVATED_COLOR
|
||||
@@ -89,10 +99,13 @@ func update_inspector():
|
||||
%ActionText.text = inspected.interact_text()
|
||||
%Action.modulate = DEFAULT_ACTION_COLOR if inspected.interaction_cost(player) == 0 else ENERGY_ACTION_COLOR
|
||||
%ActionEnergyImage.visible = inspected.interaction_cost(player) != 0
|
||||
elif can_use_item and current_selected_item:
|
||||
elif current_selected_item and current_selected_item.use_text() != "":
|
||||
%Action.visible = true
|
||||
%ActionText.text = current_selected_item.use_text()
|
||||
%Action.modulate = DEFAULT_ACTION_COLOR if current_selected_item.energy_usage == 0 else ENERGY_ACTION_COLOR
|
||||
%ActionText.text = current_selected_item.use_text() + (" (no energy left)" if not have_energy_to_use_item else "")
|
||||
if can_use_item:
|
||||
%Action.modulate = DEFAULT_ACTION_COLOR if current_selected_item.energy_usage == 0 else ENERGY_ACTION_COLOR
|
||||
else :
|
||||
%Action.modulate = NO_ENERGY_ACTION_COLOR
|
||||
%ActionEnergyImage.visible = current_selected_item.energy_usage != 0
|
||||
else:
|
||||
%Action.visible = false
|
||||
|
||||
Reference in New Issue
Block a user