From d3c7d4afbe3b2c966f72352057e950e1ed9e47e3 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 24 Jul 2020 22:38:10 +0200 Subject: [PATCH] Re-enabled spell points, and disabled auto spell learning. --- game/project.godot | 2 ++ game/ui/windows/SpellBookWindow.tscn | 5 ++--- game/ui/windows/SpellContainer.gd | 18 +++++++++--------- game/ui/windows/SpellContainer.tscn | 7 +++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/game/project.godot b/game/project.godot index 32e7954f..76aeaed2 100644 --- a/game/project.godot +++ b/game/project.godot @@ -193,6 +193,8 @@ window/size/viewport_scale=100 [ess] +spells/use_spell_points=true +level/auto_learn_spells=false data/ess_resource_db_path="res://data/resource_db.tres" data/ess_entity_spawner_path="res://player/bs_entity_spawner.tres" enums/stats="Agility,Strength,Stamina,Intellect,Spirit,Health,Mana,Speed,Global Cooldown,Haste,Haste Rating,Resilience,Armor,Attack Power,Spell Power,Melee Crit,Melee Crit bonus,Spell Crit,Spell Crit Bonus,Block,Parry,Damage Reduction,Melee Damage Reduction,Spell Damage Reduction,Damage Taken,Heal Taken,Melee Damage,Spell Damage,Holy Resist,Shadow Resist,Nature Resist,Fire Resist,Frost Resist,Lightning Resist,Chaos Resist,Silence Resist,Fear Resist,Stun Resist,Energy,Rage,XP Rate" diff --git a/game/ui/windows/SpellBookWindow.tscn b/game/ui/windows/SpellBookWindow.tscn index 6e055454..b2b3e31d 100644 --- a/game/ui/windows/SpellBookWindow.tscn +++ b/game/ui/windows/SpellBookWindow.tscn @@ -153,14 +153,13 @@ size_flags_horizontal = 3 size_flags_vertical = 3 [node name="Button2" type="Button" parent="PagedContent/Controls/HBoxContainer"] -margin_right = 434.0 +margin_right = 288.0 margin_bottom = 26.5702 size_flags_horizontal = 3 size_flags_vertical = 3 text = "< Previous page" [node name="SpellPoints" type="Label" parent="PagedContent/Controls/HBoxContainer"] -visible = false margin_left = 292.0 margin_top = 5.0 margin_right = 580.0 @@ -170,7 +169,7 @@ align = 1 valign = 1 [node name="Button" type="Button" parent="PagedContent/Controls/HBoxContainer"] -margin_left = 438.0 +margin_left = 584.0 margin_right = 872.0 margin_bottom = 26.5702 size_flags_horizontal = 3 diff --git a/game/ui/windows/SpellContainer.gd b/game/ui/windows/SpellContainer.gd index 02596afb..6eebac21 100644 --- a/game/ui/windows/SpellContainer.gd +++ b/game/ui/windows/SpellContainer.gd @@ -106,9 +106,9 @@ func spell_button_pressed() -> void: _popup.popup(Rect2(pos, _popup.rect_size)) func update_spell_indicators(): - if _spell_known: -# get_node(known_label_path).show() -# get_node(learn_button_path).hide() + if _spell_known && ESS.use_spell_points: + get_node(known_label_path).show() + get_node(learn_button_path).hide() modulate = known_color else: @@ -116,17 +116,17 @@ func update_spell_indicators(): if _spell.training_required_spell: if not _player.spell_hasc(_spell.training_required_spell): -# get_node(known_label_path).hide() -# get_node(learn_button_path).show() + if ESS.use_spell_points: + get_node(known_label_path).hide() + get_node(learn_button_path).show() modulate = unlearnable_color return -# get_node(known_label_path).hide() -# get_node(learn_button_path).show() - - modulate = not_known_color + if ESS.use_spell_points: + get_node(known_label_path).hide() + get_node(learn_button_path).show() modulate = not_known_color diff --git a/game/ui/windows/SpellContainer.tscn b/game/ui/windows/SpellContainer.tscn index 8d7ecdc0..e95719cd 100644 --- a/game/ui/windows/SpellContainer.tscn +++ b/game/ui/windows/SpellContainer.tscn @@ -118,7 +118,6 @@ margin_right = 288.0 margin_bottom = 38.0 [node name="PanelContainer" type="PanelContainer" parent="SpellEntryPopup/VBoxContainer"] -visible = false margin_top = 46.0 margin_right = 288.0 margin_bottom = 69.0 @@ -135,13 +134,13 @@ valign = 1 [node name="LearnButton" type="Button" parent="SpellEntryPopup/VBoxContainer"] visible = false -margin_top = 46.0 +margin_top = 77.0 margin_right = 288.0 -margin_bottom = 72.5702 +margin_bottom = 103.57 text = "Learn" [node name="RichTextLabel" type="RichTextLabel" parent="SpellEntryPopup/VBoxContainer"] -margin_top = 46.0 +margin_top = 77.0 margin_right = 288.0 margin_bottom = 195.0 size_flags_horizontal = 3