private void HandleNpcTalkedTo(object npc, EventArgs e) { if (npc.GetType() == typeof(Friendly)) { Friendly friendly = npc as Friendly; if (friendly.ItemNeededForSecret != 0) { _worldContents.GetGameOjbectById(friendly.ItemNeededForSecret).IsVisible = true; if (_gameSurvivor.Inventory.Contains(_worldContents.GetGameOjbectById(friendly.ItemNeededForSecret))) { _worldContents.UnlockRoom(friendly.RoomToUnlock); friendly.Messages.Clear(); friendly.Messages.Add(friendly.SecretMessage); } } } }
public void DisplayFriendlySecretMessage(Friendly friendly) { DisplayGamePlayScreen("Secret message unlocked!", friendly.SecretMessage, ActionMenu.NpcMenu, ""); }