mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-25 01:17:10 +01:00
Implement level requirement, and cost for the trainer window. Also update ESS to get support for it at the c++ side.
This commit is contained in:
parent
cddda7d5e2
commit
7bf9fab465
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": {"3.2": "36b746d90393299b81ecb991f4aa94a8d742fd11", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "c7a98e704dd62782b9f8b4a22b74787278574657"}, "entity_spell_system": {"master": "57d80dafffd5ea6ca70e86e2cfb067a81b25147b"}, "ui_extensions": {"master": "ca7df8435154d1146be36c4fc97e6cc7092d3eb9"}, "voxelman": {"master": "6f8e54879bcab6c628c761b545f6df4cd7534a07"}, "texture_packer": {"master": "f98b7410cd3f2a743cb57456910ad9f93ef89937"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "6c99ddcaa6203e77163b4770e7af95bc2a181e3d"}, "procedural_animations": {"master": "ec465a7a683a047cd373959bb022bde1321fb72d"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "bfb60df21570415b1860c25c2dae7722cf158ed9"}, "mesh_utils": {"master": "3365df3faf89a4c29c3b4664b53e9007e4e6267b"}, "broken_seals_module": {"master": "9f89e2a4e7b59351ac4cb4c4dc5f88e5b60a2f15"}, "thread_pool": {"master": "b1030eaf92ba595c56ae8caac90b58081303d16f"}}
|
{"engine": {"3.2": "36b746d90393299b81ecb991f4aa94a8d742fd11", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "c7a98e704dd62782b9f8b4a22b74787278574657"}, "entity_spell_system": {"master": "0a1e08f5417cecda5a1163063bf42c325d078cfe"}, "ui_extensions": {"master": "ca7df8435154d1146be36c4fc97e6cc7092d3eb9"}, "voxelman": {"master": "6f8e54879bcab6c628c761b545f6df4cd7534a07"}, "texture_packer": {"master": "f98b7410cd3f2a743cb57456910ad9f93ef89937"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "6c99ddcaa6203e77163b4770e7af95bc2a181e3d"}, "procedural_animations": {"master": "ec465a7a683a047cd373959bb022bde1321fb72d"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "bfb60df21570415b1860c25c2dae7722cf158ed9"}, "mesh_utils": {"master": "3365df3faf89a4c29c3b4664b53e9007e4e6267b"}, "broken_seals_module": {"master": "9f89e2a4e7b59351ac4cb4c4dc5f88e5b60a2f15"}, "thread_pool": {"master": "b1030eaf92ba595c56ae8caac90b58081303d16f"}}
|
@ -22,7 +22,7 @@ extends PanelContainer
|
|||||||
|
|
||||||
export(NodePath) var spell_entry_container_path : NodePath
|
export(NodePath) var spell_entry_container_path : NodePath
|
||||||
export(NodePath) var learn_button_path : NodePath
|
export(NodePath) var learn_button_path : NodePath
|
||||||
export(NodePath) var cost_points_label_path : NodePath
|
export(NodePath) var cost_label_path : NodePath
|
||||||
|
|
||||||
export(NodePath) var spell_icon_path : NodePath
|
export(NodePath) var spell_icon_path : NodePath
|
||||||
export(NodePath) var spell_name_label_path : NodePath
|
export(NodePath) var spell_name_label_path : NodePath
|
||||||
@ -33,7 +33,7 @@ var _spell_entry_container : Node
|
|||||||
var _spell_entries : Array
|
var _spell_entries : Array
|
||||||
|
|
||||||
var _learn_button : Button
|
var _learn_button : Button
|
||||||
var _cost_points_label : Label
|
var _cost_label : Label
|
||||||
|
|
||||||
var _spell_icon : TextureRect
|
var _spell_icon : TextureRect
|
||||||
var _spell_name_label : Label
|
var _spell_name_label : Label
|
||||||
@ -60,7 +60,7 @@ func _ready() -> void:
|
|||||||
_spell_requirements_label = get_node(spell_requirements_label_path) as Label
|
_spell_requirements_label = get_node(spell_requirements_label_path) as Label
|
||||||
|
|
||||||
_learn_button = get_node(learn_button_path)
|
_learn_button = get_node(learn_button_path)
|
||||||
_cost_points_label = get_node(cost_points_label_path)
|
_cost_label = get_node(cost_label_path)
|
||||||
|
|
||||||
_learn_button.connect("pressed", self, "learn")
|
_learn_button.connect("pressed", self, "learn")
|
||||||
|
|
||||||
@ -122,8 +122,6 @@ func refresh_all() -> void:
|
|||||||
if _character_class == null:
|
if _character_class == null:
|
||||||
return
|
return
|
||||||
|
|
||||||
_cost_points_label.text = str(_player.getc_money())
|
|
||||||
|
|
||||||
refresh_entries()
|
refresh_entries()
|
||||||
|
|
||||||
|
|
||||||
@ -178,16 +176,27 @@ func _button_pressed():
|
|||||||
_spell_name_label.text = spell.text_name
|
_spell_name_label.text = spell.text_name
|
||||||
_spell_description_label.text = spell.text_description
|
_spell_description_label.text = spell.text_description
|
||||||
|
|
||||||
|
var req_str = "Required: "
|
||||||
|
|
||||||
if spell.training_required_spell:
|
if spell.training_required_spell:
|
||||||
_spell_requirements_label.text = spell.training_required_spell.text_name + " (rank " + str(spell.training_required_spell.rank) + ")"
|
req_str += spell.training_required_spell.text_name + " (rank " + str(spell.training_required_spell.rank) + ") "
|
||||||
else:
|
|
||||||
_spell_requirements_label.text = ""
|
if spell.level > 0:
|
||||||
|
req_str += "level " + str(spell.level)
|
||||||
|
|
||||||
|
_spell_requirements_label.text = req_str
|
||||||
|
|
||||||
|
_cost_label.text = str(spell.get_training_cost())
|
||||||
|
|
||||||
else:
|
else:
|
||||||
_spell_icon.texture = null
|
_spell_icon.texture = null
|
||||||
_spell_name_label.text = ""
|
_spell_name_label.text = ""
|
||||||
_spell_description_label.text = ""
|
_spell_description_label.text = ""
|
||||||
_spell_requirements_label.text = ""
|
_spell_requirements_label.text = ""
|
||||||
|
|
||||||
|
_cost_label.text = "0"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CustomSpellSorter:
|
class CustomSpellSorter:
|
||||||
static func sort(a, b):
|
static func sort(a, b):
|
||||||
|
@ -15,7 +15,7 @@ __meta__ = {
|
|||||||
}
|
}
|
||||||
spell_entry_container_path = NodePath("VBoxContainer/PanelContainer3/ScrollContainer/Spells")
|
spell_entry_container_path = NodePath("VBoxContainer/PanelContainer3/ScrollContainer/Spells")
|
||||||
learn_button_path = NodePath("VBoxContainer/HBoxContainer/Train")
|
learn_button_path = NodePath("VBoxContainer/HBoxContainer/Train")
|
||||||
cost_points_label_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer2/Price")
|
cost_label_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer2/Price")
|
||||||
spell_icon_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer/Icon")
|
spell_icon_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer/Icon")
|
||||||
spell_name_label_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer2/Name")
|
spell_name_label_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer2/Name")
|
||||||
spell_description_label_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer2/Description")
|
spell_description_label_path = NodePath("VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer2/Description")
|
||||||
|
Loading…
Reference in New Issue
Block a user