It's Cow Game! Version 2.04!
This commit is contained in:
commit
a9e1ed9ddd
3148 changed files with 95332 additions and 0 deletions
14
Interactions/Travel/Traveller.gd
Normal file
14
Interactions/Travel/Traveller.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
extends Interaction
|
||||
|
||||
@export var destinationNames:Array[String]
|
||||
@export var destinationLocations:Array[LocationManager.Locations]
|
||||
@export var destinationEntranceID:Array[int]
|
||||
|
||||
@export var movementVerb = "Walk To"
|
||||
|
||||
func _ready():
|
||||
for i in destinationNames.size():
|
||||
add_action(movementVerb + " " + destinationNames[i], movement.bind(i))
|
||||
|
||||
func movement(destinationIndex:int):
|
||||
LocationManager.changeLocation(destinationLocations[destinationIndex], destinationEntranceID[destinationIndex])
|
||||
10
Interactions/Travel/Traveller.tscn
Normal file
10
Interactions/Travel/Traveller.tscn
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://dhmmocu2rnhov"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://oe2gkhrdpuh2" path="res://Interactions/Interactable/interaction.tscn" id="1_w7dtd"]
|
||||
[ext_resource type="Script" path="res://Interactions/Travel/Traveller.gd" id="2_ntso1"]
|
||||
|
||||
[node name="Traveller" instance=ExtResource("1_w7dtd")]
|
||||
script = ExtResource("2_ntso1")
|
||||
destinationNames = Array[String]([])
|
||||
destinationPaths = Array[String]([])
|
||||
destinationEntranceID = Array[String]([])
|
||||
67
Interactions/Travel/TutorialTraveller.gd
Normal file
67
Interactions/Travel/TutorialTraveller.gd
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
extends "res://Interactions/Travel/Traveller.gd"
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
for i in destinationNames.size():
|
||||
var actionMenu = get_parent().get_node("Interactable/ActionMenu")
|
||||
|
||||
var newID = actionMenu.add_action("Exit Tutorial Boat")
|
||||
actionMenu.action_selected.connect(action_chosen)
|
||||
|
||||
# Somehow confirm you want to exit
|
||||
|
||||
IDs.append(newID)
|
||||
actionFunctions.append(exit_tutorial.bind(0))
|
||||
|
||||
func exit_tutorial(_Deez):
|
||||
var remainingKnowledgers = []
|
||||
|
||||
if !SaveManager.get_save_value("tutorialAlligatorDone", false):
|
||||
remainingKnowledgers.append("Arson Alligator")
|
||||
|
||||
if !SaveManager.get_save_value("tutorialJaguarDone", false):
|
||||
remainingKnowledgers.append("Juicing Jaguar")
|
||||
|
||||
if !SaveManager.get_save_value("tutorialSheepDone", false):
|
||||
remainingKnowledgers.append("Scavenging Sheep")
|
||||
|
||||
if !SaveManager.get_save_value("tutorialToadDone", false):
|
||||
remainingKnowledgers.append("Trading Toad")
|
||||
|
||||
if !SaveManager.get_save_value("tutorialTapirDone", false):
|
||||
remainingKnowledgers.append("Tutorial Tapir")
|
||||
|
||||
var remainingMessage = ""
|
||||
for i in range(remainingKnowledgers.size()):
|
||||
var currentKnowledge = remainingKnowledgers[i]
|
||||
|
||||
if i > 0 and i == remainingKnowledgers.size() - 1:
|
||||
remainingMessage += "and "
|
||||
|
||||
remainingMessage += currentKnowledge
|
||||
|
||||
if i != remainingKnowledgers.size() - 1:
|
||||
if remainingKnowledgers.size() == 2:
|
||||
remainingMessage += " "
|
||||
else:
|
||||
remainingMessage += ", "
|
||||
|
||||
if remainingKnowledgers.size() > 0:
|
||||
if remainingKnowledgers.size() == 1:
|
||||
remainingMessage += " still has wisdom for you."
|
||||
else:
|
||||
remainingMessage += " still have wisdom for you."
|
||||
|
||||
if remainingKnowledgers.size() > 0:
|
||||
$Popup/VBoxContainer/TutorialPopupText.text = "Are you sure you want to leave?\n" + remainingMessage
|
||||
$Popup.popup_centered()
|
||||
$Popup.visible = true
|
||||
else:
|
||||
_on_confirm_pressed()
|
||||
|
||||
func _on_cancel_pressed():
|
||||
$Popup.visible = false
|
||||
|
||||
func _on_confirm_pressed():
|
||||
LocationManager.changeLocation(LocationManager.Locations.Pier,0)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue