ajout de la porte et équilibrage des mutations
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b8m537op75gib" path="res://entities/interactables/door/door.tscn" id="8_2f6js"]
|
||||
[ext_resource type="PackedScene" uid="uid://dj7gp3crtg2yt" path="res://entities/camera/camera.tscn" id="8_fwgig"]
|
||||
[ext_resource type="Texture2D" uid="uid://rdrhi3r11ey6" path="res://common/icons/square-rounded.svg" id="10_ktnx3"]
|
||||
[ext_resource type="Texture2D" uid="uid://b752eqq4cm7ve" path="res://common/icons/building-factory-2.svg" id="11_fwgig"]
|
||||
[ext_resource type="Texture2D" uid="uid://dg00xnpp6ixls" path="res://common/icons/server-2.svg" id="12_mlppq"]
|
||||
[ext_resource type="Texture2D" uid="uid://1ynlp05wj0hm" path="res://common/icons/rocket.svg" id="13_r4e5h"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qdnee"]
|
||||
shader = ExtResource("2_ktnx3")
|
||||
@@ -135,8 +138,7 @@ position = Vector2(-405, -151)
|
||||
[node name="AstraDoor" parent="Entities" unique_id=2053096538 instance=ExtResource("8_2f6js")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
modulate = Color(1, 0, 0, 1)
|
||||
available = false
|
||||
icon = ExtResource("11_fwgig")
|
||||
default_info_title = "ASTRA_FACTORY"
|
||||
default_info_desc = "ASTRA_FACTORY_TEXT"
|
||||
|
||||
@@ -145,18 +147,19 @@ unique_name_in_owner = true
|
||||
visible = false
|
||||
position = Vector2(91, -177)
|
||||
to_scene_id = "BOREA"
|
||||
icon = ExtResource("12_mlppq")
|
||||
default_interact_text = "ENTER"
|
||||
available = true
|
||||
default_info_title = "BOREA_BASE"
|
||||
default_info_desc = "BOREA_BASE_DESC_TEXT"
|
||||
|
||||
[node name="ShipGarageDoor" parent="Entities" unique_id=1073871193 instance=ExtResource("8_2f6js")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
modulate = Color(1, 0, 0, 1)
|
||||
position = Vector2(91, -177)
|
||||
to_scene_id = "GARAGE"
|
||||
icon = ExtResource("13_r4e5h")
|
||||
default_interact_text = "ENTER"
|
||||
available = false
|
||||
default_info_title = "MYSTERIOUS_DOOR"
|
||||
default_info_desc = "MYSTERIOUS_DOOR_TEXT"
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ func _ready():
|
||||
if e is Plant:
|
||||
data.add_plant_data(e.data, false)
|
||||
|
||||
%AstraDoor.global_position = data.player_spawn
|
||||
%AstraDoor.global_position = data.player_spawn + Vector2.UP * 100
|
||||
player.global_position = data.player_position
|
||||
|
||||
setup_flagged_properties()
|
||||
@@ -153,14 +153,14 @@ func save():
|
||||
data.player_position = player.global_position
|
||||
GameInfo.save_game_data()
|
||||
|
||||
func spawn_object_random_move(object : Node2D):
|
||||
func spawn_object_random_move(object : Node2D, offset : Vector2 = Vector2.ZERO):
|
||||
var rng := RandomNumberGenerator.new()
|
||||
rng.seed = data.region_seed + object.name.hash()
|
||||
|
||||
object.position = Vector2(
|
||||
rng.randf_range(-SPAWN_OBJECT_RANDOM_MOVEMENT,+SPAWN_OBJECT_RANDOM_MOVEMENT),
|
||||
rng.randf_range(-SPAWN_OBJECT_RANDOM_MOVEMENT,SPAWN_OBJECT_RANDOM_MOVEMENT)
|
||||
)
|
||||
) + offset
|
||||
|
||||
func setup_flagged_properties():
|
||||
|
||||
@@ -177,6 +177,7 @@ func setup_flagged_properties():
|
||||
%ShipGarageDoor.available = data.state == RegionData.State.SUCCEEDED
|
||||
%Tutorial.succeded.connect(
|
||||
func ():
|
||||
await get_tree().create_timer(1.).timeout
|
||||
%ShipGarageDoor.available = true
|
||||
)
|
||||
"borea":
|
||||
@@ -230,7 +231,6 @@ func get_chunk_for_coord(tile_coord : Vector2i) -> Chunk:
|
||||
if chunk.is_generated:
|
||||
var local_coord = TilesDiffData.get_local_coord(tile_coord, chunk.chunk_coord)
|
||||
if chunk.is_tile_in_chunk(local_coord):
|
||||
print(chunk.chunk_coord)
|
||||
return chunk
|
||||
return null
|
||||
|
||||
@@ -266,4 +266,15 @@ func loot_talion(coord : Vector2i):
|
||||
10
|
||||
)
|
||||
|
||||
func decontaminate(tiles_coords : Array[Vector2i], save_tiles_diff := true):
|
||||
if save_tiles_diff :
|
||||
data.decontamination_tiles_data.update_tiles_diff(tiles_coords, TilesDiffData.TileDiff.PRESENT)
|
||||
|
||||
for coord in tiles_coords:
|
||||
var chunk : Chunk = get_chunk_for_coord(coord)
|
||||
if chunk:
|
||||
var local_coord := TilesDiffData.get_local_coord(coord, chunk.chunk_coord)
|
||||
|
||||
chunk.decontamination_layer.place_decontamination(local_coord)
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user