Esempio n. 1
0
        private void GameLoop_DayStarted(object sender, DayStartedEventArgs e)
        {
            if (Game1.IsMasterGame)
            {
                Gates["MoongateWax"]  = new MGNPC("FarmHouse", "MoongateWax");
                Gates["MoongateFlow"] = new MGNPC("FarmHouse", "MoongateFlow");
                Gates["MoongateWane"] = new MGNPC("FarmHouse", "MoongateWane");
                Gates["MoongateEbb"]  = new MGNPC("FarmHouse", "MoongateEbb");

                foreach (var kvp in Gates)
                {
                    var sp = SpawnPoints[RNG.Next(SpawnPoints.Count)];
                    Game1.warpCharacter(kvp.Value, sp.GetGameLocation().Name, sp.GetTileLocation());
                    //Monitor.Log(kvp.Key + " location: " + sp.ToString());
                }

                //pair them

                //lunar gates
                Destinations["MoongateWax"]  = new GameSpot(Gates["MoongateWane"].currentLocation, Gates["MoongateWane"].getTileLocationPoint());
                Destinations["MoongateWane"] = new GameSpot(Gates["MoongateWax"].currentLocation, Gates["MoongateWax"].getTileLocationPoint());
                //tidal gates
                Destinations["MoongateEbb"]  = new GameSpot(Gates["MoongateFlow"].currentLocation, Gates["MoongateFlow"].getTileLocationPoint());
                Destinations["MoongateFlow"] = new GameSpot(Gates["MoongateEbb"].currentLocation, Gates["MoongateEbb"].getTileLocationPoint());

                SendGates();
            }
        }
Esempio n. 2
0
        public void DoGateWarp(GameSpot destination)
        {
            var ymod = IsTilePathableAndClear(destination.GetGameLocation(), destination.TileX, destination.TileY + 1) ? 1 : -1;

            Game1.warpFarmer(new LocationRequest(destination.GetGameLocation().NameOrUniqueName, destination.GetGameLocation().uniqueName.Value != null, destination.GetGameLocation()), destination.TileX, destination.TileY + ymod, 2);
        }