Compare commits
6 Commits
d74831df56
...
master
Author | SHA1 | Date | |
---|---|---|---|
356897045f | |||
1e1f8cebe8
|
|||
b21ad67cfc
|
|||
4fffa8784a
|
|||
dc3f8c94f8 | |||
f06bf17757
|
16
.github/workflows/flake-check.yaml
vendored
Normal file
16
.github/workflows/flake-check.yaml
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
name: flake-check
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: [ ubuntu-latest, homelab ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: cachix/install-nix-action@v31
|
||||||
|
- run: nix flake check
|
||||||
|
|
27
flake.nix
27
flake.nix
@@ -46,6 +46,30 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
checks = forAllSystems (
|
||||||
|
{ pkgs }:
|
||||||
|
{
|
||||||
|
gdformat = pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
name = "gdformat-check";
|
||||||
|
src = pkgs.lib.sources.sourceFilesBySuffices (pkgs.lib.cleanSource ./.) [ ".gd" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
gdtoolkit_4
|
||||||
|
];
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
find . -name "*.gd" -print0 | xargs -0 gdformat --check
|
||||||
|
echo "All .gd files are properly formatted"
|
||||||
|
'';
|
||||||
|
installPhase = "mkdir $out";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
let
|
let
|
||||||
@@ -77,7 +101,6 @@
|
|||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
find .
|
|
||||||
install -D -m 755 -t $out/libexec ./build/slopvivors
|
install -D -m 755 -t $out/libexec ./build/slopvivors
|
||||||
install -D -m 644 -t $out/libexec ./build/slopvivors.pck
|
install -D -m 644 -t $out/libexec ./build/slopvivors.pck
|
||||||
install -d -m 755 $out/bin
|
install -d -m 755 $out/bin
|
||||||
@@ -158,7 +181,7 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
slopvivors_docker = pkgs.dockerTools.buildLayeredImage {
|
slopvivors_docker = pkgs.dockerTools.buildLayeredImage {
|
||||||
name = "slopvivors-docker-${version}";
|
name = "slopvivors-docker";
|
||||||
tag = version;
|
tag = version;
|
||||||
created = "now";
|
created = "now";
|
||||||
contents = [
|
contents = [
|
||||||
|
19
scenes/main_menu.gd
Normal file
19
scenes/main_menu.gd
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
const MAIN = preload("res://scenes/main.tscn")
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_new_game_button_pressed() -> void:
|
||||||
|
get_tree().change_scene_to_packed(MAIN)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_options_button_pressed() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
func _on_exit_game_button_pressed() -> void:
|
||||||
|
get_tree().quit()
|
1
scenes/main_menu.gd.uid
Normal file
1
scenes/main_menu.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://sd158y3mdmkt
|
69
scenes/main_menu.tscn
Normal file
69
scenes/main_menu.tscn
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://cynet50emve6c"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://sd158y3mdmkt" path="res://scenes/main_menu.gd" id="1_l6cm7"]
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id="Gradient_vue75"]
|
||||||
|
colors = PackedColorArray(0.252028, 0.252028, 0.252028, 1, 0.25098, 0.25098, 0.25098, 1)
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture1D" id="GradientTexture1D_l6cm7"]
|
||||||
|
gradient = SubResource("Gradient_vue75")
|
||||||
|
|
||||||
|
[node name="MainMenu" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_l6cm7")
|
||||||
|
|
||||||
|
[node name="Background" type="TextureRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
texture = SubResource("GradientTexture1D_l6cm7")
|
||||||
|
expand_mode = 2
|
||||||
|
|
||||||
|
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -20.0
|
||||||
|
offset_top = -20.0
|
||||||
|
offset_right = 20.0
|
||||||
|
offset_bottom = 20.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 20
|
||||||
|
theme_override_constants/margin_top = 20
|
||||||
|
theme_override_constants/margin_right = 20
|
||||||
|
theme_override_constants/margin_bottom = 20
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 10
|
||||||
|
|
||||||
|
[node name="NewGameButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "New game"
|
||||||
|
|
||||||
|
[node name="OptionsButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Options"
|
||||||
|
|
||||||
|
[node name="ExitGameButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Exit game"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="PanelContainer/MarginContainer/VBoxContainer/NewGameButton" to="." method="_on_new_game_button_pressed"]
|
||||||
|
[connection signal="pressed" from="PanelContainer/MarginContainer/VBoxContainer/OptionsButton" to="." method="_on_options_button_pressed"]
|
||||||
|
[connection signal="pressed" from="PanelContainer/MarginContainer/VBoxContainer/ExitGameButton" to="." method="_on_exit_game_button_pressed"]
|
Reference in New Issue
Block a user