-
Notifications
You must be signed in to change notification settings - Fork 90
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
[Fight For Style] Ajout d'un Show Room et la création de vetement sous forme d'item. #128
Open
DreamXZE
wants to merge
1
commit into
SOZ-Faut-etre-Sub:oss
Choose a base branch
from
DreamXZE:feat/ffs-showroom
base: oss
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
resources/[soz]/soz-core/data/FightForStyleShowRoom/conversion.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Executed with `yarn build-showroom` | ||
const csvtojson = require('csvtojson'); | ||
const fs = require('fs'); | ||
|
||
async function run() { | ||
const showRoomListJSON = await csvtojson().fromFile('./data/FightForStyleShowRoom/showRoomList.csv'); | ||
|
||
const ShowRoomFreeElement = { | ||
mp_m_freemode_01: { | ||
Components: {}, | ||
Props: {}, | ||
}, | ||
mp_f_freemode_01: { | ||
Components: {}, | ||
Props: {}, | ||
}, | ||
}; | ||
|
||
const showRoomClothesList = { | ||
mp_m_freemode_01: { | ||
Components: {}, | ||
Props: {}, | ||
}, | ||
mp_f_freemode_01: { | ||
Components: {}, | ||
Props: {}, | ||
}, | ||
}; | ||
|
||
for (const cloth of showRoomListJSON) { | ||
const clothDrawable = parseInt(cloth.Drawable); | ||
showRoomClothesList[cloth.Model][cloth.Type][cloth.Index] ||= {}; | ||
ShowRoomFreeElement[cloth.Model][cloth.Type][cloth.Index] ||= []; | ||
if (cloth['UseDrawable'] == 'TRUE') { | ||
const clothConfig = []; | ||
for (let i = 0; i <= 25; i++) { | ||
if (cloth['Texture' + i] == 'TRUE') clothConfig.push(i); | ||
} | ||
showRoomClothesList[cloth.Model][cloth.Type][cloth.Index][clothDrawable] = clothConfig; | ||
} | ||
if (cloth['Free'] == 'TRUE') ShowRoomFreeElement[cloth.Model][cloth.Type][cloth.Index].push(clothDrawable); | ||
} | ||
|
||
let string = `export const ShowRoomFreeElement = ${JSON.stringify( | ||
ShowRoomFreeElement, | ||
(k, v) => (Array.isArray(v) ? JSON.stringify(v) : v), | ||
4 | ||
).replace(/"\[[^"\]]*]"/g, r => JSON.stringify(JSON.parse(r)).substr(1).slice(0, -1))};\n\n`; | ||
string += `export const ffsClothConfig = ${JSON.stringify( | ||
showRoomClothesList, | ||
(k, v) => (Array.isArray(v) ? JSON.stringify(v) : v), | ||
4 | ||
).replace(/"\[[^"\]]*]"/g, r => JSON.stringify(JSON.parse(r)).substr(1).slice(0, -1))};\n\n`; | ||
|
||
fs.writeFileSync('./src/shared/FightForStyleShowRoom/ffsClothConfig.ts', string); | ||
} | ||
|
||
run(); |
4,074 changes: 4,074 additions & 0 deletions
4,074
resources/[soz]/soz-core/data/FightForStyleShowRoom/showRoomList.csv
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+33.1 KB
resources/[soz]/soz-core/public/images/items/ffs_crafted_outfit_f.webp
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
il n'y a pas les nouvelles images ? on peut les mettre dans le dossier soz-core/public/images/items en png
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas de nouvelle image à ce moment, je suis pas très bon avec Mid Journey, mais je peux essayer ça
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image ajouté