
    rfd#                        % S SK r S SKJr  S SKJr  S SKJrJrJrJ	r	J
r
JrJr  S SKJrJrJrJr  Sr\\S4   \S'   S	R+                  \" \\5      5      r\\S
'   SSSSSSSSS S S/ S.r\\\4   \S'    0 SS_SS_SS_SS_SS_SS_SS_SS_S S!_S"S#_S$S%_S&S'_S(S)_S*S+_S,S-_S.S/_S0S1_S2S3S4S5.ES6S7S8S9.S:S;S<S=S>S?S@.SA.r\\\\\4   4   \SB'   0 r\\\\\S4      4   \SC'   \" 5       r\
\   \SD'   SE\ R<                  SF\4SG jrSE\ R<                  SFS4SH jr \ RB                  " SISJ5       H  r"\ " \"5        M     \#" 5       RI                  \5        \%" \RM                  5       5      r'\(       a	  SK\SF\	4SL jr( " SM SN\5      r)\" \)" 5       5        g)O    N)
namedtuple)wraps)TYPE_CHECKINGAnyDict
NamedTupleSetTupleType)ModPrioritiesModTypesRegisterModSDKMod)   r   .__version_info__.__version__ g        F)StrPropertyObjectPropertyComponentPropertyClassPropertyNamePropertyInterfacePropertyDelegatePropertyFloatPropertyIntPropertyBytePropertyBoolPropertyArrayProperty_PROP_DEFAULTS_BY_TYPE   	Unnamed_1   	Unnamed_2   	Unnamed_3	   	Unnamed_4
   	Unnamed_5   	Unnamed_6   Cinematic_1   Cinematic_2   Cinematic_3   Cinematic_4   Cinematic_5   Cinematic_6   Cinematic_7   Cinematic_8   Cinematic_9   Cinematic_10   
Gameplay_1
Gameplay_2
Gameplay_3
Gameplay_4)         USER_FLAG_1USER_FLAG_2USER_FLAG_3)   r"   r$   Left_45Right_45Left_90Right_90Left_180	Right_180)r            rM   r"   )LightingChannelContainerNxDestructibleDepthParametersTurnData_KNOWN_FIELD_OVERRIDES_all_structs_known_duplicate_namesstructreturnc                     U R                   nU R                   [        ;   a4  U R                  n U R                   S-   U-   nU R                   [        ;   a  M4  U$ )a  
Gets the name to use for this struct.

Will use the base name if it's unique, otherwise prefixes with the outer object name and an
 underscore - e.g. `NavigationPoint_CheckpointRecord`.

Args:
    struct: The struct to get the name of.
Returns:
    The struct's name.
_)Namer\   Outer)r]   names     [Z:\mnt\Skyabridged\SteamLibrary\steamapps\common\Borderlands 2\sdk_mods\Structs\__init__.py_get_struct_namere   S   sN     D
++/
/ {{S 4'	 ++/
/
 K    c           	        ^ ^
^^^ T R                   [        ;   az  [        T R                      R                  T :X  a  g[        R	                  T R                   5        [        T R                      R                  n[        T R                   	 [        U5        [        T 5      [        ;   a  g/ m/ nT R                  nU(       a  TR                  UR                   5        UR                  R                   S:X  aV  UR                  5       n[        T 5      [        ;  a  [        U5        UR                  [        UR                      " 5       5        O,UR                  [        UR                  R                      5        UR                  nU(       a  M  [        T 5      n[        R                  U0 5      R                  5        H
  u  pgUTU'   M     [!        UTUS9nT Ul        UR"                  mS[$        R&                  S[(        S[*        [,           S[.        4U 4S jjmS	[,        S[(        S[,        4U
U4S
 jjm
[1        T5      S[*        [.           S[,        S[,        S[.        4U
UUU 4S jj5       n	Xl        U[        U'   g)z
Defines a named tuple for the given struct.

Does nothing if it already exists.

Args:
    struct: The struct to create a named tuple of.
NStructProperty)defaultsfstructfield_errorexpected_typer^   c           
      p  > [        U[        5      (       d8  [        STR                  U R                  5       SU SUR
                   S35      eU R                  UR                  :w  aG  [        STR                  U R                  5       SU STR                  UR                  5       S35      eU" U 5      $ )aE  
Helper function which converts an FStruct into it's named tuple.

Args:
    fstruct: The FStruct to convert.
    field: The name of the field this struct was extracted from, used for error messages.
    expected_type: The type this field was expected to be.
Returns:
    The named tuple representation of the given FStruct.
zGot a struct 'z' to field 'z', expected 'z'!z!Got struct of incompatible type ')
issubclasstuple	TypeErrorPathName
structType__name___unreal)rj   rk   rl   r]   s      rd   convert_fstruct'_define_struct.<locals>.convert_fstruct   s    " -// 1C1C!D E\R]Q^ _+445R9  !6!663FOOGDVDV4W3X Y&-}V__]EZEZ5[4\\^` 
 W%%rf   argc                   > [        U [        R                  5      (       a,  [        U 5       VVs/ s H  u  p#T" X1 SU S35      PM     snn$ [        U [        R                  5      (       a#  T" X[
        [        U R                  5         5      $ [        U [        R                  5      (       a  U R                  $ U $ s  snnf )a  
Helper function to handle FArray, FStruct and FScriptInterface arguments.

Recursively converts and FArray into an array.
Converts an FStruct arg into a named tuple.
Changes an FScriptInterface into the ObjectPointer of that FScriptInterface

Args:
    arg: The Argument to handle.
    field_error: The name of the field this struct was extracted from, used for error
                 messages.
Returns:
    The new argument.
[])

isinstance	unrealsdkFArray	enumerateFStructr[   re   rr   FScriptInterfaceObjectPointer)rw   rk   idxaconvert_argru   s       rd   r   #_define_struct.<locals>.convert_arg   s     c9++,,JSTW.Y.K]!C5#:;.YYc9,,--"3\BRSVSaSaBb5cddc95566$$$
 Zs   B<clsargskwargsc           	      6  > [        U5      S:X  ad  [        U5      S:X  aU  [        US   [        R                  5      (       a3   US   R                  T:X  a  T	 Vs/ s H  n[        US   U5      PM     nn[        U5       VVs/ s H  u  pVT" UT	U   5      PM     nnnUR                  5        VVs0 s H  u  pvUUT	;   a  T" Xg5      OU_M     nnnT
" U /UQ70 UD6$ s  snf ! [         a   n[        R                  " U5         S nANS nAff = fs  snnf s  snnf )Nr   r   )
lenr{   r|   r   rr   getattrAttributeErrorLogr~   items)r   r   r   fieldexr   valkeyr   fieldsold_newr]   s           rd   new_define_struct.<locals>.new   s(    t9>c&kQ.:d1gyGXGX3Y3Y"7%%/AGHGDGU3DH &dO
+ VC[)+ 	 
 #LLN
 + &= C% 	 + 	 
 s,T,V,,' I! "b!!"

s6   C" C3C" D1DC" "
D,DD)ra   r[   rt   r\   add_define_structre   ChildrenappendClass	GetStructr!   NextrZ   getr   r   __new__r|   r   strr   r   r   r   )r]   other_structri   propnested_structrc   r   actual_fieldtupr   r   ru   r   r   s   `         @@@@rd   r   r   h   s    {{l"$,,6""6;;/#FKK088%|$ </FH
 ??D
dii 
 ::??.. NN,M'|;}-OOL););<>?OO24::??CDyy $  F#D377bAGGI"s J T6H
5CCK kkG&""&& Cy& 
	&< 3 3  . 7^-j! -# - - - - -4 KLrf   ScriptStructTrc   c                     [         e)N)NotImplementedError)rc   s    rd   __getattr__r      s    !!rf   c                       \ rS rSr% Sr\\S'   Sr\\S'   Sr\\S'   \	r
\\S'   \R                  r\\S	'   \R                  r\\S
'   Sr\\S'   0 r\\\4   \S'   Srg)_Structsi  Structsra   	apple1417AuthorzJProvides functionality for other mods, but does not do anything by itself.DescriptionVersionTypesPriorityz#<font color="#00FF00">Loaded</font>StatusSettingsInputs N)rs   
__module____qualname____firstlineno__ra   r   __annotations__r   r   r   r   r   Libraryr   r   r   r   r   r   __static_attributes__r   rf   rd   r   r     sm    D#FCT   GS&&E8&+33Hm39FC9%'NDcN'rf   r   )*r|   collectionsr   	functoolsr   typingr   r   r   r   r	   r
   r   Mods.ModMenur   r   r   r   r   intr   joinmapr   r   r!   rZ   r[   setr\   UStructre   r   FindAll_structglobalsupdatelistkeys__all__r   r   r   rf   rd   <module>r      s    "  I I I E E$* %S/ *88C%567S 7 * S#X "	!	;!	;! 	
;! 	
;	!
 	K! 	K! 	M! 	M! 	M! 	M! 	M! 	M! 	M! 	M! 	M!  	N!!" 	L#!$ )!. & 9$5 S$sCx.01 $N 24d3U38_--. 3#&5 C (Y.. 3 *J9,, J JZ   6G7 7 	   
|  "
# "# "* "
(v ( HJ rf   