mirror of
https://github.com/duckduckdoof/miniopolis.git
synced 2025-03-15 00:51:20 +00:00
Updated type to class
This commit is contained in:
parent
38c4df055f
commit
50dde0e5c9
2 changed files with 4 additions and 3 deletions
|
@ -37,7 +37,8 @@ class GameLogic:
|
|||
# is legal.
|
||||
e_tiles = arcade.get_sprites_at_point((x,y), self.scene[LAYER_ENVIRONMENT])
|
||||
if len(e_tiles) == 1:
|
||||
env_tile_type = e_tiles[0].properties['type']
|
||||
print(e_tiles[0].properties)
|
||||
env_tile_type = e_tiles[0].properties['class']
|
||||
c_x, c_y = e_tiles[0].center_x, e_tiles[0].center_y
|
||||
|
||||
# Determine what sprite object to place
|
||||
|
|
|
@ -134,14 +134,14 @@ class GameBoard(arcade.Window):
|
|||
# Checking structure tile type
|
||||
s_tiles = arcade.get_sprites_at_point((x,y), self.scene[LAYER_STRUCTURES])
|
||||
if len(s_tiles) == 1:
|
||||
self.selected_struct_tile = s_tiles[0].properties['type']
|
||||
self.selected_struct_tile = s_tiles[0].properties['class']
|
||||
else:
|
||||
self.selected_struct_tile = "[Nothing]"
|
||||
|
||||
# Checking environment tile type
|
||||
e_tiles = arcade.get_sprites_at_point((x,y), self.scene[LAYER_ENVIRONMENT])
|
||||
if len(e_tiles) == 1:
|
||||
self.selected_env_tile = e_tiles[0].properties['type']
|
||||
self.selected_env_tile = e_tiles[0].properties['class']
|
||||
else:
|
||||
self.selected_env_tile = GROUND
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue