From c7b9a89b970ee8480b4b1f718ef68101f4abe9de Mon Sep 17 00:00:00 2001 From: Nytra Date: Thu, 30 Nov 2023 11:40:11 +0000 Subject: [PATCH 1/3] Fix MultiValueArithmeticDriver component enum --- .../Drivers/MultiValueArithmeticDriver.cs | 109 +++++++++--------- ProjectObsidian.csproj | 1 + 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Components/Transform/Drivers/MultiValueArithmeticDriver.cs b/Components/Transform/Drivers/MultiValueArithmeticDriver.cs index ddf8e70..8ec77ca 100644 --- a/Components/Transform/Drivers/MultiValueArithmeticDriver.cs +++ b/Components/Transform/Drivers/MultiValueArithmeticDriver.cs @@ -1,70 +1,69 @@ using System.Linq; -using Elements.Assets; using Elements.Core; using FrooxEngine; namespace Obsidian; +public enum ArithmeticMode +{ + Addition, + Subtraction, + Multiplication, + Division +} + [Category(new string[] { "Obsidian/Transform/Drivers" })] [GenericTypes(GenericTypesAttribute.Group.Primitives)] public class MultiValueArithmeticDriver : Component { - public static bool IsValidGenericType => Coder.SupportsAddSub; - - public enum ArithmeticMode - { - Addition, - Subtraction, - Multiplication, - Division - } + public static bool IsValidGenericType => Coder.SupportsAddSub; - public readonly FieldDrive Target; + public readonly FieldDrive Target; - public readonly Sync Mode; + public readonly Sync Mode; - public readonly SyncList> Values; + public readonly SyncList> Values; - protected override void OnChanges() - { - if (!Target.IsLinkValid || Values.Count == 0) - { - return; - } - if (Values.Contains(Target.Target)) - { - // don't let the component drive itself, don't want a feedback loop - Target.ReleaseLink(); - return; - } - T value = Values[0].Value; - switch (Mode.Value) - { - case ArithmeticMode.Addition: - foreach (Sync sync in Values.Skip(1)) - { - value = Coder.Add(value, sync.Value); - } - break; - case ArithmeticMode.Subtraction: - foreach (Sync sync in Values.Skip(1)) - { - value = Coder.Sub(value, sync.Value); - } - break; - case ArithmeticMode.Multiplication: - foreach (Sync sync in Values.Skip(1)) - { - value = Coder.Mul(value, sync.Value); - } - break; - case ArithmeticMode.Division: - foreach (Sync sync in Values.Skip(1)) - { - value = Coder.Div(value, sync.Value); - } - break; - } - Target.Target.Value = value; - } + protected override void OnChanges() + { + if (!Target.IsLinkValid || Values.Count == 0) + { + return; + } + if (Values.Contains(Target.Target)) + { + // don't let the component drive itself, don't want a feedback loop + Target.ReleaseLink(); + return; + } + T value = Values[0].Value; + switch (Mode.Value) + { + case ArithmeticMode.Addition: + foreach (Sync sync in Values.Skip(1)) + { + value = Coder.Add(value, sync.Value); + } + break; + case ArithmeticMode.Subtraction: + foreach (Sync sync in Values.Skip(1)) + { + value = Coder.Sub(value, sync.Value); + } + break; + case ArithmeticMode.Multiplication: + foreach (Sync sync in Values.Skip(1)) + { + value = Coder.Mul(value, sync.Value); + } + break; + case ArithmeticMode.Division: + foreach (Sync sync in Values.Skip(1)) + { + value = Coder.Div(value, sync.Value); + } + break; + } + Target.Target.Value = value; + } } \ No newline at end of file diff --git a/ProjectObsidian.csproj b/ProjectObsidian.csproj index 49fecf8..8b42581 100644 --- a/ProjectObsidian.csproj +++ b/ProjectObsidian.csproj @@ -12,6 +12,7 @@ C:\Program Files (x86)\Steam\steamapps\common\Resonite\ $(HOME)/.steam/steam/steamapps/common/Resonite/ /mnt/LocalDisk2/SteamLibrary/steamapps/common/Resonite/ + G:\SteamLibrary\steamapps\common\Resonite\ From f8111bb88c2e7b94706c024f92d8bc2c2865ff3e Mon Sep 17 00:00:00 2001 From: xLinka Date: Thu, 30 Nov 2023 14:06:25 +0000 Subject: [PATCH 2/3] Github Stuff --- .editorconfig | 16 +++++ .git-blame-ignore-revs | 8 +++ .gitattributes | 146 ++++++++++++++++++++++++++++++++++++++++- .gitignore | 54 ++------------- 4 files changed, 174 insertions(+), 50 deletions(-) create mode 100644 .editorconfig create mode 100644 .git-blame-ignore-revs diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f0d9559 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +[*] +indent_style = space + +[*.{cs,csx,vb,vbx}] +indent_size = 4 + +[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] +indent_size = 2 + +[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] +indent_size = 2 + +[*.{cs,vb}] +# Sort using and Import directives with System.* appearing first +dotnet_sort_system_directives_first = true +dotnet_style_require_accessibility_modifiers = always:warning \ No newline at end of file diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000..7e176c8 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,8 @@ +#Ignores big formatting commits when checking blame. +#To make use of this file by default, run 'git config blame.ignoreRevsFile .git-blame-ignore-revs' in the project folder + +## Line ending conversions +c7009d2a57bd271c5bdcece21c3c290d18101b2a + +## .editorconfig formatting +07f8c32a7431c30b8eecf79d6a7df19506170903 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index dfe0770..27bcb70 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,146 @@ +# Common settings that generally should always be used with your language specific settings + # Auto detect text files and perform LF normalization -* text=auto +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.adoc text +*.bibtex text diff=bibtex +*.csv text +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.epub diff=astextplain +*.md text diff=markdown +*.mdx text diff=markdown +*.mustache text +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.sql text +*.tab text +*.tex text diff=tex +*.textile text +*.tsv text +*.txt text + +# Graphics +*.eps binary +*.gif binary +*.ico binary +*.jpeg binary +*.jpg binary +*.png binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.tif binary +*.tiff binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf +*.zsh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.gz binary +*.tar binary +*.tgz binary +*.zip binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore + +# Auto detect text files and perform LF normalization +* text=auto + +*.cs text diff=csharp +*.cshtml text diff=html +*.csproj text eol=crlf +*.csx text diff=csharp +*.sln text eol=crlf + +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just comment the entries below and +# uncomment the group further below +############################################################################### + +*.csproj text eol=crlf +*.dbproj text eol=crlf +*.fsproj text eol=crlf +*.lsproj text eol=crlf +*.modelproj text eol=crlf +*.sln text eol=crlf +*.sqlproj text eol=crlf +*.vbproj text eol=crlf +*.vcproj text eol=crlf +*.vcxproj text eol=crlf +*.wixproj text eol=crlf +*.wwaproj text eol=crlf + +*.filters text eol=crlf +*.props text eol=crlf +*.vcxitems text eol=crlf +*.xproj text eol=crlf + + +#*.csproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.modelproj merge=binary +#*.sln merge=binary +#*.sqlproj merge=binary +#*.vbproj merge=binary +#*.vcproj merge=binary +#*.vcxproj merge=binary +#*.wixproj merge=binary +#*.wwaproj merge=binary + +#*.filters merge=binary +#*.props merge=binary +#*.vcxitems merge=binary +#*.xproj merge=binary \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0baa9b8..38a7874 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ +## Ignore Neos Files +NeosVR/ + ## 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 +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser @@ -23,7 +26,6 @@ mono_crash.* [Rr]eleases/ x64/ x86/ -[Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ @@ -62,9 +64,6 @@ project.lock.json project.fragment.lock.json artifacts/ -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - # StyleCop StyleCopReport.xml @@ -90,7 +89,6 @@ StyleCopReport.xml *.tmp_proj *_wpftmp.csproj *.log -*.tlog *.vspscc *.vssscc .builds @@ -142,11 +140,6 @@ _TeamCity* .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 @@ -294,17 +287,6 @@ node_modules/ # 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 -*.ncb -*.aps - # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts @@ -361,9 +343,6 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ -# Visual Studio History (VSHistory) files -.vshistory/ - # BeatPulse healthcheck temp database healthchecksdb @@ -373,27 +352,4 @@ 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 -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml -.idea/ +.idea \ No newline at end of file From 1565479ef2e716eb4b49e38027a926b4eb6feb8d Mon Sep 17 00:00:00 2001 From: xLinka Date: Thu, 30 Nov 2023 14:11:23 +0000 Subject: [PATCH 3/3] Update .gitignore shh --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 38a7874..e30e459 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -## Ignore Neos Files -NeosVR/ +## Ignore Resonite's Files +Resonite/ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons.