diff --git a/common/audio_manager/assets/sfx/tractor_beam/drop.wav b/common/audio_manager/assets/sfx/tractor_beam/drop.wav new file mode 100644 index 0000000..212520c Binary files /dev/null and b/common/audio_manager/assets/sfx/tractor_beam/drop.wav differ diff --git a/common/audio_manager/assets/sfx/tractor_beam/drop.wav.import b/common/audio_manager/assets/sfx/tractor_beam/drop.wav.import new file mode 100644 index 0000000..d143229 --- /dev/null +++ b/common/audio_manager/assets/sfx/tractor_beam/drop.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cam4vv1am40dy" +path="res://.godot/imported/drop.wav-b76e8a2f6f5f0c41737e74496f01ceaa.sample" + +[deps] + +source_file="res://common/audio_manager/assets/sfx/tractor_beam/drop.wav" +dest_files=["res://.godot/imported/drop.wav-b76e8a2f6f5f0c41737e74496f01ceaa.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/common/audio_manager/assets/sfx/tractor_beam/take.wav b/common/audio_manager/assets/sfx/tractor_beam/take.wav new file mode 100644 index 0000000..de74729 Binary files /dev/null and b/common/audio_manager/assets/sfx/tractor_beam/take.wav differ diff --git a/common/audio_manager/assets/sfx/tractor_beam/take.wav.import b/common/audio_manager/assets/sfx/tractor_beam/take.wav.import new file mode 100644 index 0000000..d0834f5 --- /dev/null +++ b/common/audio_manager/assets/sfx/tractor_beam/take.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bdrdnli5k27a2" +path="res://.godot/imported/take.wav-d597c4daf1adbf3b061372ab36ef9940.sample" + +[deps] + +source_file="res://common/audio_manager/assets/sfx/tractor_beam/take.wav" +dest_files=["res://.godot/imported/take.wav-d597c4daf1adbf3b061372ab36ef9940.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=2 diff --git a/common/audio_manager/audio_manager.tscn b/common/audio_manager/audio_manager.tscn index ca5f8fe..8874a8a 100644 --- a/common/audio_manager/audio_manager.tscn +++ b/common/audio_manager/audio_manager.tscn @@ -68,6 +68,8 @@ [ext_resource type="AudioStream" uid="uid://53ixfbcd5qwu" path="res://common/audio_manager/assets/sfx/holo/holo_appear.wav" id="63_aedoe"] [ext_resource type="AudioStream" uid="uid://dsijqgnnadgem" path="res://common/audio_manager/assets/sfx/holo/holo_disappear.wav" id="64_ge2sc"] [ext_resource type="AudioStream" uid="uid://dscyqjujj1com" path="res://common/audio_manager/assets/sfx/unlock_tool/unlock_tool.wav" id="64_yr73o"] +[ext_resource type="AudioStream" uid="uid://bdrdnli5k27a2" path="res://common/audio_manager/assets/sfx/tractor_beam/take.wav" id="69_5rlid"] +[ext_resource type="AudioStream" uid="uid://cam4vv1am40dy" path="res://common/audio_manager/assets/sfx/tractor_beam/drop.wav" id="70_gfbcu"] [sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_6o1yh"] streams_count = 3 @@ -384,3 +386,11 @@ volume_db = -11.0 [node name="Unlock_tool" type="AudioStreamPlayer" parent="Sfx" unique_id=667077616] stream = ExtResource("64_yr73o") volume_db = -5.0 + +[node name="TractorBeamTake" type="AudioStreamPlayer" parent="Sfx" unique_id=1321980229] +stream = ExtResource("69_5rlid") +volume_db = -5.0 + +[node name="TractorBeamDrop" type="AudioStreamPlayer" parent="Sfx" unique_id=2023233451] +stream = ExtResource("70_gfbcu") +volume_db = -5.0 diff --git a/common/game_data/scripts/story/story_steps/1_2_mercury_story_step.gd b/common/game_data/scripts/story/story_steps/1_2_mercury_story_step.gd index dc2292a..04fabae 100644 --- a/common/game_data/scripts/story/story_steps/1_2_mercury_story_step.gd +++ b/common/game_data/scripts/story/story_steps/1_2_mercury_story_step.gd @@ -3,6 +3,7 @@ class_name MercuryStoryStep const MERCURY_DEPARTURE_DIALOG_PATH = "res://dialogs/timelines/1_waking_up/6_mercury_departure.dtl" +const VENDING_MACHINE_DIALOG_PATH = "res://dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl" const VENUS_ARRIVAL_DIALOG_PATH = "res://dialogs/timelines/1_waking_up/7_venus_arrival.dtl" func get_respawn_scene() -> Scene: @@ -21,12 +22,11 @@ func get_destination_scene() -> Scene: "002" ) -func get_first_vending_machine_occurence(_level : int) -> int: - return 1 - func get_ship_dialog_path(level : int, ship_in_space := true) -> String: if level == 0: return MERCURY_DEPARTURE_DIALOG_PATH + elif level == 1: + return MERCURY_DEPARTURE_DIALOG_PATH if ship_in_space and is_run_finished(level + 1): return VENUS_ARRIVAL_DIALOG_PATH return "" \ No newline at end of file diff --git a/common/icons/tractor-beam.svg b/common/icons/tractor-beam.svg new file mode 100644 index 0000000..3d64a30 --- /dev/null +++ b/common/icons/tractor-beam.svg @@ -0,0 +1,67 @@ + + diff --git a/common/icons/tractor-beam.svg.import b/common/icons/tractor-beam.svg.import new file mode 100644 index 0000000..67ab83f --- /dev/null +++ b/common/icons/tractor-beam.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d2nnlb6u5tvrk" +path="res://.godot/imported/tractor-beam.svg-4c2610322ae48f5564558f00d6fd6d1a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://common/icons/tractor-beam.svg" +dest_files=["res://.godot/imported/tractor-beam.svg-4c2610322ae48f5564558f00d6fd6d1a.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 +svg/scale=2.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/dialogs/timelines/1_waking_up/3_demeter_ship_presentation.dtl b/dialogs/timelines/1_waking_up/3_demeter_ship_presentation.dtl index 59bdec7..b005d4a 100644 --- a/dialogs/timelines/1_waking_up/3_demeter_ship_presentation.dtl +++ b/dialogs/timelines/1_waking_up/3_demeter_ship_presentation.dtl @@ -3,7 +3,7 @@ audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.w join mysterious_demeter center [animation="Fade In" length="1.0"] mysterious_demeter: Hi again ![pause=0.5] You did well up there ! #id:74 mysterious_demeter: Perhaps I should introduce myself now. #id:75 -leave [animation="Fade Out"] mysterious_demeter +leave mysterious_demeter [animation="Fade Out"] join demeter center [animation="Fade In" length="1.0"] demeter: I am.[pause=0.3].[pause=0.3].[pause=0.5] was,[pause=0.2] the Deputy Manager of Engineering and Talion Energy Research on this planet,[pause=0.5] but my creators and colleagues quickly called me [color=#FFA617]Demeter[/color]. #id:76 demeter: I am installed at the [color=#FFA617]Borea[/color] base,[pause=0.2] in the third server room of the east wing,[pause=0.2] from which I oversee.[pause=0.3].[pause=0.3].[pause=0.5] oversaw,[pause=0.3] all the important operations on this planet. #id:77 diff --git a/dialogs/timelines/1_waking_up/6_mercury_departure.dtl b/dialogs/timelines/1_waking_up/6_mercury_departure.dtl index 3de7fd7..8f558b3 100644 --- a/dialogs/timelines/1_waking_up/6_mercury_departure.dtl +++ b/dialogs/timelines/1_waking_up/6_mercury_departure.dtl @@ -19,16 +19,8 @@ demeter: [b]I also did some cleaning in your seeds[/b], they have gone bad durin - No problem, I'll found better ones. #id:112 - Oh no ! But I've been away just a moment ! #id:113 demeter: Uhm, I actually repaired the ship over two full months; I didn't wake you up just after the save, I thought that you wouldn't want to wait that long! #id:114 -demeter: Luckily, I've found something that might help you. I've cataloged ancient human ruins all over the planet, and some of them contain "vending machines," machines for exchanging items for money. #id:ce -- Thanks ! #id:101 -- Vending machines? #id:cf - demeter: Yes, that's where they used to get the energy they needed, for a completely unreasonable price. #id:d0 - demeter: Before, real people were in charge of transactions, but for some reason, humans spent all of recent history figuring out how to encounter as few humans as possible. Maybe they couldn't stand each other anymore... #id:d1 -- Money? #id:d2 - demeter: Yes, each human had a sum of an imaginary unit they called money. They based their entire social hierarchy on this unit. #id:d3 -demeter: In any case, I've updated their system. They'll probably need some energy to function, but they might bring you some interesting items. #id:d4 -demeter: As usual, you can use your detector to find the entrance to these ruins. #id:d5 -demeter: [b]These artifacts will be placed on a shelf in your ship[/b], but remember that if you ran out of energy and I have to teleport the ship, you'll lose them. #id:d6 +demeter: I've updated you in the meantime, and you'll discover a new tool I just added, a tractable beam! #id:115 +demeter: If you were in trouble for sorting your seeds, it might help you. #id:116 demeter: Good luck with the [color=#FFA617]Venus Relay Base[/color]; it's a little further than the last one. #id:d7 audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav" [wait time="2.0"] diff --git a/dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl b/dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl new file mode 100644 index 0000000..2cc2cd1 --- /dev/null +++ b/dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl @@ -0,0 +1,16 @@ +audio "res://common/audio_manager/assets/sfx/dialogs/sfx/incoming_transmission.wav" +join demeter center [animation="Bounce In" length="1.0"] +demeter: I've found something that might help you. I've cataloged ancient human ruins all over the planet, and some of them contain "vending machines," machines for exchanging items for money. #id:117 +- Thanks ! #id:101 +- Vending machines? #id:cf + demeter: Yes, that's where they used to get the energy they needed, for a completely unreasonable price. #id:d0 + demeter: Before, real people were in charge of transactions, but for some reason, humans spent all of recent history figuring out how to encounter as few humans as possible. Maybe they couldn't stand each other anymore... #id:d1 +- Money? #id:d2 + demeter: Yes, each human had a sum of an imaginary unit they called money. They based their entire social hierarchy on this unit. #id:d3 +demeter: In any case, I've updated their system. They'll probably need some energy to function, but they might bring you some interesting items. #id:d4 +demeter: As usual, you can use your detector to find the entrance to these ruins. #id:d5 +demeter: [b]These artifacts will be placed on a shelf in your ship[/b], but remember that if you ran out of energy and I have to teleport the ship, you'll lose them. #id:d6 +demeter: It could really help you, so go fetch them. #id:118 +audio "res://common/audio_manager/assets/sfx/dialogs/sfx/closing_transmission.wav" +[wait time="2.0"] +[end_timeline] \ No newline at end of file diff --git a/dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl.uid b/dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl.uid new file mode 100644 index 0000000..28f9779 --- /dev/null +++ b/dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl.uid @@ -0,0 +1 @@ +uid://be7qtv1piktek diff --git a/entities/player/inventory/scripts/item.gd b/entities/player/inventory/scripts/item.gd index c34ffdd..4ac3c54 100644 --- a/entities/player/inventory/scripts/item.gd +++ b/entities/player/inventory/scripts/item.gd @@ -33,6 +33,12 @@ func get_icon() -> Texture2D: func get_pointer() -> Texture2D: return null +func get_clicked_pointer() -> Texture2D: + return null + +func is_pointer_center() -> bool: + return false + func get_energy_used() -> int: return energy_usage @@ -48,11 +54,11 @@ func is_action_need_press_time() -> bool: func get_action_press_time() -> float: return DEFAULT_PRESS_TIME -func get_action_is_hold() -> bool: +func deactivate_interactable() -> bool: return false -func get_usage_object_affected(_i : Area2D) -> bool: - return false +func get_usage_objects_affected(_areas : Array[Area2D], _zone : Player.ActionZone) -> Array[Area2D]: + return [] func is_one_time_use(): return false diff --git a/entities/player/inventory/scripts/items/fork.gd b/entities/player/inventory/scripts/items/fork.gd index 591a96b..ae36ac2 100644 --- a/entities/player/inventory/scripts/items/fork.gd +++ b/entities/player/inventory/scripts/items/fork.gd @@ -27,26 +27,32 @@ func get_energy_used() -> int: func get_usage_zone_radius() -> int: return 10 -func get_usage_object_affected(i : Area2D) -> bool: - return i is Plant and Pointer.inspected == i +func get_usage_objects_affected(areas : Array[Area2D], zone : Player.ActionZone) -> Array[Area2D]: + areas = areas.filter( + func (a): return a is Plant and a.position.distance_to(zone.area.position) < 5 + ) + if len(areas) == 0: + return [] + else: + return [areas[0]] func use_text() -> String: return tr("HARVEST") func can_use(_player : Player, zone : Player.ActionZone) -> bool: - var areas = zone.get_affected_areas() - for area in areas : - if area is Plant and Pointer.inspected == area: - return true + print(zone) + var areas = get_usage_objects_affected(zone.get_affected_areas(), zone) + if len(areas) > 0: + return true + print("nope") return false func use(player : Player, zone : Player.ActionZone) -> bool: var has_plant = false - for area in zone.get_affected_areas(): - if area and area is Plant and Pointer.inspected == area: - harvest(area, player) - await player.get_tree().create_timer(USE_INTERVAL).timeout - has_plant = true + var areas = get_usage_objects_affected(zone.get_affected_areas(), zone) + if len(areas) > 0: + harvest(areas[0], player) + has_plant = true return has_plant func harvest(p : Plant, _player: Player): diff --git a/entities/player/inventory/scripts/items/seed.gd b/entities/player/inventory/scripts/items/seed.gd index 9f9cdf2..19ecd77 100644 --- a/entities/player/inventory/scripts/items/seed.gd +++ b/entities/player/inventory/scripts/items/seed.gd @@ -74,8 +74,10 @@ func get_energy_used() -> int: func get_usage_zone_radius() -> int: return 10 -func get_usage_object_affected(i : Area2D) -> bool: - return i is PlantSprite +func get_usage_objects_affected(areas : Array[Area2D], _zone : Player.ActionZone) -> Array[Area2D]: + return areas.filter( + func(a): return a is PlantSprite + ) func snap_usage_to_grid(): return true diff --git a/entities/player/inventory/scripts/items/shovel.gd b/entities/player/inventory/scripts/items/shovel.gd index 7e5a209..2db0a69 100644 --- a/entities/player/inventory/scripts/items/shovel.gd +++ b/entities/player/inventory/scripts/items/shovel.gd @@ -17,8 +17,14 @@ func get_icon() -> Texture2D: func get_usage_zone_radius() -> int: return SHOVEL_ZONE_RADIUS -func get_usage_object_affected(i : Area2D) -> bool: - return i is Plant +func get_usage_objects_affected(areas : Array[Area2D], zone : Player.ActionZone) -> Array[Area2D]: + areas.sort_custom( + func (a1,a2): return a1.position.distance_to(zone.area.position) - a2.position.distance_to(zone.area.position) + ) + if len(areas) == 0: + return [] + else: + return [areas[0]] func use_text() -> String: return tr("DIG") diff --git a/entities/player/inventory/scripts/items/tractor_beam.gd b/entities/player/inventory/scripts/items/tractor_beam.gd index fb88bfe..6534f69 100644 --- a/entities/player/inventory/scripts/items/tractor_beam.gd +++ b/entities/player/inventory/scripts/items/tractor_beam.gd @@ -10,8 +10,16 @@ func get_description() -> String: return tr("TRACTOR_BEAM_DESC_TEXT") func get_icon() -> Texture2D: - # return preload("res://common/icons/tractor_beam.svg") - return preload("res://common/icons/alert-triangle.svg") + return preload("res://common/icons/tractor-beam.svg") + +func get_pointer() -> Texture2D: + return preload("res://gui/pointer/assets/cursors/pointer-hand.svg") + +func get_clicked_pointer() -> Texture2D: + return preload("res://gui/pointer/assets/cursors/pointer-grab.svg") + +func is_pointer_center() -> bool: + return true func get_item_type() -> ItemType: return Item.ItemType.TOOL_ITEM @@ -20,16 +28,16 @@ func get_energy_used() -> int: return 0 func get_usage_zone_radius() -> int: - return 1 + return 0 func is_usage_need_proximity() -> bool: return false -func get_action_is_hold() -> bool: +func deactivate_interactable() -> bool: return true func use_text() -> String: - return tr("MOVE") + return tr("") func can_use(_player: Player, _zone: Player.ActionZone) -> bool: return Pointer.inspected != null @@ -38,12 +46,14 @@ func use(_player: Player, _zone: Player.ActionZone) -> bool: if Pointer.dragging_inspected: Pointer.stop_dragging() if !Pointer.dragging_inspected: + AudioManager.play_sfx("TractorBeamDrop") return true else: return false else: Pointer.start_dragging() if Pointer.dragging_inspected: + AudioManager.play_sfx("TractorBeamTake") return true else: return false diff --git a/entities/player/scripts/player.gd b/entities/player/scripts/player.gd index 7259f11..81e4d86 100644 --- a/entities/player/scripts/player.gd +++ b/entities/player/scripts/player.gd @@ -32,6 +32,7 @@ var instruction : Instruction = null : var just_dropped_item_objects : Array = [] var last_just_dropped_item_objects_updated := 0. +var last_instruction_done := 0. var elapsed_time := 0. @@ -89,6 +90,7 @@ func _process(delta): and instruction and instruction.can_be_done(self) ): instruction.do(self) + last_instruction_done = elapsed_time instruction = null @@ -97,7 +99,7 @@ func _process(delta): instruction = null input_direction = calculate_direction_instruction_direction() - if instruction == null and action_zone: + if instruction == null and action_zone and elapsed_time > last_instruction_done + 0.1: action_zone.destroy() action_zone = null @@ -371,7 +373,7 @@ class Instruction: player.get_tree().create_tween().tween_property(indicator, "modulate:a", 0.8, 0.2) - func abort(player : Player): + func abort(_player : Player): indicator.queue_free() class MoveInstruction extends Instruction: @@ -467,10 +469,11 @@ class ActionZone: var detected_areas = get_affected_areas() clear_preview_on_affected_area() var new_affected_areas : Array[Area2D] = [] - for a in detected_areas: - if a is Area2D and item.get_usage_object_affected(a) and a.has_method("affect_preview"): - a.affect_preview(true) - new_affected_areas.append(a) + if item: + for a in item.get_usage_objects_affected(detected_areas, self): + if a.has_method("affect_preview"): + a.affect_preview(true) + new_affected_areas.append(a) affected_areas = new_affected_areas func get_affected_areas() -> Array[Area2D]: diff --git a/gui/pointer/assets/cursors/pointer-grab.svg b/gui/pointer/assets/cursors/pointer-grab.svg new file mode 100644 index 0000000..208e0f6 --- /dev/null +++ b/gui/pointer/assets/cursors/pointer-grab.svg @@ -0,0 +1,68 @@ + + diff --git a/gui/pointer/assets/cursors/pointer-grab.svg.import b/gui/pointer/assets/cursors/pointer-grab.svg.import new file mode 100644 index 0000000..ab1eaa6 --- /dev/null +++ b/gui/pointer/assets/cursors/pointer-grab.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cxgeop0b0avku" +path="res://.godot/imported/pointer-grab.svg-34d4526b795f58b917fc46fb088c5706.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://gui/pointer/assets/cursors/pointer-grab.svg" +dest_files=["res://.godot/imported/pointer-grab.svg-34d4526b795f58b917fc46fb088c5706.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/gui/pointer/assets/cursors/pointer-hand.svg b/gui/pointer/assets/cursors/pointer-hand.svg new file mode 100644 index 0000000..0d63b5d --- /dev/null +++ b/gui/pointer/assets/cursors/pointer-hand.svg @@ -0,0 +1,68 @@ + + diff --git a/gui/pointer/assets/cursors/pointer-hand.svg.import b/gui/pointer/assets/cursors/pointer-hand.svg.import new file mode 100644 index 0000000..25e5b5e --- /dev/null +++ b/gui/pointer/assets/cursors/pointer-hand.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dvhdx85dspbnp" +path="res://.godot/imported/pointer-hand.svg-e8ceb5416e6a6ffce06ddb266901a3e8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://gui/pointer/assets/cursors/pointer-hand.svg" +dest_files=["res://.godot/imported/pointer-hand.svg-e8ceb5416e6a6ffce06ddb266901a3e8.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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/gui/pointer/scripts/pointer.gd b/gui/pointer/scripts/pointer.gd index 059860c..3fff8d7 100644 --- a/gui/pointer/scripts/pointer.gd +++ b/gui/pointer/scripts/pointer.gd @@ -77,13 +77,7 @@ func _process(delta): update_inspector(get_current_inspected()) - var cursor := default_cursor - if not Pause.pause and player and not action_disabled: - if can_interact: - cursor = action_cursor - elif current_selected_item and current_selected_item.get_pointer(): - cursor = current_selected_item.get_pointer() - Input.set_custom_mouse_cursor(cursor) + update_cursor() if player: if dragging_inspected: @@ -157,7 +151,7 @@ func process_player_actions(delta: float): if Input.is_action_just_pressed("action"): if inspected is InventoryGuiItemMouseDetector: GameInfo.game_data.player_data.inventory.set_current_item(inspected.index) - elif can_use_item and not current_selected_item.is_action_need_press_time() and current_selected_item.get_action_is_hold(): + elif can_use_item and not current_selected_item.is_action_need_press_time() and current_selected_item.deactivate_interactable(): player.try_use_item(current_selected_item, player.get_global_mouse_position()) elif can_interact: var interactable = inspected as Interactable @@ -171,7 +165,7 @@ func process_player_actions(delta: float): if ( Input.is_action_just_released("action") and can_use_item - and current_selected_item.get_action_is_hold() + and current_selected_item.deactivate_interactable() ): if dragging_inspected: player.try_use_item(current_selected_item, player.get_global_mouse_position()) @@ -247,11 +241,7 @@ func update_inspector(current_inspected): %ActionText.text = item.name else: %Action.visible = false - elif current_selected_item and current_selected_item.use_text() != "" and current_selected_item.get_action_is_hold(): - %Action.visible = true - %ActionText.text = current_selected_item.use_text() - %Action.modulate = DEFAULT_ACTION_COLOR - elif can_interact and inspected and inspected is Interactable: + elif can_interact and inspected and inspected is Interactable and (not current_selected_item or not current_selected_item.deactivate_interactable()): %Action.visible = true %ActionText.text = inspected.interact_text() %Action.modulate = DEFAULT_ACTION_COLOR if inspected.interaction_cost(player) == 0 else ENERGY_ACTION_COLOR @@ -269,6 +259,22 @@ func update_inspector(current_inspected): else: %Action.visible = false +func update_cursor(): + var cursor := default_cursor + var hotspot : = Vector2(0.,0.) + if not Pause.pause and player and not action_disabled: + if current_selected_item and current_selected_item.get_pointer(): + cursor = current_selected_item.get_pointer() + + if Input.is_action_pressed("action") and current_selected_item.get_clicked_pointer(): + cursor = current_selected_item.get_clicked_pointer() + + if current_selected_item.is_pointer_center(): + hotspot = Vector2(cursor.get_width()/2., cursor.get_height()/2.) + elif can_interact: + cursor = action_cursor + Input.set_custom_mouse_cursor(cursor,0,hotspot) + func stop_inspect(node: Node): if not dragging_inspected: all_inspected.erase(node) diff --git a/project.godot b/project.godot index e6cd48a..fd2eec7 100644 --- a/project.godot +++ b/project.godot @@ -45,6 +45,7 @@ directories/dch_directory={ "mysterious_demeter": "res://dialogs/characters/mysterious_demeter.dch" } directories/dtl_directory={ +"6_vending_machine_presentation": "res://dialogs/timelines/1_waking_up/6_vending_machine_presentation.dtl", "8_venus_departure": "res://dialogs/timelines/1_waking_up/8_venus_departure.dtl", "9_borea": "res://dialogs/timelines/1_waking_up/9_borea.dtl", "cave": "res://dialogs/timelines/1_waking_up/4_cave.dtl", @@ -111,7 +112,7 @@ variables={ "whoareyou": "false", "whynorth": "false" } -translation/id_counter=276 +translation/id_counter=280 translation/locales=[] history/visited_event_history_enabled=true audio/type_sound_bus="Sfx" @@ -247,7 +248,7 @@ zoom_out={ [internationalization] locale/translation_remaps={} -locale/translations=PackedStringArray("res://translation/game/gui.en.translation", "res://translation/game/gui.fr.translation", "res://translation/dialogs/dialogic_character_translations.en.translation", "res://translation/dialogs/dialogic_demeter_ship_failed_translation.en.translation", "res://translation/dialogs/dialogic_demeter_ship_failed_translation.fr.translation", "res://translation/dialogs/dialogic_1_waking_up_translation.en.translation", "res://translation/dialogs/dialogic_1_waking_up_translation.fr.translation", "res://translation/dialogs/dialogic_2_demeter_intro_translation.en.translation", "res://translation/dialogs/dialogic_2_demeter_intro_translation.fr.translation", "res://translation/dialogs/dialogic_3_demeter_ship_presentation_translation.en.translation", "res://translation/dialogs/dialogic_3_demeter_ship_presentation_translation.fr.translation", "res://translation/dialogs/dialogic_4_cave_translation.en.translation", "res://translation/dialogs/dialogic_4_cave_translation.fr.translation", "res://translation/dialogs/dialogic_5_mercury_arrival_translation.en.translation", "res://translation/dialogs/dialogic_5_mercury_arrival_translation.fr.translation", "res://translation/dialogs/dialogic_6_mercury_departure_translation.en.translation", "res://translation/dialogs/dialogic_6_mercury_departure_translation.fr.translation", "res://translation/dialogs/dialogic_7_venus_arrival_translation.en.translation", "res://translation/dialogs/dialogic_7_venus_arrival_translation.fr.translation", "res://translation/dialogs/dialogic_8_venus_departure_translation.en.translation", "res://translation/dialogs/dialogic_8_venus_departure_translation.fr.translation", "res://translation/dialogs/dialogic_9_borea_translation.en.translation", "res://translation/dialogs/dialogic_cave_translation.en.translation", "res://translation/dialogs/dialogic_cave_translation.fr.translation", "res://translation/dialogs/dialogic_character_translations.fr.translation") +locale/translations=PackedStringArray("res://translation/game/gui.en.translation", "res://translation/game/gui.fr.translation", "res://translation/dialogs/dialogic_character_translations.en.translation", "res://translation/dialogs/dialogic_demeter_ship_failed_translation.en.translation", "res://translation/dialogs/dialogic_demeter_ship_failed_translation.fr.translation", "res://translation/dialogs/dialogic_1_waking_up_translation.en.translation", "res://translation/dialogs/dialogic_1_waking_up_translation.fr.translation", "res://translation/dialogs/dialogic_2_demeter_intro_translation.en.translation", "res://translation/dialogs/dialogic_2_demeter_intro_translation.fr.translation", "res://translation/dialogs/dialogic_3_demeter_ship_presentation_translation.en.translation", "res://translation/dialogs/dialogic_3_demeter_ship_presentation_translation.fr.translation", "res://translation/dialogs/dialogic_4_cave_translation.en.translation", "res://translation/dialogs/dialogic_4_cave_translation.fr.translation", "res://translation/dialogs/dialogic_5_mercury_arrival_translation.en.translation", "res://translation/dialogs/dialogic_5_mercury_arrival_translation.fr.translation", "res://translation/dialogs/dialogic_6_mercury_departure_translation.en.translation", "res://translation/dialogs/dialogic_6_mercury_departure_translation.fr.translation", "res://translation/dialogs/dialogic_7_venus_arrival_translation.en.translation", "res://translation/dialogs/dialogic_7_venus_arrival_translation.fr.translation", "res://translation/dialogs/dialogic_8_venus_departure_translation.en.translation", "res://translation/dialogs/dialogic_8_venus_departure_translation.fr.translation", "res://translation/dialogs/dialogic_9_borea_translation.en.translation", "res://translation/dialogs/dialogic_cave_translation.en.translation", "res://translation/dialogs/dialogic_cave_translation.fr.translation", "res://translation/dialogs/dialogic_character_translations.fr.translation", "res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.en.translation", "res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.fr.translation") locale/test="fr" [rendering] diff --git a/stages/terrain/region/scripts/region.gd b/stages/terrain/region/scripts/region.gd index 4420b96..09a1f30 100644 --- a/stages/terrain/region/scripts/region.gd +++ b/stages/terrain/region/scripts/region.gd @@ -100,6 +100,8 @@ func _ready(): GameInfo.game_data.player_data.inventory.add_item(Pickaxe.new()) GameInfo.game_data.player_data.inventory.add_item(Fork.new()) GameInfo.game_data.player_data.inventory.add_item(ShipPortal.new()) + if not GameInfo.game_data.current_run.story_step is StartStoryStep: + GameInfo.game_data.player_data.inventory.add_item(TractorBeam.new()) plant_grid = PlantGrid.new(self) add_child(plant_grid) diff --git a/stages/terrain/region/scripts/region_parameter.gd b/stages/terrain/region/scripts/region_parameter.gd index 023ecf4..0251abc 100644 --- a/stages/terrain/region/scripts/region_parameter.gd +++ b/stages/terrain/region/scripts/region_parameter.gd @@ -2,8 +2,8 @@ extends Resource class_name RegionParameter const DEFAULT_ROCK_THRESHOLD = 0.3 -const DEFAULT_DECONTAMINATION_THRESHOLD = 0.1 -const DEFAULT_CRISTAL_THRESHOLD = 0.3 +const DEFAULT_DECONTAMINATION_THRESHOLD = 0.3 +const DEFAULT_CRISTAL_THRESHOLD = 0.1 const DEFAULT_CHARGE = 10 const DEFAULT_TALION_CELL_CHANCE : Array[int] = [0,0,0,1,1] const DEFAULT_ENERGY_CELL_CHANCE : Array[int] = [1,2,2,2,3] diff --git a/translation/dialogs/dialogic_6_mercury_departure_translation.csv b/translation/dialogs/dialogic_6_mercury_departure_translation.csv index a43bf82..66305f7 100644 --- a/translation/dialogs/dialogic_6_mercury_departure_translation.csv +++ b/translation/dialogs/dialogic_6_mercury_departure_translation.csv @@ -24,17 +24,6 @@ Choice/112/disabled_text,, Choice/113/text,Oh no ! But I've been away just a moment !,Oh non ! Mais je ne me suis absenté qu'un instant ! Choice/113/disabled_text,, Text/114/text,"Uhm, I actually repaired the ship over two full months; I didn't wake you up just after the save, I thought that you wouldn't want to wait that long!","Euh… En fait, j'ai réparé le vaisseau pendant plus de deux mois ; je ne t'ai pas réveillé tout de suite après la sauvegarde, je me suis dit que tu ne voudrais pas attendre aussi longtemps !" -Text/ce/text,"Luckily, I've found something that might help you. I've cataloged ancient human ruins all over the planet, and some of them contain ""vending machines,"" machines for exchanging items for money.","J'ai heureusement déniché quelque chose qui pourrait t'aider. J'ai répertorié des anciennes ruines humaines un peu partout sur la planète, et dans certaines, on trouve des ""distributeurs"", des machines d'échange d'objet contre de l'argent." -Choice/101/text,Thanks !,Merci ! -Choice/101/disabled_text,, -Choice/cf/text,Vending machines?,Des distributeurs ? -Choice/cf/disabled_text,, -Text/d0/text,"Yes, that's where they used to get the energy they needed, for a completely unreasonable price.","Oui c'est là qu'ils récupéraient de quoi se réalimenter en énergie, pour un prix complètement déraisonnable." -Text/d1/text,"Before, real people were in charge of transactions, but for some reason, humans spent all of recent history figuring out how to encounter as few humans as possible. Maybe they couldn't stand each other anymore...","Avant, de vraies personnes étaient chargées de ces transactions, mais va savoir pourquoi les humains ont passé toute leur histoire récente à trouver comment croiser le moins d'humains possible. Peut-être qu'ils ne pouvaient plus se supporter..." -Choice/d2/text,Money?,De l'argent ? -Choice/d2/disabled_text,, -Text/d3/text,"Yes, each human had a sum of an imaginary unit they called money. They based their entire social hierarchy on this unit.","Oui, chaque humain avait une somme d'une unité imaginaire qu'ils appelaient argent. Ils basaient toute leur échelle sociale en fonction de cette unité." -Text/d4/text,"In any case, I've updated their system. They'll probably need some energy to function, but they might bring you some interesting items.","En-tout-cas, j'ai mis à jour leur système, ils auront sûrement besoin d'un peu d'énergie pour fonctionner, mais ils t'apporteront peut-être des objets intéressants." -Text/d5/text,"As usual, you can use your detector to find the entrance to these ruins.","Comme d'habitude, tu peux utiliser ton détecteur pour trouver la porte d'entrée de ces ruines." -Text/d6/text,"[b]These artifacts will be placed on a shelf in your ship[/b], but remember that if you ran out of energy and I have to teleport the ship, you'll lose them.","[b]Ces artefacts seront placés sur une étagère dans le vaisseau[/b], mais si tu tombes à court d'énergie, je devrais téléporter le vaisseau et tu perdras tous les objets à l'intérieur !" +Text/115/text,"I've updated you in the meantime, and you'll discover a new tool I just added, a tractable beam!","Je t'ai mis à jour pendant ce temps, et tu découvriras en sortant un nouvel outil : un rayon tracteur." +Text/116/text,"If you were in trouble for sorting your seeds, it might help you.","Si tu avais des difficulté pour trier tes graines, cela te sera utile." Text/d7/text,Good luck with the [color=#FFA617]Venus Relay Base[/color]; it's a little further than the last one.,Bon courage pour la [color=#FFA617]Base Vénus[/color] elle est un petit peu plus loin que la dernière. diff --git a/translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv b/translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv new file mode 100644 index 0000000..38e7a1e --- /dev/null +++ b/translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv @@ -0,0 +1,15 @@ +keys,en,fr +Text/117/text,"I've found something that might help you. I've cataloged ancient human ruins all over the planet, and some of them contain ""vending machines,"" machines for exchanging items for money.",,"J'ai déniché quelque chose qui pourrait t'aider. J'ai répertorié des anciennes ruines humaines un peu partout sur la planète, et dans certaines, on trouve des ""distributeurs"", des machines d'échange d'objet contre de l'argent." +Choice/101/text,Thanks !,Merci ! +Choice/101/disabled_text,, +Choice/cf/text,Vending machines?,Des distributeurs ? +Choice/cf/disabled_text,, +Text/d0/text,"Yes, that's where they used to get the energy they needed, for a completely unreasonable price.","Oui c'est là qu'ils récupéraient de quoi se réalimenter en énergie, pour un prix complètement déraisonnable." +Text/d1/text,"Before, real people were in charge of transactions, but for some reason, humans spent all of recent history figuring out how to encounter as few humans as possible. Maybe they couldn't stand each other anymore...","Avant, de vraies personnes étaient chargées de ces transactions, mais va savoir pourquoi les humains ont passé toute leur histoire récente à trouver comment croiser le moins d'humains possible. Peut-être qu'ils ne pouvaient plus se supporter..." +Choice/d2/text,Money?,De l'argent ? +Choice/d2/disabled_text,, +Text/d3/text,"Yes, each human had a sum of an imaginary unit they called money. They based their entire social hierarchy on this unit.","Oui, chaque humain avait une somme d'une unité imaginaire qu'ils appelaient argent. Ils basaient toute leur échelle sociale en fonction de cette unité." +Text/d4/text,"In any case, I've updated their system. They'll probably need some energy to function, but they might bring you some interesting items.","En-tout-cas, j'ai mis à jour leur système, ils auront sûrement besoin d'un peu d'énergie pour fonctionner, mais ils t'apporteront peut-être des objets intéressants." +Text/d5/text,"As usual, you can use your detector to find the entrance to these ruins.","Comme d'habitude, tu peux utiliser ton détecteur pour trouver la porte d'entrée de ces ruines." +Text/d6/text,"[b]These artifacts will be placed on a shelf in your ship[/b], but remember that if you ran out of energy and I have to teleport the ship, you'll lose them.","[b]Ces artefacts seront placés sur une étagère dans le vaisseau[/b], mais si tu tombes à court d'énergie, je devrais téléporter le vaisseau et tu perdras tous les objets à l'intérieur !" +Text/118/text,"It could really help you, so go fetch them.","Ils te seront très utiles, alors tu devrais aller les chercher !" diff --git a/translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv.import b/translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv.import new file mode 100644 index 0000000..365f396 --- /dev/null +++ b/translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv.import @@ -0,0 +1,19 @@ +[remap] + +importer="csv_translation" +type="Translation" +uid="uid://bpstv3r2f6cpg" + +[deps] + +files=["res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.en.translation", "res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.fr.translation"] + +source_file="res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.csv" +dest_files=["res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.en.translation", "res://translation/dialogs/dialogic_6_vending_machine_presentation_translation.fr.translation"] + +[params] + +compress=1 +delimiter=0 +unescape_keys=false +unescape_translations=true diff --git a/translation/game/gui.csv b/translation/game/gui.csv index 2085fe8..3bccd2b 100644 --- a/translation/game/gui.csv +++ b/translation/game/gui.csv @@ -99,6 +99,8 @@ DETECT_USE_TEXT,"Search near signals","Rechercher les signaux proches" SHIP_TELEPORT,Ship Portal,Portail vers le vaisseau SHIP_TELEPORT_DESC_TEXT,"A mysterious technology that get you to the [b]Internode[/b].","Une mystèrieuse technologie qui t'amène sur l'[b]Internode[/b]" SHIP_TELEPORT_USE_TEXT,"Teleport on the ship","Téléportation sur le vaisseau" +TRACTOR_BEAM,Tractor Beam,Rayon Tracteur +TRACTOR_BEAM_DESC_TEXT,"A technology that allows objects to be moved remotely, very useful for sorting seeds","Une technologie qui permet de déplacer les objets à distance, très utile pour trier les graines" 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.