├── FeatureImage.png
├── CozyClothing
├── ModConfig.cs
├── CozyClothing.csproj
├── manifest.json
├── .vscode
│ └── tasks.json
├── CozyClothing.sln
├── dependencies
│ └── GenericModConfigMenuAPI.cs
└── ModEntry.cs
├── .github
├── workflows
│ └── main.yml
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── LICENSE
├── README.md
├── Release_Process.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
└── .gitignore
/FeatureImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CompSciLauren/stardew-valley-cozy-clothing-mod/main/FeatureImage.png
--------------------------------------------------------------------------------
/CozyClothing/ModConfig.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 |
3 | namespace CozyClothing
4 | {
5 | class ModConfig
6 | {
7 | public string PajamaColor { get; set; }
8 |
9 | public ModConfig()
10 | {
11 | PajamaColor = "Blue";
12 | }
13 |
14 | public void Reset()
15 | {
16 | PajamaColor = "Blue";
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/CozyClothing/CozyClothing.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | CozyClothing
4 | CozyClothing
5 | net6.0
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/CozyClothing/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "Cozy Clothing",
3 | "Author": "CompSciLauren",
4 | "Version": "2.1.0",
5 | "Description": "Character automatically wears pajamas when at home.",
6 | "UniqueID": "CompSciLauren.CozyClothing",
7 | "EntryDll": "CozyClothing.dll",
8 | "MinimumApiVersion": "2.10.0",
9 | "UpdateKeys": [ "Nexus:5093", "GitHub:CompSciLauren/stardew-valley-cozy-clothing-mod" ]
10 | }
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | branches:
4 | - main
5 |
6 | jobs:
7 | contrib-readme-job:
8 | runs-on: ubuntu-latest
9 | name: A job to automate contrib in readme
10 | steps:
11 | - name: Contribute List
12 | uses: akhilmhdh/contributors-readme-action@v2.3.6
13 | env:
14 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Description of Bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **Steps to Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/CozyClothing/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | // See https://go.microsoft.com/fwlink/?LinkId=733558
3 | // for the documentation about the tasks.json format
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "label": "build",
8 | "command": "dotnet",
9 | "type": "shell",
10 | "args": [
11 | "build",
12 | // Ask dotnet build to generate full paths for file names.
13 | "/property:GenerateFullPaths=true",
14 | // Do not generate summary otherwise it leads to duplicate errors in Problems panel
15 | "/consoleloggerparameters:NoSummary"
16 | ],
17 | "group": "build",
18 | "presentation": {
19 | "reveal": "silent"
20 | },
21 | "problemMatcher": "$msCompile"
22 | }
23 | ]
24 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Lauren Stephenson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/CozyClothing/CozyClothing.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.779
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CozyClothing", "CozyClothing.csproj", "{97013803-1EFA-4AC0-A63D-1B23A640FDDA}"
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 | {97013803-1EFA-4AC0-A63D-1B23A640FDDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {97013803-1EFA-4AC0-A63D-1B23A640FDDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {97013803-1EFA-4AC0-A63D-1B23A640FDDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {97013803-1EFA-4AC0-A63D-1B23A640FDDA}.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 = {ED3500E5-139A-43D5-9B26-28DA5FCDE3CA}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # Cozy Clothing v2.0.0
6 |
7 | > A Stardew Valley mod that adds automatically changes your character's clothing to pajamas when at home.
8 |
9 | Releases can be found at the following websites:
10 |
11 | - [NexusMods](https://www.nexusmods.com/stardewvalley/mods/5093)
12 | - [Chucklefish](https://community.playstarbound.com/resources/cozy-clothing.5951/)
13 | - [CurseForge](https://www.curseforge.com/stardewvalley/mods/cozy-clothing)
14 | - [ModDrop](https://www.moddrop.com/stardew-valley/mods/755868-cozy-clothing)
15 |
16 | ## Features
17 |
18 | - Character automatically wears pajamas when inside the Farm House. You can choose which color of pajamas to wear in the Config!
19 |
20 | ## Installation
21 |
22 | 1. [Install the latest version of SMAPI](https://smapi.io/).
23 | 3. Download this mod and unzip it into Stardew Valley/Mods.
24 | 4. Run the game using SMAPI.
25 |
26 | ## Compatibility
27 |
28 | - Works with Stardew Valley 1.4 or later on Linux/Mac/Windows.
29 | - Works in both singleplayer and multiplayer.
30 | - Not compatible with Get Glam mod. Using both mods may lead to unexpected behavior. When this has been fixed, this warning will be removed. Thank you for your patience!
31 |
32 | ## Config
33 |
34 | | Configuration Description | Setting Options | Default Setting |
35 | | -------------------------------------------------------- | -------- | -------- |
36 | | PajamaColor | Blue, Water-Blue, Pink, Purple, Green | Blue |
37 |
38 | ## Contributors
39 |
40 |
41 |
51 |
52 |
53 | If you're interested in contributing, please see [Contributing.md](./CONTRIBUTING.md). Thanks!
54 |
--------------------------------------------------------------------------------
/Release_Process.md:
--------------------------------------------------------------------------------
1 | # Release Process
2 |
3 | This outlines the general release process that I (CompSciLauren) do with each new production release. If you are contributing to this project, you don't need to worry about this, but feel free to read on if you're curious. This file exists simply for documentation purposes.
4 |
5 | ## Project Management
6 |
7 | Story board for tracking what's being worked on or planned to be worked on can be found here: https://github.com/users/CompSciLauren/projects/5/views/1
8 |
9 | This mainly just tracks whatever I happen to be doing, and not really used for tracking what anyone else is potentially contributing.
10 |
11 | ## Branching Strategy
12 |
13 | ### Branches
14 |
15 | * main - production-ready branch
16 | * development - testing branch
17 | * CC-123 - individual story branch naming convention (where `123` is the GitHub Issue being worked on)
18 |
19 | ### General Process
20 |
21 | This is the process I usually follow.
22 |
23 | 1. Checkout new branch, `main` --> `CC-123` // create a new branch
24 | 2. Add the code changes. Commit messages are structured like "CC-123 Add the thing" (message should be accurate high level description of the changes in the commit)
25 | 3. Merge branch, `CC-123` --> `development` // merge into dev branch for testing
26 | 4. Create PR, `CC-123` --> `main` // after completed test, can merge into production-ready branch
27 | 5. Merge `main` back into `development` branch // after doing the release is finished
28 |
29 | Note: Once a story is merged to `main` branch, GitHub Issue is closed, since it will be included in the next release.
30 |
31 | ## Doing the Release
32 |
33 | Here are the steps for the release. Note the file used for the release is found in the project bin folder, looks like `CozyClothing 2.0.0.zip`.
34 |
35 | - [x] All code changes intended to be released are merged to `main` branch
36 | - [x] Includes correct version in [manifest.json](./CozyClothing/manifest.json) file. (Follows [semver](https://semver.org/) versioning standard)
37 | - [x] GitHub Issues that are addressed by PRs merged to `main` are closed.
38 | - [x] Draft a new Nexus Article with release notes
39 | - [x] [Publish a New GitHub Release](https://github.com/CompSciLauren/stardew-valley-cozy-clothing-mod/releases/new)
40 | - [x] Publish new version on Nexus
41 | - [x] Include updating changelog
42 | - [x] Note on file upload: Replace existing file and do NOT select "Remove the previous version after this file has been successfully uploaded", that way the file being replaced will show up under the "Old versions" section.
43 | - [x] Publish Nexus Article with release notes
44 | - [x] Publish new version on the other mod sites (including changelog)
45 | - [x] [Chucklefish](https://community.playstarbound.com/resources/cozy-clothing.5953/)
46 | - [x] [CurseForge](https://www.curseforge.com/stardewvalley/mods/cozy-clothing)
47 | - [x] [ModDrop](https://www.moddrop.com/stardew-valley/mods/755868-cozy-clothing)
48 | - [x] Respond to any related Nexus bug reports and comments
49 | - [x] Add a comment about the release to SDV Discord in #modded-farmers channel
50 | - [x] Remember to include a picture (can use main cover photo from Nexus site)
51 | - [x] Right click the comment --> Apps --> Publish, to have it be posted in #mod-showcase channel
52 | - [x] Merge `main` back into `development` branch
53 | - [x] Delete branches associated with released changes
54 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, gender identity and expression, level of experience,
9 | nationality, personal appearance, race, religion, or sexual identity and
10 | orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | - Using welcoming and inclusive language
18 | - Being respectful of differing viewpoints and experiences
19 | - Gracefully accepting constructive criticism
20 | - Focusing on what is best for the community
21 | - Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | - The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | - Trolling, insulting/derogatory comments, and personal or political attacks
28 | - Public or private harassment
29 | - Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | - Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project owner at compscilauren@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project owner is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at [http://contributor-covenant.org/version/1/4][version]
72 |
73 | [homepage]: http://contributor-covenant.org
74 | [version]: http://contributor-covenant.org/version/1/4/
75 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Get started contributing!
2 |
3 | :+1::tada: Thanks for your time! :tada::+1:
4 |
5 | These are a set of guidelines, not rules, for contributing to this project. Use
6 | your best judgment and feel free to propose changes to anything in this project
7 | (including this document)!
8 |
9 | ## Got improvements?
10 |
11 | * Fork this project and implement the changes you want to make.
12 | * Open a new [pull request](../../pull/new) with the change.
13 |
14 | Notes:
15 |
16 | * This project uses [Issues](../../issues) to track all feature requests and bug reports. If you're looking for ways to contribute, please feel free to work on any of the open Issues! Just leave a comment on the Issue to let everyone know that you're working on it, so that people don't accidentally work on the same thing without realizing.
17 | * We use the [Contribute List](https://github.com/marketplace/actions/contribute-list) GitHub Action to help make sure we give credit to everyone who helps make this mod better! After your contribution is merged to the `main` branch, a bot will create a PR to add your name (if not already present) and we will get it merged. :)
18 |
19 | ## Want to report a bug or propose a new feature?
20 |
21 | * **Ensure it was not already reported** by searching under [Issues](../../issues).
22 |
23 | * If you're unable to find an open issue addressing the problem, [open a new one](../../issues/new/choose).
24 |
25 | ## Want to help test new releases?
26 |
27 | To help test out new releases, check on [Nexus](https://www.nexusmods.com/stardewvalley/mods/5093?tab=files) to see if there is a new pre-release version available for download, and just try it out! If you discover any problems, please let us know. You can send a Discord message, create a GitHub Issue, or comment/report on the Nexus site.
28 |
29 | If you end up doing this for any pre-release version, please let me know! I'd love to include you in the Contributors list on the README page. :)
30 |
31 | For questions or comments, you can also send a message to @compscilauren on Discord.
32 |
33 | ## Project Setup Guide
34 |
35 | Read this if you are new or need a refresher on working on Stardew Valley mods.
36 |
37 | Official Stardew Valley Getting Started Guide: https://stardewvalleywiki.com/Modding:Modder_Guide/Get_Started
38 |
39 | The aboved guide explains the basics of setting up a mod in more detail.
40 |
41 | Generally, you'll follow these steps:
42 |
43 | 1. Download [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/)
44 | 2. Download [SMAPI](https://www.nexusmods.com/stardewvalley/mods/2400)
45 | 3. Fork this repo on GitHub
46 | 4. Open this project in Visual Studio.
47 | * Launch Visual Studio --> Select "Open a Project or Solution" --> Click into project wherever you downloaded it to, should be called "stardew-valley-cozy-clothing-mod" --> Click into "CozyClothing" folder --> Click into "CozyClothing.sln"
48 | 5. Build Solution
49 | * Click "Build" --> "Build Solution"
50 | 6. Launch Stardew Valley, game should load without errors and the mod should work as expected (player is wearing pajamas inside Farm House and regular clothes outside of the Farm House).
51 | * Click "Debug" --> "Start Debugging"
52 |
53 | If you encounter problems, see [Troubleshooting](#Troubleshooting) section.
54 |
55 | ## Helpful Resources
56 |
57 | Here are any resources that you might find particularly useful for working on this mod:
58 |
59 | * Official Stardew Valley General Modding Resources: https://stardewvalleywiki.com/Modding:Index
60 | * SMAPI API Documentation: https://stardewvalleywiki.com/Modding:Modder_Guide/APIs
61 | * Testing and Troubleshooting: https://stardewvalleywiki.com/Modding:Modder_Guide/Test_and_Troubleshoot#Testing_on_all_platforms
62 |
63 | ## Code of Conduct
64 |
65 | By participating, you are expected to uphold the [code of
66 | conduct](CODE_OF_CONDUCT.md).
67 |
68 | Please report unacceptable behavior.
69 |
70 | ## Thank you!
71 |
72 | ## Troubleshooting
73 |
74 | Common problems are documented here. If you don't see your problem here and need help, feel free to post an Issue or send a message (on Discord at @compscilauren).
75 |
76 | ### Build Errors in Visual Studio
77 |
78 | There should be 0 build errors on the main branch. If you encounter any, you might try:
79 |
80 | * Clean Solution, then Build Solution
81 | * Project --> CozyClothing Properties, "Target framework" needs to be set to `.NET 6.0` (as of SDV v1.6)
82 | * Project --> Manage NuGet Packages... --> In the upper-right corner, "Package source" needs to be set to `nuget.org`
83 | * Project --> Manage NuGet Packages... --> Installed tab should show the packages mentioned in the [CozyClothing.csproj](./CozyClothing/CozyClothing.csproj) file.
84 | * The above should most likely resolve any issues, but if there are still errors, you might also try:
85 | * In Solution Explorer, right Click on "CozyClothing" --> "Load Entire Dependency Tree of Project"
86 | * In Solution Explorer, right Click on "CozyClothing" --> "Unload Project"
87 | * In Solution Explorer, right Click on "CozyClothing" --> "Reload Project With Dependencies"
88 | * Clean Solution
89 | * Build Solution
90 |
--------------------------------------------------------------------------------
/.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 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015/2017 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # Visual Studio 2017 auto generated files
33 | Generated\ Files/
34 |
35 | # MSTest test Results
36 | [Tt]est[Rr]esult*/
37 | [Bb]uild[Ll]og.*
38 |
39 | # NUNIT
40 | *.VisualState.xml
41 | TestResult.xml
42 |
43 | # Build Results of an ATL Project
44 | [Dd]ebugPS/
45 | [Rr]eleasePS/
46 | dlldata.c
47 |
48 | # Benchmark Results
49 | BenchmarkDotNet.Artifacts/
50 |
51 | # .NET Core
52 | project.lock.json
53 | project.fragment.lock.json
54 | artifacts/
55 | **/Properties/launchSettings.json
56 |
57 | # StyleCop
58 | StyleCopReport.xml
59 |
60 | # Files built by Visual Studio
61 | *_i.c
62 | *_p.c
63 | *_i.h
64 | *.ilk
65 | *.meta
66 | *.obj
67 | *.iobj
68 | *.pch
69 | *.pdb
70 | *.ipdb
71 | *.pgc
72 | *.pgd
73 | *.rsp
74 | *.sbr
75 | *.tlb
76 | *.tli
77 | *.tlh
78 | *.tmp
79 | *.tmp_proj
80 | *.log
81 | *.vspscc
82 | *.vssscc
83 | .builds
84 | *.pidb
85 | *.svclog
86 | *.scc
87 |
88 | # Chutzpah Test files
89 | _Chutzpah*
90 |
91 | # Visual C++ cache files
92 | ipch/
93 | *.aps
94 | *.ncb
95 | *.opendb
96 | *.opensdf
97 | *.sdf
98 | *.cachefile
99 | *.VC.db
100 | *.VC.VC.opendb
101 |
102 | # Visual Studio profiler
103 | *.psess
104 | *.vsp
105 | *.vspx
106 | *.sap
107 |
108 | # Visual Studio Trace Files
109 | *.e2e
110 |
111 | # TFS 2012 Local Workspace
112 | $tf/
113 |
114 | # Guidance Automation Toolkit
115 | *.gpState
116 |
117 | # ReSharper is a .NET coding add-in
118 | _ReSharper*/
119 | *.[Rr]e[Ss]harper
120 | *.DotSettings.user
121 |
122 | # JustCode is a .NET coding add-in
123 | .JustCode
124 |
125 | # TeamCity is a build add-in
126 | _TeamCity*
127 |
128 | # DotCover is a Code Coverage Tool
129 | *.dotCover
130 |
131 | # AxoCover is a Code Coverage Tool
132 | .axoCover/*
133 | !.axoCover/settings.json
134 |
135 | # Visual Studio code coverage results
136 | *.coverage
137 | *.coveragexml
138 |
139 | # NCrunch
140 | _NCrunch_*
141 | .*crunch*.local.xml
142 | nCrunchTemp_*
143 |
144 | # MightyMoose
145 | *.mm.*
146 | AutoTest.Net/
147 |
148 | # Web workbench (sass)
149 | .sass-cache/
150 |
151 | # Installshield output folder
152 | [Ee]xpress/
153 |
154 | # DocProject is a documentation generator add-in
155 | DocProject/buildhelp/
156 | DocProject/Help/*.HxT
157 | DocProject/Help/*.HxC
158 | DocProject/Help/*.hhc
159 | DocProject/Help/*.hhk
160 | DocProject/Help/*.hhp
161 | DocProject/Help/Html2
162 | DocProject/Help/html
163 |
164 | # Click-Once directory
165 | publish/
166 |
167 | # Publish Web Output
168 | *.[Pp]ublish.xml
169 | *.azurePubxml
170 | # Note: Comment the next line if you want to checkin your web deploy settings,
171 | # but database connection strings (with potential passwords) will be unencrypted
172 | *.pubxml
173 | *.publishproj
174 |
175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
176 | # checkin your Azure Web App publish settings, but sensitive information contained
177 | # in these scripts will be unencrypted
178 | PublishScripts/
179 |
180 | # NuGet Packages
181 | *.nupkg
182 | # The packages folder can be ignored because of Package Restore
183 | **/[Pp]ackages/*
184 | # except build/, which is used as an MSBuild target.
185 | !**/[Pp]ackages/build/
186 | # Uncomment if necessary however generally it will be regenerated when needed
187 | #!**/[Pp]ackages/repositories.config
188 | # NuGet v3's project.json files produces more ignorable files
189 | *.nuget.props
190 | *.nuget.targets
191 |
192 | # Microsoft Azure Build Output
193 | csx/
194 | *.build.csdef
195 |
196 | # Microsoft Azure Emulator
197 | ecf/
198 | rcf/
199 |
200 | # Windows Store app package directories and files
201 | AppPackages/
202 | BundleArtifacts/
203 | Package.StoreAssociation.xml
204 | _pkginfo.txt
205 | *.appx
206 |
207 | # Visual Studio cache files
208 | # files ending in .cache can be ignored
209 | *.[Cc]ache
210 | # but keep track of directories ending in .cache
211 | !*.[Cc]ache/
212 |
213 | # Others
214 | ClientBin/
215 | ~$*
216 | *~
217 | *.dbmdl
218 | *.dbproj.schemaview
219 | *.jfm
220 | *.pfx
221 | *.publishsettings
222 | orleans.codegen.cs
223 |
224 | # Including strong name files can present a security risk
225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
226 | #*.snk
227 |
228 | # Since there are multiple workflows, uncomment next line to ignore bower_components
229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
230 | #bower_components/
231 |
232 | # RIA/Silverlight projects
233 | Generated_Code/
234 |
235 | # Backup & report files from converting an old project file
236 | # to a newer Visual Studio version. Backup files are not needed,
237 | # because we have git ;-)
238 | _UpgradeReport_Files/
239 | Backup*/
240 | UpgradeLog*.XML
241 | UpgradeLog*.htm
242 | ServiceFabricBackup/
243 | *.rptproj.bak
244 |
245 | # SQL Server files
246 | *.mdf
247 | *.ldf
248 | *.ndf
249 |
250 | # Business Intelligence projects
251 | *.rdl.data
252 | *.bim.layout
253 | *.bim_*.settings
254 | *.rptproj.rsuser
255 |
256 | # Microsoft Fakes
257 | FakesAssemblies/
258 |
259 | # GhostDoc plugin setting file
260 | *.GhostDoc.xml
261 |
262 | # Node.js Tools for Visual Studio
263 | .ntvs_analysis.dat
264 | node_modules/
265 |
266 | # Visual Studio 6 build log
267 | *.plg
268 |
269 | # Visual Studio 6 workspace options file
270 | *.opt
271 |
272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
273 | *.vbw
274 |
275 | # Visual Studio LightSwitch build output
276 | **/*.HTMLClient/GeneratedArtifacts
277 | **/*.DesktopClient/GeneratedArtifacts
278 | **/*.DesktopClient/ModelManifest.xml
279 | **/*.Server/GeneratedArtifacts
280 | **/*.Server/ModelManifest.xml
281 | _Pvt_Extensions
282 |
283 | # Paket dependency manager
284 | .paket/paket.exe
285 | paket-files/
286 |
287 | # FAKE - F# Make
288 | .fake/
289 |
290 | # JetBrains Rider
291 | .idea/
292 | *.sln.iml
293 |
294 | # CodeRush
295 | .cr/
296 |
297 | # Python Tools for Visual Studio (PTVS)
298 | __pycache__/
299 | *.pyc
300 |
301 | # Cake - Uncomment if you are using it
302 | # tools/**
303 | # !tools/packages.config
304 |
305 | # Tabs Studio
306 | *.tss
307 |
308 | # Telerik's JustMock configuration file
309 | *.jmconfig
310 |
311 | # BizTalk build output
312 | *.btp.cs
313 | *.btm.cs
314 | *.odx.cs
315 | *.xsd.cs
316 |
317 | # OpenCover UI analysis results
318 | OpenCover/
319 |
320 | # Azure Stream Analytics local run output
321 | ASALocalRun/
322 |
323 | # MSBuild Binary and Structured Log
324 | *.binlog
325 |
326 | # NVidia Nsight GPU debugger configuration file
327 | *.nvuser
328 |
329 | # MFractors (Xamarin productivity tool) working folder
330 | .mfractor/
331 |
332 | # Misc
333 | .DS_Store
--------------------------------------------------------------------------------
/CozyClothing/dependencies/GenericModConfigMenuAPI.cs:
--------------------------------------------------------------------------------
1 | using StardewModdingAPI;
2 | using System;
3 |
4 | namespace CozyClothing
5 | {
6 |
7 | public interface GenericModConfigMenuAPI
8 | {
9 | /// Register a mod whose config can be edited through the UI.
10 | /// The mod's manifest.
11 | /// Reset the mod's config to its default values.
12 | /// Save the mod's current config to the config.json file.
13 | /// Whether the options can only be edited from the title screen.
14 | /// Each mod can only be registered once, unless it's deleted via before calling this again.
15 | void Register(IManifest mod, Action reset, Action save, bool titleScreenOnly = false);
16 |
17 | /****
18 | ** Multi-page management
19 | ****/
20 | /// Start a new page in the mod's config UI, or switch to that page if it already exists. All options registered after this will be part of that page.
21 | /// The mod's manifest.
22 | /// The unique page ID.
23 | /// The page title shown in its UI, or null to show the value.
24 | /// You must also call to make the page accessible. This is only needed to set up a multi-page config UI. If you don't call this method, all options will be part of the mod's main config UI instead.
25 | void AddPage(IManifest mod, string pageId, Func pageTitle = null);
26 |
27 | /// Add a link to a page added via at the current position in the form.
28 | /// The mod's manifest.
29 | /// The unique ID of the page to open when the link is clicked.
30 | /// The link text shown in the form.
31 | /// The tooltip text shown when the cursor hovers on the link, or null to disable the tooltip.
32 | void AddPageLink(IManifest mod, string pageId, Func text, Func tooltip = null);
33 |
34 | /// Add a section title at the current position in the form.
35 | /// The mod's manifest.
36 | /// The title text shown in the form.
37 | /// The tooltip text shown when the cursor hovers on the title, or null to disable the tooltip.
38 | void AddSectionTitle(IManifest mod, Func text, Func tooltip = null);
39 |
40 | /// Add a paragraph of text at the current position in the form.
41 | /// The mod's manifest.
42 | /// The paragraph text to display.
43 | void AddParagraph(IManifest mod, Func text);
44 |
45 | /// Add a boolean option at the current position in the form.
46 | /// The mod's manifest.
47 | /// Get the current value from the mod config.
48 | /// Set a new value in the mod config.
49 | /// The label text to show in the form.
50 | /// The tooltip text shown when the cursor hovers on the field, or null to disable the tooltip.
51 | /// The unique field ID for use with , or null to auto-generate a randomized ID.
52 | void AddBoolOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, string fieldId = null);
53 |
54 | /// Add an integer option at the current position in the form.
55 | /// The mod's manifest.
56 | /// Get the current value from the mod config.
57 | /// Set a new value in the mod config.
58 | /// The label text to show in the form.
59 | /// The tooltip text shown when the cursor hovers on the field, or null to disable the tooltip.
60 | /// The minimum allowed value, or null to allow any.
61 | /// The maximum allowed value, or null to allow any.
62 | /// The interval of values that can be selected.
63 | /// Get the display text to show for a value, or null to show the number as-is.
64 | /// The unique field ID for use with , or null to auto-generate a randomized ID.
65 | 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);
66 |
67 | /// Add a float option at the current position in the form.
68 | /// The mod's manifest.
69 | /// Get the current value from the mod config.
70 | /// Set a new value in the mod config.
71 | /// The label text to show in the form.
72 | /// The tooltip text shown when the cursor hovers on the field, or null to disable the tooltip.
73 | /// The minimum allowed value, or null to allow any.
74 | /// The maximum allowed value, or null to allow any.
75 | /// The interval of values that can be selected.
76 | /// Get the display text to show for a value, or null to show the number as-is.
77 | /// The unique field ID for use with , or null to auto-generate a randomized ID.
78 | 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);
79 |
80 | /// Add a string option at the current position in the form.
81 | /// The mod's manifest.
82 | /// Get the current value from the mod config.
83 | /// Set a new value in the mod config.
84 | /// The label text to show in the form.
85 | /// The tooltip text shown when the cursor hovers on the field, or null to disable the tooltip.
86 | /// The values that can be selected, or null to allow any.
87 | /// Get the display text to show for a value from , or null to show the values as-is.
88 | /// The unique field ID for use with , or null to auto-generate a randomized ID.
89 | void AddTextOption(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, string[] allowedValues = null, Func formatAllowedValue = null, string fieldId = null);
90 |
91 | /// Add a key binding at the current position in the form.
92 | /// The mod's manifest.
93 | /// Get the current value from the mod config.
94 | /// Set a new value in the mod config.
95 | /// The label text to show in the form.
96 | /// The tooltip text shown when the cursor hovers on the field, or null to disable the tooltip.
97 | /// The unique field ID for use with , or null to auto-generate a randomized ID.
98 | void AddKeybind(IManifest mod, Func getValue, Action setValue, Func name, Func tooltip = null, string fieldId = null);
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/CozyClothing/ModEntry.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Xna.Framework;
2 | using StardewModdingAPI;
3 | using StardewModdingAPI.Events;
4 | using StardewValley;
5 |
6 | namespace CozyClothing
7 | {
8 | /// The mod entry point.
9 | public class ModEntry : Mod
10 | {
11 | /// The mod configuration from the player.
12 | private ModConfig Config;
13 |
14 | private bool currentlyInPajamas = false;
15 |
16 | // previous clothes
17 | private string previousShirt;
18 | private string previousPantStyle;
19 | private Color previousPantsColor;
20 | private string previousShoeColor;
21 |
22 | /// The mod entry point, called after the mod is first loaded.
23 | /// Provides simplified APIs for writing mods.
24 | public override void Entry(IModHelper helper)
25 | {
26 | Config = Helper.ReadConfig();
27 | Helper.Events.GameLoop.SaveLoaded += OnSaveLoaded;
28 | Helper.Events.GameLoop.ReturnedToTitle += OnReturnedToTitle;
29 | Helper.Events.GameLoop.GameLaunched += OnGameLaunched;
30 | }
31 |
32 | /// Raised after the game is launched, right before the first update tick.
33 | /// The event sender.
34 | /// The event data.
35 | private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
36 | {
37 | // add Generic Mod Config Menu integration
38 | var gmcm = this.Helper.ModRegistry.Get("spacechase0.GenericModConfigMenu");
39 | if (gmcm is null)
40 | {
41 | this.Monitor.Log("Generic Mod Config Menu not found - config menu will not be available", LogLevel.Debug);
42 | return;
43 | }
44 |
45 | var gmcmApi = Helper.ModRegistry.GetApi("spacechase0.GenericModConfigMenu");
46 | if (gmcmApi != null)
47 | {
48 | gmcmApi.Register(ModManifest, Config.Reset, () => Helper.WriteConfig(Config));
49 |
50 | gmcmApi.AddSectionTitle(ModManifest, () => "Pajama Settings");
51 |
52 | gmcmApi.AddTextOption(
53 | mod: ModManifest,
54 | getValue: () => Config.PajamaColor,
55 | setValue: (string val) => Config.PajamaColor = val,
56 | name: () => "Pajama Color",
57 | tooltip: () => "Choose the color of your pajamas",
58 | allowedValues: new string[] { "Blue", "Water-Blue", "Pink", "Purple", "Green" },
59 | formatAllowedValue: (string val) => val
60 | );
61 |
62 | Monitor.Log("Added \"CozyClothing\" config menu with \"Generic Mod Config Menu\".", LogLevel.Info);
63 | }
64 | }
65 |
66 | /// Raised after the save file is loaded.
67 | /// The event sender.
68 | /// The event data.
69 | private void OnSaveLoaded(object sender, SaveLoadedEventArgs e)
70 | {
71 | Helper.Events.GameLoop.DayStarted += OnDayStarted;
72 | Helper.Events.Player.Warped += OnWarped;
73 | Helper.Events.GameLoop.DayEnding += OnDayEnding;
74 | }
75 |
76 | /// Raised after the player returns to the title screen.
77 | /// The event sender.
78 | /// The event data.
79 | private void OnReturnedToTitle(object sender, ReturnedToTitleEventArgs e)
80 | {
81 | Helper.Events.GameLoop.DayStarted -= OnDayStarted;
82 | Helper.Events.Player.Warped -= OnWarped;
83 | Helper.Events.GameLoop.DayEnding -= OnDayEnding;
84 |
85 | if (currentlyInPajamas)
86 | {
87 | ChangeIntoRegularClothes();
88 | }
89 | }
90 |
91 | /// Raised after the day has started.
92 | /// The event sender.
93 | /// The event data.
94 | private void OnDayStarted(object sender, DayStartedEventArgs e)
95 | {
96 | if (Game1.currentLocation is StardewValley.Locations.FarmHouse)
97 | {
98 | if (IsWeddingScheduledForToday() && currentlyInPajamas)
99 | {
100 | ChangeIntoRegularClothes();
101 | } else if (!IsWeddingScheduledForToday() && !currentlyInPajamas)
102 | {
103 | ChangeIntoPajamas();
104 | }
105 | }
106 | }
107 |
108 | /// Raised after the day is ending.
109 | /// The event sender.
110 | /// The event data.
111 | private void OnDayEnding(object sender, DayEndingEventArgs e)
112 | {
113 | if (currentlyInPajamas && Game1.currentLocation is StardewValley.Locations.FarmHouse)
114 | {
115 | ChangeIntoRegularClothes();
116 | }
117 | }
118 |
119 | /// Raised after the player enters a new location.
120 | /// The event sender.
121 | /// The event data.
122 | private void OnWarped(object sender, WarpedEventArgs e)
123 | {
124 | if (e.NewLocation is Farm && e.OldLocation is StardewValley.Locations.FarmHouse && currentlyInPajamas)
125 | {
126 | ChangeIntoRegularClothes();
127 | }
128 | else if (e.NewLocation is StardewValley.Locations.FarmHouse && e.OldLocation is Farm && !currentlyInPajamas)
129 | {
130 | ChangeIntoPajamas();
131 | }
132 | }
133 |
134 | /// Removes pajamas and replaces them with previously worn clothes.
135 | private void ChangeIntoRegularClothes()
136 | {
137 | // Change out of pajamas and back into previous clothes
138 | Game1.player.changeShirt(previousShirt);
139 | Game1.player.changePantStyle(previousPantStyle);
140 | Game1.player.changePantsColor(previousPantsColor);
141 | Game1.player.changeShoeColor(previousShoeColor);
142 |
143 | currentlyInPajamas = false;
144 | }
145 |
146 | /// Removes current clothes and replaces them with pajamas.
147 | private void ChangeIntoPajamas()
148 | {
149 | // save current clothes to change back into later
150 | previousShirt = Game1.player.shirt.Value;
151 | previousPantStyle = Game1.player.pants.Value;
152 | previousPantsColor = Game1.player.pantsColor.Value;
153 | previousShoeColor = Game1.player.shoes.Value;
154 |
155 | // change current clothes to be pajamas
156 | Game1.player.changePantStyle("0");
157 | Game1.player.changeShoeColor("4");
158 |
159 | switch (Config.PajamaColor)
160 | {
161 | case "Pink":
162 | Game1.player.changeShirt("1036");
163 | Game1.player.changePantsColor(Color.PaleVioletRed);
164 | break;
165 | case "Purple":
166 | Game1.player.changeShirt("1040");
167 | Game1.player.changePantsColor(Color.MediumPurple);
168 | break;
169 | case "Green":
170 | Game1.player.changeShirt("1096");
171 | Game1.player.changePantsColor(Color.LimeGreen);
172 | break;
173 | case "Water-Blue":
174 | Game1.player.changeShirt("1105");
175 | Game1.player.changePantsColor(Color.RoyalBlue);
176 | break;
177 | case "Blue":
178 | default:
179 | Game1.player.changeShirt("1009");
180 | Game1.player.changePantsColor(Color.DarkTurquoise);
181 | Game1.player.changeShoeColor("6");
182 | break;
183 | }
184 |
185 | currentlyInPajamas = true;
186 | }
187 |
188 | /// Checks if a wedding is occurring.
189 | /// True if a wedding is occurring, false otherwise.
190 | private bool IsWeddingScheduledForToday()
191 | {
192 | if (Game1.CurrentEvent is not null && Game1.CurrentEvent.isWedding)
193 | {
194 | return true;
195 | }
196 |
197 | return false;
198 | }
199 | }
200 | }
201 |
--------------------------------------------------------------------------------