mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 15:38:14 +00:00
Resource Pack Expansion Pt. 1
- Fixed Disclaimer Screen not playing Sound Effects loaded from the Resource Pack - Fixed Quit Dialog not playing Beep.wav loaded from Resource Packs - Fixed the Campaign Icons not loading the Resource Pack textures (in fairness the only icon applicable is the Custom Levels one)
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://v2lub78wus46" path="res://Assets/Sprites/UI/CampaignIcons.png" id="3_6ft85"]
|
[ext_resource type="Texture2D" uid="uid://v2lub78wus46" path="res://Assets/Sprites/UI/CampaignIcons.png" id="3_6ft85"]
|
||||||
[ext_resource type="Script" uid="uid://ca3bew33g45eq" path="res://Scripts/Classes/UI/PackTextureRect.gd" id="4_uaivh"]
|
[ext_resource type="Script" uid="uid://ca3bew33g45eq" path="res://Scripts/Classes/UI/PackTextureRect.gd" id="4_uaivh"]
|
||||||
[ext_resource type="Script" uid="uid://co6tjg3w6qpd8" path="res://Scripts/Parts/LabelFontChanger.gd" id="6_1wxv0"]
|
[ext_resource type="Script" uid="uid://co6tjg3w6qpd8" path="res://Scripts/Parts/LabelFontChanger.gd" id="6_1wxv0"]
|
||||||
[ext_resource type="Resource" uid="uid://8dcuxbc3h2u2" path="res://Resources/ThemedResources/Font.tres" id="7_l766q"]
|
[ext_resource type="Script" uid="uid://bsp584niccobr" path="res://Scripts/Classes/Components/ResourceGetter.gd" id="6_6ft85"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6ft85"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6ft85"]
|
||||||
atlas = ExtResource("3_6ft85")
|
atlas = ExtResource("3_6ft85")
|
||||||
@@ -215,5 +215,8 @@ vertical_alignment = 2
|
|||||||
[node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
|
[node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
|
||||||
script = ExtResource("6_1wxv0")
|
script = ExtResource("6_1wxv0")
|
||||||
labels = [NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMB1"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/SelectWorld"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMBLL"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMBS"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMBANN"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/Custom"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/BarLabel")]
|
labels = [NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMB1"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/SelectWorld"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMBLL"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMBS"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/SMBANN"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/CampaignNames/Custom"), NodePath("../PanelContainer/MarginContainer/VBoxContainer/BarLabel")]
|
||||||
resource = ExtResource("7_l766q")
|
|
||||||
metadata/_custom_type_script = "uid://co6tjg3w6qpd8"
|
metadata/_custom_type_script = "uid://co6tjg3w6qpd8"
|
||||||
|
|
||||||
|
[node name="ResourceGetter" type="Node" parent="."]
|
||||||
|
script = ExtResource("6_6ft85")
|
||||||
|
metadata/_custom_type_script = "uid://bsp584niccobr"
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://b75f3fd7xjeya"]
|
[gd_scene load_steps=7 format=3 uid="uid://b75f3fd7xjeya"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://fwgm5xy4jvwf" path="res://Scripts/UI/QuitDialog.gd" id="1_w3irg"]
|
[ext_resource type="Script" uid="uid://fwgm5xy4jvwf" path="res://Scripts/UI/QuitDialog.gd" id="1_w3irg"]
|
||||||
[ext_resource type="AudioStream" uid="uid://drs3md0tuek2w" path="res://Assets/Audio/SFX/Beep.wav" id="2_yapnp"]
|
[ext_resource type="AudioStream" uid="uid://drs3md0tuek2w" path="res://Assets/Audio/SFX/Beep.wav" id="2_yapnp"]
|
||||||
|
[ext_resource type="Script" uid="uid://bsp584niccobr" path="res://Scripts/Classes/Components/ResourceGetter.gd" id="3_kfsue"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_yapnp"]
|
[sub_resource type="Animation" id="Animation_yapnp"]
|
||||||
resource_name = "Animation"
|
resource_name = "Animation"
|
||||||
@@ -105,3 +106,7 @@ libraries = {
|
|||||||
|
|
||||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||||
stream = ExtResource("2_yapnp")
|
stream = ExtResource("2_yapnp")
|
||||||
|
|
||||||
|
[node name="ResourceGetter" type="Node" parent="."]
|
||||||
|
script = ExtResource("3_kfsue")
|
||||||
|
metadata/_custom_type_script = "uid://bsp584niccobr"
|
||||||
|
@@ -11,6 +11,11 @@ func _enter_tree() -> void:
|
|||||||
i.uppercase = true
|
i.uppercase = true
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
var animation: Animation = $AnimationPlayer.get_animation_library("").get_animation(&"Go")
|
||||||
|
var track: int = animation.find_track("AudioStreamPlayer", Animation.TYPE_AUDIO)
|
||||||
|
for key in animation.track_get_key_count(track):
|
||||||
|
var resource_getter = ResourceGetter.new() #Why do I have to make a new one each time?
|
||||||
|
animation.audio_track_set_key_stream(track, key, resource_getter.get_resource(animation.audio_track_get_key_stream(track, key)))
|
||||||
Global.debugged_in = false
|
Global.debugged_in = false
|
||||||
Global.get_node("GameHUD").hide()
|
Global.get_node("GameHUD").hide()
|
||||||
await get_tree().create_timer(1, false).timeout
|
await get_tree().create_timer(1, false).timeout
|
||||||
|
@@ -13,9 +13,15 @@ var old_campaign := ""
|
|||||||
@export var campaign := ["SMB1", "SMBLL", "SMBS", "SMBANN", "Custom"]
|
@export var campaign := ["SMB1", "SMBLL", "SMBS", "SMBANN", "Custom"]
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
update()
|
||||||
|
Global.level_theme_changed.connect(update)
|
||||||
get_starting_position()
|
get_starting_position()
|
||||||
handle_visuals()
|
handle_visuals()
|
||||||
|
|
||||||
|
func update() -> void:
|
||||||
|
for icon in campaign_icons:
|
||||||
|
icon.atlas = $ResourceGetter.get_resource(icon.atlas)
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if active:
|
if active:
|
||||||
handle_input()
|
handle_input()
|
||||||
|
@@ -3,6 +3,13 @@ extends Control
|
|||||||
signal cancelled
|
signal cancelled
|
||||||
var is_active := false
|
var is_active := false
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
update()
|
||||||
|
Global.level_theme_changed.connect(update)
|
||||||
|
|
||||||
|
func update() -> void:
|
||||||
|
$AudioStreamPlayer.stream = $ResourceGetter.get_resource($AudioStreamPlayer.stream)
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
modulate.a = lerpf(modulate.a, int(is_active), delta * 15)
|
modulate.a = lerpf(modulate.a, int(is_active), delta * 15)
|
||||||
if Input.is_action_just_released("ui_back") and is_active:
|
if Input.is_action_just_released("ui_back") and is_active:
|
||||||
|
Reference in New Issue
Block a user