1
0
Fork 0
mirror of https://github.com/tonytins/dressupzack synced 2025-05-07 14:04:48 -04:00

More dynamic DLC loading

This commit is contained in:
Anthony Foxclaw 2020-07-05 01:52:52 -04:00
parent 6b75ee1c88
commit dcf583b303
2 changed files with 13 additions and 6 deletions

View file

@ -90,6 +90,7 @@ name_casing=1
[rendering] [rendering]
quality/driver/driver_name="GLES2"
quality/intended_usage/framebuffer_allocation=0 quality/intended_usage/framebuffer_allocation=0
quality/intended_usage/framebuffer_allocation.mobile=0 quality/intended_usage/framebuffer_allocation.mobile=0
quality/2d/use_pixel_snap=true quality/2d/use_pixel_snap=true

View file

@ -10,13 +10,19 @@ onready var undies_grid = $Underwear/UndiesScroll/UndiesGrid
onready var accs_grid = $Accessoires/AccsScroll/AccsGrid onready var accs_grid = $Accessoires/AccsScroll/AccsGrid
func _ready(): func _ready():
var load_pck = ProjectSettings.load_resource_pack("user://dlc/pack.pck") var dir = Directory.new()
if load_pck == true: if dir.open("user://dlc") == OK:
# All the button scenes are consolidated dir.list_dir_begin()
# in a root scene and and each parent if "pck" in dir.get_next() == true:
# is instanced to their respective grid var load_pcks = ProjectSettings.load_resource_pack(dir.get_next(), false)
var import_scene = load("res://scenes/dlc/pants.tscn") if load_pcks == true:
if dir.open("res://scenes/dlc") == OK:
var file_name = dir.get_next()
dir.change_dir("shirts")
if dir.current_is_dir() == "shirts":
var shirt_dlc = load(dir.get_next())
shirts_grid.get_children(shirt_dlc)
func _on_removeAccessory_pressed(): func _on_removeAccessory_pressed():
character.accessory = blank_top character.accessory = blank_top