haus system auf core geändert

This commit is contained in:
hydrant
2020-03-29 12:18:17 +02:00
parent 6bd3d4a3d0
commit bcfc2105ea
68 changed files with 1366 additions and 810 deletions

View File

@@ -17,6 +17,8 @@ namespace ReallifeGamemode.Server.Core.API
ITextLabelAPI TextLabel { get; }
IBlipAPI Blip { get; }
void DisableDefaultCommandErrorMessages();
void DisableDefaultSpawnBehavior();
@@ -28,5 +30,7 @@ namespace ReallifeGamemode.Server.Core.API
void SetTime(int hour, int minute, int second);
void TriggerClientEventForAll(string eventName, params object[] args);
TEntity ToEntity<TEntity>(ushort handle) where TEntity : class, IEntity;
}
}

View File

@@ -0,0 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ReallifeGamemode.Server.Core.API
{
public interface IBlip : IEntity
{
}
}

View File

@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ReallifeGamemode.Server.Core.API
{
public interface IBlipAPI
{
IBlip CreateBlip(uint sprite, Position position, string name, byte color, byte alpha, float scale, float drawDistance, bool shortRange);
}
}

View File

@@ -12,6 +12,8 @@ namespace ReallifeGamemode.Server.Core.API
double Heading { get; set; }
uint Dimension { get; set; }
void Remove();
void SetSharedData<T>(string key, T data);

View File

@@ -22,7 +22,19 @@ namespace ReallifeGamemode.Server.Core.API
VehicleSeat VehicleSeat { get; }
void SendMessage(string message, ChatPrefix prefix = ChatPrefix.None) => SendRawMessage(prefix.GetValue() + message);
void SendMessage(string message, ChatPrefix prefix = ChatPrefix.None)
{
if (!message.EndsWith("!") || !message.EndsWith(".") || !message.EndsWith("?"))
{
message += prefix switch
{
ChatPrefix.Error => "!",
ChatPrefix.Usage => string.Empty,
_ => ".",
};
}
SendRawMessage(prefix.GetValue() + message);
}
void SendRawMessage(string message);