sg lore entry uses palette

This commit is contained in:
pennyrigate 2023-11-21 18:11:42 -05:00
parent 33b8e191f3
commit b7960f82c0
2 changed files with 8 additions and 1 deletions

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=2] [gd_scene load_steps=7 format=2]
[ext_resource path="res://shaders/recolor_border.shader" type="Shader" id=1] [ext_resource path="res://shaders/recolor_border.shader" type="Shader" id=1]
[ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=2] [ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=2]
[ext_resource path="res://objects/lore/hills/sg_palette_lore.gd" type="Script" id=3]
[ext_resource path="res://objects/lore/hills/sg.gd" type="Script" id=4] [ext_resource path="res://objects/lore/hills/sg.gd" type="Script" id=4]
[ext_resource path="res://graphics/player/sg_idle.png" type="Texture" id=5] [ext_resource path="res://graphics/player/sg_idle.png" type="Texture" id=5]
@ -16,6 +17,7 @@ script = ExtResource( 4 )
[node name="TextureRect" parent="Panel" index="0"] [node name="TextureRect" parent="Panel" index="0"]
material = SubResource( 1 ) material = SubResource( 1 )
texture = ExtResource( 5 ) texture = ExtResource( 5 )
script = ExtResource( 3 )
[node name="Control" parent="." index="1"] [node name="Control" parent="." index="1"]
margin_top = 55.0 margin_top = 55.0

View file

@ -0,0 +1,5 @@
extends TextureRect
func _ready():
var palette = load("res://graphics/player/palettes/%s.png" % Game.current_palette)
material.set_shader_param("palette", palette)