Parcourir la source

:sparkles: added license info

Felix Bytow il y a 10 mois
Parent
commit
080027e75c

+ 39 - 1
export_presets.cfg

@@ -103,7 +103,7 @@ progressive_web_app/background_color=Color(0, 0, 0, 1)
 
 name="Linux/X11 (arm64)"
 platform="Linux/X11"
-runnable=true
+runnable=false
 dedicated_server=false
 custom_features=""
 export_filter="all_resources"
@@ -138,3 +138,41 @@ unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
 ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
 kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
 rm -rf \"{temp_dir}\""
+
+[preset.3]
+
+name="Web (GameJam)"
+platform="Web"
+runnable=false
+dedicated_server=false
+custom_features=""
+export_filter="all_resources"
+include_filter=""
+exclude_filter=""
+export_path="export/jam/TheLastShift.html"
+encryption_include_filters=""
+encryption_exclude_filters=""
+encrypt_pck=false
+encrypt_directory=false
+
+[preset.3.options]
+
+custom_template/debug=""
+custom_template/release=""
+variant/extensions_support=false
+vram_texture_compression/for_desktop=true
+vram_texture_compression/for_mobile=false
+html/export_icon=true
+html/custom_html_shell=""
+html/head_include=""
+html/canvas_resize_policy=2
+html/focus_canvas_on_start=true
+html/experimental_virtual_keyboard=false
+progressive_web_app/enabled=false
+progressive_web_app/offline_page=""
+progressive_web_app/display=1
+progressive_web_app/orientation=0
+progressive_web_app/icon_144x144=""
+progressive_web_app/icon_180x180=""
+progressive_web_app/icon_512x512=""
+progressive_web_app/background_color=Color(0, 0, 0, 1)

+ 2 - 1
project.godot

@@ -10,7 +10,8 @@ config_version=5
 
 [application]
 
-config/name="gdtv-gamejam-2024-last-stand"
+config/name="The Last Shift"
+config/description="Survive in an electronics store where AI devices try to remove the Humans."
 run/main_scene="res://screens/main_menu.tscn"
 config/features=PackedStringArray("4.2", "GL Compatibility")
 

+ 38 - 0
screens/credits.gd

@@ -0,0 +1,38 @@
+extends MarginContainer
+class_name Credits
+
+@onready var main_menu: PackedScene = load("res://screens/main_menu.tscn")
+@onready var tab_container: TabContainer = $VBoxContainer/TabContainer
+@onready var game_tab: MarginContainer = $"VBoxContainer/TabContainer/The Last Shift"
+
+func _ready() -> void:
+	var licenses: Dictionary = Engine.get_license_info()
+	var dependencies: Array[Dictionary] = Engine.get_copyright_info()
+	
+	#for dependency in dependencies:
+	#	print(dependency)
+	
+	for dependency in dependencies:
+		var tab = game_tab.duplicate() as MarginContainer
+		tab.name = dependency["name"]
+		var label = tab.get_node("ScrollContainer/RichTextLabel") as RichTextLabel
+		label.text = ""
+		for part in dependency["parts"]:
+			for copyright in part["copyright"]:
+				label.text += "Copyright © " + copyright + "\n"
+			label.text += "\n"
+			var used_licenses: String = part["license"]
+			for license in licenses:
+				used_licenses = used_licenses.replace(license, licenses[license] + "\n\n")
+			label.text += used_licenses
+		tab_container.add_child(tab)
+
+func _process(_delta: float) -> void:
+	if Input.is_action_just_pressed("ui_cancel"):
+		_on_back_button_pressed()
+
+func _on_back_button_pressed() -> void:
+	get_tree().change_scene_to_packed(main_menu)
+
+func _on_rich_text_label_meta_clicked(meta: Variant) -> void:
+	OS.shell_open(str(meta))

+ 56 - 0
screens/credits.tscn

@@ -0,0 +1,56 @@
+[gd_scene load_steps=2 format=3 uid="uid://dw261o2yjh425"]
+
+[ext_resource type="Script" path="res://screens/credits.gd" id="1_x1osm"]
+
+[node name="Credits" type="MarginContainer"]
+anchors_preset = 15
+anchor_right = 1.0
+anchor_bottom = 1.0
+grow_horizontal = 2
+grow_vertical = 2
+theme_override_constants/margin_left = 10
+theme_override_constants/margin_top = 10
+theme_override_constants/margin_right = 10
+theme_override_constants/margin_bottom = 10
+script = ExtResource("1_x1osm")
+
+[node name="VBoxContainer" type="VBoxContainer" parent="."]
+layout_mode = 2
+
+[node name="TabContainer" type="TabContainer" parent="VBoxContainer"]
+layout_mode = 2
+size_flags_vertical = 3
+
+[node name="The Last Shift" type="MarginContainer" parent="VBoxContainer/TabContainer"]
+layout_mode = 2
+theme_override_constants/margin_left = 10
+theme_override_constants/margin_top = 10
+theme_override_constants/margin_right = 10
+theme_override_constants/margin_bottom = 10
+
+[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/TabContainer/The Last Shift"]
+layout_mode = 2
+
+[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer/TabContainer/The Last Shift/ScrollContainer"]
+layout_mode = 2
+size_flags_horizontal = 3
+size_flags_vertical = 3
+bbcode_enabled = true
+text = "Art Assets, Music, and Sound Design Copyright © 2024 by Ugliboy (Justin Pierce) is licensed under [url=https://creativecommons.org/licenses/by/4.0/]CC BY 4.0[/url].
+
+Potra font Copyright by Alejo Bergmann is licensed under [url=https://openfontlicense.org]OFL[/url].
+
+Source code Copyright © 2024 by LordDrako (Felix Bytow) is licensed under [url=https://opensource.org/license/MIT]MIT[/url].
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
+
+[node name="BackButton" type="Button" parent="VBoxContainer"]
+layout_mode = 2
+text = "BACK TO MENU"
+
+[connection signal="meta_clicked" from="VBoxContainer/TabContainer/The Last Shift/ScrollContainer/RichTextLabel" to="." method="_on_rich_text_label_meta_clicked"]
+[connection signal="pressed" from="VBoxContainer/BackButton" to="." method="_on_back_button_pressed"]

+ 4 - 0
screens/main_menu.gd

@@ -4,6 +4,7 @@ extends Control
 @onready var quit_button = $Buttons/Quit
 
 @onready var settings_menu: PackedScene = load("res://screens/settings_menu.tscn")
+@onready var credits: PackedScene = load("res://screens/credits.tscn")
 @onready var game: PackedScene = load("res://screens/game.tscn")
 
 const DESKTOP_PLATFORMS = ["Windows", "macOS", "Linux"]
@@ -21,3 +22,6 @@ func _on_quit_pressed() -> void:
 
 func _on_settings_pressed() -> void:
 	get_tree().change_scene_to_packed(settings_menu)
+
+func _on_credits_pressed() -> void:
+	get_tree().change_scene_to_packed(credits)

+ 1 - 0
screens/main_menu.tscn

@@ -74,4 +74,5 @@ horizontal_alignment = 1
 
 [connection signal="pressed" from="Buttons/NewGame" to="." method="_on_new_game_pressed"]
 [connection signal="pressed" from="Buttons/Settings" to="." method="_on_settings_pressed"]
+[connection signal="pressed" from="Buttons/Credits" to="." method="_on_credits_pressed"]
 [connection signal="pressed" from="Buttons/Quit" to="." method="_on_quit_pressed"]

+ 6 - 6
screens/settings_menu.gd

@@ -8,23 +8,23 @@ const SHOW_TUTORIAL = "SHOW_TUTORIAL"
 
 @onready var main_menu: PackedScene = load("res://screens/main_menu.tscn")
 
-func _ready():
+func _ready() -> void:
 	discard_button.text = "BACK"
 	show_tutorial.button_pressed = Config.show_tutorial
 	
-func _process(_delta):
+func _process(_delta: float) -> void:
 	if Input.is_action_just_pressed("ui_cancel"):
-		self._on_discard_pressed()
+		_on_discard_pressed()
 
-func _on_discard_pressed():
+func _on_discard_pressed() -> void:
 	get_tree().change_scene_to_packed(main_menu)
 	
-func _on_save_pressed():
+func _on_save_pressed() -> void:
 	Config.show_tutorial = show_tutorial.button_pressed
 	Config.save()
 	get_tree().change_scene_to_packed(main_menu)
 	
-func update_discard_button():
+func update_discard_button() -> void:
 	var dirty = \
 		Config.show_tutorial != show_tutorial.button_pressed
 	discard_button.text = "DISCARD" if dirty else "BACK"

+ 1 - 1
screens/settings_menu.tscn

@@ -37,7 +37,7 @@ columns = 2
 
 [node name="TutorialCheckBox" type="CheckBox" parent="MarginContainer/VBoxContainer/Tabs/General/GridContainer"]
 layout_mode = 2
-text = "Show tutorial"
+text = "Show into"
 
 [node name="Buttons" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
 layout_mode = 2