Issix-mod/EventTileOnEnter.gd

69 lines
2.5 KiB
GDScript3
Raw Normal View History

2024-10-29 01:07:34 +00:00
extends EventBase
func _init():
id = "IssixEvent"
2024-10-29 01:07:34 +00:00
func registerTriggers(es):
es.addTrigger(self, Trigger.EnteringRoom, "hall_ne_corner")
es.addEventCheck(self, "IssixBusy")
2024-10-29 01:07:34 +00:00
func run(_triggerID, _args):
#if(doEventCheck("IssixBusy") != null):
2024-10-29 01:07:34 +00:00
# return false
if(GM.main.isVeryLate()): # Add something in the nightime it's very late?
saynn("You see an empty chair in the corner with three blankets laying around.")
return false
if(!getModuleFlag("IssixModule", "Issix_Introduced")): # Do that if not night
2024-10-29 01:07:34 +00:00
saynn("You see a demon-dragon sitting on a chair in a corner, around him there are three leashed creatures.")
GM.main.setModuleFlag("IssixModule", "Score_Explored", 0) # is there a better place to do this?
GM.main.setModuleFlag("IssixModule", "Quest_Status", 0)
2024-10-29 01:07:34 +00:00
addButton("Demon", "Talk to the demon-dragon", "talk")
return
GM.main.applyWorldEdit("IssixWorldEdit")
2024-10-29 01:07:34 +00:00
if(checkCharacterBusy("IssixBusy", "Issix is not here", "Issix")):
2024-11-01 00:34:49 +00:00
saynn("This corner is not occupied by anyone at the momentm, just three empty blankets with a chair.")
if getModuleFlag("IssixModule", "Quest_Status") == 5:
2024-11-01 00:34:49 +00:00
addButton("Paper", "A piece of paper lies left in a hurry", "paper")
return
saynn("You see Issix sitting on a chair in a corner, around him there are three leashed slaves.")
addButton("Issix", "Talk to Issix", "talk")
if(!getModuleFlag("IssixModule", "Pets_Introduced")):
2024-10-29 01:07:34 +00:00
#addButton("Look at pets", "Look at pets", "pets")
addDisabledButton("Talk with pets", "You should probably first talk with intimidating figure who got them leashed")
else:
addButton("Pets", "Look at pets", "pets")
#if(checkCharacterBusy("RahiBusy", "Seems like the kitty is not here", "Rahi")):
# return
#
#if(getModuleFlag("RahiModule", "Rahi_NotThereToday", false)):
# saynn("Seems like the kitty is not here")
#
# addDisabledButton("Rahi", "She is not here today")
# return
#if(!getModuleFlag("RahiModule", "Rahi_Introduced")):
# saynn("You see some unknown feline sitting on a bench")
#else:
# saynn("You see the Kitty sitting on a bench")
#addButtonUnlessLate("Rahi", "Talk to the feline", "talk")
func getPriority():
return 0
func onButton(_method, _args):
if(_method == "talk"):
runScene("IssixTalkScene")
2024-10-29 01:07:34 +00:00
if(_method == "pets"):
runScene("PetsTalkScene")
2024-11-01 00:34:49 +00:00
if(_method == "paper"):
runScene("NoPetsTalkScene")
func eventCheck(_checkID, _args = []):
if(getModuleFlag("IssixModule", "Quest_Status") == 5 and getModuleFlag("IssixModule", "Quest_Wait_Another_Day") == true):
2024-11-01 00:34:49 +00:00
return {busy=true}