1
0
Fork 0

[server] Be more chatty about what's going on

This commit is contained in:
Starbeamrainbowlabs 2017-04-23 18:06:58 +01:00
parent 31d9507fdb
commit 6e58139eea
4 changed files with 15 additions and 1 deletions

View File

@ -69,6 +69,8 @@ namespace Nibriboard.Client
if(!currentLines.ContainsKey(lineId))
throw new KeyNotFoundException("Error: A line with that id wasn't found in this LineIncubator.");
Log.WriteLine("[LineIncubator] Completing line #{0}", lineId);
DrawnLine completedLine = currentLines[lineId];
currentLines.Remove(lineId);

View File

@ -381,6 +381,7 @@ namespace Nibriboard.Client
if(CurrentPlane == null)
{
Log.WriteLine("[NibriClient#{0}] Attempt to complete a line before selecting a plane - ignoring");
Send(new ErrorMessage() {
Message = "Error: You can't complete a line until you've selected a plane " +
"to draw it on!"

View File

@ -178,6 +178,15 @@ namespace Nibriboard.RippleSpace
/// <param name="eventArgs">The event arguments associated with the chunk update.</param>
protected void handleChunkUpdate(object sender, ChunkUpdateEventArgs eventArgs)
{
Chunk updatingChunk = sender as Chunk;
if(updatingChunk == null)
{
Log.WriteLine("[Plane {0}] Invalid chunk update event captured - ignoring.");
return;
}
Log.WriteLine("[Plane {0}] Chunk at {1} {2} updated", Name, updatingChunk.Location, eventArgs.UpdateType);
// Make the chunk update bubble up to plane-level
OnChunkUpdate(sender, eventArgs);
}

View File

@ -64,7 +64,9 @@ namespace Nibriboard.RippleSpace
{
if(this[newPlaneName] != null)
throw new InvalidOperationException($"Error: A plane with the name '{newPlaneName}' already exists in this RippleSpaceManager.");
Log.WriteLine("[RippleSpace] Creating plane {0}", newPlaneName);
Plane newPlane = new Plane(newPlaneName, DefaultChunkSize);
Planes.Add(newPlane);
return newPlane;