Added initial dialog when you enter the RTG area for the first time

This commit is contained in:
akshay 2022-08-21 13:12:23 -04:00
parent 782d6fb114
commit 5d290b4b9b
10 changed files with 128 additions and 4 deletions

View File

@ -49,7 +49,12 @@
"timeline-1660696967.json",
"timeline-1660738067.json",
"timeline-1661098482.json",
"timeline-1661098669.json"
"timeline-1661098669.json",
"timeline-1661099871.json",
"timeline-1661099959.json",
"timeline-1661099970.json",
"timeline-1661099979.json",
"timeline-1661100462.json"
],
"folders": {

View File

@ -4,7 +4,7 @@
"character": "character-1661095243.json",
"event_id": "dialogic_001",
"portrait": "",
"text": "Alert! DungBase power levels critical. All systems offline."
"text": "Alert! DungBase shields breached. All systems offline. Power levels critical. "
},
{
"character": "character-1661095243.json",

View File

@ -0,0 +1,15 @@
{
"events": [
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": " Raw yams are inedible. Cook them on the oven. Don't forget to bring a charge."
}
],
"metadata": {
"dialogic-version": "1.4.4",
"file": "timeline-1661099871.json",
"name": "oven"
}
}

View File

@ -0,0 +1,15 @@
{
"events": [
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Hydroponics Bay is essential for survival. Deopsit a charge and watch your yams grow. Remember to cook them in the oven."
}
],
"metadata": {
"dialogic-version": "1.4.4",
"file": "timeline-1661099959.json",
"name": "hydroponics"
}
}

View File

@ -0,0 +1,15 @@
{
"events": [
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Communications Array is vital to send and receive signals by consuming a charge. Perfect to notify Earth of crazy asteroids heading towards it! "
}
],
"metadata": {
"dialogic-version": "1.4.4",
"file": "timeline-1661099970.json",
"name": "comms"
}
}

View File

@ -0,0 +1,15 @@
{
"events": [
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Rover Control allows you to control the rover by consuming a charge. Rover is the only way you can mine Geodes outside your base but it looses charge fast so you better get your geodes quick."
}
],
"metadata": {
"dialogic-version": "1.4.4",
"file": "timeline-1661099979.json",
"name": "rover"
}
}

View File

@ -0,0 +1,39 @@
{
"events": [
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "This is your base. In the center is the RTG (Radioisotope Thermoelectric Generator), that generates a charge every few seconds but it can't hold more than 1 charge. You will want to frequently interact with it to transfer the charge into your personal battery."
},
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Charges in your personal battery can help run all the machinery. Though most of the machines are broken and need repair."
},
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "You can use the Ore Excavator to get Ore and convert that Ore into refined materials at the crafting table. All machinery require refined materials. Good thing the Crafting room survived the disaster."
},
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "Keep track of your hunger levels at the top left of the screen. If you hunger levels drop to zero, then you die. So make sure you eat cooked yams! There is one already cooked from yesterday in the Mess Hall."
},
{
"character": "",
"event_id": "dialogic_001",
"portrait": "",
"text": "One last thing. Dungee must go to bed before the bed timer runs out otherwise his hunger levels drop significantly. So make sure you go to bed on time. Remember! You have 5 days to save Earth."
}
],
"metadata": {
"dialogic-version": "1.4.4",
"file": "timeline-1661100462.json",
"name": "rtg"
}
}

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=13 format=2]
[ext_resource path="res://scripts/game_manager.gd" type="Script" id=1]
[ext_resource path="res://assets/UI/Menu_Recipes.png" type="Texture" id=2]
@ -29,6 +29,9 @@ font_data = ExtResource( 4 )
size = 34
font_data = ExtResource( 4 )
[sub_resource type="SphereShape" id=24]
radius = 6.9
[node name="game_manager" type="CanvasLayer" groups=["game_manager"]]
pause_mode = 2
layer = 3
@ -180,6 +183,14 @@ __meta__ = {
pause_mode = 1
unique_name_in_owner = true
[node name="RTGArea" type="Area" parent="."]
collision_mask = 3
[node name="RTGTrigger" type="CollisionShape" parent="RTGArea"]
unique_name_in_owner = true
shape = SubResource( 24 )
[connection signal="pressed" from="UI/pause_menu/resume_button" to="." method="_on_resume_button_pressed"]
[connection signal="pressed" from="UI/pause_menu/main_menu_button" to="." method="_on_main_menu_button_pressed"]
[connection signal="timeout" from="day_timer" to="." method="_on_day_timer_timeout"]
[connection signal="area_entered" from="RTGArea" to="." method="_on_Area_area_entered"]

View File

@ -719,7 +719,7 @@ mesh = SubResource( 1 )
skin = SubResource( 2 )
[node name="head_bone" type="BoneAttachment" parent="model_transform/DungMan/Armature/Skeleton" index="1"]
transform = Transform( 1, -2.22125e-16, -1.00618e-18, -2.21397e-19, -0.00552645, 0.999985, -2.22127e-16, -0.999985, -0.00552645, -3.33269e-16, 0.0081066, -1.50005 )
transform = Transform( 1, -2.21578e-16, -4.07727e-18, 1.16054e-18, -0.0131619, 0.999913, -2.21612e-16, -0.999913, -0.0131619, -3.3298e-16, -0.00489163, -1.4989 )
bone_name = "Item"
[node name="ItemSpawn" type="Spatial" parent="model_transform/DungMan/Armature/Skeleton/head_bone"]

View File

@ -8,6 +8,7 @@ onready var day_timer = $"%day_timer"
onready var day_timer_text = $"%day_timer_text"
onready var current_coins_text = $"%current_coins_text"
onready var pause_menu = $"%pause_menu"
onready var rtg_trigger = $"%RTGTrigger"
func _ready():
player.connect("starved_to_death", self, "_on_player_starved_to_death")
@ -58,3 +59,11 @@ func _on_resume_button_pressed():
func _on_main_menu_button_pressed():
get_tree().change_scene(MainMenuScenePath)
func _on_Area_area_entered(area):
var owner = area
if area.has_meta("owner"):
owner = area.get_meta("owner")
if owner == player:
play_simple_dialog("rtg")
rtg_trigger.disabled = true