Ejemplo n.º 1
0
    private static void StoryGameSession_AddPlayer(On.StoryGameSession.orig_AddPlayer orig, StoryGameSession self, AbstractCreature player)
    {
        orig.Invoke(self, player);
        rainList.Clear();

        //Rain Chance
        if (UnityEngine.Random.Range(0, 100) < Downpour.rainChance)
        {
            noRainThisCycle = false;
        }
        else
        {
            noRainThisCycle = true;
        }
        //Rain Starting Intensity (Non-Dynamic)
        if (!Downpour.dynamic)
        {
            if (Downpour.intensity == 1)
            {
                rainIntensity    = 0.31f;
                Downpour.dynamic = false;
            }
            if (Downpour.intensity == 2)
            {
                rainIntensity    = 0.6f;
                Downpour.dynamic = false;
            }
            if (Downpour.intensity == 3)
            {
                rainIntensity    = 0.9f;
                Downpour.dynamic = false;
            }
        }
        //Rain Starting Intensity (Dynamic)
        else
        {
            Downpour.dynamic = true;
            if (!Downpour.snow)
            {
                rainIntensity = UnityEngine.Random.Range(-1.5f, 0.8f);
            }
            else
            {
                rainIntensity = UnityEngine.Random.Range(0.15f, 0.9f);
            }
        }
        //Rain Direction
        switch (Downpour.direction)
        {
        case 0:
            direction = UnityEngine.Random.Range(1, 4);
            Downpour.windDirection = direction;
            break;

        case 1:
            direction = 1;
            break;

        case 2:
            direction = 2;
            break;

        case 3:
            direction = 3;
            break;
        }
        int leftOrRight = direction;

        if (direction == 2)
        {
            if (UnityEngine.Random.value >= 0.5f)
            {
                leftOrRight = 3;
            }
            else
            {
                leftOrRight = 1;
            }
        }
        Downpour.windDirection = leftOrRight;
        //Apply Rain Intensity
        if (!noRainThisCycle)
        {
            startingIntensity = rainIntensity;
        }
        else
        {
            startingIntensity = 0;
            rainIntensity     = 0;
        }
    }
Ejemplo n.º 2
0
 private static void StoryGameSession_AddPlayer(On.StoryGameSession.orig_AddPlayer orig, StoryGameSession self, AbstractCreature player)
 {
     orig.Invoke(self, player);
     KarmaAppetite_ExtraInventory.AddInventory(self, player);
 }
Ejemplo n.º 3
0
 private static void StoryGameSession_AddPlayer(On.StoryGameSession.orig_AddPlayer orig, StoryGameSession self, AbstractCreature player)
 {
     orig.Invoke(self, player);
     fleeList = new List <Scavenger>();
     shelter  = "";
 }