mirror of
https://git.tonybark.com/tonytins/CyberBits.git
synced 2026-05-12 05:23:34 -04:00
Compare commits
2 commits
55044ae4b8
...
fb013f2b15
| Author | SHA1 | Date | |
|---|---|---|---|
| fb013f2b15 | |||
| 1f2032dcf8 |
44 changed files with 960 additions and 71 deletions
|
|
@ -13,6 +13,9 @@ 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
|
||||
|
|
@ -24,16 +27,6 @@ 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
|
||||
|
||||
# Constants are UPPERCASE
|
||||
dotnet_naming_rule.constants_should_be_upper_case.severity = suggestion
|
||||
dotnet_naming_rule.constants_should_be_upper_case.symbols = constants
|
||||
dotnet_naming_rule.constants_should_be_upper_case.style = constant_style
|
||||
|
||||
dotnet_naming_symbols.constants.applicable_kinds = field, local
|
||||
dotnet_naming_symbols.constants.required_modifiers = const
|
||||
|
||||
dotnet_naming_style.constant_style.capitalization = all_upper
|
||||
|
||||
# Formatting
|
||||
csharp_new_line_before_open_brace = all
|
||||
csharp_indent_case_contents = true
|
||||
|
|
|
|||
541
.gitignore
vendored
541
.gitignore
vendored
|
|
@ -1,27 +1,530 @@
|
|||
# .NET build outputs
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/godot,rider,dotnetcore,visualstudio,visualstudiocode,obsidian
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=godot,rider,dotnetcore,visualstudio,visualstudiocode,obsidian
|
||||
|
||||
### DotnetCore ###
|
||||
# .NET Core build folders
|
||||
bin/
|
||||
obj/
|
||||
*.dll
|
||||
*.exe
|
||||
*.pdb
|
||||
|
||||
# User-specific files
|
||||
*.user
|
||||
*.suo
|
||||
*.userprefs
|
||||
.vs/
|
||||
.vscode/
|
||||
.idea/
|
||||
# Common node modules locations
|
||||
/node_modules
|
||||
/wwwroot/node_modules
|
||||
|
||||
### Godot ###
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
|
||||
# Godot-specific ignores
|
||||
**/.godot/
|
||||
**/.import/
|
||||
**/export_presets.cfg
|
||||
.import/
|
||||
export.cfg
|
||||
export_presets.cfg
|
||||
|
||||
# OS-specific
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
# Imported translations (automatically generated from CSV files)
|
||||
*.translation
|
||||
|
||||
# NuGet packages
|
||||
# Mono-specific ignores
|
||||
.mono/
|
||||
data_*/
|
||||
mono_crash.*.json
|
||||
|
||||
### Obsidian ###
|
||||
# config dir
|
||||
.obsidian/
|
||||
|
||||
### Rider ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
# Built Visual Studio Code Extensions
|
||||
*.vsix
|
||||
|
||||
### VisualStudioCode Patch ###
|
||||
# Ignore all local history of files
|
||||
.history
|
||||
.ionide
|
||||
|
||||
### VisualStudio ###
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# ASP.NET Scaffolding
|
||||
ScaffoldingReadMe.txt
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.tlog
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Coverlet is a free, cross platform Code Coverage Tool
|
||||
coverage*.json
|
||||
coverage*.xml
|
||||
coverage*.info
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microslop Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
packages/
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microslop Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microslop Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microslop Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
|
||||
*.vbp
|
||||
|
||||
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
|
||||
*.dsw
|
||||
*.dsp
|
||||
|
||||
# Visual Studio 6 technical files
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# Visual Studio History (VSHistory) files
|
||||
.vshistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
||||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# VS Code files for those working on multiple tools
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
|
||||
# Windows Installer files from build outputs
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
### VisualStudio Patch ###
|
||||
# Additional files built by Visual Studio
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/godot,rider,dotnetcore,visualstudio,visualstudiocode,obsidian
|
||||
|
||||
**/*.toml
|
||||
*.pck
|
||||
|
|
|
|||
15
.idea/.idea.CyberBits/.idea/.gitignore
generated
vendored
Normal file
15
.idea/.idea.CyberBits/.idea/.gitignore
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/contentModel.xml
|
||||
/modules.xml
|
||||
/.idea.CyberBits.iml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Ignored default folder with query files
|
||||
/queries/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
8
.idea/.idea.CyberBits/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.CyberBits/.idea/indexLayout.xml
generated
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/.idea.CyberBits/.idea/vcs.xml
generated
Normal file
6
.idea/.idea.CyberBits/.idea/vcs.xml
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
6
CyberBits.Common/Addon.cs
Normal file
6
CyberBits.Common/Addon.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace CyberBits.Common;
|
||||
|
||||
public record Addon(
|
||||
[property: JsonPropertyName("cyberware")]
|
||||
string[] Cyberware
|
||||
);
|
||||
12
CyberBits.Common/Bits.cs
Normal file
12
CyberBits.Common/Bits.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
namespace CyberBits.Common;
|
||||
|
||||
public record Bits(
|
||||
[property: JsonPropertyName("image")]
|
||||
string Image,
|
||||
[property: JsonPropertyName("feat")]
|
||||
string Feat,
|
||||
[property: JsonPropertyName("base")]
|
||||
string[] Base,
|
||||
[property: JsonPropertyName("style")]
|
||||
string[] Style
|
||||
);
|
||||
8
CyberBits.Common/CBConsts.cs
Normal file
8
CyberBits.Common/CBConsts.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace CyberBits.Common;
|
||||
|
||||
public struct CBConsts
|
||||
{
|
||||
// Ignore VSCode if it complains about "ThisAssembly" not being found.
|
||||
public const string VERSION =
|
||||
$"{ThisAssembly.Git.SemVer.Major}.{ThisAssembly.Git.SemVer.Minor}.{ThisAssembly.Git.SemVer.Patch}";
|
||||
}
|
||||
22
CyberBits.Common/CyberBits.Common.csproj
Normal file
22
CyberBits.Common/CyberBits.Common.csproj
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Remove="System.IO" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="GitInfo" Version="3.6.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="GodotSharp" Version="4.6.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
31
CyberBits.Common/FileFetcher.cs
Normal file
31
CyberBits.Common/FileFetcher.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace CyberBits.Common;
|
||||
|
||||
public static class FileFetcher
|
||||
{
|
||||
public static string LoadTextFile(string filename, bool userDir = false)
|
||||
{
|
||||
var location = "res";
|
||||
|
||||
if (userDir)
|
||||
location = "user";
|
||||
|
||||
using var file = FileAccess.Open($"{location}://{filename}", FileAccess.ModeFlags.Read);
|
||||
var contents = file.GetAsText();
|
||||
|
||||
file.Close();
|
||||
return contents;
|
||||
}
|
||||
|
||||
public static ConfigFile LoadConfig(string filename, bool userDir = false)
|
||||
{
|
||||
var config = new ConfigFile();
|
||||
|
||||
// Load data from a file.
|
||||
var err = config.Load(LoadTextFile(filename, userDir));
|
||||
|
||||
if (err != Error.Ok)
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
||||
6
CyberBits.Common/GlobalUsing.cs
Normal file
6
CyberBits.Common/GlobalUsing.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// System
|
||||
global using sys = System;
|
||||
global using System.Text.Json.Serialization;
|
||||
|
||||
// Godot
|
||||
global using Godot;
|
||||
8
CyberBits.Common/ResourceFiles.cs
Normal file
8
CyberBits.Common/ResourceFiles.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
namespace CyberBits.Common;
|
||||
|
||||
public struct ResourceFiles
|
||||
{
|
||||
public const string COCK_JSON = "resources/cock.json";
|
||||
public const string PUSSY_JSON = "resources/pussy.json";
|
||||
public const string ADDONS_JSON = "resources/addons.json";
|
||||
}
|
||||
10
CyberBits.Godot/CyberBits.Godot.csproj
Normal file
10
CyberBits.Godot/CyberBits.Godot.csproj
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<Project Sdk="Godot.NET.Sdk/4.6.2">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CyberBits.Common\CyberBits.Common.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
22
CyberBits.Godot/main.tscn
Normal file
22
CyberBits.Godot/main.tscn
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[gd_scene format=3]
|
||||
|
||||
[node name="Main" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Label" type="Label" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "Hello from 2dog!"
|
||||
26
CyberBits.Godot/project.godot
Normal file
26
CyberBits.Godot/project.godot
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
custom_features="dotnet"
|
||||
|
||||
[application]
|
||||
|
||||
config/name="CyberBits"
|
||||
run/main_scene="res://main.tscn"
|
||||
config/features=PackedStringArray("4.6", "C#")
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="CyberBits.Godot"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
52
CyberBits.Tests/BasicTests.cs
Normal file
52
CyberBits.Tests/BasicTests.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
using Godot;
|
||||
using twodog.xunit;
|
||||
|
||||
namespace CyberBits.Tests;
|
||||
|
||||
[Collection("GodotHeadless")]
|
||||
public class BasicTests(GodotHeadlessFixture godot)
|
||||
{
|
||||
[Fact]
|
||||
public void LoadMainScene_Succeeds()
|
||||
{
|
||||
// Arrange
|
||||
var scene = GD.Load<PackedScene>("res://main.tscn");
|
||||
|
||||
// Act
|
||||
var instance = scene.Instantiate();
|
||||
godot.Tree.Root.AddChild(instance);
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(instance);
|
||||
Assert.NotNull(instance.GetParent());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PhysicsIteration_Succeeds()
|
||||
{
|
||||
// Arrange & Act
|
||||
godot.Tree.Root.PhysicsInterpolationMode = Node.PhysicsInterpolationModeEnum.Off;
|
||||
godot.GodotInstance.Iteration();
|
||||
|
||||
// Assert - if we get here without crashing, test passes
|
||||
Assert.True(true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateNode_AddsToTree()
|
||||
{
|
||||
// Arrange
|
||||
var node = new Node();
|
||||
node.Name = "TestNode";
|
||||
|
||||
// Act
|
||||
godot.Tree.Root.AddChild(node);
|
||||
|
||||
// Assert
|
||||
Assert.True(godot.Tree.Root.HasNode("TestNode"));
|
||||
Assert.Equal("TestNode", (string)godot.Tree.Root.GetNode("TestNode").Name);
|
||||
|
||||
// Cleanup
|
||||
node.QueueFree();
|
||||
}
|
||||
}
|
||||
60
CyberBits.Tests/CyberBits.Tests.csproj
Normal file
60
CyberBits.Tests/CyberBits.Tests.csproj
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- 2dog packages -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="2dog" Version="0.1.23-pre"/>
|
||||
<PackageReference Include="2dog.xunit" Version="0.1.23-pre"/>
|
||||
<PackageReference Include="GodotSharp" Version="4.6.2"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Platform-specific native library packages -->
|
||||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
|
||||
<PackageReference Include="2dog.win-x64" Version="4.6.2.0"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Linux'))">
|
||||
<PackageReference Include="2dog.linux-x64" Version="4.6.2.0"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('OSX'))">
|
||||
<PackageReference Include="2dog.osx-arm64" Version="4.6.2.0"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Test framework packages -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2"/>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0"/>
|
||||
<PackageReference Include="xunit" Version="2.9.2"/>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="Xunit"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../CyberBits.Godot/CyberBits.Godot.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Godot project location -->
|
||||
<PropertyGroup>
|
||||
<GodotProjectDir>../CyberBits.Godot</GodotProjectDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Remove duplicate Godot.SourceGenerators that come from GodotSharp package
|
||||
(2dog package already embeds them) -->
|
||||
<Target Name="RemoveDuplicateGodotAnalyzers" BeforeTargets="CoreCompile">
|
||||
<ItemGroup>
|
||||
<Analyzer Remove="@(Analyzer)" Condition="$([System.String]::Copy('%(Analyzer.Identity)').Contains('Godot.SourceGenerators'))" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
7
CyberBits.Tests/GodotHeadlessCollection.cs
Normal file
7
CyberBits.Tests/GodotHeadlessCollection.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
using twodog.xunit;
|
||||
using Xunit;
|
||||
|
||||
namespace CyberBits.Tests;
|
||||
|
||||
[CollectionDefinition("GodotHeadless", DisableParallelization = true)]
|
||||
public class GodotHeadlessCollection : ICollectionFixture<GodotHeadlessFixture>;
|
||||
4
CyberBits.Tests/xunit.runner.json
Normal file
4
CyberBits.Tests/xunit.runner.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
|
||||
"parallelizeTestCollections": false
|
||||
}
|
||||
|
|
@ -1,9 +1,12 @@
|
|||
<Solution>
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path="Directory.Build.props" />
|
||||
<File Path="global.json" />
|
||||
<File Path=".editorconfig" />
|
||||
<File Path="README.md" />
|
||||
</Folder>
|
||||
<Project Path="Cyberbits/Cyberbits.csproj" />
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path="GitInfo.txt" />
|
||||
<File Path=".gitignore" />
|
||||
<File Path="README.md" />
|
||||
</Folder>
|
||||
<Project Path="CyberBits.Common/CyberBits.Common.csproj" />
|
||||
<Project Path="CyberBits.Godot/CyberBits.Godot.csproj" />
|
||||
<Project Path="CyberBits.Tests/CyberBits.Tests.csproj" />
|
||||
<Project Path="CyberBits/CyberBits.csproj" />
|
||||
<Project Path="CyberBitsOld/CyberBitsOld.csproj" />
|
||||
</Solution>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,36 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="2dog" Version="0.1.23-pre"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="2dog" Version="0.1.14-pre" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Using Remove="System.IO" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../CyberBits.Godot/CyberBits.Godot.csproj"/>
|
||||
<ProjectReference Include="..\CyberBits.Common\CyberBits.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<GodotProjectDir>./project</GodotProjectDir>
|
||||
</PropertyGroup>
|
||||
<!-- Godot project location -->
|
||||
<PropertyGroup>
|
||||
<GodotProjectDir>../CyberBits.Godot</GodotProjectDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Remove duplicate Godot.SourceGenerators that come from the Godot project
|
||||
(2dog package already embeds them) -->
|
||||
<Target Name="RemoveDuplicateGodotAnalyzers" BeforeTargets="CoreCompile">
|
||||
<ItemGroup>
|
||||
<Analyzer Remove="@(Analyzer)" Condition="$([System.String]::Copy('%(Analyzer.Identity)').Contains('Godot.SourceGenerators'))" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
|||
5
CyberBits/GlobalUsings.cs
Normal file
5
CyberBits/GlobalUsings.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
global using CyberBits.Common;
|
||||
global using Godot;
|
||||
global using Engine = twodog.Engine;
|
||||
global using Env = System.Environment;
|
||||
global using System.Text.Json;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
using Cyberbits;
|
||||
|
||||
using var engine = new Engine("Cyberbits", Engine.ResolveProjectDir());
|
||||
// Create and start the Godot engine with your project
|
||||
using var engine = new Engine("CyberBits", Engine.ResolveProjectDir());
|
||||
using var godot = engine.Start();
|
||||
|
||||
// Load a scene
|
||||
// Load your main scene
|
||||
var scene = GD.Load<PackedScene>("res://main.tscn");
|
||||
engine.Tree.Root.AddChild(scene.Instantiate());
|
||||
|
||||
var load = engine.Tree.CurrentScene;
|
||||
|
||||
var bitsImage = load.GetNode<TextureRect>("BitsImage");
|
||||
|
|
@ -21,9 +21,11 @@ var screenSize = DisplayServer.ScreenGetSize();
|
|||
var window = load.GetWindow();
|
||||
window.Size = new Vector2I(screenSize.X - 66, screenSize.Y - 1);
|
||||
|
||||
ProjectSettings.SetSetting("application/config/version", CBConsts.VERSION);
|
||||
|
||||
if (!FileAccess.FileExists(baseContents)
|
||||
|| !FileAccess.FileExists(addonContents))
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
Env.Exit(Env.ExitCode);
|
||||
|
||||
var bits = JsonSerializer.Deserialize<Bits>(baseContents);
|
||||
var addon = JsonSerializer.Deserialize<Addon>(addonContents);
|
||||
|
|
@ -37,9 +39,17 @@ foreach (var selection in bits.Base)
|
|||
foreach (var cyberware in addon.Cyberware)
|
||||
cyberwareList.AddItem(cyberware);
|
||||
|
||||
// Run the main loop
|
||||
|
||||
GD.Print("2dog is running! Close window or press 'Q' to quit.");
|
||||
Console.WriteLine("Press 'Q' to quit.");
|
||||
|
||||
// Main game loop - runs until window closes or 'Q' is pressed
|
||||
while (!godot.Iteration())
|
||||
{
|
||||
if (Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Q)
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
break;
|
||||
|
||||
// Your per-frame logic here
|
||||
}
|
||||
|
||||
Console.WriteLine("Shutting down...");
|
||||
|
|
|
|||
19
CyberBitsOld/CyberBitsOld.csproj
Normal file
19
CyberBitsOld/CyberBitsOld.csproj
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="2dog" Version="0.1.14-pre" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<GodotProjectDir>./project</GodotProjectDir>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
45
CyberBitsOld/Program.cs
Normal file
45
CyberBitsOld/Program.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using Cyberbits;
|
||||
|
||||
using var engine = new Engine("Cyberbits", Engine.ResolveProjectDir());
|
||||
using var godot = engine.Start();
|
||||
|
||||
// Load a scene
|
||||
var scene = GD.Load<PackedScene>("res://main.tscn");
|
||||
engine.Tree.Root.AddChild(scene.Instantiate());
|
||||
var load = engine.Tree.CurrentScene;
|
||||
|
||||
var bitsImage = load.GetNode<TextureRect>("BitsImage");
|
||||
// var bitsSelection = curScene.GetNode<OptionButton>("BitsSelection");
|
||||
var unlockedFeatLbl = load.GetNode<Label>("UnlockedFeatLbl");
|
||||
var cyberwareList = load.GetNode<ItemList>("CyberwareList");
|
||||
var genitalList = load.GetNode<ItemList>("GenitalList");
|
||||
|
||||
var baseContents = FileFetcher.LoadTextFile(ResourceFiles.COCK_JSON);
|
||||
var addonContents = FileFetcher.LoadTextFile(ResourceFiles.ADDONS_JSON);
|
||||
|
||||
var screenSize = DisplayServer.ScreenGetSize();
|
||||
var window = load.GetWindow();
|
||||
window.Size = new Vector2I(screenSize.X - 66, screenSize.Y - 1);
|
||||
|
||||
if (!FileAccess.FileExists(baseContents)
|
||||
|| !FileAccess.FileExists(addonContents))
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
|
||||
var bits = JsonSerializer.Deserialize<Bits>(baseContents);
|
||||
var addon = JsonSerializer.Deserialize<Addon>(addonContents);
|
||||
|
||||
bitsImage.Texture.ResourcePath = bits.Image;
|
||||
unlockedFeatLbl.Text = $"Feat: {bits?.Feat}";
|
||||
|
||||
foreach (var selection in bits.Base)
|
||||
genitalList.AddItem(selection);
|
||||
|
||||
foreach (var cyberware in addon.Cyberware)
|
||||
cyberwareList.AddItem(cyberware);
|
||||
|
||||
// Run the main loop
|
||||
while (!godot.Iteration())
|
||||
{
|
||||
if (Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Q)
|
||||
sys.Environment.Exit(sys.Environment.ExitCode);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 252 KiB |
|
Before Width: | Height: | Size: 334 KiB After Width: | Height: | Size: 334 KiB |
|
|
@ -1,6 +0,0 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<!-- Allow running on any .NET 8+ runtime (8, 9, 10, ...) -->
|
||||
<RollForward>LatestMajor</RollForward>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
1
GitInfo.txt
Normal file
1
GitInfo.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
0.1.100
|
||||
|
|
@ -7,8 +7,10 @@ Loosely based on [Penis 2.0.77](https://glaiveguisarme.itch.io/penis-two-point-z
|
|||
### Prerequisites
|
||||
|
||||
- .NET 8 or later
|
||||
- [Godot Mono](https://godotengine.org/)
|
||||
- [Godot (.NET)](https://godotengine.org/)
|
||||
|
||||
Supported platforms: `win-x64`, `linux-x64`, and `osx-arm64`.
|
||||
|
||||
## License
|
||||
|
||||
I license this project under the GPL-3.0 license - see [LICENSE](LICENSE) for details.
|
||||
I license this project under the GPL-2.0 license - see [LICENSE](LICENSE) for details.
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "8.0.100",
|
||||
"rollForward": "latestMajor"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue