Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the template more modular #47

Open
wants to merge 2 commits into
base: 2024.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2024.2
* Adds support for [Parent=""] attributes
* Makes the New Mod template modular, allowing you to select the components you want included in your mod

## 2024.1
* Built for 2024.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,38 @@
"isRequired": "false",
"defaultValue": ""
},
"PublisherPlus": {
"type": "parameter",
"datatype": "bool",
"displayName": "Include a PublisherPlus config",
"description": "If enabled, a PublisherPlus config file will be included in the mod",
"isRequired": "false",
"defaultValue": "true"
},
"CSharp": {
"type": "parameter",
"datatype": "bool",
"displayName": "Add a C# Project and Sources",
"description": "If enabled, this mod will be created with a .sln file, Sources folder and a csproj file",
"isRequired": "false",
"defaultValue": "true"
},
"XML": {
"type": "parameter",
"datatype": "bool",
"displayName": "Add a Defs folder with a starting XML file",
"description": "If enabled, this mod will be created with a Defs folder and a starting XML file",
"isRequired": "false",
"defaultValue": "true"
},
"Languages": {
"type": "parameter",
"datatype": "bool",
"displayName": "Add a Languages folder",
"description": "If enabled, this mod will be created with a Languages folder with a starting English.xml file",
"isRequired": "false",
"defaultValue": "true"
},
"AssemblyDir": {
"type": "derived",
"valueSource": "RimworldDLL",
Expand All @@ -64,11 +96,22 @@
{
"type": "conditional",
"configuration": {
"if": [ "<!--#if" ],
"else": [ "#else", "<!--#else" ],
"elseif": [ "#elseif", "<!--#elseif" ],
"endif": [ "#endif", "<!--#endif" ],
"trim" : "true",
"if": [
"<!--#if"
],
"else": [
"#else",
"<!--#else"
],
"elseif": [
"#elseif",
"<!--#elseif"
],
"endif": [
"#endif",
"<!--#endif"
],
"trim": "true",
"wholeLine": "true"
}
}
Expand All @@ -82,6 +125,28 @@
"replacement": "$1"
}
},
"sources": [
{
"modifiers": [
{
"condition": "PublisherPlus == false",
"exclude": ["_PublisherPlus.xml"]
},
{
"condition": "CSharp == false",
"exclude": ["Source/**/*"]
},
{
"condition": "XML == false",
"exclude": ["Defs/**/*"]
},
{
"condition": "Languages == false",
"exclude": ["Languages/**/*"]
}
]
}
],
"primaryOutputs": [
{
"path": "About/About.xml"
Expand Down Expand Up @@ -120,9 +185,11 @@
},
{
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [{
"text": "Run 'dotnet restore'"
}],
"manualInstructions": [
{
"text": "Run 'dotnet restore'"
}
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
}
Expand Down
1 change: 1 addition & 0 deletions src/rider/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ in your mods!</p>
<![CDATA[
<p><ul>
<li>Add support for Parent="" referencesin XML defs</li>
<li>Makes the New Mod template modular, allowing you to select the components you want included in your mod</li>
</ul></p>
]]>
</change-notes>
Expand Down