mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:15:45 +00:00
Delay npc initialization
This commit is contained in:
parent
d1d3a3fdd5
commit
db50df369f
13 changed files with 125 additions and 31 deletions
6
Dialogue/Timelines/computer_keycard_room.dtl
Normal file
6
Dialogue/Timelines/computer_keycard_room.dtl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
computer: From the Department Manager\:\
|
||||
Please avoid leaving the key cards unattended, it's been happening way too often.
|
||||
computer: This behavior can lead to enormous security issues, it's not helping that these new "nonhuman" guards that have been assigned to the site are as dumb as bricks.
|
||||
computer: Do not rely on them for actual good security practices, always ask your superior.
|
||||
computer: If I see this keep up I will be forced to start docking pays, you have been warned.\
|
||||
- S.
|
||||
1
Dialogue/Timelines/computer_keycard_room.dtl.uid
Normal file
1
Dialogue/Timelines/computer_keycard_room.dtl.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dymkjn5i3o7b6
|
||||
BIN
ExternalMaterial/IceGun/IceGun.pxc
Normal file
BIN
ExternalMaterial/IceGun/IceGun.pxc
Normal file
Binary file not shown.
BIN
ExternalMaterial/IceGun/IceGun.pxc1
Normal file
BIN
ExternalMaterial/IceGun/IceGun.pxc1
Normal file
Binary file not shown.
Binary file not shown.
BIN
Models/carr/CarrRotation.pxc1
Normal file
BIN
Models/carr/CarrRotation.pxc1
Normal file
Binary file not shown.
BIN
Models/carr/carr_rotating.png
(Stored with Git LFS)
BIN
Models/carr/carr_rotating.png
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=105 format=4 uid="uid://dqyfnby0t7gu1"]
|
||||
[gd_scene load_steps=106 format=4 uid="uid://dqyfnby0t7gu1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_c3v4x"]
|
||||
[ext_resource type="Resource" uid="uid://cs3ihltcn2166" path="res://Resources/Items/IcicleGun.tres" id="3_6314l"]
|
||||
|
|
@ -64,6 +64,7 @@
|
|||
[ext_resource type="Script" uid="uid://d0a0o50j82eo6" path="res://Scripts/Activables/ScriptableBase.cs" id="50_cr4hs"]
|
||||
[ext_resource type="PackedScene" uid="uid://dky13otbks8cm" path="res://Scenes/Actors/Thermatron_FSM.tscn" id="50_w8nwr"]
|
||||
[ext_resource type="PackedScene" uid="uid://bb32f4p5e671j" path="res://Scenes/Actors/Fairy_Guard_FSM.tscn" id="51_awjkl"]
|
||||
[ext_resource type="Script" uid="uid://b5fesrd4lv8t1" path="res://Scripts/Resources/Events/EventResource.cs" id="52_5glx6"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1h48wgasakk4" path="res://Scenes/Interactable/alarm_box.tscn" id="52_5nxem"]
|
||||
[ext_resource type="Script" uid="uid://bwox5lmgiijcs" path="res://Scripts/Resources/Events/ActivateEvent.cs" id="52_q2wmj"]
|
||||
[ext_resource type="Texture2D" uid="uid://cnayqn8jgb8jj" path="res://Models/carr/carr_rotating.png" id="56_5glx6"]
|
||||
|
|
@ -160,7 +161,7 @@ TimeModifiers = Array[ExtResource("43_8n581")]([])
|
|||
WaitForCompletion = true
|
||||
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_bjd5y"]
|
||||
[sub_resource type="Resource" id="Resource_8qe0x"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("39_83jc5")
|
||||
Patterns = Array[Object]([SubResource("Resource_kuo18")])
|
||||
|
|
@ -382,7 +383,7 @@ scale = Vector2(0.66, 2.04)
|
|||
|
||||
[node name="FairyFsm" parent="Tilemaps/AcidHitboxes" node_paths=PackedStringArray("DefeatScript") instance=ExtResource("12_64bae")]
|
||||
position = Vector2(776, -56)
|
||||
ExtraLoot = [SubResource("Resource_w8nwr"), SubResource("Resource_awjkl")]
|
||||
ExtraLoot = Array[ExtResource("13_b3y78")]([SubResource("Resource_w8nwr"), SubResource("Resource_awjkl")])
|
||||
DefeatScript = NodePath("../../Actors/HorizontalForceField2")
|
||||
ActivationType = 2
|
||||
|
||||
|
|
@ -553,7 +554,7 @@ InvertSignal = true
|
|||
|
||||
[node name="FloorEmitter2" parent="Tilemaps/Actors" instance=ExtResource("44_b8ffn")]
|
||||
position = Vector2(601, 147)
|
||||
Script = SubResource("Resource_bjd5y")
|
||||
Script = SubResource("Resource_8qe0x")
|
||||
InvertSignal = true
|
||||
|
||||
[node name="Camera" parent="Tilemaps/Actors" instance=ExtResource("48_r562v")]
|
||||
|
|
@ -565,7 +566,7 @@ Targets = [NodePath("Script")]
|
|||
|
||||
[node name="Script" type="Node2D" parent="Tilemaps/Actors/ControlPad4"]
|
||||
script = ExtResource("50_cr4hs")
|
||||
Events = [SubResource("Resource_8n581"), SubResource("Resource_iv5wi")]
|
||||
Events = Array[ExtResource("52_5glx6")]([SubResource("Resource_8n581"), SubResource("Resource_iv5wi")])
|
||||
|
||||
[node name="FairyGuardFsm" parent="Tilemaps/Actors" instance=ExtResource("50_w8nwr")]
|
||||
position = Vector2(712, -136)
|
||||
|
|
@ -624,7 +625,7 @@ transform = Transform3D(0.826924, -0.385938, 0.408961, 0, 0.727282, 0.686339, -0
|
|||
|
||||
[node name="ScriptableAreaTrigger" parent="Tilemaps" instance=ExtResource("28_fuxq3")]
|
||||
position = Vector2(230, 250)
|
||||
Events = [SubResource("Resource_pgobb")]
|
||||
Events = Array[ExtResource("52_5glx6")]([SubResource("Resource_pgobb")])
|
||||
|
||||
[node name="AlarmBox" parent="Tilemaps" instance=ExtResource("52_5nxem")]
|
||||
position = Vector2(616, 88)
|
||||
|
|
|
|||
59
Scenes/Props/Barrel_Double.tscn
Normal file
59
Scenes/Props/Barrel_Double.tscn
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://h6luqwo0u05q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cpx2fxtumgmud" path="res://Scenes/Barrel.cs" id="1_ype3r"]
|
||||
[ext_resource type="PackedScene" uid="uid://clyyl3jgpfoo7" path="res://Scenes/Props/Broken_Barrel.tscn" id="2_ercxe"]
|
||||
[ext_resource type="PackedScene" uid="uid://jmijre3eaf8m" path="res://Scenes/Explosion.tscn" id="3_pj6sw"]
|
||||
[ext_resource type="Resource" uid="uid://ncukdupc7hbm" path="res://Resources/Bullets/Explosion.tres" id="4_0h78u"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2f16ke8c7vwx" path="res://Sprites/Barrel.png" id="5_2yrre"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2ewfl"]
|
||||
size = Vector2(11, 14)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v7gy8"]
|
||||
atlas = ExtResource("5_2yrre")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ss2y0"]
|
||||
size = Vector2(11, 14)
|
||||
|
||||
[node name="Barrel" type="Area2D" groups=["Destroyable"]]
|
||||
collision_layer = 64
|
||||
collision_mask = 138
|
||||
script = ExtResource("1_ype3r")
|
||||
Health = 2.0
|
||||
ExplosionRadius = 4.0
|
||||
ExplosionDamage = 3.0
|
||||
DebrisScene = ExtResource("2_ercxe")
|
||||
ExplosionParticles = ExtResource("3_pj6sw")
|
||||
ExplosionData = ExtResource("4_0h78u")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(0.5, -1)
|
||||
shape = SubResource("RectangleShape2D_2ewfl")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
position = Vector2(1.88, -2.055)
|
||||
texture = SubResource("AtlasTexture_v7gy8")
|
||||
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
||||
position = Vector2(-3.92, 2.11)
|
||||
texture = SubResource("AtlasTexture_v7gy8")
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D" parent="."]
|
||||
collision_layer = 64
|
||||
collision_mask = 10
|
||||
gravity_scale = 0.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
|
||||
visible = false
|
||||
position = Vector2(0.5, -1)
|
||||
shape = SubResource("RectangleShape2D_ss2y0")
|
||||
|
||||
[node name="ReferenceRect" type="ReferenceRect" parent="."]
|
||||
visible = false
|
||||
offset_left = -8.0
|
||||
offset_top = -8.0
|
||||
offset_right = 8.0
|
||||
offset_bottom = 8.0
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -19,9 +19,16 @@ public partial class PlayerDetectionModule : Area2D
|
|||
|
||||
//public bool PlayerInActiveArea { get; private set; }
|
||||
private CollisionShape2D _collisionShape2D;
|
||||
|
||||
private bool _initialized = false;
|
||||
public override void _Ready()
|
||||
{
|
||||
CallDeferred(MethodName.Initialize);
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
public void SetRange(float range)
|
||||
|
|
@ -35,6 +42,7 @@ public partial class PlayerDetectionModule : Area2D
|
|||
|
||||
public bool IsPlayerInRange(float range)
|
||||
{
|
||||
if (!_initialized) return false;
|
||||
if (GameManager.Instance is null) return false;
|
||||
|
||||
if (!GameManager.Instance.PlayerPosition.HasValue)
|
||||
|
|
@ -47,6 +55,7 @@ public partial class PlayerDetectionModule : Area2D
|
|||
|
||||
public bool IsPlayerInSight()
|
||||
{
|
||||
if (!_initialized) return false;
|
||||
if (GameManager.Instance is null) return false;
|
||||
//if (_cachedPlayer == null) return false;
|
||||
if (!GameManager.Instance.PlayerPosition.HasValue) return false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="TileSet" load_steps=60 format=3 uid="uid://6k28roiljylj"]
|
||||
[gd_resource type="TileSet" load_steps=61 format=3 uid="uid://6k28roiljylj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bty7p61v46chx" path="res://Resources/Textures/Tilemap_Canvas.tres" id="1_u4jco"]
|
||||
[ext_resource type="PackedScene" uid="uid://bj28qiai2x2ar" path="res://Scenes/Props/Barrel.tscn" id="2_cxg4b"]
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://bnhck5eh0tqxf" path="res://Scenes/Props/MediumTerminal.tscn" id="9_wc4jy"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqrkisw6jg24w" path="res://Scenes/Props/MainFrame1.tscn" id="10_7u0cp"]
|
||||
[ext_resource type="PackedScene" uid="uid://e80xujqyjoh" path="res://Scenes/Props/Box_Vertical.tscn" id="10_hg2bp"]
|
||||
[ext_resource type="PackedScene" uid="uid://h6luqwo0u05q" path="res://Scenes/Props/Barrel_Double.tscn" id="11_wdun3"]
|
||||
[ext_resource type="Texture2D" uid="uid://df8t3kan5qgjb" path="res://Tilesets/Space.png" id="12_fb37q"]
|
||||
[ext_resource type="Texture2D" uid="uid://v310x6wx801b" path="res://Tilesets/Beams2.png" id="19_hupu0"]
|
||||
[ext_resource type="Texture2D" uid="uid://c741ej5hhmpv4" path="res://Tilesets/Conveyors.png" id="21_u4jco"]
|
||||
|
|
@ -1224,6 +1225,7 @@ scenes/14/scene = ExtResource("7_k5ppi")
|
|||
scenes/15/scene = ExtResource("8_ubrnc")
|
||||
scenes/16/scene = ExtResource("9_ipvrl")
|
||||
scenes/17/scene = ExtResource("10_7u0cp")
|
||||
scenes/18/scene = ExtResource("11_wdun3")
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_wgdjv"]
|
||||
texture = ExtResource("12_fb37q")
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ directories/dtl_directory={
|
|||
"computer2": "res://Dialogue/Timelines/computer2.dtl",
|
||||
"computer_control_1": "res://Dialogue/Timelines/computer_control_1.dtl",
|
||||
"computer_goon_cave": "res://Dialogue/Timelines/computer_goon_cave.dtl",
|
||||
"computer_keycard_room": "res://Dialogue/Timelines/computer_keycard_room.dtl",
|
||||
"intro_story": "res://Dialogue/Timelines/intro_story.dtl",
|
||||
"rumia_defeat": "res://Dialogue/Timelines/rumia_defeat.dtl",
|
||||
"rumia_rebel_base_1": "res://Dialogue/Timelines/rumia_rebel_base_1.dtl",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue