Esempio n. 1
0
        public void Divorce(string NPC)
        {
            bool swap = false;

            if (PrimarySpouse == NPC)
            {
                StorePrimarySpouse();
                swap = true;
            }
            Modworks.Player.SetFriendshipPoints(NPC, 0);
            Modworks.Player.SetFriendshipStatus(NPC, FriendshipStatus.Divorced);
            Dates.Remove(NPC);
            Engagements.Remove(NPC);
            Spouses.Remove(NPC);
            Divorces.Add(NPC);
            if (swap)
            {
                MakePrimarySpouse(GetNextPrimarySpouse());
            }
            //delete the NPC
            var npc = Game1.getCharacterFromName(NPC);

            npc.currentLocation.characters.Remove(npc);
            npc = null;
        }
Esempio n. 2
0
 public void Engage(string NPC, bwdyworks.GameDate weddingDay = null)
 {
     //var backup = Game1.player.spouse;
     //Game1.player.spouse = NPC;
     SetDateable(NPC, true);
     if (weddingDay == null)
     {
         weddingDay = bwdyworks.GameDate.CreateWeddingDate();
     }
     Modworks.Log.Info("Engaged to " + NPC + ", to be wed on " + weddingDay.GetSeasonString() + " " + weddingDay.Day);
     StorePrimarySpouse();
     if (Modworks.Player.GetFriendshipPoints(NPC) < 2500)
     {
         Modworks.Player.SetFriendshipPoints(NPC, 2500);
     }
     Modworks.Player.SetFriendshipStatus(NPC, FriendshipStatus.Engaged);
     //Game1.player.spouse = NPC;
     Game1.player.friendshipData[NPC].Proposer    = Game1.player.UniqueMultiplayerID;
     Game1.player.friendshipData[NPC].WeddingDate = new WorldDate(Game1.year, weddingDay.GetSeasonString().ToLower(), weddingDay.Day);
     Spouses.Remove(NPC);
     Dates.Remove(NPC);
     Divorces.Remove(NPC);
     Engagements.Add(NPC, weddingDay);
     //Game1.player.spouse = backup;
 }
Esempio n. 3
0
 private bool CheckDivorcedProper(string NPC)
 {
     if (Divorces.Contains(NPC) ^ Modworks.Player.GetFriendshipStatus(NPC) == FriendshipStatus.Divorced)
     {
         Divorce(NPC);                                                                                                 //fix desynced status
     }
     return(Divorces.Contains(NPC));
 }
Esempio n. 4
0
 public void Forget(string NPC, bool resetFriendship = true)
 {
     if (resetFriendship)
     {
         Modworks.Player.SetFriendshipPoints(NPC, 0);
     }
     Modworks.Player.SetFriendshipStatus(NPC, FriendshipStatus.Friendly);
     Spouses.Remove(NPC);
     Engagements.Remove(NPC);
     Divorces.Remove(NPC);
     Dates.Remove(NPC);
 }
Esempio n. 5
0
 public void Date(string NPC)
 {
     SetDateable(NPC, true);
     if (Modworks.Player.GetFriendshipPoints(NPC) < 2000)
     {
         Modworks.Player.SetFriendshipPoints(NPC, 2000);
     }
     Modworks.Player.SetFriendshipStatus(NPC, FriendshipStatus.Dating);
     Spouses.Remove(NPC);
     Engagements.Remove(NPC);
     Divorces.Remove(NPC);
     Dates.Add(NPC);
 }
Esempio n. 6
0
 public void Marry(string NPC, bool wedding = false)
 {
     SetDateable(NPC, true);
     if (Modworks.Player.GetFriendshipPoints(NPC) < 2500)
     {
         Modworks.Player.SetFriendshipPoints(NPC, 2500);
     }
     if (Game1.player.HouseUpgradeLevel < 1)
     {
         Game1.player.HouseUpgradeLevel = 1;                                     //prevent crash
     }
     Modworks.Player.SetFriendshipStatus(NPC, FriendshipStatus.Married);
     Dates.Remove(NPC);
     Engagements.Remove(NPC);
     Divorces.Remove(NPC);
     Spouses.Add(NPC);
     if (string.IsNullOrWhiteSpace(PrimarySpouse))
     {
         MakePrimarySpouse(NPC);
     }
 }