Compare commits
5 Commits
5d029d24c7
...
b9a0a33ac7
| Author | SHA1 | Date | |
|---|---|---|---|
| b9a0a33ac7 | |||
| 1179e04956 | |||
| a8bb09407e | |||
| ed675ed532 | |||
|
|
11ae967845 |
135
Translation/localization.csv
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
keys,en,fr
|
||||||
|
STORY_TEXT,"[b]You are a lone robot, sent on a contaminated planet.[/b]
|
||||||
|
Your job : planting seeds to restore life on the planet. Each seed has different effects and grant you garden points, [b]you have to reach a certain garden score each 7 days to continue[/b].
|
||||||
|
Be careful, [b]you can only plant in the decontamined zone[/b], but some plants can decontaminate your garden.
|
||||||
|
[b]Good luck![/b]","[b]Vous êtes un robot, envoyé seul sur une planète contaminée.[/b]
|
||||||
|
Votre mission : planter des graines pour redonner vie à cette planète. Chaque graine a des effets uniques et vous octroie des points de jardin, [b]vous devrez atteindre un certain score de jardin tous les 7 jours pour continuer[/b].
|
||||||
|
Attention, [b]vous ne pouvez planter que dans la zone décontaminée[/b], mais certaines plantes peuvent décontaminer votre jardin.
|
||||||
|
[b]Bonne chance ![/b]"
|
||||||
|
CONTROLS_TEXT,"Directional Arrows/Right Click : Move
|
||||||
|
Left Click : Interact/Pick up
|
||||||
|
Mouse Wheel : Change held item
|
||||||
|
X : Drop Item","Flèches directionnelles/Clic droit : Se déplacer
|
||||||
|
Clic Gauche : Interagir/Ramasser
|
||||||
|
Molette : Changer l'objet en main
|
||||||
|
X : Lâcher l’objet"
|
||||||
|
STORY,Story,Histoire
|
||||||
|
OK,Ok,Ok
|
||||||
|
COMMA,", ",","
|
||||||
|
OR," or "," ou "
|
||||||
|
PAUSE,Pause,Pause
|
||||||
|
CONTROLS,Controls,Contrôles
|
||||||
|
RESUME_GAME,Resume,Reprendre
|
||||||
|
RESTART,Restart,Recommencer
|
||||||
|
QUIT,Quit,Quitter
|
||||||
|
SEED,Seed,Graine
|
||||||
|
TAKE,Take,Prendre
|
||||||
|
PACKAGE,Crate,Caisse de matériel
|
||||||
|
DESCRIPTION,Description,Description
|
||||||
|
USE,Use,Utiliser
|
||||||
|
ON_MATURE,On maturation,Une fois mature
|
||||||
|
WHEN_HARVESTED,When harvested,A la récolte
|
||||||
|
EACH_DAY_WHEN_MATURE,"Each day, when mature,","Chaque jour, après maturation,"
|
||||||
|
COMMON,Common,Commun
|
||||||
|
RARE,Rare,Rare
|
||||||
|
VERY_RARE,Very rare,Très rare
|
||||||
|
IMPOSSIBLE,Impossible,Impossible
|
||||||
|
EFFECT,Effect,Effet
|
||||||
|
MATURE,Mature,Mature
|
||||||
|
GROWING,Growing,En train de pousser
|
||||||
|
DECONTAMINATE,Decontaminate,Décontamine
|
||||||
|
%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,Atteins un score de jardin de %d avant %d jours
|
||||||
|
LAST_DAY_FOR_REACHING_QUOTA,Last day to reach the quota,Dernier jour pour atteindre le quota
|
||||||
|
RECHARGE_%d_ENERGY,Recharge %d energy,Recharge %d d’énergie
|
||||||
|
%d_DAYS_BEFORE_CHARGE,%d days before being charged,%d jours avant d’être chargé
|
||||||
|
1_DAY_BEFORE_CHARGE,1 day before being charged,1 jour avant avant d’être chargé
|
||||||
|
CHARGED,Charged,Chargé
|
||||||
|
WHEN_FILLED,When filled,Si rempli
|
||||||
|
GIVE_THE_FOLLOWING_ITEM_%s,Give the following item : [b]%s[/b],Donne l’objet suivant : [b]%s[/b]
|
||||||
|
UPGRADE_MAX_ENERGY,Increases maximum energy,Augmente l’énergie maximum
|
||||||
|
UPGRADE_MAX_INVENTORY_SIZE,Increases inventory size,Augmente la taille de l’inventaire
|
||||||
|
DECONTAMINATE_%d_UNIT_AROUND_IT,Decontaminate %d unit around it,Décontamine %d unités autour d’elle
|
||||||
|
SEED_PRODUCTION,Seed Production,Production de graines
|
||||||
|
PRODUCE_%s_SEEDS,Produce %s seeds,Produit %s graines
|
||||||
|
DAY_%d,Day [b]%d[/b],Jour [b]%d[/b]
|
||||||
|
MATURE_ON_DAY_%d,Mature on day [b]%d[/b],Mature au jour [b]%d[/b]
|
||||||
|
%d_SCORE_WHEN_MATURE,Grants [b]%d[/b] garden points when mature,Donne [b]%d[/b] points de jardin une fois mature
|
||||||
|
ABSURD,[rainbow]Absurd[/rainbow],[rainbow]Absurde[rainbow]
|
||||||
|
GROW_IN_%d,Grow in [b]%d[/b] days,Mature dans [b]%d[/b] jours
|
||||||
|
%s_SCORE_WHEN_MATURE,Grants [b]%s[/b] garden points when mature,Donne [b]%s[/b] points de jardin une fois mature
|
||||||
|
DISCOVER_%s,Discover %s,Découvre %s
|
||||||
|
EVOLVE_%s,Upgrade %s,Améliore %s
|
||||||
|
%s_SEEDS_CAN_NOW_BE_FOUND,%s seeds can now be found,Des graines de %s peuvent maintenant être trouvées
|
||||||
|
%s_SCORE_EVOLUTION,%s score evolution,Évolution de score de %s
|
||||||
|
ADD_%s_TO_THE_DEFAULT_SCORE_OF_THE_PLANT,Add [b]%s[/b] to the default score of the plant,Améliore le score de jardin de la plante de [b]%s[/b]
|
||||||
|
%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,Ancien
|
||||||
|
ANCIENT_EFFECT_TEXT_LEVEL_%d,"When mature, grants [b]1[/b] garden points each [b]%d[/b] days","Une fois mature, donne [b]1[/b] points de jardin tous les [b]%d[/b] jours"
|
||||||
|
ELITIST,Elitist,Élitiste
|
||||||
|
ELITIST_EFFECT_TEXT_LEVEL_%d,"When mature, grants [b]%d[/b] garden points for each plant of the same species around, but do not give any points if it is alone.","Une fois mature, donne [b]%d[/b] points de jardin pour chaque plante de la même espèce aux alentours, mais n’en donne aucun si elle est seule."
|
||||||
|
ERMIT,Hermit,Ermite
|
||||||
|
ERMIT_EFFECT_TEXT_LEVEL_%d,"Multiply the garden score by [b]%d[/b] if no plants are nearby, otherwise, set it to 0.","Multiplie le score de jardin par [b]%d[/b] si aucune plante n’est proche, sinon le score est nul."
|
||||||
|
PRECOCIOUS,Precocious,Précoce
|
||||||
|
PRECOCIOUS_EFFECT_TEXT_LEVEL_%d,Grants [b]%d[/b] garden points while the plant is growing,Donne [b]%d[/b] points de jardin pendant que la plante grandit
|
||||||
|
QUALITY,Quality,Qualité
|
||||||
|
QUALITY_EFFECT_TEXT_LEVEL_%d,Grants [b]%d[/b] garden points if the plant is mature.,Donne [b]%d[/b] points de jardin si la plante est mature.
|
||||||
|
QUICK,Quick,Rapide
|
||||||
|
QUICK_EFFECT_TEXT_LEVEL_%d,Reduce the growing time by %d,Réduit le temps de maturation de %d
|
||||||
|
SOCIABLE,Outgoing,Sociable
|
||||||
|
SOCIABLE_EFFECT_TEXT_LEVEL_%d,"When mature, grants [b]%d[/b] garden points if it is nearby %d other plants","Une fois mature, donne [b]%d[/b] points de jardin si elle est à côté de %d autres plantes"
|
||||||
|
STRONG,Strong,Fort
|
||||||
|
STRONG_EFFECT_TEXT_LEVEL_%d,Plus [b]%d[/b] % of the score,Augmente le score de [b]%d[/b] %
|
||||||
|
COST_%d_ENERGY,Cost %d energy,Coûte %d d’énergie
|
||||||
|
ONE_TIME_USE,Single use,Usage unique
|
||||||
|
BUILD_%s,Build %s,Construit %s
|
||||||
|
FORK,Fork,Fourche
|
||||||
|
FORK_DESC_TEXT,"Use it to [b]harvest mature plants[/b].","Utilise-la pour [b]récolter les plantes mature[/b]."
|
||||||
|
HARVEST,Harvest,Récolter
|
||||||
|
KNIFE,Knife,Couteau
|
||||||
|
KNIFE_DESC_TEXT,"Use it to [b]harvest mature plants[/b]. Does not consume energy.",Utilise-le pour [b]récolter les plantes mature[/b]. Ne consomme pas d’énergie.
|
||||||
|
SHOVEL,Shovel,Pelle
|
||||||
|
SHOVEL_DESC_TEXT,"Use it to [b]dig up seeds[/b] and [b]harvest mature plants[/b].","Utilise-la pour [b]déterrer les graines[/b] et pour [b]récolter les plantes mature[/b]."
|
||||||
|
TROWEL,Trowel,Truelle
|
||||||
|
TROWEL_DESC_TEXT,"Use it to [b]harvest mature plants[/b]. Can grant a [b]bonus seed[/b].","Utilise-la pour [b]récolter les plantes mature[/b]. Peut donner une [b]graine supplémentaire[/b]."
|
||||||
|
DIG,Dig,Creuser
|
||||||
|
OPEN,Open,Ouvrir
|
||||||
|
%s_SEED,%s Seed,Graine de %s
|
||||||
|
PLANT_%s_MUST_BE_USED_IN_DECONTAMINATED_ZONE,Plant [b]%s[/b]. Must be used in the decontamined zone.,Plante [b]%s[/b]. Doit être utilisée dans la zone décontaminée.
|
||||||
|
PLANT_%s,Plant [b]%s[/b],Planter [b]%s[/b]
|
||||||
|
BURIED_SEEDS,Buried seeds,Graines enterrées
|
||||||
|
BURIED_SEEDS_DESC_TEXT,"Contain some random seeds. [b]Dig it with a shovel.[/b]","Contient des graines enterrées. [b]Peuvent être déterrées avec une pelle[/b]"
|
||||||
|
TAKE_THE_SHOVEL,Take the shovel,Prend la pelle
|
||||||
|
DIG_UNDERGROUND_LOOT,Dig up the buried resources,Déterre les graines enterrées
|
||||||
|
TAKE_A_SEED,Take a seed,Prend une graine
|
||||||
|
PLANT_THE_SEED_IN_DECONTAMINED_ZONE,Plant the seed in the decontamined zone,Plante la graine dans la zone décontaminée
|
||||||
|
RECHARGE_TO_PASS_DAYS,Recharge to pass the day,Recharge-toi pour passer la journée
|
||||||
|
HARVEST_MATURE_PLANTS_WITH_SHOVEL,Harvest mature plants with the shovel,Récolte les plantes matures avec la pelle
|
||||||
|
SCORE_%d,Score : %d,Score : %d
|
||||||
|
SOLAR_PANNEL,Solar panel,Panneau solaire
|
||||||
|
SOLAR_PANNEL_DESCRIPTION_TEXT,Grants energy when charged. Take several days to recharge,Donne de l’énergie quand chargé. Prend plusieurs jours à se recharger
|
||||||
|
TRUCK_ENTRANCE,Truck entrance,Entrée du camion
|
||||||
|
ENTER_TRUCK,Enter truck,Entrer dans le camion
|
||||||
|
EXIT,Exit,Sortie
|
||||||
|
EXIT_TRUCK,Exit truck,Sortir du camion
|
||||||
|
LADDER_DESC_TEXT,A good old ladder,Une bonne vieille échelle
|
||||||
|
RECHARGE_STATION,Recharge station,Station de recharge
|
||||||
|
RECHARGE,Recharge,Recharger
|
||||||
|
RECHARGE_STATION_DESC_TEXT,"[b]You can recharge yourself here.[/b] When recharging, time pass and plants grow.","[b]Tu peux te recharger ici.[/b] Pendant la recharge, le temps passe et les plantes grandissent."
|
||||||
|
COMPOST,Compost,Compost
|
||||||
|
PLACE_SEED,Place seed,Placer la graine
|
||||||
|
COMPOST_DESC_TEXT,This research station can provide some bonuses when filled with seeds,Cette station de recherche peut offrir certains avantages une fois remplie de graines
|
||||||
|
CHOOSE_A_REWARD,Choose a reward,Choisis une récompense
|
||||||
|
REWARD_SCREEN_TEXT,Discover new plants or upgrade already discovered ones,Découvre de nouvelles plantes ou améliore celles déjà découvertes
|
||||||
|
THANKS_FOR_PLAYING,Thanks for playing !,Merci d’avoir joué !
|
||||||
|
WIN_SCREEN_TEXT,We need your feedback ! Give us your thoughts on the game on our Discord or in the comments section of this page !,Nous avons besoin de ton retour ! Donne-le nous sur notre Discord ou dans la section commentaire de cette page !
|
||||||
|
JOIN_OUR_DISCORD,Join our Discord,Rejoins-nous
|
||||||
|
ART,Art,Art
|
||||||
|
DEV_AND_GAME_DESIGN,Development and Game Design,Développement et Game Design
|
||||||
|
MUSIC,Music,Musique
|
||||||
|
START,Start,Commencer
|
||||||
|
CHOOSE_A_LANGUAGE,Choose a language,Choisissez une langue
|
||||||
|
NO_ENERGY_LEFT," (no energy left)", " (pas d'énergie restante)"
|
||||||
|
%d_GARDEN_SCORE_LEFT,"%d garden score left","%d score de jardin restant"
|
||||||
|
17
Translation/localization.csv.import
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="csv_translation"
|
||||||
|
type="Translation"
|
||||||
|
uid="uid://dfymfpql8yxwt"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
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]
|
||||||
|
|
||||||
|
compress=true
|
||||||
|
delimiter=0
|
||||||
@ -8,6 +8,8 @@ func _init():
|
|||||||
|
|
||||||
@export var tutorial_done = false
|
@export var tutorial_done = false
|
||||||
|
|
||||||
|
@export var settings : SettingsData = SettingsData.new()
|
||||||
|
|
||||||
@export var current_planet_data : PlanetData = PlanetData.new() :
|
@export var current_planet_data : PlanetData = PlanetData.new() :
|
||||||
set(v):
|
set(v):
|
||||||
current_planet_data = v
|
current_planet_data = v
|
||||||
@ -21,7 +23,6 @@ func _init():
|
|||||||
@export var truck_data : TruckData = TruckData.new()
|
@export var truck_data : TruckData = TruckData.new()
|
||||||
|
|
||||||
func set_default_unlocked():
|
func set_default_unlocked():
|
||||||
unlocked_plant_types = all_plant_types()
|
|
||||||
unlocked_plant_mutations = all_plant_mutations()
|
unlocked_plant_mutations = all_plant_mutations()
|
||||||
unlocked_machines = all_machines()
|
unlocked_machines = all_machines()
|
||||||
|
|
||||||
@ -39,6 +40,25 @@ func reset_all():
|
|||||||
reset_player()
|
reset_player()
|
||||||
reset_truck()
|
reset_truck()
|
||||||
|
|
||||||
|
unlocked_plant_types = []
|
||||||
|
|
||||||
|
func unlock_plant_type(new_plant_type : PlantType):
|
||||||
|
if not is_plant_type_unlocked(new_plant_type):
|
||||||
|
unlocked_plant_types.append(new_plant_type.duplicate_deep())
|
||||||
|
|
||||||
|
func get_locked_plant_types() -> Array[PlantType]:
|
||||||
|
var locked_plant_type : Array[PlantType] = []
|
||||||
|
|
||||||
|
for pt in GameInfo.game_data.all_plant_types():
|
||||||
|
if not is_plant_type_unlocked(pt):
|
||||||
|
locked_plant_type.append(pt)
|
||||||
|
|
||||||
|
return locked_plant_type
|
||||||
|
|
||||||
|
func is_plant_type_unlocked(new_plant_type : PlantType):
|
||||||
|
return unlocked_plant_types.find_custom(
|
||||||
|
func (upt : PlantType): return new_plant_type.name == upt.name
|
||||||
|
) != -1
|
||||||
|
|
||||||
|
|
||||||
func all_plant_types() -> Array[PlantType]:
|
func all_plant_types() -> Array[PlantType]:
|
||||||
|
|||||||
11
common/game_data/scripts/settings_data.gd
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
extends Resource
|
||||||
|
class_name SettingsData
|
||||||
|
|
||||||
|
const AVAILABLE_LANGUAGES = [
|
||||||
|
"en",
|
||||||
|
"fr",
|
||||||
|
]
|
||||||
|
const AVAILABLE_LANGUAGES_LABEL = [
|
||||||
|
"English",
|
||||||
|
"Français",
|
||||||
|
]
|
||||||
1
common/game_data/scripts/settings_data.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://babsy24iv5yox
|
||||||
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/ambiance_phase_1.ogg-4ec046572bfe46745950c2c7
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=0.0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|||||||
@ -12,7 +12,7 @@ dest_files=["res://.godot/imported/ambiance_phase_2.ogg-2260c3829d7e53dd94462ea7
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0.0
|
loop_offset=0.0
|
||||||
bpm=0.0
|
bpm=0.0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
|
|||||||
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/forest_phase_1.ogg-6bf54bf177c3c359a54aab9723
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=0.0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|||||||
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/forest_phase_2.ogg-0fc72a5b1a0f8f7e98246db80e
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=0.0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|||||||
BIN
common/music/assets/morceaux/forest_phase_3.ogg
Normal file
19
common/music/assets/morceaux/forest_phase_3.ogg.import
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="oggvorbisstr"
|
||||||
|
type="AudioStreamOggVorbis"
|
||||||
|
uid="uid://d4lqhgf0lhgge"
|
||||||
|
path="res://.godot/imported/forest_phase_3.ogg-55f42a1f5a8a4849a773f18490a0844b.oggvorbisstr"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://common/music/assets/morceaux/forest_phase_3.ogg"
|
||||||
|
dest_files=["res://.godot/imported/forest_phase_3.ogg-55f42a1f5a8a4849a773f18490a0844b.oggvorbisstr"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
loop=false
|
||||||
|
loop_offset=0
|
||||||
|
bpm=0
|
||||||
|
beat_count=0
|
||||||
|
bar_beats=4
|
||||||
@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/truck_music.ogg-cb4f770bcd6358719b9d817459f5f
|
|||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
loop=false
|
loop=true
|
||||||
loop_offset=0
|
loop_offset=0.0
|
||||||
bpm=0
|
bpm=0.0
|
||||||
beat_count=0
|
beat_count=0
|
||||||
bar_beats=4
|
bar_beats=4
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=11 format=3 uid="uid://b6hscxcrj065q"]
|
[gd_scene load_steps=12 format=3 uid="uid://b6hscxcrj065q"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://2p5d6vogtn82" path="res://common/music/scripts/music.gd" id="1_ji160"]
|
[ext_resource type="Script" uid="uid://2p5d6vogtn82" path="res://common/music/scripts/music.gd" id="1_ji160"]
|
||||||
[ext_resource type="AudioStream" uid="uid://diyefcv8tqa3r" path="res://common/music/assets/morceaux/forest_phase_1.ogg" id="1_stre8"]
|
[ext_resource type="AudioStream" uid="uid://diyefcv8tqa3r" path="res://common/music/assets/morceaux/forest_phase_1.ogg" id="1_stre8"]
|
||||||
@ -7,6 +7,7 @@
|
|||||||
[ext_resource type="AudioStream" uid="uid://bm0tdi6bd2e65" path="res://common/music/assets/ambiance/ambiance_phase_2.ogg" id="5_a71a3"]
|
[ext_resource type="AudioStream" uid="uid://bm0tdi6bd2e65" path="res://common/music/assets/ambiance/ambiance_phase_2.ogg" id="5_a71a3"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dftxjfdqgsbd3" path="res://common/music/assets/ambiance/ambiance_phase_3.ogg" id="6_i5lxw"]
|
[ext_resource type="AudioStream" uid="uid://dftxjfdqgsbd3" path="res://common/music/assets/ambiance/ambiance_phase_3.ogg" id="6_i5lxw"]
|
||||||
[ext_resource type="AudioStream" uid="uid://brtjlgjqnrvcb" path="res://common/music/assets/morceaux/truck_music.ogg" id="7_a71a3"]
|
[ext_resource type="AudioStream" uid="uid://brtjlgjqnrvcb" path="res://common/music/assets/morceaux/truck_music.ogg" id="7_a71a3"]
|
||||||
|
[ext_resource type="AudioStream" uid="uid://d4lqhgf0lhgge" path="res://common/music/assets/morceaux/forest_phase_3.ogg" id="7_i5lxw"]
|
||||||
|
|
||||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i5lxw"]
|
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i5lxw"]
|
||||||
stream_count = 3
|
stream_count = 3
|
||||||
@ -18,11 +19,13 @@ stream_2/stream = ExtResource("6_i5lxw")
|
|||||||
stream_2/volume = -60.0
|
stream_2/volume = -60.0
|
||||||
|
|
||||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i0tje"]
|
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_i0tje"]
|
||||||
stream_count = 2
|
stream_count = 3
|
||||||
stream_0/stream = ExtResource("1_stre8")
|
stream_0/stream = ExtResource("1_stre8")
|
||||||
stream_0/volume = -60.0
|
stream_0/volume = -60.0
|
||||||
stream_1/stream = ExtResource("2_ji160")
|
stream_1/stream = ExtResource("2_ji160")
|
||||||
stream_1/volume = -60.0
|
stream_1/volume = -60.0
|
||||||
|
stream_2/stream = ExtResource("7_i5lxw")
|
||||||
|
stream_2/volume = -60.0
|
||||||
|
|
||||||
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_w0e2r"]
|
[sub_resource type="AudioStreamSynchronized" id="AudioStreamSynchronized_w0e2r"]
|
||||||
stream_count = 1
|
stream_count = 1
|
||||||
|
|||||||
@ -48,7 +48,6 @@ func get_all_audio_stream() -> Array[AudioStreamPlayer]:
|
|||||||
var all_children = %Ambiance.get_children()
|
var all_children = %Ambiance.get_children()
|
||||||
all_children.append_array(%Musics.get_children())
|
all_children.append_array(%Musics.get_children())
|
||||||
|
|
||||||
print(all_children)
|
|
||||||
for c in all_children:
|
for c in all_children:
|
||||||
if c is AudioStreamPlayer:
|
if c is AudioStreamPlayer:
|
||||||
all_audio_stream.append(c)
|
all_audio_stream.append(c)
|
||||||
@ -60,9 +59,9 @@ func _on_current_planet_data_updated(planet_data : PlanetData):
|
|||||||
planet_data.updated.connect(update_garden_phase)
|
planet_data.updated.connect(update_garden_phase)
|
||||||
|
|
||||||
func update_garden_phase(planet_data : PlanetData):
|
func update_garden_phase(planet_data : PlanetData):
|
||||||
var phase : int = 0
|
var phase : int = garden_phase
|
||||||
for i in range(len(garden_phases_scores)):
|
for i in range(len(garden_phases_scores)):
|
||||||
if planet_data.garden_score >= garden_phases_scores[i]:
|
if planet_data.garden_score >= garden_phases_scores[i] and i > garden_phase:
|
||||||
phase = i
|
phase = i
|
||||||
|
|
||||||
update_phase()
|
update_phase()
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
[gd_resource type="AudioBusLayout" format=3 uid="uid://br1p68sy17lcg"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
@ -28,14 +28,14 @@ func pointer_text() -> String:
|
|||||||
var name_suffix = ""
|
var name_suffix = ""
|
||||||
|
|
||||||
if item is Seed:
|
if item is Seed:
|
||||||
name_suffix = "Seed"
|
name_suffix = tr("SEED")
|
||||||
if item is Package:
|
if item is Package:
|
||||||
name_suffix = "Package"
|
name_suffix = tr("PACKAGE")
|
||||||
|
|
||||||
return item.name + (" " + name_suffix if name_suffix else "")
|
return item.name + (" " + name_suffix if name_suffix else "")
|
||||||
|
|
||||||
func interact_text():
|
func interact_text():
|
||||||
return "Take"
|
return tr("TAKE")
|
||||||
|
|
||||||
func card_info() -> CardInfo:
|
func card_info() -> CardInfo:
|
||||||
return item.card_info()
|
return item.card_info()
|
||||||
@ -54,6 +54,7 @@ func pickup_animation(player : Player):
|
|||||||
tween.tween_property(self, "position", player.position, 0.2)
|
tween.tween_property(self, "position", player.position, 0.2)
|
||||||
tween.tween_callback(
|
tween.tween_callback(
|
||||||
func():
|
func():
|
||||||
|
Pointer.stop_inspect(self)
|
||||||
queue_free()
|
queue_free()
|
||||||
)
|
)
|
||||||
if object_sprite:
|
if object_sprite:
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
extends Machine
|
extends Machine
|
||||||
class_name SolarPanel
|
class_name SolarPanel
|
||||||
|
|
||||||
|
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
|
||||||
|
|
||||||
var charged : bool = false
|
var charged : bool = false
|
||||||
var recharge_days : int = 0
|
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
|
%Flair.modulate = Color.WHITE if charged else Color.TRANSPARENT
|
||||||
%Pannels.modulate = Color.WHITE if charged else Color("6c6c6c")
|
%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():
|
func setup_machine_sprite():
|
||||||
# %Base.self_modulate = Machine.get_level_color(level)
|
# %Base.self_modulate = Machine.get_level_color(level)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func interact_text():
|
func interact_text():
|
||||||
return "Recharge " + str(get_energy_production()) + " energy"
|
return tr("RECHARGE_%d_ENERGY") % get_energy_production()
|
||||||
|
|
||||||
func can_interact(_p : Player) -> bool:
|
func can_interact(_p : Player) -> bool:
|
||||||
return charged
|
return charged
|
||||||
@ -54,4 +87,4 @@ func interact(p : Player) -> bool:
|
|||||||
return true
|
return true
|
||||||
|
|
||||||
func save() -> EntityData:
|
func save() -> EntityData:
|
||||||
return SolarPanelData.new(self)
|
return SolarPanelData.new(self)
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_ctita")
|
script = ExtResource("1_ctita")
|
||||||
name = "Solar Pannel"
|
name = "SOLAR_PANNEL"
|
||||||
scene = ExtResource("1_naexs")
|
scene = ExtResource("1_naexs")
|
||||||
description = "Charge every 2 days. When charged, can be used to recharge player energy."
|
description = "SOLAR_PANNEL_DESCRIPTION_TEXT"
|
||||||
metadata/_custom_type_script = "uid://bepx311a3f0o"
|
metadata/_custom_type_script = "uid://bepx311a3f0o"
|
||||||
|
|||||||
@ -70,6 +70,9 @@ _data = {
|
|||||||
|
|
||||||
[node name="SolarPannel" type="Area2D"]
|
[node name="SolarPannel" type="Area2D"]
|
||||||
script = ExtResource("1_t4vnu")
|
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"
|
metadata/_custom_type_script = "uid://du7qppxobx5nd"
|
||||||
|
|
||||||
[node name="Sprites" type="Node2D" parent="."]
|
[node name="Sprites" type="Node2D" parent="."]
|
||||||
|
|||||||
@ -78,9 +78,9 @@ _data = {
|
|||||||
|
|
||||||
[node name="Compost" type="Area2D"]
|
[node name="Compost" type="Area2D"]
|
||||||
script = ExtResource("1_ux0j5")
|
script = ExtResource("1_ux0j5")
|
||||||
default_interact_text = "Place Seed"
|
default_interact_text = "PLACE_SEED"
|
||||||
default_info_title = "Compost"
|
default_info_title = "COMPOST"
|
||||||
default_info_desc = "This research station can provide some bonus if filled with seeds."
|
default_info_desc = "COMPOST_DESC_TEXT"
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(0, -3)
|
position = Vector2(0, -3)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ func card_info() -> CardInfo:
|
|||||||
|
|
||||||
if default_info_desc != "":
|
if default_info_desc != "":
|
||||||
var desc_section = CardSectionInfo.new(
|
var desc_section = CardSectionInfo.new(
|
||||||
"Description",
|
tr("DESCRIPTION"),
|
||||||
default_info_desc
|
default_info_desc
|
||||||
)
|
)
|
||||||
desc_section.title_icon = DESC_ICON
|
desc_section.title_icon = DESC_ICON
|
||||||
@ -58,7 +58,7 @@ func card_info() -> CardInfo:
|
|||||||
)
|
)
|
||||||
|
|
||||||
var reward_section = CardSectionInfo.new(
|
var reward_section = CardSectionInfo.new(
|
||||||
"When filled",
|
tr("WHEN_FILLED"),
|
||||||
reward.desc()
|
reward.desc()
|
||||||
)
|
)
|
||||||
reward_section.title_icon = FILLED_ICON
|
reward_section.title_icon = FILLED_ICON
|
||||||
|
|||||||
@ -14,7 +14,7 @@ func reward(p: Player):
|
|||||||
p.pick_item(item)
|
p.pick_item(item)
|
||||||
|
|
||||||
func desc() -> String:
|
func desc() -> String:
|
||||||
return "Give the following item : [b]%s[/b]. %s" % [item.name, item.description]
|
return tr("GIVE_THE_FOLLOWING_ITEM_%s") % tr(item.name) + ". " + tr(item.description)
|
||||||
|
|
||||||
func icon() -> Texture:
|
func icon() -> Texture:
|
||||||
return item.icon
|
return item.icon
|
||||||
@ -4,7 +4,7 @@ func reward(p: Player):
|
|||||||
p.upgrade_max_energy(1)
|
p.upgrade_max_energy(1)
|
||||||
|
|
||||||
func desc() -> String:
|
func desc() -> String:
|
||||||
return "Upgrade max energy"
|
return tr("UPGRADE_MAX_ENERGY")
|
||||||
|
|
||||||
func icon() -> Texture:
|
func icon() -> Texture:
|
||||||
return preload("res://common/icons/bolt.svg")
|
return preload("res://common/icons/bolt.svg")
|
||||||
@ -5,7 +5,7 @@ func reward(p: Player):
|
|||||||
p.upgrade_inventory_size()
|
p.upgrade_inventory_size()
|
||||||
|
|
||||||
func desc() -> String:
|
func desc() -> String:
|
||||||
return "Upgrade max inventory size"
|
return tr("UPGRADE_MAX_INVENTORY_SIZE")
|
||||||
|
|
||||||
func icon() -> Texture:
|
func icon() -> Texture:
|
||||||
return preload("res://common/icons/backpack.svg")
|
return preload("res://common/icons/backpack.svg")
|
||||||
@ -14,9 +14,9 @@ region = Rect2(205, 157, 87, 208)
|
|||||||
|
|
||||||
[node name="TruckLadder" type="Area2D"]
|
[node name="TruckLadder" type="Area2D"]
|
||||||
script = ExtResource("1_26qdk")
|
script = ExtResource("1_26qdk")
|
||||||
default_interact_text = "Enter Truck"
|
default_interact_text = "ENTER_TRUCK"
|
||||||
default_info_title = "Truck Entrance"
|
default_info_title = "TRUCK_ENTRANCE"
|
||||||
default_info_desc = "A good old ladder."
|
default_info_desc = "LADDER_DESC_TEXT"
|
||||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
|||||||
@ -14,9 +14,9 @@ region = Rect2(64, 161, 101, 205)
|
|||||||
|
|
||||||
[node name="TruckRecharge" type="Area2D"]
|
[node name="TruckRecharge" type="Area2D"]
|
||||||
script = ExtResource("1_ipgcv")
|
script = ExtResource("1_ipgcv")
|
||||||
default_interact_text = "Recharge"
|
default_interact_text = "RECHARGE"
|
||||||
default_info_title = "Recharge Station"
|
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_info_desc = "RECHARGE_STATION_DESC_TEXT"
|
||||||
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
metadata/_custom_type_script = "uid://dyprcd68fjstf"
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[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,26 +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):
|
|
||||||
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
|
|
||||||
@ -24,5 +24,5 @@ default_growing_time = 3
|
|||||||
seed_texture = SubResource("AtlasTexture_my6by")
|
seed_texture = SubResource("AtlasTexture_my6by")
|
||||||
growing_texture = ExtResource("2_l2hi3")
|
growing_texture = ExtResource("2_l2hi3")
|
||||||
mature_texture = ExtResource("3_y8qve")
|
mature_texture = ExtResource("3_y8qve")
|
||||||
default_mature_effects = Array[ExtResource("1_l2hi3")]([SubResource("Resource_cf34j")])
|
mature_effects = Array[ExtResource("1_l2hi3")]([SubResource("Resource_cf34j")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -13,7 +13,7 @@ script = ExtResource("2_prk5s")
|
|||||||
level = 2
|
level = 2
|
||||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_k7yib"]
|
[sub_resource type="Resource" id="Resource_ajihu"]
|
||||||
script = ExtResource("3_ajihu")
|
script = ExtResource("3_ajihu")
|
||||||
level = 1
|
level = 1
|
||||||
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
||||||
@ -29,6 +29,6 @@ description = "This fern use the bas component of the ground to grow."
|
|||||||
seed_texture = SubResource("AtlasTexture_qt76e")
|
seed_texture = SubResource("AtlasTexture_qt76e")
|
||||||
growing_texture = ExtResource("1_prk5s")
|
growing_texture = ExtResource("1_prk5s")
|
||||||
mature_texture = ExtResource("3_40c3e")
|
mature_texture = ExtResource("3_40c3e")
|
||||||
default_harvest_effects = Array[ExtResource("1_40c3e")]([SubResource("Resource_40c3e")])
|
harvest_effects = Array[ExtResource("1_40c3e")]([SubResource("Resource_40c3e")])
|
||||||
default_mature_effects = Array[ExtResource("1_40c3e")]([SubResource("Resource_k7yib")])
|
mature_effects = Array[ExtResource("1_40c3e")]([SubResource("Resource_ajihu")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://bfj6wji21amgk" path="res://entities/plants/assets/sprites/ferno/mature.png" id="5_er4cp"]
|
[ext_resource type="Texture2D" uid="uid://bfj6wji21amgk" path="res://entities/plants/assets/sprites/ferno/mature.png" id="5_er4cp"]
|
||||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="7_0y7r8"]
|
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="7_0y7r8"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0ofiq"]
|
[sub_resource type="Resource" id="Resource_rb4mq"]
|
||||||
script = ExtResource("2_rb4mq")
|
script = ExtResource("2_rb4mq")
|
||||||
level = 2
|
level = 2
|
||||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7wddl"]
|
[sub_resource type="Resource" id="Resource_s6g12"]
|
||||||
script = ExtResource("3_s6g12")
|
script = ExtResource("3_s6g12")
|
||||||
level = 1
|
level = 1
|
||||||
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
||||||
@ -29,5 +29,5 @@ description = "This mysterious flower emmit a strong signal in the ground when h
|
|||||||
seed_texture = SubResource("AtlasTexture_g1td4")
|
seed_texture = SubResource("AtlasTexture_g1td4")
|
||||||
growing_texture = ExtResource("4_5qaoo")
|
growing_texture = ExtResource("4_5qaoo")
|
||||||
mature_texture = ExtResource("5_er4cp")
|
mature_texture = ExtResource("5_er4cp")
|
||||||
default_harvest_effects = Array[ExtResource("1_srjq6")]([SubResource("Resource_0ofiq"), SubResource("Resource_7wddl")])
|
harvest_effects = Array[ExtResource("1_srjq6")]([SubResource("Resource_rb4mq"), SubResource("Resource_s6g12")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://d3apfwbqsg5ha" path="res://entities/plants/assets/sprites/maias/mature.png" id="3_pi4ie"]
|
[ext_resource type="Texture2D" uid="uid://d3apfwbqsg5ha" path="res://entities/plants/assets/sprites/maias/mature.png" id="3_pi4ie"]
|
||||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_mwrj8"]
|
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_mwrj8"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1llfc"]
|
[sub_resource type="Resource" id="Resource_740j2"]
|
||||||
script = ExtResource("2_740j2")
|
script = ExtResource("2_740j2")
|
||||||
level = 3
|
level = 3
|
||||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||||
@ -23,5 +23,5 @@ description = "This gorgeous flower produce a lot of seeds when harvested."
|
|||||||
seed_texture = SubResource("AtlasTexture_sri3b")
|
seed_texture = SubResource("AtlasTexture_sri3b")
|
||||||
growing_texture = ExtResource("1_vyplc")
|
growing_texture = ExtResource("1_vyplc")
|
||||||
mature_texture = ExtResource("3_pi4ie")
|
mature_texture = ExtResource("3_pi4ie")
|
||||||
default_harvest_effects = Array[ExtResource("1_740j2")]([SubResource("Resource_1llfc")])
|
harvest_effects = Array[ExtResource("1_740j2")]([SubResource("Resource_740j2")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://bj801geprrhfu" path="res://entities/plants/assets/sprites/philea/mature.png" id="4_cafy4"]
|
[ext_resource type="Texture2D" uid="uid://bj801geprrhfu" path="res://entities/plants/assets/sprites/philea/mature.png" id="4_cafy4"]
|
||||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_oaspo"]
|
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_oaspo"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0x8ki"]
|
[sub_resource type="Resource" id="Resource_jyjjp"]
|
||||||
script = ExtResource("2_jyjjp")
|
script = ExtResource("2_jyjjp")
|
||||||
level = 1
|
level = 1
|
||||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||||
@ -25,5 +25,5 @@ default_plant_score = 3
|
|||||||
seed_texture = SubResource("AtlasTexture_ogrgq")
|
seed_texture = SubResource("AtlasTexture_ogrgq")
|
||||||
growing_texture = ExtResource("3_n0hvm")
|
growing_texture = ExtResource("3_n0hvm")
|
||||||
mature_texture = ExtResource("4_cafy4")
|
mature_texture = ExtResource("4_cafy4")
|
||||||
default_mature_effects = Array[ExtResource("1_mi4ef")]([SubResource("Resource_0x8ki")])
|
mature_effects = Array[ExtResource("1_mi4ef")]([SubResource("Resource_jyjjp")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
[ext_resource type="Script" uid="uid://ceqx5va1ormau" path="res://entities/plants/scripts/plant_effects/produce_seeds.gd" id="3_26e4l"]
|
[ext_resource type="Script" uid="uid://ceqx5va1ormau" path="res://entities/plants/scripts/plant_effects/produce_seeds.gd" id="3_26e4l"]
|
||||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="5_26e4l"]
|
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="5_26e4l"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_kidty"]
|
[sub_resource type="Resource" id="Resource_8fstu"]
|
||||||
script = ExtResource("3_26e4l")
|
script = ExtResource("3_26e4l")
|
||||||
level = 2
|
level = 2
|
||||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_8fstu"]
|
[sub_resource type="Resource" id="Resource_26e4l"]
|
||||||
script = ExtResource("2_8fstu")
|
script = ExtResource("2_8fstu")
|
||||||
level = 2
|
level = 2
|
||||||
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
metadata/_custom_type_script = "uid://cgscbuxe4dawb"
|
||||||
@ -30,6 +30,6 @@ default_growing_time = 3
|
|||||||
seed_texture = SubResource("AtlasTexture_kidty")
|
seed_texture = SubResource("AtlasTexture_kidty")
|
||||||
growing_texture = ExtResource("2_k4b1k")
|
growing_texture = ExtResource("2_k4b1k")
|
||||||
mature_texture = ExtResource("3_8fstu")
|
mature_texture = ExtResource("3_8fstu")
|
||||||
default_harvest_effects = Array[ExtResource("1_8fstu")]([SubResource("Resource_kidty")])
|
harvest_effects = Array[ExtResource("1_8fstu")]([SubResource("Resource_8fstu")])
|
||||||
default_mature_effects = Array[ExtResource("1_8fstu")]([SubResource("Resource_8fstu")])
|
mature_effects = Array[ExtResource("1_8fstu")]([SubResource("Resource_26e4l")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://b3wom2xu26g43" path="res://entities/plants/assets/sprites/solita/mature.png" id="4_njidq"]
|
[ext_resource type="Texture2D" uid="uid://b3wom2xu26g43" path="res://entities/plants/assets/sprites/solita/mature.png" id="4_njidq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_yn0yu"]
|
[ext_resource type="Texture2D" uid="uid://pltmnkqd5ut2" path="res://entities/plants/assets/sprites/seeds/grille_seeds.png" id="6_yn0yu"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_3fdsj"]
|
[sub_resource type="Resource" id="Resource_j4n5p"]
|
||||||
script = ExtResource("2_1q5bp")
|
script = ExtResource("2_1q5bp")
|
||||||
level = 2
|
level = 2
|
||||||
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
metadata/_custom_type_script = "uid://ceqx5va1ormau"
|
||||||
@ -25,5 +25,5 @@ default_plant_score = 2
|
|||||||
seed_texture = SubResource("AtlasTexture_auuc2")
|
seed_texture = SubResource("AtlasTexture_auuc2")
|
||||||
growing_texture = ExtResource("3_j4n5p")
|
growing_texture = ExtResource("3_j4n5p")
|
||||||
mature_texture = ExtResource("4_njidq")
|
mature_texture = ExtResource("4_njidq")
|
||||||
default_harvest_effects = Array[ExtResource("1_mksys")]([SubResource("Resource_3fdsj")])
|
harvest_effects = Array[ExtResource("1_mksys")]([SubResource("Resource_j4n5p")])
|
||||||
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
metadata/_custom_type_script = "uid://jnye5pe1bgqw"
|
||||||
|
|||||||
@ -15,10 +15,6 @@ const LIFETIME_ICON = preload("res://common/icons/calendar-week.svg")
|
|||||||
const SHOVEL_ICON = preload("res://common/icons/shovel.svg")
|
const SHOVEL_ICON = preload("res://common/icons/shovel.svg")
|
||||||
const GROWING_ICON = preload("res://common/icons/chevrons-up.svg")
|
const GROWING_ICON = preload("res://common/icons/chevrons-up.svg")
|
||||||
|
|
||||||
const HARVEST_EFFECT_ICON = preload("res://common/icons/shovel.svg")
|
|
||||||
const MATURE_EFFECT_ICON = preload("res://common/icons/chevrons-up.svg")
|
|
||||||
const CYCLIC_EFFECT_ICON = preload("res://common/icons/rotate-rectangle.svg")
|
|
||||||
|
|
||||||
const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.tscn")
|
const SPRITE_SCENE : PackedScene = preload("res://entities/plants/plant_sprite.tscn")
|
||||||
|
|
||||||
enum State {PLANTED, GROWING, MATURE}
|
enum State {PLANTED, GROWING, MATURE}
|
||||||
@ -32,9 +28,6 @@ var state: State = State.PLANTED
|
|||||||
@onready var collision_shape: CollisionShape2D
|
@onready var collision_shape: CollisionShape2D
|
||||||
@onready var influence_zone : PlantInfluenceZone
|
@onready var influence_zone : PlantInfluenceZone
|
||||||
|
|
||||||
var harvest_effects = []
|
|
||||||
var mature_effects = []
|
|
||||||
var cyclic_effects = []
|
|
||||||
var plant_score = 0
|
var plant_score = 0
|
||||||
var plant_mutations : Array[PlantMutation] = []
|
var plant_mutations : Array[PlantMutation] = []
|
||||||
|
|
||||||
@ -44,9 +37,6 @@ func _init(
|
|||||||
_day = 0,
|
_day = 0,
|
||||||
):
|
):
|
||||||
plant_type = _plant_type
|
plant_type = _plant_type
|
||||||
harvest_effects = plant_type.default_harvest_effects.duplicate_deep()
|
|
||||||
mature_effects = plant_type.default_mature_effects.duplicate_deep()
|
|
||||||
cyclic_effects = plant_type.default_cyclic_effects.duplicate_deep()
|
|
||||||
|
|
||||||
day = _day
|
day = _day
|
||||||
|
|
||||||
@ -96,8 +86,8 @@ func generate_influence_zone() -> PlantInfluenceZone:
|
|||||||
func _pass_day():
|
func _pass_day():
|
||||||
await get_tree().create_timer(randf_range(0., RANDOM_MAX_GROW_INTERVAL)).timeout
|
await get_tree().create_timer(randf_range(0., RANDOM_MAX_GROW_INTERVAL)).timeout
|
||||||
|
|
||||||
if state == State.MATURE and len(cyclic_effects):
|
if state == State.MATURE and len(plant_type.cyclic_effects):
|
||||||
for effect in cyclic_effects:
|
for effect in plant_type.cyclic_effects:
|
||||||
effect.effect(self)
|
effect.effect(self)
|
||||||
|
|
||||||
var old_state = state
|
var old_state = state
|
||||||
@ -106,9 +96,9 @@ func _pass_day():
|
|||||||
update_plant()
|
update_plant()
|
||||||
|
|
||||||
if old_state != state and state == State.MATURE:
|
if old_state != state and state == State.MATURE:
|
||||||
for effect in mature_effects:
|
for effect in plant_type.mature_effects:
|
||||||
if effect : effect.effect(self)
|
if effect : effect.effect(self)
|
||||||
for effect in cyclic_effects:
|
for effect in plant_type.cyclic_effects:
|
||||||
if effect : effect.effect(self)
|
if effect : effect.effect(self)
|
||||||
|
|
||||||
func update_plant(with_animation : bool = true):
|
func update_plant(with_animation : bool = true):
|
||||||
@ -137,7 +127,7 @@ func calculate_grow_time() -> int:
|
|||||||
for m in plant_mutations:
|
for m in plant_mutations:
|
||||||
mutated_grow_time = m.mutate_grow_time(self, mutated_grow_time)
|
mutated_grow_time = m.mutate_grow_time(self, mutated_grow_time)
|
||||||
|
|
||||||
return mutated_grow_time
|
return max(1, mutated_grow_time)
|
||||||
|
|
||||||
func change_state(_state: State, with_animation : bool = true):
|
func change_state(_state: State, with_animation : bool = true):
|
||||||
if state != _state:
|
if state != _state:
|
||||||
@ -148,7 +138,7 @@ func change_state(_state: State, with_animation : bool = true):
|
|||||||
|
|
||||||
func harvest():
|
func harvest():
|
||||||
if state == State.MATURE:
|
if state == State.MATURE:
|
||||||
for effect in harvest_effects:
|
for effect in plant_type.harvest_effects:
|
||||||
if effect : effect.effect(self)
|
if effect : effect.effect(self)
|
||||||
|
|
||||||
plant_sprite.start_harvest_animation()
|
plant_sprite.start_harvest_animation()
|
||||||
@ -169,12 +159,12 @@ func card_info() -> CardInfo:
|
|||||||
info.texture = plant_type.mature_texture
|
info.texture = plant_type.mature_texture
|
||||||
info.type_icon = PLANT_TYPE_ICON
|
info.type_icon = PLANT_TYPE_ICON
|
||||||
|
|
||||||
var state_text = "Mature"
|
var state_text = tr("MATURE")
|
||||||
if state != State.MATURE:
|
if state != State.MATURE:
|
||||||
state_text = "Growing"
|
state_text = tr("GROWING")
|
||||||
|
|
||||||
info.stats.append(CardStatInfo.new(
|
info.stats.append(CardStatInfo.new(
|
||||||
"Day [b]%d[/b]" % day,
|
tr("DAY_%d") % day,
|
||||||
LIFETIME_ICON
|
LIFETIME_ICON
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -185,12 +175,12 @@ func card_info() -> CardInfo:
|
|||||||
|
|
||||||
if state != State.MATURE:
|
if state != State.MATURE:
|
||||||
info.stats.append(CardStatInfo.new(
|
info.stats.append(CardStatInfo.new(
|
||||||
"Mature on day [b]%d[/b]" % calculate_grow_time(),
|
tr("MATURE_ON_DAY_%d") % calculate_grow_time(),
|
||||||
GROWING_ICON
|
GROWING_ICON
|
||||||
))
|
))
|
||||||
|
|
||||||
info.stats.append(CardStatInfo.new(
|
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
|
PLANT_POINT_ICON
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -203,39 +193,10 @@ func card_info() -> CardInfo:
|
|||||||
for m in plant_mutations:
|
for m in plant_mutations:
|
||||||
info.sections.append(m.card_section())
|
info.sections.append(m.card_section())
|
||||||
|
|
||||||
info.sections.append_array(card_effect_sections())
|
info.sections.append_array(PlantEffect.card_effect_sections(
|
||||||
|
plant_type.mature_effects,
|
||||||
|
plant_type.harvest_effects,
|
||||||
|
plant_type.cyclic_effects,
|
||||||
|
))
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
||||||
func card_effect_sections() -> Array[CardSectionInfo]:
|
|
||||||
var sections : Array[CardSectionInfo] = []
|
|
||||||
var effects_category = [
|
|
||||||
mature_effects,
|
|
||||||
harvest_effects,
|
|
||||||
cyclic_effects
|
|
||||||
]
|
|
||||||
var effects_category_labels : Array[String] = [
|
|
||||||
"On mature",
|
|
||||||
"When harvested",
|
|
||||||
"Each day when mature",
|
|
||||||
]
|
|
||||||
var effects_category_icon : Array[Texture] = [
|
|
||||||
MATURE_EFFECT_ICON,
|
|
||||||
HARVEST_EFFECT_ICON,
|
|
||||||
CYCLIC_EFFECT_ICON,
|
|
||||||
]
|
|
||||||
|
|
||||||
for i in range(len(effects_category)):
|
|
||||||
var effects = effects_category[i]
|
|
||||||
if len(effects):
|
|
||||||
var section = CardSectionInfo.new(
|
|
||||||
effects_category_labels[i]
|
|
||||||
)
|
|
||||||
section.title_icon = effects_category_icon[i]
|
|
||||||
var effects_text : Array = effects.map(
|
|
||||||
func (e : PlantEffect): return "[b]%s[/b] %s" % [e.get_styled_effect_name() , e.get_effect_description()]
|
|
||||||
)
|
|
||||||
section.text = "\n".join(effects_text)
|
|
||||||
sections.append(section)
|
|
||||||
|
|
||||||
return sections
|
|
||||||
@ -2,6 +2,10 @@
|
|||||||
extends Resource
|
extends Resource
|
||||||
class_name PlantEffect
|
class_name PlantEffect
|
||||||
|
|
||||||
|
const HARVEST_EFFECT_ICON = preload("res://common/icons/shovel.svg")
|
||||||
|
const MATURE_EFFECT_ICON = preload("res://common/icons/chevrons-up.svg")
|
||||||
|
const CYCLIC_EFFECT_ICON = preload("res://common/icons/rotate-rectangle.svg")
|
||||||
|
|
||||||
@export var level : int
|
@export var level : int
|
||||||
|
|
||||||
func _init(_level : int = 1):
|
func _init(_level : int = 1):
|
||||||
@ -15,7 +19,7 @@ func get_effect_description() -> String:
|
|||||||
printerr("Classe abstraite PlantEffect appelée")
|
printerr("Classe abstraite PlantEffect appelée")
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
func effect(plant):
|
func effect(_plant):
|
||||||
printerr("Classe abstraite PlantEffect appelée")
|
printerr("Classe abstraite PlantEffect appelée")
|
||||||
|
|
||||||
func get_styled_effect_name():
|
func get_styled_effect_name():
|
||||||
@ -31,4 +35,42 @@ func get_styled_effect_name():
|
|||||||
if level == 1:
|
if level == 1:
|
||||||
return levels_bbcode[0] % get_effect_name()
|
return levels_bbcode[0] % get_effect_name()
|
||||||
else :
|
else :
|
||||||
return levels_bbcode[min(level - 1, len(levels_bbcode) - 1)] % [get_effect_name(), level]
|
return levels_bbcode[min(level - 1, len(levels_bbcode) - 1)] % [get_effect_name(), level]
|
||||||
|
|
||||||
|
static func card_effect_sections(
|
||||||
|
mature_effects : Array[PlantEffect],
|
||||||
|
harvest_effects : Array[PlantEffect],
|
||||||
|
cyclic_effects : Array[PlantEffect]
|
||||||
|
) -> Array[CardSectionInfo]:
|
||||||
|
var sections : Array[CardSectionInfo] = []
|
||||||
|
var effects_category = [
|
||||||
|
mature_effects,
|
||||||
|
harvest_effects,
|
||||||
|
cyclic_effects
|
||||||
|
]
|
||||||
|
var effects_category_labels : Array[String] = [
|
||||||
|
"ON_MATURE",
|
||||||
|
"WHEN_HARVESTED",
|
||||||
|
"EACH_DAY_WHEN_MATURE",
|
||||||
|
]
|
||||||
|
var effects_category_icon : Array[Texture] = [
|
||||||
|
MATURE_EFFECT_ICON,
|
||||||
|
HARVEST_EFFECT_ICON,
|
||||||
|
CYCLIC_EFFECT_ICON,
|
||||||
|
]
|
||||||
|
|
||||||
|
for i in range(len(effects_category)):
|
||||||
|
var effects = effects_category[i]
|
||||||
|
|
||||||
|
if len(effects) > 0:
|
||||||
|
var section = CardSectionInfo.new(
|
||||||
|
effects_category_labels[i]
|
||||||
|
)
|
||||||
|
section.title_icon = effects_category_icon[i]
|
||||||
|
var effects_text : Array = effects.map(
|
||||||
|
func (e : PlantEffect): return "[b]%s[/b] %s" % [e.get_styled_effect_name() , e.get_effect_description()]
|
||||||
|
)
|
||||||
|
section.text = "\n".join(effects_text)
|
||||||
|
sections.append(section)
|
||||||
|
|
||||||
|
return sections
|
||||||
@ -5,10 +5,10 @@ func get_decontamination_radius():
|
|||||||
return 50 + 50 * level
|
return 50 + 50 * level
|
||||||
|
|
||||||
func get_effect_name() -> String:
|
func get_effect_name() -> String:
|
||||||
return "Decontaminate"
|
return tr("DECONTAMINATE")
|
||||||
|
|
||||||
func get_effect_description() -> String:
|
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
|
return ret
|
||||||
|
|
||||||
func effect(plant):
|
func effect(plant):
|
||||||
|
|||||||
@ -5,7 +5,7 @@ func get_produce_number():
|
|||||||
return [level - 1, level]
|
return [level - 1, level]
|
||||||
|
|
||||||
func get_effect_name() -> String:
|
func get_effect_name() -> String:
|
||||||
return "Seed Production"
|
return tr("SEED_PRODUCTION")
|
||||||
|
|
||||||
func get_effect_description() -> String:
|
func get_effect_description() -> String:
|
||||||
var number_str = ""
|
var number_str = ""
|
||||||
@ -13,12 +13,12 @@ func get_effect_description() -> String:
|
|||||||
for i in range(len(get_produce_number())):
|
for i in range(len(get_produce_number())):
|
||||||
if i != 0:
|
if i != 0:
|
||||||
if i == len(get_produce_number()) - 1:
|
if i == len(get_produce_number()) - 1:
|
||||||
number_str += " or "
|
number_str += tr("OR")
|
||||||
else :
|
else :
|
||||||
number_str += ", "
|
number_str += tr("COMMA")
|
||||||
number_str += str(get_produce_number()[i])
|
number_str += str(get_produce_number()[i])
|
||||||
|
|
||||||
return "Produce %s seeds" % [number_str]
|
return tr("PRODUCE_%s_SEEDS") % [number_str]
|
||||||
|
|
||||||
func effect(plant):
|
func effect(plant):
|
||||||
for _i in range(get_produce_number().pick_random()):
|
for _i in range(get_produce_number().pick_random()):
|
||||||
|
|||||||
@ -1,13 +1,6 @@
|
|||||||
extends Resource
|
extends Resource
|
||||||
class_name PlantMutation
|
class_name PlantMutation
|
||||||
|
|
||||||
const BASE_RARITY_CHANCE : Array[float] = [
|
|
||||||
0.75,
|
|
||||||
0.9,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
]
|
|
||||||
|
|
||||||
@export var level : int = 1
|
@export var level : int = 1
|
||||||
|
|
||||||
func _init(_level : int = 1):
|
func _init(_level : int = 1):
|
||||||
@ -45,7 +38,7 @@ func get_rarity() -> int:
|
|||||||
func card_section() -> CardSectionInfo:
|
func card_section() -> CardSectionInfo:
|
||||||
var section = CardSectionInfo.new(
|
var section = CardSectionInfo.new(
|
||||||
get_mutation_name() + (" %d" % level if level > 1 else ""),
|
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())
|
section.title_color = PlantMutation.get_rarity_color(get_rarity())
|
||||||
@ -56,11 +49,11 @@ func card_section() -> CardSectionInfo:
|
|||||||
|
|
||||||
static func get_rarity_text(rarity) -> String:
|
static func get_rarity_text(rarity) -> String:
|
||||||
var rarity_text : Array[String] = [
|
var rarity_text : Array[String] = [
|
||||||
"Common",
|
"COMMON",
|
||||||
"Rare",
|
"RARE",
|
||||||
"Very rare",
|
"VERY_RARE",
|
||||||
"Impossible",
|
"IMPOSSIBLE",
|
||||||
"[rainbow]Absurd[/rainbow]",
|
"ABSURD",
|
||||||
]
|
]
|
||||||
|
|
||||||
if rarity < len(rarity_text):
|
if rarity < len(rarity_text):
|
||||||
@ -78,21 +71,15 @@ static func get_rarity_color(rarity : int) -> Color:
|
|||||||
|
|
||||||
return rarity_colors[min(rarity, len(rarity_colors) - 1)]
|
return rarity_colors[min(rarity, len(rarity_colors) - 1)]
|
||||||
|
|
||||||
static func random_rarity() -> int:
|
static func random_mutation(except_mutations : Array[PlantMutation] = []) -> PlantMutation:
|
||||||
var random_float = randf()
|
|
||||||
|
|
||||||
for i in range(len(BASE_RARITY_CHANCE) - 1):
|
|
||||||
if random_float < BASE_RARITY_CHANCE[i]:
|
|
||||||
return i
|
|
||||||
return len(BASE_RARITY_CHANCE) - 1
|
|
||||||
|
|
||||||
static func random_mutation(rarity = PlantMutation.random_rarity()) -> PlantMutation:
|
|
||||||
var all_mutations = GameInfo.game_data.unlocked_plant_mutations.duplicate_deep()
|
var all_mutations = GameInfo.game_data.unlocked_plant_mutations.duplicate_deep()
|
||||||
all_mutations.shuffle()
|
all_mutations = all_mutations.filter(
|
||||||
for new_mutation in all_mutations:
|
func (f1 : PlantMutation):
|
||||||
var level_for_rarity = new_mutation.get_level_for_rarity(rarity)
|
return except_mutations.find_custom(
|
||||||
if level_for_rarity >= 1:
|
func (f2 : PlantMutation): return f2.get_mutation_name() == f1.get_mutation_name()
|
||||||
new_mutation.level = level_for_rarity
|
) == -1
|
||||||
return new_mutation
|
)
|
||||||
return null
|
if len(all_mutations):
|
||||||
|
return all_mutations.pick_random()
|
||||||
|
else :
|
||||||
|
return null
|
||||||
|
|||||||
@ -10,10 +10,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Ancient"
|
return tr("ANCIENT")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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():
|
func get_day_factor():
|
||||||
return max(1, DEFAULT_DAY_FACTOR - level + 1)
|
return max(1, DEFAULT_DAY_FACTOR - level + 1)
|
||||||
|
|||||||
@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Elitist"
|
return tr("ELITIST")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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:
|
func mutate_score(plant_state : Plant.State, plant : Plant, score) -> int:
|
||||||
if plant.influence_zone == null:
|
if plant.influence_zone == null:
|
||||||
|
|||||||
@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Ermit"
|
return tr("ERMIT")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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():
|
func get_score_multiplier():
|
||||||
return level + 1
|
return level + 1
|
||||||
|
|||||||
@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Precocious"
|
return tr("PRECOCIOUS")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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:
|
func mutate_score(plant_state : Plant.State, _plant : Plant, score) -> int:
|
||||||
return score + (0 if plant_state == Plant.State.MATURE else level)
|
return score + (0 if plant_state == Plant.State.MATURE else level)
|
||||||
@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Quality"
|
return tr("QUALITY")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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:
|
func mutate_score(plant_state : Plant.State, _plant : Plant, score : int) -> int:
|
||||||
return score + (level if plant_state == Plant.State.MATURE else 0)
|
return score + (level if plant_state == Plant.State.MATURE else 0)
|
||||||
@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Quick"
|
return tr("QUICK")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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:
|
func mutate_grow_time(_plant : Plant, grow_time : int) -> int:
|
||||||
return max(grow_time - level, 0)
|
return max(grow_time - level, 0)
|
||||||
@ -10,10 +10,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Sociable"
|
return tr("SOCIABLE")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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():
|
func get_score_bonus():
|
||||||
return (level + 2)
|
return (level + 2)
|
||||||
|
|||||||
@ -8,10 +8,10 @@ func get_base_rarity() -> int:
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
func get_mutation_name() -> String:
|
func get_mutation_name() -> String:
|
||||||
return "Strong"
|
return tr("STRONG")
|
||||||
|
|
||||||
func get_mutation_description() -> String:
|
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():
|
func get_score_multiplier():
|
||||||
return float(level)/2.
|
return float(level)/2.
|
||||||
|
|||||||
@ -11,6 +11,118 @@ class_name PlantType
|
|||||||
@export var growing_texture : Texture
|
@export var growing_texture : Texture
|
||||||
@export var mature_texture : Texture
|
@export var mature_texture : Texture
|
||||||
|
|
||||||
@export var default_harvest_effects : Array[PlantEffect] = []
|
@export var harvest_effects : Array[PlantEffect] = []
|
||||||
@export var default_mature_effects : Array[PlantEffect] = []
|
@export var mature_effects : Array[PlantEffect] = []
|
||||||
@export var default_cyclic_effects : Array[PlantEffect] = []
|
@export var cyclic_effects : Array[PlantEffect] = []
|
||||||
|
|
||||||
|
func card_info() -> CardInfo:
|
||||||
|
var info = CardInfo.new(
|
||||||
|
name
|
||||||
|
)
|
||||||
|
|
||||||
|
info.important_stat_icon = Plant.PLANT_POINT_ICON
|
||||||
|
info.important_stat_text = "%d" % default_plant_score
|
||||||
|
info.texture = mature_texture
|
||||||
|
info.type_icon = Plant.PLANT_TYPE_ICON
|
||||||
|
|
||||||
|
info.stats.append(CardStatInfo.new(
|
||||||
|
tr("GROW_IN_%d") % default_growing_time,
|
||||||
|
Plant.GROWING_ICON
|
||||||
|
))
|
||||||
|
|
||||||
|
info.stats.append(CardStatInfo.new(
|
||||||
|
tr("%s_SCORE_WHEN_MATURE") % default_plant_score,
|
||||||
|
Plant.PLANT_POINT_ICON
|
||||||
|
))
|
||||||
|
|
||||||
|
info.sections.append_array(PlantEffect.card_effect_sections(
|
||||||
|
mature_effects,
|
||||||
|
harvest_effects,
|
||||||
|
cyclic_effects,
|
||||||
|
))
|
||||||
|
|
||||||
|
return info
|
||||||
|
|
||||||
|
func get_available_evolution() -> Array[Evolution]:
|
||||||
|
var evolutions : Array[Evolution] = [
|
||||||
|
ScoreEvolution.new(self)
|
||||||
|
]
|
||||||
|
|
||||||
|
if len(mature_effects) > 0:
|
||||||
|
evolutions.append(MatureEffectEvolution.new(self))
|
||||||
|
if len(harvest_effects) > 0:
|
||||||
|
evolutions.append(HarvestEffectEvolution.new(self))
|
||||||
|
if len(cyclic_effects) > 0:
|
||||||
|
evolutions.append(CyclicEffectEvolution.new(self))
|
||||||
|
|
||||||
|
return evolutions
|
||||||
|
|
||||||
|
class Evolution:
|
||||||
|
|
||||||
|
var level : int
|
||||||
|
var plant_type : PlantType
|
||||||
|
|
||||||
|
func _init(_type : PlantType, _l : int = 1):
|
||||||
|
plant_type = _type
|
||||||
|
level = _l
|
||||||
|
|
||||||
|
func get_title():
|
||||||
|
return ""
|
||||||
|
|
||||||
|
func get_description():
|
||||||
|
return ""
|
||||||
|
|
||||||
|
func evolve(_pt : PlantType = plant_type):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class ScoreEvolution extends Evolution:
|
||||||
|
|
||||||
|
func get_title():
|
||||||
|
return tr("%s_SCORE_EVOLUTION") % plant_type.name
|
||||||
|
|
||||||
|
func get_description():
|
||||||
|
return tr("ADD_%s_TO_THE_DEFAULT_SCORE_OF_THE_PLANT") % level
|
||||||
|
|
||||||
|
func evolve(pt : PlantType = plant_type):
|
||||||
|
pt.default_plant_score += level
|
||||||
|
|
||||||
|
class MatureEffectEvolution extends Evolution:
|
||||||
|
|
||||||
|
var effect_index : int
|
||||||
|
|
||||||
|
func _init(_type : PlantType, _l : int = 1):
|
||||||
|
plant_type = _type
|
||||||
|
level = _l
|
||||||
|
|
||||||
|
pick_effect()
|
||||||
|
|
||||||
|
func pick_effect():
|
||||||
|
effect_index = randi() % len(plant_type.mature_effects)
|
||||||
|
|
||||||
|
func get_effect(pt : PlantType = plant_type) -> PlantEffect:
|
||||||
|
return pt.mature_effects[effect_index]
|
||||||
|
|
||||||
|
func get_title():
|
||||||
|
return tr("%s_EVOLUTION") % plant_type.name
|
||||||
|
|
||||||
|
func get_description():
|
||||||
|
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
|
||||||
|
|
||||||
|
class HarvestEffectEvolution extends MatureEffectEvolution:
|
||||||
|
|
||||||
|
func pick_effect():
|
||||||
|
effect_index = randi() % len(plant_type.harvest_effects)
|
||||||
|
|
||||||
|
func get_effect(pt : PlantType = plant_type) -> PlantEffect:
|
||||||
|
return pt.harvest_effects[effect_index]
|
||||||
|
|
||||||
|
class CyclicEffectEvolution extends MatureEffectEvolution:
|
||||||
|
|
||||||
|
func pick_effect():
|
||||||
|
effect_index = randi() % len(plant_type.harvest_effects)
|
||||||
|
|
||||||
|
func get_effect(pt : PlantType = plant_type) -> PlantEffect:
|
||||||
|
return pt.harvest_effects[effect_index]
|
||||||
@ -5,9 +5,15 @@ signal updated(inventory: Inventory)
|
|||||||
|
|
||||||
@export var items: Array[Item] = []
|
@export var items: Array[Item] = []
|
||||||
@export var current_item_ind: int = 0
|
@export var current_item_ind: int = 0
|
||||||
|
@export var size = 0 :
|
||||||
|
set(s):
|
||||||
|
size = s
|
||||||
|
items.resize(size)
|
||||||
|
updated.emit(self)
|
||||||
|
|
||||||
func _init(inventory_size: int = 1):
|
func _init(inventory_size: int = 1):
|
||||||
items.resize(inventory_size)
|
size = inventory_size
|
||||||
|
|
||||||
|
|
||||||
func get_best_available_slot_ind():
|
func get_best_available_slot_ind():
|
||||||
if items[current_item_ind] == null:
|
if items[current_item_ind] == null:
|
||||||
|
|||||||
@ -33,13 +33,13 @@ func get_usage_object_affected(_i : InspectableEntity) -> bool:
|
|||||||
func is_one_time_use():
|
func is_one_time_use():
|
||||||
return false
|
return false
|
||||||
|
|
||||||
func can_use(_player : Player, zone: Player.ActionZone) -> bool:
|
func can_use(_player : Player, _zone: Player.ActionZone) -> bool:
|
||||||
return false
|
return false
|
||||||
|
|
||||||
func use_text() -> String:
|
func use_text() -> String:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
func use(_player : Player, zone: Player.ActionZone):
|
func use(_player : Player, _zone: Player.ActionZone):
|
||||||
return false
|
return false
|
||||||
|
|
||||||
func card_info() -> CardInfo:
|
func card_info() -> CardInfo:
|
||||||
@ -51,7 +51,7 @@ func card_info() -> CardInfo:
|
|||||||
|
|
||||||
info.stats.append(
|
info.stats.append(
|
||||||
CardStatInfo.new(
|
CardStatInfo.new(
|
||||||
"Cost %d energy" % energy_usage,
|
tr("COST_%d_ENERGY") % energy_usage,
|
||||||
ENERGY_ICON
|
ENERGY_ICON
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -59,13 +59,13 @@ func card_info() -> CardInfo:
|
|||||||
if is_one_time_use():
|
if is_one_time_use():
|
||||||
info.stats.append(
|
info.stats.append(
|
||||||
CardStatInfo.new(
|
CardStatInfo.new(
|
||||||
"One time use",
|
tr("ONE_TIME_USE"),
|
||||||
ONE_TIME_ICON
|
ONE_TIME_ICON
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
var effect_section = CardSectionInfo.new(
|
var effect_section = CardSectionInfo.new(
|
||||||
"Effect",
|
tr("EFFECT"),
|
||||||
get_description()
|
get_description()
|
||||||
)
|
)
|
||||||
effect_section.title_icon = ACTION_ICON
|
effect_section.title_icon = ACTION_ICON
|
||||||
|
|||||||
@ -18,18 +18,21 @@ func get_description() -> String:
|
|||||||
return machine_type.description
|
return machine_type.description
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
func get_energy_used() -> int:
|
||||||
|
return 0
|
||||||
|
|
||||||
func get_icon() -> Texture2D:
|
func get_icon() -> Texture2D:
|
||||||
return preload("res://common/icons/cube-3d-sphere.svg")
|
return preload("res://common/icons/cube-3d-sphere.svg")
|
||||||
|
|
||||||
func use_text() -> String:
|
func use_text() -> String:
|
||||||
if machine_type:
|
if machine_type:
|
||||||
return "Build " + machine_type.name
|
return tr("BUILD_%s") % machine_type.name
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
func is_one_time_use():
|
func is_one_time_use():
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func can_use(player : Player, zone : Player.ActionZone) -> bool:
|
func can_use(player : Player, _zone : Player.ActionZone) -> bool:
|
||||||
return player.terrain is Planet
|
return player.terrain is Planet
|
||||||
|
|
||||||
func use(player : Player, zone : Player.ActionZone) -> bool:
|
func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||||
|
|||||||
@ -4,10 +4,10 @@ class_name Fork
|
|||||||
const USE_INTERVAL = 0.15
|
const USE_INTERVAL = 0.15
|
||||||
|
|
||||||
func get_item_name() -> String:
|
func get_item_name() -> String:
|
||||||
return "Fork"
|
return tr("FORK")
|
||||||
|
|
||||||
func get_description() -> String:
|
func get_description() -> String:
|
||||||
return "Use it to harvest mature plants."
|
return tr("FORK_DESC_TEXT")
|
||||||
|
|
||||||
func get_icon() -> Texture2D:
|
func get_icon() -> Texture2D:
|
||||||
return preload("res://common/icons/fork.svg")
|
return preload("res://common/icons/fork.svg")
|
||||||
@ -22,7 +22,7 @@ func get_usage_object_affected(i : InspectableEntity) -> bool:
|
|||||||
return i is Plant
|
return i is Plant
|
||||||
|
|
||||||
func use_text() -> String:
|
func use_text() -> String:
|
||||||
return "Harvest"
|
return tr("HARVEST")
|
||||||
|
|
||||||
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
||||||
var areas = zone.get_affected_areas()
|
var areas = zone.get_affected_areas()
|
||||||
|
|||||||
@ -4,11 +4,10 @@ class_name Knife
|
|||||||
const KNIFE_ZONE_RADIUS = 10
|
const KNIFE_ZONE_RADIUS = 10
|
||||||
|
|
||||||
func get_item_name() -> String:
|
func get_item_name() -> String:
|
||||||
return "Knife"
|
return tr("KNIFE")
|
||||||
|
|
||||||
func get_description() -> String:
|
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:
|
func get_energy_used() -> int:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@ -19,12 +19,12 @@ func get_icon() -> Texture2D:
|
|||||||
return preload("res://common/icons/package.svg")
|
return preload("res://common/icons/package.svg")
|
||||||
|
|
||||||
func use_text() -> String:
|
func use_text() -> String:
|
||||||
return "Open"
|
return tr("OPEN")
|
||||||
|
|
||||||
func is_one_time_use():
|
func is_one_time_use():
|
||||||
return true
|
return true
|
||||||
|
|
||||||
func can_use(player : Player, zone : Player.ActionZone) -> bool:
|
func can_use(player : Player, _zone : Player.ActionZone) -> bool:
|
||||||
return player.planet != null
|
return player.planet != null
|
||||||
|
|
||||||
func use(player : Player, zone : Player.ActionZone) -> bool:
|
func use(player : Player, zone : Player.ActionZone) -> bool:
|
||||||
|
|||||||
@ -11,10 +11,10 @@ const SCORE_ICON = preload("res://common/icons/growth.svg")
|
|||||||
@export var plant_mutations: Array[PlantMutation]
|
@export var plant_mutations: Array[PlantMutation]
|
||||||
|
|
||||||
func get_item_name() -> String:
|
func get_item_name() -> String:
|
||||||
return "%s Seed" % plant_type.name
|
return tr("%s_SEED") % plant_type.name
|
||||||
|
|
||||||
func get_description() -> String:
|
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:
|
func get_icon() -> Texture2D:
|
||||||
return plant_type.seed_texture
|
return plant_type.seed_texture
|
||||||
@ -23,7 +23,7 @@ func get_energy_used() -> int:
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
func get_usage_zone_radius() -> int:
|
func get_usage_zone_radius() -> int:
|
||||||
return 30
|
return 35
|
||||||
|
|
||||||
func get_usage_object_affected(i : InspectableEntity) -> bool:
|
func get_usage_object_affected(i : InspectableEntity) -> bool:
|
||||||
return i is Plant
|
return i is Plant
|
||||||
@ -36,7 +36,7 @@ func _init(
|
|||||||
plant_mutations = Seed.mutate(_parent_mutation)
|
plant_mutations = Seed.mutate(_parent_mutation)
|
||||||
|
|
||||||
func use_text() -> String:
|
func use_text() -> String:
|
||||||
return "Plant " + plant_type.name
|
return tr("PLANT_%s") % plant_type.name
|
||||||
|
|
||||||
func is_one_time_use():
|
func is_one_time_use():
|
||||||
return true
|
return true
|
||||||
@ -80,7 +80,7 @@ func card_info() -> CardInfo:
|
|||||||
|
|
||||||
info.stats.append(
|
info.stats.append(
|
||||||
CardStatInfo.new(
|
CardStatInfo.new(
|
||||||
"Cost %d energy" % energy_usage,
|
tr("COST_%d_ENERGY") % energy_usage,
|
||||||
ENERGY_ICON
|
ENERGY_ICON
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -88,13 +88,13 @@ func card_info() -> CardInfo:
|
|||||||
if is_one_time_use():
|
if is_one_time_use():
|
||||||
info.stats.append(
|
info.stats.append(
|
||||||
CardStatInfo.new(
|
CardStatInfo.new(
|
||||||
"One time use",
|
tr("ONE_TIME_USE"),
|
||||||
ONE_TIME_ICON
|
ONE_TIME_ICON
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
var effect_section = CardSectionInfo.new(
|
var effect_section = CardSectionInfo.new(
|
||||||
"Effect",
|
tr("EFFECT"),
|
||||||
get_description()
|
get_description()
|
||||||
)
|
)
|
||||||
effect_section.title_icon = ACTION_ICON
|
effect_section.title_icon = ACTION_ICON
|
||||||
@ -137,11 +137,19 @@ static func mutate(parent_mutation : Array[PlantMutation] = []) -> Array[PlantMu
|
|||||||
AddMutation.new()
|
AddMutation.new()
|
||||||
]
|
]
|
||||||
|
|
||||||
if len(parent_mutation):
|
if (
|
||||||
possible_mutations.append_array( [
|
len(parent_mutation) > 2
|
||||||
|
):
|
||||||
|
possible_mutations = [
|
||||||
UpgradeMutation.new(),
|
UpgradeMutation.new(),
|
||||||
RemoveMutation.new(),
|
RemoveMutation.new(),
|
||||||
])
|
]
|
||||||
|
elif len(parent_mutation) > 0:
|
||||||
|
possible_mutations = [
|
||||||
|
AddMutation.new(),
|
||||||
|
UpgradeMutation.new(),
|
||||||
|
RemoveMutation.new(),
|
||||||
|
]
|
||||||
|
|
||||||
var chosen_mutation = possible_mutations.pick_random()
|
var chosen_mutation = possible_mutations.pick_random()
|
||||||
|
|
||||||
@ -159,10 +167,10 @@ class DontMutate extends MutationPossibility:
|
|||||||
class AddMutation extends MutationPossibility:
|
class AddMutation extends MutationPossibility:
|
||||||
func mutate(parent_mutation : Array[PlantMutation] = [])-> Array[PlantMutation]:
|
func mutate(parent_mutation : Array[PlantMutation] = [])-> Array[PlantMutation]:
|
||||||
var new_mutations = parent_mutation.duplicate_deep()
|
var new_mutations = parent_mutation.duplicate_deep()
|
||||||
var mut = PlantMutation.random_mutation()
|
var mut = PlantMutation.random_mutation(parent_mutation)
|
||||||
|
|
||||||
if mut:
|
if mut:
|
||||||
var existing_mut_id = new_mutations.find_custom(func(m:PlantMutation): m.get_mutation_name() == mut.get_mutation_name())
|
var existing_mut_id = new_mutations.find_custom(func(m:PlantMutation): return m.get_mutation_name() == mut.get_mutation_name())
|
||||||
|
|
||||||
if existing_mut_id >= 0:
|
if existing_mut_id >= 0:
|
||||||
new_mutations[existing_mut_id].level += 1
|
new_mutations[existing_mut_id].level += 1
|
||||||
|
|||||||
@ -4,10 +4,10 @@ class_name Shovel
|
|||||||
const SHOVEL_ZONE_RADIUS = 50
|
const SHOVEL_ZONE_RADIUS = 50
|
||||||
|
|
||||||
func get_item_name() -> String:
|
func get_item_name() -> String:
|
||||||
return "Shovel"
|
return tr("SHOVEL")
|
||||||
|
|
||||||
func get_description() -> String:
|
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:
|
func get_icon() -> Texture2D:
|
||||||
return preload("res://common/icons/shovel.svg")
|
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
|
return i is Plant or i is UndergroundLoot
|
||||||
|
|
||||||
func use_text() -> String:
|
func use_text() -> String:
|
||||||
return "Dig"
|
return tr("DIG")
|
||||||
|
|
||||||
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
func can_use(_player : Player, zone : Player.ActionZone) -> bool:
|
||||||
var areas = zone.get_affected_areas()
|
var areas = zone.get_affected_areas()
|
||||||
|
|||||||
@ -4,10 +4,10 @@ class_name Trowel
|
|||||||
const TROWEL_ZONE_RADIUS = 50
|
const TROWEL_ZONE_RADIUS = 50
|
||||||
|
|
||||||
func get_item_name() -> String:
|
func get_item_name() -> String:
|
||||||
return "Trowel"
|
return tr("TROWEL")
|
||||||
|
|
||||||
func get_description() -> String:
|
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:
|
func get_icon() -> Texture2D:
|
||||||
return preload("res://common/icons/trowel.svg")
|
return preload("res://common/icons/trowel.svg")
|
||||||
|
|||||||
@ -187,7 +187,7 @@ func upgrade_max_energy(amount = 1):
|
|||||||
player_updated.emit(self)
|
player_updated.emit(self)
|
||||||
|
|
||||||
func upgrade_inventory_size(amount = 1):
|
func upgrade_inventory_size(amount = 1):
|
||||||
data.inventory.items.resize(data.inventory.items.size() + amount)
|
data.inventory.size += 1
|
||||||
upgraded.emit()
|
upgraded.emit()
|
||||||
player_updated.emit(self)
|
player_updated.emit(self)
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ func card_info() -> CardInfo:
|
|||||||
|
|
||||||
if default_info_desc != "":
|
if default_info_desc != "":
|
||||||
var desc_section = CardSectionInfo.new(
|
var desc_section = CardSectionInfo.new(
|
||||||
"Description",
|
tr("DESCRIPTION"),
|
||||||
default_info_desc
|
default_info_desc
|
||||||
)
|
)
|
||||||
desc_section.title_icon = DESC_ICON
|
desc_section.title_icon = DESC_ICON
|
||||||
|
|||||||
@ -4,27 +4,10 @@ class_name UndergroundLoot
|
|||||||
const AREA_WIDTH = 20
|
const AREA_WIDTH = 20
|
||||||
const LOOTED_ITEM_RANDOM_RANGE = 50
|
const LOOTED_ITEM_RANDOM_RANGE = 50
|
||||||
|
|
||||||
const SPRITE_SCENE : PackedScene = preload("res://entities/underground_loot/underground_loot_sprite.tscn")
|
@export var item_number : int = 1
|
||||||
|
|
||||||
@export var loot : Array[Item]
|
|
||||||
|
|
||||||
@onready var sprite_object: Node2D = generate_sprite()
|
|
||||||
@onready var collision_shape: CollisionShape2D = generate_collision_shape()
|
|
||||||
|
|
||||||
|
|
||||||
func _init(_loot : Array[Item] = []):
|
|
||||||
loot = _loot
|
|
||||||
default_info_desc = "Contain some random seeds. [b]Dig it with a shovel.[/b]"
|
|
||||||
|
|
||||||
func pointer_text() -> String:
|
func pointer_text() -> String:
|
||||||
return "Buried Loot"
|
return tr("BURIED_SEEDS")
|
||||||
|
|
||||||
func generate_sprite() -> Node2D:
|
|
||||||
var object = SPRITE_SCENE.instantiate()
|
|
||||||
|
|
||||||
add_child(object)
|
|
||||||
|
|
||||||
return object
|
|
||||||
|
|
||||||
func generate_collision_shape() -> CollisionShape2D:
|
func generate_collision_shape() -> CollisionShape2D:
|
||||||
var collision = CollisionShape2D.new()
|
var collision = CollisionShape2D.new()
|
||||||
@ -36,8 +19,19 @@ func generate_collision_shape() -> CollisionShape2D:
|
|||||||
|
|
||||||
return collision
|
return collision
|
||||||
|
|
||||||
|
func generate_loot() -> Array[Item]:
|
||||||
|
var seeds : Array[Item] = []
|
||||||
|
if len(GameInfo.game_data.unlocked_plant_types):
|
||||||
|
seeds.append(
|
||||||
|
Seed.new(
|
||||||
|
GameInfo.game_data.unlocked_plant_types.pick_random()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
return seeds
|
||||||
|
|
||||||
|
|
||||||
func dig():
|
func dig():
|
||||||
for item in loot:
|
for item in generate_loot():
|
||||||
planet.drop_item(item, global_position, LOOTED_ITEM_RANDOM_RANGE)
|
planet.drop_item(item, global_position, LOOTED_ITEM_RANDOM_RANGE)
|
||||||
queue_free()
|
queue_free()
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
extends EntityData
|
extends EntityData
|
||||||
class_name UndergroundLootData
|
class_name UndergroundLootData
|
||||||
|
|
||||||
@export var loot : Array[Item]
|
const SCENE = preload("res://entities/underground_loot/underground_loot.tscn")
|
||||||
|
|
||||||
|
@export var item_number : int
|
||||||
|
|
||||||
func _init(e : UndergroundLoot):
|
func _init(e : UndergroundLoot):
|
||||||
position = e.global_position
|
position = e.global_position
|
||||||
loot = e.loot
|
item_number = e.item_number
|
||||||
|
|
||||||
func load() -> Entity:
|
func load() -> Entity:
|
||||||
return UndergroundLoot.new(loot)
|
var loot : UndergroundLoot = (SCENE.instantiate() as UndergroundLoot)
|
||||||
|
loot.item_number = item_number
|
||||||
|
return loot
|
||||||
|
|||||||
21
entities/underground_loot/underground_loot.tscn
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://dxjud7bti0na0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dfd2hh12155lo" path="res://entities/underground_loot/scripts/underground_loot.gd" id="1_knus5"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bu26h0iqutnky" path="res://entities/underground_loot/assets/sprites/underground_loot.svg" id="2_jfggo"]
|
||||||
|
|
||||||
|
[sub_resource type="CircleShape2D" id="CircleShape2D_knus5"]
|
||||||
|
radius = 20.09975
|
||||||
|
|
||||||
|
[node name="UndergroundLootSprites" type="Area2D"]
|
||||||
|
script = ExtResource("1_knus5")
|
||||||
|
default_info_title = "BURIED_SEEDS"
|
||||||
|
default_info_desc = "BURIED_SEEDS_DESC_TEXT"
|
||||||
|
metadata/_custom_type_script = "uid://d3bk52402ylvl"
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
modulate = Color(0.286275, 0.219608, 0.313726, 1)
|
||||||
|
scale = Vector2(0.0806452, 0.0806452)
|
||||||
|
texture = ExtResource("2_jfggo")
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
shape = SubResource("CircleShape2D_knus5")
|
||||||
@ -1,10 +0,0 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://dxjud7bti0na0"]
|
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bu26h0iqutnky" path="res://entities/underground_loot/assets/sprites/underground_loot.svg" id="1_t1xxm"]
|
|
||||||
|
|
||||||
[node name="UndergroundLootSprites" type="Node2D"]
|
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
|
||||||
modulate = Color(0.286275, 0.219608, 0.313726, 1)
|
|
||||||
scale = Vector2(0.0806452, 0.0806452)
|
|
||||||
texture = ExtResource("1_t1xxm")
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=20 format=3 uid="uid://753270jjxmfg"]
|
[gd_scene load_steps=26 format=3 uid="uid://753270jjxmfg"]
|
||||||
|
|
||||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_m317d"]
|
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="1_m317d"]
|
||||||
[ext_resource type="Script" uid="uid://b7f10wuounfan" path="res://gui/game/card/scripts/card.gd" id="2_kpm7h"]
|
[ext_resource type="Script" uid="uid://b7f10wuounfan" path="res://gui/game/card/scripts/card.gd" id="2_kpm7h"]
|
||||||
@ -26,6 +26,30 @@ title_icon = ExtResource("6_7wc8v")
|
|||||||
text = "Text"
|
text = "Text"
|
||||||
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_kpm7h"]
|
||||||
|
script = ExtResource("5_7wc8v")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_7wc8v"]
|
||||||
|
script = ExtResource("5_7wc8v")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_pmldi"]
|
||||||
|
script = ExtResource("5_7wc8v")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_gibok"]
|
||||||
|
script = ExtResource("5_7wc8v")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vnqhg"]
|
||||||
|
script = ExtResource("5_7wc8v")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_on5kv"]
|
||||||
|
script = ExtResource("5_7wc8v")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_plgbn"]
|
[sub_resource type="Resource" id="Resource_plgbn"]
|
||||||
script = ExtResource("3_7wc8v")
|
script = ExtResource("3_7wc8v")
|
||||||
title = "Hello"
|
title = "Hello"
|
||||||
@ -33,7 +57,7 @@ type_icon = ExtResource("6_7wc8v")
|
|||||||
texture = ExtResource("7_mwhj8")
|
texture = ExtResource("7_mwhj8")
|
||||||
important_stat_text = "10"
|
important_stat_text = "10"
|
||||||
important_stat_icon = ExtResource("3_kpm7h")
|
important_stat_icon = ExtResource("3_kpm7h")
|
||||||
sections = Array[ExtResource("5_7wc8v")]([SubResource("Resource_mwhj8")])
|
sections = Array[ExtResource("5_7wc8v")]([SubResource("Resource_mwhj8"), SubResource("Resource_kpm7h"), SubResource("Resource_7wc8v"), SubResource("Resource_pmldi"), SubResource("Resource_gibok"), SubResource("Resource_vnqhg"), SubResource("Resource_on5kv"), null])
|
||||||
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnqhg"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnqhg"]
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
[gd_scene load_steps=15 format=3 uid="uid://3ss8pvhsackj"]
|
[gd_scene load_steps=22 format=3 uid="uid://3ss8pvhsackj"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://753270jjxmfg" path="res://gui/game/card/card.tscn" id="1_we78f"]
|
[ext_resource type="PackedScene" uid="uid://753270jjxmfg" path="res://gui/game/card/card.tscn" id="1_we78f"]
|
||||||
[ext_resource type="Shader" uid="uid://bqjwmomh851lc" path="res://common/vfx/materials/shaders/skew.gdshader" id="1_x54se"]
|
[ext_resource type="Shader" uid="uid://bqjwmomh851lc" path="res://common/vfx/materials/shaders/skew.gdshader" id="1_x54se"]
|
||||||
[ext_resource type="Script" uid="uid://dj5pld5ragrjp" path="res://gui/game/card/scripts/card_visualiser.gd" id="2_ntbk8"]
|
[ext_resource type="Script" uid="uid://dj5pld5ragrjp" path="res://gui/game/card/scripts/card_visualiser.gd" id="2_ntbk8"]
|
||||||
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="3_5yk1o"]
|
[ext_resource type="Script" uid="uid://dj2pv1hiwjfv0" path="res://gui/game/card/scripts/card_info.gd" id="3_5yk1o"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bd6qddv5ihkjr" path="res://common/icons/bucket.svg" id="3_r0jrf"]
|
||||||
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="4_7xkgc"]
|
[ext_resource type="Script" uid="uid://dgbh38j13g5kn" path="res://gui/game/card/scripts/card_section_info.gd" id="4_7xkgc"]
|
||||||
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="5_1et8x"]
|
[ext_resource type="Script" uid="uid://b4tkium34c831" path="res://gui/game/card/scripts/card_stat_info.gd" id="5_1et8x"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="6_7xkgc"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="7_1et8x"]
|
[ext_resource type="Texture2D" uid="uid://bsvxhafoxwmw0" path="res://common/icons/cube-3d-sphere.svg" id="7_1et8x"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://df0y0s666ui4h" path="res://icon.png" id="7_6vah0"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_r0jrf"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_r0jrf"]
|
||||||
shader = ExtResource("1_x54se")
|
shader = ExtResource("1_x54se")
|
||||||
@ -17,13 +18,41 @@ shader_parameter/y_rot = -6e-45
|
|||||||
shader_parameter/x_rot = -6e-45
|
shader_parameter/x_rot = -6e-45
|
||||||
shader_parameter/inset = 0.0
|
shader_parameter/inset = 0.0
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5yk1o"]
|
|
||||||
viewport_path = NodePath("SubViewport")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_r0jrf"]
|
[sub_resource type="Resource" id="Resource_r0jrf"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_6vah0"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_jjqcm"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_lj1tr"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vabmf"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_1vjtn"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_l3vvu"]
|
||||||
|
script = ExtResource("4_7xkgc")
|
||||||
|
metadata/_custom_type_script = "uid://dgbh38j13g5kn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_bw03i"]
|
||||||
script = ExtResource("3_5yk1o")
|
script = ExtResource("3_5yk1o")
|
||||||
title = "Hello"
|
title = "Hello"
|
||||||
texture = ExtResource("6_7xkgc")
|
texture = ExtResource("7_6vah0")
|
||||||
|
important_stat_text = "6"
|
||||||
|
important_stat_icon = ExtResource("3_r0jrf")
|
||||||
|
sections = Array[ExtResource("4_7xkgc")]([SubResource("Resource_r0jrf"), SubResource("Resource_6vah0"), SubResource("Resource_jjqcm"), SubResource("Resource_lj1tr"), SubResource("Resource_vabmf"), SubResource("Resource_1vjtn"), SubResource("Resource_l3vvu")])
|
||||||
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
metadata/_custom_type_script = "uid://dj2pv1hiwjfv0"
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_1et8x"]
|
[sub_resource type="Animation" id="Animation_1et8x"]
|
||||||
@ -39,31 +68,38 @@ _data = {
|
|||||||
&"appear": SubResource("Animation_7xkgc")
|
&"appear": SubResource("Animation_7xkgc")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="CardVisualiser" type="TextureRect"]
|
[node name="CardVisualiser" type="SubViewportContainer"]
|
||||||
material = SubResource("ShaderMaterial_r0jrf")
|
material = SubResource("ShaderMaterial_r0jrf")
|
||||||
offset_left = -24.0
|
anchors_preset = 8
|
||||||
offset_right = 276.0
|
anchor_left = 0.5
|
||||||
offset_bottom = 110.0
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -246.0
|
||||||
|
offset_top = -134.0
|
||||||
|
offset_right = 54.0
|
||||||
|
offset_bottom = -24.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
scale = Vector2(1.0000002, 1.0000002)
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
size_flags_vertical = 4
|
size_flags_vertical = 4
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
texture = SubResource("ViewportTexture_5yk1o")
|
|
||||||
stretch_mode = 4
|
|
||||||
script = ExtResource("2_ntbk8")
|
script = ExtResource("2_ntbk8")
|
||||||
small_mode = true
|
card_info = SubResource("Resource_bw03i")
|
||||||
card_info = SubResource("Resource_r0jrf")
|
|
||||||
|
|
||||||
[node name="SubViewport" type="SubViewport" parent="."]
|
[node name="SubViewport" type="SubViewport" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
|
handle_input_locally = false
|
||||||
size = Vector2i(300, 110)
|
size = Vector2i(300, 110)
|
||||||
|
size_2d_override_stretch = true
|
||||||
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="CardContainer" type="MarginContainer" parent="SubViewport"]
|
[node name="CardContainer" type="MarginContainer" parent="SubViewport"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
clip_contents = true
|
offset_right = 300.0
|
||||||
offset_right = 350.0
|
|
||||||
offset_bottom = 110.0
|
offset_bottom = 110.0
|
||||||
size_flags_horizontal = 0
|
|
||||||
theme_override_constants/margin_left = 25
|
theme_override_constants/margin_left = 25
|
||||||
theme_override_constants/margin_top = 25
|
theme_override_constants/margin_top = 25
|
||||||
theme_override_constants/margin_right = 25
|
theme_override_constants/margin_right = 25
|
||||||
@ -73,10 +109,11 @@ theme_override_constants/margin_bottom = 25
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
self_modulate = Color(1, 1, 1, 0)
|
self_modulate = Color(1, 1, 1, 0)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
small_mode = true
|
small_mode = true
|
||||||
down_arrow = true
|
down_arrow = true
|
||||||
info = SubResource("Resource_r0jrf")
|
info = SubResource("Resource_bw03i")
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@ -1,27 +1,55 @@
|
|||||||
@tool
|
@tool
|
||||||
extends TextureRect
|
extends SubViewportContainer
|
||||||
|
class_name CardVisualiser
|
||||||
|
|
||||||
|
signal clicked(c: CardVisualiser)
|
||||||
|
|
||||||
const MAX_ROT = 15
|
const MAX_ROT = 15
|
||||||
const ZOOM_SCALE = 1.0
|
const ZOOM_SCALE = 1.2
|
||||||
|
|
||||||
var wanted_rot : Vector2 = Vector2.ZERO
|
var wanted_rot : Vector2 = Vector2.ZERO
|
||||||
var real_rot : Vector2 = Vector2.ZERO
|
var real_rot : Vector2 = Vector2.ZERO
|
||||||
var wanted_scale : Vector2 = Vector2.ONE
|
|
||||||
|
|
||||||
var is_ready = false
|
var is_ready = false
|
||||||
|
|
||||||
@export var small_mode : bool = false :
|
@export var card_width : int = 250 :
|
||||||
set(v):
|
set(v):
|
||||||
|
card_width = v
|
||||||
|
if is_ready :
|
||||||
|
update()
|
||||||
|
|
||||||
|
@export var small_mode : bool = true :
|
||||||
|
set(v):
|
||||||
|
var old = small_mode
|
||||||
small_mode = v
|
small_mode = v
|
||||||
if is_ready : update()
|
if is_ready and old != small_mode :
|
||||||
|
update()
|
||||||
|
|
||||||
|
@export var interactive_small_mode : bool = true
|
||||||
|
@export var interactive_zoom : bool = false
|
||||||
|
|
||||||
|
@export var down_arrow : bool = true :
|
||||||
|
set(v):
|
||||||
|
var old = down_arrow
|
||||||
|
down_arrow = v
|
||||||
|
if is_ready and old != down_arrow :
|
||||||
|
update()
|
||||||
|
|
||||||
@export var card_info : CardInfo = null :
|
@export var card_info : CardInfo = null :
|
||||||
set(v):
|
set(v):
|
||||||
|
var old = card_info
|
||||||
card_info = v
|
card_info = v
|
||||||
if is_ready : update()
|
if is_ready and old != card_info:
|
||||||
|
update()
|
||||||
|
|
||||||
@export_tool_button("Update", "Callable") var update_action = update
|
@export_tool_button("Update", "Callable") var update_action = update
|
||||||
|
|
||||||
|
var updated_on_last_frame = false
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if event.is_action_pressed("action") and is_mouse_over():
|
||||||
|
clicked.emit(self)
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
material = material.duplicate()
|
material = material.duplicate()
|
||||||
update()
|
update()
|
||||||
@ -32,17 +60,21 @@ func _process(_d):
|
|||||||
|
|
||||||
if is_mouse_over():
|
if is_mouse_over():
|
||||||
wanted_rot = center_relative_mouse_position * MAX_ROT
|
wanted_rot = center_relative_mouse_position * MAX_ROT
|
||||||
small_mode = false
|
if interactive_small_mode: small_mode = false
|
||||||
|
if interactive_zoom: scale = scale.lerp(Vector2.ONE * ZOOM_SCALE, 0.2)
|
||||||
else:
|
else:
|
||||||
wanted_rot = Vector2.ZERO
|
wanted_rot = Vector2.ZERO
|
||||||
small_mode = true
|
if interactive_small_mode: small_mode = true
|
||||||
|
if interactive_zoom: scale = scale.lerp(Vector2.ONE, 0.2)
|
||||||
|
|
||||||
real_rot = real_rot.lerp(wanted_rot, 0.1)
|
real_rot = real_rot.lerp(wanted_rot, 0.1)
|
||||||
|
|
||||||
material.set_shader_parameter("y_rot", - real_rot.x)
|
material.set_shader_parameter("y_rot", - real_rot.x)
|
||||||
material.set_shader_parameter("x_rot", real_rot.y)
|
material.set_shader_parameter("x_rot", real_rot.y)
|
||||||
|
|
||||||
%SubViewport.size.y = %CardContainer.size.y
|
%Card.custom_minimum_size.x = card_width
|
||||||
|
%CardContainer.size.y = 0
|
||||||
|
%SubViewport.size = %CardContainer.size
|
||||||
size = %SubViewport.size
|
size = %SubViewport.size
|
||||||
|
|
||||||
|
|
||||||
@ -55,8 +87,10 @@ func is_mouse_over() -> bool:
|
|||||||
)
|
)
|
||||||
|
|
||||||
func update():
|
func update():
|
||||||
|
|
||||||
if card_info:
|
if card_info:
|
||||||
%Card.info = card_info
|
%Card.info = card_info
|
||||||
%Card.small_mode = small_mode
|
%Card.small_mode = small_mode
|
||||||
|
%Card.down_arrow = down_arrow
|
||||||
%Card.update()
|
%Card.update()
|
||||||
|
|
||||||
|
updated_on_last_frame = true
|
||||||
|
|||||||
@ -1,74 +1,16 @@
|
|||||||
[gd_scene load_steps=29 format=3 uid="uid://12nak7amd1uq"]
|
[gd_scene load_steps=23 format=3 uid="uid://12nak7amd1uq"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/game/scripts/game_gui.gd" id="1_udau0"]
|
[ext_resource type="Script" uid="uid://cqao7n800qy40" path="res://gui/game/scripts/game_gui.gd" id="1_udau0"]
|
||||||
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="2_nq5i2"]
|
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="2_nq5i2"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cm3ehinvvj52i" path="res://gui/game/assets/texture/Interface sans boutons.png" id="3_n4kem"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://fnv0qhkh40mv" path="res://gui/game/announce/announce.tscn" id="4_h6540"]
|
[ext_resource type="PackedScene" uid="uid://fnv0qhkh40mv" path="res://gui/game/announce/announce.tscn" id="4_h6540"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="4_k4juk"]
|
[ext_resource type="Texture2D" uid="uid://dcgnamu7sb3ov" path="res://common/icons/bolt.svg" id="4_k4juk"]
|
||||||
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="4_ujg5r"]
|
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="4_ujg5r"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://qt80w6o01q5s" path="res://gui/ressources/fonts/TitanOne-Regular.ttf" id="5_2wykm"]
|
||||||
|
[ext_resource type="Script" uid="uid://0dhj8sdpil7q" path="res://gui/tools/control_animation_player.gd" id="6_id0t5"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="7_id0t5"]
|
[ext_resource type="Texture2D" uid="uid://bt3g5bmar0icf" path="res://common/icons/growth.svg" id="7_id0t5"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b5cuxgisrsfgt" path="res://common/icons/player-pause.svg" id="9_2wykm"]
|
[ext_resource type="Texture2D" uid="uid://b5cuxgisrsfgt" path="res://common/icons/player-pause.svg" id="9_2wykm"]
|
||||||
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
|
[ext_resource type="PackedScene" uid="uid://clicjf8ts51h8" path="res://gui/game/inventory_gui/inventory_gui.tscn" id="9_id0t5"]
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_id0t5"]
|
|
||||||
interpolation_mode = 1
|
|
||||||
offsets = PackedFloat32Array(0, 0.115169, 0.41573, 0.620786, 0.924157)
|
|
||||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1)
|
|
||||||
|
|
||||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_ykapk"]
|
|
||||||
gradient = SubResource("Gradient_id0t5")
|
|
||||||
fill_to = Vector2(1, 1)
|
|
||||||
repeat = 1
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_l73to"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath(".:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(0.950568, 0, 0.346412, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_p6blc"]
|
|
||||||
resource_name = "default"
|
|
||||||
loop_mode = 1
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath(".:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.5, 1.03333),
|
|
||||||
"transitions": PackedFloat32Array(1, 1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(0.950568, 0, 0.346412, 1), Color(0.999996, 0.39403, 0.49625, 1), Color(0.950568, 0, 0.346412, 1)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_l3q4a"]
|
|
||||||
_data = {
|
|
||||||
&"RESET": SubResource("Animation_l73to"),
|
|
||||||
&"default": SubResource("Animation_p6blc")
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_dr1y2"]
|
|
||||||
interpolation_mode = 1
|
|
||||||
offsets = PackedFloat32Array(0, 0.697674)
|
|
||||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
|
||||||
|
|
||||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_h6540"]
|
|
||||||
gradient = SubResource("Gradient_dr1y2")
|
|
||||||
width = 50
|
|
||||||
height = 50
|
|
||||||
fill = 1
|
|
||||||
fill_from = Vector2(0.504274, 0.5)
|
|
||||||
|
|
||||||
[sub_resource type="Gradient" id="Gradient_2wykm"]
|
[sub_resource type="Gradient" id="Gradient_2wykm"]
|
||||||
offsets = PackedFloat32Array(0, 0.279476, 1)
|
offsets = PackedFloat32Array(0, 0.279476, 1)
|
||||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1)
|
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1)
|
||||||
@ -181,34 +123,10 @@ _data = {
|
|||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_mbdxg"]
|
[sub_resource type="Animation" id="Animation_mbdxg"]
|
||||||
length = 0.001
|
length = 0.001
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("NoEnergyLeft:position")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0, -100)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_w16yr"]
|
[sub_resource type="Animation" id="Animation_w16yr"]
|
||||||
resource_name = "no_energy_left_appear"
|
resource_name = "no_energy_left_appear"
|
||||||
length = 0.5
|
length = 0.5
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("NoEnergyLeft:position")
|
|
||||||
tracks/0/interp = 2
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0.0666667, 0.5),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Vector2(0, -100), Vector2(0, 0)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_p0xoq"]
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_p0xoq"]
|
||||||
_data = {
|
_data = {
|
||||||
@ -216,58 +134,23 @@ _data = {
|
|||||||
&"no_energy_left_appear": SubResource("Animation_w16yr")
|
&"no_energy_left_appear": SubResource("Animation_w16yr")
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="GameGui" type="Control"]
|
[node name="GameGui" type="CanvasLayer"]
|
||||||
|
script = ExtResource("1_udau0")
|
||||||
|
|
||||||
|
[node name="ScoreParticles" type="Control" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
size_flags_horizontal = 3
|
mouse_filter = 2
|
||||||
size_flags_vertical = 3
|
|
||||||
mouse_filter = 1
|
|
||||||
script = ExtResource("1_udau0")
|
|
||||||
|
|
||||||
[node name="NoEnergyLeft" type="VBoxContainer" parent="."]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
visible = false
|
|
||||||
modulate = Color(0.950568, 0, 0.346412, 1)
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 10
|
|
||||||
anchor_right = 1.0
|
|
||||||
offset_top = -100.0
|
|
||||||
offset_bottom = 2.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme = ExtResource("2_nq5i2")
|
|
||||||
theme_override_constants/separation = 12
|
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="NoEnergyLeft"]
|
|
||||||
custom_minimum_size = Vector2(0, 40)
|
|
||||||
layout_mode = 2
|
|
||||||
texture = SubResource("GradientTexture2D_ykapk")
|
|
||||||
expand_mode = 1
|
|
||||||
stretch_mode = 1
|
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="NoEnergyLeft"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme = ExtResource("2_nq5i2")
|
|
||||||
text = "No energy left"
|
|
||||||
label_settings = ExtResource("4_ujg5r")
|
|
||||||
horizontal_alignment = 1
|
|
||||||
vertical_alignment = 1
|
|
||||||
|
|
||||||
[node name="BlinkAnimation" type="AnimationPlayer" parent="NoEnergyLeft"]
|
|
||||||
libraries = {
|
|
||||||
&"": SubResource("AnimationLibrary_l3q4a")
|
|
||||||
}
|
|
||||||
autoplay = "default"
|
|
||||||
|
|
||||||
[node name="Announce" parent="." instance=ExtResource("4_h6540")]
|
[node name="Announce" parent="." instance=ExtResource("4_h6540")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 1
|
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
@ -276,75 +159,86 @@ grow_vertical = 2
|
|||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
theme = ExtResource("2_nq5i2")
|
theme = ExtResource("2_nq5i2")
|
||||||
|
|
||||||
[node name="PlayerInfo" type="Control" parent="MarginContainer"]
|
[node name="EnergyInfo" type="HBoxContainer" parent="MarginContainer"]
|
||||||
custom_minimum_size = Vector2(337, 160)
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 0
|
||||||
|
theme_override_constants/separation = 0
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
|
[node name="EnergyAnimationPlayer" type="Node" parent="MarginContainer/EnergyInfo"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
script = ExtResource("6_id0t5")
|
||||||
|
metadata/_custom_type_script = "uid://0dhj8sdpil7q"
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="MarginContainer/EnergyInfo"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
|
theme_override_constants/margin_left = 0
|
||||||
|
theme_override_constants/margin_top = -25
|
||||||
|
theme_override_constants/margin_right = 0
|
||||||
|
theme_override_constants/margin_bottom = -15
|
||||||
|
|
||||||
[node name="Background" type="TextureRect" parent="MarginContainer/PlayerInfo"]
|
[node name="EnergyCount" type="RichTextLabel" parent="MarginContainer/EnergyInfo/MarginContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("2_nq5i2")
|
||||||
|
theme_override_fonts/normal_font = ExtResource("5_2wykm")
|
||||||
|
theme_override_fonts/bold_font = ExtResource("5_2wykm")
|
||||||
|
theme_override_fonts/bold_italics_font = ExtResource("5_2wykm")
|
||||||
|
theme_override_fonts/italics_font = ExtResource("5_2wykm")
|
||||||
|
theme_override_font_sizes/normal_font_size = 30
|
||||||
|
theme_override_font_sizes/bold_font_size = 100
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[b]X[/b] / X"
|
||||||
|
fit_content = true
|
||||||
|
autowrap_mode = 0
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="Icon" type="TextureRect" parent="MarginContainer/EnergyInfo"]
|
||||||
|
custom_minimum_size = Vector2(50, 50)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 8
|
||||||
|
texture = ExtResource("4_k4juk")
|
||||||
|
expand_mode = 4
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
|
||||||
|
[node name="DayCount" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 4
|
||||||
|
size_flags_vertical = 0
|
||||||
|
text = "Day 0"
|
||||||
|
label_settings = ExtResource("4_ujg5r")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="QuotaProgressBar" type="ProgressBar" parent="MarginContainer/VBoxContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
custom_minimum_size = Vector2(400, 50)
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("2_nq5i2")
|
||||||
|
rounded = true
|
||||||
|
show_percentage = false
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/QuotaProgressBar"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
texture = ExtResource("3_n4kem")
|
|
||||||
expand_mode = 2
|
|
||||||
stretch_mode = 5
|
|
||||||
|
|
||||||
[node name="EnergyInfo" type="HBoxContainer" parent="MarginContainer/PlayerInfo"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = -1
|
|
||||||
anchor_left = 0.27299702
|
|
||||||
anchor_top = 0.453125
|
|
||||||
anchor_right = 0.27299702
|
|
||||||
anchor_bottom = 0.496875
|
|
||||||
offset_left = -44.0
|
|
||||||
offset_top = -12.5
|
|
||||||
offset_right = 44.0
|
|
||||||
offset_bottom = 12.5
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_constants/separation = 0
|
|
||||||
metadata/_edit_use_anchors_ = true
|
|
||||||
|
|
||||||
[node name="Icon" type="TextureRect" parent="MarginContainer/PlayerInfo/EnergyInfo"]
|
|
||||||
custom_minimum_size = Vector2(36.64, 0)
|
|
||||||
layout_mode = 2
|
|
||||||
texture = ExtResource("4_k4juk")
|
|
||||||
expand_mode = 2
|
|
||||||
stretch_mode = 5
|
|
||||||
|
|
||||||
[node name="EnergyCount" type="Label" parent="MarginContainer/PlayerInfo/EnergyInfo"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
theme = ExtResource("2_nq5i2")
|
|
||||||
text = "X/X"
|
|
||||||
label_settings = ExtResource("4_ujg5r")
|
|
||||||
horizontal_alignment = 1
|
|
||||||
vertical_alignment = 1
|
|
||||||
|
|
||||||
[node name="QuotaInfo" type="CenterContainer" parent="MarginContainer/PlayerInfo"]
|
|
||||||
layout_mode = 0
|
|
||||||
offset_left = 176.0
|
|
||||||
offset_top = 83.0
|
|
||||||
offset_right = 247.0
|
|
||||||
offset_bottom = 133.0
|
|
||||||
|
|
||||||
[node name="QuotaProgressBar" type="TextureProgressBar" parent="MarginContainer/PlayerInfo/QuotaInfo"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
modulate = Color(0.1801, 0.349497, 0.456794, 1)
|
|
||||||
layout_mode = 2
|
|
||||||
fill_mode = 4
|
|
||||||
texture_progress = SubResource("GradientTexture2D_h6540")
|
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PlayerInfo/QuotaInfo"]
|
|
||||||
layout_mode = 2
|
|
||||||
theme_override_constants/separation = 2
|
theme_override_constants/separation = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
[node name="QuotaProgressText" type="Label" parent="MarginContainer/PlayerInfo/QuotaInfo/HBoxContainer"]
|
[node name="QuotaProgressText" type="Label" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "X"
|
text = "X"
|
||||||
@ -352,7 +246,7 @@ label_settings = ExtResource("4_ujg5r")
|
|||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer/PlayerInfo/QuotaInfo/HBoxContainer"]
|
[node name="TextureRect" type="TextureRect" parent="MarginContainer/VBoxContainer/QuotaProgressBar/HBoxContainer"]
|
||||||
custom_minimum_size = Vector2(30, 30)
|
custom_minimum_size = Vector2(30, 30)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = ExtResource("7_id0t5")
|
texture = ExtResource("7_id0t5")
|
||||||
@ -365,15 +259,6 @@ size_flags_horizontal = 8
|
|||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="DayCount" type="Label" parent="MarginContainer/TopRightContent"]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 8
|
|
||||||
size_flags_vertical = 0
|
|
||||||
text = "Day 0"
|
|
||||||
label_settings = ExtResource("4_ujg5r")
|
|
||||||
vertical_alignment = 1
|
|
||||||
|
|
||||||
[node name="Pause" type="Button" parent="MarginContainer/TopRightContent"]
|
[node name="Pause" type="Button" parent="MarginContainer/TopRightContent"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 8
|
size_flags_horizontal = 8
|
||||||
@ -390,7 +275,6 @@ size_flags_vertical = 8
|
|||||||
|
|
||||||
[node name="PassDayFade" type="ColorRect" parent="."]
|
[node name="PassDayFade" type="ColorRect" parent="."]
|
||||||
physics_interpolation_mode = 0
|
physics_interpolation_mode = 0
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
@ -401,7 +285,6 @@ color = Color(0.0627451, 0.0588235, 0.168627, 0)
|
|||||||
|
|
||||||
[node name="Effect" type="TextureRect" parent="."]
|
[node name="Effect" type="TextureRect" parent="."]
|
||||||
modulate = Color(1, 1, 1, 0)
|
modulate = Color(1, 1, 1, 0)
|
||||||
layout_mode = 1
|
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
|||||||
@ -8,29 +8,27 @@ signal item_clicked()
|
|||||||
const MODULATE_INSPECTED_COLOR = Color.GRAY
|
const MODULATE_INSPECTED_COLOR = Color.GRAY
|
||||||
|
|
||||||
var current_item : Item = null
|
var current_item : Item = null
|
||||||
|
var item : Item = null
|
||||||
var was_selected : bool = false
|
var was_selected : bool = false
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
mouse_entered.connect(_on_mouse_entered)
|
mouse_entered.connect(
|
||||||
mouse_exited.connect(_on_mouse_excited)
|
func(): Pointer.inspect(self)
|
||||||
|
)
|
||||||
|
mouse_exited.connect(
|
||||||
|
func(): Pointer.stop_inspect(self)
|
||||||
|
)
|
||||||
update(null, false)
|
update(null, false)
|
||||||
|
|
||||||
func inspect(is_inspected : bool = true):
|
func inspect(is_inspected : bool = true):
|
||||||
modulate = MODULATE_INSPECTED_COLOR if is_inspected else Color.WHITE
|
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:
|
func _on_gui_input(_event: InputEvent) -> void:
|
||||||
if Input.is_action_just_pressed("action"):
|
if Input.is_action_just_pressed("action"):
|
||||||
emit_signal("item_clicked")
|
emit_signal("item_clicked")
|
||||||
|
|
||||||
func update(item: Item, selected : bool):
|
func update(_item: Item, selected : bool):
|
||||||
|
item = _item
|
||||||
if selected and not was_selected:
|
if selected and not was_selected:
|
||||||
%SelectedAnimation.play("selected")
|
%SelectedAnimation.play("selected")
|
||||||
elif not selected and was_selected:
|
elif not selected and was_selected:
|
||||||
|
|||||||
@ -120,37 +120,19 @@ alignment = 1
|
|||||||
|
|
||||||
[node name="PauseTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
|
[node name="PauseTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Pause"
|
text = "PAUSE"
|
||||||
label_settings = SubResource("LabelSettings_apjlw")
|
label_settings = SubResource("LabelSettings_apjlw")
|
||||||
horizontal_alignment = 1
|
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"]
|
[node name="ControlsTitle" type="Label" parent="Container/Tutorial/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Controls"
|
text = "CONTROLS"
|
||||||
label_settings = ExtResource("3_0pdto")
|
label_settings = ExtResource("3_0pdto")
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="ControlsText" type="Label" parent="Container/Tutorial/VBoxContainer"]
|
[node name="ControlsText" type="Label" parent="Container/Tutorial/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Directional Arrows/Right Click : Move
|
text = "CONTROLS_TEXT"
|
||||||
Left Click : Interact/Pickup Items
|
|
||||||
Mouse Wheel : Change current item
|
|
||||||
X : Drop Item
|
|
||||||
"
|
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="Container/Tutorial/VBoxContainer"]
|
[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"]
|
[node name="Resume" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Resume Game"
|
text = "RESUME_GAME"
|
||||||
icon = ExtResource("5_apjlw")
|
icon = ExtResource("5_apjlw")
|
||||||
|
|
||||||
[node name="Restart" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
|
[node name="Restart" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Restart"
|
text = "RESTART"
|
||||||
icon = ExtResource("6_58dya")
|
icon = ExtResource("6_58dya")
|
||||||
|
|
||||||
[node name="Quit" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
|
[node name="Quit" type="Button" parent="Container/Tutorial/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Quit"
|
text = "QUIT"
|
||||||
icon = ExtResource("7_yj6f1")
|
icon = ExtResource("7_yj6f1")
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
|||||||
@ -2,6 +2,8 @@ extends CanvasLayer
|
|||||||
|
|
||||||
var pause = false : set = set_pause
|
var pause = false : set = set_pause
|
||||||
|
|
||||||
|
const PLANET_RUN_SCENE = preload("res://stages/planet_run/planet_run.tscn")
|
||||||
|
|
||||||
func set_pause(p):
|
func set_pause(p):
|
||||||
if p != pause:
|
if p != pause:
|
||||||
if p:
|
if p:
|
||||||
@ -22,7 +24,7 @@ func _on_resume_pressed():
|
|||||||
func _on_restart_pressed():
|
func _on_restart_pressed():
|
||||||
GameInfo.game_data.reset_all()
|
GameInfo.game_data.reset_all()
|
||||||
pause = false
|
pause = false
|
||||||
get_tree().reload_current_scene()
|
get_tree().change_scene_to_packed(PLANET_RUN_SCENE)
|
||||||
|
|
||||||
func _on_quit_pressed():
|
func _on_quit_pressed():
|
||||||
get_tree().quit()
|
get_tree().quit()
|
||||||
|
|||||||
140
gui/game/quota_reward/quota_reward.tscn
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
[gd_scene load_steps=10 format=3 uid="uid://doxm7uab8i3tq"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://12kjdou2kp5y" path="res://gui/game/quota_reward/scripts/quota_reward.gd" id="1_gye62"]
|
||||||
|
[ext_resource type="Shader" uid="uid://cuni3ggtw2uuy" path="res://gui/game/pause/resources/blur.gdshader" id="2_6ibex"]
|
||||||
|
[ext_resource type="Theme" uid="uid://bgcmd213j6gk1" path="res://gui/ressources/default_theme.tres" id="3_x2kx4"]
|
||||||
|
[ext_resource type="LabelSettings" uid="uid://dqwayi8yjwau2" path="res://gui/ressources/title_label_settings.tres" id="4_trw0e"]
|
||||||
|
|
||||||
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_gy0la"]
|
||||||
|
shader = ExtResource("2_6ibex")
|
||||||
|
shader_parameter/strength = 3.3
|
||||||
|
shader_parameter/mix_percentage = 0.3
|
||||||
|
|
||||||
|
[sub_resource type="Theme" id="Theme_7fpy7"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_8323k"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("RewardChoiceContainer:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("RewardChoiceContainer:visible")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [true]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_4f1tl"]
|
||||||
|
resource_name = "show"
|
||||||
|
length = 0.3
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("RewardChoiceContainer:modulate")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0.033333335, 0.3),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("RewardChoiceContainer:visible")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 0.033333335),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 1,
|
||||||
|
"values": [false, true]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7fpy7"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_8323k"),
|
||||||
|
&"show": SubResource("Animation_4f1tl")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="RewardChoice" type="CanvasLayer"]
|
||||||
|
process_mode = 3
|
||||||
|
script = ExtResource("1_gye62")
|
||||||
|
|
||||||
|
[node name="RewardChoiceContainer" type="Control" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
modulate = Color(1, 1, 1, 0)
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="RewardChoiceContainer"]
|
||||||
|
material = SubResource("ShaderMaterial_gy0la")
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0.0352941, 0.0196078, 0.12549, 0.705882)
|
||||||
|
|
||||||
|
[node name="Choice" type="MarginContainer" parent="RewardChoiceContainer"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("3_x2kx4")
|
||||||
|
theme_override_constants/margin_left = 30
|
||||||
|
theme_override_constants/margin_top = 30
|
||||||
|
theme_override_constants/margin_right = 30
|
||||||
|
theme_override_constants/margin_bottom = 30
|
||||||
|
|
||||||
|
[node name="VSplitContainer" type="VBoxContainer" parent="RewardChoiceContainer/Choice"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("3_x2kx4")
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="RewardChoiceContainer/Choice/VSplitContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = SubResource("Theme_7fpy7")
|
||||||
|
text = "CHOOSE_A_REWARD"
|
||||||
|
label_settings = ExtResource("4_trw0e")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="RewardChoiceContainer/Choice/VSplitContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("3_x2kx4")
|
||||||
|
text = "REWARD_SCREEN_TEXT"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="ChoicesContainer" type="HBoxContainer" parent="RewardChoiceContainer/Choice/VSplitContainer"]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
layout_mode = 2
|
||||||
|
theme = ExtResource("3_x2kx4")
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_7fpy7")
|
||||||
|
}
|
||||||