Skip to content

Commit

Permalink
working on compatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
NSPC911 committed Jan 10, 2025
1 parent 99e0961 commit eb89f04
Show file tree
Hide file tree
Showing 7 changed files with 1,269 additions and 516 deletions.
21 changes: 17 additions & 4 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'vitepress';
import footnote from 'markdown-it-footnote';
import taskLists from 'markdown-it-task-lists';
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'


// https://vitepress.dev/reference/site-config
Expand All @@ -22,12 +23,18 @@ export default defineConfig({
],

sidebar: [
{ text: 'Getting Started',
{
text: 'Getting Started',
items: [
{ text: 'Setting Up', link: 'getting-started/setting-up' },
{ text: 'Creating a New Pack', link: 'new/new-pack' },
{ text: 'Creating a New Category', link: 'new/new-category' },
{ text: 'Now what?', link: 'getting-started/afterwards' }
]
},
{
text: 'Create a',
items: [
{ text: 'New Pack', link: 'new/new-pack' },
{ text: 'New Category', link: 'new/new-category' },
{ text: 'New Compatibility', link: 'new/new-compatibility' },
]
},
{
Expand Down Expand Up @@ -55,7 +62,13 @@ export default defineConfig({
config: (md) => {
md.use(footnote);
md.use(taskLists);
md.use(groupIconMdPlugin);
},
lineNumbers: true
},
vite: {
plugins: [
groupIconVitePlugin()
]
}
})
1 change: 1 addition & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
import Contributors from './components/Contributors.vue';
import 'virtual:group-icons.css';

export default {
extends: DefaultTheme,
Expand Down
6 changes: 2 additions & 4 deletions docs/getting-started/setting-up.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
prev:
text: Home
link: index
next:
text: Creating a new Pack
link: new/new-pack
next: false
mentions:
- NSPC911
---
Expand Down Expand Up @@ -33,4 +31,4 @@ You will need

That's it!
<Contributors />
<Contributor/>
8 changes: 4 additions & 4 deletions docs/new/new-category.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ aesthetic.json
Finally, add the category's name inside <kbd>./webUI/app.js</kbd> in two very specific spots.

Search for
```js
```js [webUI/app.js]
function getSelectedTweaks()
```
- Inside the function, you should see a constant variable called `jsonData` of a dictionary type.
- Add your category name as a key inside the dictionary. This can be in any position

Search for
```js
```js [webUI/app.js]
const listofcategories
```
- This is a list of the categories currently inside the website.
Expand Down Expand Up @@ -102,14 +102,14 @@ The main thing is to have a tab to indicate it is a subcategory!
Finally, add the category's name inside <kbd>./webUI/app.js</kbd> in two very specific spots.

Search for
```js
```js [webUI/app.js]
function getSelectedTweaks()
```
- Inside the function, you should see a constant variable called `jsonData` of a dictionary type.
- Add your category name as a key inside the dictionary. This can be in any position

Search for
```js
```js [webUI/app.js]
const listofcategories
```
- This is a list of the categories currently inside the website.
Expand Down
72 changes: 72 additions & 0 deletions docs/new/new-compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
prev:
text: Setting up
link: getting-started/setting-up
next:
text: Creating a new Pack
link: new/new-pack
mentions:
- NSPC911
---
# Creating a new Compatibility

BEComTweaks had just received its overhaulled compatibility handler, so here is a full docs on it
```json [./jsons/packs/compatibility.json]
{
"maxway": 3,
"3way": {
"compatibilities": [
["packid1", "packid2", "packid3"]
],
"locations": [
"compatibility/packid123"
]
},
"2way": {
"compatibilities": [
["packid1", "packid3"]
],
"locations": [
"compatibility/packid13"
]
}
}
```
This is a complicated mess, so I'll try my best to explain this

Firstly, `maxway`.
- What is it?

It specifies the maximum number of seperate packs merging into one for a compatibility

In Git, merges can be 3way, that is when there are 3 different input streams to merges into 1. This aims to add it similarly to that

Now the next few keys are very important in defining the compatibility

Say we use the example `compatibility.json` from above

`maxway` is set to 3, so there will only be 3way and 2way compatibilities.

If `maxway` is set to 10, there can be 2way to 10way compatibilities set

Now with your choice of n-way, you now need to create two extra objects

Say you want to add a 4 way compatibility while using the example `compatibility.json`

1. Set `maxway` to 4

This allows the pack generator to know the maximum way compatibility possible

2. Create a new key called `4way`

Here is how the key would look like
```json [jsons/packs/compatibility.json]
"2way": {
"compatibilities": [
["packid1", "packid2", "packid3", "packid4"]
],
"locations": [
"compatibility/packid1234"
]
}
```
Loading

0 comments on commit eb89f04

Please sign in to comment.