forked from nikita/muzika-gromche
				
			Compare commits
	
		
			16 Commits
		
	
	
		
			8518e0f62d
			...
			787f15944a
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 787f15944a | |
|  | aba0f6bab5 | |
|  | 9176e35344 | |
|  | 2284636576 | |
|  | 38d4ddd7c6 | |
|  | e82f2c5924 | |
|  | 45bde29240 | |
|  | 066304a9fe | |
|  | af45b958fd | |
|  | 4144069b41 | |
|  | 2bd17424cd | |
|  | cb1002d339 | |
|  | 68b4e120db | |
|  | a65dd56bc3 | |
|  | ef1e2fd70b | |
|  | 9100bbe8a3 | 
|  | @ -1,8 +1,493 @@ | ||||||
| bin/ | ## Ignore Visual Studio temporary files, build results, and | ||||||
| obj/ | ## files generated by popular Visual Studio add-ons. | ||||||
| /packages/ | ## | ||||||
| riderModule.iml | ## Get latest from `dotnet new gitignore` | ||||||
| /_ReSharper.Caches/ | 
 | ||||||
|  | # dotenv files | ||||||
|  | .env | ||||||
|  | 
 | ||||||
|  | # 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 | ||||||
|  | project.lock.json | ||||||
|  | project.fragment.lock.json | ||||||
|  | artifacts/ | ||||||
|  | 
 | ||||||
|  | # Tye | ||||||
|  | .tye/ | ||||||
|  | 
 | ||||||
|  | # 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 | ||||||
|  | 
 | ||||||
|  | # Microsoft 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 | ||||||
|  | # 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 | ||||||
|  | 
 | ||||||
|  | # Microsoft Azure Build Output | ||||||
|  | csx/ | ||||||
|  | *.build.csdef | ||||||
|  | 
 | ||||||
|  | # Microsoft 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 | ||||||
|  | 
 | ||||||
|  | # Microsoft 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 | ||||||
|  | *.ncb | ||||||
|  | *.aps | ||||||
|  | 
 | ||||||
|  | # 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 | ||||||
|  | .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/ | ||||||
|  | 
 | ||||||
|  | ## | ||||||
|  | ## Visual studio for Mac | ||||||
|  | ## | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | # globs | ||||||
|  | Makefile.in | ||||||
|  | *.userprefs | ||||||
|  | *.usertasks | ||||||
|  | config.make | ||||||
|  | config.status | ||||||
|  | aclocal.m4 | ||||||
|  | install-sh | ||||||
|  | autom4te.cache/ | ||||||
|  | *.tar.gz | ||||||
|  | tarballs/ | ||||||
|  | test-results/ | ||||||
|  | 
 | ||||||
|  | # Mac bundle stuff | ||||||
|  | *.dmg | ||||||
|  | *.app | ||||||
|  | 
 | ||||||
|  | # content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore | ||||||
|  | # General | ||||||
|  | .DS_Store | ||||||
|  | .AppleDouble | ||||||
|  | .LSOverride | ||||||
|  | 
 | ||||||
|  | # Icon must end with two \r | ||||||
|  | Icon | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | # Thumbnails | ||||||
|  | ._* | ||||||
|  | 
 | ||||||
|  | # Files that might appear in the root of a volume | ||||||
|  | .DocumentRevisions-V100 | ||||||
|  | .fseventsd | ||||||
|  | .Spotlight-V100 | ||||||
|  | .TemporaryItems | ||||||
|  | .Trashes | ||||||
|  | .VolumeIcon.icns | ||||||
|  | .com.apple.timemachine.donotpresent | ||||||
|  | 
 | ||||||
|  | # Directories potentially created on remote AFP share | ||||||
|  | .AppleDB | ||||||
|  | .AppleDesktop | ||||||
|  | Network Trash Folder | ||||||
|  | Temporary Items | ||||||
|  | .apdisk | ||||||
|  | 
 | ||||||
|  | # content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore | ||||||
|  | # Windows thumbnail cache files | ||||||
|  | Thumbs.db | ||||||
|  | ehthumbs.db | ||||||
|  | ehthumbs_vista.db | ||||||
|  | 
 | ||||||
|  | # Dump file | ||||||
|  | *.stackdump | ||||||
|  | 
 | ||||||
|  | # Folder config file | ||||||
|  | [Dd]esktop.ini | ||||||
|  | 
 | ||||||
|  | # Recycle Bin used on file shares | ||||||
|  | $RECYCLE.BIN/ | ||||||
|  | 
 | ||||||
|  | # Windows Installer files | ||||||
|  | *.cab | ||||||
|  | *.msi | ||||||
|  | *.msix | ||||||
|  | *.msm | ||||||
|  | *.msp | ||||||
|  | 
 | ||||||
|  | # Windows shortcuts | ||||||
|  | *.lnk | ||||||
|  | 
 | ||||||
|  | # Vim temporary swap files | ||||||
|  | *.swp | ||||||
|  | 
 | ||||||
|  | # Override *.user rule for templates | ||||||
|  | !*.template.props.user | ||||||
|  | !*.template.just.user | ||||||
|  | 
 | ||||||
|  | riderModule.iml | ||||||
|  | dist/ | ||||||
| *.dll | *.dll | ||||||
| MuzikaGromche.sln.DotSettings.user | *.zip | ||||||
|  |  | ||||||
|  | @ -1 +1,3 @@ | ||||||
| *.mp3 filter=lfs diff=lfs merge=lfs -text | *.mp3 filter=lfs diff=lfs merge=lfs -text | ||||||
|  | *.ogg filter=lfs diff=lfs merge=lfs -text | ||||||
|  | *.wav filter=lfs diff=lfs merge=lfs -text | ||||||
|  |  | ||||||
|  | @ -0,0 +1,4 @@ | ||||||
|  | <Project> | ||||||
|  |     <!-- Import local user props --> | ||||||
|  |     <Import Project="$(SolutionDir)MuzikaGromche.props.user"/> | ||||||
|  | </Project> | ||||||
|  | @ -0,0 +1,28 @@ | ||||||
|  | import? 'MuzikaGromche.just.user' | ||||||
|  | 
 | ||||||
|  | build: build-debug build-release | ||||||
|  | 
 | ||||||
|  | build-release: | ||||||
|  |     dotnet build --configuration Release | ||||||
|  | 
 | ||||||
|  | build-debug: | ||||||
|  |     dotnet build --configuration Debug | ||||||
|  | 
 | ||||||
|  | clean: | ||||||
|  |     rm -rf    dist    MuzikaGromche/bin    MuzikaGromche/obj | ||||||
|  | 
 | ||||||
|  | plugin_dir := "$HOME/.config/r2modmanPlus-local/LethalCompany/profiles" / imperium_profile / "BepInEx/plugins/Oflor-MuzikaGromche/" | ||||||
|  | 
 | ||||||
|  | install-imperium: | ||||||
|  |     rm    -rf    "{{ plugin_dir }}" | ||||||
|  |     mkdir    "{{ plugin_dir }}" | ||||||
|  |     unzip    -q    dist/MuzikaGromche-Debug.zip    -d    "{{ plugin_dir }}" | ||||||
|  | 
 | ||||||
|  | run-imperium: | ||||||
|  |     DRI_PRIME=1 steam -applaunch 1966720 --doorstop-enable true --doorstop-target "Z:$HOME/.config/r2modmanPlus-local/LethalCompany/profiles/{{ imperium_profile }}/BepInEx/core/BepInEx.Preloader.dll" --r2profile "{{ imperium_profile }}" | ||||||
|  | 
 | ||||||
|  | bump version_number: | ||||||
|  |     [[ "v{{ version_number }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] || (echo "Invalid version format" && exit 1) | ||||||
|  |     jq --indent 4 --arg v "{{ version_number }}" '.version_number = $v' < manifest.json > manifest.json.copy | ||||||
|  |     mv manifest.json.copy manifest.json | ||||||
|  |     sed -i 's/<Version>.*<\/Version>/<Version>{{ version_number }}<\/Version>/' MuzikaGromche/MuzikaGromche.csproj | ||||||
|  | @ -0,0 +1,3 @@ | ||||||
|  | # Copy me to MuzikaGromche.just.user and adjust tasks to your workflow | ||||||
|  | 
 | ||||||
|  | imperium_profile := "Muzika Gromche with Imperium" | ||||||
|  | @ -0,0 +1,10 @@ | ||||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||||
|  | <Project> | ||||||
|  |     <PropertyGroup> | ||||||
|  |         <!-- Copy this file to MuzikaGromche.props.user and uncomment one of two paths below: --> | ||||||
|  |         <!-- On Linux: --> | ||||||
|  |         <!-- <LethalCompanyDir>$(HOME)/.local/share/Steam/steamapps/common/Lethal Company/</LethalCompanyDir> --> | ||||||
|  |         <!-- On Windows: --> | ||||||
|  |         <!-- <LethalCompanyDir>C:/Program Files (x86)/Steam/steamapps/common/Lethal Company/</LethalCompanyDir> --> | ||||||
|  |     </PropertyGroup> | ||||||
|  | </Project> | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
|         <TargetFramework>netstandard2.1</TargetFramework> |         <TargetFramework>netstandard2.1</TargetFramework> | ||||||
|         <AssemblyName>MuzikaGromche</AssemblyName> |         <AssemblyName>MuzikaGromche</AssemblyName> | ||||||
|         <Description>Opa che tut u nas</Description> |         <Description>Opa che tut u nas</Description> | ||||||
|         <Version>1.0.0</Version> |         <Version>13.37.6</Version> | ||||||
|         <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |         <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||||||
|         <LangVersion>latest</LangVersion> |         <LangVersion>latest</LangVersion> | ||||||
|     </PropertyGroup> |     </PropertyGroup> | ||||||
|  | @ -15,11 +15,56 @@ | ||||||
|         <PackageReference Include="BepInEx.PluginInfoProps" Version="1.*"/> |         <PackageReference Include="BepInEx.PluginInfoProps" Version="1.*"/> | ||||||
|         <PackageReference Include="UnityEngine.Modules" Version="2022.3.9" IncludeAssets="compile"/> |         <PackageReference Include="UnityEngine.Modules" Version="2022.3.9" IncludeAssets="compile"/> | ||||||
|         <PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" /> |         <PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" /> | ||||||
|         <Reference Include="Assembly-CSharp" HintPath="Assembly-CSharp.dll" Publicize="true" /> |     </ItemGroup> | ||||||
|         <Reference Include="Unity.Netcode.Runtime" HintPath="Unity.Netcode.Runtime.dll" Publicize="true" /> | 
 | ||||||
|  |     <ItemGroup> | ||||||
|  |         <Reference Include="Assembly-CSharp" Publicize="true"> | ||||||
|  |             <HintPath>$(LethalCompanyDir)Lethal Company_Data\Managed\Assembly-CSharp.dll</HintPath> | ||||||
|  |         </Reference> | ||||||
|  |         <Reference Include="Unity.Collections"> | ||||||
|  |             <HintPath>$(LethalCompanyDir)Lethal Company_Data\Managed\Unity.Collections.dll</HintPath> | ||||||
|  |         </Reference> | ||||||
|  |         <Reference Include="Unity.Netcode.Runtime" Publicize="true"> | ||||||
|  |             <HintPath>$(LethalCompanyDir)Lethal Company_Data\Managed\Unity.Netcode.Runtime.dll</HintPath> | ||||||
|  |         </Reference> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
| 
 | 
 | ||||||
|     <ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> |     <ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'"> | ||||||
|         <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/> |         <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all"/> | ||||||
|     </ItemGroup> |     </ItemGroup> | ||||||
|  | 
 | ||||||
|  |     <Target Name="Bundle" AfterTargets="Build"> | ||||||
|  |         <PropertyGroup> | ||||||
|  |             <DistDir>$(TargetDir)MuzikaGromche\</DistDir> | ||||||
|  |             <ZipBundle>$(TargetDir)MuzikaGromche-$(Configuration).zip</ZipBundle> | ||||||
|  |         </PropertyGroup> | ||||||
|  | 
 | ||||||
|  |         <ItemGroup> | ||||||
|  |             <PackagedResources Include="$(SolutionDir)README.md" /> | ||||||
|  |             <PackagedResources Include="$(SolutionDir)icon.png" /> | ||||||
|  |             <PackagedResources Include="$(SolutionDir)manifest.json" /> | ||||||
|  |             <PackagedResources Include="$(TargetDir)MuzikaGromche.dll" /> | ||||||
|  |         </ItemGroup> | ||||||
|  | 
 | ||||||
|  |         <ItemGroup> | ||||||
|  |             <AudioFiles Include="$(SolutionDir)Assets\*.mp3" /> | ||||||
|  |             <AudioFiles Include="$(SolutionDir)Assets\*.ogg" /> | ||||||
|  |             <AudioFiles Include="$(SolutionDir)Assets\*.wav" /> | ||||||
|  |         </ItemGroup> | ||||||
|  | 
 | ||||||
|  |         <RemoveDir Directories="$(DistDir)" /> | ||||||
|  |         <Copy | ||||||
|  |             SourceFiles="@(AudioFiles);@(PackagedResources)" | ||||||
|  |             DestinationFolder="$(DistDir)" | ||||||
|  |         /> | ||||||
|  |         <ZipDirectory | ||||||
|  |             SourceDirectory="$(DistDir)" | ||||||
|  |             DestinationFile="$(TargetDir)MuzikaGromche-$(Configuration).zip" | ||||||
|  |             Overwrite="true" | ||||||
|  |         /> | ||||||
|  |         <Copy | ||||||
|  |             SourceFiles="$(ZipBundle)" | ||||||
|  |             DestinationFolder="$(SolutionDir)dist\" | ||||||
|  |         /> | ||||||
|  |     </Target> | ||||||
| </Project> | </Project> | ||||||
|  |  | ||||||
|  | @ -13,199 +13,257 @@ namespace MuzikaGromche | ||||||
|     [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] |     [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] | ||||||
|     public class Plugin : BaseUnityPlugin |     public class Plugin : BaseUnityPlugin | ||||||
|     { |     { | ||||||
| 		public static Track[] Tracks = [ |         public static Track[] Tracks = [ | ||||||
| 			new Track |             new Track | ||||||
| 			{ |             { | ||||||
| 				Name = "MuzikaGromche", |                 Name = "MuzikaGromche", | ||||||
| 				WindUpTimer = 46.3f, |                 WindUpTimer = 46.3f, | ||||||
| 				Bpm = 130f, |                 Bpm = 130f, | ||||||
| 			}, |             }, | ||||||
| 			new Track |             new Track | ||||||
| 			{ |             { | ||||||
| 				Name = "VseVZale", |                 Name = "VseVZale", | ||||||
| 				WindUpTimer = 39f,  |                 WindUpTimer = 39f, | ||||||
| 				Bpm = 138f, |                 Bpm = 138f, | ||||||
| 			}, |             }, | ||||||
| 			new Track |             new Track | ||||||
| 			{ |             { | ||||||
| 				Name = "DeployDestroy", |                 Name = "DeployDestroy", | ||||||
| 				WindUpTimer = 40.7f, |                 WindUpTimer = 40.7f, | ||||||
| 				Bpm = 130f, |                 Bpm = 130f, | ||||||
| 			}, |             }, | ||||||
| 			new Track |             new Track | ||||||
| 			{ |             { | ||||||
| 				Name = "MoyaZhittya", |                 Name = "MoyaZhittya", | ||||||
| 				WindUpTimer = 34.5f, |                 WindUpTimer = 34.5f, | ||||||
| 				Bpm = 120f, |                 Bpm = 120f, | ||||||
| 			}, |             }, | ||||||
| 			new Track |             new Track | ||||||
| 			{ |             { | ||||||
| 				Name = "Gorgorod", |                 Name = "Gorgorod", | ||||||
| 				WindUpTimer = 43.2f, |                 WindUpTimer = 43.2f, | ||||||
| 				Bpm = 180f, |                 Bpm = 180f, | ||||||
| 			}, |             }, | ||||||
| 			new Track |             new Track | ||||||
| 			{ |             { | ||||||
| 				Name = "Durochka", |                 Name = "Durochka", | ||||||
| 				WindUpTimer = 37f, |                 WindUpTimer = 37f, | ||||||
| 				Bpm = 130f, |                 Bpm = 130f, | ||||||
| 			} |             } | ||||||
| 		]; |         ]; | ||||||
| 
 | 
 | ||||||
| 		public static Coroutine JesterLightSwitching; |         public static Coroutine JesterLightSwitching; | ||||||
| 		public static Track CurrentTrack; |         public static Track CurrentTrack; | ||||||
| 
 | 
 | ||||||
| 		private void Awake() |         public static void StartLightSwitching(MonoBehaviour __instance) | ||||||
| 		{ |         { | ||||||
| 			string text = Info.Location.TrimEnd((PluginInfo.PLUGIN_NAME + ".dll").ToCharArray()); |             StopLightSwitching(__instance); | ||||||
| 			UnityWebRequest[] requests = new UnityWebRequest[Tracks.Length * 2]; |             JesterLightSwitching = __instance.StartCoroutine(RotateColors()); | ||||||
| 			for (int i = 0; i < Tracks.Length; i++) { |         } | ||||||
| 				Track track = Tracks[i]; |  | ||||||
| 				requests[i * 2] = UnityWebRequestMultimedia.GetAudioClip($"File://{text}{track.Name}Start.mp3", AudioType.MPEG); |  | ||||||
| 				requests[i * 2 + 1] = UnityWebRequestMultimedia.GetAudioClip($"File://{text}{track.Name}Loop.mp3", AudioType.MPEG); |  | ||||||
| 				requests[i * 2].SendWebRequest(); |  | ||||||
| 				requests[i * 2 + 1].SendWebRequest(); |  | ||||||
| 			} |  | ||||||
| 
 | 
 | ||||||
| 			while (!requests.All(request => request.isDone)) { } |         public static void StopLightSwitching(MonoBehaviour __instance) | ||||||
|  |         { | ||||||
|  |             if (JesterLightSwitching != null) | ||||||
|  |             { | ||||||
|  |                 __instance.StopCoroutine(JesterLightSwitching); | ||||||
|  |                 JesterLightSwitching = null; | ||||||
|  |             } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
| 			if (requests.All(request => request.result == UnityWebRequest.Result.Success)) { |         public static void SetLightColor(Color color) | ||||||
| 				for (int i = 0; i < Tracks.Length; i++) { |         { | ||||||
| 					Tracks[i].LoadedStart = DownloadHandlerAudioClip.GetContent(requests[i * 2]); |             foreach (var light in RoundManager.Instance.allPoweredLights) | ||||||
| 					Tracks[i].LoadedLoop = DownloadHandlerAudioClip.GetContent(requests[i * 2 + 1]); |             { | ||||||
| 				} |                 light.color = color; | ||||||
| 				new Harmony(PluginInfo.PLUGIN_NAME).PatchAll(typeof(JesterPatch)); |             } | ||||||
| 			} else { |         } | ||||||
| 				Logger.LogError("Could not load audio file"); | 
 | ||||||
| 			} |         public static void ResetLightColor() | ||||||
| 		} |         { | ||||||
|  |             SetLightColor(Color.white); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         // TODO: Move to Track class to make them customizable per-song | ||||||
|  |         static List<Color> colors = [Color.magenta, Color.cyan, Color.green, Color.yellow]; | ||||||
|  | 
 | ||||||
|  |         public static IEnumerator RotateColors() | ||||||
|  |         { | ||||||
|  |             Debug.Log("Starting color rotation"); | ||||||
|  |             var i = 0; | ||||||
|  |             while (true) | ||||||
|  |             { | ||||||
|  |                 var color = colors[i]; | ||||||
|  |                 Debug.Log("Chose color " + color); | ||||||
|  |                 SetLightColor(color); | ||||||
|  |                 i = (i + 1) % colors.Count; | ||||||
|  |                 if (CurrentTrack != null) | ||||||
|  |                 { | ||||||
|  |                     yield return new WaitForSeconds(60f / CurrentTrack.Bpm); | ||||||
|  |                 } | ||||||
|  |                 else | ||||||
|  |                 { | ||||||
|  |                     yield break; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         private void Awake() | ||||||
|  |         { | ||||||
|  |             string text = Info.Location.TrimEnd((PluginInfo.PLUGIN_NAME + ".dll").ToCharArray()); | ||||||
|  |             UnityWebRequest[] requests = new UnityWebRequest[Tracks.Length * 2]; | ||||||
|  |             for (int i = 0; i < Tracks.Length; i++) | ||||||
|  |             { | ||||||
|  |                 Track track = Tracks[i]; | ||||||
|  |                 requests[i * 2] = UnityWebRequestMultimedia.GetAudioClip($"File://{text}{track.FileNameStart}", track.AudioType); | ||||||
|  |                 requests[i * 2 + 1] = UnityWebRequestMultimedia.GetAudioClip($"File://{text}{track.FileNameLoop}", track.AudioType); | ||||||
|  |                 requests[i * 2].SendWebRequest(); | ||||||
|  |                 requests[i * 2 + 1].SendWebRequest(); | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             while (!requests.All(request => request.isDone)) { } | ||||||
|  | 
 | ||||||
|  |             if (requests.All(request => request.result == UnityWebRequest.Result.Success)) | ||||||
|  |             { | ||||||
|  |                 for (int i = 0; i < Tracks.Length; i++) | ||||||
|  |                 { | ||||||
|  |                     Track track = Tracks[i]; | ||||||
|  |                     track.LoadedStart = DownloadHandlerAudioClip.GetContent(requests[i * 2]); | ||||||
|  |                     track.LoadedLoop = DownloadHandlerAudioClip.GetContent(requests[i * 2 + 1]); | ||||||
|  |                 } | ||||||
|  |                 new Harmony(PluginInfo.PLUGIN_NAME).PatchAll(typeof(JesterPatch)); | ||||||
|  |             } | ||||||
|  |             else | ||||||
|  |             { | ||||||
|  |                 Logger.LogError("Could not load audio file"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public class Track |     public class Track | ||||||
|     { |     { | ||||||
| 	    public string Name; |         public string Name; | ||||||
| 	    public float WindUpTimer; |         // Wind-up time can and should be shorter than the Start audio track, | ||||||
| 	    public float Bpm; |         // so that the "pop" effect can be baked into the Start audio and kept away | ||||||
| 	    public AudioClip LoadedStart; |         // from the looped part. This also means that the light show starts before | ||||||
| 	    public AudioClip LoadedLoop; |         // the looped track does, so we need to sync them up as soon as we enter the Loop. | ||||||
|  |         public float WindUpTimer; | ||||||
|  |         // BPM for light switching in sync with the music. There is no offset, | ||||||
|  |         // so the Loop track should start precisely on a beat. | ||||||
|  |         public float Bpm; | ||||||
|  | 
 | ||||||
|  |         // MPEG is basically mp3, and it can produce gaps at the start. | ||||||
|  |         // WAV is OK, but takes a lot of space. Try OGGVORBIS instead. | ||||||
|  |         public AudioType AudioType = AudioType.MPEG; | ||||||
|  | 
 | ||||||
|  |         public AudioClip LoadedStart; | ||||||
|  |         public AudioClip LoadedLoop; | ||||||
|  | 
 | ||||||
|  |         public string FileNameStart => $"{Name}Start.{Ext}"; | ||||||
|  |         public string FileNameLoop => $"{Name}Loop.{Ext}"; | ||||||
|  |         private string Ext => AudioType switch | ||||||
|  |         { | ||||||
|  |             AudioType.MPEG => "mp3", | ||||||
|  |             AudioType.WAV => "wav", | ||||||
|  |             AudioType.OGGVORBIS => "ogg", | ||||||
|  |             _ => "", | ||||||
|  |         }; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     [HarmonyPatch(typeof(JesterAI))] |     [HarmonyPatch(typeof(JesterAI))] | ||||||
|     internal class JesterPatch |     internal class JesterPatch | ||||||
|     { |     { | ||||||
| 	    [HarmonyPatch("Update")] | #if DEBUG | ||||||
| 	    [HarmonyPrefix] |         [HarmonyPatch("SetJesterInitialValues")] | ||||||
| 	    public static void DoNotStopTheMusicPrefix(JesterAI __instance, out State __state) |         [HarmonyPostfix] | ||||||
| 	    { |         public static void AlmostInstantFollowTimerPostfix(JesterAI __instance) | ||||||
| 		    __state = new State(); |         { | ||||||
| 		    __state.prevStateindex = __instance.previousState; |             __instance.beginCrankingTimer = 1f; | ||||||
| 		    if (__instance.currentBehaviourStateIndex == 2 && __instance.previousBehaviourStateIndex != 2) { |         } | ||||||
| 			    // if just popped out | #endif | ||||||
| 			    // then override farAudio so that vanilla logic does not stop the music |         [HarmonyPatch("Update")] | ||||||
| 			    __state.farAudio = __instance.farAudio; |         [HarmonyPrefix] | ||||||
| 			    __instance.farAudio = __instance.creatureVoice; |         public static void DoNotStopTheMusicPrefix(JesterAI __instance, out State __state) | ||||||
| 		    } |         { | ||||||
| 	    } |             __state = new State | ||||||
|  |             { | ||||||
|  |                 previousState = __instance.previousState | ||||||
|  |             }; | ||||||
|  |             if (__instance.currentBehaviourStateIndex == 2 && __instance.previousState != 2) | ||||||
|  |             { | ||||||
|  |                 // if just popped out | ||||||
|  |                 // then override farAudio so that vanilla logic does not stop the music | ||||||
|  |                 __state.farAudio = __instance.farAudio; | ||||||
|  |                 __instance.farAudio = __instance.creatureVoice; | ||||||
|  |             } | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
| 	    static List<Color> colors = [Color.magenta, Color.cyan, Color.green, Color.yellow]; |         [HarmonyPatch("Update")] | ||||||
| 
 |  | ||||||
| 	    public static IEnumerator rotateColors() |  | ||||||
| 	    { |  | ||||||
| 		    Debug.Log("Starting color rotation"); |  | ||||||
| 		    var i = 0; |  | ||||||
| 		    while (true) |  | ||||||
| 		    { |  | ||||||
| 			    var color = colors[i]; |  | ||||||
| 			    Debug.Log("Chose color " + color); |  | ||||||
| 			    foreach (var light in RoundManager.Instance.allPoweredLights) |  | ||||||
| 			    { |  | ||||||
| 				    light.color = color; |  | ||||||
| 			    } |  | ||||||
| 
 |  | ||||||
| 			    i += 1; |  | ||||||
| 			    if (i >= colors.Count) i = 0; |  | ||||||
| 			    yield return new WaitForSeconds(60f / Plugin.CurrentTrack.Bpm); |  | ||||||
| 		    } |  | ||||||
| 	    } |  | ||||||
| 
 |  | ||||||
| 		[HarmonyPatch("Update")] |  | ||||||
|         [HarmonyPostfix] |         [HarmonyPostfix] | ||||||
|         public static void DoNotStopTheMusic(JesterAI __instance, State __state) |         public static void DoNotStopTheMusic(JesterAI __instance, State __state) | ||||||
|         { |         { | ||||||
| 	        if (__state.farAudio != null) |             if (__state.farAudio != null) | ||||||
| 	        { |             { | ||||||
| 		        __instance.farAudio = __state.farAudio; |                 __instance.farAudio = __state.farAudio; | ||||||
| 	        } |             } | ||||||
| 
 | 
 | ||||||
| 	        if (__instance.currentBehaviourStateIndex is 1 && __state.prevStateindex != 1) |             if (__instance.previousState == 1 && __state.previousState != 1) | ||||||
| 	        { |             { | ||||||
| 		        // if just started winding up |                 // if just started winding up | ||||||
| 		        // then stop the default music... |                 // then stop the default music... | ||||||
| 		        __instance.farAudio.Stop(); |                 __instance.farAudio.Stop(); | ||||||
| 		        __instance.creatureVoice.Stop(); |                 __instance.creatureVoice.Stop(); | ||||||
| 
 | 
 | ||||||
| 		        //  ...and start modded music |                 //  ...and start modded music | ||||||
| 		        var seed = RoundManager.Instance.dungeonGenerator.Generator.ChosenSeed; |                 var seed = RoundManager.Instance.dungeonGenerator.Generator.ChosenSeed; | ||||||
| 		        var sha = SHA256.Create(); |                 var sha = SHA256.Create(); | ||||||
| 		        var hash = sha.ComputeHash(BitConverter.GetBytes(seed)); |                 var hash = sha.ComputeHash(BitConverter.GetBytes(seed)); | ||||||
| 		        var trackId = 0; |                 var trackId = 0; | ||||||
| 		        foreach (var t in hash) |                 foreach (var t in hash) | ||||||
| 		        { |                 { | ||||||
| 			        // modulus division on byte array |                     // modulus division on byte array | ||||||
| 			        trackId *= 256 % Plugin.Tracks.Length; |                     trackId *= 256 % Plugin.Tracks.Length; | ||||||
| 			        trackId %= Plugin.Tracks.Length; |                     trackId %= Plugin.Tracks.Length; | ||||||
| 			        trackId += t % Plugin.Tracks.Length; |                     trackId += t % Plugin.Tracks.Length; | ||||||
| 			        trackId %= Plugin.Tracks.Length; |                     trackId %= Plugin.Tracks.Length; | ||||||
| 		        } |                 } | ||||||
| 		        Debug.Log($"Seed is {seed}, chosen track is {trackId} out of {Plugin.Tracks.Length} tracks"); |                 Debug.Log($"Seed is {seed}, chosen track is {trackId} out of {Plugin.Tracks.Length} tracks"); | ||||||
| 		        Plugin.CurrentTrack = Plugin.Tracks[trackId]; |                 Plugin.CurrentTrack = Plugin.Tracks[trackId]; | ||||||
| 		        __instance.popUpTimer = Plugin.CurrentTrack.WindUpTimer; |                 __instance.popUpTimer = Plugin.CurrentTrack.WindUpTimer; | ||||||
| 		        __instance.farAudio.maxDistance = 150; |                 __instance.farAudio.maxDistance = 150; | ||||||
| 		        __instance.farAudio.clip = Plugin.CurrentTrack.LoadedStart; |                 __instance.farAudio.clip = Plugin.CurrentTrack.LoadedStart; | ||||||
| 		        __instance.farAudio.loop = false; |                 __instance.farAudio.loop = false; | ||||||
| 		        Debug.Log($"Playing start music: maxDistance: {__instance.farAudio.maxDistance}, minDistance: {__instance.farAudio.minDistance}, volume: {__instance.farAudio.volume}, spread: {__instance.farAudio.spread}"); |                 Debug.Log($"Playing start music: maxDistance: {__instance.farAudio.maxDistance}, minDistance: {__instance.farAudio.minDistance}, volume: {__instance.farAudio.volume}, spread: {__instance.farAudio.spread}"); | ||||||
| 		        __instance.farAudio.Play(); |                 __instance.farAudio.Play(); | ||||||
| 	        } |             } | ||||||
| 
 | 
 | ||||||
| 	        if (__instance.currentBehaviourStateIndex is 2 && __state.prevStateindex != 2) |             if (__instance.previousState == 2 && __state.previousState != 2) | ||||||
| 	        { |             { | ||||||
| 		        __instance.creatureVoice.Stop(); |                 __instance.creatureVoice.Stop(); | ||||||
|  |                 Plugin.StartLightSwitching(__instance); | ||||||
|  |             } | ||||||
| 
 | 
 | ||||||
| 		        if (Plugin.JesterLightSwitching != null) { |             if (__instance.previousState != 2 && __state.previousState == 2) | ||||||
| 			        __instance.StopCoroutine(Plugin.JesterLightSwitching); |             { | ||||||
| 			        Plugin.JesterLightSwitching = null; |                 Plugin.StopLightSwitching(__instance); | ||||||
| 		        } |                 Plugin.ResetLightColor(); | ||||||
| 		        Plugin.JesterLightSwitching = __instance.StartCoroutine(rotateColors()); |             } | ||||||
| 	        } |  | ||||||
| 
 | 
 | ||||||
| 	        if (__instance.currentBehaviourStateIndex != 2 && __state.prevStateindex == 2) |             if (__instance.previousState == 2 && !__instance.creatureVoice.isPlaying) | ||||||
| 	        { |             { | ||||||
| 		        if (Plugin.JesterLightSwitching != null) { |                 __instance.creatureVoice.maxDistance = 150; | ||||||
| 			        __instance.StopCoroutine(Plugin.JesterLightSwitching); |                 __instance.creatureVoice.clip = Plugin.CurrentTrack.LoadedLoop; | ||||||
| 			        Plugin.JesterLightSwitching = null; |                 var time = __instance.farAudio.time; | ||||||
| 		        } |                 var delay = Plugin.CurrentTrack.LoadedStart.length - time; | ||||||
| 		        foreach (var light in RoundManager.Instance.allPoweredLights) |                 Debug.Log($"Start length: {Plugin.CurrentTrack.LoadedStart.length}; played time: {time}"); | ||||||
| 		        { |                 Debug.Log($"Playing loop music: maxDistance: {__instance.creatureVoice.maxDistance}, minDistance: {__instance.creatureVoice.minDistance}, volume: {__instance.creatureVoice.volume}, spread: {__instance.creatureVoice.spread}, in seconds: {delay}"); | ||||||
| 			        light.color = Color.white; |                 __instance.creatureVoice.PlayDelayed(delay); | ||||||
| 		        } |             } | ||||||
| 	        } |  | ||||||
| 
 |  | ||||||
| 	        if (__instance.currentBehaviourStateIndex is 2 && !__instance.creatureVoice.isPlaying) |  | ||||||
| 	        { |  | ||||||
| 		        __instance.creatureVoice.maxDistance = 150; |  | ||||||
| 		        __instance.creatureVoice.clip = Plugin.CurrentTrack.LoadedLoop; |  | ||||||
| 		        var time = __instance.farAudio.time; |  | ||||||
| 		        var delay = Plugin.CurrentTrack.LoadedStart.length - time; |  | ||||||
| 		        Debug.Log($"Start length: {Plugin.CurrentTrack.LoadedStart.length}; played time: {time}"); |  | ||||||
| 		        Debug.Log($"Playing loop music: maxDistance: {__instance.creatureVoice.maxDistance}, minDistance: {__instance.creatureVoice.minDistance}, volume: {__instance.creatureVoice.volume}, spread: {__instance.creatureVoice.spread}, in seconds: {delay}"); |  | ||||||
| 		        __instance.creatureVoice.PlayDelayed(delay); |  | ||||||
| 	        } |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     internal class State |     internal class State | ||||||
|     { |     { | ||||||
| 	    public AudioSource farAudio; |         public AudioSource farAudio; | ||||||
| 	    public int prevStateindex; |         public int previousState; | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -0,0 +1,10 @@ | ||||||
|  | { | ||||||
|  |     "name": "MuzikaGromche", | ||||||
|  |     "version_number": "13.37.6", | ||||||
|  |     "author": "Oflor", | ||||||
|  |     "description": "Glaza zakryvaj", | ||||||
|  |     "website_url": "https://git.vilunov.me/nikita/muzika-gromche", | ||||||
|  |     "dependencies": [ | ||||||
|  |         "BepInEx-BepInExPack-5.4.2100" | ||||||
|  |     ] | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue