commit b24157309df9434d42457b266c560a6e55ed6663 Author: Tony Bark <35226681+tonytins@users.noreply.github.com> Date: Wed Feb 4 06:43:14 2026 -0500 Initial source commit 🎉 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..aeff653 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,45 @@ +root = true + +# All files +[*] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +# Code files +[*.{cs,csx,vb,vbx}] +indent_size = 4 +indent_style = space + +# C# files +[*.cs] +# Nullable reference types +csharp_nullable_reference_types = enable + +# Naming conventions +dotnet_naming_rule.async_methods_end_in_async.severity = suggestion +dotnet_naming_rule.async_methods_end_in_async.symbols = async_methods +dotnet_naming_rule.async_methods_end_in_async.style = end_in_async + +dotnet_naming_symbols.async_methods.applicable_kinds = method +dotnet_naming_symbols.async_methods.required_modifiers = async + +dotnet_naming_style.end_in_async.required_suffix = Async +dotnet_naming_style.end_in_async.capitalization = pascal_case + +# Formatting +csharp_new_line_before_open_brace = all +csharp_indent_case_contents = true +csharp_space_after_cast = false + +# Project files +[*.{csproj,props,targets}] +indent_size = 4 + +# JSON files +[*.json] +indent_size = 2 + +# Godot files +[*.{tscn,tres,godot}] +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e1bad4a --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# .NET build outputs +bin/ +obj/ +*.dll +*.exe +*.pdb + +# User-specific files +*.user +*.suo +*.userprefs +.vs/ +.vscode/ +.idea/ + +# Godot-specific ignores +**/.godot/ +**/.import/ +**/export_presets.cfg + +# OS-specific +.DS_Store +Thumbs.db + +# NuGet packages +*.nupkg +packages/ diff --git a/CyberBits.slnx b/CyberBits.slnx new file mode 100644 index 0000000..0b2c74c --- /dev/null +++ b/CyberBits.slnx @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/CyberBits/Bits.cs b/CyberBits/Bits.cs new file mode 100644 index 0000000..a158ca2 --- /dev/null +++ b/CyberBits/Bits.cs @@ -0,0 +1,16 @@ +namespace Cyberbits; + +using System.Text.Json.Serialization; + +public record Bits( + [property: JsonPropertyName("image")] + string Image, + [property: JsonPropertyName("feat")] + string Feat, + [property: JsonPropertyName("base")] + string[] Base, + [property: JsonPropertyName("style")] + string[] Style, + [property: JsonPropertyName("cyberware")] + string[] Cyberware +); diff --git a/CyberBits/CyberBits.csproj b/CyberBits/CyberBits.csproj new file mode 100644 index 0000000..306930d --- /dev/null +++ b/CyberBits/CyberBits.csproj @@ -0,0 +1,19 @@ + + + + Exe + net8.0 + enable + false + LatestMajor + + + + + + + + ./project + + + diff --git a/CyberBits/FileFetcher.cs b/CyberBits/FileFetcher.cs new file mode 100644 index 0000000..05daf5e --- /dev/null +++ b/CyberBits/FileFetcher.cs @@ -0,0 +1,10 @@ +namespace Cyberbits; + +public class FileFetcher +{ + public static string LoadTextFile(string filename) + { + using var file = FileAccess.Open($"res://{filename}", FileAccess.ModeFlags.Read); + return file.GetAsText(); + } +} \ No newline at end of file diff --git a/CyberBits/GlobalUsing.cs b/CyberBits/GlobalUsing.cs new file mode 100644 index 0000000..313f61a --- /dev/null +++ b/CyberBits/GlobalUsing.cs @@ -0,0 +1,3 @@ +global using System; +global using Godot; +global using Engine = twodog.Engine; \ No newline at end of file diff --git a/CyberBits/Program.cs b/CyberBits/Program.cs new file mode 100644 index 0000000..6460a2a --- /dev/null +++ b/CyberBits/Program.cs @@ -0,0 +1,41 @@ +using System.Text.Json; +using Cyberbits; + +using var engine = new Engine("Cyberbits", Engine.ResolveProjectDir()); +using var godot = engine.Start(); + +// Load a scene +var scene = GD.Load("res://main.tscn"); +engine.Tree.Root.AddChild(scene.Instantiate()); + +var bitsImage = engine.Tree.CurrentScene.GetNode("BitsImage"); +var bitsSelection = engine.Tree.CurrentScene.GetNode("BitsSelection"); +var unlockedFeat = engine.Tree.CurrentScene.GetNode