-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvehicleCustomizationComponent.Script
More file actions
84 lines (74 loc) · 3.16 KB
/
Copy pathvehicleCustomizationComponent.Script
File metadata and controls
84 lines (74 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import struct VehicleDecalAttachmentData
{
import var componentToAttachTo : CName;
import var decalReference : ResRef;
public static function FromRecord( record : VehicleDecalAttachment_Record ) : VehicleDecalAttachmentData
{
var ret : VehicleDecalAttachmentData;
ret.componentToAttachTo = record.ComponentToAttachTo();
ret.decalReference = record.DecalResource();
return ret;
}
}
import struct VehicleClearCoatOverrides
{
import var opacity : Float;
import var coatTintFwd : Color;
import var coatTintSide : Color;
import var coatTintFresnelBias : Float;
import var coatSpecularColor : Color;
import var coatFresnelBias : Float;
public static function FromRecord( record : VehicleClearCoatOverrides_Record ) : VehicleClearCoatOverrides
{
var ret : VehicleClearCoatOverrides;
ret.opacity = record.Opacity();
if( record.GetCoatTintFwdCount() >= 3 )
{
ret.coatTintFwd = Color( ( ( Uint8 )( record.GetCoatTintFwdItem( 0 ) ) ), ( ( Uint8 )( record.GetCoatTintFwdItem( 1 ) ) ), ( ( Uint8 )( record.GetCoatTintFwdItem( 2 ) ) ), 255 );
}
else
{
ret.coatTintFwd = Color( 0, 0, 0, 0 );
}
if( record.GetCoatTintSideCount() >= 3 )
{
ret.coatTintSide = Color( ( ( Uint8 )( record.GetCoatTintSideItem( 0 ) ) ), ( ( Uint8 )( record.GetCoatTintSideItem( 1 ) ) ), ( ( Uint8 )( record.GetCoatTintSideItem( 2 ) ) ), 255 );
}
else
{
ret.coatTintSide = Color( 0, 0, 0, 0 );
}
ret.coatTintFresnelBias = record.CoatTintFresnelBias();
if( record.GetCoatSpecularColorCount() >= 3 )
{
ret.coatSpecularColor = Color( ( ( Uint8 )( record.GetCoatSpecularColorItem( 0 ) ) ), ( ( Uint8 )( record.GetCoatSpecularColorItem( 1 ) ) ), ( ( Uint8 )( record.GetCoatSpecularColorItem( 2 ) ) ), 255 );
}
else
{
ret.coatSpecularColor = Color( 0, 0, 0, 0 );
}
ret.coatFresnelBias = record.CoatFresnelBias();
return ret;
}
}
import struct VehiclePartsClearCoatOverrides
{
import var partsName : array< CName >;
import var overrides : VehicleClearCoatOverrides;
public static function FromRecord( record : VehiclePartsClearCoatOverrides_Record ) : VehiclePartsClearCoatOverrides
{
var ret : VehiclePartsClearCoatOverrides;
ret.partsName = record.PartsName();
ret.overrides = VehicleClearCoatOverrides.FromRecord( record.OverridesHandle() );
return ret;
}
}
importonly class VehicleCustomizationComponent extends IComponent
{
public import final function SetComponentExcludedFromCustomization( componentsExcludedFromCustomization : array< CName > );
public import final function SetupGenericCustomization( componentsExcludedFromMask : array< CName >, mask : ResRef, packedColorA : Float, packedColorB : Float, isInstant : Bool, affectRims : Bool );
public import final function SetupUniqueCustomization( customMultilayers : array< VehicleCustomMultilayer >, globalClearCoatOverrides : VehicleClearCoatOverrides, partsClearCoatOverrides : array< VehiclePartsClearCoatOverrides >, isInstant : Bool );
public import final function ShowUniqueCustomizationDecalsWithDisolve( decals : array< VehicleDecalAttachmentData > );
public import final function HideUniqueCustomizationDecalsWithDisolve();
public import final function SetDefaultDecalsEnabled( enabled : Bool );
}