apocalyptech / eschalon_utils

Eschalon Books I, II, and III Character and Map Editors
http://apocalyptech.com/eschalon/
GNU General Public License v2.0
8 stars 3 forks source link

B3Tile._sub_equals should account for tile_flag #10

Closed apocalyptech closed 10 years ago

apocalyptech commented 10 years ago

Just what it says - will have to conditional on the savegame flag as well.

apocalyptech commented 10 years ago

Hm, and _sub_replicate() and _sub_hasdata() as well.

elliotkendallUCSF commented 10 years ago

I don't think so - B3Square is a subclass of B2Square, and all of those methods call the parent methods as well. For example:

def _sub_equals(self, square):
  """
  Equality function for B3
  """
  return (square.cartography == self.cartography and super(B3Square, self)._sub_equals(square))

def _sub_equals(self, square):   
  """
  Equality function for B2
  """
  return (square.square_flag == self.square_flag)
apocalyptech commented 10 years ago

Oh, whoops, right you are. I had just been going through during my renaming spree and hadn't noticed that square_flag (now tile_flag) was in the B2 class, not B3. Thanks for pointing it out!