Fixed up a couple things, first steps towards a location manager

This commit is contained in:
2026-03-27 16:32:52 -07:00
parent 7ba95c5949
commit f9de58d9f7
9 changed files with 111 additions and 48 deletions

View File

@@ -1,12 +1,11 @@
class_name npcConstruct
extends cCharacter
var defaultRoom = 0
signal location_changed(ai, old_location, new_location)
signal state_changed(ai, old_state, new_state)
var state: int = 0
func advance_state() -> void:
if state >= MAX_STATE:
if reset_after_climax:
@@ -14,11 +13,10 @@ func advance_state() -> void:
else:
state += 1
func _ready():
super._ready()
func _init():
super._init()
print("Construct Ready")
Global.game.night.hour_changed.connect(_on_hour_changed)
func _on_hour_changed(hour: int):
@@ -29,6 +27,8 @@ func _on_hour_changed(hour: int):
func _process(delta: float) -> void:
super._process(delta)
print("Construct: Processing")
print(state)
match state:
0: pass # dormant
@@ -38,6 +38,7 @@ func _process(delta: float) -> void:
4: pass
5: pass
6: pass
advance_state()
if (randi_range(1, 20) > 10):
stunted = true