robustness of tileset related functionality

This commit is contained in:
veclav talica
2023-12-25 17:29:53 +05:00
parent ec1c99ebb4
commit 85be2f7063
6 changed files with 61 additions and 23 deletions

View File

@ -6,11 +6,11 @@
[ext_resource path="res://nodes/GridContext.tscn" type="PackedScene" id=4]
[ext_resource path="res://nodes/GameObject.tscn" type="PackedScene" id=5]
[ext_resource path="res://art/tiles/brickwall.png" type="Texture" id=6]
[ext_resource path="res://nodes/TileMapObject.gd" type="Script" id=7]
[ext_resource path="res://nodes/TileMapObject.tscn" type="PackedScene" id=7]
[ext_resource path="res://scenes/tiles/Brickwall.tscn" type="PackedScene" id=8]
[sub_resource type="TileSet" id=1]
0/name = ""
0/name = "tk.Brickwall"
0/texture = ExtResource( 6 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
@ -29,14 +29,11 @@
[node name="GridContext" parent="." instance=ExtResource( 4 )]
[node name="TileMapObject" type="TileMap" parent="GridContext"]
[node name="TileMapObject" parent="GridContext" instance=ExtResource( 7 )]
scale = Vector2( 4, 4 )
tile_set = SubResource( 1 )
cell_size = Vector2( 16, 16 )
bake_navigation = true
format = 1
tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 65536, 0, 0, 65551, 0, 0, 131072, 0, 0, 131074, 0, 0, 131085, 0, 0, 131087, 0, 0, 196608, 0, 0, 196623, 0, 0, 262144, 0, 0, 262146, 0, 0, 262157, 0, 0, 262159, 0, 0, 327680, 0, 0, 327695, 0, 0, 393216, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 393223, 0, 0, 393224, 0, 0, 393225, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 0, 0, 393231, 0, 0, 458752, 0, 0, 458767, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0 )
script = ExtResource( 7 )
tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 65536, 0, 0, 65551, 0, 0, 131072, 0, 0, 131087, 0, 0, 196608, 0, 0, 196623, 0, 0, 262144, 0, 0, 262159, 0, 0, 327680, 0, 0, 327695, 0, 0, 393216, 0, 0, 393231, 0, 0, 458752, 0, 0, 458767, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0 )
[node name="Brickwall" parent="GridContext/TileMapObject" instance=ExtResource( 8 )]

View File

@ -7,3 +7,4 @@
script = ExtResource( 2 )
texture = ExtResource( 1 )
is_solid = true
id = "tk.Brickwall"