# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/common/items/components/gun_components.py from collections import namedtuple from items.components import legacy_stuff from soft_exception import SoftException from wrapped_reflection_framework import reflectedNamedTuple from wrapped_reflection_framework import ReflectionMetaclass RecoilEffect = reflectedNamedTuple( 'RecoilEffect', ('lodDist', 'amplitude', 'backoffTime', 'returnTime')) class GunShot(legacy_stuff.LegacyStuff): __slots__ = ('shell', 'defaultPortion', 'piercingPower', 'speed', 'gravity', 'maxDistance', 'maxHeight') __metaclass__ = ReflectionMetaclass def __init__(self, shell, defaultPortion, piercingPower, speed, gravity, maxDistance, maxHeight): super(GunShot, self).__init__() self.shell = shell self.defaultPortion = defaultPortion self.piercingPower = piercingPower self.speed = speed self.gravity = gravity self.maxDistance = maxDistance self.maxHeight = maxHeight def __repr__(self): return 'GunShot(shell = {}, ppower = {}, speed = {}, gravity = {}, maxDistance = {}, maxHeight = {}))'.format( self.shell, self.piercingPower, self.speed, self.gravity, self.maxDistance, self.maxHeight)
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/common/items/components/chassis_components.py from collections import namedtuple from copy import deepcopy from wrapped_reflection_framework import reflectedNamedTuple, ReflectionMetaclass from items.components import component_constants from items.components import path_builder from items.components import shared_components __all__ = ('Wheel', 'WheelGroup', 'TrackNode', 'TrackBasicParams', 'GroundNode', 'GroundNodeGroup', 'Traces', 'LeveredSuspensionConfig', 'SuspensionLever', 'SplineSegmentModelSet') Wheel = reflectedNamedTuple('Wheel', ('index', 'isLeft', 'radius', 'nodeName', 'isLeading', 'leadingSyncAngle', 'hitTester', 'materials', 'position')) WheelGroup = reflectedNamedTuple('WheelGroup', ('isLeft', 'template', 'count', 'startIndex', 'radius')) WheelsConfig = reflectedNamedTuple('WheelsConfig', ('groups', 'wheels')) TrackNode = reflectedNamedTuple('TrackNode', ('name', 'isLeft', 'initialOffset', 'leftNodeName', 'rightNodeName', 'damping', 'elasticity', 'forwardElasticityCoeff', 'backwardElasticityCoeff')) TrackBasicParams = reflectedNamedTuple('TrackBasicParams', ('lodDist', 'leftMaterial', 'rightMaterial', 'textureScale', 'pairsCount')) TrackSplineParams = reflectedNamedTuple('TrackSplineParams', ('thickness', 'maxAmplitude', 'maxOffset', 'gravity')) GroundNode = namedtuple('GroundNode', ('nodeName', 'affectedWheelName', 'isLeft', 'minOffset', 'maxOffset', 'collisionSamplesCount', 'hasLiftMode')) GroundNodeGroup = namedtuple('GroundNodeGroup', ('isLeft', 'minOffset', 'maxOffset', 'nodesTemplate', 'affectedWheelsTemplate', 'nodesCount', 'startIndex', 'collisionSamplesCount', 'hasLiftMode')) Traces = reflectedNamedTuple('Traces', ('lodDist', 'bufferPrefs', 'textureSet', 'centerOffset', 'size', 'activePostmortem')) LeveredSuspensionConfig = namedtuple('LeveredSuspensionConfig', ('levers', 'interpolationSpeedMul', 'lodSettings', 'activePostmortem')) SuspensionLever = namedtuple('SuspensionLever', ('startNodeName', 'jointNodeName', 'trackNodeName', 'minAngle', 'maxAngle', 'collisionSamplesCount', 'hasLiftMode', 'affectedWheelName')) SplineSegmentModelSet = reflectedNamedTuple('SplineSegmentModelSet', ('left', 'right', 'secondLeft', 'secondRight')) class SplineConfig(object): __metaclass__ = ReflectionMetaclass __slots__ = ('__segmentModelSets', '__leftDesc', '__rightDesc', '__lodDist', '__atlasUTiles', '__atlasVTiles') def __init__(self, segmentModelSets=None, leftDesc=None, rightDesc=None, lodDist=None, atlasUTiles=component_constants.ZERO_INT, atlasVTiles=component_constants.ZERO_INT): super(SplineConfig, self).__init__() self.__segmentModelSets = {} segmentModelSets = segmentModelSets or {} for setName, setPaths in segmentModelSets.iteritems():
else: class i18n(object): @classmethod def makeString(cls, key): raise SoftException('Unexpected call "i18n.makeString"') __all__ = ('MaterialInfo', 'DEFAULT_MATERIAL_INFO', 'EmblemSlot', 'LodSettings', 'NodesAndGroups', 'Camouflage', 'DEFAULT_CAMOUFLAGE', 'SwingingSettings', 'I18nComponent', 'DeviceHealth', 'ModelStatesPaths') MaterialInfo = reflectedNamedTuple( 'MaterialInfo', ('kind', 'armor', 'extra', 'multipleExtra', 'vehicleDamageFactor', 'useArmorHomogenization', 'useHitAngle', 'useAntifragmentationLining', 'mayRicochet', 'collideOnceOnly', 'checkCaliberForRichet', 'checkCaliberForHitAngleNorm', 'damageKind', 'chanceToHitByProjectile', 'chanceToHitByExplosion', 'continueTraceIfNoHit')) DEFAULT_MATERIAL_INFO = MaterialInfo(0, 0, None, False, 0.0, False, False, False, False, False, False, False, 0, 0.0, 0.0, False) EmblemSlot = reflectedNamedTuple( 'EmblemSlot', ('rayStart', 'rayEnd', 'rayUp', 'size', 'hideIfDamaged', 'type', 'isMirrored', 'isUVProportional', 'emblemId', 'slotId', 'applyToFabric')) class CustomizationSlotDescription(object): __metaclass__ = ReflectionMetaclass __slots__ = ('type', 'slotId', 'anchorPosition', 'anchorDirection',
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/common/items/components/chassis_components.py from collections import namedtuple from copy import deepcopy from wrapped_reflection_framework import reflectedNamedTuple, ReflectionMetaclass from items.components import component_constants from items.components import path_builder from items.components import shared_components __all__ = ('Wheel', 'WheelGroup', 'TrackPair', 'TrackNode', 'TrackBasicVisualParams', 'GroundNode', 'GroundNodeGroup', 'Traces', 'LeveredSuspensionConfig', 'SuspensionLever', 'SplineSegmentModelSet') Wheel = reflectedNamedTuple('Wheel', ('index', 'isLeft', 'radius', 'nodeName', 'isLeading', 'leadingSyncAngle', 'hitTesterManager', 'materials', 'position')) Wheel.hitTester = property(lambda self: self.hitTesterManager.activeHitTester) WheelGroup = reflectedNamedTuple('WheelGroup', ('isLeft', 'template', 'count', 'startIndex', 'radius')) WheelsConfig = reflectedNamedTuple('WheelsConfig', ('groups', 'wheels')) TrackPair = namedtuple('TrackPair', ('hitTesterManager', 'materials', 'healthParams', 'breakMode')) TrackPair.hitTester = property(lambda self: self.hitTesterManager.activeHitTester) TrackNode = reflectedNamedTuple('TrackNode', ('name', 'isLeft', 'initialOffset', 'leftNodeName', 'rightNodeName', 'damping', 'elasticity', 'forwardElasticityCoeff', 'backwardElasticityCoeff')) TrackBasicVisualParams = reflectedNamedTuple('TrackBasicVisualParams', ('lodDist', 'trackPairs')) TrackPairParams = reflectedNamedTuple('TrackPairParams', ('leftMaterial', 'rightMaterial', 'textureScale', 'tracksDebris')) TrackPairDebris = reflectedNamedTuple('TrackPairDebris', ('left', 'right')) TrackDebrisParams = reflectedNamedTuple('TrackDebrisParams', ('destructionEffect', 'physicalParams', 'destructionEffectData', 'nodesRemap')) PhysicalTrackDebrisParams = reflectedNamedTuple('PhysicalTrackDebrisParams', ('hingeJointStiffness',)) TrackSplineParams = reflectedNamedTuple('TrackSplineParams', ('thickness', 'maxAmplitude', 'maxOffset', 'gravity')) GroundNode = namedtuple('GroundNode', ('nodeName', 'affectedWheelName', 'isLeft', 'minOffset', 'maxOffset', 'collisionSamplesCount', 'hasLiftMode')) GroundNodeGroup = namedtuple('GroundNodeGroup', ('isLeft', 'minOffset', 'maxOffset', 'nodesTemplate', 'affectedWheelsTemplate', 'nodesCount', 'startIndex', 'collisionSamplesCount', 'hasLiftMode')) Traces = reflectedNamedTuple('Traces', ('lodDist', 'bufferPrefs', 'textureSet', 'centerOffset', 'size', 'activePostmortem')) LeveredSuspensionConfig = reflectedNamedTuple('LeveredSuspensionConfig', ('levers', 'interpolationSpeedMul', 'lodSettings', 'activePostmortem')) SuspensionLever = reflectedNamedTuple('SuspensionLever', ('startNodeName', 'jointNodeName', 'trackNodeName', 'minAngle', 'maxAngle', 'collisionSamplesCount', 'hasLiftMode', 'affectedWheelName')) SplineSegmentModelSet = reflectedNamedTuple('SplineSegmentModelSet', ('left', 'right', 'secondLeft', 'secondRight')) class SplineTrackPairDesc(object): __metaclass__ = ReflectionMetaclass
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/common/items/components/sound_components.py from collections import namedtuple from wrapped_reflection_framework import ReflectionMetaclass, reflectedNamedTuple __all__ = ('SoundPair', 'StatedSounds', 'HullAimingSound', 'SoundSiegeModeStateChange', 'WWTripleSoundConfig') SoundPair = reflectedNamedTuple('SoundPair', ('PC', 'NPC')) StatedSounds = reflectedNamedTuple('StatedSounds', ('state', 'underLimitSounds', 'overLimitSounds')) HullAimingSound = reflectedNamedTuple('HullAimingSound', ('lodDist', 'angleLimitValue', 'sounds')) SoundSiegeModeStateChange = namedtuple('SoundSiegeModeStateChange', ['on', 'off', 'npcOn', 'npcOff', 'isEngine']) class WWTripleSoundConfig(object): __slots__ = ('__eventNames',) __metaclass__ = ReflectionMetaclass def __init__(self, wwsound, wwsoundPC, wwsoundNPC): super(WWTripleSoundConfig, self).__init__() self._configure(wwsound, wwsoundPC, wwsoundNPC) def _configure(self, wwsound, wwsoundPC, wwsoundNPC): if wwsoundPC: if wwsoundNPC: self.__eventNames = (wwsoundPC, wwsoundNPC) else: self.__eventNames = (wwsoundPC, wwsound) elif wwsoundNPC: self.__eventNames = (wwsound, wwsoundNPC) else:
# Python bytecode 2.7 (decompiled from Python 2.7) # Embedded file name: scripts/common/items/components/component_constants.py import collections from soft_exception import SoftException from wrapped_reflection_framework import reflectedNamedTuple Autoreload = collections.namedtuple( 'Autoreload', ['reloadTime', 'boostStartTime', 'boostResidueTime', 'boostFraction']) DualGun = reflectedNamedTuple('DualGun', [ 'chargeTime', 'shootImpulse', 'reloadLockTime', 'reloadTimes', 'rateTime', 'chargeThreshold', 'afterShotDelay', 'preChargeIndication', 'chargeCancelTime' ]) UNDEFINED_ITEM_TYPE_ID = 0 ZERO_FLOAT = 0.0 ZERO_INT = 0 EMPTY_STRING = '' EMPTY_TUPLE = () INFLUENCE_ALL = 0 INFLUENCE_ALLY = 1 INFLUENCE_ENEMY = 2 class _ReadOnlyDict(dict): def __setitem__(self, key, value): raise SoftException('ReadOnlyDict set item attempt %s=>%s' % (key, value)) def update(self, E=None, **F): raise SoftException('ReadOnlyDict update attempt %s, %s' % (E, F))