first commit, long overdue
deez
This commit is contained in:
commit
54b9012a47
79 changed files with 2516 additions and 0 deletions
5
01 - Menus/04 - Modules/modules_.gd
Normal file
5
01 - Menus/04 - Modules/modules_.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
extends Control
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. characters
|
||||
var module # e.g. trait
|
||||
1
01 - Menus/04 - Modules/modules_.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cj7dq6bxffndm
|
||||
12
01 - Menus/04 - Modules/modules_.tscn
Normal file
12
01 - Menus/04 - Modules/modules_.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bf5jf67m66141"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cj7dq6bxffndm" path="res://01 - Menus/04 - Modules/modules_.gd" id="1_xh6yg"]
|
||||
|
||||
[node name="modules_" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_xh6yg")
|
||||
5
01 - Menus/04 - Modules/modules_character.gd
Normal file
5
01 - Menus/04 - Modules/modules_character.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
extends Control
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. characters
|
||||
var module # e.g. trait
|
||||
1
01 - Menus/04 - Modules/modules_character.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_character.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b0g20c0f26vke
|
||||
8
01 - Menus/04 - Modules/modules_character.tscn
Normal file
8
01 - Menus/04 - Modules/modules_character.tscn
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://ifmshoyijckd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b0g20c0f26vke" path="res://01 - Menus/04 - Modules/modules_character.gd" id="1_ooaol"]
|
||||
|
||||
[node name="character" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_ooaol")
|
||||
171
01 - Menus/04 - Modules/modules_list.gd
Normal file
171
01 - Menus/04 - Modules/modules_list.gd
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
extends Control
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. characters
|
||||
var module # e.g. trait
|
||||
var items = [] # e.g. ["Undergrounder","Tough"]
|
||||
|
||||
var ini
|
||||
|
||||
var config
|
||||
var item_filter = ""
|
||||
var suggestions
|
||||
var suggestion = ""
|
||||
var overview
|
||||
var rec_helper = []
|
||||
var selected = ""
|
||||
var items_list:Array = []
|
||||
|
||||
func _enter_tree() -> void:
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/campaign/categories.ini")
|
||||
rec_helper = config.get_value(category,"modules_list",[])
|
||||
items = []
|
||||
#print(str(category))
|
||||
#print(str(module))
|
||||
#print(str(items))
|
||||
custom_minimum_size.y = 512
|
||||
%filter.placeholder_text = "Filter " + module
|
||||
%new_item.text = "Add " + module
|
||||
%new_item_name.visible = false
|
||||
%suggestions_background.visible = false
|
||||
%new_item_suggestions.visible = false
|
||||
ini = "res://02 - Configurations/" + category + ".ini"
|
||||
list_items()
|
||||
|
||||
func list_items():
|
||||
config = ConfigFile.new()
|
||||
config.load(ini)
|
||||
print("modules_list:list_items:1 " + category)
|
||||
items = []
|
||||
%list.item_count = 0
|
||||
for i in rec_helper:
|
||||
print("")
|
||||
rec(i,category,item)
|
||||
#print(str(%list.item_count))
|
||||
pass
|
||||
|
||||
|
||||
func rec(i,conf,k):
|
||||
var conff = "res://02 - Configurations/" + conf + ".ini"
|
||||
config = ConfigFile.new()
|
||||
config.load(conff)
|
||||
print("modules_list:rec:1 conff = " + conff)
|
||||
print("modules_list:rec:2 sections = " + str(config.get_section_keys(k)))
|
||||
print("modules_list:rec:3 k = " + str(k))
|
||||
print("modules_list:rec:4 i = " + str(i))
|
||||
if config.get_section_keys(k).has(i):
|
||||
var m = config.get_value(k,i)
|
||||
print("modules_list:rec:5 " + (k) + " has " + str(m) + " as " + str(i))
|
||||
if module == i:
|
||||
print("modules_list:rec:6 " + str(items))
|
||||
for b in config.get_value(k,i,[]):
|
||||
print("modules_list:rec:10 " + str(b) + str(items))
|
||||
if not items.has(b) and b != "":
|
||||
items = items + [b]
|
||||
print("modules_list:rec:11 adding " + b + " to list")
|
||||
if item_filter == "":
|
||||
%list.add_item(str(b))
|
||||
%list.set_item_tooltip(%list.item_count - 1, k)
|
||||
if conf != category:
|
||||
%list.set_item_custom_bg_color(%list.item_count - 1,"black")
|
||||
elif item_filter.to_lower() in b.to_lower():
|
||||
%list.add_item(str(b))
|
||||
else:
|
||||
%list.item_count = %list.item_count -1
|
||||
print("modules_list:rec:12 " + i + " " + str(category))
|
||||
if i != category:
|
||||
print("modules_list:rec:7 " + str(rec_helper.slice(rec_helper.find(i),-1)))
|
||||
print("modules_list:rec:8 " + str(m))
|
||||
for o in rec_helper.slice(rec_helper.find(i),rec_helper.size()):
|
||||
print(str(o))
|
||||
for j in m:
|
||||
print("modules_list:rec:9 rec " + o + " - " + i + " - " + j)
|
||||
rec(o,i,j)
|
||||
|
||||
func _on_filter_text_changed(new_text: String) -> void:
|
||||
item_filter = new_text
|
||||
list_items()
|
||||
|
||||
func _on_new_item_button_up() -> void:
|
||||
%new_item_name.visible = true
|
||||
%suggestions_background.visible = true
|
||||
%new_item_suggestions.visible = true
|
||||
%new_item_name.grab_focus()
|
||||
list_suggestions()
|
||||
|
||||
|
||||
func _on_new_item_name_editing_toggled(toggled_on: bool) -> void:
|
||||
if !toggled_on:
|
||||
%new_item_name.text = ""
|
||||
%new_item_name.visible = false
|
||||
%suggestions_background.visible = false
|
||||
await get_tree().create_timer(0.001).timeout
|
||||
%new_item_suggestions.visible = false
|
||||
|
||||
|
||||
func list_suggestions():
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/" + module + ".ini")
|
||||
var i = 0
|
||||
suggestions = config.get_sections()
|
||||
#print(str(suggestions))
|
||||
%new_item_suggestions.item_count = suggestions.size()
|
||||
#print(str(%new_item_suggestions.item_count))
|
||||
for j in suggestions:
|
||||
if suggestion == "":
|
||||
%new_item_suggestions.set_item_text(i,str(j))
|
||||
i = i+1
|
||||
elif suggestion.to_lower() in j.to_lower():
|
||||
%new_item_suggestions.set_item_text(i,str(j))
|
||||
i = i+1
|
||||
#print(j)
|
||||
else:
|
||||
%new_item_suggestions.item_count = %new_item_suggestions.item_count -1
|
||||
#print(str(%list.item_count))
|
||||
pass
|
||||
|
||||
func _on_new_item_name_text_changed(new_text: String) -> void:
|
||||
suggestion = new_text
|
||||
list_suggestions()
|
||||
|
||||
|
||||
func _on_new_item_suggestions_item_selected(index: int) -> void:
|
||||
config = ConfigFile.new()
|
||||
config.load(ini)
|
||||
if not items.has(%new_item_suggestions.get_item_text(index)):
|
||||
print(str(items))
|
||||
var i = config.get_value(item,module,[]) + [%new_item_suggestions.get_item_text(index)]
|
||||
print(str(i))
|
||||
config.set_value(item,module,i)
|
||||
config.save(ini)
|
||||
list_items()
|
||||
|
||||
|
||||
func _on_list_item_selected(index: int) -> void:
|
||||
if overview:
|
||||
remove_child(overview)
|
||||
print(module)
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/campaign/categories.ini")
|
||||
var submodule = config.get_value(module,"module","")
|
||||
overview = load("res://01 - Menus/04 - Modules/modules_" + submodule + ".tscn").instantiate()
|
||||
overview.position.x = 448
|
||||
overview.scale.x = 0.8
|
||||
overview.scale.y = 0.8
|
||||
overview.category = module
|
||||
overview.item = %list.get_item_text(index)
|
||||
overview.mouse_filter = 2
|
||||
selected = %list.get_item_text(index)
|
||||
add_child(overview)
|
||||
|
||||
|
||||
func _on_delete_button_up() -> void:
|
||||
config = ConfigFile.new()
|
||||
config.load(ini)
|
||||
print(str(items))
|
||||
var j = config.get_value(category,item,[])
|
||||
j.remove_at(config.get_value(category,item,[]).find(selected))
|
||||
config.set_value(item,module,j)
|
||||
config.save(ini)
|
||||
list_items()
|
||||
1
01 - Menus/04 - Modules/modules_list.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_list.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bswsmlukpn7x4
|
||||
88
01 - Menus/04 - Modules/modules_list.tscn
Normal file
88
01 - Menus/04 - Modules/modules_list.tscn
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://uo4yu1gwxcec"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bswsmlukpn7x4" path="res://01 - Menus/04 - Modules/modules_list.gd" id="1_15vp0"]
|
||||
|
||||
[node name="list" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_15vp0")
|
||||
|
||||
[node name="background" type="ColorRect" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_right = 448.0
|
||||
offset_bottom = 1024.0
|
||||
color = Color(0.047058824, 0.07058824, 0.09803922, 1)
|
||||
|
||||
[node name="suggestions_background" type="ColorRect" parent="."]
|
||||
unique_name_in_owner = true
|
||||
z_index = 1
|
||||
layout_mode = 0
|
||||
offset_left = -64.0
|
||||
offset_top = 192.0
|
||||
offset_right = 512.0
|
||||
offset_bottom = 872.0
|
||||
color = Color(0.047058824, 0.07058824, 0.09803922, 1)
|
||||
|
||||
[node name="list" type="ItemList" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_left = 32.0
|
||||
offset_top = 32.0
|
||||
offset_right = 416.0
|
||||
offset_bottom = 672.0
|
||||
|
||||
[node name="filter" type="LineEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 896.0
|
||||
offset_right = 384.0
|
||||
offset_bottom = 960.0
|
||||
placeholder_text = "Filter item"
|
||||
|
||||
[node name="new_item" type="Button" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 800.0
|
||||
offset_right = 384.0
|
||||
offset_bottom = 864.0
|
||||
text = "Add item"
|
||||
|
||||
[node name="new_item_name" type="LineEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
z_index = 1
|
||||
layout_mode = 0
|
||||
offset_top = 208.0
|
||||
offset_right = 448.0
|
||||
offset_bottom = 272.0
|
||||
placeholder_text = "Set Item Name"
|
||||
|
||||
[node name="new_item_suggestions" type="ItemList" parent="."]
|
||||
unique_name_in_owner = true
|
||||
z_index = 1
|
||||
layout_mode = 0
|
||||
offset_left = -48.0
|
||||
offset_top = 272.0
|
||||
offset_right = 496.0
|
||||
offset_bottom = 856.0
|
||||
allow_reselect = true
|
||||
|
||||
[node name="delete" type="Button" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 704.0
|
||||
offset_right = 384.0
|
||||
offset_bottom = 768.0
|
||||
text = "Delete"
|
||||
|
||||
[connection signal="item_selected" from="list" to="." method="_on_list_item_selected"]
|
||||
[connection signal="text_changed" from="filter" to="." method="_on_filter_text_changed"]
|
||||
[connection signal="button_up" from="new_item" to="." method="_on_new_item_button_up"]
|
||||
[connection signal="editing_toggled" from="new_item_name" to="." method="_on_new_item_name_editing_toggled"]
|
||||
[connection signal="text_changed" from="new_item_name" to="." method="_on_new_item_name_text_changed"]
|
||||
[connection signal="item_selected" from="new_item_suggestions" to="." method="_on_new_item_suggestions_item_selected"]
|
||||
[connection signal="button_up" from="delete" to="." method="_on_delete_button_up"]
|
||||
6
01 - Menus/04 - Modules/modules_location.gd
Normal file
6
01 - Menus/04 - Modules/modules_location.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Control
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. characters
|
||||
var module # e.g. trait
|
||||
var items = [] # e.g. ["Undergrounder","Tough"]
|
||||
1
01 - Menus/04 - Modules/modules_location.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_location.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c50oko0aci1t8
|
||||
12
01 - Menus/04 - Modules/modules_location.tscn
Normal file
12
01 - Menus/04 - Modules/modules_location.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cynrv7v87br4g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c50oko0aci1t8" path="res://01 - Menus/04 - Modules/modules_location.gd" id="1_08287"]
|
||||
|
||||
[node name="modules_location" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_08287")
|
||||
7
01 - Menus/04 - Modules/modules_modifier.gd
Normal file
7
01 - Menus/04 - Modules/modules_modifier.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Control
|
||||
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. character
|
||||
var module # e.g. trait
|
||||
var items # e.g. ["Undergrounder","Tough"]
|
||||
1
01 - Menus/04 - Modules/modules_modifier.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_modifier.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bsni2icpr5xpg
|
||||
12
01 - Menus/04 - Modules/modules_modifier.tscn
Normal file
12
01 - Menus/04 - Modules/modules_modifier.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://beaslpqen8eqr"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bsni2icpr5xpg" path="res://01 - Menus/04 - Modules/modifier.gd" id="1_7leb1"]
|
||||
|
||||
[node name="modifier" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_7leb1")
|
||||
123
01 - Menus/04 - Modules/modules_skill.gd
Normal file
123
01 - Menus/04 - Modules/modules_skill.gd
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
extends Control
|
||||
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. character
|
||||
var module # e.g. trait
|
||||
var items # e.g. ["Undergrounder","Tough"]
|
||||
|
||||
var cost:Array = [0,0,0,0]
|
||||
var difficulty:int = 0
|
||||
var action:String = ""
|
||||
var success:String = ""
|
||||
var failure:String = ""
|
||||
var duration:int = 0
|
||||
var ends_on:int = 0
|
||||
var target:Array = []
|
||||
var stat:Array = []
|
||||
var challenge:String = ""
|
||||
|
||||
var config = ConfigFile.new()
|
||||
var item_filter = ""
|
||||
var targets1 = ""
|
||||
|
||||
func _enter_tree() -> void:
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/" + category + ".ini")
|
||||
#print(str(config.get_value(item,"cost")))
|
||||
cost = config.get_value(item,"cost",[0,0,0,0])
|
||||
difficulty = config.get_value(item,"difficulty",0)
|
||||
action = config.get_value(item,"action","")
|
||||
success = config.get_value(item,"success","")
|
||||
failure = config.get_value(item,"failure","")
|
||||
duration = config.get_value(item,"duration",0)
|
||||
ends_on = config.get_value(item,"ends_on",0)
|
||||
target = config.get_value(item,"target",[""])
|
||||
stat = config.get_value(item,"stat",[""])
|
||||
var j = 0
|
||||
for i in %cost.get_children():
|
||||
i.text = str(cost[j])
|
||||
j = j + 1
|
||||
%difficulty.text = str(difficulty)
|
||||
%action.text = action
|
||||
%success.text = success
|
||||
%failure.text = failure
|
||||
%duration.text = str(duration)
|
||||
%ends_on.select(ends_on)
|
||||
%target.item_count = 0
|
||||
for i in target:
|
||||
%target.add_item(i)
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/stat.ini")
|
||||
for i in stat:
|
||||
%stat.add_item(i)
|
||||
|
||||
func _on_body_text_changed(new_text: String) -> void:
|
||||
cost[0] = int(new_text)
|
||||
print(str(cost))
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_communication_text_changed(new_text: String) -> void:
|
||||
cost[1] = int(new_text)
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_mind_text_changed(new_text: String) -> void:
|
||||
cost[2] = int(new_text)
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_soul_text_changed(new_text: String) -> void:
|
||||
cost[3] = int(new_text)
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
func save():
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/" + category + ".ini")
|
||||
config.set_value(item,"cost",cost)
|
||||
config.set_value(item,"difficulty",difficulty)
|
||||
config.set_value(item,"action",action)
|
||||
config.set_value(item,"success",success)
|
||||
config.set_value(item,"failure",failure)
|
||||
config.set_value(item,"duration",duration)
|
||||
config.set_value(item,"ends_on",ends_on)
|
||||
config.set_value(item,"target",target)
|
||||
config.set_value(item,"stat",stat)
|
||||
config.save("res://02 - Configurations/" + category + ".ini")
|
||||
%http.request("https://ttrpg.marty.tf/hi2/",["Content-Type: application/json"],HTTPClient.METHOD_PUT,"hi2")
|
||||
|
||||
|
||||
func _on_difficulty_text_changed(new_text: String) -> void:
|
||||
difficulty = int(new_text)
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_action_text_changed() -> void:
|
||||
action = %action.text
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_success_text_changed() -> void:
|
||||
success = %success.text
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_failure_text_changed() -> void:
|
||||
failure = %failure.text
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_duration_text_changed(new_text) -> void:
|
||||
duration = int(new_text)
|
||||
print(str(duration))
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_ends_on_item_selected(index: int) -> void:
|
||||
ends_on = index
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
|
||||
func _on_http_request_completed(result: int, response_code: int, headers: PackedStringArray, body: PackedByteArray) -> void:
|
||||
print(str(response_code))
|
||||
1
01 - Menus/04 - Modules/modules_skill.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_skill.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cy7cil87c8jlm
|
||||
177
01 - Menus/04 - Modules/modules_skill.tscn
Normal file
177
01 - Menus/04 - Modules/modules_skill.tscn
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://wvtkpsevhva0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cy7cil87c8jlm" path="res://01 - Menus/04 - Modules/modules_skill.gd" id="1_5eik8"]
|
||||
|
||||
[node name="skill" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_5eik8")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_right = 1408.0
|
||||
offset_bottom = 1280.0
|
||||
|
||||
[node name="cost" type="Node2D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="body" type="LineEdit" parent="cost"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 64.0
|
||||
offset_top = 64.0
|
||||
offset_right = 206.0
|
||||
offset_bottom = 128.0
|
||||
theme_override_colors/font_color = Color(0.8509804, 0.29411766, 0.29411766, 1)
|
||||
placeholder_text = "body"
|
||||
|
||||
[node name="communication" type="LineEdit" parent="cost"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 256.0
|
||||
offset_top = 64.0
|
||||
offset_right = 398.0
|
||||
offset_bottom = 128.0
|
||||
placeholder_text = "communication"
|
||||
|
||||
[node name="mind" type="LineEdit" parent="cost"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 64.0
|
||||
offset_top = 160.0
|
||||
offset_right = 206.0
|
||||
offset_bottom = 224.0
|
||||
placeholder_text = "mind"
|
||||
|
||||
[node name="soul" type="LineEdit" parent="cost"]
|
||||
unique_name_in_owner = true
|
||||
offset_left = 256.0
|
||||
offset_top = 160.0
|
||||
offset_right = 398.0
|
||||
offset_bottom = 224.0
|
||||
placeholder_text = "soul"
|
||||
|
||||
[node name="action" type="TextEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 320.0
|
||||
offset_right = 960.0
|
||||
offset_bottom = 576.0
|
||||
placeholder_text = "action"
|
||||
wrap_mode = 1
|
||||
scroll_smooth = true
|
||||
caret_blink = true
|
||||
|
||||
[node name="success" type="TextEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 608.0
|
||||
offset_right = 960.0
|
||||
offset_bottom = 864.0
|
||||
placeholder_text = "success"
|
||||
wrap_mode = 1
|
||||
scroll_smooth = true
|
||||
caret_blink = true
|
||||
|
||||
[node name="failure" type="TextEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_left = 64.0
|
||||
offset_top = 896.0
|
||||
offset_right = 960.0
|
||||
offset_bottom = 1152.0
|
||||
placeholder_text = "failure"
|
||||
wrap_mode = 1
|
||||
scroll_smooth = true
|
||||
caret_blink = true
|
||||
|
||||
[node name="difficulty" type="LineEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 576.0
|
||||
offset_top = 64.0
|
||||
offset_right = 718.0
|
||||
offset_bottom = 128.0
|
||||
placeholder_text = "difficulty"
|
||||
|
||||
[node name="duration" type="LineEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 832.0
|
||||
offset_top = 64.0
|
||||
offset_right = 974.0
|
||||
offset_bottom = 128.0
|
||||
placeholder_text = "duration"
|
||||
|
||||
[node name="ends_on" type="OptionButton" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 1024.0
|
||||
offset_top = 64.0
|
||||
offset_right = 1344.0
|
||||
offset_bottom = 128.0
|
||||
selected = 0
|
||||
item_count = 3
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Ends on Sleep"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "Ends on Rest"
|
||||
popup/item_2/id = 2
|
||||
|
||||
[node name="challenge" type="OptionButton" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 0
|
||||
offset_left = 512.0
|
||||
offset_top = 160.0
|
||||
offset_right = 1344.0
|
||||
offset_bottom = 224.0
|
||||
selected = 0
|
||||
item_count = 3
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "Throw 1 dice"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "Throw x dice"
|
||||
popup/item_2/id = 2
|
||||
|
||||
[node name="target" type="ItemList" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_left = 1024.0
|
||||
offset_top = 896.0
|
||||
offset_right = 1344.0
|
||||
offset_bottom = 1152.0
|
||||
mouse_filter = 2
|
||||
select_mode = 2
|
||||
item_count = 1
|
||||
item_0/text = "target"
|
||||
|
||||
[node name="stat" type="ItemList" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_left = 1024.0
|
||||
offset_top = 320.0
|
||||
offset_right = 1344.0
|
||||
offset_bottom = 864.0
|
||||
mouse_filter = 2
|
||||
select_mode = 2
|
||||
|
||||
[node name="http" type="HTTPRequest" parent="."]
|
||||
unique_name_in_owner = true
|
||||
use_threads = true
|
||||
|
||||
[connection signal="text_changed" from="cost/body" to="." method="_on_body_text_changed"]
|
||||
[connection signal="text_changed" from="cost/communication" to="." method="_on_communication_text_changed"]
|
||||
[connection signal="text_changed" from="cost/mind" to="." method="_on_mind_text_changed"]
|
||||
[connection signal="text_changed" from="cost/soul" to="." method="_on_soul_text_changed"]
|
||||
[connection signal="text_changed" from="action" to="." method="_on_action_text_changed"]
|
||||
[connection signal="text_changed" from="success" to="." method="_on_success_text_changed"]
|
||||
[connection signal="text_changed" from="failure" to="." method="_on_failure_text_changed"]
|
||||
[connection signal="text_changed" from="difficulty" to="." method="_on_difficulty_text_changed"]
|
||||
[connection signal="text_changed" from="duration" to="." method="_on_duration_text_changed"]
|
||||
[connection signal="item_selected" from="ends_on" to="." method="_on_ends_on_item_selected"]
|
||||
[connection signal="request_completed" from="http" to="." method="_on_http_request_completed"]
|
||||
7
01 - Menus/04 - Modules/modules_stat.gd
Normal file
7
01 - Menus/04 - Modules/modules_stat.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Control
|
||||
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. character
|
||||
var module # e.g. trait
|
||||
var items # e.g. ["Undergrounder","Tough"]
|
||||
1
01 - Menus/04 - Modules/modules_stat.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_stat.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://uych52kioaci
|
||||
12
01 - Menus/04 - Modules/modules_stat.tscn
Normal file
12
01 - Menus/04 - Modules/modules_stat.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bqswmmgfxstfw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bsni2icpr5xpg" path="res://01 - Menus/04 - Modules/modifier.gd" id="1_iafih"]
|
||||
|
||||
[node name="stat" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_iafih")
|
||||
25
01 - Menus/04 - Modules/modules_text.gd
Normal file
25
01 - Menus/04 - Modules/modules_text.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
extends Control
|
||||
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. character
|
||||
var module # e.g. trait
|
||||
var items # e.g. ["Undergrounder","Tough"]
|
||||
|
||||
var config
|
||||
var item_filter = ""
|
||||
|
||||
func _enter_tree() -> void:
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/" + category + ".ini")
|
||||
%text.text = config.get_value(item,"text", "")
|
||||
|
||||
|
||||
func _on_backstory_text_changed() -> void:
|
||||
config = ConfigFile.new()
|
||||
config.load("res://02 - Configurations/" + category + ".ini")
|
||||
config.set_value(item,"text",%text.text)
|
||||
get_parent().get_parent().show_save()
|
||||
|
||||
func save():
|
||||
config.save("res://02 - Configurations/" + category + ".ini")
|
||||
1
01 - Menus/04 - Modules/modules_text.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_text.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c7veejgoktxy4
|
||||
19
01 - Menus/04 - Modules/modules_text.tscn
Normal file
19
01 - Menus/04 - Modules/modules_text.tscn
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://blinf0w4bd7xh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c7veejgoktxy4" path="res://01 - Menus/04 - Modules/text.gd" id="1_ed0wg"]
|
||||
|
||||
[node name="text" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_ed0wg")
|
||||
|
||||
[node name="text" type="TextEdit" parent="."]
|
||||
unique_name_in_owner = true
|
||||
clip_contents = false
|
||||
layout_mode = 0
|
||||
offset_top = 320.0
|
||||
offset_right = 576.0
|
||||
offset_bottom = 768.0
|
||||
wrap_mode = 1
|
||||
|
||||
[connection signal="text_changed" from="text" to="." method="_on_backstory_text_changed"]
|
||||
7
01 - Menus/04 - Modules/modules_trait.gd
Normal file
7
01 - Menus/04 - Modules/modules_trait.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Control
|
||||
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. character
|
||||
var module # e.g. trait
|
||||
var items # e.g. ["Undergrounder","Tough"]
|
||||
1
01 - Menus/04 - Modules/modules_trait.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_trait.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://5fupt8jhtnre
|
||||
8
01 - Menus/04 - Modules/modules_trait.tscn
Normal file
8
01 - Menus/04 - Modules/modules_trait.tscn
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bbtwis5vf5pgj"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://5fupt8jhtnre" path="res://01 - Menus/04 - Modules/trait.gd" id="1_elj4r"]
|
||||
|
||||
[node name="trait" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_elj4r")
|
||||
7
01 - Menus/04 - Modules/modules_xenoline.gd
Normal file
7
01 - Menus/04 - Modules/modules_xenoline.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends Control
|
||||
|
||||
|
||||
var item # e.g. grondir
|
||||
var category # e.g. character
|
||||
var module # e.g. trait
|
||||
var items # e.g. ["Undergrounder","Tough"]
|
||||
1
01 - Menus/04 - Modules/modules_xenoline.gd.uid
Normal file
1
01 - Menus/04 - Modules/modules_xenoline.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cbbigwfdfc2l4
|
||||
8
01 - Menus/04 - Modules/modules_xenoline.tscn
Normal file
8
01 - Menus/04 - Modules/modules_xenoline.tscn
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cn53vjwt1k4wq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cbbigwfdfc2l4" path="res://01 - Menus/04 - Modules/xenoline.gd" id="1_bofh8"]
|
||||
|
||||
[node name="xenoline" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
script = ExtResource("1_bofh8")
|
||||
Loading…
Add table
Add a link
Reference in a new issue