Use console logs instead of Screen logs (better for Mod Manager)

This commit is contained in:
Ricardo Lopes 2020-05-21 00:03:43 +02:00
parent 31ceab17ce
commit 375437f6f8
5 changed files with 11 additions and 8 deletions

View File

@ -66,6 +66,5 @@ namespace QSB
Screen(logObjects);
HUD(logObjects);
}
}
}

View File

@ -124,7 +124,7 @@ namespace QSB
public override void OnStopClient()
{
DebugLog.Screen("OnStopClient");
DebugLog.Console("OnStopClient");
Destroy(GetComponent<SectorSync>());
Destroy(GetComponent<PlayerJoin>());
Destroy(GetComponent<PlayerLeave>());
@ -137,7 +137,7 @@ namespace QSB
public override void OnServerDisconnect(NetworkConnection conn)
{
DebugLog.Screen("OnServerDisconnect");
DebugLog.Console("OnServerDisconnect");
var playerId = conn.playerControllers[0].gameObject.GetComponent<PlayerTransformSync>().netId.Value;
var objectIds = conn.clientOwnedObjects.Select(x => x.Value).ToArray();

View File

@ -68,6 +68,10 @@ namespace QSB.TimeSync
_shipSpawnPoint.transform.position = shipTransform.position;
_shipSpawnPoint.transform.rotation = shipTransform.rotation;
}
else
{
DebugLog.Console("Error: Ship Transform not found");
}
_deathHandler = new MessageHandler<DeathMessage>();
_deathHandler.OnServerReceiveMessage += OnServerReceiveMessage;

View File

@ -68,11 +68,11 @@ namespace QSB.TransformSync
}
if (collider.GetComponentInParent(_localColliderType) || collider.GetComponent<RigidbodySync>())
{
DebugLog.Screen(gameObject.name, "occupied by", collider.name);
DebugLog.Console(gameObject.name, "occupied by", collider.name);
return;
}
}
DebugLog.Screen("Enable collisions for", gameObject.name);
DebugLog.Console("Enable collisions for", gameObject.name);
_collider.isTrigger = false;
}
@ -80,7 +80,7 @@ namespace QSB.TransformSync
{
if (!_collider.isTrigger && (_prevPosition - transform.position).sqrMagnitude > _collisionDisableMovementThreshold)
{
DebugLog.Screen("Disable collisions for", gameObject.name);
DebugLog.Console("Disable collisions for", gameObject.name);
_collider.isTrigger = true;
}
_prevPosition = transform.position;

View File

@ -39,7 +39,7 @@ namespace QSB.TransformSync
private void Start()
{
Instance = this;
DebugLog.Screen("Start SectorSync");
DebugLog.Console("Start SectorSync");
_playerSectors = new Dictionary<uint, Transform>();
_sectorHandler = new MessageHandler<SectorMessage>();
@ -61,7 +61,7 @@ namespace QSB.TransformSync
public void SetSector(uint id, Sector.Name sectorName)
{
DebugLog.Screen("Gonna set sector");
DebugLog.Console("Gonna set sector");
_playerSectors[id] = FindSectorTransform(sectorName);