6 class SCR_SupportStationAreaMeshComponent : SCR_BaseAreaMeshComponent
8 [
Attribute(
desc:
"Set NONE to get first found support station. Else it will find the specific support station of the same type. It will always search itself, the parent, compartments and the compartments of the parents to find the SupportStation", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(
ESupportStationType),
category:
"Support Station")]
11 [
Attribute(
"{6FD8A355A2011A46}Assets/Editor/VirtualArea/VirtualArea_SupportStation_Disabled.emat",
desc:
"Material mapped on outside and inside of the mesh when support station is disabled. Inside mapping is mirrored.", uiwidget: UIWidgets.ResourcePickerThumbnail,
params:
"emat",
category:
"Virtual Area")]
14 [
Attribute(
"1",
desc:
"Used when mesh area is a child of the Support Station. This will make sure that the preview displayed when placing is the correct size",
category:
"Support Station")]
42 if (supportStation && supportStation.GetOwner() != owner && supportStation.GetOwner() != owner.GetParent())
45 Print(
"'SCR_SupportStationAreaMeshComponent' is on a child entity yet the m_fRadius (" +
m_fRadius +
") is not equal to the support Station range (" + supportStation.GetRange() +
") make sure it is equal else the preview will not show correctly", LogLevel.ERROR);
47 Print(
"'SCR_SupportStationAreaMeshComponent' is on a child entity yet the m_fRadius (" +
m_fRadius +
") is not equal to the support Station range (" + Math.Sqrt(supportStation.GetRange()) +
") make sure it is equal else the preview will not show correctly", LogLevel.ERROR);
50 return supportStation;
60 return super.GetMaterial();
83 Print(
"'SCR_SupportStationAreaMeshComponent' (" + owner +
") Component must be attached to enity with SCR_BaseSupportStationComponent! BasePrefab should not have a support Station component", LogLevel.WARNING);
88 GetGame().GetCallqueue().CallLater(
Init, param1: owner);
97 protected void Init(IEntity owner)
105 Print(
"'SCR_SupportStationAreaMeshComponent' (" + owner +
") Component must be attached to enity with SCR_BaseSupportStationComponent! BasePrefab should not have a support Station component", LogLevel.WARNING);
115 if (offset != vector.Zero)
119 vector localTransform[4];
120 owner.GetLocalTransform(localTransform);
122 if (localTransform[3] != offset)
123 Print(
"'SCR_SupportStationAreaMeshComponent' (" + owner +
") linked support station (" +
typename.EnumToString(
ESupportStationType,
m_SupportStationComponent.GetSupportStationType()) +
") has an offset but the local position of the area mesh is: '" + localTransform[3] +
"' were as the support station offset is '" + offset +
"' this must be the same else the zone shows an incorrect area!", LogLevel.ERROR);
127 Print(
"'SCR_SupportStationAreaMeshComponent' (" + owner +
") linked support station (" +
typename.EnumToString(
ESupportStationType,
m_SupportStationComponent.GetSupportStationType()) +
") has an offset but the support station is on the same entity as the mesh so no offset could be given. Make the mesh a child entity of the support station else the zone shows an incorrect area!", LogLevel.ERROR);
142 super.OnDelete(owner);