Преглед изворни кода

Correctly say the stance needed for the action.

Reddo пре 5 година
родитељ
комит
07efc2ede8
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      app/World/Classes/Action.ts

+ 2 - 2
app/World/Classes/Action.ts

@@ -155,10 +155,10 @@ Action.check.addRule(
             if (actor instanceof Person) {
                 if (action.allowedStances.indexOf(actor.stance) == -1) {
                     if (action.actor == WorldState.player) {
-                        action.say = new Say("You can't do that while ", PersonStanceNames[actor.stance], ", you need to be ", PersonStanceNames[actor.stance], ".");
+                        action.say = new Say("You can't do that while ", PersonStanceNames[actor.stance], ", you need to be ", PersonStanceNames[action.allowedStances[0]], ".");
                     }
-                    return false;
                     action.stop();
+                    return false;
                 }
             }
         }