diff --git a/common/game_data/scripts/artefacts/talion_soil/talion_soil.gd b/common/game_data/scripts/artefacts/talion_soil/talion_soil.gd index eb348a4..745ecb2 100644 --- a/common/game_data/scripts/artefacts/talion_soil/talion_soil.gd +++ b/common/game_data/scripts/artefacts/talion_soil/talion_soil.gd @@ -12,4 +12,4 @@ func get_3d_scene() -> PackedScene: return preload("res://common/game_data/scripts/artefacts/talion_soil/talion_soil.blend") func modify_plant_influence_radius(plant_influence_radius : float) -> float: - return plant_influence_radius * 1.5 \ No newline at end of file + return plant_influence_radius + Region.TILE_SIZE \ No newline at end of file diff --git a/common/game_data/scripts/infinite_progression_data.gd b/common/game_data/scripts/infinite_progression_data.gd index fd623a2..969c393 100644 --- a/common/game_data/scripts/infinite_progression_data.gd +++ b/common/game_data/scripts/infinite_progression_data.gd @@ -1,6 +1,8 @@ extends ProgressionData class_name InfiniteProgressionData +@export var mutation_unlocked := StoryProgressionData.START_UNLOCKED_MUTATIONS + func get_story_step() -> StoryStep: return InfiniteStoryStep.new(run_number) @@ -25,8 +27,14 @@ func are_all_mutations_unlocked() -> bool: func unlock_new_mutation() -> PlantMutation: return null +func unlock_all_mutation() -> void: + pass + func get_available_mutations() -> Array[PlantMutation]: - return get_all_mutations() + if GameInfo.story_game_data and GameInfo.story_game_data.progression_data: + mutation_unlocked = max(mutation_unlocked,GameInfo.story_game_data.progression_data.mutations_unlocked) + + return get_all_mutations().slice(0, mutation_unlocked) func set_best_run(v := best_run): if best_run < 10 and v == 10: diff --git a/common/game_data/scripts/progression_data.gd b/common/game_data/scripts/progression_data.gd index d600b73..498f086 100644 --- a/common/game_data/scripts/progression_data.gd +++ b/common/game_data/scripts/progression_data.gd @@ -21,6 +21,8 @@ class_name ProgressionData @abstract func unlock_new_mutation() -> PlantMutation +@abstract func unlock_all_mutation() -> void + func set_best_run(v := best_run): best_run = v diff --git a/common/game_data/scripts/run/run_data_plant_info.gd b/common/game_data/scripts/run/run_data_plant_info.gd index 8ea20ed..9b5fe2a 100644 --- a/common/game_data/scripts/run/run_data_plant_info.gd +++ b/common/game_data/scripts/run/run_data_plant_info.gd @@ -6,7 +6,7 @@ const DEFAULT_LIFETIME = 6 const DEFAULT_BASE_SCORE = 1 const DEFAULT_SEED_NUMBER = 2 const DEFAULT_SEED_RANDOM_LOOSE = 1 -const DEFAULT_PLANT_INFLUENCE_RADIUS = 100 +const DEFAULT_PLANT_INFLUENCE_RADIUS = Region.TILE_SIZE const DEFAULT_MUTATION_PROBABILITY = 0.3 const DEFAULT_MUTATION_MAX_NUMBER = 2 diff --git a/common/game_data/scripts/story/infinite_story_step.gd b/common/game_data/scripts/story/infinite_story_step.gd index 1beada8..246db44 100644 --- a/common/game_data/scripts/story/infinite_story_step.gd +++ b/common/game_data/scripts/story/infinite_story_step.gd @@ -21,13 +21,13 @@ func get_player_max_energy(_difficulty_setting : int) -> int: return 4 func get_player_max_inventory(_difficulty_setting : int) -> int: - return 3 + return 4 func get_objective_for_region(level : int, _difficulty_setting : int) -> int: return basic_objective_for_region(level) -func get_cave_occurence(_level : int, _difficulty_setting : int) -> int: - return 0 +func has_cave_modifier(_level : int, _difficulty_setting : int) -> bool: + return false func is_region_sequence_infinite() -> bool: return true @@ -36,7 +36,7 @@ func get_region_sequence_length(_difficulty_setting) -> int: return 1000 func is_run_point_dangerous(level : int, _difficulty_setting : int) -> bool: - return level%6 == 0 and level != 0 + return level%5 == 0 and level != 0 func get_destination_text() -> String: return "" diff --git a/common/game_data/scripts/story/story_step.gd b/common/game_data/scripts/story/story_step.gd index 4f16cbc..6fca561 100644 --- a/common/game_data/scripts/story/story_step.gd +++ b/common/game_data/scripts/story/story_step.gd @@ -48,19 +48,33 @@ func get_region_sequence_length(difficulty_setting : int) -> int: return 6 return 8 -func get_first_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int: - return 2 +func has_cave_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return false + 2: return false + 3: return true + 4: return false + 5: return true + 6: return true + 7: return false + 8: return true + _: return level % 2 == 0 -func get_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int: - return 3 +func has_vending_machine_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return false + 2: return true + 3: return false + 4: return true + 5: return false + 6: return false + 7: return true + 8: return false + _: return (level + 1) % 3 == 0 -func get_first_cave_occurence(_level : int, _difficulty_setting : int) -> int: - return 1 - -func get_cave_occurence(_level : int, _difficulty_setting : int) -> int: - return 3 - -func get_challenge_chance(_level : int, _difficulty_setting : int) -> float: +func get_challenge_chance(level : int, difficulty_setting : int) -> float: + if is_run_point_dangerous(level, difficulty_setting): + return 0. return 0.15 func get_run_point_number(level : int, difficulty_setting : int) -> int: @@ -120,17 +134,11 @@ func get_gameplay_modifiers_for_region(level : int, difficulty_setting : int) -> var modifiers : Array[RegionModifier] = [] if need_gameplay_modifier(level,difficulty_setting): - var first_vending = get_first_vending_machine_occurence(level, difficulty_setting) - var vending_occurence = get_vending_machine_occurence(level, difficulty_setting) - if vending_occurence > 0 and level >= first_vending: - if (level - first_vending)%vending_occurence == 0: - modifiers.append(VendingMachineModifier.new()) + if has_vending_machine_modifier(level, difficulty_setting): + modifiers.append(VendingMachineModifier.new()) - var first_cave = get_first_cave_occurence(level, difficulty_setting) - var cave_occurence = get_cave_occurence(level, difficulty_setting) - if cave_occurence > 0 and level >= first_cave: - if (level - first_cave)%cave_occurence == 0: - modifiers.append(CaveModifier.new()) + if has_cave_modifier(level, difficulty_setting): + modifiers.append(CaveModifier.new()) return modifiers diff --git a/common/game_data/scripts/story/story_steps/1_1_start_story_step.gd b/common/game_data/scripts/story/story_steps/1_1_start_story_step.gd index cb07725..d61c5c7 100644 --- a/common/game_data/scripts/story/story_steps/1_1_start_story_step.gd +++ b/common/game_data/scripts/story/story_steps/1_1_start_story_step.gd @@ -25,9 +25,6 @@ func get_logs() -> Array[Log]: ) ] -func get_cave_occurence(_level : int, _difficulty_setting : int) -> int: - return 2 - func get_region_sequence_length(_difficulty_setting : int) -> int: return 5 @@ -37,18 +34,23 @@ func get_objective_multiplier() -> float: func is_run_point_dangerous(_level : int, _difficulty_setting : int) -> bool: return false -func get_first_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int: - return 0 +func has_cave_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return false + 2: return true + 3: return false + 4: return false + _: return false -func get_vending_machine_occurence(_level : int, _difficulty_setting : int) -> int: - return 0 +func has_vending_machine_modifier(_level : int, _difficulty_setting : int) -> bool: + return false func get_challenge_chance(_level : int, _difficulty_setting : int) -> float: return 0. func get_ship_dialog_path(level : int, difficulty_setting : int ,ship_in_space := true) -> String: - if ship_in_space and level + 1 == get_cave_occurence(level, difficulty_setting): + if ship_in_space and has_cave_modifier(level + 1, difficulty_setting): return CAVE_DIALOG_PATH if ship_in_space and is_run_finished(level + 1, difficulty_setting): return MERCURY_ARRIVAL_DIALOG_PATH - return "" \ No newline at end of file + return "" diff --git a/common/game_data/scripts/story/story_steps/2_aqua_story_step.gd b/common/game_data/scripts/story/story_steps/2_aqua_story_step.gd index d56467d..dc609ce 100644 --- a/common/game_data/scripts/story/story_steps/2_aqua_story_step.gd +++ b/common/game_data/scripts/story/story_steps/2_aqua_story_step.gd @@ -36,6 +36,26 @@ func get_player_max_inventory(_difficulty_setting) -> int: func get_objective_multiplier() -> float: return 1.2 +func has_cave_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return false + 2: return true + 3: return false + 4: return true + 5: return false + 6: return true + _: return level % 2 == 0 + +func has_vending_machine_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return true + 2: return false + 3: return false + 4: return false + 5: return true + 6: return false + _: return (level + 1) % 3 == 0 + func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String: if level == 5: return AQUA_TRAVEL_PHONE_CALL_DIALOG_PATH diff --git a/common/game_data/scripts/story/story_steps/3_subterra_story_step.gd b/common/game_data/scripts/story/story_steps/3_subterra_story_step.gd index f45da99..2098a42 100644 --- a/common/game_data/scripts/story/story_steps/3_subterra_story_step.gd +++ b/common/game_data/scripts/story/story_steps/3_subterra_story_step.gd @@ -37,6 +37,26 @@ func get_player_max_inventory(_difficulty_setting : int) -> int: func get_objective_multiplier() -> float: return 1.4 +func has_cave_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return false + 2: return true + 3: return true + 4: return false + 5: return false + 6: return true + _: return level % 2 == 0 + +func has_vending_machine_modifier(level : int, _difficulty_setting : int) -> bool: + match level: + 1: return false + 2: return false + 3: return false + 4: return true + 5: return true + 6: return false + _: return (level + 1) % 3 == 0 + func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String: if level == 5: return TRAVEL_PHONE_CALL_DIALOG_PATH diff --git a/common/game_data/scripts/story/story_steps/4_estia_story_step.gd b/common/game_data/scripts/story/story_steps/4_estia_story_step.gd index 18cceb6..2446c6b 100644 --- a/common/game_data/scripts/story/story_steps/4_estia_story_step.gd +++ b/common/game_data/scripts/story/story_steps/4_estia_story_step.gd @@ -37,7 +37,10 @@ func get_player_max_inventory(_difficulty_setting : int) -> int: func get_objective_multiplier() -> float: return 1.6 +func get_region_sequence_length(_difficulty_setting : int) -> int: + return 9 + func get_ship_dialog_path(level : int, _difficulty_setting : int, _ship_in_space := true) -> String: - if level == 5: + if level == 6: return TRAVEL_PHONE_CALL_DIALOG_PATH return "" \ No newline at end of file diff --git a/common/game_data/scripts/story_progression_data.gd b/common/game_data/scripts/story_progression_data.gd index 6570b8a..47074b4 100644 --- a/common/game_data/scripts/story_progression_data.gd +++ b/common/game_data/scripts/story_progression_data.gd @@ -1,9 +1,11 @@ extends ProgressionData class_name StoryProgressionData +const START_UNLOCKED_MUTATIONS = 8 + @export var planted_mutation_ids: Array[String] = [] @export var story_step_i := 0 -@export var mutations_unlocked = 8 +@export var mutations_unlocked = START_UNLOCKED_MUTATIONS func get_story_step() -> StoryStep: return get_all_story_steps()[story_step_i] @@ -33,4 +35,7 @@ func are_all_mutations_unlocked() -> bool: func unlock_new_mutation() -> PlantMutation: var new_mutation = get_all_mutations()[mutations_unlocked] mutations_unlocked += 1 - return new_mutation \ No newline at end of file + return new_mutation + +func unlock_all_mutation() -> void: + mutations_unlocked = len(get_all_mutations()) + 1 \ No newline at end of file diff --git a/common/game_info/game_info.gd b/common/game_info/game_info.gd index 9727b7b..ba44d13 100644 --- a/common/game_info/game_info.gd +++ b/common/game_info/game_info.gd @@ -130,3 +130,24 @@ func update_inputs(s : SettingsData = settings_data): func has_unlocked_infinite_mode(): return true + +func get_action_key_name(action_name: String) -> String: + var events: Array[InputEvent] = InputMap.action_get_events(action_name) + + var saved_remapped_input = null + var existing_remapped_id: int = GameInfo.settings_data.action_remapped.find(action_name) + if existing_remapped_id != -1: + saved_remapped_input = GameInfo.settings_data.input_remapped[existing_remapped_id] + + var event: InputEvent = null + if saved_remapped_input: + event = saved_remapped_input + else: + event = null if events.size() == 0 else events[0] + + var input_name: String = "UNASSIGNED" if event == null else event.as_text() + if event is InputEventKey: + var keycode = DisplayServer.keyboard_get_keycode_from_physical(event.physical_keycode) + input_name = OS.get_keycode_string(keycode) + + return input_name \ No newline at end of file diff --git a/entities/plants/plant_sprite.tscn b/entities/plants/plant_sprite.tscn index 6c2b9d5..6b54500 100644 --- a/entities/plants/plant_sprite.tscn +++ b/entities/plants/plant_sprite.tscn @@ -12,35 +12,6 @@ height = 52.0 atlas = ExtResource("3_j6jm5") region = Rect2(76, 75, 124, 135) -[sub_resource type="ViewportTexture" id="ViewportTexture_rbgiq"] -viewport_path = NodePath("LifeTimeSprite/SubViewport") - -[sub_resource type="Gradient" id="Gradient_rbgiq"] -interpolation_mode = 1 -offsets = PackedFloat32Array(0, 0.800905, 1) -colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_rbgiq"] -gradient = SubResource("Gradient_rbgiq") -width = 100 -height = 100 -fill = 1 -fill_from = Vector2(0.5, 0.5) -fill_to = Vector2(1, 0.5) - -[sub_resource type="Gradient" id="Gradient_j6jm5"] -interpolation_mode = 1 -offsets = PackedFloat32Array(0, 0.5248869) -colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0) - -[sub_resource type="GradientTexture2D" id="GradientTexture2D_wyuub"] -gradient = SubResource("Gradient_j6jm5") -width = 100 -height = 100 -fill = 1 -fill_from = Vector2(0.5, 0.5) -fill_to = Vector2(1, 0.5) - [sub_resource type="Animation" id="Animation_wyuub"] length = 0.001 tracks/0/type = "value" @@ -184,30 +155,6 @@ position = Vector2(4.444448, 31.11118) scale = Vector2(3.1777775, 3.1777775) texture = ExtResource("3_rbgiq") -[node name="LifeTimeSprite" type="Sprite2D" parent="." unique_id=799762981] -unique_name_in_owner = true -visible = false -scale = Vector2(0.26000002, 0.26000005) -texture = SubResource("ViewportTexture_rbgiq") - -[node name="SubViewport" type="SubViewport" parent="LifeTimeSprite" unique_id=1809354262] -disable_3d = true -transparent_bg = true -size = Vector2i(100, 100) - -[node name="LifetimeProgressBar" type="TextureProgressBar" parent="LifeTimeSprite/SubViewport" unique_id=967185775] -unique_name_in_owner = true -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -size_flags_horizontal = 6 -size_flags_vertical = 6 -fill_mode = 4 -texture_over = SubResource("GradientTexture2D_rbgiq") -texture_progress = SubResource("GradientTexture2D_wyuub") - [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=1793068152] unique_name_in_owner = true libraries/ = SubResource("AnimationLibrary_8eofq") diff --git a/entities/plants/scripts/plant.gd b/entities/plants/scripts/plant.gd index c0acacd..a4fd16c 100644 --- a/entities/plants/scripts/plant.gd +++ b/entities/plants/scripts/plant.gd @@ -47,22 +47,27 @@ func _ready(): await get_tree().create_timer(0.05).timeout update_nearby_plant() update_decontamination_area_factor() - if data.day == data.get_lifetime() - 1: - plant_sprite.apply_about_to_dye_effect() + plant_sprite.is_about_to_die = data.day == data.get_lifetime() - 1 func pointer_text() -> String: return data.plant_name func inspect(is_inspected: bool = true): - plant_sprite.set_modulate_color(MODULATE_INSPECTED_COLOR if is_inspected else default_modulate, false) - plant_sprite.display_lifetime_sprite = is_inspected + plant_sprite.is_inspected = is_inspected influence_zone.show_influence = is_inspected + for area in influence_zone.get_overlapping_areas(): + if area is Plant and area != self: + area.show_influence(is_inspected) + + +func show_influence(influenced := true): + plant_sprite.is_plant_influenced = influenced + func generate_sprite() -> PlantSprite: var sprite_object: PlantSprite = SPRITE_SCENE.instantiate() add_child(sprite_object) - # sprite_object.generate_mutation_effects(self) return sprite_object @@ -107,8 +112,7 @@ func _pass_day(): for m in data.mutations: m._start_day_effect(self) - if data.day == data.get_lifetime() - 1: - plant_sprite.apply_about_to_dye_effect() + plant_sprite.is_about_to_die = data.day == data.get_lifetime() - 1 func _end_pass_day(): match data.get_state(): diff --git a/entities/plants/scripts/plant_influence_zone.gd b/entities/plants/scripts/plant_influence_zone.gd index cb3ea4a..526f201 100644 --- a/entities/plants/scripts/plant_influence_zone.gd +++ b/entities/plants/scripts/plant_influence_zone.gd @@ -16,10 +16,10 @@ func _init(_radius = 100): func _ready(): sprite = Circle.new() # sprite.z_index = 100 - sprite.radius = radius + sprite.radius = radius + roundi(Plant.PLANT_AREA_RADIUS / 2.) sprite.fill = false - sprite.width = 1 - sprite.opacity = 0.5 + sprite.width = 3 + sprite.opacity = 0.3 sprite.visible = show_influence add_child(sprite) diff --git a/entities/plants/scripts/plant_sprite.gd b/entities/plants/scripts/plant_sprite.gd index b5a28b7..57ed734 100644 --- a/entities/plants/scripts/plant_sprite.gd +++ b/entities/plants/scripts/plant_sprite.gd @@ -4,7 +4,7 @@ class_name PlantSprite const PLANTED_SEED_CROP_WIDTH = 50 const PLANTED_SEED_POS_Y = 0 -const PARTICLES_SCENE: PackedScene = preload("res://common/vfx/particles/effect_particles.tscn") +const MODULATE_PLANT_INFLUENCED_COLOR = Color("c599ffff") const ABOUT_TO_DYE_COLOR := Color("#fca67e") const ABOUT_TO_DYE_PERIOD := 1.0 @@ -14,14 +14,17 @@ signal harvest_animation_finished var last_updated_on_state: PlantData.State = PlantData.State.MATURE var stored_seed_image: Texture = null -var display_lifetime_sprite: bool = false: set = set_display_lifetime_sprite -var sprite_modulate: Color = Color.WHITE: set = set_sprite_modulate +var is_action_affected : bool = false +var is_inspected : bool = false +var is_plant_influenced : bool = false +var is_about_to_die : bool = false var about_to_dye_tween: Tween var target_modulate_color := Color.WHITE +var elapsed_time := 0. + func setup_plant_sprite(plant_data: PlantData): - set_display_lifetime_sprite() %PlantedSeed.texture = PlantTextureBuilder.build_seed_texture(plant_data.plant_name.hash()) update_plant_sprite(plant_data, true) @@ -35,43 +38,13 @@ func update_plant_sprite(plant_data: PlantData, with_animation = false): %PlantedSeed.visible = plant_data.get_state() == PlantData.State.PLANTED - %LifetimeProgressBar.value = 100 * (float(plant_data.day) / plant_data.get_lifetime()) - - # %PlantedSeed.region_rect = Rect2( - # 0, - # PLANTED_SEED_POS_Y, - # %PlantedSeed.texture.get_width(), - # %PlantedSeed.texture.texture.get_height() - PLANTED_SEED_CROP_WIDTH + -1 * PLANTED_SEED_POS_Y, - # ) - -func generate_mutation_effects(plant: Plant): - for m in plant.data.mutations: - var particles_emitter: EffectParticles = PARTICLES_SCENE.instantiate() as EffectParticles - particles_emitter.setup_particles( - EffectParticles.Parameters.new( - m.get_icon(), - PlantMutation.get_rarity_color(m.get_rarity()) - ) - ) - add_child(particles_emitter) - func start_harvest_animation(): $AnimationPlayer.play("harvest") await $AnimationPlayer.animation_finished harvest_animation_finished.emit() -func set_display_lifetime_sprite(d := display_lifetime_sprite): - display_lifetime_sprite = d - # if is_node_ready(): - # %LifeTimeSprite.visible = d - -func set_sprite_modulate(c := sprite_modulate): - sprite_modulate = c - if is_node_ready(): - %Sprite.modulate = c - func affect_preview(is_affected: bool = true): - set_modulate_color(InspectableEntity.MODULATE_AFFECTED_COLOR if is_affected else Color.WHITE, true) + is_action_affected = is_affected func _on_body_entered(body: Node2D) -> void: if body is Player && $AnimationPlayer.current_animation != "player_move": @@ -81,25 +54,20 @@ func play_bump_animation(): %AnimationPlayer.play("bump") await %AnimationPlayer.animation_finished -func set_modulate_color(color: Color, pause_about_to_dye: bool): - target_modulate_color = color - if about_to_dye_tween: - if pause_about_to_dye and about_to_dye_tween.is_running(): - about_to_dye_tween.pause() - modulate = target_modulate_color - elif not pause_about_to_dye and not about_to_dye_tween.is_running(): - about_to_dye_tween.play() - elif is_node_ready(): - %Sprite.modulate = target_modulate_color +func _process(delta): + elapsed_time += delta -func apply_about_to_dye_effect(): - if not about_to_dye_tween: - about_to_dye_tween = create_tween() - about_to_dye_tween.tween_property(%Sprite, "modulate:r", ABOUT_TO_DYE_COLOR.r, ABOUT_TO_DYE_PERIOD).from(target_modulate_color.r) - about_to_dye_tween.parallel().tween_property(%Sprite, "modulate:g", ABOUT_TO_DYE_COLOR.g, ABOUT_TO_DYE_PERIOD).from(target_modulate_color.g) - about_to_dye_tween.parallel().tween_property(%Sprite, "modulate:b", ABOUT_TO_DYE_COLOR.b, ABOUT_TO_DYE_PERIOD).from(target_modulate_color.b) + var target_modulate = Color.WHITE + + if is_action_affected: + target_modulate = InspectableEntity.MODULATE_AFFECTED_COLOR + elif is_inspected: + target_modulate = InspectableEntity.MODULATE_INSPECTED_COLOR + elif is_plant_influenced: + target_modulate = MODULATE_PLANT_INFLUENCED_COLOR + elif is_about_to_die: + var blink_value = (cos((elapsed_time * (2 * PI)) * ABOUT_TO_DYE_PERIOD) + 1)/2 + target_modulate = target_modulate.lerp(ABOUT_TO_DYE_COLOR, blink_value) + + modulate = modulate.lerp(target_modulate, 0.8) - about_to_dye_tween.tween_property(%Sprite, "modulate:r", target_modulate_color.r, ABOUT_TO_DYE_PERIOD).from(ABOUT_TO_DYE_COLOR.r) - about_to_dye_tween.parallel().tween_property(%Sprite, "modulate:g", target_modulate_color.g, ABOUT_TO_DYE_PERIOD).from(ABOUT_TO_DYE_COLOR.g) - about_to_dye_tween.parallel().tween_property(%Sprite, "modulate:b", target_modulate_color.b, ABOUT_TO_DYE_PERIOD).from(ABOUT_TO_DYE_COLOR.b) - about_to_dye_tween.set_loops() diff --git a/entities/player_3d/player_3D.tscn b/entities/player_3d/player_3D.tscn index 65b8c48..cc79f72 100644 --- a/entities/player_3d/player_3D.tscn +++ b/entities/player_3d/player_3D.tscn @@ -106,7 +106,6 @@ theme_override_constants/margin_bottom = 15 [node name="MoveTutorial" type="Label" parent="CanvasLayer/3dTutorial" unique_id=1165378520] unique_name_in_owner = true -visible = false layout_mode = 2 size_flags_vertical = 0 text = "MOVE_WITH_RIGHT_CLICK_OR_WASD" @@ -116,6 +115,7 @@ vertical_alignment = 1 [node name="InteractTutorial" type="Label" parent="CanvasLayer/3dTutorial" unique_id=1117243867] unique_name_in_owner = true +visible = false layout_mode = 2 size_flags_vertical = 0 text = "INTERACT_WITH_LEFT_CLICK" diff --git a/entities/player_3d/scripts/player_3d.gd b/entities/player_3d/scripts/player_3d.gd index f2bd61d..d9fc9cc 100644 --- a/entities/player_3d/scripts/player_3d.gd +++ b/entities/player_3d/scripts/player_3d.gd @@ -33,6 +33,12 @@ func _ready(): %MoveTutorial.visible = not "3d_move" in GameInfo.game_data.tutorials_done %InteractTutorial.visible = false + %MoveTutorial.text = tr("MOVE_WITH_RIGHT_CLICK_OR_WASD").format({ + "W": GameInfo.get_action_key_name("move_up"), + "A": GameInfo.get_action_key_name("move_left"), + "S": GameInfo.get_action_key_name("move_down"), + "D": GameInfo.get_action_key_name("move_right") + }) %Camera3D.fov = GameInfo.settings_data.fov GameInfo.settings_data.fov_changed.connect( func(fov : float): diff --git a/gui/credits/scripts/credits.gd b/gui/credits/scripts/credits.gd index 62221c2..7e461dc 100644 --- a/gui/credits/scripts/credits.gd +++ b/gui/credits/scripts/credits.gd @@ -5,5 +5,12 @@ func appear(): %AnimationPlayer.play("appear") func _on_title_screen_pressed(): + + var progression = GameInfo.game_data.progression_data + + if not progression.are_all_mutations_unlocked(): + progression.unlock_all_mutation() + SteamConnection.unlock_achievement(SteamConnection.ACH_UNLOCK_ALL_MUTATION) + SceneManager.change_to_scene(TitleScene.new(), false) diff --git a/gui/game/tutorial/scripts/tutorial.gd b/gui/game/tutorial/scripts/tutorial.gd index d7b49ad..9dbf27d 100644 --- a/gui/game/tutorial/scripts/tutorial.gd +++ b/gui/game/tutorial/scripts/tutorial.gd @@ -15,18 +15,18 @@ var success = false @onready var steps: Array[Step] = [ Step.new( tr("MOVE_WITH_RIGHT_CLICK_OR_WASD").format({ - "W": get_action_key_name("move_up"), - "A": get_action_key_name("move_left"), - "S": get_action_key_name("move_down"), - "D": get_action_key_name("move_right") + "W": GameInfo.get_action_key_name("move_up"), + "A": GameInfo.get_action_key_name("move_left"), + "S": GameInfo.get_action_key_name("move_down"), + "D": GameInfo.get_action_key_name("move_right") }), (func(): return player.global_position.distance_to(region.data.player_spawn) > 30) ), Step.new( tr("CHANGE_ZOOM_WITH_Z_X").format({ - "Z": get_action_key_name("zoom_in"), - "X": get_action_key_name("zoom_out") + "Z": GameInfo.get_action_key_name("zoom_in"), + "X": GameInfo.get_action_key_name("zoom_out") }), (func(): return GameInfo.settings_data.zoom != 1.), @@ -75,7 +75,7 @@ var success = false ), Step.new( tr("DROP_SEED_WITH_KEY").format({ - "Q": get_action_key_name("drop") + "Q": GameInfo.get_action_key_name("drop") }), (func(): return ( @@ -195,24 +195,3 @@ class Step: if succeeded: on_succeeded.call() return succeeded - -func get_action_key_name(action_name: String) -> String: - var events: Array[InputEvent] = InputMap.action_get_events(action_name) - - var saved_remapped_input = null - var existing_remapped_id: int = GameInfo.settings_data.action_remapped.find(action_name) - if existing_remapped_id != -1: - saved_remapped_input = GameInfo.settings_data.input_remapped[existing_remapped_id] - - var event: InputEvent = null - if saved_remapped_input: - event = saved_remapped_input - else: - event = null if events.size() == 0 else events[0] - - var input_name: String = "UNASSIGNED" if event == null else event.as_text() - if event is InputEventKey: - var keycode = DisplayServer.keyboard_get_keycode_from_physical(event.physical_keycode) - input_name = OS.get_keycode_string(keycode) - - return input_name diff --git a/stages/3d_scenes/astra_base/scripts/astra_base.gd b/stages/3d_scenes/astra_base/scripts/astra_base.gd index a75963a..3d2e35d 100644 --- a/stages/3d_scenes/astra_base/scripts/astra_base.gd +++ b/stages/3d_scenes/astra_base/scripts/astra_base.gd @@ -30,8 +30,6 @@ func _ready(): Input.mouse_mode = Input.MOUSE_MODE_CAPTURED set_room_part_number() - arrive_player() - func spawn_player(): chosen_incubator_id = randi_range(0, len(%Incubators.get_children()) - 1) var new_player_incubator := %Incubators.get_children()[chosen_incubator_id] as Incubator diff --git a/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend b/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend index 7c2de2a..4f4aa8d 100644 Binary files a/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend and b/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend differ diff --git a/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend1 b/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend1 index ce38bb4..3d18ec7 100644 Binary files a/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend1 and b/stages/3d_scenes/astra_end_base/assets/3d/astra_end_base.blend1 differ diff --git a/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd b/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd index f5d7cc4..e13b474 100644 --- a/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd +++ b/stages/3d_scenes/cockpit_scene/scripts/cockpit.gd @@ -67,7 +67,7 @@ func update_dialogs(): phone_dialogs.append(story_dialog) - if len(phone_dialogs): + if len(phone_dialogs) and Dialogic.current_timeline == null: await get_tree().create_timer(randf_range(0.5,3.)).timeout ring_phone() diff --git a/stages/3d_scenes/relay_base/scripts/relay_base.gd b/stages/3d_scenes/relay_base/scripts/relay_base.gd index 6648219..0525f6f 100644 --- a/stages/3d_scenes/relay_base/scripts/relay_base.gd +++ b/stages/3d_scenes/relay_base/scripts/relay_base.gd @@ -46,6 +46,7 @@ func get_incubators() -> Array[Incubator]: return incubators func _on_exit_clicked(): + %Exit.interactable = false if dead_orchid: GameInfo.game_data.dead_orchid_position = dead_orchid.position GameInfo.game_data.dead_orchid_rotation = dead_orchid.rotation diff --git a/stages/3d_scenes/ship_garage/ship_garage.tscn b/stages/3d_scenes/ship_garage/ship_garage.tscn index 0c44fca..037effa 100644 --- a/stages/3d_scenes/ship_garage/ship_garage.tscn +++ b/stages/3d_scenes/ship_garage/ship_garage.tscn @@ -437,6 +437,7 @@ unique_name_in_owner = true custom_maximum_size = Vector2(-1, 1080) layout_mode = 2 stream = ExtResource("8_ovhgo") +volume_db = -10.0 expand = true bus = &"Sfx" diff --git a/stages/terrain/region/scripts/plant_grid.gd b/stages/terrain/region/scripts/plant_grid.gd index 4c81bf0..4f184b8 100644 --- a/stages/terrain/region/scripts/plant_grid.gd +++ b/stages/terrain/region/scripts/plant_grid.gd @@ -1,13 +1,13 @@ extends Sprite2D class_name PlantGrid -const GRID_SHIFT : int = roundi(Region.TILE_SIZE / 3.) +const GRID_SHIFT : int = roundi(Region.TILE_SIZE / 2.) const GRID_SIZE : int = Region.TILE_SIZE const POINT_RADIUS : int = 5 const POINT_COLOR : Color = Color.WHITE const POINT_VISIBILITY_RADIUS : int = 200 const POINT_FULL_OPACITY_RADIUS : int = 100 -const POINT_RANDOM_SHIFT = roundi(Region.TILE_SIZE / 2.) +const POINT_RANDOM_SHIFT = roundi(Region.TILE_SIZE / 3.) const REFRESH_TIME : float = 2. diff --git a/translation/game/gui.csv b/translation/game/gui.csv index 3ba63b1..64562b0 100644 --- a/translation/game/gui.csv +++ b/translation/game/gui.csv @@ -397,7 +397,7 @@ MODEL_HAS_BEEN_UPGRADED,Model has been upgraded,Votre modèle à été amélior UPGRADED_MAX_ENERGY_TO_%d,Max energy set to [b]%d[/b],[b]%d[/b] d'énergie maximale UPGRADED_INVENTORY_SIZE_TO_%d,Inventory size set to [b]%d[/b],[b]%d[/b] de taille d'inventaire NEW_MUTATION,New Mutation,Nouvelle Mutation -THIS_MUTATION_CAN_NOW_APPEAR_ON_SEEDS,"This mutation can now appear on seeds","Cette mutation pourra désormais apparaître sur les graines" +THIS_MUTATION_CAN_NOW_APPEAR_ON_SEEDS,"This mutation can now appear on seeds in all game modes","Cette mutation pourra désormais apparaître sur les graines dans tous les modes de jeu" NEW_ARTEFACT,New Artefact,Nouvel Artefact ADD_A_PASSIVE_EFFECT_FOR_THIS_TRAVEL,"Add a passive effect for this travel, retrieve all your artifacts on the ship","Ajoute un effet passif pour ce voyage, retrouvez tous vos artefacts sur le vaisseau" PILE,Pile,Pile,