26 lines
546 B
GDScript3
26 lines
546 B
GDScript3
|
extends EventBase
|
||
|
|
||
|
func _init():
|
||
|
id = "BullyGangEvent"
|
||
|
|
||
|
func registerTriggers(es):
|
||
|
es.addTrigger(self, Trigger.ApproachedYogaMats)
|
||
|
es.addTrigger(self, Trigger.ApproachedWeightsBench)
|
||
|
|
||
|
func react(_triggerID, _args):
|
||
|
if(getModuleFlag("GymModule", "Gym_BullyGangPayed")):
|
||
|
return false
|
||
|
|
||
|
if getModuleFlag("IssixModule", "Gym_Bullies_Left_Alone", false) == true:
|
||
|
return false
|
||
|
|
||
|
if(RNG.chance(50)):
|
||
|
return false
|
||
|
|
||
|
runScene("BullyGangScene")
|
||
|
setModuleFlag("GymModule", "Gym_BullyGangPayed", true)
|
||
|
return true
|
||
|
|
||
|
func getPriority():
|
||
|
return 20
|