added replace argument to resmgr.loadbatch()

This commit is contained in:
JeremyStar™ 2023-07-07 22:30:19 +02:00
parent c5a8432da4
commit 7bca9910fb

View file

@ -25,11 +25,11 @@ func unloadres(resname:String) -> void:
return return
resources.erase(resname) resources.erase(resname)
func loadbatch(batch:Dictionary) -> void: func loadbatch(batch:Dictionary,replace:bool = false) -> void:
if batch == {}: if batch == {}:
Logger.error("resmgr","Loading a batch failed: Batch is empty") Logger.error("resmgr","Loading a batch failed: Batch is empty")
for i in batch: for i in batch:
loadres(i,batch[i]) loadres(i,batch[i],replace)
func unloadbatch(batch:Array) -> void: func unloadbatch(batch:Array) -> void:
if batch == []: if batch == []: