├── .gitattributes
├── .gitignore
├── DynamicReflections
├── DynamicReflections.cs
├── DynamicReflections.csproj
├── DynamicReflections.sln
├── Examples
│ ├── Fashionable Mirrors
│ │ ├── [DGA] Fashionable Mirrors
│ │ │ ├── assets
│ │ │ │ ├── double_leaning_mirror.png
│ │ │ │ ├── enchanted_mirror.png
│ │ │ │ ├── leaning_mirror.png
│ │ │ │ └── table_mirror.png
│ │ │ ├── content.json
│ │ │ ├── i18n
│ │ │ │ └── default.json
│ │ │ └── manifest.json
│ │ └── [DR] Fashionable Mirrors
│ │ │ ├── Masks
│ │ │ ├── double_leaning_mirror_mask.png
│ │ │ ├── enchanted_mirror_mask.png
│ │ │ ├── leaning_mirror_mask.png
│ │ │ └── table_mirror_mask.png
│ │ │ ├── manifest.json
│ │ │ └── mirrors.json
│ └── [SF] Example Pack
│ │ ├── Buildings
│ │ └── HallOfMirrors
│ │ │ ├── building.json
│ │ │ └── building.png
│ │ ├── Interiors
│ │ ├── hall_of_mirrors.tmx
│ │ └── z_mirrors.png
│ │ └── manifest.json
├── Framework
│ ├── Assets
│ │ ├── Shaders
│ │ │ ├── mask.fx
│ │ │ ├── mask.mgfx
│ │ │ ├── opacity.fx
│ │ │ ├── opacity.mgfx
│ │ │ ├── wavy.fx
│ │ │ └── wavy.mgfx
│ │ └── Textures
│ │ │ ├── night_sky_sheet.png
│ │ │ ├── puddles_sheet.png
│ │ │ └── sky_effects_sheet.png
│ ├── Extensions
│ │ └── GameLocationExtensions.cs
│ ├── External
│ │ └── GenericModConfigMenu
│ │ │ ├── GMCMHelper.cs
│ │ │ └── ModConfig.cs
│ ├── Interfaces
│ │ ├── IGenericModConfigMenuApi.cs
│ │ └── Internal
│ │ │ └── Api.cs
│ ├── Managers
│ │ ├── ApiManager.cs
│ │ ├── AssetManager.cs
│ │ ├── MirrorsManager.cs
│ │ ├── PuddleManager.cs
│ │ └── SkyManager.cs
│ ├── Models
│ │ ├── ContentPackModel.cs
│ │ ├── Mirror.cs
│ │ └── Settings
│ │ │ ├── MirrorSettings.cs
│ │ │ ├── PuddleSettings.cs
│ │ │ ├── SkySettings.cs
│ │ │ └── WaterSettings.cs
│ ├── Patches
│ │ ├── Locations
│ │ │ └── GameLocationPatch.cs
│ │ ├── Objects
│ │ │ └── FurniturePatch.cs
│ │ ├── PatchTemplate.cs
│ │ ├── SMAPI
│ │ │ └── DisplayDevicePatch.cs
│ │ ├── Tools
│ │ │ ├── FishingRodPatch.cs
│ │ │ └── ToolPatch.cs
│ │ └── xTile
│ │ │ └── LayerPatch.cs
│ └── Utilities
│ │ ├── Extensions
│ │ └── RandomExtensions.cs
│ │ ├── ModDataKeys.cs
│ │ └── SpriteBatchToolkit.cs
├── i18n
│ ├── de.json
│ ├── default.json
│ ├── fr.json
│ ├── ja.json
│ ├── ko.json
│ ├── ru.json
│ ├── th.json
│ └── zh.json
└── manifest.json
├── LICENSE
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 |
--------------------------------------------------------------------------------
/DynamicReflections/DynamicReflections.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | 3.0.0
4 | net6.0
5 | latest
6 | true
7 | false
8 | false
9 | E:\SteamLibrary\steamapps\common\Stardew Valley\Mods
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | Never
24 |
25 |
26 | Always
27 |
28 |
29 | Always
30 |
31 |
32 | Always
33 |
34 |
35 | Always
36 |
37 |
38 | Always
39 |
40 |
41 | Always
42 |
43 |
44 | Always
45 |
46 |
47 | Always
48 |
49 |
50 | Always
51 |
52 |
53 | Always
54 |
55 |
56 | Always
57 |
58 |
59 | Always
60 |
61 |
62 | Always
63 |
64 |
65 | Always
66 |
67 |
68 | Always
69 |
70 |
71 |
72 |
73 |
74 | $(PostBuildEventDependsOn);
75 | PostBuildMacros;
76 |
77 |
78 | powershell -Command "(ls *manifest.json -rec | foreach-object { $f=$_.FullName; (gc -LiteralPath \"$f\") -replace 'REPLACE_ME_WITH_VERSION', '$(Version)' | sc -LiteralPath \"$f\" })"
79 |
80 | powershell Remove-Item -Path 'C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\releases\latest\DynamicReflections"' -Recurse -Force
81 | xcopy /s /y /i "C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\bin\Debug\$(TargetFramework)" "C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\releases\latest\DynamicReflections"
82 | 7z a -tzip "C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\releases\DynamicReflections-$(Version).zip" "C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\releases\latest\DynamicReflections"
83 |
84 | powershell Remove-Item -Path '$(GameModsPath)\DynamicReflections' -Recurse -Force
85 | powershell Remove-Item -Path '$(GameModsPath)\Dynamic Reflections Examples' -Recurse -Force
86 |
87 | xcopy /s /y /i "C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\releases\latest\DynamicReflections" "$(GameModsPath)\DynamicReflections"
88 | xcopy /s /y /i "C:\Users\Floogen\Documents\GitHub Repos\DynamicReflections\DynamicReflections\Examples\*" "$(GameModsPath)\Dynamic Reflections Examples"
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/DynamicReflections/DynamicReflections.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.2.32505.173
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamicReflections", "DynamicReflections.csproj", "{B0DA23ED-E495-4F7E-8770-DCFE389C429C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {B0DA23ED-E495-4F7E-8770-DCFE389C429C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {B0DA23ED-E495-4F7E-8770-DCFE389C429C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {B0DA23ED-E495-4F7E-8770-DCFE389C429C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {B0DA23ED-E495-4F7E-8770-DCFE389C429C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {FAED9AFC-5499-46BB-83B3-45491E89EB8A}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/double_leaning_mirror.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/double_leaning_mirror.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/enchanted_mirror.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/enchanted_mirror.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/leaning_mirror.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/leaning_mirror.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/table_mirror.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/assets/table_mirror.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/content.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "$ItemType": "Furniture",
4 | "ID": "Enchanted Mirror",
5 | "Type": "Decoration",
6 | "Configurations": [
7 | {
8 | "Texture": "assets/enchanted_mirror.png:1@30, assets/enchanted_mirror.png:0@25, assets/enchanted_mirror.png:1@30, assets/enchanted_mirror.png:2@25",
9 | "DisplaySize": {
10 | "X": 1,
11 | "Y": 2
12 | },
13 | "CollisionHeight": 1,
14 | "TileProperties": {
15 | "0, 1": {
16 | "Buildings": {
17 | "Action": "OpenFashionSense"
18 | }
19 | }
20 | }
21 | }
22 | ]
23 | },
24 | {
25 | "$ItemType": "Furniture",
26 | "ID": "Leaning Mirror",
27 | "Type": "Decoration",
28 | "Configurations": [
29 | {
30 | "Texture": "assets/leaning_mirror.png",
31 | "DisplaySize": {
32 | "X": 1,
33 | "Y": 3
34 | },
35 | "CollisionHeight": 1,
36 | "TileProperties": {
37 | "0, 0": {
38 | "Buildings": {
39 | "Action": "OpenFashionSense"
40 | }
41 | },
42 | "0, 1": {
43 | "Buildings": {
44 | "Action": "OpenFashionSense"
45 | }
46 | },
47 | "0, 2": {
48 | "Buildings": {
49 | "Action": "OpenFashionSense"
50 | }
51 | }
52 | }
53 | }
54 | ]
55 | },
56 | {
57 | "$ItemType": "Furniture",
58 | "ID": "Double Leaning Mirror",
59 | "Type": "Decoration",
60 | "Configurations": [
61 | {
62 | "Texture": "assets/double_leaning_mirror.png",
63 | "DisplaySize": {
64 | "X": 2,
65 | "Y": 3
66 | },
67 | "CollisionHeight": 1,
68 | "TileProperties": {
69 | "0, 0": {
70 | "Buildings": {
71 | "Action": "OpenFashionSense"
72 | }
73 | },
74 | "0, 1": {
75 | "Buildings": {
76 | "Action": "OpenFashionSense"
77 | }
78 | },
79 | "0, 2": {
80 | "Buildings": {
81 | "Action": "OpenFashionSense"
82 | }
83 | },
84 | "1, 0": {
85 | "Buildings": {
86 | "Action": "OpenFashionSense"
87 | }
88 | },
89 | "1, 1": {
90 | "Buildings": {
91 | "Action": "OpenFashionSense"
92 | }
93 | },
94 | "1, 2": {
95 | "Buildings": {
96 | "Action": "OpenFashionSense"
97 | }
98 | }
99 | }
100 | }
101 | ]
102 | },
103 | {
104 | "$ItemType": "Furniture",
105 | "ID": "Table Mirror",
106 | "Type": "Decoration",
107 | "Configurations": [
108 | {
109 | "Texture": "assets/table_mirror.png",
110 | "DisplaySize": {
111 | "X": 2,
112 | "Y": 3
113 | },
114 | "CollisionHeight": 1,
115 | "TileProperties": {
116 | "0, 0": {
117 | "Buildings": {
118 | "Action": "OpenFashionSense"
119 | }
120 | },
121 | "0, 1": {
122 | "Buildings": {
123 | "Action": "OpenFashionSense"
124 | }
125 | },
126 | "0, 2": {
127 | "Buildings": {
128 | "Action": "OpenFashionSense"
129 | }
130 | },
131 | "1, 0": {
132 | "Buildings": {
133 | "Action": "OpenFashionSense"
134 | }
135 | },
136 | "1, 1": {
137 | "Buildings": {
138 | "Action": "OpenFashionSense"
139 | }
140 | },
141 | "1, 2": {
142 | "Buildings": {
143 | "Action": "OpenFashionSense"
144 | }
145 | }
146 | }
147 | }
148 | ]
149 | }
150 | ]
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/i18n/default.json:
--------------------------------------------------------------------------------
1 | {
2 | "furniture.Leaning Mirror.name": "Leaning Mirror",
3 | "furniture.Leaning Mirror.description": "...",
4 | "furniture.Double Leaning Mirror.name": "Double Leaning Mirror",
5 | "furniture.Double Leaning Mirror.description": "...",
6 | "furniture.Enchanted Mirror.name": "Enchanted Mirror",
7 | "furniture.Enchanted Mirror.description": "...",
8 | "furniture.Table Mirror.name": "Table Mirror",
9 | "furniture.Table Mirror.description": "..."
10 | }
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DGA] Fashionable Mirrors/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "[DGA] Fashionable Mirrors",
3 | "Author": "PeacefulEnd",
4 | "Version": "1.0.0",
5 | "Description": "Furniture component for Fashionable Mirrors.",
6 | "UniqueID": "PeacefulEnd.DGA.FashionableMirrors",
7 | "UpdateKeys": [],
8 | "ContentPackFor": {
9 | "UniqueID": "spacechase0.DynamicGameAssets",
10 | "MinimumVersion": "1.4.3"
11 | },
12 | "Dependencies": [
13 | {
14 | "UniqueID": "PeacefulEnd.FashionSense",
15 | "MinimumVersion": "4.9.0"
16 | }
17 | ],
18 | "DGA.FormatVersion": 2,
19 | "DGA.ConditionsFormatVersion": "1.23.0"
20 | }
21 |
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/double_leaning_mirror_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/double_leaning_mirror_mask.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/enchanted_mirror_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/enchanted_mirror_mask.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/leaning_mirror_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/leaning_mirror_mask.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/table_mirror_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/Masks/table_mirror_mask.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "[DR] Fashionable Mirrors",
3 | "Author": "PeacefulEnd",
4 | "Version": "1.0.0",
5 | "Description": "Reflection component for Fashionable Mirrors.",
6 | "UniqueID": "PeacefulEnd.DynamicReflections.FashionableMirrors",
7 | "UpdateKeys": [ "Nexus:12834" ],
8 | "ContentPackFor": {
9 | "UniqueID": "PeacefulEnd.DynamicReflections",
10 | "MinimumVersion": "1.0.0"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/DynamicReflections/Examples/Fashionable Mirrors/[DR] Fashionable Mirrors/mirrors.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "FurnitureId": "PeacefulEnd.DGA.FashionableMirrors/Enchanted Mirror",
4 | "MaskTexture": "enchanted_mirror_mask.png",
5 | "Mirror": {
6 | "Dimensions": {
7 | "Width": 16,
8 | "Height": 32
9 | },
10 | "ReflectionOverlay": {
11 | "R": 255,
12 | "G": 255,
13 | "B": 255,
14 | "A": 155
15 | },
16 | "ReflectionOffset": {
17 | "X": 0,
18 | "Y": 4
19 | }
20 | }
21 | },
22 | {
23 | "FurnitureId": "PeacefulEnd.DGA.FashionableMirrors/Leaning Mirror",
24 | "MaskTexture": "leaning_mirror_mask.png",
25 | "Mirror": {
26 | "Dimensions": {
27 | "Width": 16,
28 | "Height": 44
29 | },
30 | "ReflectionOverlay": {
31 | "R": 255,
32 | "G": 255,
33 | "B": 255,
34 | "A": 155
35 | }
36 | }
37 | },
38 | {
39 | "FurnitureId": "PeacefulEnd.DGA.FashionableMirrors/Double Leaning Mirror",
40 | "MaskTexture": "double_leaning_mirror_mask.png",
41 | "Mirror": {
42 | "Dimensions": {
43 | "Width": 32,
44 | "Height": 44
45 | },
46 | "ReflectionOverlay": {
47 | "R": 255,
48 | "G": 255,
49 | "B": 255,
50 | "A": 155
51 | }
52 | }
53 | },
54 | {
55 | "FurnitureId": "PeacefulEnd.DGA.FashionableMirrors/Table Mirror",
56 | "MaskTexture": "table_mirror_mask.png",
57 | "Mirror": {
58 | "Dimensions": {
59 | "Width": 32,
60 | "Height": 48
61 | },
62 | "ReflectionOverlay": {
63 | "R": 255,
64 | "G": 255,
65 | "B": 255,
66 | "A": 125
67 | }
68 | }
69 | }
70 | ]
--------------------------------------------------------------------------------
/DynamicReflections/Examples/[SF] Example Pack/Buildings/HallOfMirrors/building.json:
--------------------------------------------------------------------------------
1 | {
2 | "Id": "PeacefulEnd.DynamicReflections.ExamplePack_HallofMirrors",
3 | "Name": "Hall of Mirrors",
4 | "Description": "...",
5 | "BuildCost": 2500,
6 | "DrawShadow": false,
7 |
8 | "SourceRect": "0 0 112 80",
9 | "Size": {
10 | "X": 8,
11 | "Y": 3
12 | },
13 | "SortTileOffset": 1,
14 | "CollisionMap": "XXXXXXXO\nXXXXXXXO\nXXXOXXXO",
15 |
16 | "IndoorMap": "hall_of_mirrors",
17 | "TunnelDoors": [
18 | {
19 | "X": 3,
20 | "Y": 2
21 | }
22 | ]
23 | }
--------------------------------------------------------------------------------
/DynamicReflections/Examples/[SF] Example Pack/Buildings/HallOfMirrors/building.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/[SF] Example Pack/Buildings/HallOfMirrors/building.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/[SF] Example Pack/Interiors/hall_of_mirrors.tmx:
--------------------------------------------------------------------------------
1 |
2 |
147 |
--------------------------------------------------------------------------------
/DynamicReflections/Examples/[SF] Example Pack/Interiors/z_mirrors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Examples/[SF] Example Pack/Interiors/z_mirrors.png
--------------------------------------------------------------------------------
/DynamicReflections/Examples/[SF] Example Pack/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "[SF] Example Pack",
3 | "Author": "PeacefulEnd",
4 | "Version": "1.0.0",
5 | "Description": "A pack utilizing Solid Foundations to show how to use the Dynamic Reflections framework.",
6 | "UniqueID": "PeacefulEnd.DynamicReflections.ExamplePack",
7 | "UpdateKeys": [],
8 | "Dependencies": [
9 | {
10 | "UniqueID": "PeacefulEnd.DynamicReflections",
11 | "MinimumVersion": "1.0.0"
12 | }
13 | ],
14 | "ContentPackFor": {
15 | "UniqueID": "PeacefulEnd.SolidFoundations",
16 | "MinimumVersion": "1.12.0"
17 | }
18 | }
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Shaders/mask.fx:
--------------------------------------------------------------------------------
1 | #if OPENGL
2 | #define SV_POSITION POSITION
3 | #define VS_SHADERMODEL vs_3_0
4 | #define PS_SHADERMODEL ps_3_0
5 | #else
6 | #define VS_SHADERMODEL vs_4_0_level_9_1
7 | #define PS_SHADERMODEL ps_4_0_level_9_1
8 | #endif
9 |
10 | sampler2D TextureSampler : register(s0)
11 | {
12 | Texture = (Texture);
13 | };
14 |
15 | Texture2D Mask;
16 | sampler MaskSampler {
17 | Texture = ( Mask );
18 | };
19 |
20 | //https://community.monogame.net/t/how-to-mask-2d-tile-sprites/15813/2
21 | //https://gamedev.stackexchange.com/questions/38118/best-way-to-mask-2d-sprites-in-xna
22 |
23 | float4 MaskPS(float4 position : SV_Position, float4 color : COLOR0, float2 TextureCoordinates : TEXCOORD0): COLOR0
24 | {
25 | float4 tex = tex2D(TextureSampler, TextureCoordinates) * color;
26 | float4 mask = tex2D(MaskSampler, TextureCoordinates);
27 |
28 | return float4(tex.r, tex.g, tex.b, min(mask.a, tex.a));
29 | }
30 |
31 | technique Mask
32 | {
33 | pass P0
34 | {
35 | PixelShader = compile PS_SHADERMODEL MaskPS();
36 | }
37 | };
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Shaders/mask.mgfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Framework/Assets/Shaders/mask.mgfx
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Shaders/opacity.fx:
--------------------------------------------------------------------------------
1 | #if OPENGL
2 | #define SV_POSITION POSITION
3 | #define VS_SHADERMODEL vs_3_0
4 | #define PS_SHADERMODEL ps_3_0
5 | #else
6 | #define VS_SHADERMODEL vs_4_0_level_9_1
7 | #define PS_SHADERMODEL ps_4_0_level_9_1
8 | #endif
9 |
10 | sampler2D TextureSampler : register(s0)
11 | {
12 | Texture = (Texture);
13 | };
14 |
15 | float Opacity = 1.0;
16 |
17 | float4 OpacityPS(float4 position : SV_Position, float4 color : COLOR0, float2 TextureCoordinates : TEXCOORD0): COLOR0
18 | {
19 | float4 tex = tex2D(TextureSampler, TextureCoordinates) * color;
20 |
21 | return float4(tex.r, tex.g, tex.b, tex.a * Opacity);
22 | }
23 |
24 | technique OpacityFade
25 | {
26 | pass P0
27 | {
28 | PixelShader = compile PS_SHADERMODEL OpacityPS();
29 | }
30 | };
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Shaders/opacity.mgfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Framework/Assets/Shaders/opacity.mgfx
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Shaders/wavy.fx:
--------------------------------------------------------------------------------
1 | #if OPENGL
2 | #define SV_POSITION POSITION
3 | #define VS_SHADERMODEL vs_3_0
4 | #define PS_SHADERMODEL ps_3_0
5 | #else
6 | #define VS_SHADERMODEL vs_4_0_level_9_1
7 | #define PS_SHADERMODEL ps_4_0_level_9_1
8 | #endif
9 |
10 | float percent;
11 |
12 | float4 ColorOverlay;
13 | float Frequency = 100;
14 | float Phase = 0;
15 | float Amplitude = 0.1;
16 |
17 | sampler2D TextureSampler : register(s0)
18 | {
19 | Texture = (Texture);
20 | };
21 |
22 | float4 WavyPS(float4 position : SV_Position, float4 color : COLOR0, float2 TextureCoordinates : TEXCOORD0) : COLOR0
23 | {
24 | // https://community.monogame.net/t/how-to-use-a-pixel-shader-with-spritebatch-minimal-example-greyscale/12132
25 | //float4 col = tex2D(TextureSampler, TextureCoordinates)* color;
26 | //col.rgb = (col.r + col.g + col.b) / 3.0f * percent; // grey scale and darken
27 | //return col;
28 |
29 | // https://vvvv.org/documentation/tutorial-effects-texture-coordinates
30 | //float2 cord = TextureCoordinates;
31 | //cord.x += sin(cord.y * Frequency + Phase) * Amplitude;
32 | //float4 col = tex2D(TextureSampler, cord) * color;
33 | //return col;
34 |
35 | float2 uv = TextureCoordinates;
36 | //uv.y = -1.0 - uv.y;
37 | uv.x += sin(uv.y * Frequency + Phase) * Amplitude;
38 | return tex2D(TextureSampler, uv) * ColorOverlay;
39 | }
40 |
41 | float4 WavyDarkPS(float4 position : SV_Position, float4 color : COLOR0, float2 TextureCoordinates : TEXCOORD0) : COLOR0
42 | {
43 | float2 uv = TextureCoordinates;
44 | //uv.y = -1.0 - uv.y;
45 | uv.x += sin(uv.y * Frequency + Phase) * Amplitude;
46 |
47 | float4 col = tex2D(TextureSampler, uv) * color;
48 | col.rgb = (col.r + col.g + col.b) / 3.0f * percent; // grey scale and darken
49 | return col;
50 | }
51 |
52 | technique Wavy
53 | {
54 | pass P0
55 | {
56 | PixelShader = compile PS_SHADERMODEL WavyPS();
57 | }
58 | };
59 |
60 | technique WavyDark
61 | {
62 | pass P0
63 | {
64 | PixelShader = compile PS_SHADERMODEL WavyPS();
65 | }
66 | pass P1
67 | {
68 | PixelShader = compile PS_SHADERMODEL WavyDarkPS();
69 | }
70 | };
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Shaders/wavy.mgfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Framework/Assets/Shaders/wavy.mgfx
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Textures/night_sky_sheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Framework/Assets/Textures/night_sky_sheet.png
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Textures/puddles_sheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Framework/Assets/Textures/puddles_sheet.png
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Assets/Textures/sky_effects_sheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Floogen/DynamicReflections/3b773fd8ba3b07e01f8d039995cdc16b60dab87d/DynamicReflections/Framework/Assets/Textures/sky_effects_sheet.png
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Extensions/GameLocationExtensions.cs:
--------------------------------------------------------------------------------
1 | using StardewValley.Objects;
2 | using StardewValley;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using xTile.Dimensions;
9 | using Microsoft.Xna.Framework;
10 | using Object = StardewValley.Object;
11 | using StardewValley.Extensions;
12 |
13 | namespace DynamicReflections.Framework.Extensions
14 | {
15 | // Copied from the Stardew Valley wiki: https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.6#How_to_update_your_mod
16 | internal static class GameLocationExtensions
17 | {
18 | public static bool isTileOccupiedForPlacement(this GameLocation location, Vector2 tileLocation, Object toPlace = null)
19 | {
20 | return location.CanItemBePlacedHere(tileLocation, toPlace != null && toPlace.isPassable());
21 | }
22 |
23 | public static bool isTileOccupied(this GameLocation location, Vector2 tileLocation, string characterToIgnore = "", bool ignoreAllCharacters = false)
24 | {
25 | CollisionMask mask = ignoreAllCharacters ? CollisionMask.All & ~CollisionMask.Characters & ~CollisionMask.Farmers : CollisionMask.All;
26 | return location.IsTileOccupiedBy(tileLocation, mask);
27 | }
28 |
29 | public static bool isTileOccupiedIgnoreFloors(this GameLocation location, Vector2 tileLocation, string characterToIgnore = "")
30 | {
31 | return location.IsTileOccupiedBy(tileLocation, CollisionMask.Buildings | CollisionMask.Furniture | CollisionMask.Objects | CollisionMask.Characters | CollisionMask.TerrainFeatures, ignorePassables: CollisionMask.Flooring);
32 | }
33 |
34 | public static bool isTileLocationOpenIgnoreFrontLayers(this GameLocation location, Location tile)
35 | {
36 | return location.map.RequireLayer("Buildings").Tiles[tile.X, tile.Y] == null && !location.isWaterTile(tile.X, tile.Y);
37 | }
38 |
39 | public static bool isTileLocationTotallyClearAndPlaceable(this GameLocation location, int x, int y)
40 | {
41 | return location.isTileLocationTotallyClearAndPlaceable(new Vector2(x, y));
42 | }
43 |
44 | public static bool isTileLocationTotallyClearAndPlaceableIgnoreFloors(this GameLocation location, Vector2 v)
45 | {
46 | return location.isTileOnMap(v) && !location.isTileOccupiedIgnoreFloors(v) && location.isTilePassable(new Location((int)v.X, (int)v.Y), Game1.viewport) && location.isTilePlaceable(v);
47 | }
48 |
49 | public static bool isTileLocationTotallyClearAndPlaceable(this GameLocation location, Vector2 v)
50 | {
51 | Vector2 pixel = new Vector2((v.X * Game1.tileSize) + Game1.tileSize / 2, (v.Y * Game1.tileSize) + Game1.tileSize / 2);
52 | foreach (Furniture f in location.furniture)
53 | {
54 | if (f.furniture_type.Value != Furniture.rug && !f.isPassable() && f.GetBoundingBox().Contains((int)pixel.X, (int)pixel.Y) && !f.AllowPlacementOnThisTile((int)v.X, (int)v.Y))
55 | return false;
56 | }
57 |
58 | return location.isTileOnMap(v) && !location.isTileOccupied(v) && location.isTilePassable(new Location((int)v.X, (int)v.Y), Game1.viewport) && location.isTilePlaceable(v);
59 | }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/DynamicReflections/Framework/External/GenericModConfigMenu/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using DynamicReflections.Framework.Models.Settings;
2 | using StardewModdingAPI;
3 | using StardewValley;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 |
10 | namespace DynamicReflections.Framework.External.GenericModConfigMenu
11 | {
12 | public class ModConfig
13 | {
14 | public bool AreWaterReflectionsEnabled { get; set; } = true;
15 | public bool AreMirrorReflectionsEnabled { get; set; } = true;
16 | public bool ArePuddleReflectionsEnabled { get; set; } = true;
17 | public bool AreNPCReflectionsEnabled { get; set; } = true;
18 | public bool AreSkyReflectionsEnabled { get; set; } = true;
19 |
20 | public WaterSettings WaterReflectionSettings { get; set; } = new WaterSettings();
21 | public PuddleSettings PuddleReflectionSettings { get; set; } = new PuddleSettings();
22 | public SkySettings SkyReflectionSettings { get; set; } = new SkySettings();
23 | public int MeteorShowerNightChance { get; set; } = 10;
24 |
25 | public Dictionary LocalWaterReflectionSettings { get; set; } = new Dictionary();
26 | public Dictionary LocalPuddleReflectionSettings { get; set; } = new Dictionary();
27 | public Dictionary LocalSkyReflectionSettings { get; set; } = new Dictionary();
28 | public SButton QuickMenuKey { get; set; } = SButton.R;
29 |
30 | public WaterSettings GetCurrentWaterSettings(GameLocation location)
31 | {
32 | if (location is null || LocalWaterReflectionSettings is null || LocalWaterReflectionSettings.ContainsKey(location.NameOrUniqueName) is false || LocalWaterReflectionSettings[location.NameOrUniqueName] is null || LocalWaterReflectionSettings[location.NameOrUniqueName].OverrideDefaultSettings is false)
33 | {
34 | return WaterReflectionSettings;
35 | }
36 |
37 | return LocalWaterReflectionSettings[location.NameOrUniqueName];
38 | }
39 |
40 | public PuddleSettings GetCurrentPuddleSettings(GameLocation location)
41 | {
42 | if (location is null || LocalPuddleReflectionSettings is null || LocalPuddleReflectionSettings.ContainsKey(location.NameOrUniqueName) is false || LocalPuddleReflectionSettings[location.NameOrUniqueName] is null || LocalPuddleReflectionSettings[location.NameOrUniqueName].OverrideDefaultSettings is false)
43 | {
44 | return PuddleReflectionSettings;
45 | }
46 |
47 | return LocalPuddleReflectionSettings[location.NameOrUniqueName];
48 | }
49 |
50 | public SkySettings GetCurrentSkySettings(GameLocation location)
51 | {
52 | if (location is null || LocalSkyReflectionSettings is null || LocalSkyReflectionSettings.ContainsKey(location.NameOrUniqueName) is false || LocalSkyReflectionSettings[location.NameOrUniqueName] is null || LocalSkyReflectionSettings[location.NameOrUniqueName].OverrideDefaultSettings is false)
53 | {
54 | return SkyReflectionSettings;
55 | }
56 |
57 | return LocalSkyReflectionSettings[location.NameOrUniqueName];
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/DynamicReflections/Framework/Interfaces/IGenericModConfigMenuApi.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.Xna.Framework;
3 | using Microsoft.Xna.Framework.Graphics;
4 | using StardewModdingAPI;
5 | using StardewModdingAPI.Utilities;
6 | using StardewValley;
7 |
8 | namespace DynamicReflections.Framework.Interfaces
9 | {
10 | public interface IGenericModConfigMenuApi
11 | {
12 | void Register(IManifest mod, Action reset, Action save, bool titleScreenOnly = false);
13 | void StartNewPage(IManifest mod, string pageName);
14 | void OverridePageDisplayName(IManifest mod, string pageName, string displayName);
15 |
16 | void RegisterLabel(IManifest mod, string labelName, string labelDesc);
17 | void RegisterPageLabel(IManifest mod, string labelName, string labelDesc, string newPage);
18 | void AddSectionTitle(IManifest mod, Func text, Func tooltip = null);
19 | void AddParagraph(IManifest mod, Func text);
20 | void AddImage(IManifest mod, Func texture, Rectangle? texturePixelArea = null, int scale = Game1.pixelZoom);
21 | void AddPage(IManifest mod, string pageId, Func pageTitle = null);
22 | void AddPageLink(IManifest mod, string pageId, Func text, Func tooltip = null);
23 |
24 | void RegisterSimpleOption(IManifest mod, string optionName, string optionDesc, Func optionGet, Action optionSet);
25 | void AddKeybind(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, string fieldId = null);
26 | void AddTextOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, string[] allowedValues = null, Func formatAllowedValue = null, string fieldId = null);
27 | void AddBoolOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, string fieldId = null);
28 | void AddNumberOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, int? min = null, int? max = null, int? interval = null, Func formatValue = null, string fieldId = null);
29 | void AddNumberOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, float? min = null, float? max = null, float? interval = null, Func formatValue = null, string fieldId = null);
30 |
31 |
32 | void OpenModMenu(IManifest mod);
33 | void RegisterComplexOption(IManifest mod, string optionName, string optionDesc, Func widgetUpdate, Func widgetDraw, Action