Skip to content

Commit

Permalink
Fixed double / in path that would cause loading issue in exported pro…
Browse files Browse the repository at this point in the history
…jects.
  • Loading branch information
BraindeadBZH committed May 10, 2021
1 parent dc4cc18 commit 1c805fe
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 24 deletions.
2 changes: 1 addition & 1 deletion _private/containers/card_list/card_list_private.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/cardengine/container/abstract_container.tscn" type="PackedScene" id=1]
[ext_resource path="res://_private/containers//card_list/card_list_private.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/card_list/card_list_private.gd" type="Script" id=2]

[node name="CardListPrivate" instance=ExtResource( 1 )]
script = ExtResource( 2 )
Expand Down
2 changes: 1 addition & 1 deletion _private/containers/hand/hand_private.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/cardengine/container/abstract_container.tscn" type="PackedScene" id=1]
[ext_resource path="res://_private/containers//hand/hand_private.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/hand/hand_private.gd" type="Script" id=2]

[node name="HandContainerPrivate" instance=ExtResource( 1 )]
script = ExtResource( 2 )
Expand Down
3 changes: 1 addition & 2 deletions _private/containers/hidden_pile/hidden_pile_private.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/cardengine/container/abstract_container.tscn" type="PackedScene" id=1]
[ext_resource path="res://_private/containers//hidden_pile/hidden_pile_private.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/hidden_pile/hidden_pile_private.gd" type="Script" id=2]

[node name="HiddenPilePrivate" instance=ExtResource( 1 )]
script = ExtResource( 2 )

2 changes: 1 addition & 1 deletion _private/containers/home_display/home_display_private.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/cardengine/container/abstract_container.tscn" type="PackedScene" id=1]
[ext_resource path="res://_private/containers//home_display/home_display_private.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/home_display/home_display_private.gd" type="Script" id=2]

[node name="HomeDisplayPrivate" instance=ExtResource( 1 )]
script = ExtResource( 2 )
Expand Down
2 changes: 1 addition & 1 deletion _private/containers/token_grid/token_grid_private.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/cardengine/container/abstract_container.tscn" type="PackedScene" id=1]
[ext_resource path="res://_private/containers//token_grid/token_grid_private.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/token_grid/token_grid_private.gd" type="Script" id=2]

[node name="TokenGridPrivate" instance=ExtResource( 1 )]
script = ExtResource( 2 )
Expand Down
2 changes: 1 addition & 1 deletion _private/containers/visible_pile/visible_pile_private.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://addons/cardengine/container/abstract_container.tscn" type="PackedScene" id=1]
[ext_resource path="res://_private/containers//visible_pile/visible_pile_private.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/visible_pile/visible_pile_private.gd" type="Script" id=2]

[node name="VisiblePilePrivate" instance=ExtResource( 1 )]
script = ExtResource( 2 )
Expand Down
3 changes: 2 additions & 1 deletion addons/cardengine/animation/animation_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extends AbstractManager

signal changed()

const FORMAT_FILE_PATH = "%s/%s"
const FORMAT_ANIM_PATH = "%s/%s.data"

var _folder: String = ""
Expand Down Expand Up @@ -53,7 +54,7 @@ func load_animations(anim_folder: String) -> void:
var filename = dir.get_next()
while filename != "":
if Utils.is_anim_file(filename):
var anim = _read_animation(_folder + filename)
var anim = _read_animation(FORMAT_FILE_PATH % [_folder, filename])
_animations[anim.id] = anim
filename = dir.get_next()
dir.list_dir_end()
Expand Down
1 change: 1 addition & 0 deletions addons/cardengine/container/abstract_container.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ mouse_filter = 1
__meta__ = {
"_edit_use_anchors_": false
}

[connection signal="resized" from="." to="." method="_on_AbstractContainer_resized"]
[connection signal="dropped" from="DropArea" to="." method="_on_DropArea_dropped"]
3 changes: 2 additions & 1 deletion addons/cardengine/database/database_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ extends AbstractManager

signal changed()

const FORMAT_FILE_PATH = "%s/%s"
const FORMAT_DB_PATH = "%s/%s.data"

var _folder: String = ""
Expand Down Expand Up @@ -129,7 +130,7 @@ func _write_database(db: CardDatabase):


func _read_database(filename: String) -> CardDatabase:
var path = _folder + filename
var path = FORMAT_FILE_PATH % [_folder, filename]
var file = ConfigFile.new()

var err = file.load(path)
Expand Down
5 changes: 2 additions & 3 deletions containers/hidden_pile/hidden_pile.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://_private/containers//hidden_pile/hidden_pile_private.tscn" type="PackedScene" id=1]
[ext_resource path="res://containers//hidden_pile/hidden_pile.gd" type="Script" id=2]
[ext_resource path="res://_private/containers/hidden_pile/hidden_pile_private.tscn" type="PackedScene" id=1]
[ext_resource path="res://containers/hidden_pile/hidden_pile.gd" type="Script" id=2]

[node name="HiddenPile" instance=ExtResource( 1 )]
script = ExtResource( 2 )

16 changes: 8 additions & 8 deletions project.cardengine
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
config_version=1

[folders]
databases="res://_private/databases/"
containers="res://containers/"
containers_private="res://_private/containers/"
container_tpl="res://addons/cardengine/container/templates/"
animations="res://_private/animations/"
effects="res://effects/"
effects_private="res://_private/effects/"
effects_tpl="res://addons/cardengine/effect/templates/"
databases="res://_private/databases"
containers="res://containers"
containers_private="res://_private/containers"
container_tpl="res://addons/cardengine/container/templates"
animations="res://_private/animations"
effects="res://effects"
effects_private="res://_private/effects"
effects_tpl="res://addons/cardengine/effect/templates"
1 change: 1 addition & 0 deletions screens/board/board_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ margin_left = -175.0
margin_right = 0.0
rect_min_size = Vector2( 0, 0 )
button_text = "MENU"

[connection signal="card_dropped" from="Board/Pile1" to="." method="_on_Pile1_card_dropped"]
[connection signal="card_dropped" from="Board/Pile2" to="." method="_on_Pile2_card_dropped"]
[connection signal="card_dropped" from="Board/Pile3" to="." method="_on_Pile3_card_dropped"]
Expand Down
1 change: 1 addition & 0 deletions screens/builder/builder_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ margin_right = 220.0
margin_bottom = 504.0
size_flags_horizontal = 3
size_flags_vertical = 3

[connection signal="item_selected" from="TitleBg/TitleLayout/CategoriesLayout/ClassLayout/Class" to="." method="_on_Class_item_selected"]
[connection signal="item_selected" from="TitleBg/TitleLayout/CategoriesLayout/RarityLayout/Rarity" to="." method="_on_Rarity_item_selected"]
[connection signal="item_selected" from="TitleBg/TitleLayout/ValuesLayout/Values" to="." method="_on_Values_item_selected"]
Expand Down
1 change: 1 addition & 0 deletions screens/game/game_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ process_mode = 0
wait_time = 0.1
one_shot = true
autostart = true

[connection signal="pressed" from="DeckZone/DrawBtn" to="." method="_on_DrawBtn_pressed"]
[connection signal="pressed" from="DiscardZone/ReshuffleBtn" to="." method="_on_ReshuffleBtn_pressed"]
[connection signal="card_clicked" from="PlayZone/TokenGrid" to="." method="_on_TokenGrid_card_clicked"]
Expand Down
9 changes: 5 additions & 4 deletions screens/menu/menu_screen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,31 @@ __meta__ = {
}

[node name="NewGameBtn" parent="ButtonsLayout" instance=ExtResource( 3 )]
margin_right = 399.0
margin_right = 400.0
button_text = "New Game"

[node name="BoardGameBtn" parent="ButtonsLayout" instance=ExtResource( 3 )]
margin_top = 112.0
margin_right = 399.0
margin_right = 400.0
margin_bottom = 220.0
button_text = "Board Demo"

[node name="BuilderBtn" parent="ButtonsLayout" instance=ExtResource( 3 )]
margin_top = 224.0
margin_right = 399.0
margin_right = 400.0
margin_bottom = 332.0
button_text = "Deck Builder"

[node name="QuitBtn" parent="ButtonsLayout" instance=ExtResource( 3 )]
margin_top = 336.0
margin_right = 399.0
margin_right = 400.0
margin_bottom = 444.0
button_text = "Quit"

[node name="HomeDisplay" parent="." instance=ExtResource( 4 )]
margin_left = 20.0
margin_top = 20.0

[connection signal="pressed" from="ButtonsLayout/NewGameBtn" to="." method="_on_NewGameBtn_pressed"]
[connection signal="pressed" from="ButtonsLayout/BoardGameBtn" to="." method="_on_BoardGameBtn_pressed"]
[connection signal="pressed" from="ButtonsLayout/BuilderBtn" to="." method="_on_BuilderBtn_pressed"]
Expand Down

0 comments on commit 1c805fe

Please sign in to comment.