changes SMBS 4-4 and 2-2 to keep the original developer references

These were last minute changes i made originally, to say "JOEMAMA" instead of "HUDSON" and "LSS" instead of "I.S", however some people viewed this as being disrespectful of the original work and developers, which was absolutely NOT the intention, therefore the original message has been restored. apologies.
This commit is contained in:
JHDev2006
2025-09-17 11:24:28 +01:00
parent bc2420f3db
commit 864d38258f
5 changed files with 390 additions and 466 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
.godot/
/android/
Exports/
Assets/LevelGuides

View File

@@ -368,11 +368,11 @@ layout_mode = 2
focus_mode = 0
[node name="ScrollContainer" parent="BG/Border/Levels/VBoxContainer/LevelInfo/SelectedLevel/MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo" index="0"]
scroll_horizontal = 166
scroll_horizontal = 184
is_active = true
[node name="ScrollContainer2" parent="BG/Border/Levels/VBoxContainer/LevelInfo/SelectedLevel/MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo" index="1"]
scroll_horizontal = 41
scroll_horizontal = 28
is_active = true
[node name="Panel" type="PanelContainer" parent="BG/Border/Levels/VBoxContainer/LevelInfo"]
@@ -383,7 +383,7 @@ theme_override_styles/panel = ExtResource("8_psbt7")
[node name="AutoScrollContainer" type="ScrollContainer" parent="BG/Border/Levels/VBoxContainer/LevelInfo/Panel"]
layout_mode = 2
mouse_filter = 2
scroll_vertical = 49
scroll_vertical = 100
horizontal_scroll_mode = 3
vertical_scroll_mode = 3
script = ExtResource("24_wf6nb")
@@ -569,12 +569,10 @@ layout_mode = 2
focus_mode = 0
[node name="ScrollContainer" parent="BG/Border/Levels/VBoxContainer/LSSLevelInfo/SelectedOnlineLevel/MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo" index="0"]
scroll_horizontal = 9
is_active = true
auto_connect_focus = false
[node name="ScrollContainer2" parent="BG/Border/Levels/VBoxContainer/LSSLevelInfo/SelectedOnlineLevel/MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo" index="1"]
scroll_horizontal = 41
is_active = true
auto_connect_focus = false
@@ -587,7 +585,6 @@ theme_override_styles/panel = ExtResource("8_psbt7")
[node name="AutoScrollContainer" type="ScrollContainer" parent="BG/Border/Levels/VBoxContainer/LSSLevelInfo/Panel"]
layout_mode = 2
mouse_filter = 0
scroll_vertical = 49
horizontal_scroll_mode = 3
script = ExtResource("24_wf6nb")
direction = 1

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -10,12 +10,15 @@ var has_downloaded := false
signal level_play
var level_thumbnail = null
func _ready() -> void:
set_process(false)
func open(container: OnlineLevelContainer) -> void:
has_downloaded = FileAccess.file_exists("user://custom_levels/downloaded/" + container.level_id + ".lvl")
show()
level_thumbnail = container.level_thumbnail
%Download.text = "DOWNLOAD"
if has_downloaded:
%OnlinePlay.grab_focus()
@@ -34,7 +37,7 @@ func setup_visuals(container: OnlineLevelContainer) -> void:
%SelectedOnlineLevel.level_author = container.level_author
%SelectedOnlineLevel.level_id = container.level_id
%SelectedOnlineLevel.thumbnail_url = container.thumbnail_url
%SelectedOnlineLevel.level_thumbnail = container.level_thumbnail
%SelectedOnlineLevel.level_thumbnail = level_thumbnail
%SelectedOnlineLevel.difficulty = container.difficulty
%SelectedOnlineLevel.setup_visuals()
$Description.request(LEVEL_INFO_URL + container.level_id)
@@ -76,10 +79,17 @@ func level_downloaded(result: int, response_code: int, headers: PackedStringArra
data = json.levelData
file.store_string(JSON.stringify(str_to_var(data)))
file.close()
save_thumbnail()
%Download.hide()
%OnlinePlay.show()
%OnlinePlay.grab_focus()
func save_thumbnail() -> void:
if OnlineLevelContainer.cached_thumbnails.has(level_id):
var thumbnail = OnlineLevelContainer.cached_thumbnails.get(level_id)
DirAccess.make_dir_recursive_absolute("user://custom_levels/downloaded/thumbnails")
thumbnail.get_image().save_png("user://custom_levels/downloaded/thumbnails/"+ level_id + ".png")
func play_level() -> void:
var file_path := "user://custom_levels/downloaded/" + level_id + ".lvl"
var file = JSON.parse_string(FileAccess.open(file_path, FileAccess.READ).get_as_text())