fix debug_print, other odds and ends
This commit is contained in:
parent
f3189d2dd9
commit
70a879529a
@ -96,6 +96,7 @@ func _get_targets_in_range(enemies) -> Array:
|
||||
|
||||
func _apply_status() -> void:
|
||||
# TODO: Try passing damage and status type to target for mods, e.g. burning or stunned, and use with singleton stats to add thread to target for damage or do other things depending on the case
|
||||
# unnecessary... can just use await get_tree().create_timer(time).timeout
|
||||
pass
|
||||
|
||||
|
||||
|
@ -47,6 +47,6 @@ class Ability:
|
||||
DOTE
|
||||
}
|
||||
|
||||
func debug_print(value) -> void:
|
||||
func debug_print(value : String) -> void:
|
||||
if OS.is_debug_build():
|
||||
debug_print(value)
|
||||
print(value)
|
||||
|
@ -18,10 +18,9 @@ func _ready() -> void:
|
||||
func _on_enemy_died(enemyDifficulty, enemyTier, _enemyFaction) -> void:
|
||||
var kill_exp = pow(pow(enemyTier + 1, 3), enemyDifficulty)
|
||||
area_exp += kill_exp
|
||||
# if Globals.debug:
|
||||
# print("T: ", enemyTier, " D: ", enemyDifficulty)
|
||||
# print("K: ", kill_exp)
|
||||
# print("A: ",area_exp)
|
||||
# Globals.debug_print("T: " + str(enemyTier) + " D: " + str(enemyDifficulty))
|
||||
# Globals.debug_print("K: " + str(kill_exp))
|
||||
# Globals.debug_print("A: " + str(area_exp))
|
||||
# TODO: maybe show earned exp on bar, separate from current
|
||||
# use xp to next level and current level, subtract, figure out percentage per point exp, add to display?
|
||||
|
||||
|
@ -73,10 +73,10 @@ func _on_spawn_timer_timeout() -> void:
|
||||
|
||||
func _on_area_continue_pressed() -> void:
|
||||
$SpawnTimer.stop()
|
||||
Globals.debug_print("spawn timer stopped")
|
||||
# Globals.debug_print("spawn timer stopped")
|
||||
while get_child_count() > 1:
|
||||
await get_tree().create_timer(1.0).timeout
|
||||
Globals.debug_print("waiting for children to go to 1 or less")
|
||||
Globals.debug_print(get_child_count())
|
||||
# Globals.debug_print("waiting for children to go to 1 or less")
|
||||
# Globals.debug_print(get_child_count())
|
||||
self.queue_free()
|
||||
Globals.debug_print("area queued tor free")
|
||||
# Globals.debug_print("area queued tor free")
|
||||
|
@ -1,4 +1,3 @@
|
||||
# TODO: convert to just combat UI, instancing appropriate zone/area
|
||||
# BUG: elements not adjusting properly when moving to second monitor
|
||||
extends Control
|
||||
|
||||
@ -35,7 +34,6 @@ func _create_area() -> void:
|
||||
move_child(worldArea, 0)
|
||||
|
||||
func _on_button_test_pressed() -> void:
|
||||
%DebugMenu/ButtonTest.text = "pass"
|
||||
pass
|
||||
|
||||
|
||||
@ -49,23 +47,21 @@ func _continue_show() -> void:
|
||||
|
||||
func _go_next_area() -> void:
|
||||
var prevAreaQuest = currentAreaQuest
|
||||
# FIXME: breaks at some point?
|
||||
SignalBus.area_continue_pressed.emit()
|
||||
Globals.debug_print("gna signal emitted")
|
||||
# Globals.debug_print("gna signal emitted")
|
||||
%QuestsContainer.remove_child(prevAreaQuest)
|
||||
Globals.debug_print("gna quest removed")
|
||||
# Globals.debug_print("gna quest removed")
|
||||
prevAreaQuest.queue_free()
|
||||
Globals.debug_print("gna quest queued to free")
|
||||
# Globals.debug_print("gna quest queued to free")
|
||||
_create_area()
|
||||
Globals.debug_print("gna new area created")
|
||||
|
||||
# Globals.debug_print("gna new area created")
|
||||
|
||||
|
||||
func _on_quest_generated(quest) -> void:
|
||||
currentAreaQuest = quest
|
||||
%QuestsContainer.add_child(currentAreaQuest)
|
||||
|
||||
|
||||
# TODO: move all quest stuff to quest class?
|
||||
func _on_quest_completed() -> void:
|
||||
if %UITop/AutoCheck.button_pressed:
|
||||
_go_next_area()
|
||||
|
Loading…
Reference in New Issue
Block a user