Dev 0.2.0
* Equilibrage de la difficulté (suite) * Correction du timing des dialogues de Demeter * Dev de la base astra (avec les logs) * Fix de bug de duplication d'objets * Fix de la mutation ancien * Ajout d'une mention de la propagation des mutations dans le tuto
This commit is contained in:
@@ -14,8 +14,8 @@ func set_to_scene(v : Scene = to_scene):
|
||||
%Icon.texture = to_scene.get_scene_icon()
|
||||
%Icon2.texture = to_scene.get_scene_icon()
|
||||
|
||||
func click():
|
||||
func click(_player3d :Player3D):
|
||||
if interactable:
|
||||
clicked.emit()
|
||||
if to_scene:
|
||||
SceneManager.change_to_scene(to_scene)
|
||||
SceneManager.change_to_scene(to_scene)
|
||||
|
||||
@@ -9,7 +9,7 @@ signal broken
|
||||
func _ready():
|
||||
update_model()
|
||||
|
||||
func click():
|
||||
func click(_player3d :Player3D):
|
||||
if interactable:
|
||||
clicked.emit()
|
||||
%BreackAudioPlayer.playing = true
|
||||
|
||||
@@ -13,7 +13,7 @@ signal clicked
|
||||
func _ready():
|
||||
set_interactable()
|
||||
|
||||
func click():
|
||||
func click(_player3d : Player3D):
|
||||
if interactable:
|
||||
clicked.emit()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ extends Interactable3D
|
||||
class_name Phone
|
||||
|
||||
|
||||
func click():
|
||||
func click(_player3d :Player3D):
|
||||
if interactable:
|
||||
clicked.emit()
|
||||
interactable = false
|
||||
|
||||
Binary file not shown.
@@ -39,7 +39,15 @@ import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
_subresources={
|
||||
"materials": {
|
||||
"Material": {
|
||||
"use_external/enabled": true,
|
||||
"use_external/fallback_path": "res://common/assets/materials/default_3d.tres",
|
||||
"use_external/path": "uid://dvvi1k5c5iowc"
|
||||
}
|
||||
}
|
||||
}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,90 @@
|
||||
[gd_scene format=3 uid="uid://d2mqot6b0wrji"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://butkx8cygbesm" path="res://entities/interactable_3d/radio/assets/3d/radio.blend" id="1_4uibp"]
|
||||
[ext_resource type="Script" uid="uid://cg53cu64nnq2u" path="res://entities/interactable_3d/radio/scripts/radio_3d.gd" id="1_a4m61"]
|
||||
[ext_resource type="PackedScene" uid="uid://bf5viaiuq62f0" path="res://gui/game/log_screen/log_screen.tscn" id="3_6gjd1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bxorbhnr4o2rj" path="res://addons/dialogic/Modules/Signal/icon.png" id="3_h0e4o"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_oh5lq"]
|
||||
offsets = PackedFloat32Array(1)
|
||||
colors = PackedColorArray(0.06318334, 0.059500005, 0.17, 1)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_g4v7s"]
|
||||
gradient = SubResource("Gradient_oh5lq")
|
||||
width = 25
|
||||
height = 24
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_4uibp"]
|
||||
interpolation_mode = 1
|
||||
offsets = PackedFloat32Array(0.508547, 0.5470086, 0.5811966, 0.6367521, 0.6752137)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_4uibp"]
|
||||
gradient = SubResource("Gradient_4uibp")
|
||||
width = 500
|
||||
height = 500
|
||||
fill = 1
|
||||
fill_from = Vector2(0.5, 0.5)
|
||||
fill_to = Vector2(1, 0.5)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_yf5fn"]
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = SubResource("GradientTexture2D_4uibp")
|
||||
billboard_mode = 1
|
||||
billboard_keep_scale = true
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_g4v7s"]
|
||||
material = SubResource("StandardMaterial3D_yf5fn")
|
||||
orientation = 2
|
||||
|
||||
[sub_resource type="Curve" id="Curve_4uibp"]
|
||||
_data = [Vector2(0, 0), 0.0, 3.382857, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_xb8ew"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_g4v7s"]
|
||||
size = Vector3(0.7519531, 0.5413208, 0.4404297)
|
||||
|
||||
[node name="Radio3d" type="Area3D" unique_id=478512957]
|
||||
script = ExtResource("1_a4m61")
|
||||
log_title = "Title is the real title"
|
||||
|
||||
[node name="radio" parent="." unique_id=828194383 instance=ExtResource("1_4uibp")]
|
||||
|
||||
[node name="OffScreen" type="Sprite3D" parent="radio" unique_id=1730668971]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.12157962, -0.0024592131, -0.16259766)
|
||||
visible = false
|
||||
texture = SubResource("GradientTexture2D_g4v7s")
|
||||
|
||||
[node name="Icon" type="Sprite3D" parent="radio" unique_id=664077032]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.1324744, 0.015149429, -0.15777588)
|
||||
pixel_size = 0.003
|
||||
texture = ExtResource("3_h0e4o")
|
||||
|
||||
[node name="CPUParticles3D" type="CPUParticles3D" parent="." unique_id=464922262]
|
||||
unique_name_in_owner = true
|
||||
amount = 2
|
||||
preprocess = 1.0
|
||||
explosiveness = 0.6
|
||||
mesh = SubResource("PlaneMesh_g4v7s")
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_amount_curve = SubResource("Curve_4uibp")
|
||||
color = Color(1, 0, 0.4333334, 0.78431374)
|
||||
color_ramp = SubResource("Gradient_xb8ew")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1594995973]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.01159668, 0.09970093, -0.0076293945)
|
||||
shape = SubResource("BoxShape3D_g4v7s")
|
||||
|
||||
[node name="LogScreen" parent="." unique_id=1955577551 instance=ExtResource("3_6gjd1")]
|
||||
unique_name_in_owner = true
|
||||
log_title = "Title is the real title"
|
||||
log_text = "Text"
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="." unique_id=703219960]
|
||||
@@ -0,0 +1,54 @@
|
||||
@tool
|
||||
extends Interactable3D
|
||||
class_name Radio3d
|
||||
|
||||
@export var log_title : String = "Title" : set = set_title
|
||||
@export var log_text : String = "Text" : set = set_text
|
||||
|
||||
@export var read := false : set = set_read
|
||||
|
||||
func _ready():
|
||||
set_interactable()
|
||||
set_title()
|
||||
set_text()
|
||||
set_read()
|
||||
|
||||
func set_title(v := log_title):
|
||||
log_title = v
|
||||
if is_node_ready():
|
||||
%LogScreen.log_title = log_title
|
||||
|
||||
func set_text(v := log_text):
|
||||
log_text = v
|
||||
if is_node_ready():
|
||||
%LogScreen.log_text = log_text
|
||||
|
||||
func set_read(v := read):
|
||||
read = v
|
||||
|
||||
if is_node_ready():
|
||||
%CPUParticles3D.emitting = not read
|
||||
%OffScreen.visible = read
|
||||
%Icon.visible = not read
|
||||
|
||||
func click(player3d :Player3D):
|
||||
if interactable:
|
||||
clicked.emit()
|
||||
%LogScreen.appear()
|
||||
AudioManager.play_sfx("MessageEnter")
|
||||
|
||||
%LogScreen.appear()
|
||||
read = true
|
||||
interactable = false
|
||||
player3d.controlling_player = false
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
%LogScreen.disappeared.connect(
|
||||
func():
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
player3d.controlling_player = true
|
||||
get_tree().create_timer(0.5).timeout.connect( # Put a delay to not interfere with the ok button click
|
||||
func():
|
||||
interactable = true
|
||||
)
|
||||
AudioManager.play_sfx("MessageExit")
|
||||
)
|
||||
@@ -0,0 +1 @@
|
||||
uid://cg53cu64nnq2u
|
||||
@@ -15,6 +15,8 @@ const SPRITE_SCENE: PackedScene = preload("res://entities/interactables/item_obj
|
||||
|
||||
@onready var object_sprite: ItemObjectSprite = generate_sprite()
|
||||
|
||||
var is_taken := false
|
||||
|
||||
func _init(_item = null):
|
||||
if _item:
|
||||
item = _item
|
||||
@@ -49,11 +51,17 @@ func card_info() -> CardInfo:
|
||||
return item.card_info()
|
||||
|
||||
func interact(player : Player) -> bool:
|
||||
if player.can_pick_item(item):
|
||||
await pickup_animation(player.global_position)
|
||||
queue_free()
|
||||
if (
|
||||
player.can_pick_item(item)
|
||||
and not is_taken
|
||||
and player.elapsed_time > player.last_seed_taken + Player.TAKE_ITEM_INTERVAL
|
||||
):
|
||||
player.last_seed_taken = player.elapsed_time
|
||||
is_taken = true
|
||||
player.pick_item(item)
|
||||
await pickup_animation(player.global_position)
|
||||
item.has_been_inspected = true
|
||||
queue_free()
|
||||
return true
|
||||
|
||||
return false
|
||||
|
||||
@@ -4,16 +4,16 @@ class_name Radio
|
||||
@onready var log_screen : LogScreen = %LogScreen
|
||||
|
||||
var radio_log : StoryStep.Log = null : set = set_radio_log
|
||||
var unread := true : set = set_unread
|
||||
var unread := false : set = set_unread
|
||||
|
||||
func _ready():
|
||||
var story_step := GameInfo.game_data.progression_data.get_story_step()
|
||||
|
||||
if len(story_step.get_logs()):
|
||||
radio_log = story_step.get_logs().pick_random()
|
||||
|
||||
if radio_log:
|
||||
unread = not radio_log.key in GameInfo.game_data.logs_read
|
||||
|
||||
if unread :
|
||||
available = true
|
||||
else:
|
||||
hide()
|
||||
|
||||
@@ -3,19 +3,20 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://n7hhyqhhtx0q"
|
||||
path="res://.godot/imported/compost.png-e03e492b1de4adb6f23b4a9bd2caffe2.ctex"
|
||||
path.s3tc="res://.godot/imported/compost.png-e03e492b1de4adb6f23b4a9bd2caffe2.s3tc.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://entities/interactables/truck/compost/assets/sprites/compost.png"
|
||||
dest_files=["res://.godot/imported/compost.png-e03e492b1de4adb6f23b4a9bd2caffe2.ctex"]
|
||||
dest_files=["res://.godot/imported/compost.png-e03e492b1de4adb6f23b4a9bd2caffe2.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
@@ -23,7 +24,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
@@ -37,4 +38,4 @@ 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
|
||||
detect_3d/compress_to=0
|
||||
|
||||
@@ -27,7 +27,7 @@ func get_day_factor():
|
||||
return max(1, DEFAULT_DAY_FACTOR - level)
|
||||
|
||||
func get_score_increase():
|
||||
return max(1, level - DEFAULT_DAY_FACTOR + 1)
|
||||
return max(1, level - DEFAULT_DAY_FACTOR + 2)
|
||||
|
||||
func mutate_score(data : PlantData, score) -> int:
|
||||
if data.get_state() != PlantData.State.MATURE:
|
||||
|
||||
@@ -56,7 +56,6 @@ func generate_plants():
|
||||
child.free()
|
||||
|
||||
for i in n_to_generate:
|
||||
print("Generate plant :")
|
||||
var plant_pos_x = (i % n_per_row) * space_between_plants
|
||||
@warning_ignore("integer_division")
|
||||
var plant_pos_y = (i / n_per_row) * space_between_plants
|
||||
@@ -80,7 +79,6 @@ func generate_plants():
|
||||
picked_mutation.level = randi_range(min_level, max_level)
|
||||
plant_data.mutations.append(picked_mutation)
|
||||
var plant: Plant = Plant.new(plant_data)
|
||||
print(plant.data.plant_name)
|
||||
%Plants.add_child(plant)
|
||||
plant.global_position = plant_position
|
||||
|
||||
@@ -89,7 +87,6 @@ func generate_seeds():
|
||||
child.free()
|
||||
|
||||
for i in n_to_generate:
|
||||
print("Generate seed :")
|
||||
var seed_pos_x = (i % n_per_row) * space_between_plants
|
||||
@warning_ignore("integer_division")
|
||||
var seed_pos_y = (i / n_per_row) * space_between_plants
|
||||
|
||||
@@ -15,7 +15,7 @@ class_name PlantPartBuilder
|
||||
|
||||
func load_resource():
|
||||
var destination := "res://entities/plants/resources/plant_parts/" + part_name + ".tres"
|
||||
print("Loading: ", part_name, " n°: ", part_index, " at: ", destination)
|
||||
# print("Loading: ", part_name, " n°: ", part_index, " at: ", destination)
|
||||
var part_group: PartGroup = ResourceLoader.load(destination) as PartGroup
|
||||
if part_group.parts.size() <= part_index:
|
||||
printerr("No part at ", part_index)
|
||||
@@ -47,7 +47,7 @@ func load_resource():
|
||||
|
||||
func save_as_resource():
|
||||
var destination := "res://entities/plants/resources/plant_parts/" + part_name + ".tres"
|
||||
print("Saving: ", part_name, " n°: ", part_index, " at: ", destination)
|
||||
# print("Saving: ", part_name, " n°: ", part_index, " at: ", destination)
|
||||
var part_group: PartGroup = ResourceLoader.load(destination) as PartGroup
|
||||
if not part_group:
|
||||
part_group = PartGroup.new()
|
||||
|
||||
@@ -137,7 +137,7 @@ func build_plant_texture(plant_data: PlantData) -> Texture:
|
||||
texture = PLACEHOLDER_GROWING_TEXTURE
|
||||
base_part = pick_random(baby_bases)
|
||||
_:
|
||||
print("{state} not handled".format({"state": PlantData.State.keys()[plant_data.get_state()]}))
|
||||
# print("{state} not handled".format({"state": PlantData.State.keys()[plant_data.get_state()]}))
|
||||
return null
|
||||
|
||||
var weight_per_origin_type: Array[int] = origin_weights_base.values().duplicate()
|
||||
|
||||
@@ -7,6 +7,7 @@ const HOLDING_ITEM_SPRITE_SIZE = 20.
|
||||
const TURN_ANIMATION_MINIMUM_THRESHOLD = 0.2
|
||||
const SPEED = 350
|
||||
const JUST_DROPPED_ITEM_UPDATE_INTERVAL = 1.
|
||||
const TAKE_ITEM_INTERVAL = .3
|
||||
|
||||
const LOW_SIGNAL_ALERT_DISTANCE = 500
|
||||
const BACKROOM_DISTANCE = 4000
|
||||
@@ -46,6 +47,7 @@ var show_low_signal : bool = false :
|
||||
var just_dropped_item_objects : Array = []
|
||||
var last_just_dropped_item_objects_updated := 0.
|
||||
var last_instruction_done := 0.
|
||||
var last_seed_taken := 0.
|
||||
|
||||
var elapsed_time := 0.
|
||||
var backrooms_loaded := false
|
||||
@@ -165,7 +167,9 @@ func update_just_dropped_item_objects():
|
||||
func take_surrounding_seeds():
|
||||
var overlapping_areas = (%InteractArea2D as Area2D).get_overlapping_areas()
|
||||
|
||||
if not data.inventory.is_full():
|
||||
if (
|
||||
not data.inventory.is_full()
|
||||
):
|
||||
for area in overlapping_areas:
|
||||
if (
|
||||
area is ItemObject
|
||||
|
||||
@@ -52,7 +52,7 @@ func _input(event):
|
||||
var tween = create_tween()
|
||||
tween.tween_property(%InteractTutorial, "modulate:a", 0., 0.8)
|
||||
GameInfo.game_data.tutorials_done.append("3d_action")
|
||||
action_hovered.click()
|
||||
action_hovered.click(self)
|
||||
|
||||
|
||||
func _physics_process(delta):
|
||||
|
||||
Reference in New Issue
Block a user