Merge develop into feature/inventory-system

This commit is contained in:
VegaZ
2018-11-26 17:53:25 +01:00
66 changed files with 4533 additions and 1302 deletions

25
Main.cs
View File

@@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore;
using reallife_gamemode.Model;
using reallife_gamemode.Server.Entities;
using reallife_gamemode.Server.Managers;
using reallife_gamemode.Server.Saves;
using reallife_gamemode.Server.Util;
/**
* @overview Life of German Reallife - Main Class (Main.cs)
@@ -22,6 +24,8 @@ namespace reallife_gamemode
[ServerEvent(Event.ResourceStart)]
public void OnResourceStart()
{
NAPI.Server.SetGlobalServerChat(false);
NAPI.Server.SetCommandErrorMessage("~r~[FEHLER]~s~ Dieser Command existiert nicht.");
NAPI.Server.SetDefaultSpawnLocation(DEFAULT_SPAWN_POSITION, DEFAULT_SPAWN_HEADING);
NAPI.Server.SetAutoSpawnOnConnect(false);
@@ -29,17 +33,22 @@ namespace reallife_gamemode
NAPI.Data.SetWorldData("playerCreatorDimension", 0);
InventoryManager.LoadItems();
TuningManager.AddTuningGarage(new Vector3(-341, -134, 38.5));
DatabaseHelper.InitDatabaseFirstTime();
FactionHelper.CheckFactionBankAccounts();
TuningManager.AddTuningGarage(new Vector3(-341, -134, 38.5), new Vector3(-334, -143, 41));
using (var context = new DatabaseContext())
TempBlip tempBlip = new TempBlip()
{
context.Bans.FirstOrDefault();
Color = 1,
Name = "",
Transparency = 0,
ShortRange = true,
Sprite = 1,
Scale = 1,
};
context.Factions.FirstOrDefault();
context.Users.FirstOrDefault();
context.SaveChanges();
}
NAPI.Data.SetWorldData("blipTemplate", tempBlip);
}
}
}
}