7
0
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:
Luke Gebbink
2021-10-24 12:17:33 -06:00
parent 1aba624c6c
commit a3cc132b4c
168 changed files with 1178 additions and 0 deletions
DBBrowser/DB Browser for SQLite
DB Browser for SQLCipher.exeDB Browser for SQLite.exeQt5Concurrent.dllQt5Core.dllQt5Gui.dllQt5Network.dllQt5PrintSupport.dllQt5Widgets.dllQt5Xml.dllapi-ms-win-core-console-l1-1-0.dllapi-ms-win-core-datetime-l1-1-0.dllapi-ms-win-core-debug-l1-1-0.dllapi-ms-win-core-errorhandling-l1-1-0.dllapi-ms-win-core-file-l1-1-0.dllapi-ms-win-core-file-l1-2-0.dllapi-ms-win-core-file-l2-1-0.dllapi-ms-win-core-handle-l1-1-0.dllapi-ms-win-core-heap-l1-1-0.dllapi-ms-win-core-interlocked-l1-1-0.dllapi-ms-win-core-libraryloader-l1-1-0.dllapi-ms-win-core-localization-l1-2-0.dllapi-ms-win-core-memory-l1-1-0.dllapi-ms-win-core-namedpipe-l1-1-0.dllapi-ms-win-core-processenvironment-l1-1-0.dllapi-ms-win-core-processthreads-l1-1-0.dllapi-ms-win-core-processthreads-l1-1-1.dllapi-ms-win-core-profile-l1-1-0.dllapi-ms-win-core-rtlsupport-l1-1-0.dllapi-ms-win-core-string-l1-1-0.dllapi-ms-win-core-synch-l1-1-0.dllapi-ms-win-core-synch-l1-2-0.dllapi-ms-win-core-sysinfo-l1-1-0.dllapi-ms-win-core-timezone-l1-1-0.dllapi-ms-win-core-util-l1-1-0.dllapi-ms-win-crt-conio-l1-1-0.dllapi-ms-win-crt-convert-l1-1-0.dllapi-ms-win-crt-environment-l1-1-0.dllapi-ms-win-crt-filesystem-l1-1-0.dllapi-ms-win-crt-heap-l1-1-0.dllapi-ms-win-crt-locale-l1-1-0.dllapi-ms-win-crt-math-l1-1-0.dllapi-ms-win-crt-multibyte-l1-1-0.dllapi-ms-win-crt-private-l1-1-0.dllapi-ms-win-crt-process-l1-1-0.dllapi-ms-win-crt-runtime-l1-1-0.dllapi-ms-win-crt-stdio-l1-1-0.dllapi-ms-win-crt-string-l1-1-0.dllapi-ms-win-crt-time-l1-1-0.dllapi-ms-win-crt-utility-l1-1-0.dll
bearer
concrt140.dll
extensions
imageformats
libcrypto-1_1-x64.dlllibssl-1_1-x64.dll
licenses
msvcp140.dllmsvcp140_1.dllmsvcp140_2.dll
platforms
printsupport
sqlcipher.dllsqlite3.dll
styles
translations
ucrtbase.dllvccorlib140.dllvcruntime140.dll
Godot/MainMenu/GodotUserInterface_Luke

@ -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)