using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Omegasis.NightOwl.Framework
{
public class NightOwlAPI
{
///
/// Adds an event that triggers after the player has been warped to their pre-collapse position.
///
/// The id of the event.
/// The code that triggers.
public void addPostWarpEvent(string ID,Func Action)
{
NightOwl.PostWarpCharacter.Add(ID, Action);
}
///
/// Removes an event that triggers when the player has been warped to their pre-collapse position.
///
///
public void removePostWarpEvent(string ID)
{
if (NightOwl.PostWarpCharacter.ContainsKey(ID))
{
NightOwl.PostWarpCharacter.Remove(ID);
}
}
///
/// Adds an event that triggers when the player has stayed up all night until 6:00 A.M.
///
/// The id of the event.
/// The code that triggers.
public void addPlayerUpLateEvent(string ID, Func Action)
{
NightOwl.OnPlayerStayingUpLate.Add(ID, Action);
}
///
/// Removes an event that triggers when the player has stayed up all night.
///
///
public void removePlayerUpLateEvent(string ID)
{
if (NightOwl.OnPlayerStayingUpLate.ContainsKey(ID))
{
NightOwl.OnPlayerStayingUpLate.Remove(ID);
}
}
}
}