Made bed interaction count up the days and verified that you can now play a full loop

pull/34/head
kziolkowski 1 month ago
parent 8407ce4c1f
commit 229dd04bc1

@ -1296,6 +1296,7 @@ polygon = PackedVector2Array(247.227, 43.5123, 44.7822, 43.5123, -87.2178, 45.12
[node name="EnterHouseInteraction" parent="YSorted/Farm visuals/Static" instance=ExtResource("27_klb81")]
position = Vector2(5834, 2354)
scale = Vector2(2.425, 2.425)
_id = 0
metadata/SaveID = "5a93071f-c1ab-4b4b-b74e-a6324d44ddf8"
[node name="DoorSprite" type="Sprite2D" parent="YSorted/Farm visuals/Static/EnterHouseInteraction"]

@ -218,7 +218,7 @@ radius = 400.0
z_index = 1
y_sort_enabled = true
script = ExtResource("1_3vr4f")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_vesnas_room.tscn", "res://scenes/Babushka_scene_farm_outside_2d_ducksCollected.tscn")
_sceneNamesToLoad = PackedStringArray("res://scenes/Babushka_scene_indoor_vesnas_room.tscn", "res://scenes/Babushka_scene_farm_outside_2d.tscn")
[node name="Foreground" type="Node" parent="."]

@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=3 uid="uid://ceaa2qj2bmw43"]
[gd_scene load_steps=16 format=3 uid="uid://ceaa2qj2bmw43"]
[ext_resource type="Script" uid="uid://cssdu8viimwm6" path="res://scripts/CSharp/Common/SceneTransition.cs" id="1_c6eln"]
[ext_resource type="Texture2D" uid="uid://cugtxcfuds31r" path="res://art/indoor/Babushka_bg_01.png" id="2_j25a2"]
@ -6,6 +6,7 @@
[ext_resource type="PackedScene" uid="uid://cqc72e4hq6bcd" path="res://prefabs/interactions/interaction_area_2d.tscn" id="8_phqdf"]
[ext_resource type="Resource" uid="uid://csj15gnlx1jmx" path="res://resources/quests/demo/8_goto_bed.tres" id="9_heyef"]
[ext_resource type="Script" uid="uid://puw74w6lmcvl" path="res://scripts/CSharp/Common/Fight/NightStarter.cs" id="10_j25a2"]
[ext_resource type="Script" uid="uid://jg4jryfus3bw" path="res://scripts/CSharp/Common/DayAndNight/DayAndNightHelper.cs" id="11_heyef"]
[ext_resource type="Texture2D" uid="uid://cop1vjvhwlsec" path="res://art/indoor/room export/Room_01_shelf.png" id="13_11fdt"]
[ext_resource type="PackedScene" uid="uid://c25udixd5m6l0" path="res://prefabs/characters/Vesna.tscn" id="18_3gevq"]
[ext_resource type="Script" uid="uid://bqomwxclsbhd3" path="res://scripts/CSharp/Common/Camera/CameraController.cs" id="23_408bg"]
@ -125,8 +126,12 @@ shape = SubResource("CircleShape2D_2spkc")
script = ExtResource("10_j25a2")
_sceneIndexToLoad = 1
[node name="CountDayUp" type="Node" parent="NightStarter"]
script = ExtResource("11_heyef")
[connection signal="Interacted" from="BedInteraction" to="BedInteraction/QuestCompleter" method="Trigger"]
[connection signal="Interacted" from="BedInteraction" to="NightStarter" method="StartNight"]
[connection signal="Interacted" from="BedInteraction" to="NightStarter/CountDayUp" method="IncreaseDayCount"]
[connection signal="Interacted" from="DoorInteraction" to="." method="LoadScene"]
[connection signal="LoadScene" from="NightStarter" to="." method="LoadSceneAtIndex"]

@ -31,10 +31,14 @@ public partial class CalendarController : Node
{
if (@event.IsActionPressed("NextDayCheat"))
{
int days = _dayCounter.Payload.AsInt32();
days++;
_dayCounter.Payload = days;
GoToNextDay();
}
}
public void GoToNextDay()
{
int days = _dayCounter.Payload.AsInt32();
days++;
_dayCounter.Payload = days;
}
}

@ -0,0 +1,11 @@
using Godot;
namespace Babushka.scripts.CSharp.Common.DayAndNight;
public partial class DayAndNightHelper : Node
{
public void IncreaseDayCount()
{
CalendarController.Instance?.GoToNextDay();
}
}
Loading…
Cancel
Save