← Back to team overview

mudlet-makers team mailing list archive

[Bug 1676086] [NEW] Unable to clear south-east exit from 2D map "Room Exits" dialog

 

Public bug reported:

I've found a typo in the dlgRoomExits::save() code which manifests as being not able to clear a south east exit, looking at the code for 3.0.0 I can see that in commit-f2fa6f4e51381e06beb0ac20509e03031060a71d (from 2015-02-07 10:57:12) I had copy/paste/modified but left one entry with the value DIR_SOUTHWEST when it should have been DIR_SOUTHEAST, the following is something patch-ish that shows the repair to be done:
@@ -513,21 +513,21 @@ void dlgRoomExits::save()
         if( originalExits.value( DIR_SOUTHEAST )->destination != se->text().toInt() ) {
             pR->setExit( se->text().toInt(), DIR_SOUTHEAST );
         }
         if (pR->hasExitStub(DIR_SOUTHEAST))
             pR->setExitStub(DIR_SOUTHEAST, false);
         if (weight_se->value())
             pR->setExitWeight( QStringLiteral("se"), weight_se->value());
         else
             pR->setExitWeight( QStringLiteral("se"), 0);
     } else {
-        if( originalExits.value( DIR_SOUTHWEST )->destination > 0 ) {
+        if( originalExits.value( DIR_SOUTHEAST )->destination > 0 ) {
             pR->setExit( -1, DIR_SOUTHEAST );
         }
         if (stub_se->isChecked() != pR->hasExitStub(DIR_SOUTHEAST))
             pR->setExitStub(DIR_SOUTHEAST, stub_se->isChecked());
         pR->setExitWeight( QStringLiteral("se"), 0);
         pR->customLinesArrow.remove( QStringLiteral("SE") );
         pR->customLinesColor.remove( QStringLiteral("SE") );
         pR->customLinesStyle.remove( QStringLiteral("SE") );
         pR->customLines.remove( QStringLiteral("SE") );
     }

This error is also present in the development branch when a whole series
of commits were ported across in commit-
11b9331133208ea70097dc805ebae8e1397dc58e (from 2015-08-15 22:15:39).

Given that this bug has been present for 1.5 to 2 years I guess it
hasn't hit too many people, and it can be worked around by
setting/clearing a room's south-east exit with a lua command.  OTOH it
is straightforward to correct with a low danger of unwanted side effects
so could be done quickly when possible IMHO.

** Affects: mudlet
     Importance: Undecided
         Status: New

** Description changed:

  I've found a typo in the dlgRoomExits::save() code which manifests as being not able to clear a south east exit, looking at the code for 3.0.0 I can see that in commit-f2fa6f4e51381e06beb0ac20509e03031060a71d (from 2015-02-07 10:57:12) I had copy/paste/modified but left one entry with the value DIR_SOUTHWEST when it should have been DIR_SOUTHEAST, the following is something patch-ish that shows the repair to be done:
  @@ -513,21 +513,21 @@ void dlgRoomExits::save()
-          if( originalExits.value( DIR_SOUTHEAST )->destination != se->text().toInt() ) {
-              pR->setExit( se->text().toInt(), DIR_SOUTHEAST );
-          }
-          if (pR->hasExitStub(DIR_SOUTHEAST))
-              pR->setExitStub(DIR_SOUTHEAST, false);
-          if (weight_se->value())
-              pR->setExitWeight( QStringLiteral("se"), weight_se->value());
-          else
-              pR->setExitWeight( QStringLiteral("se"), 0);
-      } else {
+          if( originalExits.value( DIR_SOUTHEAST )->destination != se->text().toInt() ) {
+              pR->setExit( se->text().toInt(), DIR_SOUTHEAST );
+          }
+          if (pR->hasExitStub(DIR_SOUTHEAST))
+              pR->setExitStub(DIR_SOUTHEAST, false);
+          if (weight_se->value())
+              pR->setExitWeight( QStringLiteral("se"), weight_se->value());
+          else
+              pR->setExitWeight( QStringLiteral("se"), 0);
+      } else {
  -        if( originalExits.value( DIR_SOUTHWEST )->destination > 0 ) {
  +        if( originalExits.value( DIR_SOUTHEAST )->destination > 0 ) {
-              pR->setExit( -1, DIR_SOUTHEAST );
-          }
-          if (stub_se->isChecked() != pR->hasExitStub(DIR_SOUTHEAST))
-              pR->setExitStub(DIR_SOUTHEAST, stub_se->isChecked());
-          pR->setExitWeight( QStringLiteral("se"), 0);
-          pR->customLinesArrow.remove( QStringLiteral("SE") );
-          pR->customLinesColor.remove( QStringLiteral("SE") );
-          pR->customLinesStyle.remove( QStringLiteral("SE") );
-          pR->customLines.remove( QStringLiteral("SE") );
-      }
+              pR->setExit( -1, DIR_SOUTHEAST );
+          }
+          if (stub_se->isChecked() != pR->hasExitStub(DIR_SOUTHEAST))
+              pR->setExitStub(DIR_SOUTHEAST, stub_se->isChecked());
+          pR->setExitWeight( QStringLiteral("se"), 0);
+          pR->customLinesArrow.remove( QStringLiteral("SE") );
+          pR->customLinesColor.remove( QStringLiteral("SE") );
+          pR->customLinesStyle.remove( QStringLiteral("SE") );
+          pR->customLines.remove( QStringLiteral("SE") );
+      }
  
  This error is also present in the development branch when a whole series
  of commits were ported across in commit-
  11b9331133208ea70097dc805ebae8e1397dc58e (from 2015-08-15 22:15:39).
  
- Given that this bug has been present for 1.5 to 2 years I guess it hasn't hit too many people, and it can be worked around by setting/clearing a room's south-east exit with a lua command.  OTOH it is
- straightforward to correct with a low danger of unwanted side effects so could be done quickly when
- possible IMHO.
+ Given that this bug has been present for 1.5 to 2 years I guess it
+ hasn't hit too many people, and it can be worked around by
+ setting/clearing a room's south-east exit with a lua command.  OTOH it
+ is straightforward to correct with a low danger of unwanted side effects
+ so could be done quickly when possible IMHO.

-- 
You received this bug notification because you are a member of Mudlet
Makers, which is subscribed to Mudlet.
https://bugs.launchpad.net/bugs/1676086

Title:
  Unable to clear south-east exit from 2D map "Room Exits" dialog

Status in Mudlet:
  New

Bug description:
  I've found a typo in the dlgRoomExits::save() code which manifests as being not able to clear a south east exit, looking at the code for 3.0.0 I can see that in commit-f2fa6f4e51381e06beb0ac20509e03031060a71d (from 2015-02-07 10:57:12) I had copy/paste/modified but left one entry with the value DIR_SOUTHWEST when it should have been DIR_SOUTHEAST, the following is something patch-ish that shows the repair to be done:
  @@ -513,21 +513,21 @@ void dlgRoomExits::save()
           if( originalExits.value( DIR_SOUTHEAST )->destination != se->text().toInt() ) {
               pR->setExit( se->text().toInt(), DIR_SOUTHEAST );
           }
           if (pR->hasExitStub(DIR_SOUTHEAST))
               pR->setExitStub(DIR_SOUTHEAST, false);
           if (weight_se->value())
               pR->setExitWeight( QStringLiteral("se"), weight_se->value());
           else
               pR->setExitWeight( QStringLiteral("se"), 0);
       } else {
  -        if( originalExits.value( DIR_SOUTHWEST )->destination > 0 ) {
  +        if( originalExits.value( DIR_SOUTHEAST )->destination > 0 ) {
               pR->setExit( -1, DIR_SOUTHEAST );
           }
           if (stub_se->isChecked() != pR->hasExitStub(DIR_SOUTHEAST))
               pR->setExitStub(DIR_SOUTHEAST, stub_se->isChecked());
           pR->setExitWeight( QStringLiteral("se"), 0);
           pR->customLinesArrow.remove( QStringLiteral("SE") );
           pR->customLinesColor.remove( QStringLiteral("SE") );
           pR->customLinesStyle.remove( QStringLiteral("SE") );
           pR->customLines.remove( QStringLiteral("SE") );
       }

  This error is also present in the development branch when a whole
  series of commits were ported across in commit-
  11b9331133208ea70097dc805ebae8e1397dc58e (from 2015-08-15 22:15:39).

  Given that this bug has been present for 1.5 to 2 years I guess it
  hasn't hit too many people, and it can be worked around by
  setting/clearing a room's south-east exit with a lua command.  OTOH it
  is straightforward to correct with a low danger of unwanted side
  effects so could be done quickly when possible IMHO.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mudlet/+bug/1676086/+subscriptions


Follow ups