mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-19 06:46:28 +01:00
cleaned FigureDataContainer
This commit is contained in:
parent
ed772306a3
commit
413ba368a8
@ -409,13 +409,13 @@ export class AvatarRenderManager extends NitroManager implements IAvatarRenderMa
|
|||||||
{
|
{
|
||||||
const container = new FigureDataContainer();
|
const container = new FigureDataContainer();
|
||||||
|
|
||||||
container._Str_2153(k, _arg_2);
|
container.loadAvatarData(k, _arg_2);
|
||||||
|
|
||||||
const partSets: IFigurePartSet[] = this.resolveFigureSets(_arg_3);
|
const partSets: IFigurePartSet[] = this.resolveFigureSets(_arg_3);
|
||||||
|
|
||||||
for(const partSet of partSets)
|
for(const partSet of partSets)
|
||||||
{
|
{
|
||||||
container._Str_2088(partSet.type, partSet.id, container.getColourIds(partSet.type));
|
container.savePartData(partSet.type, partSet.id, container.getColourIds(partSet.type));
|
||||||
}
|
}
|
||||||
|
|
||||||
return container.getFigureString();
|
return container.getFigureString();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
export class AvatarEditorInstanceId
|
export class AvatarEditorInstanceId
|
||||||
{
|
{
|
||||||
public static _Str_3350: number = 0;
|
public static OWN_AVATAR_EDITOR: number = 0;
|
||||||
public static _Str_7195: number = 1;
|
public static FURNITURE_AVATAR_EDITOR: number = 1;
|
||||||
public static _Str_17909: number = 2;
|
public static BOT_EDITOR: number = 2;
|
||||||
public static _Str_16370: number = 3;
|
public static DEV_TOOL_EDITOR: number = 3;
|
||||||
}
|
}
|
@ -3,25 +3,25 @@ import { FigureDataView } from './FigureDataView';
|
|||||||
|
|
||||||
export class FigureData implements IAvatarImageListener
|
export class FigureData implements IAvatarImageListener
|
||||||
{
|
{
|
||||||
public static M: string = 'M';
|
public static MALE: string = 'M';
|
||||||
public static F: string = 'F';
|
public static FEMALE: string = 'F';
|
||||||
public static U: string = 'U';
|
public static UNISEX: string = 'U';
|
||||||
public static H: string = 'h';
|
public static SCALE: string = 'h';
|
||||||
public static STD: string = 'std';
|
public static STD: string = 'std';
|
||||||
public static _Str_2028: string = '0';
|
public static DEFAULT_FRAME: string = '0';
|
||||||
public static FACE: string = 'hd';
|
public static FACE: string = 'hd';
|
||||||
public static HR: string = 'hr';
|
public static HAIR: string = 'hr';
|
||||||
public static HA: string = 'ha';
|
public static HAT: string = 'ha';
|
||||||
public static HE: string = 'he';
|
public static HEAD_ACCESSORIES: string = 'he';
|
||||||
public static EA: string = 'ea';
|
public static EYE_ACCESSORIES: string = 'ea';
|
||||||
public static FA: string = 'fa';
|
public static FACE_ACCESSORIES: string = 'fa';
|
||||||
public static CC: string = 'cc';
|
public static JACKET: string = 'cc';
|
||||||
public static CH: string = 'ch';
|
public static SHIRT: string = 'ch';
|
||||||
public static CHEST_ACCESSORIES: string = 'ca';
|
public static CHEST_ACCESSORIES: string = 'ca';
|
||||||
public static CHEST_PRINTS: string = 'cp';
|
public static CHEST_PRINTS: string = 'cp';
|
||||||
public static LG: string = 'lg';
|
public static TROUSERS: string = 'lg';
|
||||||
public static SH: string = 'sh';
|
public static SHOES: string = 'sh';
|
||||||
public static WA: string = 'wa';
|
public static TROUSER_ACCESSORIES: string = 'wa';
|
||||||
|
|
||||||
private _view: FigureDataView;
|
private _view: FigureDataView;
|
||||||
private _data: Map<string, number>;
|
private _data: Map<string, number>;
|
||||||
@ -170,18 +170,18 @@ export class FigureData implements IAvatarImageListener
|
|||||||
switch(k)
|
switch(k)
|
||||||
{
|
{
|
||||||
case FigureData.FACE:
|
case FigureData.FACE:
|
||||||
case FigureData.HR:
|
case FigureData.HAIR:
|
||||||
case FigureData.HA:
|
case FigureData.HAT:
|
||||||
case FigureData.HE:
|
case FigureData.HEAD_ACCESSORIES:
|
||||||
case FigureData.EA:
|
case FigureData.EYE_ACCESSORIES:
|
||||||
case FigureData.FA:
|
case FigureData.FACE_ACCESSORIES:
|
||||||
case FigureData.CH:
|
case FigureData.SHIRT:
|
||||||
case FigureData.CC:
|
case FigureData.JACKET:
|
||||||
case FigureData.CHEST_ACCESSORIES:
|
case FigureData.CHEST_ACCESSORIES:
|
||||||
case FigureData.CHEST_PRINTS:
|
case FigureData.CHEST_PRINTS:
|
||||||
case FigureData.LG:
|
case FigureData.TROUSERS:
|
||||||
case FigureData.SH:
|
case FigureData.SHOES:
|
||||||
case FigureData.WA:
|
case FigureData.TROUSER_ACCESSORIES:
|
||||||
if(_arg_2 >= 0)
|
if(_arg_2 >= 0)
|
||||||
{
|
{
|
||||||
this._data.set(k, _arg_2);
|
this._data.set(k, _arg_2);
|
||||||
@ -201,18 +201,18 @@ export class FigureData implements IAvatarImageListener
|
|||||||
switch(k)
|
switch(k)
|
||||||
{
|
{
|
||||||
case FigureData.FACE:
|
case FigureData.FACE:
|
||||||
case FigureData.HR:
|
case FigureData.HAIR:
|
||||||
case FigureData.HA:
|
case FigureData.HAT:
|
||||||
case FigureData.HE:
|
case FigureData.HEAD_ACCESSORIES:
|
||||||
case FigureData.EA:
|
case FigureData.EYE_ACCESSORIES:
|
||||||
case FigureData.FA:
|
case FigureData.FACE_ACCESSORIES:
|
||||||
case FigureData.CH:
|
case FigureData.SHIRT:
|
||||||
case FigureData.CC:
|
case FigureData.JACKET:
|
||||||
case FigureData.CHEST_ACCESSORIES:
|
case FigureData.CHEST_ACCESSORIES:
|
||||||
case FigureData.CHEST_PRINTS:
|
case FigureData.CHEST_PRINTS:
|
||||||
case FigureData.LG:
|
case FigureData.TROUSERS:
|
||||||
case FigureData.SH:
|
case FigureData.SHOES:
|
||||||
case FigureData.WA:
|
case FigureData.TROUSER_ACCESSORIES:
|
||||||
this._colors.set(k, _arg_2);
|
this._colors.set(k, _arg_2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
export class FigureDataContainer
|
export class FigureDataContainer
|
||||||
{
|
{
|
||||||
private static M: string = 'M';
|
private static MALE: string = 'M';
|
||||||
private static F: string = 'F';
|
private static FEMALE: string = 'F';
|
||||||
private static U: string = 'U';
|
private static UNISEX: string = 'U';
|
||||||
private static H: string = 'h';
|
private static SCALE: string = 'h';
|
||||||
private static STD: string = 'std';
|
private static STD: string = 'std';
|
||||||
private static _Str_2028: string = '0';
|
private static DEFAULT_FRAME: string = '0';
|
||||||
private static HD: string = 'hd';
|
private static HD: string = 'hd';
|
||||||
private static HR: string = 'hr';
|
private static HAIR: string = 'hr';
|
||||||
private static HA: string = 'ha';
|
private static HAT: string = 'ha';
|
||||||
private static HE: string = 'he';
|
private static HEAD_ACCESSORIES: string = 'he';
|
||||||
private static EA: string = 'ea';
|
private static EYE_ACCESSORIES: string = 'ea';
|
||||||
private static FA: string = 'fa';
|
private static FACE_ACCESSORIES: string = 'fa';
|
||||||
private static CC: string = 'cc';
|
private static JACKET: string = 'cc';
|
||||||
private static CH: string = 'ch';
|
private static SHIRT: string = 'ch';
|
||||||
private static CA: string = 'ca';
|
private static CHEST_ACCESSORIES: string = 'ca';
|
||||||
private static CP: string = 'cp';
|
private static CHEST_PRINTS: string = 'cp';
|
||||||
private static LG: string = 'lg';
|
private static TROUSERS: string = 'lg';
|
||||||
private static SH: string = 'sh';
|
private static SHOES: string = 'sh';
|
||||||
private static WA: string = 'wa';
|
private static TROUSER_ACCESSORIES: string = 'wa';
|
||||||
private static _Str_1329: number[] = [28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 68];
|
private static BLOCKED_FX_TYPES: number[] = [28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 68];
|
||||||
|
|
||||||
private _data: Map<string, number>;
|
private _data: Map<string, number>;
|
||||||
private _colors: Map<string, number[]>;
|
private _colors: Map<string, number[]>;
|
||||||
@ -27,13 +27,13 @@
|
|||||||
private _isDisposed: boolean;
|
private _isDisposed: boolean;
|
||||||
private _avatarEffectType: number = -1;
|
private _avatarEffectType: number = -1;
|
||||||
|
|
||||||
public _Str_2153(k: string, _arg_2: string): void
|
public loadAvatarData(k: string, _arg_2: string): void
|
||||||
{
|
{
|
||||||
this._data = new Map();
|
this._data = new Map();
|
||||||
this._colors = new Map();
|
this._colors = new Map();
|
||||||
this._gender = _arg_2;
|
this._gender = _arg_2;
|
||||||
|
|
||||||
this._Str_958(k);
|
this.parseFigureString(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void
|
public dispose(): void
|
||||||
@ -48,7 +48,7 @@
|
|||||||
return this._isDisposed;
|
return this._isDisposed;
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_958(k: string): void
|
private parseFigureString(k: string): void
|
||||||
{
|
{
|
||||||
if(!k) return;
|
if(!k) return;
|
||||||
|
|
||||||
@ -73,20 +73,20 @@
|
|||||||
|
|
||||||
if(!colors.length) colors.push(0);
|
if(!colors.length) colors.push(0);
|
||||||
|
|
||||||
this._Str_1876(part, setId, false);
|
this.savePartSetId(part, setId, false);
|
||||||
this.savePartSetColourId(part, colors, false);
|
this.savePartSetColourId(part, colors, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2131(k: string): boolean
|
public hasSetType(k: string): boolean
|
||||||
{
|
{
|
||||||
return !!this._data.get(k);
|
return !!this._data.get(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getPartSetId(k: string): number
|
public getPartSetId(k: string): number
|
||||||
{
|
{
|
||||||
if(this._Str_2131(k)) return this._data.get(k);
|
if(this.hasSetType(k)) return this._data.get(k);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -129,29 +129,29 @@
|
|||||||
return figure;
|
return figure;
|
||||||
}
|
}
|
||||||
|
|
||||||
public _Str_2088(k: string, _arg_2: number, _arg_3: number[], _arg_4: boolean = false): void
|
public savePartData(k: string, _arg_2: number, _arg_3: number[], _arg_4: boolean = false): void
|
||||||
{
|
{
|
||||||
this._Str_1876(k, _arg_2, _arg_4);
|
this.savePartSetId(k, _arg_2, _arg_4);
|
||||||
this.savePartSetColourId(k, _arg_3, _arg_4);
|
this.savePartSetColourId(k, _arg_3, _arg_4);
|
||||||
}
|
}
|
||||||
|
|
||||||
private _Str_1876(k: string, _arg_2: number, _arg_3: boolean = true): void
|
private savePartSetId(k: string, _arg_2: number, _arg_3: boolean = true): void
|
||||||
{
|
{
|
||||||
switch(k)
|
switch(k)
|
||||||
{
|
{
|
||||||
case FigureDataContainer.HD:
|
case FigureDataContainer.HD:
|
||||||
case FigureDataContainer.HR:
|
case FigureDataContainer.HAIR:
|
||||||
case FigureDataContainer.HA:
|
case FigureDataContainer.HAT:
|
||||||
case FigureDataContainer.HE:
|
case FigureDataContainer.HEAD_ACCESSORIES:
|
||||||
case FigureDataContainer.EA:
|
case FigureDataContainer.EYE_ACCESSORIES:
|
||||||
case FigureDataContainer.FA:
|
case FigureDataContainer.FACE_ACCESSORIES:
|
||||||
case FigureDataContainer.CH:
|
case FigureDataContainer.SHIRT:
|
||||||
case FigureDataContainer.CC:
|
case FigureDataContainer.JACKET:
|
||||||
case FigureDataContainer.CA:
|
case FigureDataContainer.CHEST_ACCESSORIES:
|
||||||
case FigureDataContainer.CP:
|
case FigureDataContainer.CHEST_PRINTS:
|
||||||
case FigureDataContainer.LG:
|
case FigureDataContainer.TROUSERS:
|
||||||
case FigureDataContainer.SH:
|
case FigureDataContainer.SHOES:
|
||||||
case FigureDataContainer.WA:
|
case FigureDataContainer.TROUSER_ACCESSORIES:
|
||||||
if(_arg_2 >= 0)
|
if(_arg_2 >= 0)
|
||||||
{
|
{
|
||||||
this._data.set(k, _arg_2);
|
this._data.set(k, _arg_2);
|
||||||
@ -168,18 +168,18 @@
|
|||||||
switch(k)
|
switch(k)
|
||||||
{
|
{
|
||||||
case FigureDataContainer.HD:
|
case FigureDataContainer.HD:
|
||||||
case FigureDataContainer.HR:
|
case FigureDataContainer.HAIR:
|
||||||
case FigureDataContainer.HA:
|
case FigureDataContainer.HAT:
|
||||||
case FigureDataContainer.HE:
|
case FigureDataContainer.HEAD_ACCESSORIES:
|
||||||
case FigureDataContainer.EA:
|
case FigureDataContainer.EYE_ACCESSORIES:
|
||||||
case FigureDataContainer.FA:
|
case FigureDataContainer.FACE_ACCESSORIES:
|
||||||
case FigureDataContainer.CH:
|
case FigureDataContainer.SHIRT:
|
||||||
case FigureDataContainer.CC:
|
case FigureDataContainer.JACKET:
|
||||||
case FigureDataContainer.CA:
|
case FigureDataContainer.CHEST_ACCESSORIES:
|
||||||
case FigureDataContainer.CP:
|
case FigureDataContainer.CHEST_PRINTS:
|
||||||
case FigureDataContainer.LG:
|
case FigureDataContainer.TROUSERS:
|
||||||
case FigureDataContainer.SH:
|
case FigureDataContainer.SHOES:
|
||||||
case FigureDataContainer.WA:
|
case FigureDataContainer.TROUSER_ACCESSORIES:
|
||||||
this._colors.set(k, _arg_2);
|
this._colors.set(k, _arg_2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,12 @@ import { RoomObjectManager } from './RoomObjectManager';
|
|||||||
|
|
||||||
export class RoomManager extends NitroManager implements IRoomManager, IRoomInstanceContainer
|
export class RoomManager extends NitroManager implements IRoomManager, IRoomInstanceContainer
|
||||||
{
|
{
|
||||||
public static _Str_9994: number = -1;
|
public static ROOM_MANAGER_ERROR: number = -1;
|
||||||
public static _Str_16337: number = 0;
|
public static ROOM_MANAGER_LOADING: number = 0;
|
||||||
public static _Str_16443: number = 1;
|
public static ROOM_MANAGER_LOADED: number = 1;
|
||||||
public static _Str_13904: number = 2;
|
public static ROOM_MANAGER_INITIALIZING: number = 2;
|
||||||
public static _Str_9846: number = 3;
|
public static ROOM_MANAGER_INITIALIZED: number = 3;
|
||||||
private static _Str_18280: number = 40;
|
private static CONTENT_PROCESSING_TIME_LIMIT_MILLISECONDS: number = 40;
|
||||||
|
|
||||||
private _state: number;
|
private _state: number;
|
||||||
private _rooms: Map<string, IRoomInstance>;
|
private _rooms: Map<string, IRoomInstance>;
|
||||||
@ -42,7 +42,7 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst
|
|||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this._state = RoomManager._Str_16443;
|
this._state = RoomManager.ROOM_MANAGER_LOADED;
|
||||||
this._rooms = new Map();
|
this._rooms = new Map();
|
||||||
this._contentLoader = null;
|
this._contentLoader = null;
|
||||||
this._updateCategories = [];
|
this._updateCategories = [];
|
||||||
@ -66,7 +66,7 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst
|
|||||||
|
|
||||||
public onInit(): void
|
public onInit(): void
|
||||||
{
|
{
|
||||||
if(this._state >= RoomManager._Str_13904 || !this._contentLoader) return;
|
if(this._state >= RoomManager.ROOM_MANAGER_INITIALIZING || !this._contentLoader) return;
|
||||||
|
|
||||||
const mandatoryLibraries = RoomContentLoader.MANDATORY_LIBRARIES;
|
const mandatoryLibraries = RoomContentLoader.MANDATORY_LIBRARIES;
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._state = RoomManager._Str_13904;
|
this._state = RoomManager.ROOM_MANAGER_INITIALIZING;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getRoomInstance(roomId: string): IRoomInstance
|
public getRoomInstance(roomId: string): IRoomInstance
|
||||||
@ -347,9 +347,9 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst
|
|||||||
|
|
||||||
private removeFromInitialLoad(type: string): void
|
private removeFromInitialLoad(type: string): void
|
||||||
{
|
{
|
||||||
if(!type || this._state === RoomManager._Str_9994) return;
|
if(!type || this._state === RoomManager.ROOM_MANAGER_ERROR) return;
|
||||||
|
|
||||||
if(!this._contentLoader) this._state = RoomManager._Str_9994;
|
if(!this._contentLoader) this._state = RoomManager.ROOM_MANAGER_ERROR;
|
||||||
|
|
||||||
if(this._contentLoader.getCollection(type))
|
if(this._contentLoader.getCollection(type))
|
||||||
{
|
{
|
||||||
@ -359,7 +359,7 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst
|
|||||||
|
|
||||||
if(!this._initialLoadList.length)
|
if(!this._initialLoadList.length)
|
||||||
{
|
{
|
||||||
this._state = RoomManager._Str_9846;
|
this._state = RoomManager.ROOM_MANAGER_INITIALIZED;
|
||||||
|
|
||||||
if(this._listener)
|
if(this._listener)
|
||||||
{
|
{
|
||||||
@ -369,7 +369,7 @@ export class RoomManager extends NitroManager implements IRoomManager, IRoomInst
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this._state = RoomManager._Str_9994;
|
this._state = RoomManager.ROOM_MANAGER_ERROR;
|
||||||
|
|
||||||
if(this._listener) this._listener.onRoomEngineInitalized(false);
|
if(this._listener) this._listener.onRoomEngineInitalized(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user