/// <summary>
 /// Transaction object for atomic operations
 /// </summary>
 /// <returns></returns>
 public static DwarfTransaction Atomic( Command cmd )
 {
     return new DwarfTransaction( cmd );
 }
 /// <summary>
 /// Add new command into a commands queue
 /// </summary>
 /// <param name="cmd"></param>
 public void AddCommand( Command cmd )
 {
     if ( !is_atomic && commands_chain.Count == 0 )
         commands_chain.Enqueue(cmd);
 }
 public DwarfTransaction( Command cmd )
 {
     AddCommand( cmd );
 }