Skip to content

Commit

Permalink
codeupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
IronShears committed Feb 10, 2024
1 parent 633539a commit 0094b76
Show file tree
Hide file tree
Showing 82 changed files with 3,937 additions and 2,093 deletions.
3 changes: 3 additions & 0 deletions .import/NOSTALGIA.png-f3e25f3774749860d83dc6e728f1e26a.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="849665c21486fc651f49054274e5102f"
dest_md5="1a22418955806be3b1ede4a3a2d3354c"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/a.wav-cae5aa5cbecdd6c071f34e0ea570d97c.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="d133b2b2ff25ecd0bedd3d49b69dd345"
dest_md5="4337c14ede367beafa0772a1a8c6fd4d"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/e.wav-eba8d523c2e3568cb6d3c9fdb64dfd05.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="ff691eae163dff9e8d8e12ebb396bdbe"
dest_md5="a65afbc591c68b930f56d78f1e61bd5e"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/error.wav-db432d03f27d64568bf714c73bce7ae7.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="7c218227c841070d495c3e96b0608768"
dest_md5="db84fc87fb92328b0b0cba34e9e7c9e2"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/floorBed.png-c610c9a7f2c64d4e1f0ef675b437cd45.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="6595ef26de751d47a2e8ee2e38f824ea"
dest_md5="627168ce687039c431a062d6db7e4946"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/floorChair.png-fd85607a65f232f5db1cf0391224ea08.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="261028e7d55f108d2a839da55dd38dce"
dest_md5="c9f6ee3c6d0bf6c8fefb80aec8d14ef5"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/floorDecor.png-91b5657eeae215320ae0e42aa6fa7252.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="d5a6eec611639011ba54d49681dffe97"
dest_md5="1c005d020e95522eb98ec0bd5379ea32"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/floorHappy.png-9107ea66d04364228bd81832ce758b7a.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="19a28305919fb576864981dfbf7acffa"
dest_md5="e578ef445cfd35faf7ea6ef9c8b1444d"

Binary file not shown.
4 changes: 2 additions & 2 deletions .import/floorLookUp.png-f2f350da7852c086f8aca53b6cd9770f.md5
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source_md5="9f3a5e3c029028354c53a06485fb425f"
dest_md5="63fc42c99eb93658a9996fefb037bceb"
source_md5="0be193b7a1c1a23044159f67db7db9d0"
dest_md5="65aa80f350e0d699d794415edebda658"

Binary file modified .import/floorLookUp.png-f2f350da7852c086f8aca53b6cd9770f.stex
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="977bc727152fa9c990ab2ef7874c10fb"
dest_md5="0dc56c5b0cd4a977497204d2d531b7d1"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="9144e63fd7477386b55ae485f6677cb4"
dest_md5="353f799b4b7f6ad224d8fe9d75fcad27"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="f4371e66e9b97cad77f3443973a64702"
dest_md5="be62b462413e9747aed91eccb707a40c"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="45791b1bd51fdaf5372ff749cb96579c"
dest_md5="4d9ae53874e7207ef7a8ffed98558863"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="e5676cf51d25f9772802b8cc0107a689"
dest_md5="1c524f93d17a732d96421f6131eb9539"

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source_md5="90577d32d7942abc499cb88db8b95c81"
dest_md5="1d7c59099682920f06888efb18c0f0e9"
source_md5="e3c31e18e3026e5841936890029bb67f"
dest_md5="c81204fd310f01eafd0d603d98338a15"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/i.wav-a2e255542b633380c4cd9b60b364ce39.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="0713bd970b21d770985b6889afa3e1b9"
dest_md5="de296406371cd6f361dc5b7b89ee38d4"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/o.wav-2924b1933985f0231f56bbfa598715f1.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="a90b86cebcee3779c37234f26c5bf53c"
dest_md5="57272a488af1bf6bf7dc882577c99f95"

Binary file not shown.
3 changes: 3 additions & 0 deletions .import/u.wav-69c5b62ee342d6c57c61b6cf8d8fe51e.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source_md5="3a483c778c489a460f8ea793cc1eae3a"
dest_md5="33afc7684e7539a5e331196c19483cf5"

Binary file not shown.
185 changes: 143 additions & 42 deletions Commandprompt.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ var color
onready var endpoint
var firstline
var rng = RandomNumberGenerator.new()
var clip1
var clip2
var clip3
var a = preload("res://Resources/Voices/a.wav")
var e = preload("res://Resources/Voices/e.wav")
var i = preload("res://Resources/Voices/i.wav")
var o = preload("res://Resources/Voices/o.wav")
var u = preload("res://Resources/Voices/u.wav")
var optionsVisible = false
var currentTree
var mood = ""
Expand All @@ -35,8 +37,8 @@ var styleName = "Cool"


func _play_dialog():
set_up()
$Options.visible = false
set_up()
# $Voice.playing = false
textBox.set_process_input(true)
textBox.set_bbcode(text)
Expand All @@ -47,16 +49,36 @@ func _play_dialog():


func _on_SkipInput_pressed():
if UniversalFunctions.locked == true:
return
if dialogue != null:
if textBox.get_visible_characters() < textBox.get_total_character_count():
textBox.set_visible_characters(textBox.get_total_character_count())
$AutoCloseTimer.start()
var spriteSetter = dialogue[page]["sprite"]

spriteSetter.replace("Object",objectName)
spriteSetter=spriteSetter.replace("1","Static")
spriteSetter=spriteSetter.replace("2","Static")
if not "Static" in spriteSetter:
spriteSetter=spriteSetter.replace("floor","floorStatic")
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia") != null:
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").animation != spriteSetter:
if dialogue[page]["sprite"] != "null":
get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").play(spriteSetter)
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/").z_index == 3:

if optionsVisible == true:
$Options.visible = true
else:
if optionsVisible == true:
$Options.visible = true

else:
skip_input()

func skip_input():
if page < endpoint:
UniversalFunctions.dialoguePlaying = true
UniversalFunctions.nervousTimer.stop()
_play_dialog()
else:
Expand Down Expand Up @@ -90,15 +112,41 @@ func set_up():
text = text.replace("Ada", UniversalFunctions.dialogueJson["ada"])
text = text.replace("{emptyFilled}", UniversalFunctions.dialogueJson[UniversalFunctions.emptyFilled])
text = text.replace("{missingDialogue}", currentTree)
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia") != null:
if UniversalFunctions.foundationSnippet == "noFoundation":
if get_tree().get_root().get_node_or_null("/root/world/").distractions.size() == 0:
set_mood()
text = text.replace("{FoundationSnippet}", UniversalFunctions.dialogueJson[mood+UniversalFunctions.foundationSnippet])

else:
text = text.replace("{FoundationSnippet}", UniversalFunctions.dialogueJson["fired"+UniversalFunctions.foundationSnippet])

else:
if get_tree().get_root().get_node_or_null("/root/world/").distractions.size() == 0:
set_mood()
text = text.replace("{FoundationSnippet}", UniversalFunctions.dialogueJson[mood+UniversalFunctions.foundationSnippet])
else:
text = text.replace("{FoundationSnippet}", UniversalFunctions.dialogueJson["fired"+UniversalFunctions.foundationSnippet])

text = text.replace("{DiscoveredIDEInsert}", UniversalFunctions.dialogueJson[str(get_tree().get_root().get_node_or_null("/root/world/Taskbar/Icons/IDE").visible)+"DiscoveredIDEInsert"])
if get_tree().get_root().get_node_or_null("/root/world/").filesDeleted == 0:
text = text.replace("{deletedFiles}", UniversalFunctions.dialogueJson["deletedFilesFalse"])
else:
text = text.replace("{deletedFiles}", UniversalFunctions.dialogueJson["deletedFilesTrue"])


if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").animation != dialogue[page]["sprite"]:

var spriteSetter = dialogue[page]["sprite"]
spriteSetter.replace("Object",objectName)
get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").play(spriteSetter)



#changes the color of the text and plays sprites
if dialogue[page]["color"] == "Teal":
text = "[color=#306082]"+text+"[/color]"
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia") != null:
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").animation != dialogue[page]["sprite"]:
if dialogue[page]["sprite"] != "null":
get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").play(dialogue[page]["sprite"])


#sets the options
optionsVisible = dialogue[page]["optionsVisible"]
if optionsVisible == true:
Expand Down Expand Up @@ -138,64 +186,117 @@ func first_line():


func _on_Timer_timeout():

if dialogue != null:
if textBox.visible_characters < textBox.get_total_character_count():
if textBox.visible_characters < textBox.get_total_character_count()-1:
if text[textBox.visible_characters+1] == " ":
textBox.set_visible_characters(textBox.get_visible_characters()+1)
# if color == "pink":
# if $Voice.playing == false and text[textBox.visible_characters] != ".":
# rng.randomize()
# var pitch
# if dialogue[page]["tickSpeed"] == 0.05:
# pitch = rng.randf_range(0.90, 1.05)
# elif dialogue[page]["tickSpeed"] > 0.5:
# pitch = rng.randf_range(0.90 - (dialogue[page]["tickSpeed"]*15), 1.05 - (dialogue[page]["tickSpeed"]*15))
# elif dialogue[page]["tickSpeed"] < 0.5:
# pitch = rng.randf_range(0.90 + (abs(dialogue[page]["tickSpeed"]-0.10) *4), 1.05 + (abs(dialogue[page]["tickSpeed"]-0.10) *4))
# $Voice.pitch_scale = pitch
# var aeiouy = ["a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y"]
# var bcdfghjklmn = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N"]
# var clip = clip3
#
# for i in aeiouy:
# if text[textBox.visible_characters] == i:
# clip = clip1
# for i in bcdfghjklmn:
# if text[textBox.visible_characters] == i:
# clip = clip2
# $Voice.stream = clip
# $Voice.play()
if color == "Pink":
if $Voice.playing == false:
var currentChar = text[textBox.visible_characters]
currentChar = currentChar.to_lower()
var nextChar = " "
var thirdChar = " "
if textBox.visible_characters < textBox.get_total_character_count()-2:
nextChar = text[textBox.visible_characters+1]
nextChar = currentChar.to_lower()
thirdChar = text[textBox.visible_characters+2]
thirdChar = currentChar.to_lower()
rng.randomize()
var pitch
if "Smile" in dialogue[page]["sprite"]:
pitch = rng.randf_range(1.05, 1.15)
elif "Angry" in dialogue[page]["sprite"]:
pitch = rng.randf_range(1.02, 1.12)
elif "Sad" in dialogue[page]["sprite"]:
pitch = rng.randf_range(0.90, 1.00)
elif "Nervous" in dialogue[page]["sprite"]:
pitch = rng.randf_range(0.95, 1.05)
else:
pitch = rng.randf_range(1.00, 1.10)
$Voice.pitch_scale = pitch
if currentChar == "a":
$Voice.stream = a
elif currentChar == "e":
$Voice.stream = e
elif currentChar == "i":
$Voice.stream = i
elif currentChar == "o":
$Voice.stream = o
elif currentChar == "u":
$Voice.stream = u
else:
if nextChar == "a":
$Voice.stream = a
elif nextChar == "e":
$Voice.stream = e
elif nextChar == "i":
$Voice.stream = i
elif nextChar == "o":
$Voice.stream = o
elif nextChar == "u":
$Voice.stream = u
else:
if thirdChar == "a":
$Voice.stream = a
elif thirdChar == "e":
$Voice.stream = e
elif thirdChar == "i":
$Voice.stream = i
elif thirdChar == "o":
$Voice.stream = o
elif thirdChar == "u":
$Voice.stream = u
else:
if currentChar in ["b","c","d","f"]:
$Voice.stream = a
elif currentChar in ["g","h","j","k"]:
$Voice.stream = e
elif currentChar in ["l","m","n","p",]:
$Voice.stream = i
elif currentChar in ["q","r","s","t"]:
$Voice.stream = o
elif currentChar in ["v","w","x","y","z"]:
$Voice.stream = u
if currentChar != " " or "." or "?" or "!":
$Voice.play()



textBox.set_visible_characters(textBox.get_visible_characters()+1)
if textBox.visible_characters == textBox.get_total_character_count():
$AutoCloseTimer.start()
var spriteSetter = dialogue[page]["sprite"]
spriteSetter=spriteSetter.replace("1","Static")
spriteSetter=spriteSetter.replace("2","Static")
spriteSetter=spriteSetter.replace("floor","floorStatic")
spriteSetter.replace("Object",objectName)
if not "Static" in spriteSetter:
spriteSetter=spriteSetter.replace("floor","floorStatic")
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia") != null:
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").animation != spriteSetter:
if dialogue[page]["sprite"] != "null":
get_tree().get_root().get_node_or_null("/root/world/Virtualhell/Synthia").play(spriteSetter)

if optionsVisible == true:
if get_tree().get_root().get_node_or_null("/root/world/Virtualhell/").z_index == 3:
$Options.visible = true
else:
if optionsVisible == true:
$Options.visible = true



func _on_AutoCloseTimer_timeout():
# if $Voice.playing == true:
# yield($Voice,"finished")
# $Voice.playing = false
UniversalFunctions.dialoguePlaying = false
UniversalFunctions.nervousTimer.start()
#skip_input()
if closetime == 0.05 or closetime == 1.1:
skip_input()
else:
UniversalFunctions.nervousTimer.start()



func _on_Voice_finished():
if textBox.visible_characters == textBox.get_total_character_count():
$AutoCloseTimer.start()

func set_mood():
cursor.play("default")
if UniversalFunctions.disgust < 20:
Expand Down
4 changes: 3 additions & 1 deletion Commandprompt.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ margin_left = -42.0
margin_top = -49.0
margin_right = 268.0
margin_bottom = 13.0
focus_mode = 0
enabled_focus_mode = 0
__meta__ = {
"_edit_use_anchors_": false
}
Expand All @@ -42,6 +44,7 @@ margin_left = -45.0
margin_top = -60.0
margin_right = 270.0
margin_bottom = 16.0
mouse_filter = 2
__meta__ = {
"_edit_use_anchors_": false
}
Expand Down Expand Up @@ -126,4 +129,3 @@ one_shot = true
[connection signal="pressed" from="Options/Option1" to="." method="_on_Option3_pressed" binds= [ "Option1" ]]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
[connection signal="timeout" from="AutoCloseTimer" to="." method="_on_AutoCloseTimer_timeout"]
[connection signal="finished" from="Voice" to="." method="_on_Voice_finished"]
4 changes: 2 additions & 2 deletions FileSystem.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ signal openFile
var allItems={
"system":["images","documents"],
"images":["mycat1jpg","mycat2jpg","mykot3jpg"],
"documents":["clickMe"],
"documents":["clickMe", "groceriestxt"],
"clickMe":["IGNOREjpg","YOURjpg","DIRECTIVESjpg","ANDjpg","READTHISrtf"],
"why":["AN_EXPLAINATIONrtf"],
"cynthia":["LOVErtf"],
"cynthia":["LOVErtf", "NOSTALGIAjpg"],
"myWish":["BLOW_A_WISHzip","WISHINGrtf"],
"imSorry":["apologyrtf"],
"atPeace":["THANKYOUrtf","ONEDAYjpg"]
Expand Down
Loading

0 comments on commit 0094b76

Please sign in to comment.