[code] how is this supposed to prevent repeating the event?

SeriousBlueJewel

Well-Known Member
Nov 5, 2018
1,677
867
The code below basically allows the event to happen to happen again once 30 days have passed
Code:
//Doots-o-ween 2022
    //Randomly, while the Halloween season is active, PC is on a planet, and PC is inside their ship. Can't be repeated during the same season.
    if (isHalloweenish() && pc.hasGenitals() && getShipRoom().parentLocation?.isPlanet && (flags["TRICK_OR_TREAT_LAST_DAY"] == undefined || flags["TRICK_OR_TREAT_LAST_DAY"] + 30 < days))
    {
        window.startTrickOrTreat();
        return true;
    }

The majority of scenes just clean the flag once the season ends like this
Code:
    if(!isChristmas()) flags["ANNO_GIFT_WRAPPED"] = undefined;
 

Theron

Well-Known Member
Nov 8, 2018
3,327
1,318
44
To make it repeatable on a longish timeframe (but not a whole year) if the player has Halloween always on via the Cheat Menu?