This commit is contained in:
parent
c110377413
commit
30e87cccf0
@ -29,7 +29,7 @@ var _lastSound = 0 # timestamp of last played message
|
|||||||
var _countCmds = 0 # count of spoken commands -> after MAX_CMDS Meldewesen gets pissy
|
var _countCmds = 0 # count of spoken commands -> after MAX_CMDS Meldewesen gets pissy
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
Logger.set_logger_level(Logger.LOG_LEVEL_FINE)
|
#Logger.set_logger_level(Logger.LOG_LEVEL_FINE)
|
||||||
|
|
||||||
_audioPlayer = get_node("AudioStreamPlayer3D") as AudioStreamPlayer3D
|
_audioPlayer = get_node("AudioStreamPlayer3D") as AudioStreamPlayer3D
|
||||||
assert(null != _audioPlayer)
|
assert(null != _audioPlayer)
|
||||||
@ -107,17 +107,19 @@ func _load_sound ():
|
|||||||
func _set_behavior ():
|
func _set_behavior ():
|
||||||
if _huntingPlayer == false:
|
if _huntingPlayer == false:
|
||||||
var reason = null
|
var reason = null
|
||||||
|
var daytime = Daytime.get_time()
|
||||||
if _playerRef.IsHunted: # player is already marked by another Meldewesen
|
if _playerRef.IsHunted: # player is already marked by another Meldewesen
|
||||||
reason = "player is haunted"
|
reason = "player is haunted"
|
||||||
elif _playerRef.is_in_illegalzone(): # player is in illegal area
|
elif _playerRef.is_in_illegalzone(): # player is in illegal area
|
||||||
reason = "player is haunted in illegal area"
|
reason = "player is haunted in illegal area"
|
||||||
elif Pills.get_round_level() == 0: # player has taken no pills in a while
|
elif Pills.get_round_level() == 0: # player has taken no pills in a while
|
||||||
reason = "player's pill level is zero"
|
reason = "player's pill level is zero"
|
||||||
get_tree().change_scene("res://Level/PathTestWorld.tscn")
|
elif _playerRef.IsOutside and daytime > Daytime.WORK_TIME and daytime < Daytime.SLEEP_TIME: # outside during WORK_TIME
|
||||||
# TODO: outside after WORK_TIME
|
reason = "player outside during worktime"
|
||||||
#elif daytime < Daytime.WORK_TIME:
|
#elif _playerRef.IsInFactory and daytime < Daytime.WORK_TIME and daytime > Daytime.SLEEP_TIME: # at work after out of WORK_TIME
|
||||||
# TODO: at work after SLEEP_TIME
|
# EDIT: too early at work is not an angry reason :p
|
||||||
#elif daytime > Daytime.SLEEP_TIME:
|
elif _playerRef.IsInFactory and daytime > Daytime.SLEEP_TIME: # at work after out of WORK_TIME
|
||||||
|
reason = "player in factory out of worktime"
|
||||||
elif _countCmds > MAX_CMDS: # after MAX_CMDS repeats of the same command
|
elif _countCmds > MAX_CMDS: # after MAX_CMDS repeats of the same command
|
||||||
reason = "player is seemingly not coorperativ"
|
reason = "player is seemingly not coorperativ"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user