mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[server] Be more chatty about what's going on
This commit is contained in:
parent
31d9507fdb
commit
6e58139eea
4 changed files with 15 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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!"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue