mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
Added some things related to Database management.
This commit is contained in:
parent
fcbd8c1917
commit
11ff47a5cc
File diff suppressed because one or more lines are too long
BIN
Phase2/Godot_Toolset/Luke/DataStorage/database.db
Normal file
BIN
Phase2/Godot_Toolset/Luke/DataStorage/database.db
Normal file
Binary file not shown.
11
Phase2/Godot_Toolset/Luke/DialogObject.gd
Normal file
11
Phase2/Godot_Toolset/Luke/DialogObject.gd
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
class_name DialogObject
|
||||||
|
|
||||||
|
var ConvoPrimaryKey: int
|
||||||
|
var BranchID: int
|
||||||
|
var LayerID: int
|
||||||
|
var ConvoItemText: String
|
||||||
|
|
||||||
|
func _ready():
|
||||||
|
pass
|
25
Phase2/Godot_Toolset/Luke/MainSystem.gd
Normal file
25
Phase2/Godot_Toolset/Luke/MainSystem.gd
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
extends Node
|
||||||
|
|
||||||
|
const SQLite = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns")
|
||||||
|
var db # Database object
|
||||||
|
var db_name = "res://DataStorage/database"
|
||||||
|
|
||||||
|
func CommitDataToDB():
|
||||||
|
db = SQLite.new()
|
||||||
|
db.path = db_name
|
||||||
|
db.open_db()
|
||||||
|
var tableName = "DialogStorage"
|
||||||
|
var dict : Dictionary = Dictionary()
|
||||||
|
dict["ConvoID"] = 1
|
||||||
|
dict["LayerID"] = 1
|
||||||
|
dict["BranchID"] = 1
|
||||||
|
dict["Text"] = "The best riff from Freebird plays at 202 dB."
|
||||||
|
|
||||||
|
db.insert_row(tableName.dict)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
CommitDataToDB()
|
||||||
|
|
6
Phase2/Godot_Toolset/Luke/Scenes/DialogEditor.tscn
Normal file
6
Phase2/Godot_Toolset/Luke/Scenes/DialogEditor.tscn
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://MainSystem.gd" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D"]
|
||||||
|
script = ExtResource( 1 )
|
21
Phase2/Godot_Toolset/Luke/addons/godot-sqlite/LICENSE.md
Normal file
21
Phase2/Godot_Toolset/Luke/addons/godot-sqlite/LICENSE.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019-2022 Piet Bronders & Jeroen De Geeter
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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=[ "res://addons/godot-sqlite/bin/ios/armv7/libgodot-cpp.ios.release.armv7.a" ]
|
||||||
|
iOS.arm64=[ "res://addons/godot-sqlite/bin/ios/arm64/libgodot-cpp.ios.release.arm64.a" ]
|
||||||
|
Server=[ ]
|
@ -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 )
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,14 @@
|
|||||||
|
# ############################################################################ #
|
||||||
|
# Copyright © 2019-2022 Piet Bronders & Jeroen De Geeter <piet.bronders@gmail.com>
|
||||||
|
# Licensed under the MIT License.
|
||||||
|
# See LICENSE in the project root for license information.
|
||||||
|
# ############################################################################ #
|
||||||
|
|
||||||
|
tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
func _enter_tree():
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _exit_tree():
|
||||||
|
pass
|
7
Phase2/Godot_Toolset/Luke/addons/godot-sqlite/plugin.cfg
Normal file
7
Phase2/Godot_Toolset/Luke/addons/godot-sqlite/plugin.cfg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="Godot SQLite"
|
||||||
|
description="GDNative wrapper for SQLite (Godot 3.2+), making it possible to use SQLite databases as data storage in all your future games."
|
||||||
|
author="Piet Bronders & Jeroen De Geeter"
|
||||||
|
version="3.3"
|
||||||
|
script="godot-sqlite.gd"
|
@ -15,6 +15,11 @@ _global_script_classes=[ {
|
|||||||
"path": "res://addons/dialogic/Localization/translation_service.gd"
|
"path": "res://addons/dialogic/Localization/translation_service.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "Node",
|
"base": "Node",
|
||||||
|
"class": "DialogObject",
|
||||||
|
"language": "GDScript",
|
||||||
|
"path": "res://DialogObject.gd"
|
||||||
|
}, {
|
||||||
|
"base": "Node",
|
||||||
"class": "Dialogic",
|
"class": "Dialogic",
|
||||||
"language": "GDScript",
|
"language": "GDScript",
|
||||||
"path": "res://addons/dialogic/Other/DialogicClass.gd"
|
"path": "res://addons/dialogic/Other/DialogicClass.gd"
|
||||||
@ -66,6 +71,7 @@ _global_script_classes=[ {
|
|||||||
} ]
|
} ]
|
||||||
_global_script_class_icons={
|
_global_script_class_icons={
|
||||||
"DTS": "",
|
"DTS": "",
|
||||||
|
"DialogObject": "",
|
||||||
"Dialogic": "",
|
"Dialogic": "",
|
||||||
"DialogicAnimaPropertiesHelper": "",
|
"DialogicAnimaPropertiesHelper": "",
|
||||||
"DialogicAnimaResources": "",
|
"DialogicAnimaResources": "",
|
||||||
|
Loading…
Reference in New Issue
Block a user