ainslec / adventuron-issue-tracker

Adventuron Issues Tracker
4 stars 0 forks source link

Checking for UNDO as a verb selectively, stops it from working everywhere. #481

Closed ainslec closed 2 years ago

ainslec commented 2 years ago

Checking for UNDO as a verb selectively, stops it from working everywhere.

(Bug report by ChrisM)

start_at = my_location

game_settings {
  rewind_enabled   = true
}

locations {

   my_location : location "You are in a room.";
   my_location_2 : location "You are in a room 2.";
   my_location_3 : location "You are in a room 3.";

}

connections {

   from, direction, to = [
      my_location, east, my_location_2, 
      my_location_3, south, my_location, 
   ]

}

on_command {

   : if (is_at "my_location_2") {
      : if (!verb_is "load"&&!verb_is "save") {
         : print "That's not allowed here.";

      }

   }

} 

But add verb_is "UNDO" in on_command and UNDO stops working everywhere:

start_at = my_location

game_settings {
  rewind_enabled   = true
}

locations {

   my_location : location "You are in a room.";
   my_location_2 : location "You are in a room 2.";
   my_location_3 : location "You are in a room 3.";

}

connections {

   from, direction, to = [
      my_location, east, my_location_2, 
      my_location_3, south, my_location, 
   ]

}

on_command {

   : if (is_at "my_location_2") {
      : if (!verb_is "load"&&!verb_is "save"&&!verb_is "undo") {
         : print "That's not allowed here.";

      }

   }

}
ainslec commented 2 years ago

Fixed in beta 75f.