game: fix placeholder texture in autoload
This commit is contained in:
@@ -19,7 +19,7 @@ const GROUP_PICKUP = "pickup"
|
||||
|
||||
enum ModRarity { LEGENDARY, EPIC, RARE, NORMAL }
|
||||
|
||||
var placeholder_tex: Texture2D
|
||||
const placeholder_tex = preload("res://assets/sprites/64x64_placeholder.tres")
|
||||
|
||||
var MOD_CHOICES = [
|
||||
{
|
||||
@@ -80,11 +80,6 @@ var MOD_CHOICES = [
|
||||
]
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
placeholder_tex = PlaceholderTexture2D.new()
|
||||
placeholder_tex.size = Vector2(64.0, 64.0)
|
||||
|
||||
|
||||
func _draw_random_choice(fortune: float = 1.0) -> Dictionary:
|
||||
var total_weight: int = 0
|
||||
for choice in MOD_CHOICES:
|
||||
@@ -107,6 +102,7 @@ func draw_random_mod(fortune: float = 1.0) -> PlayerStatsModifier:
|
||||
mod.description = choice["description"]
|
||||
mod.internal_name = choice["internal_name"]
|
||||
mod.tex = choice["tex"]
|
||||
print_debug("gc: %s" % mod.tex)
|
||||
mod.title = choice["name"]
|
||||
|
||||
return mod
|
||||
|
Reference in New Issue
Block a user