Spawnpoints for different jobs, spawning crew members with job-specific items, fixed issues with non-matching entity IDs between client and server, Unity-like coroutine system (connecting to server doesn't freeze the game anymore), map drawing improvements

This commit is contained in:
Regalis
2015-07-09 01:40:27 +03:00
parent d56f7f3f77
commit 2254585dac
35 changed files with 831 additions and 312 deletions
+4 -4
View File
@@ -46,7 +46,7 @@ namespace Subsurface
/// <summary>
/// If there is room, puts the item in the inventory and returns true, otherwise returns false
/// </summary>
public override bool TryPutItem(Item item, LimbSlot usedSlots, bool createNetworkEvent = true)
public override bool TryPutItem(Item item, LimbSlot allowedSlots, bool createNetworkEvent = true)
{
for (int i = 0; i < capacity; i++)
{
@@ -54,7 +54,7 @@ namespace Subsurface
if (items[i] == item) return true;
}
if (usedSlots.HasFlag(LimbSlot.Any))
if (allowedSlots.HasFlag(LimbSlot.Any))
{
for (int i = 0; i < capacity; i++)
{
@@ -68,12 +68,12 @@ namespace Subsurface
for (int i = 0; i < capacity; i++)
{
if (usedSlots.HasFlag(limbSlots[i]) && items[i]!=null) return false;
if (allowedSlots.HasFlag(limbSlots[i]) && items[i]!=null) return false;
}
for (int i = 0; i < capacity; i++)
{
if (usedSlots.HasFlag(limbSlots[i]) && items[i] == null)
if (allowedSlots.HasFlag(limbSlots[i]) && items[i] == null)
{
PutItem(item, i, createNetworkEvent);
item.Equip(character);