1717 ("walkable" , bool ), # True if this tile can be walked over.
1818 ("transparent" , bool ), # True if this tile doesn't block FOV.
1919 ("dark" , graphic_dt ), # Graphics for when this tile is not in FOV.
20- ("autotile" , bool ) # If the Tile will be set to this symbols to make boders: ─│┌┐└┘
20+ ("light" , graphic_dt ), # Graphics for when the tile is in FOV.
21+ ("autotile" , bool ), # If the Tile will be set to this symbols to make boders: ─│┌┐└┘
2122 ]
2223)
2324
25+ # SHROUD represents unexplored, unseen tiles
26+ SHROUD = np .array ((ord (" " ), (255 , 255 , 255 ), (0 , 0 , 0 )), dtype = graphic_dt )
2427
2528def new_tile (
2629 * , # Enforce the use of keywords, so that parameter order doesn't matter.
2730 walkable : int ,
2831 transparent : int ,
2932 dark : Tuple [int , Tuple [int , int , int ], Tuple [int , int , int ]],
33+ light : Tuple [int , Tuple [int , int , int ], Tuple [int , int , int ]],
3034 autotile : bool ,
3135) -> np .ndarray :
3236 """Helper function for defining individual tile types """
33- return np .array ((walkable , transparent , dark , autotile ), dtype = tile_dt )
37+ return np .array ((walkable , transparent , dark , light , autotile ), dtype = tile_dt )
3438
3539
3640floor = new_tile (
37- walkable = True , transparent = True , dark = (ord ("." ), (102 , 0 , 51 ), (0 , 0 , 0 )), autotile = False
41+ walkable = True , transparent = True , light = (ord ("." ), (102 , 0 , 51 ), ( 0 , 0 , 0 )), dark = ( ord ( "." ), ( 51 , 51 , 51 ), (0 , 0 , 0 )), autotile = False
3842)
3943wall = new_tile (
40- walkable = False , transparent = False , dark = (ord (" " ), (153 , 0 , 153 ), (0 ,0 ,0 )), autotile = True
44+ walkable = False , transparent = False , light = (ord (" " ), (153 , 0 , 153 ), (0 ,0 ,0 )), dark = ( ord ( " " ), ( 51 , 51 , 51 ), ( 0 , 0 , 0 )), autotile = True
4145)
0 commit comments