From 7e2c721c7a7a3c3d92451d57f3c5c61c6e72d282 Mon Sep 17 00:00:00 2001 From: R Date: Tue, 27 Jul 2021 17:11:28 -0500 Subject: [PATCH] This world is not my home. Imma just passing thru. the angels beckon me from heaven's open door and I can't feel at home in this world anymore --- GUI/Main.tscn | 25 ++++++++++++++++ GUI/Opresources.tscn | 58 ++++++++++++++++++++++++++++++++++++ GUI/Serverlist.tscn | 43 ++++++++++++++++++++++++++ GUI/makenewgame.tscn | 45 +++++++++++++++++----------- GUI/multiplayerlobby.tscn | 57 +++++++++++++++++++++++++++++++++++ Resources/platforms.json | 8 ++--- Resources/serverlisting.json | 5 ++++ Scripts/HUD.gd | 1 + Scripts/Main.gd | 34 ++++++++++++++------- Scripts/Opresources.gd | 18 +++++++++++ Scripts/Serverlist.gd | 41 +++++++++++++++++++++++++ Scripts/Staff.gd | 2 +- Scripts/devstudio.gd | 30 +++++-------------- Scripts/makenewgame.gd | 36 +++++++++++----------- Scripts/multiplayerlobby.gd | 32 ++++++++++++++++++++ Scripts/reviews.gd | 1 - project.godot | 1 + 17 files changed, 362 insertions(+), 75 deletions(-) create mode 100644 GUI/Opresources.tscn create mode 100644 GUI/Serverlist.tscn create mode 100644 GUI/multiplayerlobby.tscn create mode 100644 Resources/serverlisting.json create mode 100644 Scripts/Opresources.gd create mode 100644 Scripts/Serverlist.gd create mode 100644 Scripts/multiplayerlobby.gd diff --git a/GUI/Main.tscn b/GUI/Main.tscn index 9a66dc5..36a57b1 100644 --- a/GUI/Main.tscn +++ b/GUI/Main.tscn @@ -15,6 +15,17 @@ margin_right = 12.0 margin_bottom = 20.0 text = "New Game" +[node name="startyear" type="SpinBox" parent="newgame"] +margin_left = 36.0 +margin_top = 32.0 +margin_right = 209.0 +margin_bottom = 55.0 +min_value = 1978.0 +max_value = 2050.0 +value = 1989.0 +rounded = true +prefix = "StartYear" + [node name="TextureRect" type="TextureRect" parent="."] anchor_left = 1.0 anchor_top = 0.5 @@ -25,3 +36,17 @@ margin_top = -125.0 margin_bottom = 125.0 texture = ExtResource( 3 ) +[node name="Opresourcy" type="Button" parent="."] +margin_left = 541.286 +margin_top = 64.4388 +margin_right = 681.286 +margin_bottom = 83.4388 +text = "resources/mods" + +[node name="online" type="Button" parent="."] +margin_left = 320.762 +margin_top = 269.211 +margin_right = 380.762 +margin_bottom = 288.211 +text = "Online" + diff --git a/GUI/Opresources.tscn b/GUI/Opresources.tscn new file mode 100644 index 0000000..9e7187d --- /dev/null +++ b/GUI/Opresources.tscn @@ -0,0 +1,58 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Assets/Theme/OGDT_theme.tres" type="Theme" id=1] +[ext_resource path="res://Scripts/Opresources.gd" type="Script" id=2] + +[node name="Opresources" type="Control"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -175.0 +margin_top = -167.5 +margin_right = 175.0 +margin_bottom = 167.5 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="bg" type="ColorRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="note" type="Label" parent="VBoxContainer"] +margin_right = 360.0 +margin_bottom = 85.0 +text = "Reminder if you are going to use an +external file on your computer. +you'll need to use 'user://' +Example: user://mods/firstmod.json " + +[node name="Researchmod" type="LineEdit" parent="VBoxContainer"] +margin_top = 89.0 +margin_right = 360.0 +margin_bottom = 112.0 + +[node name="Platformsmod" type="LineEdit" parent="VBoxContainer"] +margin_top = 116.0 +margin_right = 360.0 +margin_bottom = 139.0 + +[node name="Themesmod" type="LineEdit" parent="VBoxContainer"] +margin_top = 143.0 +margin_right = 360.0 +margin_bottom = 166.0 + +[node name="confirm" type="Button" parent="."] +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -35.0 +margin_top = -20.0 +margin_right = 35.0 +text = "Confirm" + diff --git a/GUI/Serverlist.tscn b/GUI/Serverlist.tscn new file mode 100644 index 0000000..46b4988 --- /dev/null +++ b/GUI/Serverlist.tscn @@ -0,0 +1,43 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Assets/Theme/OGDT_theme.tres" type="Theme" id=1] +[ext_resource path="res://Scripts/Serverlist.gd" type="Script" id=2] + +[node name="Serverlist" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="servers" type="ItemList" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_bottom = -42.0 + +[node name="ipconnect" type="LineEdit" parent="."] +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = -23.0 +margin_right = -206.0 +margin_bottom = 1.0 + +[node name="join" type="Button" parent="."] +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = -164.0 +margin_top = -20.0 +margin_right = -88.0 +text = "Join" + +[node name="host" type="Button" parent="."] +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = -63.0 +margin_top = -20.0 +text = "Host" + diff --git a/GUI/makenewgame.tscn b/GUI/makenewgame.tscn index a2fce93..35b2057 100644 --- a/GUI/makenewgame.tscn +++ b/GUI/makenewgame.tscn @@ -9,7 +9,7 @@ [ext_resource path="res://Assets/audience/mature.png" type="Texture" id=7] [ext_resource path="res://Assets/audience/mature_selected.png" type="Texture" id=8] -[node name="makenewgame" type="VBoxContainer"] +[node name="makenewgame" type="Control"] anchor_left = 0.5 anchor_right = 0.5 anchor_bottom = 1.0 @@ -18,7 +18,17 @@ margin_right = 164.0 theme = ExtResource( 1 ) script = ExtResource( 2 ) -[node name="gamename" type="TextEdit" parent="."] +[node name="bg" type="ColorRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +color = Color( 0.909804, 0.815686, 0.654902, 1 ) + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 1 ) + +[node name="gamename" type="TextEdit" parent="VBoxContainer"] margin_right = 328.0 margin_bottom = 47.0 size_flags_horizontal = 3 @@ -26,7 +36,7 @@ size_flags_vertical = 3 size_flags_stretch_ratio = 0.4 text = "Insert Game Name" -[node name="gamesize" type="HBoxContainer" parent="."] +[node name="gamesize" type="HBoxContainer" parent="VBoxContainer"] margin_top = 51.0 margin_right = 328.0 margin_bottom = 83.0 @@ -34,59 +44,58 @@ size_flags_horizontal = 3 size_flags_vertical = 3 size_flags_stretch_ratio = 0.0 -[node name="Small" type="Button" parent="gamesize"] +[node name="Small" type="Button" parent="VBoxContainer/gamesize"] margin_right = 50.0 margin_bottom = 32.0 text = "Small" -[node name="Medium" type="Button" parent="gamesize"] +[node name="Medium" type="Button" parent="VBoxContainer/gamesize"] margin_left = 54.0 margin_right = 114.0 margin_bottom = 32.0 text = "Medium" -[node name="Large" type="Button" parent="gamesize"] +[node name="Large" type="Button" parent="VBoxContainer/gamesize"] margin_left = 118.0 margin_right = 168.0 margin_bottom = 32.0 text = "Large" -[node name="TripleA" type="Button" parent="gamesize"] +[node name="TripleA" type="Button" parent="VBoxContainer/gamesize"] margin_left = 172.0 margin_right = 202.0 margin_bottom = 32.0 text = "AAA" -[node name="MMO" type="CheckButton" parent="gamesize"] +[node name="MMO" type="CheckButton" parent="VBoxContainer/gamesize"] margin_left = 206.0 margin_right = 302.0 margin_bottom = 32.0 text = "MMO" -[node name="targetaudience" type="HBoxContainer" parent="."] +[node name="targetaudience" type="HBoxContainer" parent="VBoxContainer"] margin_top = 87.0 margin_right = 328.0 margin_bottom = 205.0 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="Young" type="TextureButton" parent="targetaudience"] +[node name="Young" type="TextureButton" parent="VBoxContainer/targetaudience"] margin_right = 64.0 margin_bottom = 118.0 toggle_mode = true texture_normal = ExtResource( 3 ) texture_pressed = ExtResource( 4 ) -[node name="Everyone" type="TextureButton" parent="targetaudience"] +[node name="Everyone" type="TextureButton" parent="VBoxContainer/targetaudience"] margin_left = 68.0 margin_right = 132.0 margin_bottom = 118.0 toggle_mode = true -pressed = true texture_normal = ExtResource( 5 ) texture_pressed = ExtResource( 6 ) -[node name="Mature" type="TextureButton" parent="targetaudience"] +[node name="Mature" type="TextureButton" parent="VBoxContainer/targetaudience"] margin_left = 136.0 margin_right = 200.0 margin_bottom = 118.0 @@ -94,26 +103,26 @@ toggle_mode = true texture_normal = ExtResource( 7 ) texture_pressed = ExtResource( 8 ) -[node name="platforms" type="HBoxContainer" parent="."] +[node name="platforms" type="HBoxContainer" parent="VBoxContainer"] margin_top = 209.0 margin_right = 328.0 margin_bottom = 327.0 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="genres" type="HBoxContainer" parent="."] +[node name="genres" type="HBoxContainer" parent="VBoxContainer"] margin_top = 331.0 margin_right = 328.0 margin_bottom = 449.0 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="themes" type="HBoxContainer" parent="."] +[node name="themes" type="HBoxContainer" parent="VBoxContainer"] margin_top = 453.0 margin_right = 328.0 margin_bottom = 453.0 -[node name="engine" type="MenuButton" parent="."] +[node name="engine" type="MenuButton" parent="VBoxContainer"] margin_top = 457.0 margin_right = 328.0 margin_bottom = 575.0 @@ -121,7 +130,7 @@ size_flags_horizontal = 3 size_flags_vertical = 3 text = "Engine" -[node name="confirm" type="Button" parent="."] +[node name="confirm" type="Button" parent="VBoxContainer"] margin_top = 579.0 margin_right = 328.0 margin_bottom = 598.0 diff --git a/GUI/multiplayerlobby.tscn b/GUI/multiplayerlobby.tscn new file mode 100644 index 0000000..ed6e106 --- /dev/null +++ b/GUI/multiplayerlobby.tscn @@ -0,0 +1,57 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Assets/Theme/OGDT_theme.tres" type="Theme" id=1] +[ext_resource path="res://Scripts/multiplayerlobby.gd" type="Script" id=2] + +[node name="multiplayerlobby" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="bg" type="ColorRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +color = Color( 0.909804, 0.815686, 0.654902, 1 ) + +[node name="companies" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_bottom = -206.0 + +[node name="chatbox" type="RichTextLabel" parent="."] +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = -173.0 +margin_bottom = -34.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = -23.0 + +[node name="talk" type="LineEdit" parent="HBoxContainer"] +margin_right = 732.0 +margin_bottom = 23.0 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 4.0 +placeholder_text = "Chat" + +[node name="startyear" type="SpinBox" parent="HBoxContainer"] +margin_left = 736.0 +margin_right = 919.0 +margin_bottom = 23.0 +size_flags_horizontal = 3 +min_value = 1978.0 +max_value = 2050.0 +value = 1978.0 +prefix = "Start Year" + +[node name="start" type="Button" parent="HBoxContainer"] +margin_left = 923.0 +margin_right = 1023.0 +margin_bottom = 23.0 +text = "Start Game" + diff --git a/Resources/platforms.json b/Resources/platforms.json index a8543ea..598c4fc 100644 --- a/Resources/platforms.json +++ b/Resources/platforms.json @@ -1,23 +1,23 @@ { "Commadare64":{ - "start":[1,1,1988], + "start":[1,1,1978], "end":[3,1,1990], "Targetaudience":"Everyone", "MarketShare":44 }, "PersonalComputer":{ - "start":[1,1,1988], + "start":[1,1,1983], "Targetaudience":"Everyone", "MarketShare":50 }, "NES":{ - "start":[1,1,1988], + "start":[1,1,1984], "end":[3,1,1992], "Targetaudience":"Young", "MarketShare":44 }, "SEGA MEGADRIVE":{ - "start":[1,1,1988], + "start":[1,1,1989], "end":[1,1,1995], "Targetaudience":"Everyone", "MarketShare":44 diff --git a/Resources/serverlisting.json b/Resources/serverlisting.json new file mode 100644 index 0000000..9a6ffbd --- /dev/null +++ b/Resources/serverlisting.json @@ -0,0 +1,5 @@ +{ + "sev":["192.168.1.111", + "127.0.0.1" + ] +} \ No newline at end of file diff --git a/Scripts/HUD.gd b/Scripts/HUD.gd index 0e1112b..30ea56f 100644 --- a/Scripts/HUD.gd +++ b/Scripts/HUD.gd @@ -71,6 +71,7 @@ func research_pressed(idx):#Catch up on the latest fads, tech, and your reputati ## MAIN func _ready(): + $Date.text = str(MONTHS.keys()[month])+"/"+str(year)+"\nWeek:"+str(week) #connections var connections = [ $bottonbar/Work.get_popup().connect("id_pressed",self,"work_pressed"), diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 3af9f5d..c83ad9f 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -1,24 +1,36 @@ extends Control +var startyear = 1989 + +## NewGame Options +func change_start_year(val):#change the date you start your company + startyear = int(val) + ## MENU func start_game(packscene): - get_tree().change_scene_to(packscene) - print_debug(get_tree().root.has_node("devstudio")) + packscene.get_node("HUD").year = startyear + var t = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Themesmod")) + var rech = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Researchmod")) + var pl = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Platformsmod")) + packscene.to_research = rech + packscene.to_research["themes"] = t + for plat in pl: + if(pl[plat]["start"][2]<=startyear): + packscene.platforms[plat] = pl[plat] + get_tree().root.add_child(packscene,true) + queue_free() ## MAIN func _ready(): #Newgame prep var packscene = load("res://GUI/devstudio.tscn").instance() - - var t = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Themesmod")) - var rech = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Researchmod")) - packscene.to_research = rech - packscene.to_research["themes"] = t - - var packer = PackedScene.new() - packer.pack(packscene) + var opres = load("res://GUI/Opresources.tscn").instance() + var sev = load("res://GUI/Serverlist.tscn").instance() #Connections var connections = [ - $newgame.connect("pressed",self,"start_game",[packer]) + $newgame.connect("pressed",self,"start_game",[packscene]), + $Opresourcy.connect("pressed",self,"add_child",[opres]), + $newgame/startyear.connect("value_changed",self,"change_start_year"), + $online.connect("pressed",self,"add_child",[sev]), ] print_debug(connections) \ No newline at end of file diff --git a/Scripts/Opresources.gd b/Scripts/Opresources.gd new file mode 100644 index 0000000..e41032c --- /dev/null +++ b/Scripts/Opresources.gd @@ -0,0 +1,18 @@ +extends Control + +## set +func set_game_resources(value,what): + ProjectSettings.set("Game/Resources/"+what,value) + +## MAIN +func _ready(): + $VBoxContainer/Platformsmod.text = ProjectSettings.get("Game/Resources/Platformsmod") + $VBoxContainer/Researchmod.text = ProjectSettings.get("Game/Resources/Researchmod") + $VBoxContainer/Themesmod.text = ProjectSettings.get("Game/Resources/Themesmod") + var connections = [ + $confirm.connect("pressed",self,"queue_free"), + $VBoxContainer/Researchmod.connect("text_entered",self,"set_game_resources",["Researchmod"]), + $VBoxContainer/Platformsmod.connect("text_entered",self,"set_game_resources",["Platformsmod"]), + $VBoxContainer/Themesmod.connect("text_entered",self,"set_game_resources",["Themesmod"]) + ] + print_debug(connections) \ No newline at end of file diff --git a/Scripts/Serverlist.gd b/Scripts/Serverlist.gd new file mode 100644 index 0000000..5fccda5 --- /dev/null +++ b/Scripts/Serverlist.gd @@ -0,0 +1,41 @@ +extends Control + +const port = 6008 + +var remembered_servers = [ +] +## CONNECTION +func host_lobby():#Host a game + var hostpeer = NetworkedMultiplayerENet.new() + hostpeer.create_server(port) + create_lobby(hostpeer) + +func join_lobby():#Connect to a game + var joinpeer = NetworkedMultiplayerENet.new() + joinpeer.create_client($ipconnect.text,port) + create_lobby(joinpeer) + +func create_lobby(peer):#Creates the multiplayer lobby + var lob = load("res://GUI/multiplayerlobby.tscn").instance() + get_parent().add_child(lob,true) + get_tree().network_peer = peer + +## SERVER LISTING +func refresh():#Refreshes the list of servers avaiable + for sev in remembered_servers: + $servers.add_item(sev) + +func selected_server(idx):#selected a server from the servers list + $ipconnect.text = $servers.get_item_text(idx) + +## MAIN +func _ready(): + remembered_servers = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Serverlist"))["sev"] + $ipconnect.text = remembered_servers[0] + refresh() + var connections = [ + $servers.connect("item_selected",self,"selected_server"), + $join.connect("pressed",self,"join_lobby"), + $host.connect("pressed",self,"host_lobby") + ] + print_debug(connections) \ No newline at end of file diff --git a/Scripts/Staff.gd b/Scripts/Staff.gd index 2e3c0dd..21b6430 100644 --- a/Scripts/Staff.gd +++ b/Scripts/Staff.gd @@ -16,7 +16,7 @@ var mem = { ## MAIN func _physics_process(delta): - #check for point generation chance + #check for point generation chance #THIS IS WAY TOO HIGH! for member in mem: if(mem[member]["working_on"]!=""):#First check if it is actually working on something var chancenumber = randi()%9999-mem[member]["speed"] diff --git a/Scripts/devstudio.gd b/Scripts/devstudio.gd index 84ef0aa..369c5f8 100644 --- a/Scripts/devstudio.gd +++ b/Scripts/devstudio.gd @@ -47,29 +47,13 @@ var engines = { "Texty":[] } var platforms = { - "Commadare64":{ - "start":[1,1,1988], - "end":[3,1,1990], - "Targetaudience":"Everyone", - "MarketShare":44 - }, - "PersonalComputer":{ - "start":[1,1,1988], - "Targetaudience":"Everyone", - "MarketShare":50 - }, - "NES":{ - "start":[1,1,1988], - "end":[3,1,1992], - "Targetaudience":"Young", - "MarketShare":44 - }, - "SEGA MEGADRIVE":{ - "start":[1,1,1988], - "end":[1,1,1995], - "Targetaudience":"Everyone", - "MarketShare":44 - } +#Example +# "Commadare64":{ +# "start":[1,1,1988], +# "end":[3,1,1990], +# "Targetaudience":"Everyone", +# "MarketShare":44 +# } } ## RESEARCH var to_research = { diff --git a/Scripts/makenewgame.gd b/Scripts/makenewgame.gd index e799303..3c64225 100644 --- a/Scripts/makenewgame.gd +++ b/Scripts/makenewgame.gd @@ -1,4 +1,4 @@ -extends VBoxContainer +extends Control var gamesize = "Small" var targetaudience = "Young" @@ -76,9 +76,9 @@ func register_game():#Sends the idea off to the studio for developement phasetime+= 15 "AAA": phasetime+= 20 - if($gamesize/MMO.pressed == true): + if($VBoxContainer/gamesize/MMO.pressed == true): phasetime += phasetime/2 - get_parent().get_parent().games_in_developement[$gamename.text] = { + get_parent().get_parent().games_in_developement[$VBoxContainer/gamename.text] = { "devstart":[get_parent().month,get_parent().week,get_parent().year], "Phase":0,#0=start,1-3 = actual phases, 4 = debug phase/release prep "phasetime":phasetime, @@ -103,27 +103,29 @@ func register_game():#Sends the idea off to the studio for developement "Engine_Flags":["ColorTextGraphics"], "Game_Tags":[gamesize,targetaudience,platforms,genres,themes,engine] } - get_parent().add_game_dev($gamename.text) - get_parent().get_node("Staff").mem["You"]["working_on"]=$gamename.text#WIP a menu to tell the staff to work on this title + get_parent().add_game_dev($VBoxContainer/gamename.text) + get_parent().get_node("Staff").mem["You"]["working_on"]=$VBoxContainer/gamename.text#WIP a menu to tell the staff to work on this title queue_free() ## MAIN func _ready(): var t = $"/root/loader".load_json(ProjectSettings.get("Game/Resources/Themesmod")) - add_menu_to($themes,t,get_parent().get_parent().themeamount) - add_menu_to($genres,["Action","Adventure","RPG","Simulation","Strategy","Casual"],get_parent().get_parent().genreamount) - add_menu_to($platforms,get_parent().get_parent().platforms,get_parent().get_parent().platforms.size()/2) + add_menu_to($VBoxContainer/themes,t,get_parent().get_parent().themeamount) + add_menu_to($VBoxContainer/genres,["Action","Adventure","RPG","Simulation","Strategy","Casual"],get_parent().get_parent().genreamount) + add_menu_to($VBoxContainer/platforms,get_parent().get_parent().platforms,get_parent().get_parent().platforms.size()/2) for i in get_parent().get_parent().engines: - $engine.get_popup().add_item(i) + $VBoxContainer/engine.get_popup().add_item(i) - $gamename.text = "Game #"+str(get_parent().get_parent().games.size()+get_parent().get_parent().games_in_developement.size()+1) + $VBoxContainer/gamename.text = "Game #"+str(get_parent().get_parent().games.size()+get_parent().get_parent().games_in_developement.size()+1) var connections = [ - $confirm.connect("pressed",self,"register_game"), - $gamesize/Small.connect("pressed",self,"set_game_size",["Small"]), - $gamesize/Medium.connect("pressed",self,"set_game_size",["Medium"]), - $gamesize/Large.connect("pressed",self,"set_game_size",["Large"]), - $gamesize/TripleA.connect("pressed",self,"set_game_size",["AAA"]), - $engine.get_popup().connect("id_pressed",self,"popup_menu_change",[$engine]) + $VBoxContainer/confirm.connect("pressed",self,"register_game"), + $VBoxContainer/gamesize/Small.connect("pressed",self,"set_game_size",["Small"]), + $VBoxContainer/gamesize/Medium.connect("pressed",self,"set_game_size",["Medium"]), + $VBoxContainer/gamesize/Large.connect("pressed",self,"set_game_size",["Large"]), + $VBoxContainer/gamesize/TripleA.connect("pressed",self,"set_game_size",["AAA"]), + $VBoxContainer/engine.get_popup().connect("id_pressed",self,"popup_menu_change",[$VBoxContainer/engine]) ] - print_debug(connections) \ No newline at end of file + print_debug(connections) +#"The Meaning of life is to entertain Mister God"-Terry A Davis +#"Let us hear the conclusion of the whole matter: Fear God, and keep his commandments: for this is the whole duty of man." - Ecclesiastes 12:13 \ No newline at end of file diff --git a/Scripts/multiplayerlobby.gd b/Scripts/multiplayerlobby.gd new file mode 100644 index 0000000..7f91984 --- /dev/null +++ b/Scripts/multiplayerlobby.gd @@ -0,0 +1,32 @@ +extends Control + +## NETWORK +func con_suc():#Successful connection + $chatbox.text+=str(get_tree().network_peer.get_unique_id())+" has connected to the server.\n" + +func con_fail():#When a connection attempt fails. + $chatbox.text+="Failed to connect to the server.\n" + +func con_dis():#When the server disconnects. + $chatbox.text+="disconnected from the server.\n" + +func peer_con(id):#when a client connects. + $chatbox.text+=str(id)+" has connected to the server.\n" + +func peer_dis(id):#when a client disconnects. + $chatbox.text+=str(id)+" has disconnected from the server.\n" + +## CHAT + +## COMPANY NAME + +## MAIN +func _ready(): + var connections = [ + get_tree().network_peer.connect("connection_succeeded",self,"con_suc"), + get_tree().network_peer.connect("connection_failed",self,"con_fail"), + get_tree().network_peer.connect("server_disconnected",self,"con_dis"), + get_tree().network_peer.connect("peer_connected",self,"peer_con"), + get_tree().network_peer.connect("peer_disconnected",self,"peer_dis") + ] + print_debug(connections) \ No newline at end of file diff --git a/Scripts/reviews.gd b/Scripts/reviews.gd index 097d544..b526fb1 100644 --- a/Scripts/reviews.gd +++ b/Scripts/reviews.gd @@ -173,7 +173,6 @@ func calc_score():#calculation the scores genre_collab[devtime]+=genre_tally[genre][devtime] for devsection in genre_collab:#Now to actually Compare the phases to the (multi-)genre var compare = genre_collab[devsection]/data["genres"].size() - print_debug(abs(data[devsection]-compare)) if(abs(data[devsection]-compare)