Open Pospelove opened 7 months ago
@ellipsis-dev plan
:rocket: | This implementation plan was created by @ellipsis-dev |
---|
Tag me (@ellipsis-dev) in a comment with guidance if you want me to replan or to implement this plan.
Path: skymp5-client/src/sync/appearance.ts
In applyAppearanceCommon
, check isRaceBanned(raceId)
before setting NPC race. Implement isRaceBanned(raceId: number): boolean
to read from config/bannedRaces.json
.
Path: config/bannedRaces.json
Create config/bannedRaces.json
with an array of banned race IDs, e.g., [1, 2, 3]
.
Path: skymp5-client/src/sync/appearance.ts
In isRaceBanned
, use fs.promises.readFile
to read config/bannedRaces.json
. Parse with JSON.parse
. Handle file I/O and JSON errors. Return true
if raceId
is in the parsed array, else false
.
Questions? Check out our documentation. Leave :+1:/:-1: on this plan to give us feedback.
follow up https://github.com/skyrim-multiplayer/skymp/pull/1805