From 6a7d83f16e825980ef83dedd09c3b78dd4f74823 Mon Sep 17 00:00:00 2001 From: Bennett <110846042+bennett-sh@users.noreply.github.com> Date: Mon, 8 May 2023 17:57:56 +0200 Subject: [PATCH] fix ref types --- package.json | 2 +- src/types.ts | 235 ++++++++++++++++++++++++++------------------------- 2 files changed, 119 insertions(+), 118 deletions(-) diff --git a/package.json b/package.json index 624e0fc..1388cd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "repository-script", - "version": "1.0.2", + "version": "1.0.3", "description": "An easier way of writing repository files with code", "main": "dist/src/lib.js", "types": "./dist/src/index.d.ts", diff --git a/src/types.ts b/src/types.ts index c9881bc..424a5cc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,3 +1,4 @@ +import type { RepositoryEntry } from './repositoryEntry/_index.js' import { Float, Raw } from './values.js' export type TDigitCharacter = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' @@ -11,80 +12,80 @@ export type TIOIHash = `00${THexCharacter[14]}` export type TUUIDv4 = `${THexCharacter[8]}-${THexCharacter[4]}-${THexCharacter[4]}-${THexCharacter[4]}-${THexCharacter[12]}` | string export interface IRepositoryItemBase { - ID_: string; - Image: string; - Name: string; - Outfit: string; + ID_: string | RepositoryEntry; + Image: string | RepositoryEntry; + Name: string | RepositoryEntry; + Outfit: string | RepositoryEntry; OutfitVariationIndex: number | Float; CharacterSetIndex: number | Float; - Description: string; - Description_LOC: string; - Tile: string; - Name_LOC: string; - PersistentBoolId: string; + Description: string | RepositoryEntry; + Description_LOC: string | RepositoryEntry; + Tile: string | RepositoryEntry; + Name_LOC: string | RepositoryEntry; + PersistentBoolId: string | RepositoryEntry; SetPointShootingAllowed: boolean; SetPointShootingCoolDownTime: number | Float; SetPointShootingMaxTags: number | Float; SetPointShootingTagTime: number | Float; - ModifierType: string; - CommonName: string; + ModifierType: string | RepositoryEntry; + CommonName: string | RepositoryEntry; HeroDisguiseAvailable: boolean; IsHitmanSuit: boolean; - Category: string; - ImageTransparent: string; - TokenID: string; - ActionRewardType: string; - CarryAnimSetType: string; + Category: string | RepositoryEntry; + ImageTransparent: string | RepositoryEntry; + TokenID: string | RepositoryEntry; + ActionRewardType: string | RepositoryEntry; + CarryAnimSetType: string | RepositoryEntry; CheatSpawnGroup_Keys: boolean; EnablePickUpOnRelease: boolean; - EquipAbility: string; - HolsterAbility: string; - HudIcon: string; - InventoryCategoryIcon: string; - InventoryCategoryName: string; + EquipAbility: string | RepositoryEntry; + HolsterAbility: string | RepositoryEntry; + HudIcon: string | RepositoryEntry; + InventoryCategoryIcon: string | RepositoryEntry; + InventoryCategoryName: string | RepositoryEntry; IsCheckedWhenFrisked: boolean; - ItemHandsIdle: string; - ItemHandsUse: string; - ItemType: string; - MugshotTransformation: string; - OnlineTraits: string[]; - Runtime: string; - Title: string; - AdditionalKeywords: string[]; + ItemHandsIdle: string | RepositoryEntry; + ItemHandsUse: string | RepositoryEntry; + ItemType: string | RepositoryEntry; + MugshotTransformation: string | RepositoryEntry; + OnlineTraits: (string | RepositoryEntry)[]; + Runtime: string | RepositoryEntry; + Title: string | RepositoryEntry; + AdditionalKeywords: (string | RepositoryEntry)[]; AIPerceptibleOnRelease: boolean; - AppliedModifiers: string[]; + AppliedModifiers: (string | RepositoryEntry)[]; CanBeDropped: boolean; CanPistolWhip: boolean; - CheatGroup: string; + CheatGroup: string | RepositoryEntry; CheatSpawnGroup_Everything: boolean; CheatSpawnGroup_Standard: boolean; CheatSpawnGroup_Tools: boolean; DetectShots: boolean; DisplayItemCategoryOnlineTraitsIndex: number | Float; ForbidCloseCombat: boolean; - GripAnimType: string; + GripAnimType: string | RepositoryEntry; HarmlessImpact: boolean; HitmanCanConceal: boolean; InteractionTimeMultiplier: number | Float; IsCoin: boolean; IsExplosive: boolean; IsPerceivedAsWeapon: boolean; - ItemHandsCoverAnimLayer: string; + ItemHandsCoverAnimLayer: string | RepositoryEntry; ItemImpactForce: number | Float; ItemImpactUpkick: number | Float; - ItemSize: string; + ItemSize: string | RepositoryEntry; KillItemCategoryOnlineTraitsIndex: number | Float; KinematicWhileCarried: boolean; - LocaKey: string; - MainAnimSetType: string; - ModifierSlot1: string[]; - ModifierSlot2: string[]; - ModifierSlot3: string[]; - ModifierSlot4: string[]; - ModifierSlot5: string[]; + LocaKey: string | RepositoryEntry; + MainAnimSetType: string | RepositoryEntry; + ModifierSlot1: (string | RepositoryEntry)[]; + ModifierSlot2: (string | RepositoryEntry)[]; + ModifierSlot3: (string | RepositoryEntry)[]; + ModifierSlot4: (string | RepositoryEntry)[]; + ModifierSlot5: (string | RepositoryEntry)[]; MugshotIsTransparent: boolean; NeverInvestigateDistractions: boolean; - PlaceableType: string; + PlaceableType: string | RepositoryEntry; PlacementOrientToHM: boolean; PlacementUseHitNormal: boolean; RagdollImpactForce: number | Float; @@ -92,13 +93,13 @@ export interface IRepositoryItemBase { RecognizableByCivilians: boolean; SpawnKinematic: boolean; Stackable: boolean; - SupportItem: string; - ThrownCollisionLoudness: string; - ThrowType: string; + SupportItem: string | RepositoryEntry; + ThrownCollisionLoudness: string | RepositoryEntry; + ThrowType: string | RepositoryEntry; ThrowVelocity: number | Float; UseFakePutDownPhysics: boolean; - AmmoItem: string; - CompareItem: string; + AmmoItem: string | RepositoryEntry; + CompareItem: string | RepositoryEntry; EnablePickUpOnSpawn: boolean; EnablePickUpOnThrowRelease: boolean; Evergreen_CapacityCost: number | Float; @@ -106,21 +107,21 @@ export interface IRepositoryItemBase { Evergreen_LoseOnWounded: boolean; Evergreen_Price: number | Float; Evergreen_Rarity: number | Float; - Evergreen_UnlockChallenge: string; - Evergreen_UnlockEntitlement: string; + Evergreen_UnlockChallenge: string | RepositoryEntry; + Evergreen_UnlockEntitlement: string | RepositoryEntry; Evergreen_UnlockMastery: number | Float; - ItemHUDType: string; - MeleeDamageBehavior: string; + ItemHUDType: string | RepositoryEntry; + MeleeDamageBehavior: string | RepositoryEntry; OverrideItemThrowRotation: boolean; - PoisonType: string; + PoisonType: string | RepositoryEntry; RagdollImpactForceGlobal: number | Float; RagdollImpactUpkickGlobal: number | Float; - Rarity: string; + Rarity: string | RepositoryEntry; ReverseItemThrowRotationDirection: boolean; ThrowImpactVisualRadius: number | Float; - Contents: string[]; + Contents: (string | RepositoryEntry)[]; ReloadFactorMultiplier: number | Float; - Features_: string[]; + Features_: (string | RepositoryEntry)[]; SetFullAutoOperation: boolean; AudioHighPassFilter: number | Float; RecoilZMultiplier: number | Float; @@ -164,21 +165,21 @@ export interface IRepositoryItemBase { AddBulletsPerMagazine: number | Float; AddExtraPickupMagazines: number | Float; InitialBulletsModifier: number | Float; - Perks: string[]; - AudioHeadType: string; - AudioTailType: string; - AudioWeaponFamily: string; + Perks: (string | RepositoryEntry)[]; + AudioHeadType: string | RepositoryEntry; + AudioTailType: string | RepositoryEntry; + AudioWeaponFamily: string | RepositoryEntry; ModelBodyPartSelections: (number | Float)[]; ModelMuzzleExtensionSelection: number | Float; ModelMuzzleExtensionSkinSelection: number | Float; ModelSkinSelections: (number | Float)[]; ActorConfiguration: IRepositoryConfiguration; - AudioFireType: string; - AudioWeaponClass: string; + AudioFireType: string | RepositoryEntry; + AudioWeaponClass: string | RepositoryEntry; PrimaryConfiguration: IRepositoryConfiguration; SecondaryConfiguration: IRepositoryConfiguration; - AudioExoticType: string; - AudioImpactType: string; + AudioExoticType: string | RepositoryEntry; + AudioImpactType: string | RepositoryEntry; AudioLowPassFilter: number | Float; EffectFlashSelection: number | Float; EffectSmokeSelection: number | Float; @@ -198,7 +199,7 @@ export interface IRepositoryItemBase { CrosshairModifierVisualOffset: number | Float; CrosshairOffset: number | Float; CrosshairScale: number | Float; - CrosshairType: string; + CrosshairType: string | RepositoryEntry; DamageClose: number | Float; DamageFar: number | Float; DamageMedium: number | Float; @@ -208,7 +209,7 @@ export interface IRepositoryItemBase { HitmanAutoreload: boolean; HitsNumberToFall: number | Float; ImpactForce: number | Float; - MagazineConfigs: string[]; + MagazineConfigs: (string | RepositoryEntry)[]; MuzzleVelocity: number | Float; OTSCamPrecisionModifier: number | Float; PrecisionMinDegree: number | Float; @@ -231,7 +232,7 @@ export interface IRepositoryItemBase { RecoilVertialRange: number | Float; RecoilX: number | Float; RecoilZ: number | Float; - ScopeZoom: string[]; + ScopeZoom: (string | RepositoryEntry)[]; ShotsPerMinute: number | Float; SneakMovingPrecisionModifier: number | Float; SneakNotMovingPrecisionModifier: number | Float; @@ -253,28 +254,28 @@ export interface IRepositoryItemBase { AllowAimAssist: boolean; AllowPrecisionTimeSlowdown: boolean; AllowScopeTimeSlowdown: boolean; - AmmoType: string; + AmmoType: string | RepositoryEntry; AnalogPrecisionModeThreshold: number | Float; AnalogShootThreshold: number | Float; - BobbingAngleX: string; - BobbingAngleY: string; - BobbingFrequencyX: string; - BobbingFrequencyY: string; + BobbingAngleX: string | RepositoryEntry; + BobbingAngleY: string | RepositoryEntry; + BobbingFrequencyX: string | RepositoryEntry; + BobbingFrequencyY: string | RepositoryEntry; BulletsPerMagazine: number | Float; BurstAngleH: number | Float; BurstAngleV: number | Float; - BurstPattern: string; + BurstPattern: string | RepositoryEntry; BurstRandomizationFactor: number | Float; CounterRotationFactor: number | Float; CrosshairDisplayHelpWhenNotAiming: boolean; - DeathImpactEffect: string; - DragAngles: string; + DeathImpactEffect: string | RepositoryEntry; + DragAngles: string | RepositoryEntry; DragCorrectionFraction: number | Float; DragCorrectionTime: number | Float; FullAutoOperation: boolean; HealthPercentTimeout: number | Float; HitsNumberTimeout: number | Float; - ImpactEffect: string; + ImpactEffect: string | RepositoryEntry; InitialMagazines: number | Float; MaxRange: number | Float; MuzzleEnergy: number | Float; @@ -312,32 +313,32 @@ export interface IRepositoryItemBase { ScopeFOV: number | Float; ScopeFOV_VR: number | Float; ScopeModePrecisionDegree: number | Float; - SilenceRating: string; + SilenceRating: string | RepositoryEntry; StandNotMovingPrecisionModifier: number | Float; ZRecoilDistance: number | Float; ZRecoilDistance_VR: number | Float; ZRecoilTime: number | Float; ZRecoilTime_VR: number | Float; AmmoCount: number | Float; - Parameter: string; + Parameter: string | RepositoryEntry; Toggle: boolean; Value: number | Float; Count: number | Float; - AmmoConfig: string; + AmmoConfig: string | RepositoryEntry; MagazineSize: number | Float; MagazineIndex: number | Float; - Tags: string[]; - BobbingAngleXMultiplier: string; - BobbingAngleYMultiplier: string; - BobbingFrequencyXMultiplier: string; - BobbingFrequencyYMultiplier: string; + Tags: (string | RepositoryEntry)[]; + BobbingAngleXMultiplier: string | RepositoryEntry; + BobbingAngleYMultiplier: string | RepositoryEntry; + BobbingFrequencyXMultiplier: string | RepositoryEntry; + BobbingFrequencyYMultiplier: string | RepositoryEntry; CounterRotationFactorMultiplier: number | Float; - DragAnglesMultiplier: string; + DragAnglesMultiplier: string | RepositoryEntry; DragCorrectionFractionMultiplier: number | Float; DragCorrectionTimeMultiplier: number | Float; PulseIncreaseOnShootingMultiplier: number | Float; AdditionalAmmo: number | Float; - TargetMagazineTags: string[]; + TargetMagazineTags: (string | RepositoryEntry)[]; DamageFarMultiplier: number | Float; DamageMediumMultiplier: number | Float; DamageNearMultiplier: number | Float; @@ -356,18 +357,18 @@ export interface IRepositoryItemBase { BodyPartModifierHeadMultiplier: number | Float; BodyPartModifierLegMultiplier: number | Float; BodyPartModifierTorsoMultiplier: number | Float; - AmmoImpactEffect: string; - AmmoInFlightEffect: string; - Behaviours: string[]; + AmmoImpactEffect: string | RepositoryEntry; + AmmoInFlightEffect: string | RepositoryEntry; + Behaviours: (string | RepositoryEntry)[]; GravityOverride: number | Float; - ImpactEffects: string[]; + ImpactEffects: (string | RepositoryEntry)[]; ScopeType: number | Float; - UIKey: string; - DeathContext: string; - DeathType: string; + UIKey: string | RepositoryEntry; + DeathContext: string | RepositoryEntry; + DeathType: string | RepositoryEntry; EffectsRangeMultiplier: number | Float; LiftMultiplier: number | Float; - MassImpulseType: string; + MassImpulseType: string | RepositoryEntry; PushOrigin: number | Float; RagdollImpulseMultiplier: number | Float; TargetRadii: number | Float; @@ -381,17 +382,17 @@ export interface IRepositoryItemBase { RotateMultiplier: number | Float; ShockwavePropagationSpeed: number | Float; TargetStrength: number | Float; - Type: string; + Type: string | RepositoryEntry; SetModelBodyPartSelections: (number | Float)[]; SetModelMuzzleExtensionSelection: number | Float; SetModelMuzzleExtensionSkinSelection: number | Float; SetModelScopeSelection: number | Float; SetModelScopeSkinSelection: number | Float; SetModelSkinSelections: (number | Float)[]; - Hint_: string; - Tags_: string[]; - SetSilenceRating: string; - SetScopeZoom: string[]; + Hint_: string | RepositoryEntry; + Tags_: (string | RepositoryEntry)[]; + SetSilenceRating: string | RepositoryEntry; + SetScopeZoom: (string | RepositoryEntry)[]; MuzzleVelocityMultiplier: number | Float; HealthPercentTimeoutMultiplier: number | Float; HealthPercentToFallMultiplier: number | Float; @@ -403,7 +404,7 @@ export interface IRepositoryItemBase { SetAllowScopeTimeSlowdown: boolean; ItemImpactUpkickMultiplier: number | Float; RagdollImpactUpkickMultiplier: number | Float; - SetThrowType: string; + SetThrowType: string | RepositoryEntry; UnconsciousTimeOnThrowMultiplier: number | Float; SetPiercing: boolean; SetAllowPrecisionTimeSlowdown: boolean; @@ -412,12 +413,12 @@ export interface IRepositoryItemBase { BurstAngleHMultiplier: number | Float; BurstAngleVMultiplier: number | Float; BurstRandomizationFactorMultiplier: number | Float; - Items: string[]; - Guids: string[]; - _popdensitycomment: string; + Items: (string | RepositoryEntry)[]; + Guids: (string | RepositoryEntry)[]; + _popdensitycomment: string | RepositoryEntry; } export interface IRepositoryConfiguration { - ID_: string; + ID_: string | RepositoryEntry; AdaptiveTriggerEmptyMode: number | Float; AllowPrecisionShot: boolean; BlindfirePrecisionModifier: number | Float; @@ -427,7 +428,7 @@ export interface IRepositoryConfiguration { CrosshairMaxAngleCap: number | Float; CrosshairOffset: number | Float; CrosshairScale: number | Float; - CrosshairType: string; + CrosshairType: string | RepositoryEntry; DamageClose: number | Float; DamageFar: number | Float; DamageMedium: number | Float; @@ -439,7 +440,7 @@ export interface IRepositoryConfiguration { HitsNumberTimeout: number | Float; ImpactForce: number | Float; InitialMagazines: number | Float; - MagazineConfigs: string[]; + MagazineConfigs: (string | RepositoryEntry)[]; MuzzleVelocity: number | Float; OTSCamPrecisionModifier: number | Float; PointShootingTagTime: number | Float; @@ -466,7 +467,7 @@ export interface IRepositoryConfiguration { RecoilVertialRange: number | Float; RecoilX: number | Float; RecoilZ: number | Float; - ScopeZoom: string[]; + ScopeZoom: (string | RepositoryEntry)[]; ShotsPerMinute: number | Float; SneakMovingPrecisionModifier: number | Float; SneakNotMovingPrecisionModifier: number | Float; @@ -488,35 +489,35 @@ export interface IRepositoryConfiguration { AllowAimAssist: boolean; AllowPrecisionTimeSlowdown: boolean; AllowScopeTimeSlowdown: boolean; - AmmoType: string; + AmmoType: string | RepositoryEntry; AnalogPrecisionModeThreshold: number | Float; AnalogShootThreshold: number | Float; - BobbingAngleX: string; - BobbingAngleY: string; - BobbingFrequencyX: string; - BobbingFrequencyY: string; + BobbingAngleX: string | RepositoryEntry; + BobbingAngleY: string | RepositoryEntry; + BobbingFrequencyX: string | RepositoryEntry; + BobbingFrequencyY: string | RepositoryEntry; BodyPartModifierArm: number | Float; BodyPartModifierHand: number | Float; BodyPartModifierLeg: number | Float; BodyPartModifierTorso: number | Float; BurstAngleH: number | Float; BurstAngleV: number | Float; - BurstPattern: string; + BurstPattern: string | RepositoryEntry; BurstRandomizationFactor: number | Float; CounterRotationFactor: number | Float; CrosshairDisplayHelpWhenNotAiming: boolean; CrosshairModifierVisualOffset: number | Float; - DeathImpactEffect: string; - DragAngles: string; + DeathImpactEffect: string | RepositoryEntry; + DragAngles: string | RepositoryEntry; DragCorrectionFraction: number | Float; DragCorrectionTime: number | Float; FullAutoOperation: boolean; HitsNumberToFall: number | Float; - ImpactEffect: string; + ImpactEffect: string | RepositoryEntry; MaxRange: number | Float; MuzzleEnergy: number | Float; PacifyTarget: boolean; - Perks: string[]; + Perks: (string | RepositoryEntry)[]; Piercing: boolean; PointShootingAllowed: boolean; PointShootingCoolDownTime: number | Float; @@ -548,7 +549,7 @@ export interface IRepositoryConfiguration { ScopeFOV: number | Float; ScopeFOV_VR: number | Float; ScopeModePrecisionDegree: number | Float; - SilenceRating: string; + SilenceRating: string | RepositoryEntry; StandNotMovingPrecisionModifier: number | Float; ZRecoilDistance: number | Float; ZRecoilDistance_VR: number | Float;