Starting Cooking System

This commit is contained in:
2025-01-09 22:00:40 -06:00
parent 9f8e3b34ea
commit 5344fc4aeb
7 changed files with 42 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=8 format=3 uid="uid://iibqlagufwhm"]
[gd_scene load_steps=9 format=3 uid="uid://iibqlagufwhm"]
[ext_resource type="Script" path="res://scripts/System/Systems.gd" id="1_uen2c"]
[ext_resource type="Script" path="res://scripts/System/CutsceneSystem.gd" id="2_sf62c"]
@@ -7,6 +7,7 @@
[ext_resource type="Script" path="res://scripts/System/VNSystem.gd" id="5_22p3i"]
[ext_resource type="Script" path="res://scripts/System/PauseSystem.gd" id="6_hdi8m"]
[ext_resource type="Script" path="res://scripts/System/BattleSystem.gd" id="7_miqgj"]
[ext_resource type="Script" path="res://scripts/System/CookingSystem.gd" id="7_nou1j"]
[node name="Systems" type="Node3D"]
script = ExtResource("1_uen2c")
@@ -26,5 +27,8 @@ script = ExtResource("5_22p3i")
[node name="Pause" type="Node3D" parent="."]
script = ExtResource("6_hdi8m")
[node name="Cooking" type="Node" parent="."]
script = ExtResource("7_nou1j")
[node name="Battle" type="Node" parent="."]
script = ExtResource("7_miqgj")

View File

@@ -0,0 +1,6 @@
class_name CookingGame
const VerticalSlice = preload("res://scripts/Cooking/Recipe/VerticalSlice.gd");
var recipe:CookingRecipe = null;
func _init(recipe:CookingRecipe) -> void:
self.recipe = recipe;

View File

@@ -0,0 +1,4 @@
class_name CookingRecipe
func _init() -> void:
pass

View File

@@ -0,0 +1,4 @@
class_name VerticalSlice extends "res://scripts/Cooking/Recipe/CookingRecipe.gd"
func _init() -> void:
super._init();

View File

@@ -1,11 +1,15 @@
class_name TestNPCController extends "res://scripts/Entities/OverworldEntity.gd"
const TestCutscene = preload("res://scripts/Cutscene/TestCutscene.gd")
func interact(interactor) -> void:
var battle = Battle.new();
getSystems().BATTLE.startBattle(battle);
func interact(interactor:OverworldEntity) -> void:
# var battle = Battle.new();
# getSystems().BATTLE.startBattle(battle);
var game = CookingGame.new(VerticalSlice.new());
getSystems().COOKING.setCookingGame(game);
# getSystems().CUTSCENE.setCurrentCutscene(TestCutscene.new(interactor, self));
pass
func updateMovement(delta) -> void:
pass
func updateMovement(delta:float) -> void:
pass

View File

@@ -0,0 +1,11 @@
class_name CookingSystem extends Node;
const CookingGame = preload("res://scripts/Cooking/CookingGame.gd");
var game:CookingGame = null;
func getSystems():
return get_tree().current_scene.get_node("Systems");
func setCookingGame(game:CookingGame):
self.game = game;
print("CookingSystem: CookingGame set");

View File

@@ -5,6 +5,7 @@ const QuestSystem = preload("res://scripts/System/QuestSystem.gd");
const VNSystem = preload("res://scripts/System/VNSystem.gd");
const PauseSystem = preload("res://scripts/System/PauseSystem.gd");
const BattleSystem = preload("res://scripts/System/BattleSystem.gd");
const CookingSystem = preload("res://scripts/System/CookingSystem.gd");
var ITEM:ItemSystem;
var CUTSCENE:CutsceneSystem;
@@ -12,6 +13,7 @@ var QUEST:QuestSystem;
var VN:VNSystem;
var PAUSE:PauseSystem;
var BATTLE:BattleSystem;
var COOKING:CookingSystem;
func _ready():
ITEM = $Item;
@@ -20,6 +22,7 @@ func _ready():
VN = $VN;
PAUSE = $Pause;
BATTLE = $Battle;
COOKING = $Cooking;
func _process(delta):
pass