Initial commit
2
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
398
.gitignore
vendored
Normal file
|
|
@ -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
|
||||
20
Config/Plugin.BillTextureType.cs
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
10
Config/Plugin.CardTextureType.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace CurrencyChanger2
|
||||
{
|
||||
public partial class Plugin
|
||||
{
|
||||
public enum CardTextureType
|
||||
{
|
||||
DEFAULT, CUSTOM
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Config/Plugin.CoinTextureType.cs
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Config/Plugin.ConfigComp.cs
Normal file
|
|
@ -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<TTexture> where TTexture : Enum
|
||||
{
|
||||
public ConfigEntry<float> Value { get; set; }
|
||||
public ConfigEntry<string> Text { get; set; }
|
||||
public ConfigEntry<TTexture> 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<TTexture> Apply(TextMeshProUGUI text)
|
||||
{
|
||||
text.text = Text.Value;
|
||||
text.enableWordWrapping = false;
|
||||
return this;
|
||||
}
|
||||
public ConfigComp<TTexture> 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<MeshRenderer>())
|
||||
{
|
||||
foreach (var item1 in item.sharedMaterials)
|
||||
{
|
||||
item1.mainTexture = texture;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
public ConfigComp<TTexture> 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<MeshRenderer>().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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
ConfigMigration/V1ConfigResult.MoneyType.cs
Normal file
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
10
ConfigMigration/V1ConfigResult.TextureType.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace CurrencyChanger2.ConfigMigration
|
||||
{
|
||||
public partial class V1ConfigResult
|
||||
{
|
||||
public enum TextureType
|
||||
{
|
||||
USD, EUR, GBP, SGD, CAD
|
||||
}
|
||||
}
|
||||
}
|
||||
354
ConfigMigration/V1ConfigResult.cs
Normal file
|
|
@ -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<string> CurrencyPrefix;
|
||||
public ConfigEntry<string> CurrencySuffix;
|
||||
public ConfigEntry<string> CurrencyDecimalSeperator;
|
||||
|
||||
public ConfigEntry<float> CoinValue1ct;
|
||||
public ConfigEntry<float> CoinValue5ct;
|
||||
public ConfigEntry<float> CoinValue10ct;
|
||||
public ConfigEntry<float> CoinValue25ct;
|
||||
public ConfigEntry<float> CoinValue50ct;
|
||||
|
||||
public ConfigEntry<float> BillValue1d;
|
||||
public ConfigEntry<float> BillValue5d;
|
||||
public ConfigEntry<float> BillValue10d;
|
||||
public ConfigEntry<float> BillValue20d;
|
||||
public ConfigEntry<float> BillValue50d;
|
||||
|
||||
public ConfigEntry<float> LowestBill;
|
||||
public ConfigEntry<string> TerminalSymbol;
|
||||
|
||||
public ConfigEntry<string> ValueText1ct;
|
||||
public ConfigEntry<string> ValueText5ct;
|
||||
public ConfigEntry<string> ValueText10ct;
|
||||
public ConfigEntry<string> ValueText25ct;
|
||||
public ConfigEntry<string> ValueText50ct;
|
||||
|
||||
public ConfigEntry<string> ValueText1d;
|
||||
public ConfigEntry<string> ValueText5d;
|
||||
public ConfigEntry<string> ValueText10d;
|
||||
public ConfigEntry<string> ValueText20d;
|
||||
public ConfigEntry<string> ValueText50d;
|
||||
|
||||
public ConfigEntry<TextureType> Texture1ct;
|
||||
public ConfigEntry<TextureType> Texture5ct;
|
||||
public ConfigEntry<TextureType> Texture10ct;
|
||||
public ConfigEntry<TextureType> Texture25ct;
|
||||
public ConfigEntry<TextureType> Texture50ct;
|
||||
|
||||
public ConfigEntry<TextureType> Texture1d;
|
||||
public ConfigEntry<TextureType> Texture5d;
|
||||
public ConfigEntry<TextureType> Texture10d;
|
||||
public ConfigEntry<TextureType> Texture20d;
|
||||
public ConfigEntry<TextureType> Texture50d;
|
||||
public bool ConfigWasV1 { get; set; }
|
||||
public void RemoveV1ConfigEntries(ConfigFile Config)
|
||||
{
|
||||
new List<ConfigEntryBase>()
|
||||
{
|
||||
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<string>("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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
57
CurrencyChanger2.csproj
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<AssemblyName>ChangeCurrency</AssemblyName>
|
||||
<Description>My first plugin</Description>
|
||||
<Version>2.1.2</Version>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" />
|
||||
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="BepInEx.Core" Version="5.*" />
|
||||
<PackageReference Include="BepInEx.PluginInfoProps" Version="1.*" />
|
||||
<PackageReference Include="HarmonyX" Version="2.12.0" />
|
||||
<PackageReference Include="UnityEngine.Modules" Version="2021.3.3" IncludeAssets="compile" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))' == 'net'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Assembly-CSharp" Publicize="true">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MyBox" Publicize="true">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\MyBox.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.TextMeshPro">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\Unity.TextMeshPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.UI">
|
||||
<HintPath>D:\SteamLibrary\steamapps\common\Supermarket Simulator\Supermarket Simulator_Data\Managed\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
9
GoofyAhhCustomComponents/Activator.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace CurrencyChanger2.GoofyAhhCustomComponents
|
||||
{
|
||||
public class Activator : MonoBehaviour
|
||||
{
|
||||
public void OnDisable() => gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
28
GoofyAhhCustomComponents/TransformDefiner.cs
Normal file
|
|
@ -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<TransformDefiner>();
|
||||
td.position = position;
|
||||
td.localPosition = localPosition;
|
||||
td.localScale = localScale;
|
||||
td.eulerAngles = eulerAngles;
|
||||
}
|
||||
}
|
||||
}
|
||||
6
NuGet.Config
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
27
Patches/CheckoutChangeManager_AddOrRemoveMoney_Patch.cs
Normal file
|
|
@ -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<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Patches/CheckoutChangeManager_DespawnMoney_Patch.cs
Normal file
|
|
@ -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<MoneyGenerator>.Instance.m_MoneyPrefabs);
|
||||
Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs.ForEach(x => log(x.m_Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Patches/CheckoutDrawer_Awake_Patch.cs
Normal file
|
|
@ -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<MoneyGenerator>.Instance.m_MoneyPrefabs[5]);
|
||||
Plugin.Bill2.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[6]);
|
||||
Plugin.Bill3.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[7]);
|
||||
Plugin.Bill4.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[8]);
|
||||
Plugin.Bill5.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[9]);
|
||||
|
||||
Plugin.Coin1.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[0]);
|
||||
Plugin.Coin2.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[1]);
|
||||
Plugin.Coin3.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[2]);
|
||||
Plugin.Coin4.Apply(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[3]);
|
||||
Plugin.Coin5.Apply(Singleton<MoneyGenerator>.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Patches/Extensions_ToMoneyText_Patch.cs
Normal file
|
|
@ -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 = "<size=" + (fontSize * 20f / 25f).ToString() + ">";
|
||||
text2 = text2.Replace(',', '.');
|
||||
text = text.Insert(num + 1, text2);
|
||||
}
|
||||
__result = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Patches/MoneyGenerator_SpawnCreditCard_Patch.cs
Normal file
|
|
@ -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<MeshRenderer>().material.mainTexture = tex.front;
|
||||
if (Plugin.CreditCardBack.Value != Plugin.CardTextureType.DEFAULT) card.transform.GetChild(1).GetComponent<MeshRenderer>().material.mainTexture = tex.back;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Patches/PosTerminal_Start_Patch.cs
Normal file
|
|
@ -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<TextMeshProUGUI>();
|
||||
tmp.text = p;
|
||||
tmp.enableWordWrapping = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
13
Patches/PriceManager_CurrentCost_Patch.cs
Normal file
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
264
Plugin.cs
Normal file
|
|
@ -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<bool> EnableAdditionalCoinCompartments { get; set; }
|
||||
|
||||
public static ConfigEntry<float> LowestBill { get; set; }
|
||||
public static ConfigEntry<string> TerminalSymbol { get; set; }
|
||||
public static ConfigEntry<string> CurrencyPrefix { get; set; }
|
||||
public static ConfigEntry<string> CurrencySuffix { get; set; }
|
||||
public static ConfigEntry<string> CurrencyDecimalSeperator { get; set; }
|
||||
public static ConfigEntry<float> CurrencyValueFactor { get; set; }
|
||||
|
||||
|
||||
public static ConfigEntry<CardTextureType> CreditCardFront { get; set; }
|
||||
public static ConfigEntry<CardTextureType> CreditCardBack { get; set; }
|
||||
|
||||
public static ConfigEntry<string> VersionNumber { get; set; }
|
||||
|
||||
public static ConfigComp<BillTextureType> Bill1 { get; set; }
|
||||
public static ConfigComp<BillTextureType> Bill2 { get; set; }
|
||||
public static ConfigComp<BillTextureType> Bill3 { get; set; }
|
||||
public static ConfigComp<BillTextureType> Bill4 { get; set; }
|
||||
public static ConfigComp<BillTextureType> Bill5 { get; set; }
|
||||
|
||||
public static ConfigComp<CoinTextureType> Coin1 { get; set; }
|
||||
public static ConfigComp<CoinTextureType> Coin2 { get; set; }
|
||||
public static ConfigComp<CoinTextureType> Coin3 { get; set; }
|
||||
public static ConfigComp<CoinTextureType> Coin4 { get; set; }
|
||||
public static ConfigComp<CoinTextureType> Coin5 { get; set; }
|
||||
public static ConfigComp<CoinTextureType> Coin6 { get; set; }
|
||||
public static ConfigComp<CoinTextureType> 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<MeshRenderer>().material);
|
||||
mat.color = Color.black;
|
||||
divider.GetComponent<MeshRenderer>().material = mat;
|
||||
|
||||
Bill1.transform.localPosition = new Vector3(0, -10, 0);
|
||||
CheckoutChangeManager ccm = __instance.transform.parent.parent.GetComponent<CheckoutChangeManager>();
|
||||
List<MoneyPack> 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<MoneyGenerator>.Instance.m_MoneyPrefabs[4];
|
||||
}
|
||||
|
||||
void ApplyNewRenderers(MeshRenderer currentRenderer)
|
||||
{
|
||||
//currentRenderer.CopyPropertiesOf(prefab.GetComponent<MeshRenderer>());
|
||||
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<Activator>();
|
||||
Coin6.GetComponentsInChildren<MeshRenderer>().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<Activator>();
|
||||
Coin7.GetComponentsInChildren<MeshRenderer>().ForEach(ApplyNewRenderers);
|
||||
|
||||
Coin6Text = __instance.gameObject.transform.GetChild(11).GetChild(0).GetComponent<TextMeshProUGUI>();
|
||||
Coin7Text = GameObject.Instantiate(__instance.gameObject.transform.GetChild(11).GetChild(0).GetComponent<TextMeshProUGUI>().gameObject).GetComponent<TextMeshProUGUI>();
|
||||
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<MoneyPack>());
|
||||
MoneyPacks.Add(Coin7.GetComponent<MoneyPack>());
|
||||
ccm.m_MoneyPacks = MoneyPacks.Where(x => x).ToArray();
|
||||
if (!MoneyGeneratorDone)
|
||||
{
|
||||
List<Money> MoneyPrefabs = Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs == null ? new() : Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs.ToList();
|
||||
MoneyPrefabs.RemoveAll(x => x && x.Value == 1f);
|
||||
Coin6Prefab = GameObject.Instantiate(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[4].gameObject).GetComponent<Money>();
|
||||
Coin7Prefab = GameObject.Instantiate(Singleton<MoneyGenerator>.Instance.m_MoneyPrefabs[4].gameObject).GetComponent<Money>();
|
||||
ApplyNewRenderers(Coin6Prefab.GetComponent<MeshRenderer>());
|
||||
ApplyNewRenderers(Coin7Prefab.GetComponent<MeshRenderer>());
|
||||
coin6Prefab = Coin6Prefab;
|
||||
coin7Prefab = Coin7Prefab;
|
||||
MoneyPrefabs.Add(Coin6Prefab);
|
||||
MoneyPrefabs.Add(Coin7Prefab);
|
||||
Singleton<MoneyGenerator>.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<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(0).GetComponent<TextMeshProUGUI>());
|
||||
if (Bill2 != null) Plugin.Bill2.Apply(Bill2.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(1).GetComponent<TextMeshProUGUI>());
|
||||
if (Bill3 != null) Plugin.Bill3.Apply(Bill3.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(2).GetComponent<TextMeshProUGUI>());
|
||||
if (Bill4 != null) Plugin.Bill4.Apply(Bill4.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(3).GetComponent<TextMeshProUGUI>());
|
||||
if (Bill5 != null) Plugin.Bill5.Apply(Bill5.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(4).GetComponent<TextMeshProUGUI>());
|
||||
|
||||
if (Coin1 != null) Plugin.Coin1.Apply(Coin1.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(5).GetComponent<TextMeshProUGUI>());
|
||||
if (Coin2 != null) Plugin.Coin2.Apply(Coin2.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(6).GetComponent<TextMeshProUGUI>());
|
||||
if (Coin3 != null) Plugin.Coin3.Apply(Coin3.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(7).GetComponent<TextMeshProUGUI>());
|
||||
if (Coin4 != null) Plugin.Coin4.Apply(Coin4.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(8).GetComponent<TextMeshProUGUI>());
|
||||
|
||||
if (Coin6 != null) Plugin.Coin6.Apply(Coin6.GetComponent<MoneyPack>()).Apply(Coin6Text).Apply(Coin6Prefab);
|
||||
if (Coin7 != null) Plugin.Coin7.Apply(Coin7.GetComponent<MoneyPack>()).Apply(Coin7Text).Apply(Coin7Prefab);
|
||||
|
||||
if (Coin5 != null) Plugin.Coin5.Apply(Coin5.GetComponent<MoneyPack>()).Apply(__instance.gameObject.transform.GetChild(11).GetChild(9).GetComponent<TextMeshProUGUI>());
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
643
Properties/Resources.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,643 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CurrencyChanger2.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// 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() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_1_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_1_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_1_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_1_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_10_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_10_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_10ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_10ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_1ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_1ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_2_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_2_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_20_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_20_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_25ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_25ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_5_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_5_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_50_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_50_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_50ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_50ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] CAD_5ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("CAD_5ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_1_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_1_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_1_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_1_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_10_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_10_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_100_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_100_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_10ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_10ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_1ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_1ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_2_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_2_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_20_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_20_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_20ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_20ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_5_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_5_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_50_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_50_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_50ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_50ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] EUR_5ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("EUR_5ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_1_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_1_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_1_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_1_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_10_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_10_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_10ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_10ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_1ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_1ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_2_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_2_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_20_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_20_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_20ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_20ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_5_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_5_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_50_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_50_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_50ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_50ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] GBP_5ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("GBP_5ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_1_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_1_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_10_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_10_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_10ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_10ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_1ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_1ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_2_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_2_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_20_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_20_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_20ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_20ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_5_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_5_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_50_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_50_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_50ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_50ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] SGD_5ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("SGD_5ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_1_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_1_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_10_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_10_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_10ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_10ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_1ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_1ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_20_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_20_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_25ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_25ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_5_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_5_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_50_BILL {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_50_BILL", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_50ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_50ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
|
||||
/// </summary>
|
||||
internal static byte[] USD_5ct_COIN {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("USD_5ct_COIN", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
295
Properties/Resources.resx
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="CAD_10ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CAD_10ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_10_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\US10dollarbill-Series_2004A.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_1ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\One_Cent_Tras.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_1_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\US_one_dollar_bill,_obverse,_series_2009.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_1_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CAD_1_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_20_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\US_$20_Series_2006_Obverse.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_25ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CAD_25ct_COIN.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_2_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CAD_2_COIN.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_50ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CAD_50ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_50_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\50_USD_Series_2004_Note_Front.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_5ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Five_Cents_Tras.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CAD_5_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\US_$5_Series_2006_obverse.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_100_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\100.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_10ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\10_eurocent_common_2007.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_10_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\EU10Eurobill-Series_2004A-sharedassets0.assets-1717.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_1ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\germany-1-euro-cent-2002-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_1_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\1_euro.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_1_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Common_face_of_one_euro_coin.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_20ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\20_eurocent_common_2007.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_20_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\20.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_2_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\2_euro_coin_Eu_serie_1.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_50ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\605d7123e494b1.61599945-original-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_50_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\50.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_5ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\61fe0eecddda17.09298112-original-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="EUR_5_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Screenshot 2024-03-29 141218.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_10ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\314_coin-designs-and-specifications_10p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_10_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\d464b6_20763ee15cd64a74ab98c231e25695c2~mv2.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_1ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\th-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_1_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\5ea53be3436f91.68585950-original.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_1_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GBP_1_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_20ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\314_coin-designs-and-specifications_20p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_20_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\gbp-20-front.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_2_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\s-l1600.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_50ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\314_coin-designs-and-specifications_50p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_50_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\GBP_50_BILL.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_5ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\314_coin-designs-and-specifications_5p-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="GBP_5_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\products-15892.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_10ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TS10c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_10_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\sgd10.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_1ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\360-original-removebg-preview.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_1_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TS1d.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_20ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TS20c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_20_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Screenshot 2024-03-31 112554.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_2_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\626c1e69574431.97909339-original.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_50ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TS50c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_50_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\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</value>
|
||||
</data>
|
||||
<data name="SGD_5ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\TS5c.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="SGD_5_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\5e981ed7ccc916.18968393-original.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_10ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_10ct_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_10_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_10_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_1ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_1ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_1_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_1_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_20_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_20_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_25ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_25ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_50ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_50ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_50_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_50_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_5ct_COIN" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_5ct_COIN.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="USD_5_BILL" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\USD_5_BILL.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
Resources/100.jpg
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
Resources/10_eurocent_common_2007.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
Resources/1829-original-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 369 KiB |
BIN
Resources/1833-original-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 451 KiB |
BIN
Resources/1_euro.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
Resources/20.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
Resources/20_eurocent_common_2007.png
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
Resources/25_Cents_Front.png
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
Resources/2_euro_coin_Eu_serie_1.png
Normal file
|
After Width: | Height: | Size: 794 KiB |
|
After Width: | Height: | Size: 264 KiB |
|
After Width: | Height: | Size: 262 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 296 KiB |
BIN
Resources/360-original-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 368 KiB |
BIN
Resources/443663b-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 517 KiB |
|
After Width: | Height: | Size: 89 KiB |
BIN
Resources/50.jpg
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
Resources/50_Cents_Frente.png
Normal file
|
After Width: | Height: | Size: 254 KiB |
BIN
Resources/50_USD_Series_2004_Note_Front.png
Normal file
|
After Width: | Height: | Size: 842 KiB |
BIN
Resources/5e981ed7ccc916.18968393-original.jpg
Normal file
|
After Width: | Height: | Size: 255 KiB |
BIN
Resources/5ea53be3436f91.68585950-original.jpg
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
Resources/605d7123e494b1.61599945-original-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 388 KiB |
BIN
Resources/61fe0eecddda17.09298112-original-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 410 KiB |
BIN
Resources/626c1e69574431.97909339-original.jpg
Normal file
|
After Width: | Height: | Size: 441 KiB |
BIN
Resources/62a822d2a8b966.44428801-original.jpg
Normal file
|
After Width: | Height: | Size: 719 KiB |
BIN
Resources/British_12_sided_pound_coin.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
Resources/CAD_10ct_COIN.png
Normal file
|
After Width: | Height: | Size: 416 KiB |
BIN
Resources/CAD_1_COIN.png
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
Resources/CAD_25ct_COIN.jpg
Normal file
|
After Width: | Height: | Size: 102 KiB |
BIN
Resources/CAD_2_COIN.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
Resources/CAD_50ct_COIN.png
Normal file
|
After Width: | Height: | Size: 794 KiB |
BIN
Resources/Common_face_of_one_euro_coin.png
Normal file
|
After Width: | Height: | Size: 132 KiB |
BIN
Resources/EU-5_Series_2002_obverse-sharedassets0.assets-005.png
Normal file
|
After Width: | Height: | Size: 4.7 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
BIN
Resources/Five_Cents_Tras.png
Normal file
|
After Width: | Height: | Size: 227 KiB |
BIN
Resources/GBP_1_COIN.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
Resources/GBP_50_BILL.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
Resources/One_Cent_Tras.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
Resources/Screenshot 2024-03-29 141218.jpg
Normal file
|
After Width: | Height: | Size: 118 KiB |
BIN
Resources/Screenshot 2024-03-31 112554.jpg
Normal file
|
After Width: | Height: | Size: 228 KiB |
BIN
Resources/TS10c.jpg
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
Resources/TS1d.jpg
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
Resources/TS20c.jpg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
Resources/TS50c.jpg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
Resources/TS5c.jpg
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
Resources/Ten_Cents_Frente.png
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
Resources/US10dollarbill-Series_2004A.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
Resources/USD_10_BILL.png
Normal file
|
After Width: | Height: | Size: 3.4 MiB |
BIN
Resources/USD_10ct_BILL.png
Normal file
|
After Width: | Height: | Size: 472 KiB |
BIN
Resources/USD_1_BILL.png
Normal file
|
After Width: | Height: | Size: 818 KiB |
BIN
Resources/USD_1ct_COIN.png
Normal file
|
After Width: | Height: | Size: 316 KiB |
BIN
Resources/USD_20_BILL.png
Normal file
|
After Width: | Height: | Size: 3.9 MiB |
BIN
Resources/USD_25ct_COIN.png
Normal file
|
After Width: | Height: | Size: 447 KiB |
BIN
Resources/USD_50_BILL.png
Normal file
|
After Width: | Height: | Size: 1,016 KiB |
BIN
Resources/USD_50ct_COIN.png
Normal file
|
After Width: | Height: | Size: 515 KiB |
BIN
Resources/USD_5_BILL.png
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
BIN
Resources/USD_5ct_COIN.png
Normal file
|
After Width: | Height: | Size: 397 KiB |
BIN
Resources/US_$20_Series_2006_Obverse.png
Normal file
|
After Width: | Height: | Size: 1 MiB |
BIN
Resources/US_$5_Series_2006_obverse.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
Resources/US_one_dollar_bill,_obverse,_series_2009.png
Normal file
|
After Width: | Height: | Size: 769 KiB |
BIN
Resources/d464b6_20763ee15cd64a74ab98c231e25695c2~mv2.jpg
Normal file
|
After Width: | Height: | Size: 152 KiB |
BIN
Resources/gbp-20-front.jpg
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
Resources/germany-1-euro-cent-2002-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 484 KiB |
BIN
Resources/products-15892.jpg
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
Resources/products-15898.jpg
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
Resources/products-19024-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 409 KiB |
BIN
Resources/s-l1600.jpg
Normal file
|
After Width: | Height: | Size: 90 KiB |
BIN
Resources/sgd10.jpg
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
Resources/th-removebg-preview.png
Normal file
|
After Width: | Height: | Size: 291 KiB |
34
X.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CurrencyChanger2
|
||||
{
|
||||
public static class X
|
||||
{
|
||||
public static T CopyPropertiesOf<T>(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;
|
||||
}
|
||||
}
|
||||
}
|
||||