ajout de la traduction #70
* Fix de l'inspection de l'inventaire * Suppression des assets d'objectifs
@@ -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="."]
|
||||
|
||||
|
Before Width: | Height: | Size: 127 KiB |
@@ -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
|
||||
|
Before Width: | Height: | Size: 49 KiB |
@@ -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
|
||||
|
Before Width: | Height: | Size: 16 KiB |
@@ -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
|
||||
|
Before Width: | Height: | Size: 40 KiB |
@@ -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
|
||||
|
Before Width: | Height: | Size: 117 KiB |
@@ -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
|
||||
|
Before Width: | Height: | Size: 24 KiB |
@@ -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
|
||||
|
Before Width: | Height: | Size: 26 KiB |
@@ -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
|
||||
@@ -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")
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
uid://j8fpi8rd8eyy
|
||||
@@ -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 ""
|
||||
@@ -1 +0,0 @@
|
||||
uid://bsh4b8miag8w1
|
||||
@@ -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
|
||||
)
|
||||
@@ -1 +0,0 @@
|
||||
uid://dva05p817w00f
|
||||
@@ -1 +0,0 @@
|
||||
uid://dot5gfkbm7p6s
|
||||
@@ -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
|
||||
)
|
||||
@@ -1 +0,0 @@
|
||||
uid://bcdilfb4j7f6d
|
||||
@@ -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) + "."
|
||||
@@ -1 +0,0 @@
|
||||
uid://4ak4kre3emnd
|
||||
@@ -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) + "."
|
||||
@@ -1 +0,0 @@
|
||||
uid://qywwuv3et7oq
|
||||
@@ -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) + "."
|
||||
@@ -1 +0,0 @@
|
||||
uid://cflvw3bfcocnn
|
||||
@@ -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
|
||||
))
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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()):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||