Skip to content

Commit eb89f04

Browse files
committed
working on compatibilities
1 parent 99e0961 commit eb89f04

File tree

7 files changed

+1269
-516
lines changed

7 files changed

+1269
-516
lines changed

docs/.vitepress/config.mts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from 'vitepress';
22
import footnote from 'markdown-it-footnote';
33
import taskLists from 'markdown-it-task-lists';
4+
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'
45

56

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

2425
sidebar: [
25-
{ text: 'Getting Started',
26+
{
27+
text: 'Getting Started',
2628
items: [
2729
{ text: 'Setting Up', link: 'getting-started/setting-up' },
28-
{ text: 'Creating a New Pack', link: 'new/new-pack' },
29-
{ text: 'Creating a New Category', link: 'new/new-category' },
30-
{ text: 'Now what?', link: 'getting-started/afterwards' }
30+
]
31+
},
32+
{
33+
text: 'Create a',
34+
items: [
35+
{ text: 'New Pack', link: 'new/new-pack' },
36+
{ text: 'New Category', link: 'new/new-category' },
37+
{ text: 'New Compatibility', link: 'new/new-compatibility' },
3138
]
3239
},
3340
{
@@ -55,7 +62,13 @@ export default defineConfig({
5562
config: (md) => {
5663
md.use(footnote);
5764
md.use(taskLists);
65+
md.use(groupIconMdPlugin);
5866
},
5967
lineNumbers: true
68+
},
69+
vite: {
70+
plugins: [
71+
groupIconVitePlugin()
72+
]
6073
}
6174
})

docs/.vitepress/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { Theme } from 'vitepress'
44
import DefaultTheme from 'vitepress/theme'
55
import './style.css'
66
import Contributors from './components/Contributors.vue';
7+
import 'virtual:group-icons.css';
78

89
export default {
910
extends: DefaultTheme,

docs/getting-started/setting-up.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
prev:
33
text: Home
44
link: index
5-
next:
6-
text: Creating a new Pack
7-
link: new/new-pack
5+
next: false
86
mentions:
97
- NSPC911
108
---
@@ -33,4 +31,4 @@ You will need
3331

3432
That's it!
3533
36-
<Contributors />
34+
<Contributor/>

docs/new/new-category.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ aesthetic.json
5555
Finally, add the category's name inside <kbd>./webUI/app.js</kbd> in two very specific spots.
5656

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

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

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

111111
Search for
112-
```js
112+
```js [webUI/app.js]
113113
const listofcategories
114114
```
115115
- This is a list of the categories currently inside the website.

docs/new/new-compatibility.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
prev:
3+
text: Setting up
4+
link: getting-started/setting-up
5+
next:
6+
text: Creating a new Pack
7+
link: new/new-pack
8+
mentions:
9+
- NSPC911
10+
---
11+
# Creating a new Compatibility
12+
13+
BEComTweaks had just received its overhaulled compatibility handler, so here is a full docs on it
14+
```json [./jsons/packs/compatibility.json]
15+
{
16+
"maxway": 3,
17+
"3way": {
18+
"compatibilities": [
19+
["packid1", "packid2", "packid3"]
20+
],
21+
"locations": [
22+
"compatibility/packid123"
23+
]
24+
},
25+
"2way": {
26+
"compatibilities": [
27+
["packid1", "packid3"]
28+
],
29+
"locations": [
30+
"compatibility/packid13"
31+
]
32+
}
33+
}
34+
```
35+
This is a complicated mess, so I'll try my best to explain this
36+
37+
Firstly, `maxway`.
38+
- What is it?
39+
40+
It specifies the maximum number of seperate packs merging into one for a compatibility
41+
42+
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
43+
44+
Now the next few keys are very important in defining the compatibility
45+
46+
Say we use the example `compatibility.json` from above
47+
48+
`maxway` is set to 3, so there will only be 3way and 2way compatibilities.
49+
50+
If `maxway` is set to 10, there can be 2way to 10way compatibilities set
51+
52+
Now with your choice of n-way, you now need to create two extra objects
53+
54+
Say you want to add a 4 way compatibility while using the example `compatibility.json`
55+
56+
1. Set `maxway` to 4
57+
58+
This allows the pack generator to know the maximum way compatibility possible
59+
60+
2. Create a new key called `4way`
61+
62+
Here is how the key would look like
63+
```json [jsons/packs/compatibility.json]
64+
"2way": {
65+
"compatibilities": [
66+
["packid1", "packid2", "packid3", "packid4"]
67+
],
68+
"locations": [
69+
"compatibility/packid1234"
70+
]
71+
}
72+
```

0 commit comments

Comments
 (0)