mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-18 01:06:47 +01:00
Spell points are off now, as I think trainers will work better for this game. Made the spell book window handle it properly.
This commit is contained in:
parent
6fb1f1ca9b
commit
6a70b36e04
@ -195,7 +195,6 @@ window/size/ui_scale_touch=1.0
|
||||
|
||||
[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"
|
||||
|
@ -64,6 +64,9 @@ func _ready() -> void:
|
||||
|
||||
_prev_button.connect("pressed", self, "dec_page")
|
||||
_next_button.connect("pressed", self, "inc_page")
|
||||
|
||||
if ESS.use_spell_points:
|
||||
_spell_points_label.text = ""
|
||||
|
||||
connect("visibility_changed", self, "_visibility_changed")
|
||||
|
||||
@ -135,7 +138,8 @@ func refresh_all() -> void:
|
||||
if _page > _max_pages:
|
||||
_page = _max_pages
|
||||
|
||||
_spell_points_label.text = "Free spell points: " + str(_player.getc_free_spell_points())
|
||||
if ESS.use_spell_points:
|
||||
_spell_points_label.text = "Free spell points: " + str(_player.getc_free_spell_points())
|
||||
|
||||
refresh_entries()
|
||||
|
||||
|
@ -106,28 +106,45 @@ func spell_button_pressed() -> void:
|
||||
_popup.popup(Rect2(pos, _popup.rect_size))
|
||||
|
||||
func update_spell_indicators():
|
||||
if _spell_known && ESS.use_spell_points:
|
||||
get_node(known_label_path).show()
|
||||
get_node(learn_button_path).hide()
|
||||
|
||||
modulate = known_color
|
||||
if ESS.use_spell_points:
|
||||
if _spell_known:
|
||||
get_node(known_label_path).show()
|
||||
get_node(learn_button_path).hide()
|
||||
|
||||
modulate = known_color
|
||||
else:
|
||||
if _spell != null:
|
||||
if _spell.training_required_spell:
|
||||
if not _player.spell_hasc(_spell.training_required_spell):
|
||||
|
||||
if ESS.use_spell_points:
|
||||
get_node(known_label_path).hide()
|
||||
get_node(learn_button_path).show()
|
||||
|
||||
modulate = unlearnable_color
|
||||
|
||||
return
|
||||
|
||||
if ESS.use_spell_points:
|
||||
get_node(known_label_path).hide()
|
||||
get_node(learn_button_path).show()
|
||||
|
||||
modulate = not_known_color
|
||||
else:
|
||||
if _spell != null:
|
||||
if _spell.training_required_spell:
|
||||
if not _player.spell_hasc(_spell.training_required_spell):
|
||||
|
||||
if ESS.use_spell_points:
|
||||
get_node(known_label_path).hide()
|
||||
get_node(learn_button_path).show()
|
||||
|
||||
modulate = unlearnable_color
|
||||
|
||||
return
|
||||
|
||||
if ESS.use_spell_points:
|
||||
get_node(known_label_path).hide()
|
||||
get_node(learn_button_path).show()
|
||||
|
||||
modulate = not_known_color
|
||||
get_node(known_label_path).hide()
|
||||
get_node(learn_button_path).hide()
|
||||
|
||||
if _spell_known:
|
||||
modulate = known_color
|
||||
else:
|
||||
if _spell != null:
|
||||
if _spell.training_required_spell:
|
||||
if not _player.spell_hasc(_spell.training_required_spell):
|
||||
|
||||
modulate = unlearnable_color
|
||||
|
||||
return
|
||||
|
||||
modulate = not_known_color
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user