mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
Added DB Browser and a basic SQLite DB for the project
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
|
||||
dest_md5="2ded9e7f9060e2b530aab678b135fc5b"
|
||||
|
Binary file not shown.
BIN
Godot/MainMenu/GodotUserInterface_Luke/DataStore/database.db
Normal file
BIN
Godot/MainMenu/GodotUserInterface_Luke/DataStore/database.db
Normal file
Binary file not shown.
85
Godot/MainMenu/GodotUserInterface_Luke/GUI.tscn
Normal file
85
Godot/MainMenu/GodotUserInterface_Luke/GUI.tscn
Normal file
@ -0,0 +1,85 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Player_Settings_Button.gd" type="Script" id=1]
|
||||
[ext_resource path="res://HostAndJoinGame.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Start Game.gd" type="Script" id=3]
|
||||
|
||||
[node name="GUI" type="MarginContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = -0.418091
|
||||
margin_bottom = -0.418091
|
||||
custom_constants/margin_right = 120
|
||||
custom_constants/margin_top = 80
|
||||
custom_constants/margin_left = 120
|
||||
custom_constants/margin_bottom = 80
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_left = 120.0
|
||||
margin_top = 80.0
|
||||
margin_right = 904.0
|
||||
margin_bottom = 520.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_right = 112.0
|
||||
margin_bottom = 440.0
|
||||
|
||||
[node name="MenuOptions" type="VBoxContainer" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_right = 112.0
|
||||
margin_bottom = 440.0
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 30
|
||||
alignment = 1
|
||||
|
||||
[node name="Start Game" type="Label" parent="HBoxContainer/VBoxContainer/MenuOptions"]
|
||||
margin_top = 147.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 161.0
|
||||
mouse_filter = 1
|
||||
text = "Start Game"
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Load Game" type="Label" parent="HBoxContainer/VBoxContainer/MenuOptions"]
|
||||
margin_top = 191.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 205.0
|
||||
mouse_filter = 1
|
||||
text = "Load Game"
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="HostAndJoinGame" type="Label" parent="HBoxContainer/VBoxContainer/MenuOptions"]
|
||||
margin_top = 235.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 249.0
|
||||
mouse_filter = 1
|
||||
text = "Host / Join Game"
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Player Settings" type="Label" parent="HBoxContainer/VBoxContainer/MenuOptions"]
|
||||
margin_top = 279.0
|
||||
margin_right = 112.0
|
||||
margin_bottom = 293.0
|
||||
mouse_filter = 1
|
||||
text = "Player Settings"
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="HBoxContainer"]
|
||||
margin_left = 116.0
|
||||
margin_right = 784.0
|
||||
margin_bottom = 440.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Label" type="Label" parent="HBoxContainer/CenterContainer"]
|
||||
margin_left = 300.0
|
||||
margin_top = 213.0
|
||||
margin_right = 367.0
|
||||
margin_bottom = 227.0
|
||||
text = "Test Menu"
|
||||
[connection signal="gui_input" from="HBoxContainer/VBoxContainer/MenuOptions/Start Game" to="HBoxContainer/VBoxContainer/MenuOptions/Start Game" method="_on_Start_Game_gui_input"]
|
||||
[connection signal="gui_input" from="HBoxContainer/VBoxContainer/MenuOptions/Load Game" to="HBoxContainer/VBoxContainer/MenuOptions/Load Game" method="_on_Start_Game_gui_input"]
|
||||
[connection signal="gui_input" from="HBoxContainer/VBoxContainer/MenuOptions/HostAndJoinGame" to="HBoxContainer/VBoxContainer/MenuOptions/HostAndJoinGame" method="_on_HostAndJoinGame_gui_input"]
|
||||
[connection signal="gui_input" from="HBoxContainer/VBoxContainer/MenuOptions/Player Settings" to="HBoxContainer/VBoxContainer/MenuOptions/Player Settings" method="_on_Player_Settings_gui_input"]
|
21
Godot/MainMenu/GodotUserInterface_Luke/HostAndJoinGame.gd
Normal file
21
Godot/MainMenu/GodotUserInterface_Luke/HostAndJoinGame.gd
Normal file
@ -0,0 +1,21 @@
|
||||
extends Label
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
|
||||
|
||||
func _on_HostAndJoinGame_gui_input(event):
|
||||
if (event is InputEventMouseButton && event.pressed && event.button_index == 1):
|
||||
print("Clicked Host and Join Game")
|
16
Godot/MainMenu/GodotUserInterface_Luke/MainSystem.gd
Normal file
16
Godot/MainMenu/GodotUserInterface_Luke/MainSystem.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends MarginContainer
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
@ -0,0 +1,24 @@
|
||||
extends Label
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
func _unhandled_input(event):
|
||||
if event is InputEventKey:
|
||||
if event.pressed and event.scancode == KEY_ESCAPE:
|
||||
get_tree().quit()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
|
||||
|
||||
func _on_Player_Settings_gui_input(event):
|
||||
if (event is InputEventMouseButton && event.pressed && event.button_index == 1):
|
||||
print("Clicked Player Settings")
|
@ -0,0 +1,21 @@
|
||||
extends Resource
|
||||
|
||||
# Authors Luke Gebbink
|
||||
# Last Changed 10/03/2021
|
||||
# found
|
||||
#
|
||||
|
||||
class_name SaveGame
|
||||
|
||||
export var game_version : String = ''
|
||||
export var data : Dictionary = {}
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
@ -0,0 +1,36 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
var time_start = 0
|
||||
var time_now = 0
|
||||
|
||||
class_name WorldObject
|
||||
var Players: String = ''
|
||||
var Scene: Scene
|
||||
var History: = Array()
|
||||
var decisions:
|
||||
var totalTime:
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
time_start = OS.get_unix_time()
|
||||
set_process(true)
|
||||
|
||||
# Should we tie time to the save files or the application?
|
||||
# I would think the save files.
|
||||
|
||||
func _process(delta):
|
||||
time_now = OS.get_unix_time()
|
||||
var elapsed = time_now - time_start
|
||||
var minutes = elapsed / 60
|
||||
var seconds = elapsed % 60
|
||||
var str_elapsed = "%02d : %02d" % [minutes, seconds]
|
||||
print("elapsed : ", str_elapsed)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
@ -0,0 +1,43 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
const SaveGame = preload('res://SaveSystem/GameSave.gd')
|
||||
|
||||
var SAVE_FOLDER : String = "res://SaveSystem/SaveLocations"
|
||||
var SAVE_NAME_TEMPLATE : String = "save_%03D.tres"
|
||||
|
||||
func save(id : int):
|
||||
"""
|
||||
Passes a save game resource to all nodes to save data from and writes it to the disk
|
||||
Modfied from GDQuest's Godot Lesson Found Here: https://www.youtube.com/watch?v=ML-hiNytIqE
|
||||
"""
|
||||
var save_game := SaveGame.new()
|
||||
save_game.game_version = ProjectSettings.get_setting("application/config/version")
|
||||
for node in get_tree().get_nodes_in_group('save'):
|
||||
node.save(save_game)
|
||||
|
||||
var directory : Directory = Directory.new()
|
||||
if not directory.dir.exists(SAVE_FOLDER):
|
||||
directory.make_dir_recursive(SAVE_FOLDER)
|
||||
|
||||
var save_path = SAVE_FOLDER.plus_file(SAVE_NAME_TEMPLATE % id)
|
||||
var error : int = ResourceSaver.save(save_path, save_game)
|
||||
if error != OK:
|
||||
print('There was an issue writing the save %s to %s' % [id, save_path])
|
||||
|
||||
func load(id : int):
|
||||
var save_file_path : String = SAVE_FOLDER.plus_file(SAVE_NAME_TEMPLATE % id)
|
||||
var file : File = File.new()
|
||||
if not file.file_exists(save_file_path):
|
||||
print("Save file %s doesn't exist" % save_file_path)
|
||||
return
|
||||
|
||||
var save_game : Resource = load(save_file_path)
|
||||
for node in get_tree().get_nodes_in_group('save'):
|
||||
node.load(save_game)
|
||||
|
||||
|
17
Godot/MainMenu/GodotUserInterface_Luke/Start Game.gd
Normal file
17
Godot/MainMenu/GodotUserInterface_Luke/Start Game.gd
Normal file
@ -0,0 +1,17 @@
|
||||
extends Label
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
var option = 0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
func _on_Start_Game_gui_input(event):
|
||||
if (event is InputEventMouseButton && event.pressed && event.button_index == 1):
|
||||
print("Clicked Start Game")
|
||||
get_tree().change_scene("res://TestNode2D.tscn")
|
||||
# Start Game button opens a new node for that purpose
|
||||
|
23
Godot/MainMenu/GodotUserInterface_Luke/TestNode2D.gd
Normal file
23
Godot/MainMenu/GodotUserInterface_Luke/TestNode2D.gd
Normal file
@ -0,0 +1,23 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
var isPaused = false
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
# Make this function return a boolean.
|
||||
func _isPaused():
|
||||
if isPaused == true:
|
||||
print("Unpaused")
|
||||
if isPaused == false:
|
||||
print("Paused")
|
||||
return isPaused
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
14
Godot/MainMenu/GodotUserInterface_Luke/TestNode2D.tscn
Normal file
14
Godot/MainMenu/GodotUserInterface_Luke/TestNode2D.tscn
Normal file
@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://TestNode2D.gd" type="Script" id=1]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 14.0
|
||||
text = "Game Started Node"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
32
Godot/MainMenu/GodotUserInterface_Luke/bin/gdsqlite.gdnlib
Normal file
32
Godot/MainMenu/GodotUserInterface_Luke/bin/gdsqlite.gdnlib
Normal file
@ -0,0 +1,32 @@
|
||||
[general]
|
||||
|
||||
singleton=false
|
||||
load_once=true
|
||||
symbol_prefix="godot_"
|
||||
reloadable=false
|
||||
|
||||
[entry]
|
||||
|
||||
Android.armeabi-v7a="res://addons/godot-sqlite/bin/android/armeabi-v7a/libgdsqlite.so"
|
||||
Android.arm64-v8a="res://addons/godot-sqlite/bin/android/arm64-v8a/libgdsqlite.so"
|
||||
Android.x86="res://addons/godot-sqlite/bin/android/x86/libgdsqlite.so"
|
||||
HTML5.wasm32="res://addons/godot-sqlite/bin/javascript/libgdsqlite.wasm"
|
||||
OSX.64="res://addons/godot-sqlite/bin/osx/libgdsqlite.dylib"
|
||||
Windows.64="res://addons/godot-sqlite/bin/win64/libgdsqlite.dll"
|
||||
X11.64="res://addons/godot-sqlite/bin/x11/libgdsqlite.so"
|
||||
iOS.armv7="res://addons/godot-sqlite/bin/ios/armv7/libgdsqlite.a"
|
||||
iOS.arm64="res://addons/godot-sqlite/bin/ios/arm64/libgdsqlite.a"
|
||||
Server="res://addons/godot-sqlite/bin/x11/libgdsqlite.so"
|
||||
|
||||
[dependencies]
|
||||
|
||||
Android.armeabi-v7a=[ ]
|
||||
Android.arm64-v8a=[ ]
|
||||
Android.x86=[ ]
|
||||
HTML5.wasm32=[ ]
|
||||
OSX.64=[ ]
|
||||
Windows.64=[ ]
|
||||
X11.64=[ ]
|
||||
iOS.armv7=[ ]
|
||||
iOS.arm64=[ ]
|
||||
Server=[ ]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Godot/MainMenu/GodotUserInterface_Luke/bin/osx/libgdsqlite.dylib
Normal file
BIN
Godot/MainMenu/GodotUserInterface_Luke/bin/osx/libgdsqlite.dylib
Normal file
Binary file not shown.
BIN
Godot/MainMenu/GodotUserInterface_Luke/bin/win64/libgdsqlite.dll
Normal file
BIN
Godot/MainMenu/GodotUserInterface_Luke/bin/win64/libgdsqlite.dll
Normal file
Binary file not shown.
BIN
Godot/MainMenu/GodotUserInterface_Luke/bin/x11/libgdsqlite.so
Normal file
BIN
Godot/MainMenu/GodotUserInterface_Luke/bin/x11/libgdsqlite.so
Normal file
Binary file not shown.
7
Godot/MainMenu/GodotUserInterface_Luke/default_env.tres
Normal file
7
Godot/MainMenu/GodotUserInterface_Luke/default_env.tres
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_resource type="Environment" load_steps=2 format=2]
|
||||
|
||||
[sub_resource type="ProceduralSky" id=1]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
background_sky = SubResource( 1 )
|
8
Godot/MainMenu/GodotUserInterface_Luke/gdsqlite.gdns
Normal file
8
Godot/MainMenu/GodotUserInterface_Luke/gdsqlite.gdns
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/godot-sqlite/bin/gdsqlite.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "gdsqlite"
|
||||
class_name = "SQLite"
|
||||
library = ExtResource( 1 )
|
BIN
Godot/MainMenu/GodotUserInterface_Luke/icon.png
Normal file
BIN
Godot/MainMenu/GodotUserInterface_Luke/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
34
Godot/MainMenu/GodotUserInterface_Luke/icon.png.import
Normal file
34
Godot/MainMenu/GodotUserInterface_Luke/icon.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
47
Godot/MainMenu/GodotUserInterface_Luke/project.godot
Normal file
47
Godot/MainMenu/GodotUserInterface_Luke/project.godot
Normal file
@ -0,0 +1,47 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
_global_script_classes=[ {
|
||||
"base": "Resource",
|
||||
"class": "SaveGame",
|
||||
"language": "GDScript",
|
||||
"path": "res://SaveSystem/GameSave.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"class": "WorldObject",
|
||||
"language": "GDScript",
|
||||
"path": "res://SaveSystem/SceneObject.gd"
|
||||
} ]
|
||||
_global_script_class_icons={
|
||||
"SaveGame": "",
|
||||
"WorldObject": ""
|
||||
}
|
||||
|
||||
[application]
|
||||
|
||||
config/name="Godot Ui"
|
||||
run/main_scene="res://GUI.tscn"
|
||||
config/icon="res://icon.png"
|
||||
config/Version="0.001"
|
||||
|
||||
[config]
|
||||
|
||||
description=""
|
||||
|
||||
[global]
|
||||
|
||||
description=""
|
||||
|
||||
[rendering]
|
||||
|
||||
quality/driver/driver_name="GLES2"
|
||||
vram_compression/import_etc=true
|
||||
vram_compression/import_etc2=false
|
||||
environment/default_environment="res://default_env.tres"
|
Reference in New Issue
Block a user