cleaned ActionDefinition

This commit is contained in:
Dank074 2021-05-29 19:45:13 -05:00
parent 96737416ef
commit fc31d68ef3
9 changed files with 58 additions and 58 deletions

View File

@ -291,12 +291,12 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
{ {
return; return;
} }
const _local_2 = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868); const _local_2 = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
if(_local_2 == null) if(_local_2 == null)
{ {
return; return;
} }
const _local_3 = this.getBodyParts(k, this._mainAction.definition._Str_868, this._mainDirection); const _local_3 = this.getBodyParts(k, this._mainAction.definition.geometryType, this._mainDirection);
let _local_6 = (_local_3.length - 1); let _local_6 = (_local_3.length - 1);
while(_local_6 >= 0) while(_local_6 >= 0)
{ {
@ -314,7 +314,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
if(!this._actionsSorted) this.endActionAppends(); if(!this._actionsSorted) this.endActionAppends();
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868); const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
if(!avatarCanvas) return null; if(!avatarCanvas) return null;
@ -331,7 +331,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
this._isCachedImage = false; this._isCachedImage = false;
} }
const _local_6 = this.getBodyParts(setType, this._mainAction.definition._Str_868, this._mainDirection); const _local_6 = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
this._image = null; this._image = null;
@ -444,11 +444,11 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
if(!this._actionsSorted) this.endActionAppends(); if(!this._actionsSorted) this.endActionAppends();
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868); const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
if(!avatarCanvas) return null; if(!avatarCanvas) return null;
const setTypes = this.getBodyParts(setType, this._mainAction.definition._Str_868, this._mainDirection); const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
const container = new Sprite(); const container = new Sprite();
const sprite = new Sprite(Texture.EMPTY); const sprite = new Sprite(Texture.EMPTY);
@ -509,11 +509,11 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
if(!this._actionsSorted) this.endActionAppends(); if(!this._actionsSorted) this.endActionAppends();
const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition._Str_868); const avatarCanvas = this._structure.getCanvas(this._scale, this._mainAction.definition.geometryType);
if(!avatarCanvas) return null; if(!avatarCanvas) return null;
const setTypes = this.getBodyParts(setType, this._mainAction.definition._Str_868, this._mainDirection); const setTypes = this.getBodyParts(setType, this._mainAction.definition.geometryType, this._mainDirection);
const container = new Container(); const container = new Container();
const sprite = new Sprite(Texture.EMPTY); const sprite = new Sprite(Texture.EMPTY);
@ -742,7 +742,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
case AvatarAction.CARRY_OBJECT: case AvatarAction.CARRY_OBJECT:
case AvatarAction.USE_OBJECT: { case AvatarAction.USE_OBJECT: {
const _local_4 = this._structure.getActionDefinitionWithState(k); const _local_4 = this._structure.getActionDefinitionWithState(k);
if(_local_4) _local_3 = _local_4._Str_1350(_local_3); if(_local_4) _local_3 = _local_4.getParameterValue(_local_3);
this.addActionData(k, _local_3); this.addActionData(k, _local_3);
break; break;
} }
@ -800,7 +800,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
for(const _local_3 of this._sortedActions) for(const _local_3 of this._sortedActions)
{ {
_local_2 = this._structure.getActionDefinitionWithState(_local_3.actionType); _local_2 = this._structure.getActionDefinitionWithState(_local_3.actionType);
if(((!(_local_2 == null)) && (_local_2._Str_715(_local_3.actionParameter)))) if(((!(_local_2 == null)) && (_local_2.getPreventHeadTurn(_local_3.actionParameter))))
{ {
k = true; k = true;
} }
@ -884,7 +884,7 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
for(const k of this._sortedActions) for(const k of this._sortedActions)
{ {
if((k && k.definition) && k.definition._Str_861) if((k && k.definition) && k.definition.isAnimation)
{ {
const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter)); const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter));
@ -912,13 +912,13 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
{ {
if(!((!(k)) || (!(k.definition)))) if(!((!(k)) || (!(k.definition))))
{ {
if(k.definition._Str_861 && (k.actionParameter === '')) k.actionParameter = '1'; if(k.definition.isAnimation && (k.actionParameter === '')) k.actionParameter = '1';
this.setActionToParts(k, _local_3); this.setActionToParts(k, _local_3);
if(k.definition._Str_861) if(k.definition.isAnimation)
{ {
this._isAnimating = k.definition._Str_801(k.actionParameter); this._isAnimating = k.definition.isAnimated(k.actionParameter);
const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter)); const _local_2 = this._structure.getAnimation(((k.definition.state + '.') + k.actionParameter));
@ -945,10 +945,10 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
{ {
return; return;
} }
if(k.definition._Str_779) if(k.definition.isMain)
{ {
this._mainAction = k; this._mainAction = k;
this._cache._Str_2014(k.definition._Str_868); this._cache._Str_2014(k.definition.geometryType);
} }
this._cache._Str_1565(k, _arg_2); this._cache._Str_1565(k, _arg_2);
this._changes = true; this._changes = true;
@ -960,10 +960,10 @@ export class AvatarImage implements IAvatarImage, IAvatarEffectListener
if(k.definition.assetPartDefinition === '') return; if(k.definition.assetPartDefinition === '') return;
if(k.definition._Str_779) if(k.definition.isMain)
{ {
this._mainAction = k; this._mainAction = k;
this._cache._Str_2014(k.definition._Str_868); this._cache._Str_2014(k.definition.geometryType);
} }
this._cache._Str_741(k); this._cache._Str_741(k);

View File

@ -251,9 +251,9 @@ export class AvatarStructure extends EventDispatcher
let _local_3: string[] = []; let _local_3: string[] = [];
const _local_4: string[] = []; const _local_4: string[] = [];
const _local_5 = k.definition._Str_868; const _local_5 = k.definition.geometryType;
if(k.definition._Str_861) if(k.definition.isAnimation)
{ {
const _local_7 = ((k.definition.state + '.') + k.actionParameter); const _local_7 = ((k.definition.state + '.') + k.actionParameter);
const _local_8 = this._animationManager.getAnimation(_local_7); const _local_8 = this._animationManager.getAnimation(_local_7);
@ -360,7 +360,7 @@ export class AvatarStructure extends EventDispatcher
let _local_14: any[] = [ 0 ]; let _local_14: any[] = [ 0 ];
const _local_15 = this._animationData._Str_2244(_arg_3.definition); const _local_15 = this._animationData._Str_2244(_arg_3.definition);
if(_arg_3.definition._Str_861) if(_arg_3.definition.isAnimation)
{ {
const _local_24 = ((_arg_3.definition.state + '.') + _arg_3.actionParameter); const _local_24 = ((_arg_3.definition.state + '.') + _arg_3.actionParameter);
const _local_10 = this._animationManager.getAnimation(_local_24); const _local_10 = this._animationManager.getAnimation(_local_24);

View File

@ -65,7 +65,7 @@ export class ActionDefinition implements IActionDefinition
} }
} }
public _Str_772(k: string, _arg_2: number, _arg_3: number[]): void public setOffsets(k: string, _arg_2: number, _arg_3: number[]): void
{ {
if(!this._canvasOffsets) this._canvasOffsets = new Map(); if(!this._canvasOffsets) this._canvasOffsets = new Map();
@ -81,7 +81,7 @@ export class ActionDefinition implements IActionDefinition
existing.set(_arg_2, _arg_3); existing.set(_arg_2, _arg_3);
} }
public _Str_805(k: string, _arg_2: number): number[] public getOffsets(k: string, _arg_2: number): number[]
{ {
if(!this._canvasOffsets) return null; if(!this._canvasOffsets) return null;
@ -103,7 +103,7 @@ export class ActionDefinition implements IActionDefinition
return existing; return existing;
} }
public _Str_1350(id: string): string public getParameterValue(id: string): string
{ {
if(!id) return ''; if(!id) return '';
@ -114,12 +114,12 @@ export class ActionDefinition implements IActionDefinition
return existing; return existing;
} }
public _Str_733(type: string): string[] public getPrevents(type: string): string[]
{ {
return this._prevents.concat(this._Str_1889(type)); return this._prevents.concat(this.getTypePrevents(type));
} }
private _Str_1889(type: string): string[] private getTypePrevents(type: string): string[]
{ {
if(!type) return []; if(!type) return [];
@ -130,7 +130,7 @@ export class ActionDefinition implements IActionDefinition
return existing.prevents; return existing.prevents;
} }
public _Str_715(k: string): boolean public getPreventHeadTurn(k: string): boolean
{ {
if(!k) return this._preventHeadTurn; if(!k) return this._preventHeadTurn;
@ -138,10 +138,10 @@ export class ActionDefinition implements IActionDefinition
if(!type) return this._preventHeadTurn; if(!type) return this._preventHeadTurn;
return type._Str_1891; return type.preventHeadTurn;
} }
public _Str_801(k: string): boolean public isAnimated(k: string): boolean
{ {
if(!k) return true; if(!k) return true;
@ -149,7 +149,7 @@ export class ActionDefinition implements IActionDefinition
if(!type) return true; if(!type) return true;
return type._Str_801; return type.isAnimated;
} }
public get id(): string public get id(): string
@ -182,27 +182,27 @@ export class ActionDefinition implements IActionDefinition
return this._lay; return this._lay;
} }
public get _Str_868(): string public get geometryType(): string
{ {
return this._geometryType; return this._geometryType;
} }
public get _Str_779(): boolean public get isMain(): boolean
{ {
return this._isMain; return this._isMain;
} }
public get _Str_804(): boolean public get isDefault(): boolean
{ {
return this._isDefault; return this._isDefault;
} }
public get _Str_861(): boolean public get isAnimation(): boolean
{ {
return this._isAnimation; return this._isAnimation;
} }
public get _Str_812(): boolean public get startFromFrameZero(): boolean
{ {
return this._startFromFrameZero; return this._startFromFrameZero;
} }

View File

@ -32,13 +32,13 @@ export class ActionType
return this._prevents; return this._prevents;
} }
public get _Str_1891(): boolean public get preventHeadTurn(): boolean
{ {
return this._preventHeadTurn; return this._preventHeadTurn;
} }
public get _Str_801(): boolean public get isAnimated(): boolean
{ {
return this._isAnimated; return this._isAnimated;
} }
} }

View File

@ -54,7 +54,7 @@ export class AvatarActionManager
const y = (canvasOffset.y || 0); const y = (canvasOffset.y || 0);
const z = (canvasOffset.z || 0); const z = (canvasOffset.z || 0);
action._Str_772(size, direction, [ x, y, z ]); action.setOffsets(size, direction, [ x, y, z ]);
} }
} }
} }
@ -88,7 +88,7 @@ export class AvatarActionManager
for(const action of this._actions.values()) for(const action of this._actions.values())
{ {
if(!action || !action._Str_804) continue; if(!action || !action.isDefault) continue;
this._defaultAction = action; this._defaultAction = action;
@ -107,7 +107,7 @@ export class AvatarActionManager
if(!activeAction) continue; if(!activeAction) continue;
const action = this._actions.get(activeAction.actionType); const action = this._actions.get(activeAction.actionType);
const offsets = action && action._Str_805(_arg_2, _arg_3); const offsets = action && action.getOffsets(_arg_2, _arg_3);
if(offsets) canvasOffsets = offsets; if(offsets) canvasOffsets = offsets;
} }
@ -152,7 +152,7 @@ export class AvatarActionManager
const localAction = this._actions.get(action.actionType); const localAction = this._actions.get(action.actionType);
if(localAction) preventions = preventions.concat(localAction._Str_733(action.actionParameter)); if(localAction) preventions = preventions.concat(localAction.getPrevents(action.actionParameter));
} }
for(const action of actions) for(const action of actions)

View File

@ -5,16 +5,16 @@ export interface IActionDefinition
state: string; state: string;
precedence: number; precedence: number;
activePartSet: string; activePartSet: string;
_Str_779: boolean; isMain: boolean;
_Str_804: boolean; isDefault: boolean;
assetPartDefinition: string; assetPartDefinition: string;
lay: string; lay: string;
_Str_868: string; geometryType: string;
_Str_861: boolean; isAnimation: boolean;
_Str_812: boolean; startFromFrameZero: boolean;
_Str_801(_arg_1: string): boolean; isAnimated(_arg_1: string): boolean;
_Str_733(_arg_1: string): string[]; getPrevents(_arg_1: string): string[];
_Str_715(_arg_1: string): boolean; getPreventHeadTurn(_arg_1: string): boolean;
_Str_772(_arg_1: string, _arg_2: number, _arg_3: []): void; setOffsets(_arg_1: string, _arg_2: number, _arg_3: []): void;
_Str_805(_arg_1: string, _arg_2: number): number[]; getOffsets(_arg_1: string, _arg_2: number): number[];
} }

View File

@ -173,7 +173,7 @@ export class AvatarImageCache
let _local_7 = _local_4._Str_2244(); let _local_7 = _local_4._Str_2244();
let frameCount = frameNumber; let frameCount = frameNumber;
if(_local_7.definition._Str_812) frameCount -= _local_7.startFrame; if(_local_7.definition.startFromFrameZero) frameCount -= _local_7.startFrame;
let _local_8 = _local_7; let _local_8 = _local_7;
let _local_9: string[] = []; let _local_9: string[] = [];
@ -182,7 +182,7 @@ export class AvatarImageCache
if(!((!(_local_7)) || (!(_local_7.definition)))) if(!((!(_local_7)) || (!(_local_7.definition))))
{ {
if(_local_7.definition._Str_861) if(_local_7.definition.isAnimation)
{ {
let _local_15 = _local_5; let _local_15 = _local_5;

View File

@ -119,7 +119,7 @@ export class AvatarModelGeometry
if(!avatarSet) return false; if(!avatarSet) return false;
return avatarSet._Str_779; return avatarSet.isMain;
} }
public getCanvas(k: string, _arg_2: string): AvatarCanvas public getCanvas(k: string, _arg_2: string): AvatarCanvas

View File

@ -74,7 +74,7 @@
return this._id; return this._id;
} }
public get _Str_779(): boolean public get isMain(): boolean
{ {
if(this._isMain) return true; if(this._isMain) return true;
@ -82,7 +82,7 @@
{ {
if(!avatarSet) continue; if(!avatarSet) continue;
if(!avatarSet._Str_779) continue; if(!avatarSet.isMain) continue;
return true; return true;
} }