Example #1
0
 def snap_to_terrain(self):
     if app.is_terrain_cell_mode_active():
         cjr.show_error_message(
             "Function not available when terrain cell mode is active"
             )
     else:
         if self.has_entities_selected_in_summoner():
             snapped_ok = app.get_object_state().snapselectiontoterrain()
             if not snapped_ok:
                 cjr.show_error_message(
                     "Failed to snap selected items to terrain"
                     )
         else:
             cjr.show_error_message(
                 "There are no entities currently selected in Summoner"
                 )
Example #2
0
 def select_entity_in_summoner(self, idx):
     """ Select entity in Summoner. Return true if
     selected OK, otherwise false."""
     entity_id = self.__get_entity_id_for_row(idx)
     entity = self.__get_entity_with_id(entity_id)
     if self.can_entity_be_selected_in_summoner(entity):
         if app.is_terrain_cell_mode_active():
             cjr.show_error_message(
                 "Entity %s cannot be selected in Summoner "\
                 "when in terrain cell mode." % entity_id
                 )
             return False
         else:
             app.get_object_state().addentitytoselection(entity_id)
             return True
     else:
         return False