mirror of
https://github.com/RPG-Research/bcirpg.git
synced 2024-04-16 14:23:01 +00:00
Added some changes to the CSV system for Add Character
This commit is contained in:
parent
1b55da71e9
commit
733195593d
@ -0,0 +1 @@
|
||||
source_md5="0300125e58b492e346b177ce259fd215"
|
@ -0,0 +1,3 @@
|
||||
source_md5="3b37741efaad37471d3be79926341120"
|
||||
dest_md5="6703f1e11659db139e8690f3df1a5a0d"
|
||||
|
@ -0,0 +1,9 @@
|
||||
Name,
|
||||
Profession,
|
||||
Strength,
|
||||
Intellegence,
|
||||
Willpower,
|
||||
Charm,
|
||||
Weapon,
|
||||
Armor,
|
||||
Quote,
|
|
@ -0,0 +1,13 @@
|
||||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://_userFiles/CharacterOutput.csv"
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
@ -0,0 +1,10 @@
|
||||
keys,en
|
||||
Name,Thickly Goes
|
||||
Profession,Brawler
|
||||
Strength,Excessive
|
||||
Intellect,Diminished
|
||||
Willpower,Variable
|
||||
Charm,Lacking
|
||||
Weapon,Meaty Fists
|
||||
Armor,Leather Jacket and Chaps
|
||||
A Quote,You talkin to me?!
|
|
@ -0,0 +1,16 @@
|
||||
[remap]
|
||||
|
||||
importer="csv_translation"
|
||||
type="Translation"
|
||||
|
||||
[deps]
|
||||
|
||||
files=[ "res://_userFiles/characterFiles/Template.en.translation" ]
|
||||
|
||||
source_file="res://_userFiles/characterFiles/Template.csv"
|
||||
dest_files=[ "res://_userFiles/characterFiles/Template.en.translation" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress=true
|
||||
delimiter=0
|
Binary file not shown.
@ -3,30 +3,50 @@
|
||||
# it into the character object
|
||||
extends Control
|
||||
|
||||
var originalPath = "res://_userFiles/Template.csv"
|
||||
var rows
|
||||
|
||||
onready var settings = get_node("/root/GlobalSaveInstance").settingsInstance
|
||||
|
||||
|
||||
onready var SaveButton = get_node("HBoxContainer/VBoxContainer/SaveButton")
|
||||
|
||||
onready var nameVar = get_node("HBoxContainer/VBoxContainer/LabelName/LineEditName")
|
||||
onready var profVar = get_node("HBoxContainer/VBoxContainer/LabelProf/LineEditProf")
|
||||
onready var profVar = get_node("HBoxContainer/VBoxContainer/LabelProfession/LineEditProf")
|
||||
onready var strengthVar = get_node("HBoxContainer/VBoxContainer/LabelStrength/LineEditStrength")
|
||||
onready var intelVar = get_node("HBoxContainer/VBoxContainer/LabelIntellect/LineEditIntel")
|
||||
onready var willpowerVar = get_node("HBoxContainer/VBoxContainer2/LabelWillpower/LineEditWill")
|
||||
onready var charmVar = get_node("HBoxContainer/VBoxContainer2/LabelCharm/LineEditCharm")
|
||||
onready var weaponVar = get_node("HBoxContainer/VBoxContainer2/LabelWeapon/LineEditWeapon")
|
||||
onready var armorVar = get_node("HBoxContainer/VBoxContainer2/LabelArmor/LineEditArmor")
|
||||
onready var quoteVar = get_node("HBoxContainer/VBoxContainer/LabelQuote/LineEditQuote")
|
||||
onready var quoteVar = get_node("HBoxContainer/VBoxContainer2/LabelQuote/LineEditQuote")
|
||||
|
||||
func writeToCSV(nameV, profV, strengthV, intelV, willpowerV, charmV, weaponV, armorV, quoteV):
|
||||
pass
|
||||
var f = File.new()
|
||||
f.open("res://_userFiles/CharacterOutput.csv", File.WRITE)
|
||||
var ArrayStrings = [PoolStringArray()]
|
||||
|
||||
f.store_csv_line(["Name", nameV])
|
||||
f.store_csv_line(["Profession", profV])
|
||||
f.store_csv_line(["Strength", strengthV])
|
||||
f.store_csv_line(["Intellegence", intelV])
|
||||
f.store_csv_line(["Willpower", willpowerV])
|
||||
f.store_csv_line(["Charm", charmV])
|
||||
f.store_csv_line(["Weapon", weaponV])
|
||||
f.store_csv_line(["Armor", armorV])
|
||||
f.store_csv_line(["Quote", quoteV])
|
||||
f.close()
|
||||
|
||||
|
||||
func _process(delta):
|
||||
if SaveButton.pressed == true:
|
||||
$Title/FileDialog.popup()
|
||||
|
||||
writeToCSV(nameVar.get_text(), profVar.get_text(),
|
||||
strengthVar.get_text(), intelVar.get_text(), willpowerVar.get_text(),
|
||||
charmVar.get_text(), weaponVar.get_text(), armorVar.get_text(), quoteVar.get_text())
|
||||
|
||||
func _ready() -> void:
|
||||
theme=load(settings.themeFile)
|
||||
$Title/But_SaveChar.grab_focus()
|
||||
|
||||
func _on_But_SaveChar_pressed() -> void:
|
||||
$Title/FileDialog.popup()
|
||||
|
||||
#DKM TEMP: just text for now from text edit
|
||||
func _on_FileDialog_file_selected(path: String) -> void:
|
||||
|
@ -63,12 +63,12 @@ margin_bottom = 388.0
|
||||
custom_constants/separation = 40
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_right = 81.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 358.0
|
||||
custom_constants/separation = 20
|
||||
|
||||
[node name="LabelName" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_right = 81.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 31.0
|
||||
text = "NAME
|
||||
"
|
||||
@ -79,8 +79,8 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelProfession" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 60.0
|
||||
margin_right = 81.0
|
||||
margin_top = 51.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 82.0
|
||||
text = "PROFESSION
|
||||
"
|
||||
@ -91,8 +91,8 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelStrength" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 120.0
|
||||
margin_right = 81.0
|
||||
margin_top = 102.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 133.0
|
||||
text = "STRENGTH
|
||||
"
|
||||
@ -103,8 +103,8 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelIntellect" type="Label" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 180.0
|
||||
margin_right = 81.0
|
||||
margin_top = 153.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 184.0
|
||||
text = "INTELLECT
|
||||
"
|
||||
@ -114,9 +114,15 @@ margin_top = 25.0
|
||||
margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="SaveButton" type="Button" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 204.0
|
||||
margin_right = 105.0
|
||||
margin_bottom = 224.0
|
||||
text = "Save Character"
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_left = 121.0
|
||||
margin_right = 200.0
|
||||
margin_left = 145.0
|
||||
margin_right = 224.0
|
||||
margin_bottom = 358.0
|
||||
custom_constants/separation = 30
|
||||
|
||||
@ -132,7 +138,7 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelCharm" type="Label" parent="HBoxContainer/VBoxContainer2"]
|
||||
margin_top = 60.0
|
||||
margin_top = 61.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 75.0
|
||||
text = "CHARM"
|
||||
@ -143,7 +149,7 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelWeapon" type="Label" parent="HBoxContainer/VBoxContainer2"]
|
||||
margin_top = 120.0
|
||||
margin_top = 105.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 136.0
|
||||
text = "WEAPON
|
||||
@ -155,7 +161,7 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelArmor" type="Label" parent="HBoxContainer/VBoxContainer2"]
|
||||
margin_top = 180.0
|
||||
margin_top = 166.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 180.0
|
||||
text = "ARMOR"
|
||||
@ -166,7 +172,7 @@ margin_right = 58.0
|
||||
margin_bottom = 24.0
|
||||
|
||||
[node name="LabelQuote" type="Label" parent="HBoxContainer/VBoxContainer2"]
|
||||
margin_top = 240.0
|
||||
margin_top = 210.0
|
||||
margin_right = 79.0
|
||||
margin_bottom = 224.0
|
||||
text = "QUOTE"
|
||||
|
Loading…
Reference in New Issue
Block a user