Skip to content

Commit

Permalink
Improve Loot box open menu
Browse files Browse the repository at this point in the history
Add translations

Patch bugs

Improve github workflow
  • Loading branch information
Killarexe committed May 29, 2024
1 parent 2c45212 commit b5f1d55
Show file tree
Hide file tree
Showing 15 changed files with 257 additions and 221 deletions.
72 changes: 34 additions & 38 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Autobuild

name: Godot Export
on:
push:
branches: [ "master" ]
Expand All @@ -12,39 +11,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install prerequisites
run: |
echo "Installing prerequisites..."
sudo apt install -y wget unzip
echo "Install complete!"
- name: Download Godot LTS Version
run: |
echo "Downloading Godot..."
wget https://github.com/godotengine/godot/releases/download/4.2.1-stable/Godot_v4.2.1-stable_linux.x86_64.zip
unzip Godot_v4.2.1-stable_linux.x86_64.zip
mv Godot_v4.2.1-stable_linux.x86_64 godot
chmod +x godot
echo "Download complete!"
- name: Donwload Godot export templates
run: |
echo "Downloading Godot's export templates..."
wget https://github.com/godotengine/godot/releases/download/4.2.1-stable/Godot_v4.2.1-stable_mono_export_templates.tpz
unzip Godot_v4.2.1-stable_mono_export_templates.tpz
mkdir -p ~/.local/share/godot/export_templates
mv templates ~/.local/share/godot/export_templates/4.2.1.stable/
echo "Export templates downloaded!"
- name: Export project
run: |
echo "Exporting project..."
echo "Export project to Linux(release)"
echo "$PWD"
mkdir -p build/linux
./godot --headless --export-release "Linux/X11" build/linux/LittleRage.x86_64
echo "Export project to Windows(release)"
mkdir -p build/windows
./godot --headless --path . --export-release "Windows Desktop" build/windows/LittleRage.exe
echo "Project exported!"
- name: Godot Export
uses: firebelley/godot-export@v5.2.1
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.2.1/Godot_v4.2.1-stable_linux.x86_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.2.1/Godot_v4.2.1-stable_export_templates.tpz
archive_output: true
cache: true
relative_export_path: ./
verbose: true
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: windows-build
path: /home/runner/work/LittleRage/LittleRage/Windows.zip
retention-days: 5
- name: Upload Linux x86_64 Artifact
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-build
path: /home/runner/work/LittleRage/LittleRage/LinuxX86_64.zip
retention-days: 5
- name: Upload Linux Arm64 Artifact
uses: actions/upload-artifact@v4
with:
name: linux-arm64-build
path: /home/runner/work/LittleRage/LittleRage/LinuxArm64.zip
retention-days: 5
- name: Upload MacOS Artifact
uses: actions/upload-artifact@v4
with:
name: macos-build
path: /home/runner/work/LittleRage/LittleRage/macOS.zip
retention-days: 5
295 changes: 158 additions & 137 deletions assets/lang/lang.csv

Large diffs are not rendered by default.

Binary file modified assets/lang/lang.en.translation
Binary file not shown.
Binary file modified assets/lang/lang.fr.translation
Binary file not shown.
60 changes: 30 additions & 30 deletions assets/style/default_theme.tres

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/hats/luigi_hat.tres
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[resource]
script = ExtResource("1_tcdc8")
name = "skin.luigi_hat"
name = "hat.luigi_hat"
chance = 1
is_hidden = false
texture = ExtResource("2_re7a1")
2 changes: 1 addition & 1 deletion data/hats/mario_hat.tres
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[resource]
script = ExtResource("1_q1ngr")
name = "skin.mario_hat"
name = "hat.mario_hat"
chance = 1
is_hidden = false
texture = ExtResource("2_cf0po")
2 changes: 1 addition & 1 deletion data/hats/waluigi_hat.tres
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[resource]
script = ExtResource("1_usogy")
name = "skin.waluigi_hat"
name = "hat.waluigi_hat"
chance = 1
is_hidden = false
texture = ExtResource("2_pbnsy")
2 changes: 1 addition & 1 deletion data/hats/wario_hat.tres
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[resource]
script = ExtResource("1_0fi3t")
name = "skin.wario_hat"
name = "hat.wario_hat"
chance = 1
is_hidden = false
texture = ExtResource("2_t76ji")
Empty file modified data/skins/rainer.tres
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion data/skins/santa.tres
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[resource]
script = ExtResource("1_6cqd7")
name = "skin.niark"
name = "skin.santa"
chance = 0
is_hidden = true
texture = ExtResource("2_3im50")
4 changes: 2 additions & 2 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ xr_features/passthrough=0

[preset.1]

name="Linux x86_64"
name="LinuxX86_64"
platform="Linux/X11"
runnable=true
dedicated_server=false
Expand Down Expand Up @@ -246,7 +246,7 @@ rm -rf \"{temp_dir}\""

[preset.2]

name="Linux arm64"
name="LinuxArm64"
platform="Linux/X11"
runnable=false
dedicated_server=false
Expand Down
28 changes: 22 additions & 6 deletions scenes/uis/CollectionsMenu.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=39 format=3 uid="uid://wcpkho1r3os3"]
[gd_scene load_steps=40 format=3 uid="uid://wcpkho1r3os3"]

[ext_resource type="Theme" uid="uid://becgxgj56yfdh" path="res://assets/style/default_theme.tres" id="1_q884x"]
[ext_resource type="Script" path="res://scripts/uis/collections_menu/MainCollectionMenu.gd" id="2_e00sk"]
Expand All @@ -17,6 +17,7 @@
[ext_resource type="Script" path="res://scripts/uis/collections_menu/ParticlesMenu.gd" id="6_y5t24"]
[ext_resource type="Script" path="res://scripts/uis/collections_menu/hats_menu/HatList.gd" id="7_5na8b"]
[ext_resource type="Texture2D" uid="uid://bf7j2smrgc7mg" path="res://assets/textures/ui/icons/disc.png" id="10_65766"]
[ext_resource type="LabelSettings" uid="uid://cd8gvl774mr2v" path="res://assets/style/label_settings/medium_label.tres" id="12_8cvgb"]
[ext_resource type="Script" path="res://scripts/uis/collections_menu/LootBoxMenu.gd" id="13_86pp1"]
[ext_resource type="LabelSettings" uid="uid://b35bwhibubxgx" path="res://assets/style/label_settings/small_medium_label.tres" id="17_8gk2a"]
[ext_resource type="PackedScene" uid="uid://bf6u6lge7vm8i" path="res://scenes/bundles/player/PlayerDummy.tscn" id="19_h3c7l"]
Expand Down Expand Up @@ -663,7 +664,7 @@ libraries = {
}
autoplay = "enter"

[node name="LootBoxMenu" type="Control" parent="CanvasLayer/MainMenu" node_paths=PackedStringArray("skin_list", "hat_list", "particle_menu")]
[node name="LootBoxMenu" type="Control" parent="CanvasLayer/MainMenu" node_paths=PackedStringArray("cosmetic_texture", "cosmetic_label", "animation_player", "next_button", "skin_list", "hat_list", "particle_menu")]
visible = false
layout_mode = 1
anchors_preset = 15
Expand All @@ -673,22 +674,38 @@ grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("13_86pp1")
cosmetic_texture = NodePath("CosmeticTexture")
cosmetic_label = NodePath("Cosmetic Label")
animation_player = NodePath("AnimationPlayer")
next_button = NodePath("Buttons/NextBoxButton")
skin_list = NodePath("../../SkinsMenu/SkinList")
hat_list = NodePath("../../HatsMenu/HatList")
particle_menu = NodePath("../../ParticlesMenu")

[node name="Background" type="ColorRect" parent="CanvasLayer/MainMenu/LootBoxMenu"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 3840.0
offset_bottom = 2160.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.176471, 0.176471, 0.176471, 0.501961)

[node name="Cosmetic Label" type="Label" parent="CanvasLayer/MainMenu/LootBoxMenu"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -224.0
offset_top = 32.0
offset_right = 224.0
offset_bottom = 64.0
grow_horizontal = 2
theme = ExtResource("1_q884x")
label_settings = ExtResource("12_8cvgb")
horizontal_alignment = 1
vertical_alignment = 1

[node name="CosmeticTexture" type="TextureRect" parent="CanvasLayer/MainMenu/LootBoxMenu"]
layout_mode = 1
anchors_preset = 8
Expand All @@ -713,7 +730,6 @@ libraries = {
}

[node name="Buttons" type="HBoxContainer" parent="CanvasLayer/MainMenu/LootBoxMenu"]
visible = false
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
Expand Down
8 changes: 5 additions & 3 deletions scripts/uis/collections_menu/LootBoxMenu.gd
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
extends Control
class_name LootBoxMenu

@onready var cosmetic_texture: TextureRect = $CosmeticTexture
@onready var animation_player: AnimationPlayer = $AnimationPlayer
@onready var next_button: Button = $Buttons/NextBoxButton
@export var cosmetic_texture: TextureRect
@export var cosmetic_label: Label
@export var animation_player: AnimationPlayer
@export var next_button: Button

@export var skin_list: SkinList
@export var hat_list: HatList
Expand All @@ -20,6 +21,7 @@ func update_texture():
skin_list.set_item_skins()
hat_list.set_hat_items()
particle_menu.load_particles()
cosmetic_label.text = TranslationServer.translate("label.unlocked_cosmetic") + ": " + TranslationServer.translate(cosmetic.name)

func update_buttons():
next_button.visible = LootBoxesManager.has_loot_box()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func _on_create_level_button_pressed():
level.difficulty = level_creation_menu.difficulty
level.scene = load("res://scenes/bundles/DefaultLevel.tscn")
ResourceSaver.save(level, LevelManager.EXTERNAL_LEVELS_DIR + "/" + level_id + ".tres")
AchievementManager.unlock_achievement("making_my_own")
LevelManager.load_levels()
LevelManager.current_level = level_id
SceneManager.change_scene("res://scenes/uis/LevelEditor.tscn")
Expand Down

0 comments on commit b5f1d55

Please sign in to comment.