Skip to content

Commit

Permalink
feat: moving clothing and prop keys to shared (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
isereb authored Oct 7, 2024
1 parent 10b8f50 commit cff385f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
23 changes: 1 addition & 22 deletions src/main/server/player/clothing.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
import * as alt from 'alt-server';
import { useCharacter } from '@Server/document/character.js';
import {Character, ClothingComponent} from '@Shared/types/index.js';
import { ClothingKey, PropKey } from '@Shared/data/clothingKeys.js';

const fModel = alt.hash('mp_f_freemode_01');
const mModel = alt.hash(`mp_m_freemode_01`);

const ClothingKey = {
head: 0,
mask: 1,
torso: 3,
legs: 4,
bag: 5,
shoes: 6,
accessories: 7,
undershirts: 8,
bodyarmor: 9,
decals: 10,
tops: 11,
};

const PropKey = {
hat: 0,
glasses: 1,
ears: 2,
watch: 6,
bracelet: 7,
};

let femaleClothes = {
0: 1, // mask
3: 15, // torso
Expand Down
21 changes: 21 additions & 0 deletions src/main/shared/data/clothingKeys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export const ClothingKey = {
head: 0,
mask: 1,
torso: 3,
legs: 4,
bag: 5,
shoes: 6,
accessories: 7,
undershirts: 8,
bodyarmor: 9,
decals: 10,
tops: 11
};

export const PropKey = {
hat: 0,
glasses: 1,
ears: 2,
watch: 6,
bracelet: 7
};

0 comments on commit cff385f

Please sign in to comment.