コード例 #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;
        }
コード例 #2
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);
 }
コード例 #3
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);
 }
コード例 #4
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);
     }
 }