ajout de la traduction #70
* Fix de l'inspection de l'inventaire * Suppression des assets d'objectifs
This commit is contained in:
@@ -28,14 +28,14 @@ func pointer_text() -> String:
|
||||
var name_suffix = ""
|
||||
|
||||
if item is Seed:
|
||||
name_suffix = "Seed"
|
||||
name_suffix = tr("SEED")
|
||||
if item is Package:
|
||||
name_suffix = "Package"
|
||||
name_suffix = tr("PACKAGE")
|
||||
|
||||
return item.name + (" " + name_suffix if name_suffix else "")
|
||||
|
||||
func interact_text():
|
||||
return "Take"
|
||||
return tr("TAKE")
|
||||
|
||||
func card_info() -> CardInfo:
|
||||
return item.card_info()
|
||||
@@ -54,6 +54,7 @@ func pickup_animation(player : Player):
|
||||
tween.tween_property(self, "position", player.position, 0.2)
|
||||
tween.tween_callback(
|
||||
func():
|
||||
Pointer.stop_inspect(self)
|
||||
queue_free()
|
||||
)
|
||||
if object_sprite:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
extends Machine
|
||||
class_name SolarPanel
|
||||
|
||||
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
|
||||
|
||||
var charged : bool = false
|
||||
var recharge_days : int = 0
|
||||
|
||||
@@ -37,13 +39,44 @@ func set_charged(_charged = true, with_anim : bool = true):
|
||||
%Flair.modulate = Color.WHITE if charged else Color.TRANSPARENT
|
||||
%Pannels.modulate = Color.WHITE if charged else Color("6c6c6c")
|
||||
|
||||
func card_info() -> CardInfo:
|
||||
var info = CardInfo.new(
|
||||
pointer_text()
|
||||
)
|
||||
|
||||
if default_info_desc != "":
|
||||
var desc_section = CardSectionInfo.new(
|
||||
tr("DESCRIPTION"),
|
||||
default_info_desc
|
||||
)
|
||||
desc_section.title_icon = DESC_ICON
|
||||
info.sections.append(
|
||||
desc_section
|
||||
)
|
||||
|
||||
var charged_text = tr("CHARGED")
|
||||
|
||||
if not charged and (get_days_to_recharge() - recharge_days) == 1:
|
||||
charged_text = tr("1_DAY_BEFORE_CHARGE")
|
||||
elif not charged and (get_days_to_recharge() - recharge_days) > 1:
|
||||
charged_text = tr("%d_DAYS_BEFORE_CHARGE") % (get_days_to_recharge() - recharge_days)
|
||||
|
||||
info.stats.append(
|
||||
CardStatInfo.new(
|
||||
charged_text,
|
||||
ENERGY_ICON
|
||||
)
|
||||
)
|
||||
|
||||
return info
|
||||
|
||||
|
||||
func setup_machine_sprite():
|
||||
# %Base.self_modulate = Machine.get_level_color(level)
|
||||
pass
|
||||
|
||||
func interact_text():
|
||||
return "Recharge " + str(get_energy_production()) + " energy"
|
||||
return tr("RECHARGE_%d_ENERGY") % get_energy_production()
|
||||
|
||||
func can_interact(_p : Player) -> bool:
|
||||
return charged
|
||||
@@ -54,4 +87,4 @@ func interact(p : Player) -> bool:
|
||||
return true
|
||||
|
||||
func save() -> EntityData:
|
||||
return SolarPanelData.new(self)
|
||||
return SolarPanelData.new(self)
|
||||
|
||||
@@ -70,6 +70,9 @@ _data = {
|
||||
|
||||
[node name="SolarPannel" type="Area2D"]
|
||||
script = ExtResource("1_t4vnu")
|
||||
default_interact_text = "USE"
|
||||
default_info_title = "SOLAR_PANNEL"
|
||||
default_info_desc = "SOLAR_PANNEL_DESCRIPTION_TEXT"
|
||||
metadata/_custom_type_script = "uid://du7qppxobx5nd"
|
||||
|
||||
[node name="Sprites" type="Node2D" parent="."]
|
||||
|
||||
@@ -78,9 +78,9 @@ _data = {
|
||||
|
||||
[node name="Compost" type="Area2D"]
|
||||
script = ExtResource("1_ux0j5")
|
||||
default_interact_text = "Place Seed"
|
||||
default_info_title = "Compost"
|
||||
default_info_desc = "This research station can provide some bonus if filled with seeds."
|
||||
default_interact_text = "PLACE_SEED"
|
||||
default_info_title = "COMPOST"
|
||||
default_info_desc = "COMPOST_DESC_TEXT"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -3)
|
||||
|
||||
@@ -49,7 +49,7 @@ func card_info() -> CardInfo:
|
||||
|
||||
if default_info_desc != "":
|
||||
var desc_section = CardSectionInfo.new(
|
||||
"Description",
|
||||
tr("DESCRIPTION"),
|
||||
default_info_desc
|
||||
)
|
||||
desc_section.title_icon = DESC_ICON
|
||||
@@ -58,7 +58,7 @@ func card_info() -> CardInfo:
|
||||
)
|
||||
|
||||
var reward_section = CardSectionInfo.new(
|
||||
"When filled",
|
||||
tr("WHEN_FILLED"),
|
||||
reward.desc()
|
||||
)
|
||||
reward_section.title_icon = FILLED_ICON
|
||||
|
||||
@@ -14,7 +14,7 @@ func reward(p: Player):
|
||||
p.pick_item(item)
|
||||
|
||||
func desc() -> String:
|
||||
return "Give the following item : [b]%s[/b]. %s" % [item.name, item.description]
|
||||
return tr("GIVE_THE_FOLLOWING_ITEM_%s") % item.name + ". " + item.description
|
||||
|
||||
func icon() -> Texture:
|
||||
return item.icon
|
||||
@@ -4,7 +4,7 @@ func reward(p: Player):
|
||||
p.upgrade_max_energy(1)
|
||||
|
||||
func desc() -> String:
|
||||
return "Upgrade max energy"
|
||||
return tr("UPGRADE_MAX_ENERGY")
|
||||
|
||||
func icon() -> Texture:
|
||||
return preload("res://common/icons/bolt.svg")
|
||||
@@ -5,7 +5,7 @@ func reward(p: Player):
|
||||
p.upgrade_inventory_size()
|
||||
|
||||
func desc() -> String:
|
||||
return "Upgrade max inventory size"
|
||||
return tr("UPGRADE_MAX_INVENTORY_SIZE")
|
||||
|
||||
func icon() -> Texture:
|
||||
return preload("res://common/icons/backpack.svg")
|
||||
@@ -14,9 +14,9 @@ region = Rect2(205, 157, 87, 208)
|
||||
|
||||
[node name="TruckLadder" type="Area2D"]
|
||||
script = ExtResource("1_26qdk")
|
||||
default_interact_text = "Enter Truck"
|
||||
default_info_title = "Truck Entrance"
|
||||
default_info_desc = "A good old ladder."
|
||||
default_interact_text = "ENTER_TRUCK"
|
||||
default_info_title = "TRUCK_ENTRANCE"
|
||||
default_info_desc = "LADDER_DESC_TEXT"
|
||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
@@ -14,9 +14,9 @@ region = Rect2(64, 161, 101, 205)
|
||||
|
||||
[node name="TruckRecharge" type="Area2D"]
|
||||
script = ExtResource("1_ipgcv")
|
||||
default_interact_text = "Recharge"
|
||||
default_info_title = "Recharge Station"
|
||||
default_info_desc = "[b]You can recharge your robot here.[/b] When recharging, time will pass and plants may grow."
|
||||
default_interact_text = "RECHARGE"
|
||||
default_info_title = "RECHARGE_STATION"
|
||||
default_info_desc = "RECHARGE_STATION_DESC_TEXT"
|
||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
Reference in New Issue
Block a user