Skip to content

Commit

Permalink
Now it should export the icons.
Browse files Browse the repository at this point in the history
BuildDate changed
Try settings menu applying.
  • Loading branch information
SlejmUr committed Jan 2, 2025
1 parent a8afa6d commit 12cd5fe
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 138 deletions.
Binary file removed EIV.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion EIV_Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</None>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="Build" Condition="'$(OS)' == 'Windows_NT'">
<Exec Command="git branch --show-current &gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;&#xD;&#xA;echo $([System.DateTime]::UtcNow.ToString(&quot;s&quot;))&gt;&gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;&#xD;&#xA;git rev-parse --short HEAD &gt;&gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;" />
<Exec Command="git branch --show-current &gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;&#xD;&#xA;git rev-parse --short HEAD &gt;&gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;&#xD;&#xA;date /t&gt;&gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;&#xD;&#xA;time /t&gt;&gt; &quot;$(ProjectDir)/csharp/Properties/BuildDate.txt&quot;" />
</Target>
<!-- INI placement. (So we dont need to do manually) -->
<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion csharp/Managers/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public override void _Ready()
{
this.Name = "GameManager";
MainLog.CreateNew();
Log.Information(csharp.Properties.Resource.BuildDate.Replace("\n", "_"));
var bdate = csharp.Properties.Resource.BuildDate.Replace("\n", "|").Replace("\r", "").TrimEnd().Split("|");
Log.Information("Build information: {Branch} {BuildHash} {BuildYMD} {BuildHM}", bdate[0], bdate[1], bdate[2], bdate[3]);
Log.Information(BuildDefined.FullVersion);
Instance = this;
Log.Verbose("Preload JsonLib! " + (CoreConverters.Converters.Count == 1));
Expand Down
17 changes: 13 additions & 4 deletions csharp/Menus/MainMenu.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#if CLIENT || GAME
using ExtractIntoVoid.Client;
using ExtractIntoVoid.Managers;
using Godot;

Expand All @@ -9,9 +10,17 @@ public partial class MainMenu : Control
public override void _Ready()
{
this.GetWindow().Unresizable = true;
GameManager.Instance.UIManager.LoadScreenStop();

GetNode<Label>("VersionLabel").Text = BuildDefined.FullVersion;
}

GameSettings Settings = new();
if (ResourceLoader.Exists("user://GameSettings.rsc"))
Settings = ResourceLoader.Load<GameSettings>("user://GameSettings.rsc");
else
Settings = new GameSettings();
SettingsMenu.ApplySettings(this, Settings);
GameManager.Instance.UIManager.LoadScreenStop();
}

public void Play()
{
Expand All @@ -29,9 +38,9 @@ public void Quit()
public void Settings()
{
this.Hide();
var settings = SceneManager.GetPackedScene("Inventory").Instantiate();
var settings = SceneManager.GetPackedScene("Settings").Instantiate();
this.CallDeferred("add_sibling", settings);
//GameManager.Instance.UIManager.LoadScreenStart();
GameManager.Instance.UIManager.LoadScreenStart();
}

}
Expand Down
71 changes: 47 additions & 24 deletions csharp/Menus/SettingsMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public partial class SettingsMenu : Control


public override void _Ready()
{
{
//TODO: Fix this shit. Somehow it doesnt want to use this user stuff
if (ResourceLoader.Exists("user://GameSettings.rsc"))
Settings = ResourceLoader.Load<GameSettings>("user://GameSettings.rsc");
else
Expand All @@ -66,7 +67,6 @@ public override void _Ready()
ScreenSpaceAAButton.GetPopup().IdPressed += ScreenSpaceAAButton_IdPressed;
AllSettingsContainer.Show();
GameManager.Instance.UIManager.LoadScreenStop();
GD.Print("Ready!");
}

public override void _ExitTree()
Expand All @@ -80,9 +80,16 @@ public override void _ExitTree()
}

public void Cancel()
{
// set back the stuff as before.
}
{
VideoSettings.GetNode<CheckBox>("Borderless/CheckBox").ButtonPressed = Settings.Video.Borderless;
VideoSettings.GetNode<CheckBox>("Exclusive/CheckBox").ButtonPressed = Settings.Video.Exclusive;
WindowModeMenuButton.Text = WindowModeMenuButton.GetPopup().GetItemText(WindowModeMenu_LastIndex);
ScreenSizeButton.Text = ScreenSizeButton.GetPopup().GetItemText(ScreenSize_LastIndex);
MSAA2DMenuButton.Text = MSAA2DMenuButton.GetPopup().GetItemText(MSAA2DMenu_LastIndex);
MSAA3DMenuButton.Text = MSAA3DMenuButton.GetPopup().GetItemText(MSAA3DMenu_LastIndex);
Scaling3DButton.Text = Scaling3DButton.GetPopup().GetItemText(Scaling3D_LastIndex);
ScreenSpaceAAButton.Text = ScreenSpaceAAButton.GetPopup().GetItemText(ScreenSpaceAA_LastIndex);
}

public void Apply()
{
Expand All @@ -99,50 +106,60 @@ public void Apply()
Settings.Video.Scaling3DMode = (Viewport.Scaling3DModeEnum)Scaling3D_LastIndex;
Settings.Video.ScreenSpaceAA = (Viewport.ScreenSpaceAAEnum)ScreenSpaceAA_LastIndex;
Settings.Video.ScreenSize = (ScreenSizeEnum)ScreenSize_LastIndex;
ApplySetttings(Settings);
//AudioServer.SetBusVolumeDb(0,0);
}

this.GetWindow().Borderless = Settings.Video.Borderless;
this.GetWindow().Exclusive = Settings.Video.Exclusive;
this.GetWindow().Mode = Settings.Video.Mode;
this.GetWindow().Msaa2D = Settings.Video.MSAA2D;
this.GetWindow().Msaa3D = Settings.Video.MSAA3D;
this.GetWindow().Scaling3DMode = Settings.Video.Scaling3DMode;
this.GetWindow().ScreenSpaceAA = Settings.Video.ScreenSpaceAA;
switch (Settings.Video.Scaling3DScale)
public void ApplySetttings(GameSettings settings)
{
ApplySettings(this, settings);
}

public static void ApplySettings(Node node, GameSettings settings)
{
Window window = node.GetWindow();
window.Borderless = settings.Video.Borderless;
window.Exclusive = settings.Video.Exclusive;
window.Mode = settings.Video.Mode;
window.Msaa2D = settings.Video.MSAA2D;
window.Msaa3D = settings.Video.MSAA3D;
window.Scaling3DMode = settings.Video.Scaling3DMode;
window.ScreenSpaceAA = settings.Video.ScreenSpaceAA;
switch (settings.Video.Scaling3DScale)
{
case Scaling3DScaleEnum.Performance:
this.GetWindow().Scaling3DScale = 0.5f;
window.Scaling3DScale = 0.5f;
break;
case Scaling3DScaleEnum.Balanced:
this.GetWindow().Scaling3DScale = 0.59f;
window.Scaling3DScale = 0.59f;
break;
case Scaling3DScaleEnum.Quality:
this.GetWindow().Scaling3DScale = 0.67f;
window.Scaling3DScale = 0.67f;
break;
case Scaling3DScaleEnum.UltraQuality:
this.GetWindow().Scaling3DScale = 0.77f;
window.Scaling3DScale = 0.77f;
break;
default:
break;
}
switch (Settings.Video.ScreenSize)
switch (settings.Video.ScreenSize)
{
case ScreenSizeEnum._3840x2160:
this.GetWindow().Size = new Vector2I(3840, 2160);
window.Size = new Vector2I(3840, 2160);
break;
case ScreenSizeEnum._2560x1440:
this.GetWindow().Size = new Vector2I(2560, 1440);
window.Size = new Vector2I(2560, 1440);
break;
case ScreenSizeEnum._1920x1080:
this.GetWindow().Size = new Vector2I(1920, 1080);
window.Size = new Vector2I(1920, 1080);
break;
case ScreenSizeEnum._1280x720:
this.GetWindow().Size = new Vector2I(1280, 720);
window.Size = new Vector2I(1280, 720);
break;
default:
break;
}
ResourceSaver.Save(Settings , "user://GameSettings.rsc");
//AudioServer.SetBusVolumeDb(0,0);
ResourceSaver.Save(settings, "user://GameSettings.rsc");
}

public void Back()
Expand All @@ -152,6 +169,12 @@ public void Back()
this.QueueFree();
}

public void Reset()
{
Settings = new();
ApplySetttings(Settings);
}

#region Presses
private void WindowModeMenuButton_IdPressed(long id)
{
Expand Down
5 changes: 3 additions & 2 deletions csharp/Properties/BuildDate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
update-deps
2025-01-02T13:45:30
b689904
a8afa6d
2025. 01. 02.
20:05
6 changes: 6 additions & 0 deletions default_bus_layout.tres
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ bus/2/volume_db = 0.0
bus/2/send = &"Master"
bus/2/effect/0/effect = SubResource("AudioEffectRecord_ax3k6")
bus/2/effect/0/enabled = true
bus/3/name = &"New Bus"
bus/3/solo = false
bus/3/mute = false
bus/3/bypass_fx = false
bus/3/volume_db = 0.0
bus/3/send = &"Master"
106 changes: 87 additions & 19 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

name="Win Client"
platform="Windows Desktop"
runnable=true
runnable=false
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="exclude"
export_files=PackedStringArray("res://csharp/Server/MapManager.cs", "res://csharp/Server/NetManager.cs", "res://EXPORT/Client/data_EIV_Game_windows_x86_64/EIV_Game.deps.json", "res://EXPORT/Client/data_EIV_Game_windows_x86_64/EIV_Game.runtimeconfig.json", "res://EXPORT/Server/data_EIV_Game_windows_x86_64/EIV_Game.deps.json", "res://EXPORT/Server/data_EIV_Game_windows_x86_64/EIV_Game.runtimeconfig.json")
export_filter="all_resources"
include_filter=""
exclude_filter="EXPORT/*"
exclude_filter="EXPORT/*, csharp/Server/*"
export_path="EXPORT/Client/EIV_Client.exe"
encryption_include_filters=""
encryption_exclude_filters=""
Expand All @@ -32,16 +31,16 @@ codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=false
application/icon=""
application/console_wrapper_icon=""
application/modify_resources=true
application/icon="res://EIV.png"
application/console_wrapper_icon="res://EIV.png"
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/company_name="Extract Into Void"
application/product_name="Extract Into Void"
application/file_description="Extract Into Void Game"
application/copyright="Extract Into Void"
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
Expand All @@ -64,7 +63,7 @@ ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debu
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/include_debug_symbols=false
dotnet/embed_build_outputs=false
dotnet/export_constants="CLIENT"

Expand All @@ -85,7 +84,7 @@ customized_files={
"res://scenes/Menu/": "remove"
}
include_filter=""
exclude_filter="EXPORT/*"
exclude_filter="EXPORT/*, csharp/Client/*"
export_path="EXPORT/Server/EIV_Server.exe"
encryption_include_filters=""
encryption_exclude_filters=""
Expand All @@ -108,16 +107,16 @@ codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=false
application/modify_resources=true
application/icon="res://EIV.png"
application/console_wrapper_icon="res://EIV.png"
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/company_name="Extract Into Void"
application/product_name="Extract Into Void"
application/file_description="Extract Into Void Game"
application/copyright="Extract Into Void"
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
Expand All @@ -140,6 +139,75 @@ ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debu
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=true
dotnet/include_debug_symbols=false
dotnet/embed_build_outputs=false
dotnet/export_constants="SERVER"

[preset.2]

name="Win Game"
platform="Windows Desktop"
runnable=false
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="EXPORT/*"
export_path="EXPORT/Game/EIV_Game.exe"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
script_export_mode=2

[preset.2.options]

custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=false
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon="res://EIV.png"
application/console_wrapper_icon="res://EIV.png"
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name="Extract Into Void"
application/product_name="Extract Into Void"
application/file_description="Extract Into Void Game"
application/copyright="Extract Into Void"
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
dotnet/include_scripts_content=false
dotnet/include_debug_symbols=false
dotnet/embed_build_outputs=false
dotnet/export_constants="GAME"
2 changes: 0 additions & 2 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ config/version="0.0.0.1"
run/main_scene="res://scenes/Main.tscn"
config/features=PackedStringArray("4.3", "C#", "Forward Plus")
boot_splash/show_image=false
config/icon="res://EIV.png"
config/windows_native_icon="res://EIV.ico"

[autoload]

Expand Down
Loading

0 comments on commit 12cd5fe

Please sign in to comment.