ajout de la traduction #70

* Fix de l'inspection de l'inventaire
* Suppression des assets d'objectifs
This commit is contained in:
Zacharie Guet 2025-11-07 17:36:18 +01:00
parent ed675ed532
commit a8bb09407e
91 changed files with 485 additions and 872 deletions

View File

@ -1,2 +1,120 @@
keys,fr,en
TEST1,Cest un test,Its a test
keys,en,fr
STORY_TEXT,"[b]You are a robot who was sended in a barren and contaminated planet.[/b]
Your job : plant seeds to repopulate this planet. Each seed has different effects and score,and [b]youll have to meet a garden score each 7 days to continue[/b].
Be carefull, [b]you can only plant in decontamined zone[/b], but some plants can help decontaminate your garden.
[b]Good luck![/b]","[b]Vous êtes un robot envoyé sur une planète stérile et contaminée.[/b]
Votre mission : planter des graines pour repeupler cette planète. Chaque graine a des effets et un score différents, et [b]vous devrez atteindre un certain score de jardin tous les 7 jours pour continuer[/b].
Attention, [b]vous ne pouvez planter que dans les zones décontaminées[/b], mais certaines plantes peuvent aider à décontaminer votre jardin.
[b]Bonne chance ![/b]"
CONTROLS_TEXT,"Directional Arrows/Right Click : Move
Left Click : Interact/Pickup Items
Mouse Wheel : Change current item
X : Drop Item","Flèches directionnelles/Clic droit : Se déplacer
Clic Gauche : Interagir/Ramasser
Molette : Changer l'item sélectionné
X : Lâcher l'item"
STORY,Story,Histoire
OK,Ok,Ok
COMMA,", ",
OR," or ",
PAUSE,Pause,Pause
CONTROLS,Controls,Contrôles
RESUME_GAME,Resume Game, Reprendre
RESTART,Restart,Recommencer
QUIT,Quit,Quitter
SEED,Seed,
TAKE,Take,
PACKAGE,Package,
DESCRIPTION, Description,
USE, Use,
ON_MATURE,"On mature",
WHEN_HARVESTED,"When harvested",
EACH_DAY_WHEN_MATURE,"Each day when mature",
COMMON,"Common",
RARE,"Rare",
VERY_RARE,"Very rare",
IMPOSSIBLE,"Impossible",
EFFECT,"Effect",
MATURE,"Mature",
GROWING,Growing,
DECONTAMINATE,"Decontaminate",
%d_DAY_LEFT,%d days left,%d jours restants
NEW_QUOTA,New Quota,Nouveau Quota
REACH_%d_GARDEN_SCORE_BEFORE_%d_DAYS,Reach %d garden score before %d days,
LAST_DAY_FOR_REACHING_QUOTA,Last day for reaching quota,
RECHARGE_%d_ENERGY,Recharge %d energy,
%d_DAYS_BEFORE_CHARGE, %d days before charge,
1_DAY_BEFORE_CHARGE, 1 days before charge,
CHARGED, Charged,
WHEN_FILLED,"When filled",
GIVE_THE_FOLLOWING_ITEM_%s,"Give the following item : [b]%s[/b]",
UPGRADE_MAX_ENERGY,"Upgrade max energy",
UPGRADE_MAX_INVENTORY_SIZE,"Upgrade max inventory size",
DECONTAMINATE_%d_UNIT_AROUND_IT,"Decontaminate %d unit around it",
SEED_PRODUCTION,"Seed Production",
PRODUCE_%s_SEEDS,"Produce %s seeds",
DAY_%d,"Day [b]%d[/b]",
MATURE_ON_DAY_%d,"Mature on day [b]%d[/b]",
%d_SCORE_WHEN_MATURE,"[b]%d[/b] score when mature",
ABSURD,"[rainbow]Absurd[/rainbow]",
GROW_IN_%d,"Grow in [b]%d[/b]",
%s_SCORE_WHEN_MATURE,"[b]%d[/b] score when mature",
DISCOVER_%s,"Discover %s",
EVOLVE_%s,"Evolve %s",
%s_SEEDS_CAN_NOW_BE_FOUND,"%s seeds can now be found",
%s_SCORE_EVOLUTION,"%s score evolution",
ADD_%s_TO_THE_DEFAULT_SCORE_OF_THE_PLANT,"Add [b]%s[/b] to the default score of the plant",
%s_EVOLUTION,%s evolution,Évolution de %s
UPGRADE_THE_LEVEL_OF_%s_EFFECT_OF_%d_LEVEL,Upgrade the level of %s effect of %d level,Améliore l'effet %s de %d niveau
ANCIENT,"Ancient",
ANCIENT_EFFECT_TEXT_LEVEL_%d,"When mature, add [b]1[/b] to the score for each [b]%d[/b] days passed",
ELITIST,"Elitist",
ELITIST_EFFECT_TEXT_LEVEL_%d,"When mature, add [b]%d[/b] to the score for each plant of the same species around, but score become 0 if none is around.",
ERMIT,"Ermit",
ERMIT_EFFECT_TEXT_LEVEL_%d,"Multiply the score by [b]%d[/b] if no plant is near, but set it to 0 otherwise.",
PRECOCIOUS,"Precocious",
PRECOCIOUS_EFFECT_TEXT_LEVEL_%d,"Add [b]%d[/b] to the score while the plant is growing",
QUALITY,"Quality",
QUALITY_EFFECT_TEXT_LEVEL_%d,"Add [b]%d[/b] to the score if the plant is mature.",
QUICK,"Quick",
QUICK_EFFECT_TEXT_LEVEL_%d,"Reduce the grow time by %d",
SOCIABLE,"Sociable",
SOCIABLE_EFFECT_TEXT_LEVEL_%d,"When mature, add [b]%d[/b] to the score if near %d other plants",
STRONG,"Strong",
STRONG_EFFECT_TEXT_LEVEL_%d,"Plus [b]%d[/b] percent of the score",
COST_%d_ENERGY,"Cost %d energy",
ONE_TIME_USE,"One time use",
BUILD_%s,"Build %s",
FORK,"Fork",
FORK_DESC_TEXT,"Use it to harvest mature plants.",
HARVEST,Harvest,
KNIFE,"Knife",
KNIFE_DESC_TEXT,"Use it to harvest mature plants. Do not cost energy.",
SHOVEL,"Shovel",
SHOVEL_DESC_TEXT,"Can dig up buried seeds and can be used to harvest mature plants.",
TROWEL, Trowel,
TROWEL_DESC_TEXT,"Use it to harvest mature plants, can get a [b]bonus seed[/b] from each plant.",
DIG, Dig,
OPEN,Open,
%s_SEED,"%s Seed",
PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE,"Plant [b]%s[/b]. Must be used in decontamined zone.",
PLANT_%s,"Plant [b]%s[/b]",
BURIED_LOOT,"Buried Loot",
TAKE_THE_SHOVEL,"Take the Shovel",
DIG_UNDERGROUND_LOOT,"Dig Underground Loot",
TAKE_A_SEED,"Take a seed",
PLANT_THE_SEED_IN_DECONTAMINED_ZONE,"Plant the seed in decontamined zone",
RECHARGE_TO_PASS_DAYS,"Recharge to pass days",
HARVEST_MATURE_PLANTS_WITH_SHOVEL,"Harvest mature plants with shovel",
SCORE_%d,"Score : %d",
SOLAR_PANNEL, Solar Panel,
SOLAR_PANNEL_DESCRIPTION_TEXT, "Can give energy when charged. Take several days to recharge",
TRUCK_ENTRANCE,Truck Entrance,
ENTER_TRUCK,Enter Truck,
LADDER_DESC_TEXT,A good old ladder,
RECHARGE_STATION,Recharge Station,
RECHARGE,Recharge,
RECHARGE_STATION_DESC_TEXT,"[b]You can recharge your robot here.[/b] When recharging, time will pass and plants may grow.",
COMPOST,Compost,
PLACE_SEED,Place Seed,
COMPOST_DESC_TEXT,This research station can provide some bonus if filled with seeds,
1 keys en fr
2 TEST1 STORY_TEXT It’s a test [b]You are a robot who was sended in a barren and contaminated planet.[/b] Your job : plant seeds to repopulate this planet. Each seed has different effects and score,and [b]you’ll have to meet a garden score each 7 days to continue[/b]. Be carefull, [b]you can only plant in decontamined zone[/b], but some plants can help decontaminate your garden. [b]Good luck![/b] C’est un test [b]Vous êtes un robot envoyé sur une planète stérile et contaminée.[/b] Votre mission : planter des graines pour repeupler cette planète. Chaque graine a des effets et un score différents, et [b]vous devrez atteindre un certain score de jardin tous les 7 jours pour continuer[/b]. Attention, [b]vous ne pouvez planter que dans les zones décontaminées[/b], mais certaines plantes peuvent aider à décontaminer votre jardin. [b]Bonne chance ![/b]
3 CONTROLS_TEXT Directional Arrows/Right Click : Move Left Click : Interact/Pickup Items Mouse Wheel : Change current item X : Drop Item Flèches directionnelles/Clic droit : Se déplacer Clic Gauche : Interagir/Ramasser Molette : Changer l'item sélectionné X : Lâcher l'item
4 STORY Story Histoire
5 OK Ok Ok
6 COMMA ,
7 OR or
8 PAUSE Pause Pause
9 CONTROLS Controls Contrôles
10 RESUME_GAME Resume Game Reprendre
11 RESTART Restart Recommencer
12 QUIT Quit Quitter
13 SEED Seed
14 TAKE Take
15 PACKAGE Package
16 DESCRIPTION Description
17 USE Use
18 ON_MATURE On mature
19 WHEN_HARVESTED When harvested
20 EACH_DAY_WHEN_MATURE Each day when mature
21 COMMON Common
22 RARE Rare
23 VERY_RARE Very rare
24 IMPOSSIBLE Impossible
25 EFFECT Effect
26 MATURE Mature
27 GROWING Growing
28 DECONTAMINATE Decontaminate
29 %d_DAY_LEFT %d days left %d jours restants
30 NEW_QUOTA New Quota Nouveau Quota
31 REACH_%d_GARDEN_SCORE_BEFORE_%d_DAYS Reach %d garden score before %d days
32 LAST_DAY_FOR_REACHING_QUOTA Last day for reaching quota
33 RECHARGE_%d_ENERGY Recharge %d energy
34 %d_DAYS_BEFORE_CHARGE %d days before charge
35 1_DAY_BEFORE_CHARGE 1 days before charge
36 CHARGED Charged
37 WHEN_FILLED When filled
38 GIVE_THE_FOLLOWING_ITEM_%s Give the following item : [b]%s[/b]
39 UPGRADE_MAX_ENERGY Upgrade max energy
40 UPGRADE_MAX_INVENTORY_SIZE Upgrade max inventory size
41 DECONTAMINATE_%d_UNIT_AROUND_IT Decontaminate %d unit around it
42 SEED_PRODUCTION Seed Production
43 PRODUCE_%s_SEEDS Produce %s seeds
44 DAY_%d Day [b]%d[/b]
45 MATURE_ON_DAY_%d Mature on day [b]%d[/b]
46 %d_SCORE_WHEN_MATURE [b]%d[/b] score when mature
47 ABSURD [rainbow]Absurd[/rainbow]
48 GROW_IN_%d Grow in [b]%d[/b]
49 %s_SCORE_WHEN_MATURE [b]%d[/b] score when mature
50 DISCOVER_%s Discover %s
51 EVOLVE_%s Evolve %s
52 %s_SEEDS_CAN_NOW_BE_FOUND %s seeds can now be found
53 %s_SCORE_EVOLUTION %s score evolution
54 ADD_%s_TO_THE_DEFAULT_SCORE_OF_THE_PLANT Add [b]%s[/b] to the default score of the plant
55 %s_EVOLUTION %s evolution Évolution de %s
56 UPGRADE_THE_LEVEL_OF_%s_EFFECT_OF_%d_LEVEL Upgrade the level of %s effect of %d level Améliore l'effet %s de %d niveau
57 ANCIENT Ancient
58 ANCIENT_EFFECT_TEXT_LEVEL_%d When mature, add [b]1[/b] to the score for each [b]%d[/b] days passed
59 ELITIST Elitist
60 ELITIST_EFFECT_TEXT_LEVEL_%d When mature, add [b]%d[/b] to the score for each plant of the same species around, but score become 0 if none is around.
61 ERMIT Ermit
62 ERMIT_EFFECT_TEXT_LEVEL_%d Multiply the score by [b]%d[/b] if no plant is near, but set it to 0 otherwise.
63 PRECOCIOUS Precocious
64 PRECOCIOUS_EFFECT_TEXT_LEVEL_%d Add [b]%d[/b] to the score while the plant is growing
65 QUALITY Quality
66 QUALITY_EFFECT_TEXT_LEVEL_%d Add [b]%d[/b] to the score if the plant is mature.
67 QUICK Quick
68 QUICK_EFFECT_TEXT_LEVEL_%d Reduce the grow time by %d
69 SOCIABLE Sociable
70 SOCIABLE_EFFECT_TEXT_LEVEL_%d When mature, add [b]%d[/b] to the score if near %d other plants
71 STRONG Strong
72 STRONG_EFFECT_TEXT_LEVEL_%d Plus [b]%d[/b] percent of the score
73 COST_%d_ENERGY Cost %d energy
74 ONE_TIME_USE One time use
75 BUILD_%s Build %s
76 FORK Fork
77 FORK_DESC_TEXT Use it to harvest mature plants.
78 HARVEST Harvest
79 KNIFE Knife
80 KNIFE_DESC_TEXT Use it to harvest mature plants. Do not cost energy.
81 SHOVEL Shovel
82 SHOVEL_DESC_TEXT Can dig up buried seeds and can be used to harvest mature plants.
83 TROWEL Trowel
84 TROWEL_DESC_TEXT Use it to harvest mature plants, can get a [b]bonus seed[/b] from each plant.
85 DIG Dig
86 OPEN Open
87 %s_SEED %s Seed
88 PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE Plant [b]%s[/b]. Must be used in decontamined zone.
89 PLANT_%s Plant [b]%s[/b]
90 BURIED_LOOT Buried Loot
91 TAKE_THE_SHOVEL Take the Shovel
92 DIG_UNDERGROUND_LOOT Dig Underground Loot
93 TAKE_A_SEED Take a seed
94 PLANT_THE_SEED_IN_DECONTAMINED_ZONE Plant the seed in decontamined zone
95 RECHARGE_TO_PASS_DAYS Recharge to pass days
96 HARVEST_MATURE_PLANTS_WITH_SHOVEL Harvest mature plants with shovel
97 SCORE_%d Score : %d
98 SOLAR_PANNEL Solar Panel
99 SOLAR_PANNEL_DESCRIPTION_TEXT Can give energy when charged. Take several days to recharge
100 TRUCK_ENTRANCE Truck Entrance
101 ENTER_TRUCK Enter Truck
102 LADDER_DESC_TEXT A good old ladder
103 RECHARGE_STATION Recharge Station
104 RECHARGE Recharge
105 RECHARGE_STATION_DESC_TEXT [b]You can recharge your robot here.[/b] When recharging, time will pass and plants may grow.
106 COMPOST Compost
107 PLACE_SEED Place Seed
108 COMPOST_DESC_TEXT This research station can provide some bonus if filled with seeds
109
110
111
112
113
114
115
116
117
118
119
120

View File

@ -2,12 +2,14 @@
importer="csv_translation"
type="Translation"
uid="uid://plsom6l0yel4"
valid=false
uid="uid://dfymfpql8yxwt"
[deps]
source_file="res://Translation/localization.csv"
files=["res://translation/localization.en.translation", "res://translation/localization.fr.translation"]
source_file="res://translation/localization.csv"
dest_files=["res://translation/localization.en.translation", "res://translation/localization.fr.translation"]
[params]

View File

@ -8,6 +8,8 @@ func _init():
@export var tutorial_done = false
@export var settings : SettingsData = SettingsData.new()
@export var current_planet_data : PlanetData = PlanetData.new() :
set(v):
current_planet_data = v

View File

@ -0,0 +1,11 @@
extends Resource
class_name SettingsData
const AVAILABLE_LANGUAGES = [
"en",
"fr",
]
const AVAILABLE_LANGUAGES_LABEL = [
"English",
"Français",
]

View File

@ -0,0 +1 @@
uid://babsy24iv5yox

View File

@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/ambiance_phase_3.ogg-b221fd161951d0874f6a08d4
[params]
loop=true
loop_offset=0.0
bpm=0.0
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@ -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:

View File

@ -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)

View File

@ -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="."]

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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="."]

View File

@ -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="."]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dbednu7eygtrf"
path="res://.godot/imported/arbre_mort.png-eea217ee3fbf6520e6fbde71f18bbeef.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/arbre_mort.png"
dest_files=["res://.godot/imported/arbre_mort.png-eea217ee3fbf6520e6fbde71f18bbeef.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4iukrxpg34y4"
path="res://.godot/imported/herbe.png-0b71f9ccc1e3943af9b0f3a135d3651b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/herbe.png"
dest_files=["res://.godot/imported/herbe.png-0b71f9ccc1e3943af9b0f3a135d3651b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsetwgt5tqv7v"
path="res://.godot/imported/herbe3.png-a47f3310ca32019ca3d036e811d21212.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/herbe3.png"
dest_files=["res://.godot/imported/herbe3.png-a47f3310ca32019ca3d036e811d21212.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://k4v52q6eejv"
path="res://.godot/imported/herbe4.png-c674d45256bbf00e0fd646fd55e2e33b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/herbe4.png"
dest_files=["res://.godot/imported/herbe4.png-c674d45256bbf00e0fd646fd55e2e33b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ckb8w7hsfevvt"
path="res://.godot/imported/herbe8_glow.png-c4d058e6fea519767afa64e839e5f87f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/herbe8_glow.png"
dest_files=["res://.godot/imported/herbe8_glow.png-c4d058e6fea519767afa64e839e5f87f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c4pv2o7crchc0"
path="res://.godot/imported/little_plant.png-e9ed84e9420c629c3911ff755b194643.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/little_plant.png"
dest_files=["res://.godot/imported/little_plant.png-e9ed84e9420c629c3911ff755b194643.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,40 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bxb13hfnhxpvv"
path="res://.godot/imported/plante_morte.png-308d7033b9ec4bc89434e061a168e35b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://entities/objectives/assets/sprites/plante_morte.png"
dest_files=["res://.godot/imported/plante_morte.png-308d7033b9ec4bc89434e061a168e35b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -1,255 +0,0 @@
[gd_scene load_steps=10 format=3 uid="uid://djl2le58ckgdx"]
[ext_resource type="Script" uid="uid://j8fpi8rd8eyy" path="res://entities/objectives/scripts/objective.gd" id="1_3hqw5"]
[ext_resource type="Texture2D" uid="uid://4iukrxpg34y4" path="res://entities/objectives/assets/sprites/herbe.png" id="2_047qm"]
[ext_resource type="Texture2D" uid="uid://bxb13hfnhxpvv" path="res://entities/objectives/assets/sprites/plante_morte.png" id="3_bvagy"]
[ext_resource type="Texture2D" uid="uid://k4v52q6eejv" path="res://entities/objectives/assets/sprites/herbe4.png" id="4_lrlky"]
[ext_resource type="Texture2D" uid="uid://ckb8w7hsfevvt" path="res://entities/objectives/assets/sprites/herbe8_glow.png" id="5_6uhem"]
[sub_resource type="Animation" id="Animation_v08i5"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ArbreMort:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.627451, 0.85490197, 0.8980392, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("LittlePlant:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("LittlePlant:scale")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.094358, 0.094358)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("LittlePlant2:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("LittlePlant2:scale")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.094358, 0.094358)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("LittlePlant3:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("ArbreMort:scale")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.162791, 0.162791)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("LittlePlant3:scale")
tracks/7/interp = 1
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0.094358, 0.094358)]
}
[sub_resource type="Animation" id="Animation_6uhem"]
resource_name = "activate"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ArbreMort:modulate")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.266667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0.62835556, 0.85348916, 0.8974243, 1), Color(1, 1, 1, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("LittlePlant:visible")
tracks/1/interp = 2
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0.0333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("LittlePlant:scale")
tracks/2/interp = 2
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0.433333, 0.6),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0.044, 0.044)]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("LittlePlant2:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.0333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/4/type = "value"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath("LittlePlant2:scale")
tracks/4/interp = 2
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.6, 0.8),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0.044, 0.044)]
}
tracks/5/type = "value"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath("LittlePlant3:visible")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"times": PackedFloat32Array(0.0333333),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/6/type = "value"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("ArbreMort:scale")
tracks/6/interp = 2
tracks/6/loop_wrap = true
tracks/6/keys = {
"times": PackedFloat32Array(0, 0.1, 0.266667, 0.4),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 0,
"values": [Vector2(0.162791, 0.162791), Vector2(0.183, 0.093), Vector2(0.123, 0.178), Vector2(0.162791, 0.162791)]
}
tracks/7/type = "value"
tracks/7/imported = false
tracks/7/enabled = true
tracks/7/path = NodePath("LittlePlant3:scale")
tracks/7/interp = 2
tracks/7/loop_wrap = true
tracks/7/keys = {
"times": PackedFloat32Array(0.4, 0.533333),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0.054, 0.054)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_047qm"]
_data = {
&"RESET": SubResource("Animation_v08i5"),
&"activate": SubResource("Animation_6uhem")
}
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_bvagy"]
radius = 15.0
height = 68.0
[node name="Objective" type="Area2D"]
script = ExtResource("1_3hqw5")
metadata/_custom_type_script = "uid://d3bk52402ylvl"
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
unique_name_in_owner = true
libraries = {
&"": SubResource("AnimationLibrary_047qm")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-1, -16)
rotation = 1.5708
shape = SubResource("CapsuleShape2D_bvagy")
[node name="LittlePlant" type="Sprite2D" parent="."]
visible = false
position = Vector2(-15, -25)
scale = Vector2(0.094358, 0.094358)
texture = ExtResource("2_047qm")
[node name="ArbreMort" type="Sprite2D" parent="."]
modulate = Color(0.627451, 0.85490197, 0.8980392, 1)
position = Vector2(0, -17)
scale = Vector2(0.162791, 0.162791)
texture = ExtResource("3_bvagy")
offset = Vector2(0, -85.55)
[node name="LittlePlant2" type="Sprite2D" parent="."]
visible = false
position = Vector2(21, -22)
scale = Vector2(0.094358, 0.094358)
texture = ExtResource("4_lrlky")
[node name="LittlePlant3" type="Sprite2D" parent="."]
visible = false
position = Vector2(0, -15.000002)
scale = Vector2(0.094358, 0.094358)
texture = ExtResource("5_6uhem")

View File

@ -1,18 +0,0 @@
extends InspectableEntity
class_name Objective
const RANDOM_MAX_OBJECTIVE_INTERVAL = 1.
const DECONTAMINATION_ICON = preload("res://common/icons/skull.svg")
var completed : bool = false
@export var reward : ObjectiveReward = null
func pointer_text() -> String:
return "Contamination Objective"
func _end_pass_day():
if planet and not completed:
if not planet.garden.is_there_contamination(global_position):
reward.reward(self)
%AnimationPlayer.play("activate")
completed = true

View File

@ -1 +0,0 @@
uid://j8fpi8rd8eyy

View File

@ -1,14 +0,0 @@
extends Resource
class_name ObjectiveReward
func reward(_objective : Objective):
pass
func get_icon() -> Texture:
return null
func get_text() -> String:
return ""
func get_description() -> String:
return ""

View File

@ -1 +0,0 @@
uid://bsh4b8miag8w1

View File

@ -1,25 +0,0 @@
extends ObjectiveReward
class_name LootItemReward
const REWARD_ITEM_RANDOM_DISPLACEMENT_FACTOR = 100
@export var item : Item
func _init(i : Item):
item = i
func get_icon() -> Texture:
return preload("res://common/icons/package.svg")
func get_text() -> String:
return ""
func get_description() -> String:
return "Loot the following item: [b]%s[/b]. %s" % [item.name, item.description]
func reward(objective : Objective):
objective.terrain.drop_item(
item,
objective.global_position,
REWARD_ITEM_RANDOM_DISPLACEMENT_FACTOR
)

View File

@ -1 +0,0 @@
uid://dva05p817w00f

View File

@ -1 +0,0 @@
uid://dot5gfkbm7p6s

View File

@ -1,27 +0,0 @@
extends ObjectiveReward
class_name LootRandomSeedsReward
const REWARD_SEED_RANDOM_DISPLACEMENT_FACTOR = 100
@export var seeds_number : int
func _init(number : int):
seeds_number = number
func get_icon() -> Texture:
return preload("res://common/icons/seedling.svg")
func get_text() -> String:
return str(seeds_number)
func get_description() -> String:
return "Loot " + str(seeds_number) + " random seeds."
func reward(objective : Objective):
if len(GameInfo.game_data.unlocked_plant_types):
for i in range(seeds_number):
objective.terrain.drop_item(
Seed.new(GameInfo.game_data.unlocked_plant_types.pick_random()),
objective.global_position,
REWARD_SEED_RANDOM_DISPLACEMENT_FACTOR
)

View File

@ -1 +0,0 @@
uid://bcdilfb4j7f6d

View File

@ -1,19 +0,0 @@
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.terrain.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

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

View File

@ -1,19 +0,0 @@
extends ObjectiveReward
class_name UpgradePlayerMaxEnergyReward
@export var upgrade_amount = 1
func _init(_upgrade_amount : int = 1):
upgrade_amount = _upgrade_amount
func reward(objective : Objective):
objective.terrain.player.upgrade_max_energy(upgrade_amount)
func get_icon() -> Texture:
return preload("res://common/icons/bolt.svg")
func get_text() -> String:
return "+"+str(upgrade_amount)+" max"
func get_description() -> String:
return "Increase player max energy by " + str(upgrade_amount) + "."

View File

@ -1,19 +0,0 @@
extends ObjectiveReward
class_name UpgradePlayerInventorySizeReward
@export var upgrade_amount = 1
func _init(_upgrade_amount : int = 1):
upgrade_amount = _upgrade_amount
func reward(objective : Objective):
objective.terrain.player.upgrade_inventory_size(upgrade_amount)
func get_icon() -> Texture:
return preload("res://common/icons/backpack.svg")
func get_text() -> String:
return "+"+str(upgrade_amount)+" max"
func get_description() -> String:
return "Increase player inventory size by " + str(upgrade_amount) + "."

View File

@ -159,12 +159,12 @@ func card_info() -> CardInfo:
info.texture = plant_type.mature_texture
info.type_icon = PLANT_TYPE_ICON
var state_text = "Mature"
var state_text = tr("MATURE")
if state != State.MATURE:
state_text = "Growing"
state_text = tr("GROWING")
info.stats.append(CardStatInfo.new(
"Day [b]%d[/b]" % day,
tr("DAY_%d") % day,
LIFETIME_ICON
))
@ -175,12 +175,12 @@ func card_info() -> CardInfo:
if state != State.MATURE:
info.stats.append(CardStatInfo.new(
"Mature on day [b]%d[/b]" % calculate_grow_time(),
tr("MATURE_ON_DAY_%d") % calculate_grow_time(),
GROWING_ICON
))
info.stats.append(CardStatInfo.new(
"[b]%d[/b] score when mature" % calculate_plant_score(State.MATURE),
tr("%d_SCORE_WHEN_MATURE") % calculate_plant_score(State.MATURE),
PLANT_POINT_ICON
))

View File

@ -49,9 +49,9 @@ static func card_effect_sections(
cyclic_effects
]
var effects_category_labels : Array[String] = [
"On mature",
"When harvested",
"Each day when mature",
"ON_MATURE",
"WHEN_HARVESTED",
"EACH_DAY_WHEN_MATURE",
]
var effects_category_icon : Array[Texture] = [
MATURE_EFFECT_ICON,

View File

@ -5,10 +5,10 @@ func get_decontamination_radius():
return 50 + 50 * level
func get_effect_name() -> String:
return "Decontaminate"
return tr("DECONTAMINATE")
func get_effect_description() -> String:
var ret = "Decontaminate %d unit around it" % [get_decontamination_radius()]
var ret = tr("DECONTAMINATE_%d_UNIT_AROUND_IT") % [get_decontamination_radius()]
return ret
func effect(plant):

View File

@ -5,7 +5,7 @@ func get_produce_number():
return [level - 1, level]
func get_effect_name() -> String:
return "Seed Production"
return tr("SEED_PRODUCTION")
func get_effect_description() -> String:
var number_str = ""
@ -13,12 +13,12 @@ func get_effect_description() -> String:
for i in range(len(get_produce_number())):
if i != 0:
if i == len(get_produce_number()) - 1:
number_str += " or "
number_str += tr("OR")
else :
number_str += ", "
number_str += tr("COMMA")
number_str += str(get_produce_number()[i])
return "Produce %s seeds" % [number_str]
return tr("PRODUCE_%s_SEEDS") % [number_str]
func effect(plant):
for _i in range(get_produce_number().pick_random()):

View File

@ -38,7 +38,7 @@ func get_rarity() -> int:
func card_section() -> CardSectionInfo:
var section = CardSectionInfo.new(
get_mutation_name() + (" %d" % level if level > 1 else ""),
"[b]%s[/b] %s" % [PlantMutation.get_rarity_text(get_rarity()), get_mutation_description()]
"[b]%s[/b] %s" % [tr(PlantMutation.get_rarity_text(get_rarity())), get_mutation_description()]
)
section.title_color = PlantMutation.get_rarity_color(get_rarity())
@ -49,11 +49,11 @@ func card_section() -> CardSectionInfo:
static func get_rarity_text(rarity) -> String:
var rarity_text : Array[String] = [
"Common",
"Rare",
"Very rare",
"Impossible",
"[rainbow]Absurd[/rainbow]",
"COMMON",
"RARE",
"VERY_RARE",
"IMPOSSIBLE",
"ABSURD",
]
if rarity < len(rarity_text):

View File

@ -10,10 +10,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Ancient"
return tr("ANCIENT")
func get_mutation_description() -> String:
return "When mature, add [b]1[/b] to the score for each [b]%d[/b] days passed" % get_day_factor()
return tr("ANCIENT_EFFECT_TEXT_LEVEL_%d") % get_day_factor()
func get_day_factor():
return max(1, DEFAULT_DAY_FACTOR - level + 1)

View File

@ -8,10 +8,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Elitist"
return tr("ELITIST")
func get_mutation_description() -> String:
return "When mature, add [b]%d[/b] to the score for each plant of the same species around, but score become 0 if none is around." % level
return tr("ELITIST_EFFECT_TEXT_LEVEL_%d") % level
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
if plant.influence_zone == null:

View File

@ -8,10 +8,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Ermit"
return tr("ERMIT")
func get_mutation_description() -> String:
return "Multiply the score by [b]%d[/b] if no plant is near, but set it to 0 otherwise." % get_score_multiplier()
return tr("ERMIT_EFFECT_TEXT_LEVEL_%d") % get_score_multiplier()
func get_score_multiplier():
return level + 1

View File

@ -8,10 +8,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Precocious"
return tr("PRECOCIOUS")
func get_mutation_description() -> String:
return "Add [b]%d[/b] to the score while the plant is growing" % level
return tr("PRECOCIOUS_EFFECT_TEXT_LEVEL_%d") % level
func mutate_score(plant_state : Plant.State, _plant : Plant, score) -> int:
return score + (0 if plant_state == Plant.State.MATURE else level)

View File

@ -8,10 +8,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Quality"
return tr("QUALITY")
func get_mutation_description() -> String:
return "Add [b]%d[/b] to the score if the plant is mature." % level
return tr("QUALITY_EFFECT_TEXT_LEVEL_%d") % level
func mutate_score(plant_state : Plant.State, _plant : Plant, score : int) -> int:
return score + (level if plant_state == Plant.State.MATURE else 0)

View File

@ -8,10 +8,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Quick"
return tr("QUICK")
func get_mutation_description() -> String:
return "Reduce the grow time by %d" % level
return tr("QUICK_EFFECT_TEXT_LEVEL_%d") % level
func mutate_grow_time(_plant : Plant, grow_time : int) -> int:
return max(grow_time - level, 0)

View File

@ -10,10 +10,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Sociable"
return tr("SOCIABLE")
func get_mutation_description() -> String:
return "When mature, add [b]%d[/b] to the score if near %d other plants" % [get_score_bonus(), NEAR_PLANT_NEEDED]
return tr("SOCIABLE_EFFECT_TEXT_LEVEL_%d") % [get_score_bonus(), NEAR_PLANT_NEEDED]
func get_score_bonus():
return (level + 2)

View File

@ -8,10 +8,10 @@ func get_base_rarity() -> int:
return 0
func get_mutation_name() -> String:
return "Strong"
return tr("STRONG")
func get_mutation_description() -> String:
return "Plus [b]%d[/b] percent of the score" % roundi(get_score_multiplier() * 100)
return tr("STRONG_EFFECT_TEXT_LEVEL_%d") % roundi(get_score_multiplier() * 100)
func get_score_multiplier():
return float(level)/2.

View File

@ -26,12 +26,12 @@ func card_info() -> CardInfo:
info.type_icon = Plant.PLANT_TYPE_ICON
info.stats.append(CardStatInfo.new(
"Grow in [b]%d[/b]" % default_growing_time,
tr("GROW_IN_%d") % default_growing_time,
Plant.GROWING_ICON
))
info.stats.append(CardStatInfo.new(
"[b]%d[/b] score when mature" % default_plant_score,
tr("%s_SCORE_WHEN_MATURE") % default_plant_score,
Plant.PLANT_POINT_ICON
))
@ -78,10 +78,10 @@ class Evolution:
class ScoreEvolution extends Evolution:
func get_title():
return "%s score evolution" % plant_type.name
return tr("%s_SCORE_EVOLUTION") % plant_type.name
func get_description():
return "Add [b]%s[/b] to the default score of the plant" % level
return tr("ADD_%s_TO_THE_DEFAULT_SCORE_OF_THE_PLANT") % level
func evolve(pt : PlantType = plant_type):
pt.default_plant_score += level
@ -103,10 +103,10 @@ class MatureEffectEvolution extends Evolution:
return pt.mature_effects[effect_index]
func get_title():
return "%s %s evolution" % [plant_type.name, get_effect().get_effect_name()]
return tr("%s_EVOLUTION") % plant_type.name
func get_description():
return "Upgrade the level of %s of %d" % [get_effect().get_effect_name(), level]
return tr("UPGRADE_THE_LEVEL_OF_%s_EFFECT_OF_%d_LEVEL") % [get_effect().get_effect_name(), level]
func evolve(pt : PlantType = plant_type):
get_effect(pt).level += level

View File

@ -51,7 +51,7 @@ func card_info() -> CardInfo:
info.stats.append(
CardStatInfo.new(
"Cost %d energy" % energy_usage,
tr("COST_%d_ENERGY") % energy_usage,
ENERGY_ICON
)
)
@ -59,13 +59,13 @@ func card_info() -> CardInfo:
if is_one_time_use():
info.stats.append(
CardStatInfo.new(
"One time use",
tr("ONE_TIME_USE"),
ONE_TIME_ICON
)
)
var effect_section = CardSectionInfo.new(
"Effect",
tr("EFFECT"),
get_description()
)
effect_section.title_icon = ACTION_ICON

View File

@ -23,7 +23,7 @@ func get_icon() -> Texture2D:
func use_text() -> String:
if machine_type:
return "Build " + machine_type.name
return tr("BUILD_%s") % machine_type.name
return ""
func is_one_time_use():

View File

@ -4,10 +4,10 @@ class_name Fork
const USE_INTERVAL = 0.15
func get_item_name() -> String:
return "Fork"
return tr("FORK")
func get_description() -> String:
return "Use it to harvest mature plants."
return tr("FORK_DESC_TEXT")
func get_icon() -> Texture2D:
return preload("res://common/icons/fork.svg")
@ -22,7 +22,7 @@ func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is Plant
func use_text() -> String:
return "Harvest"
return tr("HARVEST")
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
var areas = zone.get_affected_areas()

View File

@ -4,11 +4,10 @@ class_name Knife
const KNIFE_ZONE_RADIUS = 10
func get_item_name() -> String:
return "Knife"
return tr("KNIFE")
func get_description() -> String:
return "Use it to harvest mature plants. Do not cost energy."
return tr("KNIFE_DESC_TEXT")
func get_energy_used() -> int:
return 0

View File

@ -19,7 +19,7 @@ func get_icon() -> Texture2D:
return preload("res://common/icons/package.svg")
func use_text() -> String:
return "Open"
return tr("OPEN")
func is_one_time_use():
return true

View File

@ -11,10 +11,10 @@ const SCORE_ICON = preload("res://common/icons/growth.svg")
@export var plant_mutations: Array[PlantMutation]
func get_item_name() -> String:
return "%s Seed" % plant_type.name
return tr("%s_SEED") % plant_type.name
func get_description() -> String:
return "Plant [b]%s[/b]. Must be used in decontamined zone." % plant_type.name
return tr("PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE") % plant_type.name
func get_icon() -> Texture2D:
return plant_type.seed_texture
@ -23,7 +23,7 @@ func get_energy_used() -> int:
return 1
func get_usage_zone_radius() -> int:
return 40
return 35
func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is Plant
@ -36,7 +36,7 @@ func _init(
plant_mutations = Seed.mutate(_parent_mutation)
func use_text() -> String:
return "Plant " + plant_type.name
return tr("PLANT_%s") % plant_type.name
func is_one_time_use():
return true
@ -80,7 +80,7 @@ func card_info() -> CardInfo:
info.stats.append(
CardStatInfo.new(
"Cost %d energy" % energy_usage,
tr("COST_%d_ENERGY") % energy_usage,
ENERGY_ICON
)
)
@ -88,13 +88,13 @@ func card_info() -> CardInfo:
if is_one_time_use():
info.stats.append(
CardStatInfo.new(
"One time use",
tr("ONE_TIME_USE"),
ONE_TIME_ICON
)
)
var effect_section = CardSectionInfo.new(
"Effect",
tr("EFFECT"),
get_description()
)
effect_section.title_icon = ACTION_ICON

View File

@ -4,10 +4,10 @@ class_name Shovel
const SHOVEL_ZONE_RADIUS = 50
func get_item_name() -> String:
return "Shovel"
return tr("SHOVEL")
func get_description() -> String:
return "Can dig up buried seeds and can be used to harvest mature plants."
return tr("SHOVEL_DESC_TEXT")
func get_icon() -> Texture2D:
return preload("res://common/icons/shovel.svg")
@ -19,7 +19,7 @@ func get_usage_object_affected(i : InspectableEntity) -> bool:
return i is Plant or i is UndergroundLoot
func use_text() -> String:
return "Dig"
return tr("DIG")
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
var areas = zone.get_affected_areas()

View File

@ -4,10 +4,10 @@ class_name Trowel
const TROWEL_ZONE_RADIUS = 50
func get_item_name() -> String:
return "Trowel"
return tr("TROWEL")
func get_description() -> String:
return "Use it to harvest mature plants, can get a [b]bonus seed[/b] from each plant."
return tr("TROWEL_DESC_TEXT")
func get_icon() -> Texture2D:
return preload("res://common/icons/trowel.svg")

View File

@ -38,7 +38,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

View File

@ -7,7 +7,7 @@ const LOOTED_ITEM_RANDOM_RANGE = 50
@export var item_number : int = 1
func pointer_text() -> String:
return "Buried Loot"
return tr("BURIED_LOOT")
func generate_collision_shape() -> CollisionShape2D:
var collision = CollisionShape2D.new()

View File

@ -8,29 +8,27 @@ signal item_clicked()
const MODULATE_INSPECTED_COLOR = Color.GRAY
var current_item : Item = null
var item : Item = null
var was_selected : bool = false
func _ready():
mouse_entered.connect(_on_mouse_entered)
mouse_exited.connect(_on_mouse_excited)
mouse_entered.connect(
func(): Pointer.inspect(self)
)
mouse_exited.connect(
func(): Pointer.stop_inspect(self)
)
update(null, false)
func inspect(is_inspected : bool = true):
modulate = MODULATE_INSPECTED_COLOR if is_inspected else Color.WHITE
func _on_mouse_entered():
if current_item:
Pointer.inspect(self)
func _on_mouse_excited():
if current_item:
Pointer.stop_inspect(self)
func _on_gui_input(_event: InputEvent) -> void:
if Input.is_action_just_pressed("action"):
emit_signal("item_clicked")
func update(item: Item, selected : bool):
func update(_item: Item, selected : bool):
item = _item
if selected and not was_selected:
%SelectedAnimation.play("selected")
elif not selected and was_selected:

View File

@ -120,37 +120,19 @@ alignment = 1
[node name="PauseTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "Pause"
text = "PAUSE"
label_settings = SubResource("LabelSettings_apjlw")
horizontal_alignment = 1
[node name="StoryTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "Story"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="StoryText" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "You are a robot who has recently arrived on a barren planet. Find and plant seeds to reduce the contamination.
You have limited energy, but can recharge when passing days.
Each 7 days, you have to meet a quota of decontaminted lands.
You get a machine to build each quota reached."
horizontal_alignment = 1
[node name="ControlsTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "Controls"
text = "CONTROLS"
label_settings = ExtResource("3_0pdto")
horizontal_alignment = 1
[node name="ControlsText" type="Label" parent="Container/Tutorial/VBoxContainer"]
layout_mode = 2
text = "Directional Arrows/Right Click : Move
Left Click : Interact/Pickup Items
Mouse Wheel : Change current item
X : Drop Item
"
text = "CONTROLS_TEXT"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Container/Tutorial/VBoxContainer"]
@ -159,17 +141,17 @@ alignment = 1
[node name="Resume" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Resume Game"
text = "RESUME_GAME"
icon = ExtResource("5_apjlw")
[node name="Restart" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Restart"
text = "RESTART"
icon = ExtResource("6_58dya")
[node name="Quit" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Quit"
text = "QUIT"
icon = ExtResource("7_yj6f1")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]

View File

@ -2,6 +2,8 @@ extends CanvasLayer
var pause = false : set = set_pause
const PLANET_RUN_SCENE = preload("res://stages/planet_run/planet_run.tscn")
func set_pause(p):
if p != pause:
if p:
@ -22,7 +24,7 @@ func _on_resume_pressed():
func _on_restart_pressed():
GameInfo.game_data.reset_all()
pause = false
get_tree().reload_current_scene()
get_tree().change_scene_to_packed(PLANET_RUN_SCENE)
func _on_quit_pressed():
get_tree().quit()

View File

@ -92,8 +92,8 @@ class DiscoverPlantReward extends RewardData:
func reward_info() -> QuotaRewardChoiceInfo:
var info = QuotaRewardChoiceInfo.new()
info.title = "Discover %s" % new_plant_type.name
info.text = "%s seeds can now be found" % new_plant_type.name
info.title = tr("DISCOVER_%s") % new_plant_type.name
info.text = tr("%s_SEEDS_CAN_NOW_BE_FOUND") % new_plant_type.name
info.card_info = new_plant_type.card_info()
return info
@ -110,7 +110,7 @@ class EvolvePlantReward extends RewardData:
func reward_info() -> QuotaRewardChoiceInfo:
var info = QuotaRewardChoiceInfo.new()
info.title = "Evolve %s" % plant_evolution.plant_type.name
info.title = tr("EVOLVE_%s") % plant_evolution.plant_type.name
info.text = plant_evolution.get_description()
var preview_evolved_plant = plant_evolution.plant_type.duplicate_deep()
plant_evolution.evolve(preview_evolved_plant)

View File

@ -39,7 +39,7 @@ func _on_planet_updated(planet_data : PlanetData):
func planet_update(planet_data : PlanetData):
if planet_data:
%DayCount.text = "%d days left" % (planet_data.quota_days)
%DayCount.text = tr("%d_DAY_LEFT") % (planet_data.quota_days)
var quota_progression_percent : float = (float(planet_data.garden_score) / float(planet_data.get_quota_score())) * 100
%QuotaProgressText.text = "%d/%d" % [planet_data.garden_score, planet_data.get_quota_score()]
@ -83,14 +83,14 @@ func _on_planet_new_quota_started(planet_data : PlanetData):
func announce_quota(planet_data : PlanetData):
%Announce.announce(
"New Quota",
"Reach %d garden score before %d days" % [planet_data.get_quota_score(), planet_data.get_quota_duration()]
tr("NEW_QUOTA"),
tr("REACH_%d_GARDEN_SCORE_BEFORE_%d_DAYS") % [planet_data.get_quota_score(), planet_data.get_quota_duration()]
)
func _on_planet_pass_day_ended(planet:Planet):
if planet.data.quota_days == 1:
%Announce.announce(
"Last day for reaching quota",
tr("LAST_DAY_FOR_REACHING_QUOTA"),
str(roundi(planet.data.get_quota_score() - planet.garden.get_score())) + " garden score left",
Announce.RED_COLOR
)

View File

@ -61,7 +61,7 @@ class TakeShovelStep extends Step:
func generate_indicators(_p: Player, planet : Planet) -> Array[InGameIndicator]:
for entity in planet.entity_container.get_children():
if entity is ItemObject and entity.item is Shovel:
var indicator = generate_indicator("Take the Shovel")
var indicator = generate_indicator(tr("TAKE_THE_SHOVEL"))
indicator.follow_entity(entity)
return [
indicator
@ -88,7 +88,7 @@ class DigLootStep extends Step:
closest_loot = entity
if closest_loot:
var indicator = generate_indicator("Dig Underground Loot")
var indicator = generate_indicator(tr("DIG_UNDERGROUND_LOOT"))
indicator.follow_entity(closest_loot)
return [indicator]
return []
@ -104,7 +104,7 @@ class TakeSeedStep extends Step:
var indicators : Array[InGameIndicator] = []
for entity in planet.entity_container.get_children():
if entity is ItemObject and entity.item is Seed:
var indicator = generate_indicator("Take a seed")
var indicator = generate_indicator(tr("TAKE_A_SEED"))
indicator.follow_entity(entity)
indicators.append(
indicator
@ -119,7 +119,7 @@ class TakeSeedStep extends Step:
class PlantSeedStep extends Step:
func generate_indicators(_p: Player, planet : Planet) -> Array[InGameIndicator]:
var indicator = generate_indicator("Plant the seed in decontamined zone")
var indicator = generate_indicator(tr("PLANT_THE_SEED_IN_DECONTAMINED_ZONE"))
indicator.follow_game_position(Vector2(0,0) + planet.entity_container.global_position)
return [indicator]
@ -132,7 +132,7 @@ class PlantSeedStep extends Step:
class RechargeStep extends Step:
func generate_indicators(_p: Player, planet : Planet) -> Array[InGameIndicator]:
for entity in planet.entity_container.get_children():
var indicator = generate_indicator("Recharge to pass days")
var indicator = generate_indicator(tr("RECHARGE_TO_PASS_DAYS"))
indicator.follow_entity(entity)
if entity is TruckRecharge:
return [
@ -166,7 +166,7 @@ class HarvestMaturePlant extends Step:
var indicators : Array[InGameIndicator] = []
for entity in planet.entity_container.get_children():
if entity is Plant and entity.state == Plant.State.MATURE:
var indicator = generate_indicator("Harvest mature plants with shovel")
var indicator = generate_indicator(tr("HARVEST_MATURE_PLANTS_WITH_SHOVEL"))
indicator.follow_entity(entity)
indicators.append(
indicator

View File

@ -1,17 +1,19 @@
extends Control
const PLANET_RUN_SCENE = preload("res://stages/planet_run/planet_run.tscn")
func _ready():
visible = false
func win(planet : Planet):
visible = true
get_tree().paused = true
%WinTitle.text = "Score : " + str(roundi(planet.garden.get_score()))
%WinTitle.text = tr("SCORE_%d") % str(roundi(planet.garden.get_score()))
func _on_restart_pressed():
GameInfo.game_data.reset_all()
get_tree().paused = false
get_tree().reload_current_scene()
get_tree().change_scene_to_packed(PLANET_RUN_SCENE)
func _on_quit_pressed():
get_tree().quit()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3 uid="uid://0yr6b2jtuttm"]
[gd_scene load_steps=15 format=3 uid="uid://0yr6b2jtuttm"]
[ext_resource type="Script" uid="uid://vhumsfntpqcl" path="res://gui/pointer/scripts/pointer.gd" id="1_1pe2k"]
[ext_resource type="Texture2D" uid="uid://bspffyprdywgc" path="res://gui/pointer/assets/cursors/pointer.svg" id="2_q4bvb"]
@ -13,17 +13,14 @@
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="10_d4v46"]
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="11_s1ym6"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_s1ym6"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_6eft6"]
shader = ExtResource("7_wgcdp")
shader_parameter/fov = 90.0
shader_parameter/cull_back = true
shader_parameter/y_rot = 8.409235e-36
shader_parameter/x_rot = -9.785961e-36
shader_parameter/y_rot = -6e-45
shader_parameter/x_rot = -6e-45
shader_parameter/inset = 0.0
[sub_resource type="ViewportTexture" id="ViewportTexture_xb313"]
viewport_path = NodePath("SubViewport")
[sub_resource type="Resource" id="Resource_mrxa2"]
script = ExtResource("8_xb313")
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
@ -46,8 +43,8 @@ mouse_filter = 2
[node name="Container" type="VBoxContainer" parent="CanvasLayer/Inspector"]
layout_mode = 0
offset_left = 40.0
offset_right = 137.0
offset_left = 28.0
offset_right = 134.0
offset_bottom = 79.0
size_flags_horizontal = 0
size_flags_vertical = 0
@ -55,26 +52,30 @@ mouse_filter = 2
[node name="Action" type="HBoxContainer" parent="CanvasLayer/Inspector/Container"]
unique_name_in_owner = true
modulate = Color(1, 1, 0.168627, 1)
custom_minimum_size = Vector2(0, 20)
layout_mode = 2
[node name="MouseImage" type="TextureRect" parent="CanvasLayer/Inspector/Container/Action"]
layout_mode = 2
texture = ExtResource("3_pshoq")
expand_mode = 2
stretch_mode = 5
[node name="ActionEnergyImage" type="TextureRect" parent="CanvasLayer/Inspector/Container/Action"]
unique_name_in_owner = true
layout_mode = 2
texture = ExtResource("4_b4uwv")
expand_mode = 2
stretch_mode = 5
[node name="ActionText" type="Label" parent="CanvasLayer/Inspector/Container/Action"]
[node name="ActionText" type="RichTextLabel" parent="CanvasLayer/Inspector/Container/Action"]
unique_name_in_owner = true
z_index = 1
layout_mode = 2
text = "Take"
horizontal_alignment = 1
bbcode_enabled = true
text = "Hello ?"
fit_content = true
scroll_active = false
autowrap_mode = 0
[node name="ActionZone" type="Sprite2D" parent="CanvasLayer/Inspector"]
unique_name_in_owner = true
@ -111,16 +112,18 @@ offset_right = 175.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
theme_override_constants/margin_bottom = 30
theme_override_constants/margin_left = 0
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 0
theme_override_constants/margin_bottom = 0
[node name="CardVisualiser" parent="CardsCanvasLayer/CardPosition/MarginContainer" instance=ExtResource("6_7j4mj")]
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0.5003133)
material = SubResource("ShaderMaterial_s1ym6")
material = SubResource("ShaderMaterial_6eft6")
layout_mode = 2
size_flags_horizontal = 4
mouse_filter = 0
texture = SubResource("ViewportTexture_xb313")
card_info = SubResource("Resource_mrxa2")
[node name="Audio" type="Node" parent="."]

View File

@ -8,6 +8,7 @@ const ZONE_ACTIVATED_COLOR = Color.TURQUOISE
const ZONE_DEACTIVATED_COLOR = Color.REBECCA_PURPLE
const CARD_VISUALISATION_TIME = 0.5
const CARD_UP_PADDING = 20
@export var default_cursor : Texture2D
@ -90,16 +91,23 @@ func inspect(node : Node):
inspected = node
if inspected is InspectableEntity:
inspected_card_info = inspected.card_info()
elif inspected is InventoryGuiItem and inspected.item != null:
inspected_card_info = inspected.item.card_info()
else :
inspected_card_info = null
time_last_inspected = 0
if current_inspect.has_method("inspect"):
current_inspect.inspect(true)
update_inspector()
func update_card():
if not inspected or time_last_inspected > CARD_VISUALISATION_TIME:
if not inspected or inspected_card_info == null or time_last_inspected > CARD_VISUALISATION_TIME:
%CardVisualiser.hide()
elif inspected != null and inspected is InspectableEntity:
elif inspected != null and (
inspected is InspectableEntity
or inspected is InventoryGuiItem
):
if inspected_card_info != %CardVisualiser.card_info:
%CardVisualiser.card_info = inspected_card_info
@ -107,7 +115,10 @@ func update_card():
var camera = get_viewport().get_camera_2d()
var screen_size = get_viewport().get_visible_rect().size
%CardPosition.position = inspected.global_position - camera.global_position + screen_size / 2
if inspected is InspectableEntity:
%CardPosition.position = inspected.global_position - camera.global_position + screen_size / 2 + CARD_UP_PADDING * Vector2.UP
elif inspected is InventoryGuiItem:
%CardPosition.position = inspected.global_position + inspected.size/2 + CARD_UP_PADDING * Vector2.UP
if %CardVisualiser.is_mouse_over():
time_last_inspected = 0.

View File

@ -132,7 +132,8 @@ item_9={
[internationalization]
locale/translations=PackedStringArray("res://Translation/localization.en.translation", "res://Translation/localization.fr.translation")
locale/translation_remaps={}
locale/translations=PackedStringArray("res://translation/localization.en.translation", "res://translation/localization.fr.translation")
[rendering]

View File

@ -10,7 +10,7 @@
[node name="Root" type="Node2D"]
script = ExtResource("1_bf3um")
start_scene_path = "uid://d28cp7a21kwou"
start_scene_path = "uid://d0n52psuns1vl"
[node name="CanvasLayer" type="CanvasLayer" parent="."]
process_mode = 3

88
stages/intro/intro.tscn Normal file
View File

@ -0,0 +1,88 @@
[gd_scene load_steps=6 format=3 uid="uid://d0n52psuns1vl"]
[ext_resource type="Script" uid="uid://ddf3fktoer2ng" path="res://stages/intro/scripts/intro.gd" id="1_2nxbv"]
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_u726n"]
[ext_resource type="Script" uid="uid://bel0lb7kd8bf6" path="res://stages/intro/scripts/intro_step_language.gd" id="2_mi20s"]
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="3_mi20s"]
[ext_resource type="Script" uid="uid://d2wapgm313xhr" path="res://stages/intro/scripts/intro_step_story.gd" id="5_tg2p4"]
[node name="Intro" type="Node"]
script = ExtResource("1_2nxbv")
game_scene_path = "uid://d28cp7a21kwou"
[node name="LanguageChoose" type="CanvasLayer" parent="."]
visible = false
script = ExtResource("2_mi20s")
[node name="CenterContainer" type="VBoxContainer" parent="LanguageChoose"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_u726n")
alignment = 1
[node name="Label" type="Label" parent="LanguageChoose/CenterContainer"]
layout_mode = 2
text = "Choose a language"
label_settings = ExtResource("3_mi20s")
horizontal_alignment = 1
[node name="LanguageButtonsContainer" type="HBoxContainer" parent="LanguageChoose/CenterContainer"]
unique_name_in_owner = true
layout_mode = 2
theme = ExtResource("1_u726n")
alignment = 1
[node name="Story" type="CanvasLayer" parent="."]
script = ExtResource("5_tg2p4")
[node name="CenterContainer2" type="CenterContainer" parent="Story"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="CenterContainer" type="VBoxContainer" parent="Story/CenterContainer2"]
layout_mode = 2
theme = ExtResource("1_u726n")
alignment = 1
[node name="Label" type="Label" parent="Story/CenterContainer2/CenterContainer"]
layout_mode = 2
text = "STORY"
label_settings = ExtResource("3_mi20s")
horizontal_alignment = 1
[node name="Story" type="RichTextLabel" parent="Story/CenterContainer2/CenterContainer"]
custom_minimum_size = Vector2(500, 0)
layout_mode = 2
theme = ExtResource("1_u726n")
theme_override_font_sizes/normal_font_size = 16
theme_override_font_sizes/bold_font_size = 16
theme_override_font_sizes/bold_italics_font_size = 16
theme_override_font_sizes/italics_font_size = 16
theme_override_font_sizes/mono_font_size = 16
bbcode_enabled = true
text = "STORY_TEXT"
fit_content = true
horizontal_alignment = 1
[node name="ControlsTitle" type="Label" parent="Story/CenterContainer2/CenterContainer"]
layout_mode = 2
text = "CONTROLS"
label_settings = ExtResource("3_mi20s")
horizontal_alignment = 1
[node name="ControlsText" type="Label" parent="Story/CenterContainer2/CenterContainer"]
layout_mode = 2
text = "CONTROLS_TEXT"
horizontal_alignment = 1
[node name="Button" type="Button" parent="Story/CenterContainer2/CenterContainer"]
layout_mode = 2
text = "OK"
[connection signal="pressed" from="Story/CenterContainer2/CenterContainer/Button" to="Story" method="_on_button_pressed"]

View File

@ -0,0 +1,28 @@
extends Node
class_name Intro
var steps : Array[IntroStep]
@export_file var game_scene_path : String
func _ready():
for c in get_children():
if c is IntroStep:
steps.append(c)
c.hide()
for i in range(len(steps)):
steps[i].step_over.connect(
func():
change_step(i+1)
)
change_step(0)
func change_step(nb):
if nb >= len(steps):
get_tree().change_scene_to_file(game_scene_path)
for i in range(len(steps)):
if i == nb:
steps[i].show()
else :
steps[i].hide()

View File

@ -0,0 +1 @@
uid://ddf3fktoer2ng

View File

@ -0,0 +1,5 @@
extends CanvasLayer
class_name IntroStep
signal step_over

View File

@ -0,0 +1 @@
uid://c25snxxc5jdmp

View File

@ -0,0 +1,19 @@
extends IntroStep
class_name IntroStepLanguage
const DEFAULT_THEME = preload("res://gui/ressources/default_theme.tres")
func _ready():
for i in range(len(SettingsData.AVAILABLE_LANGUAGES)):
var button = Button.new()
button.theme = DEFAULT_THEME
button.text = SettingsData.AVAILABLE_LANGUAGES_LABEL[i]
button.pressed.connect(
func (): choose_language(SettingsData.AVAILABLE_LANGUAGES[i])
)
%LanguageButtonsContainer.add_child(button)
func choose_language(language_code):
TranslationServer.set_locale(language_code)
step_over.emit()

View File

@ -0,0 +1 @@
uid://bel0lb7kd8bf6

View File

@ -0,0 +1,5 @@
extends IntroStep
class_name IntroStepStory
func _on_button_pressed():
step_over.emit()

View File

@ -0,0 +1 @@
uid://d2wapgm313xhr

View File

@ -66,27 +66,6 @@ func get_decontamination_coverage() -> float:
func get_decontamination_surface() -> float:
return garden_contamination.get_value_surface()
#region ------------------ Objectives ------------------
func generate_objective_rewards(level = 0) -> Array[ObjectiveReward]:
var amount = level + 1
var possible_objective_rewards_path : Array[ObjectiveReward] = [
LootRandomSeedsReward.new(randi_range(4+level, 6+level))
]
var objectives_reward : Array[ObjectiveReward] = []
var i = 0
while i < amount and len(possible_objective_rewards_path) > 0:
var r = possible_objective_rewards_path.pick_random()
possible_objective_rewards_path.erase(r)
objectives_reward.append(r)
i += 1
return objectives_reward
#endregion
#region ------------------ Quotas ------------------
func get_quota_score(q : int = quota) -> int:
var first_quotas = [