commit 0afdc1d02fbe28cd68098df3bd873ccc3456476a Author: Jonathan Riedel Date: Thu May 2 19:16:26 2024 +0200 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfe0770 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..426d76d --- /dev/null +++ b/.gitignore @@ -0,0 +1,398 @@ +## 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 + +# 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 diff --git a/Config/Plugin.BillTextureType.cs b/Config/Plugin.BillTextureType.cs new file mode 100644 index 0000000..3bdb849 --- /dev/null +++ b/Config/Plugin.BillTextureType.cs @@ -0,0 +1,20 @@ +namespace CurrencyChanger2 +{ + public partial class Plugin + { + public enum BillTextureType + { + USD_1_BILL, USD_5_BILL, USD_10_BILL, USD_20_BILL, USD_50_BILL, + + EUR_1_BILL, EUR_5_BILL, EUR_10_BILL, EUR_20_BILL, EUR_50_BILL, EUR_100_BILL, + + GBP_1_BILL, GBP_5_BILL, GBP_10_BILL, GBP_20_BILL, GBP_50_BILL, + + CAD_1_BILL, CAD_5_BILL, CAD_10_BILL, CAD_20_BILL, CAD_50_BILL, + + SGD_2_BILL, SGD_5_BILL, SGD_10_BILL, SGD_20_BILL, SGD_50_BILL, + + CUSTOM + } + } +} diff --git a/Config/Plugin.CardTextureType.cs b/Config/Plugin.CardTextureType.cs new file mode 100644 index 0000000..3c9c69d --- /dev/null +++ b/Config/Plugin.CardTextureType.cs @@ -0,0 +1,10 @@ +namespace CurrencyChanger2 +{ + public partial class Plugin + { + public enum CardTextureType + { + DEFAULT, CUSTOM + } + } +} diff --git a/Config/Plugin.CoinTextureType.cs b/Config/Plugin.CoinTextureType.cs new file mode 100644 index 0000000..3867e86 --- /dev/null +++ b/Config/Plugin.CoinTextureType.cs @@ -0,0 +1,20 @@ +namespace CurrencyChanger2 +{ + public partial class Plugin + { + public enum CoinTextureType + { + USD_1ct_COIN, USD_5ct_COIN, USD_10ct_COIN, USD_25ct_COIN, USD_50ct_COIN, + + EUR_1ct_COIN, EUR_2ct_COIN, EUR_5ct_COIN, EUR_10ct_COIN, EUR_20ct_COIN, EUR_50ct_COIN, EUR_1_COIN, EUR_2_COIN, + + GBP_1ct_COIN, GBP_2ct_COIN, GBP_5ct_COIN, GBP_10ct_COIN, GBP_20ct_COIN, GBP_50ct_COIN, GBP_1_COIN, GBP_2_COIN, + + CAD_1ct_COIN, CAD_5ct_COIN, CAD_10ct_COIN, CAD_25ct_COIN, CAD_50ct_COIN, CAD_1_COIN, CAD_2_COIN, + + SGD_1ct_COIN, SGD_5ct_COIN, SGD_10ct_COIN, SGD_20ct_COIN, SGD_50ct_COIN, SGD_1_COIN, + + CUSTOM + } + } +} diff --git a/Config/Plugin.ConfigComp.cs b/Config/Plugin.ConfigComp.cs new file mode 100644 index 0000000..d40f536 --- /dev/null +++ b/Config/Plugin.ConfigComp.cs @@ -0,0 +1,84 @@ +using BepInEx.Configuration; +using System; +using System.IO; +using System.Reflection; +using TMPro; +using UnityEngine; + +namespace CurrencyChanger2 +{ + public partial class Plugin + { + public class ConfigComp where TTexture : Enum + { + public ConfigEntry Value { get; set; } + public ConfigEntry Text { get; set; } + public ConfigEntry Texture { get; set; } + public string type; + public int number; + public string sectionName => "Register - " + type + " Slot " + number; + + public ConfigComp(ConfigFile Config, string type, int number, float value, string text, TTexture texture) + { + this.type = type; + this.number = number; + + Value = Config.Bind(sectionName, "Value", value, "What value this slot's " + type.ToLower() + "s should have."); + Text = Config.Bind(sectionName, "Text", text, "What text should be shown above this slot."); + Texture = Config.Bind(sectionName, "Texture Type", texture, "What type of texture should be applied to this slot's " + type.ToLower() + "s. If you choose \"CUSTOM\", the texture file will be loaded from BepInEx/config/ChangeCurrency/" + type + number + ".png"); + } + public ConfigComp Apply(TextMeshProUGUI text) + { + text.text = Text.Value; + text.enableWordWrapping = false; + return this; + } + public ConfigComp Apply(MoneyPack pack) + { + pack.Value = Value.Value; + var texture = GetTexture(); + if (texture == null) return this; + Plugin.StaticLogger.LogWarning("Applying " + Enum.GetName(typeof(TTexture), Texture.Value) + " texture to " + pack.gameObject.name + " (MoneyPack)"); + foreach (var item in pack.gameObject.transform.GetChild(0).GetChild(0).GetComponentsInChildren()) + { + foreach (var item1 in item.sharedMaterials) + { + item1.mainTexture = texture; + } + } + return this; + } + public ConfigComp Apply(Money pack) + { + pack.Value = Value.Value; + var texture = GetTexture(); + if (texture == null) return this; + Plugin.StaticLogger.LogWarning("Applying " + Enum.GetName(typeof(TTexture), Texture.Value) + " texture to " + pack.gameObject.name + " (Money)"); + foreach (var item1 in pack.GetComponent().sharedMaterials) + { + item1.mainTexture = texture; + } + return this; + } + public Texture2D storedTex; + public Texture2D GetTexture() + { + if (Convert.ToInt32(Texture.Value) == Convert.ToInt32(Texture.DefaultValue) && number != 6 && number != 7) return null; + if (storedTex != null) return storedTex; + string name = Enum.GetName(typeof(TTexture), Texture.Value); + byte[] data; + if (name == "CUSTOM") + { + data = File.ReadAllBytes(Path.Combine("BepInEx", "config", "ChangeCurrency", type + number + ".png")); + } + else + { + data = (byte[])Properties.Resources.ResourceManager.GetObject(name); + } + Texture2D tex = new Texture2D(1024, 1024); + tex.LoadImage(data); + return tex; + } + } + } +} diff --git a/ConfigMigration/V1ConfigResult.MoneyType.cs b/ConfigMigration/V1ConfigResult.MoneyType.cs new file mode 100644 index 0000000..d3e0157 --- /dev/null +++ b/ConfigMigration/V1ConfigResult.MoneyType.cs @@ -0,0 +1,11 @@ +namespace CurrencyChanger2.ConfigMigration +{ + public partial class V1ConfigResult + { + public enum MoneyType + { + CENT_1 = 0b0001, CENT_5 = 0b0010, CENT_10 = 0b0011, CENT_25 = 0b0100, CENT_50 = 0b0101, + DOLLAR_1 = 0b1001, DOLLAR_5 = 0b1010, DOLLAR_10 = 0b1011, DOLLAR_20 = 0b1100, DOLLAR_50 = 0b1101 + } + } +} diff --git a/ConfigMigration/V1ConfigResult.TextureType.cs b/ConfigMigration/V1ConfigResult.TextureType.cs new file mode 100644 index 0000000..80d58c8 --- /dev/null +++ b/ConfigMigration/V1ConfigResult.TextureType.cs @@ -0,0 +1,10 @@ +namespace CurrencyChanger2.ConfigMigration +{ + public partial class V1ConfigResult + { + public enum TextureType + { + USD, EUR, GBP, SGD, CAD + } + } +} diff --git a/ConfigMigration/V1ConfigResult.cs b/ConfigMigration/V1ConfigResult.cs new file mode 100644 index 0000000..c82cf08 --- /dev/null +++ b/ConfigMigration/V1ConfigResult.cs @@ -0,0 +1,354 @@ +using BepInEx.Configuration; +using System.IO; +using CoinTextureType = CurrencyChanger2.Plugin.CoinTextureType; +using BillTextureType = CurrencyChanger2.Plugin.BillTextureType; +using System.Collections.Generic; + +namespace CurrencyChanger2.ConfigMigration +{ + public partial class V1ConfigResult + { + public ConfigEntry CurrencyPrefix; + public ConfigEntry CurrencySuffix; + public ConfigEntry CurrencyDecimalSeperator; + + public ConfigEntry CoinValue1ct; + public ConfigEntry CoinValue5ct; + public ConfigEntry CoinValue10ct; + public ConfigEntry CoinValue25ct; + public ConfigEntry CoinValue50ct; + + public ConfigEntry BillValue1d; + public ConfigEntry BillValue5d; + public ConfigEntry BillValue10d; + public ConfigEntry BillValue20d; + public ConfigEntry BillValue50d; + + public ConfigEntry LowestBill; + public ConfigEntry TerminalSymbol; + + public ConfigEntry ValueText1ct; + public ConfigEntry ValueText5ct; + public ConfigEntry ValueText10ct; + public ConfigEntry ValueText25ct; + public ConfigEntry ValueText50ct; + + public ConfigEntry ValueText1d; + public ConfigEntry ValueText5d; + public ConfigEntry ValueText10d; + public ConfigEntry ValueText20d; + public ConfigEntry ValueText50d; + + public ConfigEntry Texture1ct; + public ConfigEntry Texture5ct; + public ConfigEntry Texture10ct; + public ConfigEntry Texture25ct; + public ConfigEntry Texture50ct; + + public ConfigEntry Texture1d; + public ConfigEntry Texture5d; + public ConfigEntry Texture10d; + public ConfigEntry Texture20d; + public ConfigEntry Texture50d; + public bool ConfigWasV1 { get; set; } + public void RemoveV1ConfigEntries(ConfigFile Config) + { + new List() + { + CurrencyPrefix, CurrencySuffix, CurrencyDecimalSeperator, + CoinValue1ct, CoinValue5ct, CoinValue10ct, CoinValue25ct, CoinValue50ct, + BillValue1d, BillValue5d, BillValue10d, BillValue20d, BillValue50d, + LowestBill, TerminalSymbol, + ValueText1ct, ValueText5ct, ValueText10ct, ValueText25ct, ValueText50ct, + ValueText1d, ValueText5d, ValueText10d, ValueText20d, ValueText50d, + Texture1ct, Texture5ct, Texture10ct, Texture25ct, Texture50ct, + Texture1d, Texture5d, Texture10d, Texture20d, Texture50d + }.ForEach(entry => + { + Config.Remove(entry.Definition); + }); + Config.Save(); + } + public V1ConfigResult(bool success) + { + ConfigWasV1 = success; + } + public static V1ConfigResult Check(ConfigFile Config) + { + var v1DecimalSeperator = Config.Bind("Money Text", "Decimal Seperator", null); + + if (v1DecimalSeperator.Value == null) + { + Config.Remove(v1DecimalSeperator.Definition); + return new V1ConfigResult(false); + } + else + { + V1ConfigResult result = new V1ConfigResult(true); + result.Parse(Config); + return result; + } + } + public void Parse(ConfigFile Config) + { + CurrencyPrefix = Config.Bind("Money Text", "Prefix", "$", "The currency symbol (or arbitrary string) to use in front of the value, where the dollar sign would normally be."); + CurrencySuffix = Config.Bind("Money Text", "Suffix", "", "The currency symbol (or arbitrary string) to use after the value, where a euro sign might for example be."); + CurrencyDecimalSeperator = Config.Bind("Money Text", "Decimal Seperator", ".", "What symbol to use to seperate the whole number part from the fractional part."); + + CoinValue1ct = Config.Bind("Cash Values", "1 Cent Coin", 0.01f, "What cash value the 1 cent coin should represent."); + CoinValue5ct = Config.Bind("Cash Values", "5 Cent Coin", 0.05f, "What cash value the 5 cent coin should represent."); + CoinValue10ct = Config.Bind("Cash Values", "10 Cent Coin", 0.1f, "What cash value the 10 cent coin should represent."); + CoinValue25ct = Config.Bind("Cash Values", "25 Cent Coin", 0.25f, "What cash value the 25 cent coin should represent."); + CoinValue50ct = Config.Bind("Cash Values", "50 Cent Coin", 0.5f, "What cash value the 50 cent coin should represent."); + + BillValue1d = Config.Bind("Cash Values", "1 Dollar Bill", 1f, "What cash value the 1 dollar bill should represent."); + BillValue5d = Config.Bind("Cash Values", "5 Dollar Bill", 5f, "What cash value the 5 dollar bill should represent."); + BillValue10d = Config.Bind("Cash Values", "10 Dollar Bill", 10f, "What cash value the 10 dollar bill should represent."); + BillValue20d = Config.Bind("Cash Values", "20 Dollar Bill", 20f, "What cash value the 20 dollar bill should represent."); + BillValue50d = Config.Bind("Cash Values", "50 Dollar Bill", 50f, "What cash value the 50 dollar bill should represent."); + + ValueText1ct = Config.Bind("Value Texts", "1 Cent Coin", "1¢", "What value text to display below the 1 cent coin."); + ValueText5ct = Config.Bind("Value Texts", "5 Cent Coin", "5¢", "What value text to display below the 5 cent coin."); + ValueText10ct = Config.Bind("Value Texts", "10 Cent Coin", "10¢", "What value text to display below the 10 cent coin."); + ValueText25ct = Config.Bind("Value Texts", "25 Cent Coin", "25¢", "What value text to display below the 25 cent coin."); + ValueText50ct = Config.Bind("Value Texts", "50 Cent Coin", "50¢", "What value text to display below the 50 cent coin."); + + ValueText1d = Config.Bind("Value Texts", "1 Dollar Bill", "$1", "What value text to display above the 1 dollar bill."); + ValueText5d = Config.Bind("Value Texts", "5 Dollar Bill", "$5", "What value text to display above the 5 dollar bill."); + ValueText10d = Config.Bind("Value Texts", "10 Dollar Bill", "$10", "What value text to display above the 10 dollar bill."); + ValueText20d = Config.Bind("Value Texts", "20 Dollar Bill", "$20", "What value text to display above the 20 dollar bill."); + ValueText50d = Config.Bind("Value Texts", "50 Dollar Bill", "$50", "What value text to display above the 50 dollar bill."); + + Texture1ct = Config.Bind("Texture Types", "1 Cent Coin", TextureType.USD, "What visual style this coin should have."); + Texture5ct = Config.Bind("Texture Types", "5 Cent Coin", TextureType.USD, "What visual style this coin should have."); + Texture10ct = Config.Bind("Texture Types", "10 Cent Coin", TextureType.USD, "What visual style this coin should have."); + Texture25ct = Config.Bind("Texture Types", "25 Cent Coin", TextureType.USD, "What visual style this coin should have."); + Texture50ct = Config.Bind("Texture Types", "50 Cent Coin", TextureType.USD, "What visual style this coin should have."); + + Texture1d = Config.Bind("Texture Types", "1 Dollar Bill", TextureType.USD, "What visual style this bill should have."); + Texture5d = Config.Bind("Texture Types", "5 Dollar Bill", TextureType.USD, "What visual style this bill should have."); + Texture10d = Config.Bind("Texture Types", "10 Dollar Bill", TextureType.USD, "What visual style this bill should have."); + Texture20d = Config.Bind("Texture Types", "20 Dollar Bill", TextureType.USD, "What visual style this bill should have."); + Texture50d = Config.Bind("Texture Types", "50 Dollar Bill", TextureType.USD, "What visual style this bill should have."); + + LowestBill = Config.Bind("Miscellaneous", "Lowest Bill", 1f, "The lowest value of money that should be considered a bill by the game."); + TerminalSymbol = Config.Bind("Miscellaneous", "Terminal Symbol", "$", "What symbol to display on the credit card terminal."); + } + public void Apply() + { + Plugin.StaticLogger.LogWarning("Migrating V1 Config File..."); + + Plugin.EnableAdditionalCoinCompartments.Value = false; + + Plugin.CurrencyPrefix.Value = CurrencyPrefix.Value; + Plugin.CurrencySuffix.Value = CurrencySuffix.Value; + Plugin.CurrencyDecimalSeperator.Value = CurrencyDecimalSeperator.Value; + Plugin.LowestBill.Value = LowestBill.Value; + Plugin.TerminalSymbol.Value = TerminalSymbol.Value; + + Plugin.Coin1.Value.Value = CoinValue1ct.Value; + Plugin.Coin1.Texture.Value = ConvertCoinTextureType(MoneyType.CENT_1); + Plugin.Coin1.Text.Value = ValueText1ct.Value; + + Plugin.Coin2.Value.Value = CoinValue5ct.Value; + Plugin.Coin2.Texture.Value = ConvertCoinTextureType(MoneyType.CENT_5); + Plugin.Coin2.Text.Value = ValueText5ct.Value; + + Plugin.Coin3.Value.Value = CoinValue10ct.Value; + Plugin.Coin3.Texture.Value = ConvertCoinTextureType(MoneyType.CENT_10); + Plugin.Coin3.Text.Value = ValueText10ct.Value; + + Plugin.Coin4.Value.Value = CoinValue25ct.Value; + Plugin.Coin4.Texture.Value = ConvertCoinTextureType(MoneyType.CENT_25); + Plugin.Coin4.Text.Value = ValueText25ct.Value; + + Plugin.Coin5.Value.Value = CoinValue50ct.Value; + Plugin.Coin5.Texture.Value = ConvertCoinTextureType(MoneyType.CENT_50); + Plugin.Coin5.Text.Value = ValueText50ct.Value; + + Plugin.Bill1.Value.Value = BillValue1d.Value; + Plugin.Bill1.Texture.Value = ConvertBillTextureType(MoneyType.DOLLAR_1); + Plugin.Bill1.Text.Value = ValueText1d.Value; + + Plugin.Bill2.Value.Value = BillValue5d.Value; + Plugin.Bill2.Texture.Value = ConvertBillTextureType(MoneyType.DOLLAR_5); + Plugin.Bill2.Text.Value = ValueText5d.Value; + + Plugin.Bill3.Value.Value = BillValue10d.Value; + Plugin.Bill3.Texture.Value = ConvertBillTextureType(MoneyType.DOLLAR_10); + Plugin.Bill3.Text.Value = ValueText10d.Value; + + Plugin.Bill4.Value.Value = BillValue20d.Value; + Plugin.Bill4.Texture.Value = ConvertBillTextureType(MoneyType.DOLLAR_20); + Plugin.Bill4.Text.Value = ValueText20d.Value; + + Plugin.Bill5.Value.Value = BillValue50d.Value; + Plugin.Bill5.Texture.Value = ConvertBillTextureType(MoneyType.DOLLAR_50); + Plugin.Bill5.Text.Value = ValueText50d.Value; + } + public CoinTextureType ConvertCoinTextureType(MoneyType moneyType) + { + switch (moneyType) + { + default: + case MoneyType.CENT_1: + switch (Texture1ct.Value) + { + case TextureType.EUR: + return CoinTextureType.EUR_1ct_COIN; + case TextureType.GBP: + return CoinTextureType.GBP_1ct_COIN; + case TextureType.SGD: + return CoinTextureType.SGD_1ct_COIN; + case TextureType.CAD: + return CoinTextureType.CAD_1ct_COIN; + case TextureType.USD: + default: + return CoinTextureType.USD_1ct_COIN; + } + case MoneyType.CENT_5: + switch (Texture5ct.Value) + { + case TextureType.EUR: + return CoinTextureType.EUR_5ct_COIN; + case TextureType.GBP: + return CoinTextureType.GBP_5ct_COIN; + case TextureType.SGD: + return CoinTextureType.SGD_5ct_COIN; + case TextureType.CAD: + return CoinTextureType.CAD_5ct_COIN; + case TextureType.USD: + default: + return CoinTextureType.USD_5ct_COIN; + } + case MoneyType.CENT_10: + switch (Texture10ct.Value) + { + case TextureType.EUR: + return CoinTextureType.EUR_10ct_COIN; + case TextureType.GBP: + return CoinTextureType.GBP_10ct_COIN; + case TextureType.SGD: + return CoinTextureType.SGD_20ct_COIN; + case TextureType.CAD: + return CoinTextureType.CAD_10ct_COIN; + case TextureType.USD: + default: + return CoinTextureType.USD_10ct_COIN; + } + case MoneyType.CENT_25: + switch (Texture25ct.Value) + { + case TextureType.EUR: + return CoinTextureType.EUR_20ct_COIN; + case TextureType.GBP: + return CoinTextureType.GBP_20ct_COIN; + case TextureType.SGD: + return CoinTextureType.SGD_50ct_COIN; + case TextureType.CAD: + return CoinTextureType.CAD_25ct_COIN; + case TextureType.USD: + default: + return CoinTextureType.USD_25ct_COIN; + } + case MoneyType.CENT_50: + switch (Texture50ct.Value) + { + case TextureType.EUR: + return CoinTextureType.EUR_50ct_COIN; + case TextureType.GBP: + return CoinTextureType.GBP_50ct_COIN; + case TextureType.SGD: + return CoinTextureType.SGD_1_COIN; + case TextureType.CAD: + return CoinTextureType.CAD_50ct_COIN; + case TextureType.USD: + default: + return CoinTextureType.USD_50ct_COIN; + } + } + } + public BillTextureType ConvertBillTextureType(MoneyType moneyType) + { + switch (moneyType) + { + default: + case MoneyType.DOLLAR_1: + switch (Texture1d.Value) + { + case TextureType.EUR: + return BillTextureType.EUR_1_BILL; + case TextureType.GBP: + return BillTextureType.GBP_1_BILL; + case TextureType.SGD: + return BillTextureType.SGD_2_BILL; + case TextureType.CAD: + return BillTextureType.CAD_1_BILL; + case TextureType.USD: + default: + return BillTextureType.USD_1_BILL; + } + case MoneyType.DOLLAR_5: + switch (Texture5d.Value) + { + case TextureType.EUR: + return BillTextureType.EUR_5_BILL; + case TextureType.GBP: + return BillTextureType.GBP_5_BILL; + case TextureType.SGD: + return BillTextureType.SGD_5_BILL; + case TextureType.CAD: + return BillTextureType.CAD_5_BILL; + case TextureType.USD: + default: + return BillTextureType.USD_5_BILL; + } + case MoneyType.DOLLAR_10: + switch (Texture10d.Value) + { + case TextureType.EUR: + return BillTextureType.EUR_10_BILL; + case TextureType.GBP: + return BillTextureType.GBP_10_BILL; + case TextureType.SGD: + return BillTextureType.SGD_10_BILL; + case TextureType.CAD: + return BillTextureType.CAD_10_BILL; + case TextureType.USD: + default: + return BillTextureType.USD_10_BILL; + } + case MoneyType.DOLLAR_20: + switch (Texture20d.Value) + { + case TextureType.EUR: + return BillTextureType.EUR_20_BILL; + case TextureType.GBP: + return BillTextureType.GBP_20_BILL; + case TextureType.SGD: + return BillTextureType.SGD_20_BILL; + case TextureType.CAD: + return BillTextureType.CAD_20_BILL; + case TextureType.USD: + default: + return BillTextureType.USD_20_BILL; + } + case MoneyType.DOLLAR_50: + switch (Texture50d.Value) + { + case TextureType.EUR: + return BillTextureType.EUR_50_BILL; + case TextureType.GBP: + return BillTextureType.GBP_50_BILL; + case TextureType.SGD: + return BillTextureType.SGD_50_BILL; + case TextureType.CAD: + return BillTextureType.CAD_50_BILL; + case TextureType.USD: + default: + return BillTextureType.USD_50_BILL; + } + } + } + } +} diff --git a/CurrencyChanger2.csproj b/CurrencyChanger2.csproj new file mode 100644 index 0000000..b0604e3 --- /dev/null +++ b/CurrencyChanger2.csproj @@ -0,0 +1,57 @@ + + + + netstandard2.1 + ChangeCurrency + My first plugin + 2.1.2 + true + latest + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\Assembly-CSharp.dll + + + D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\MyBox.dll + + + D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\Unity.TextMeshPro.dll + + + D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\UnityEngine.UI.dll + + + + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + diff --git a/GoofyAhhCustomComponents/Activator.cs b/GoofyAhhCustomComponents/Activator.cs new file mode 100644 index 0000000..02f4923 --- /dev/null +++ b/GoofyAhhCustomComponents/Activator.cs @@ -0,0 +1,9 @@ +using UnityEngine; + +namespace CurrencyChanger2.GoofyAhhCustomComponents +{ + public class Activator : MonoBehaviour + { + public void OnDisable() => gameObject.SetActive(true); + } +} diff --git a/GoofyAhhCustomComponents/TransformDefiner.cs b/GoofyAhhCustomComponents/TransformDefiner.cs new file mode 100644 index 0000000..5236a19 --- /dev/null +++ b/GoofyAhhCustomComponents/TransformDefiner.cs @@ -0,0 +1,28 @@ +using UnityEngine; + +namespace CurrencyChanger2.GoofyAhhCustomComponents +{ + public class TransformDefiner : MonoBehaviour + { + public Vector3 position; + public Vector3 localPosition; + public Vector3 localScale; + public Vector3 eulerAngles; + + public void Update() + { + transform.position = position; + transform.localPosition = localPosition; + transform.localScale = localScale; + transform.eulerAngles = eulerAngles; + } + public static void AddToGameObject(GameObject go, Vector3 position, Vector3 localPosition, Vector3 localScale, Vector3 eulerAngles) + { + var td = go.AddComponent(); + td.position = position; + td.localPosition = localPosition; + td.localScale = localScale; + td.eulerAngles = eulerAngles; + } + } +} diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..1864ded --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Patches/CheckoutChangeManager_AddOrRemoveMoney_Patch.cs b/Patches/CheckoutChangeManager_AddOrRemoveMoney_Patch.cs new file mode 100644 index 0000000..114816d --- /dev/null +++ b/Patches/CheckoutChangeManager_AddOrRemoveMoney_Patch.cs @@ -0,0 +1,27 @@ +using HarmonyLib; +using System.Collections.Generic; +using System.Reflection.Emit; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(CheckoutChangeManager), "AddOrRemoveMoney")] + public static class CheckoutChangeManager_AddOrRemoveMoney_Patch + { + public static IEnumerable Transpiler(IEnumerable instructions) + { + foreach (var instruction in instructions) + { + // Check if the instruction loads the constant 1f onto the stack + if (instruction.opcode == OpCodes.Ldc_R4 && (float)instruction.operand == 1f) + { + // Replace the constant 1f with your desired value (e.g., 2f) + yield return new CodeInstruction(OpCodes.Ldc_R4, Plugin.LowestBill.Value); + } + else + { + yield return instruction; + } + } + } + } +} diff --git a/Patches/CheckoutChangeManager_DespawnMoney_Patch.cs b/Patches/CheckoutChangeManager_DespawnMoney_Patch.cs new file mode 100644 index 0000000..adefbe4 --- /dev/null +++ b/Patches/CheckoutChangeManager_DespawnMoney_Patch.cs @@ -0,0 +1,35 @@ +using HarmonyLib; +using MyBox; +using System.Linq; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(CheckoutChangeManager), "SpawnMoney")] + public static class CheckoutChangeManager_SpawnMoney_Patch + { + public static void Prefix(CheckoutChangeManager __instance, MoneyPack moneyPack) + { + var log = Plugin.StaticLogger.LogInfo; + log("moneyPack"); + log(moneyPack); + } + } + [HarmonyPatch(typeof(CheckoutChangeManager), "DespawnMoney")] + public static class CheckoutChangeManager_DespawnMoney_Patch + { + public static void Prefix(CheckoutChangeManager __instance) + { + return; + var log = Plugin.StaticLogger.LogInfo; + log("m_SpawnedMoney"); + __instance.m_SpawnedMoney.ForEach(x => log(x.m_Value)); + log("m_SpawnedCoin"); + __instance.m_SpawnedCoin.ForEach(x => log(x.m_Value)); + log("m_MoneyPacks"); + __instance.m_MoneyPacks.ToList().ForEach(x => log(x.m_Value)); + log("m_MoneyPrefabs"); + log(Singleton.Instance.m_MoneyPrefabs); + Singleton.Instance.m_MoneyPrefabs.ForEach(x => log(x.m_Value)); + } + } +} diff --git a/Patches/CheckoutDrawer_Awake_Patch.cs b/Patches/CheckoutDrawer_Awake_Patch.cs new file mode 100644 index 0000000..f3f25cf --- /dev/null +++ b/Patches/CheckoutDrawer_Awake_Patch.cs @@ -0,0 +1,61 @@ +using HarmonyLib; +using MyBox; +using TMPro; +using UnityEngine; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(CheckoutDrawer), "Awake")] + public static class CheckoutDrawer_Awake_Patch + { + public static void Postfix(CheckoutDrawer __instance) + { + Plugin.StaticLogger.LogInfo("CheckoutDrawer_Awake_Patch"); + Plugin.StaticLogger.LogInfo(Plugin.EnableAdditionalCoinCompartments.Value); + + var Case = __instance.gameObject.transform.GetChild(0).gameObject; + + var Bill1 = __instance.gameObject.transform.GetChild(1).gameObject; + var Bill2 = __instance.gameObject.transform.GetChild(2).gameObject; + var Bill3 = __instance.gameObject.transform.GetChild(3).gameObject; + var Bill4 = __instance.gameObject.transform.GetChild(4).gameObject; + var Bill5 = __instance.gameObject.transform.GetChild(5).gameObject; + + var Coin1 = __instance.gameObject.transform.GetChild(6).gameObject; + var Coin2 = __instance.gameObject.transform.GetChild(7).gameObject; + var Coin3 = __instance.gameObject.transform.GetChild(8).gameObject; + var Coin4 = __instance.gameObject.transform.GetChild(9).gameObject; + var Coin5 = __instance.gameObject.transform.GetChild(10).gameObject; + + GameObject Coin6 = null; + GameObject Coin7 = null; + + Money Coin6Prefab = null; + Money Coin7Prefab = null; + + TextMeshProUGUI Coin6Text = null; + TextMeshProUGUI Coin7Text = null; + + if (!Plugin.MoneyGeneratorDone) + { + Plugin.Bill1.Apply(Singleton.Instance.m_MoneyPrefabs[5]); + Plugin.Bill2.Apply(Singleton.Instance.m_MoneyPrefabs[6]); + Plugin.Bill3.Apply(Singleton.Instance.m_MoneyPrefabs[7]); + Plugin.Bill4.Apply(Singleton.Instance.m_MoneyPrefabs[8]); + Plugin.Bill5.Apply(Singleton.Instance.m_MoneyPrefabs[9]); + + Plugin.Coin1.Apply(Singleton.Instance.m_MoneyPrefabs[0]); + Plugin.Coin2.Apply(Singleton.Instance.m_MoneyPrefabs[1]); + Plugin.Coin3.Apply(Singleton.Instance.m_MoneyPrefabs[2]); + Plugin.Coin4.Apply(Singleton.Instance.m_MoneyPrefabs[3]); + Plugin.Coin5.Apply(Singleton.Instance.m_MoneyPrefabs[4]); + } + + if (Plugin.EnableAdditionalCoinCompartments.Value) + { + Plugin.InitExtraCompartments(__instance, Bill1, Case, Coin5, out Coin6, out Coin7, out Coin6Prefab, out Coin7Prefab, out Coin6Text, out Coin7Text); + } + Plugin.ApplyConfig(__instance, Bill1, Bill2, Bill3, Bill4, Bill5, Coin1, Coin2, Coin3, Coin4, Coin5, Coin6, Coin7, Coin6Text, Coin7Text, Coin6Prefab, Coin7Prefab); + } + } +} diff --git a/Patches/Extensions_ToMoneyText_Patch.cs b/Patches/Extensions_ToMoneyText_Patch.cs new file mode 100644 index 0000000..70244e2 --- /dev/null +++ b/Patches/Extensions_ToMoneyText_Patch.cs @@ -0,0 +1,37 @@ +using HarmonyLib; +using System; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(Extensions), "ToMoneyText")] + public static class Extensions_ToMoneyText_Patch + { + public static void Postfix(ref string __result, ref float money, ref float fontSize) + { + string p = Plugin.CurrencyPrefix.Value; + string s = Plugin.CurrencySuffix.Value; + string d = Plugin.CurrencyDecimalSeperator.Value; + string text; + if (money < 0f) + { + text = "-$" + Math.Abs((float)Math.Round((double)money, 2)).ToString("0.00"); + } + else + { + text = "$" + ((float)Math.Round((double)money, 2)).ToString("0.00"); + } + text = text.Replace(',', '.'); + text = text.Replace(".", d); + text = text.Replace("$", p); + text = text + s; + int num = text.IndexOf(d); + if (num != -1) + { + string text2 = ""; + text2 = text2.Replace(',', '.'); + text = text.Insert(num + 1, text2); + } + __result = text; + } + } +} diff --git a/Patches/MoneyGenerator_SpawnCreditCard_Patch.cs b/Patches/MoneyGenerator_SpawnCreditCard_Patch.cs new file mode 100644 index 0000000..a960945 --- /dev/null +++ b/Patches/MoneyGenerator_SpawnCreditCard_Patch.cs @@ -0,0 +1,18 @@ +using HarmonyLib; +using UnityEngine; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(MoneyGenerator), "SpawnCreditCard")] + public static class MoneyGenerator_SpawnCreditCard_Patch + { + public static void Prefix(MoneyGenerator __instance) + { + var card = __instance.m_CustomerCreditCard; + var tex = Plugin.GetCreditCardTextures(); + + if (Plugin.CreditCardFront.Value != Plugin.CardTextureType.DEFAULT) card.transform.GetChild(0).GetComponent().material.mainTexture = tex.front; + if (Plugin.CreditCardBack.Value != Plugin.CardTextureType.DEFAULT) card.transform.GetChild(1).GetComponent().material.mainTexture = tex.back; + } + } +} diff --git a/Patches/PosTerminal_Start_Patch.cs b/Patches/PosTerminal_Start_Patch.cs new file mode 100644 index 0000000..8223fd3 --- /dev/null +++ b/Patches/PosTerminal_Start_Patch.cs @@ -0,0 +1,17 @@ +using HarmonyLib; +using TMPro; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(PosTerminal), "Start")] + public static class PosTerminal_Start_Patch + { + public static void Postfix(PosTerminal __instance) + { + string p = Plugin.TerminalSymbol.Value; + var tmp = __instance.gameObject.transform.GetChild(2).GetChild(2).GetChild(1).GetComponent(); + tmp.text = p; + tmp.enableWordWrapping = false; + } + } +} diff --git a/Patches/PriceManager_CurrentCost_Patch.cs b/Patches/PriceManager_CurrentCost_Patch.cs new file mode 100644 index 0000000..ac9a40e --- /dev/null +++ b/Patches/PriceManager_CurrentCost_Patch.cs @@ -0,0 +1,13 @@ +using HarmonyLib; + +namespace CurrencyChanger2.Patches +{ + [HarmonyPatch(typeof(PriceManager), "CurrentCost")] + public static class PriceManager_CurrentCost_Patch + { + public static void Postfix(ref float __result) + { + __result *= Plugin.CurrencyValueFactor.Value; + } + } +} diff --git a/Plugin.cs b/Plugin.cs new file mode 100644 index 0000000..f5a44d0 --- /dev/null +++ b/Plugin.cs @@ -0,0 +1,264 @@ +using BepInEx; +using BepInEx.Configuration; +using BepInEx.Logging; +using CurrencyChanger2.ConfigMigration; +using CurrencyChanger2.GoofyAhhCustomComponents; +using HarmonyLib; +using MyBox; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using TMPro; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.UIElements; +using UnityEngineInternal; +using Activator = CurrencyChanger2.GoofyAhhCustomComponents.Activator; + +namespace CurrencyChanger2 +{ + [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] + public partial class Plugin : BaseUnityPlugin + { + internal static bool MoneyGeneratorDone = false; + static Money coin6Prefab; + static Money coin7Prefab; + + public static ManualLogSource StaticLogger; + + public static ConfigEntry EnableAdditionalCoinCompartments { get; set; } + + public static ConfigEntry LowestBill { get; set; } + public static ConfigEntry TerminalSymbol { get; set; } + public static ConfigEntry CurrencyPrefix { get; set; } + public static ConfigEntry CurrencySuffix { get; set; } + public static ConfigEntry CurrencyDecimalSeperator { get; set; } + public static ConfigEntry CurrencyValueFactor { get; set; } + + + public static ConfigEntry CreditCardFront { get; set; } + public static ConfigEntry CreditCardBack { get; set; } + + public static ConfigEntry VersionNumber { get; set; } + + public static ConfigComp Bill1 { get; set; } + public static ConfigComp Bill2 { get; set; } + public static ConfigComp Bill3 { get; set; } + public static ConfigComp Bill4 { get; set; } + public static ConfigComp Bill5 { get; set; } + + public static ConfigComp Coin1 { get; set; } + public static ConfigComp Coin2 { get; set; } + public static ConfigComp Coin3 { get; set; } + public static ConfigComp Coin4 { get; set; } + public static ConfigComp Coin5 { get; set; } + public static ConfigComp Coin6 { get; set; } + public static ConfigComp Coin7 { get; set; } + private void Awake() + { + StaticLogger = Logger; + + V1ConfigResult v1Config = V1ConfigResult.Check(Config); + + InitConfig(); + + if (v1Config.ConfigWasV1) + { + v1Config.Apply(); + v1Config.RemoveV1ConfigEntries(Config); + } + + string customImagePath = Path.Combine("BepInEx", "config", "ChangeCurrency"); + if (!Directory.Exists(customImagePath)) Directory.CreateDirectory(customImagePath); + + Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded! Applying patch..."); + Logger.LogInfo($"Working directory: {Environment.CurrentDirectory}"); + Logger.LogInfo($"Currency String: " + System.Globalization.NumberFormatInfo.CurrentInfo.CurrencyPositivePattern); + Harmony harmony = new Harmony(PluginInfo.PLUGIN_GUID); + harmony.PatchAll(); + + SceneManager.sceneLoaded += (a, b) => + { + if (SceneManager.GetActiveScene().name == "Main Menu") + { + coin6Prefab = null; + coin7Prefab = null; + MoneyGeneratorDone = false; + } + }; + } + private void InitConfig() + { + EnableAdditionalCoinCompartments = Config.Bind("Currency Changer", "Enable Additional Coin Compartments", false, "Turns the $1 bill compartment into two coin compartments, 6 and 7, for additional coins.\nThis disables Bill Compartment 1 and enables Coin Compartments 6 and 7."); + + LowestBill = Config.Bind("Currency Settings", "Lowest Bill", 1f, "The lowest value of money that should be considered a bill by the game."); + TerminalSymbol = Config.Bind("Currency Settings", "Terminal Symbol", "$", "What symbol to display on the credit card terminal."); + CurrencyPrefix = Config.Bind("Currency Settings", "Prefix", "$", "The currency symbol (or arbitrary string) to use in front of the value, where the dollar sign would normally be."); + CurrencySuffix = Config.Bind("Currency Settings", "Suffix", "", "The currency symbol (or arbitrary string) to use after the value, where a euro sign might for example be."); + CurrencyDecimalSeperator = Config.Bind("Currency Settings", "Decimal Seperator", ".", "What symbol to use to seperate the whole number part from the fractional part."); + CurrencyValueFactor = Config.Bind("Currency Settings", "Value Factor", 1f, "Multiplies all product costs and market prices by the defined number."); + + VersionNumber = Config.Bind("Info", "Version", "2.0.0", "What version of the plugin this config file was created under.\nDo NOT change this value, or stuff WILL break.\nIf this value is missing, v1.2.1 will be assumed."); + + CreditCardFront = Config.Bind("Credit Card", "Front Texture", CardTextureType.DEFAULT, "The texture type to place on the front of the credit card.\nIf you choose \"CUSTOM\", the texture file will be loaded from BepInEx/config/ChangeCurrency/Card_front.png"); + CreditCardBack = Config.Bind("Credit Card", "Back Texture", CardTextureType.DEFAULT, "The texture type to place on the back of the credit card.\nIf you choose \"CUSTOM\", the texture file will be loaded from BepInEx/config/ChangeCurrency/Card_back.png"); + + Bill1 = new(Config, "Bill", 1, 01.00f, "$1", BillTextureType.USD_1_BILL); + Bill2 = new(Config, "Bill", 2, 05.00f, "$5", BillTextureType.USD_5_BILL); + Bill3 = new(Config, "Bill", 3, 10.00f, "$10", BillTextureType.USD_10_BILL); + Bill4 = new(Config, "Bill", 4, 20.00f, "$20", BillTextureType.USD_20_BILL); + Bill5 = new(Config, "Bill", 5, 50.00f, "$50", BillTextureType.USD_50_BILL); + + Coin1 = new(Config, "Coin", 1, 00.01f, "1¢", CoinTextureType.USD_1ct_COIN); + Coin2 = new(Config, "Coin", 2, 00.05f, "5¢", CoinTextureType.USD_5ct_COIN); + Coin3 = new(Config, "Coin", 3, 00.10f, "10¢", CoinTextureType.USD_10ct_COIN); + Coin4 = new(Config, "Coin", 4, 00.25f, "25¢", CoinTextureType.USD_25ct_COIN); + Coin5 = new(Config, "Coin", 5, 00.50f, "50¢", CoinTextureType.USD_50ct_COIN); + Coin6 = new(Config, "Coin", 6, 01.00f, "$1", CoinTextureType.EUR_1_COIN); + Coin7 = new(Config, "Coin", 7, 02.00f, "$2", CoinTextureType.EUR_2_COIN); + } + public static void InitExtraCompartments(CheckoutDrawer __instance, GameObject Bill1, GameObject Case, GameObject Coin5, out GameObject Coin6, out GameObject Coin7, out Money Coin6Prefab, out Money Coin7Prefab, out TextMeshProUGUI Coin6Text, out TextMeshProUGUI Coin7Text) + { + float rot = __instance.transform.parent.parent.eulerAngles.y; + + //MoneyGeneratorDone = false; + var divider = GameObject.CreatePrimitive(PrimitiveType.Cube); + divider.transform.localScale = new Vector3(0.072f, 0.03f, 0.01f); + divider.transform.SetParent(__instance.gameObject.transform); + divider.transform.localPosition = new Vector3(0.1591f, 0.0360f, 0.1529f); + divider.transform.eulerAngles = new Vector3(0, -rot, 0); + + var mat = new Material(Case.transform.GetChild(0).GetComponent().material); + mat.color = Color.black; + divider.GetComponent().material = mat; + + Bill1.transform.localPosition = new Vector3(0, -10, 0); + CheckoutChangeManager ccm = __instance.transform.parent.parent.GetComponent(); + List MoneyPacks = ccm.m_MoneyPacks == null ? new() : ccm.m_MoneyPacks.ToList(); + MoneyPacks.RemoveAll(x => x && x.Value == 1f); + Bill1 = null; + + Money prefab; + if (MoneyGeneratorDone) + { + prefab = coin6Prefab; + } + else + { + prefab = Singleton.Instance.m_MoneyPrefabs[4]; + } + + void ApplyNewRenderers(MeshRenderer currentRenderer) + { + //currentRenderer.CopyPropertiesOf(prefab.GetComponent()); + currentRenderer.materials = currentRenderer.materials.Select(x => Material.Instantiate(x)).ToArray(); + } + + Coin6 = GameObject.Instantiate(Coin5); + Coin6.transform.SetParent(__instance.gameObject.transform); + Coin6.transform.localPosition = new Vector3(divider.transform.localPosition.x, 0.04f, divider.transform.localPosition.z - 0.035f); + Coin6.transform.GetChild(0).GetChild(0).localPosition = Vector3.zero; + Coin6.SetActive(true); + Coin6.AddComponent(); + Coin6.GetComponentsInChildren().ForEach(ApplyNewRenderers); + Coin7 = GameObject.Instantiate(Coin5); + Coin7.transform.SetParent(__instance.gameObject.transform); + Coin7.transform.localPosition = new Vector3(divider.transform.localPosition.x, 0.04f, divider.transform.localPosition.z + 0.035f); + Coin7.transform.GetChild(0).GetChild(0).localPosition = Vector3.zero; + Coin7.SetActive(true); + Coin7.AddComponent(); + Coin7.GetComponentsInChildren().ForEach(ApplyNewRenderers); + + Coin6Text = __instance.gameObject.transform.GetChild(11).GetChild(0).GetComponent(); + Coin7Text = GameObject.Instantiate(__instance.gameObject.transform.GetChild(11).GetChild(0).GetComponent().gameObject).GetComponent(); + TransformDefiner.AddToGameObject(Coin7Text.gameObject, new Vector3(-2.72f, 0.9f, 0.39f), new Vector3(-132.3f, 38f, 0f), new Vector3(-1f, 1f, 1f), new Vector3(Coin7Text.transform.eulerAngles.x, -rot, Coin7Text.transform.eulerAngles.z)); + Coin7Text.transform.SetParent(Coin6Text.transform.parent); + + MoneyPacks.Add(Coin6.GetComponent()); + MoneyPacks.Add(Coin7.GetComponent()); + ccm.m_MoneyPacks = MoneyPacks.Where(x => x).ToArray(); + if (!MoneyGeneratorDone) + { + List MoneyPrefabs = Singleton.Instance.m_MoneyPrefabs == null ? new() : Singleton.Instance.m_MoneyPrefabs.ToList(); + MoneyPrefabs.RemoveAll(x => x && x.Value == 1f); + Coin6Prefab = GameObject.Instantiate(Singleton.Instance.m_MoneyPrefabs[4].gameObject).GetComponent(); + Coin7Prefab = GameObject.Instantiate(Singleton.Instance.m_MoneyPrefabs[4].gameObject).GetComponent(); + ApplyNewRenderers(Coin6Prefab.GetComponent()); + ApplyNewRenderers(Coin7Prefab.GetComponent()); + coin6Prefab = Coin6Prefab; + coin7Prefab = Coin7Prefab; + MoneyPrefabs.Add(Coin6Prefab); + MoneyPrefabs.Add(Coin7Prefab); + Singleton.Instance.m_MoneyPrefabs = MoneyPrefabs.Where(x => x).ToArray(); + + MoneyGeneratorDone = true; + } + else + { + Coin6Prefab = coin6Prefab; + Coin7Prefab = coin7Prefab; + } + } + public static void ApplyConfig(CheckoutDrawer __instance, GameObject Bill1, GameObject Bill2, GameObject Bill3, GameObject Bill4, GameObject Bill5, GameObject Coin1, GameObject Coin2, GameObject Coin3, GameObject Coin4, GameObject Coin5, GameObject Coin6, GameObject Coin7, TextMeshProUGUI Coin6Text, TextMeshProUGUI Coin7Text, Money Coin6Prefab, Money Coin7Prefab) + { + if (Bill1 != null) Plugin.Bill1.Apply(Bill1.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(0).GetComponent()); + if (Bill2 != null) Plugin.Bill2.Apply(Bill2.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(1).GetComponent()); + if (Bill3 != null) Plugin.Bill3.Apply(Bill3.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(2).GetComponent()); + if (Bill4 != null) Plugin.Bill4.Apply(Bill4.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(3).GetComponent()); + if (Bill5 != null) Plugin.Bill5.Apply(Bill5.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(4).GetComponent()); + + if (Coin1 != null) Plugin.Coin1.Apply(Coin1.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(5).GetComponent()); + if (Coin2 != null) Plugin.Coin2.Apply(Coin2.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(6).GetComponent()); + if (Coin3 != null) Plugin.Coin3.Apply(Coin3.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(7).GetComponent()); + if (Coin4 != null) Plugin.Coin4.Apply(Coin4.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(8).GetComponent()); + + if (Coin6 != null) Plugin.Coin6.Apply(Coin6.GetComponent()).Apply(Coin6Text).Apply(Coin6Prefab); + if (Coin7 != null) Plugin.Coin7.Apply(Coin7.GetComponent()).Apply(Coin7Text).Apply(Coin7Prefab); + + if (Coin5 != null) Plugin.Coin5.Apply(Coin5.GetComponent()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(9).GetComponent()); + } + public static (Texture2D front, Texture2D back) GetCreditCardTextures() + { + return (GetCreditCardFrontTexture(), GetCreditCardBackTexture()); + } + static Texture2D storedFrontTex; + static Texture2D storedBackTex; + public static Texture2D GetCreditCardFrontTexture() + { + if (Convert.ToInt32(CreditCardFront.Value) == Convert.ToInt32(CreditCardFront.DefaultValue)) return null; + if (storedFrontTex != null) return storedFrontTex; + string name = Enum.GetName(typeof(CardTextureType), CreditCardFront.Value); + byte[] data; + if (name == "CUSTOM") + { + data = File.ReadAllBytes(Path.Combine("BepInEx", "config", "ChangeCurrency", "Card_front.png")); + } + else + { + data = (byte[])Properties.Resources.ResourceManager.GetObject(name); + } + Texture2D tex = new Texture2D(1024, 1024); + tex.LoadImage(data); + return tex; + } + public static Texture2D GetCreditCardBackTexture() + { + if (Convert.ToInt32(CreditCardBack.Value) == Convert.ToInt32(CreditCardBack.DefaultValue)) return null; + if (storedBackTex != null) return storedBackTex; + string name = Enum.GetName(typeof(CardTextureType), CreditCardBack.Value); + byte[] data; + if (name == "CUSTOM") + { + data = File.ReadAllBytes(Path.Combine("BepInEx", "config", "ChangeCurrency", "Card_back.png")); + } + else + { + data = (byte[])Properties.Resources.ResourceManager.GetObject(name); + } + Texture2D tex = new Texture2D(1024, 1024); + tex.LoadImage(data); + return tex; + } + } +} diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b052435 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,643 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 +// +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. +// +//------------------------------------------------------------------------------ + +namespace CurrencyChanger2.Properties { + using System; + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CurrencyChanger2.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_1_BILL { + get { + object obj = ResourceManager.GetObject("CAD_1_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_1_COIN { + get { + object obj = ResourceManager.GetObject("CAD_1_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_10_BILL { + get { + object obj = ResourceManager.GetObject("CAD_10_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_10ct_COIN { + get { + object obj = ResourceManager.GetObject("CAD_10ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_1ct_COIN { + get { + object obj = ResourceManager.GetObject("CAD_1ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_2_COIN { + get { + object obj = ResourceManager.GetObject("CAD_2_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_20_BILL { + get { + object obj = ResourceManager.GetObject("CAD_20_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_25ct_COIN { + get { + object obj = ResourceManager.GetObject("CAD_25ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_5_BILL { + get { + object obj = ResourceManager.GetObject("CAD_5_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_50_BILL { + get { + object obj = ResourceManager.GetObject("CAD_50_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_50ct_COIN { + get { + object obj = ResourceManager.GetObject("CAD_50ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] CAD_5ct_COIN { + get { + object obj = ResourceManager.GetObject("CAD_5ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_1_BILL { + get { + object obj = ResourceManager.GetObject("EUR_1_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_1_COIN { + get { + object obj = ResourceManager.GetObject("EUR_1_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_10_BILL { + get { + object obj = ResourceManager.GetObject("EUR_10_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_100_BILL { + get { + object obj = ResourceManager.GetObject("EUR_100_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_10ct_COIN { + get { + object obj = ResourceManager.GetObject("EUR_10ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_1ct_COIN { + get { + object obj = ResourceManager.GetObject("EUR_1ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_2_COIN { + get { + object obj = ResourceManager.GetObject("EUR_2_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_20_BILL { + get { + object obj = ResourceManager.GetObject("EUR_20_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_20ct_COIN { + get { + object obj = ResourceManager.GetObject("EUR_20ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_5_BILL { + get { + object obj = ResourceManager.GetObject("EUR_5_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_50_BILL { + get { + object obj = ResourceManager.GetObject("EUR_50_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_50ct_COIN { + get { + object obj = ResourceManager.GetObject("EUR_50ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] EUR_5ct_COIN { + get { + object obj = ResourceManager.GetObject("EUR_5ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_1_BILL { + get { + object obj = ResourceManager.GetObject("GBP_1_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_1_COIN { + get { + object obj = ResourceManager.GetObject("GBP_1_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_10_BILL { + get { + object obj = ResourceManager.GetObject("GBP_10_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_10ct_COIN { + get { + object obj = ResourceManager.GetObject("GBP_10ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_1ct_COIN { + get { + object obj = ResourceManager.GetObject("GBP_1ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_2_COIN { + get { + object obj = ResourceManager.GetObject("GBP_2_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_20_BILL { + get { + object obj = ResourceManager.GetObject("GBP_20_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_20ct_COIN { + get { + object obj = ResourceManager.GetObject("GBP_20ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_5_BILL { + get { + object obj = ResourceManager.GetObject("GBP_5_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_50_BILL { + get { + object obj = ResourceManager.GetObject("GBP_50_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_50ct_COIN { + get { + object obj = ResourceManager.GetObject("GBP_50ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] GBP_5ct_COIN { + get { + object obj = ResourceManager.GetObject("GBP_5ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_1_COIN { + get { + object obj = ResourceManager.GetObject("SGD_1_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_10_BILL { + get { + object obj = ResourceManager.GetObject("SGD_10_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_10ct_COIN { + get { + object obj = ResourceManager.GetObject("SGD_10ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_1ct_COIN { + get { + object obj = ResourceManager.GetObject("SGD_1ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_2_BILL { + get { + object obj = ResourceManager.GetObject("SGD_2_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_20_BILL { + get { + object obj = ResourceManager.GetObject("SGD_20_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_20ct_COIN { + get { + object obj = ResourceManager.GetObject("SGD_20ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_5_BILL { + get { + object obj = ResourceManager.GetObject("SGD_5_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_50_BILL { + get { + object obj = ResourceManager.GetObject("SGD_50_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_50ct_COIN { + get { + object obj = ResourceManager.GetObject("SGD_50ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] SGD_5ct_COIN { + get { + object obj = ResourceManager.GetObject("SGD_5ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_1_BILL { + get { + object obj = ResourceManager.GetObject("USD_1_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_10_BILL { + get { + object obj = ResourceManager.GetObject("USD_10_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_10ct_COIN { + get { + object obj = ResourceManager.GetObject("USD_10ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_1ct_COIN { + get { + object obj = ResourceManager.GetObject("USD_1ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_20_BILL { + get { + object obj = ResourceManager.GetObject("USD_20_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_25ct_COIN { + get { + object obj = ResourceManager.GetObject("USD_25ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_5_BILL { + get { + object obj = ResourceManager.GetObject("USD_5_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_50_BILL { + get { + object obj = ResourceManager.GetObject("USD_50_BILL", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_50ct_COIN { + get { + object obj = ResourceManager.GetObject("USD_50ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. + /// + internal static byte[] USD_5ct_COIN { + get { + object obj = ResourceManager.GetObject("USD_5ct_COIN", resourceCulture); + return ((byte[])(obj)); + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..7658320 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\CAD_10ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\US10dollarbill-Series_2004A.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\One_Cent_Tras.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\US_one_dollar_bill,_obverse,_series_2009.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\CAD_1_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\US_$20_Series_2006_Obverse.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\CAD_25ct_COIN.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\CAD_2_COIN.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\CAD_50ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\50_USD_Series_2004_Note_Front.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Five_Cents_Tras.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\US_$5_Series_2006_obverse.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\100.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\10_eurocent_common_2007.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\EU10Eurobill-Series_2004A-sharedassets0.assets-1717.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\germany-1-euro-cent-2002-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\1_euro.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Common_face_of_one_euro_coin.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\20_eurocent_common_2007.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\20.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\2_euro_coin_Eu_serie_1.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\605d7123e494b1.61599945-original-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\50.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\61fe0eecddda17.09298112-original-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Screenshot 2024-03-29 141218.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\314_coin-designs-and-specifications_10p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\d464b6_20763ee15cd64a74ab98c231e25695c2~mv2.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\th-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\5ea53be3436f91.68585950-original.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\GBP_1_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\314_coin-designs-and-specifications_20p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\gbp-20-front.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\s-l1600.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\314_coin-designs-and-specifications_50p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\GBP_50_BILL.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\314_coin-designs-and-specifications_5p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\products-15892.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\TS10c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\sgd10.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\360-original-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\TS1d.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\TS20c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Screenshot 2024-03-31 112554.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\626c1e69574431.97909339-original.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\TS50c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\50-singapore-dollars-banknote-president-encik-yusof-bin-ishak-obverse-1.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\TS5c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\5e981ed7ccc916.18968393-original.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_10ct_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_10_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_1ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_1_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_20_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_25ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_50ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_50_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_5ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\USD_5_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Resources/100.jpg b/Resources/100.jpg new file mode 100644 index 0000000..08a6b1c Binary files /dev/null and b/Resources/100.jpg differ diff --git a/Resources/10_eurocent_common_2007.png b/Resources/10_eurocent_common_2007.png new file mode 100644 index 0000000..e39fb48 Binary files /dev/null and b/Resources/10_eurocent_common_2007.png differ diff --git a/Resources/1829-original-removebg-preview.png b/Resources/1829-original-removebg-preview.png new file mode 100644 index 0000000..be792b9 Binary files /dev/null and b/Resources/1829-original-removebg-preview.png differ diff --git a/Resources/1833-original-removebg-preview.png b/Resources/1833-original-removebg-preview.png new file mode 100644 index 0000000..4e6dfa3 Binary files /dev/null and b/Resources/1833-original-removebg-preview.png differ diff --git a/Resources/1_euro.jpg b/Resources/1_euro.jpg new file mode 100644 index 0000000..9ec8938 Binary files /dev/null and b/Resources/1_euro.jpg differ diff --git a/Resources/20.jpg b/Resources/20.jpg new file mode 100644 index 0000000..5581094 Binary files /dev/null and b/Resources/20.jpg differ diff --git a/Resources/20_eurocent_common_2007.png b/Resources/20_eurocent_common_2007.png new file mode 100644 index 0000000..858527c Binary files /dev/null and b/Resources/20_eurocent_common_2007.png differ diff --git a/Resources/25_Cents_Front.png b/Resources/25_Cents_Front.png new file mode 100644 index 0000000..b520190 Binary files /dev/null and b/Resources/25_Cents_Front.png differ diff --git a/Resources/2_euro_coin_Eu_serie_1.png b/Resources/2_euro_coin_Eu_serie_1.png new file mode 100644 index 0000000..bbd0f7c Binary files /dev/null and b/Resources/2_euro_coin_Eu_serie_1.png differ diff --git a/Resources/314_coin-designs-and-specifications_10p-removebg-preview.png b/Resources/314_coin-designs-and-specifications_10p-removebg-preview.png new file mode 100644 index 0000000..44df2a3 Binary files /dev/null and b/Resources/314_coin-designs-and-specifications_10p-removebg-preview.png differ diff --git a/Resources/314_coin-designs-and-specifications_20p-removebg-preview.png b/Resources/314_coin-designs-and-specifications_20p-removebg-preview.png new file mode 100644 index 0000000..a8d3ca4 Binary files /dev/null and b/Resources/314_coin-designs-and-specifications_20p-removebg-preview.png differ diff --git a/Resources/314_coin-designs-and-specifications_50p-removebg-preview.png b/Resources/314_coin-designs-and-specifications_50p-removebg-preview.png new file mode 100644 index 0000000..28b2915 Binary files /dev/null and b/Resources/314_coin-designs-and-specifications_50p-removebg-preview.png differ diff --git a/Resources/314_coin-designs-and-specifications_5p-removebg-preview.png b/Resources/314_coin-designs-and-specifications_5p-removebg-preview.png new file mode 100644 index 0000000..9b39da1 Binary files /dev/null and b/Resources/314_coin-designs-and-specifications_5p-removebg-preview.png differ diff --git a/Resources/360-original-removebg-preview.png b/Resources/360-original-removebg-preview.png new file mode 100644 index 0000000..1df751e Binary files /dev/null and b/Resources/360-original-removebg-preview.png differ diff --git a/Resources/443663b-removebg-preview.png b/Resources/443663b-removebg-preview.png new file mode 100644 index 0000000..1b21795 Binary files /dev/null and b/Resources/443663b-removebg-preview.png differ diff --git a/Resources/50-singapore-dollars-banknote-president-encik-yusof-bin-ishak-obverse-1.jpg b/Resources/50-singapore-dollars-banknote-president-encik-yusof-bin-ishak-obverse-1.jpg new file mode 100644 index 0000000..12e6136 Binary files /dev/null and b/Resources/50-singapore-dollars-banknote-president-encik-yusof-bin-ishak-obverse-1.jpg differ diff --git a/Resources/50.jpg b/Resources/50.jpg new file mode 100644 index 0000000..9f9d14c Binary files /dev/null and b/Resources/50.jpg differ diff --git a/Resources/50_Cents_Frente.png b/Resources/50_Cents_Frente.png new file mode 100644 index 0000000..373e901 Binary files /dev/null and b/Resources/50_Cents_Frente.png differ diff --git a/Resources/50_USD_Series_2004_Note_Front.png b/Resources/50_USD_Series_2004_Note_Front.png new file mode 100644 index 0000000..b7e928e Binary files /dev/null and b/Resources/50_USD_Series_2004_Note_Front.png differ diff --git a/Resources/5e981ed7ccc916.18968393-original.jpg b/Resources/5e981ed7ccc916.18968393-original.jpg new file mode 100644 index 0000000..5bf5844 Binary files /dev/null and b/Resources/5e981ed7ccc916.18968393-original.jpg differ diff --git a/Resources/5ea53be3436f91.68585950-original.jpg b/Resources/5ea53be3436f91.68585950-original.jpg new file mode 100644 index 0000000..9729072 Binary files /dev/null and b/Resources/5ea53be3436f91.68585950-original.jpg differ diff --git a/Resources/605d7123e494b1.61599945-original-removebg-preview.png b/Resources/605d7123e494b1.61599945-original-removebg-preview.png new file mode 100644 index 0000000..9069e80 Binary files /dev/null and b/Resources/605d7123e494b1.61599945-original-removebg-preview.png differ diff --git a/Resources/61fe0eecddda17.09298112-original-removebg-preview.png b/Resources/61fe0eecddda17.09298112-original-removebg-preview.png new file mode 100644 index 0000000..8f7a5ab Binary files /dev/null and b/Resources/61fe0eecddda17.09298112-original-removebg-preview.png differ diff --git a/Resources/626c1e69574431.97909339-original.jpg b/Resources/626c1e69574431.97909339-original.jpg new file mode 100644 index 0000000..ce6abb5 Binary files /dev/null and b/Resources/626c1e69574431.97909339-original.jpg differ diff --git a/Resources/62a822d2a8b966.44428801-original.jpg b/Resources/62a822d2a8b966.44428801-original.jpg new file mode 100644 index 0000000..a02676b Binary files /dev/null and b/Resources/62a822d2a8b966.44428801-original.jpg differ diff --git a/Resources/British_12_sided_pound_coin.png b/Resources/British_12_sided_pound_coin.png new file mode 100644 index 0000000..ac25fe7 Binary files /dev/null and b/Resources/British_12_sided_pound_coin.png differ diff --git a/Resources/CAD_10ct_COIN.png b/Resources/CAD_10ct_COIN.png new file mode 100644 index 0000000..234cc39 Binary files /dev/null and b/Resources/CAD_10ct_COIN.png differ diff --git a/Resources/CAD_1_COIN.png b/Resources/CAD_1_COIN.png new file mode 100644 index 0000000..b8c727f Binary files /dev/null and b/Resources/CAD_1_COIN.png differ diff --git a/Resources/CAD_25ct_COIN.jpg b/Resources/CAD_25ct_COIN.jpg new file mode 100644 index 0000000..27ef8b4 Binary files /dev/null and b/Resources/CAD_25ct_COIN.jpg differ diff --git a/Resources/CAD_2_COIN.jpg b/Resources/CAD_2_COIN.jpg new file mode 100644 index 0000000..5375b09 Binary files /dev/null and b/Resources/CAD_2_COIN.jpg differ diff --git a/Resources/CAD_50ct_COIN.png b/Resources/CAD_50ct_COIN.png new file mode 100644 index 0000000..b0a5a86 Binary files /dev/null and b/Resources/CAD_50ct_COIN.png differ diff --git a/Resources/Common_face_of_one_euro_coin.png b/Resources/Common_face_of_one_euro_coin.png new file mode 100644 index 0000000..38c97e3 Binary files /dev/null and b/Resources/Common_face_of_one_euro_coin.png differ diff --git a/Resources/EU-5_Series_2002_obverse-sharedassets0.assets-005.png b/Resources/EU-5_Series_2002_obverse-sharedassets0.assets-005.png new file mode 100644 index 0000000..a6579f8 Binary files /dev/null and b/Resources/EU-5_Series_2002_obverse-sharedassets0.assets-005.png differ diff --git a/Resources/EU10Eurobill-Series_2004A-sharedassets0.assets-1717.png b/Resources/EU10Eurobill-Series_2004A-sharedassets0.assets-1717.png new file mode 100644 index 0000000..805a5ff Binary files /dev/null and b/Resources/EU10Eurobill-Series_2004A-sharedassets0.assets-1717.png differ diff --git a/Resources/Five_Cents_Tras.png b/Resources/Five_Cents_Tras.png new file mode 100644 index 0000000..b2a2a1d Binary files /dev/null and b/Resources/Five_Cents_Tras.png differ diff --git a/Resources/GBP_1_COIN.png b/Resources/GBP_1_COIN.png new file mode 100644 index 0000000..72f94b4 Binary files /dev/null and b/Resources/GBP_1_COIN.png differ diff --git a/Resources/GBP_50_BILL.jpg b/Resources/GBP_50_BILL.jpg new file mode 100644 index 0000000..260c246 Binary files /dev/null and b/Resources/GBP_50_BILL.jpg differ diff --git a/Resources/One_Cent_Tras.png b/Resources/One_Cent_Tras.png new file mode 100644 index 0000000..1071b02 Binary files /dev/null and b/Resources/One_Cent_Tras.png differ diff --git a/Resources/Screenshot 2024-03-29 141218.jpg b/Resources/Screenshot 2024-03-29 141218.jpg new file mode 100644 index 0000000..7c4f250 Binary files /dev/null and b/Resources/Screenshot 2024-03-29 141218.jpg differ diff --git a/Resources/Screenshot 2024-03-31 112554.jpg b/Resources/Screenshot 2024-03-31 112554.jpg new file mode 100644 index 0000000..98e6fd2 Binary files /dev/null and b/Resources/Screenshot 2024-03-31 112554.jpg differ diff --git a/Resources/TS10c.jpg b/Resources/TS10c.jpg new file mode 100644 index 0000000..9740148 Binary files /dev/null and b/Resources/TS10c.jpg differ diff --git a/Resources/TS1d.jpg b/Resources/TS1d.jpg new file mode 100644 index 0000000..9d1cf8b Binary files /dev/null and b/Resources/TS1d.jpg differ diff --git a/Resources/TS20c.jpg b/Resources/TS20c.jpg new file mode 100644 index 0000000..4f16e05 Binary files /dev/null and b/Resources/TS20c.jpg differ diff --git a/Resources/TS50c.jpg b/Resources/TS50c.jpg new file mode 100644 index 0000000..ce4cd8a Binary files /dev/null and b/Resources/TS50c.jpg differ diff --git a/Resources/TS5c.jpg b/Resources/TS5c.jpg new file mode 100644 index 0000000..9ce51b4 Binary files /dev/null and b/Resources/TS5c.jpg differ diff --git a/Resources/Ten_Cents_Frente.png b/Resources/Ten_Cents_Frente.png new file mode 100644 index 0000000..e88060d Binary files /dev/null and b/Resources/Ten_Cents_Frente.png differ diff --git a/Resources/US10dollarbill-Series_2004A.png b/Resources/US10dollarbill-Series_2004A.png new file mode 100644 index 0000000..7212894 Binary files /dev/null and b/Resources/US10dollarbill-Series_2004A.png differ diff --git a/Resources/USD_10_BILL.png b/Resources/USD_10_BILL.png new file mode 100644 index 0000000..5a92ed9 Binary files /dev/null and b/Resources/USD_10_BILL.png differ diff --git a/Resources/USD_10ct_BILL.png b/Resources/USD_10ct_BILL.png new file mode 100644 index 0000000..37b4344 Binary files /dev/null and b/Resources/USD_10ct_BILL.png differ diff --git a/Resources/USD_1_BILL.png b/Resources/USD_1_BILL.png new file mode 100644 index 0000000..4075426 Binary files /dev/null and b/Resources/USD_1_BILL.png differ diff --git a/Resources/USD_1ct_COIN.png b/Resources/USD_1ct_COIN.png new file mode 100644 index 0000000..24e8937 Binary files /dev/null and b/Resources/USD_1ct_COIN.png differ diff --git a/Resources/USD_20_BILL.png b/Resources/USD_20_BILL.png new file mode 100644 index 0000000..2679540 Binary files /dev/null and b/Resources/USD_20_BILL.png differ diff --git a/Resources/USD_25ct_COIN.png b/Resources/USD_25ct_COIN.png new file mode 100644 index 0000000..168169a Binary files /dev/null and b/Resources/USD_25ct_COIN.png differ diff --git a/Resources/USD_50_BILL.png b/Resources/USD_50_BILL.png new file mode 100644 index 0000000..2e0d96b Binary files /dev/null and b/Resources/USD_50_BILL.png differ diff --git a/Resources/USD_50ct_COIN.png b/Resources/USD_50ct_COIN.png new file mode 100644 index 0000000..7b9629b Binary files /dev/null and b/Resources/USD_50ct_COIN.png differ diff --git a/Resources/USD_5_BILL.png b/Resources/USD_5_BILL.png new file mode 100644 index 0000000..d82dd54 Binary files /dev/null and b/Resources/USD_5_BILL.png differ diff --git a/Resources/USD_5ct_COIN.png b/Resources/USD_5ct_COIN.png new file mode 100644 index 0000000..9945015 Binary files /dev/null and b/Resources/USD_5ct_COIN.png differ diff --git a/Resources/US_$20_Series_2006_Obverse.png b/Resources/US_$20_Series_2006_Obverse.png new file mode 100644 index 0000000..9395e46 Binary files /dev/null and b/Resources/US_$20_Series_2006_Obverse.png differ diff --git a/Resources/US_$5_Series_2006_obverse.png b/Resources/US_$5_Series_2006_obverse.png new file mode 100644 index 0000000..66962ce Binary files /dev/null and b/Resources/US_$5_Series_2006_obverse.png differ diff --git a/Resources/US_one_dollar_bill,_obverse,_series_2009.png b/Resources/US_one_dollar_bill,_obverse,_series_2009.png new file mode 100644 index 0000000..3ce191b Binary files /dev/null and b/Resources/US_one_dollar_bill,_obverse,_series_2009.png differ diff --git a/Resources/d464b6_20763ee15cd64a74ab98c231e25695c2~mv2.jpg b/Resources/d464b6_20763ee15cd64a74ab98c231e25695c2~mv2.jpg new file mode 100644 index 0000000..f5a1bba Binary files /dev/null and b/Resources/d464b6_20763ee15cd64a74ab98c231e25695c2~mv2.jpg differ diff --git a/Resources/gbp-20-front.jpg b/Resources/gbp-20-front.jpg new file mode 100644 index 0000000..af55e77 Binary files /dev/null and b/Resources/gbp-20-front.jpg differ diff --git a/Resources/germany-1-euro-cent-2002-removebg-preview.png b/Resources/germany-1-euro-cent-2002-removebg-preview.png new file mode 100644 index 0000000..1248bdb Binary files /dev/null and b/Resources/germany-1-euro-cent-2002-removebg-preview.png differ diff --git a/Resources/products-15892.jpg b/Resources/products-15892.jpg new file mode 100644 index 0000000..28d7b91 Binary files /dev/null and b/Resources/products-15892.jpg differ diff --git a/Resources/products-15898.jpg b/Resources/products-15898.jpg new file mode 100644 index 0000000..2581eec Binary files /dev/null and b/Resources/products-15898.jpg differ diff --git a/Resources/products-19024-removebg-preview.png b/Resources/products-19024-removebg-preview.png new file mode 100644 index 0000000..8218d3b Binary files /dev/null and b/Resources/products-19024-removebg-preview.png differ diff --git a/Resources/s-l1600.jpg b/Resources/s-l1600.jpg new file mode 100644 index 0000000..b36b857 Binary files /dev/null and b/Resources/s-l1600.jpg differ diff --git a/Resources/sgd10.jpg b/Resources/sgd10.jpg new file mode 100644 index 0000000..3a60253 Binary files /dev/null and b/Resources/sgd10.jpg differ diff --git a/Resources/th-removebg-preview.png b/Resources/th-removebg-preview.png new file mode 100644 index 0000000..e2ceec6 Binary files /dev/null and b/Resources/th-removebg-preview.png differ diff --git a/X.cs b/X.cs new file mode 100644 index 0000000..196e7f3 --- /dev/null +++ b/X.cs @@ -0,0 +1,34 @@ +using System; +using System.Reflection; +using UnityEngine; + +namespace CurrencyChanger2 +{ + public static class X + { + public static T CopyPropertiesOf(this T comp, T other) where T : Component + { + Type type = comp.GetType(); + if (type != other.GetType()) return null; // type mis-match + BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Default | BindingFlags.DeclaredOnly; + PropertyInfo[] pinfos = type.GetProperties(flags); + foreach (var pinfo in pinfos) + { + if (pinfo.CanWrite) + { + try + { + pinfo.SetValue(comp, pinfo.GetValue(other, null), null); + } + catch { } // In case of NotImplementedException being thrown. For some reason specifying that exception didn't seem to catch it, so I didn't catch anything specific. + } + } + FieldInfo[] finfos = type.GetFields(flags); + foreach (var finfo in finfos) + { + finfo.SetValue(comp, finfo.GetValue(other)); + } + return comp as T; + } + } +}