初级玩家

- 贡献度
- 0
- 金元
- 370
- 积分
- 37
- 精华
- 0
- 注册时间
- 2021-7-6
|
从第13行全部更改
public virtual void UpdateProhibitionType(bool check_is_snapped = true, Construction decoration_align_construction = null)
{
if (!this.m_BoxCollider)
{
return;
}
this.m_RaincutterCollider = null;
if (this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.IsSnapped) && !this.m_ConstructionToAttachTo && EnumTools.IsItemToAttachToTree(this.m_ResultItemID) && this.m_SelectedSlot != null)
{
if (this.m_SelectedSlot.m_Construction != null || this.m_SelectedSlot.m_Ghost != null)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
Vector3 center = this.m_BoxCollider.bounds.center;
Vector3 vector = this.m_BoxCollider.size * 0.5f;
center.y += this.m_ColliderShrinkBottom * 0.5f;
vector.y -= this.m_ColliderShrinkBottom;
vector.y = Mathf.Max(vector.y, 0f);
int num = Physics.OverlapBoxNonAlloc(center, vector, ConstructionGhost.s_CollidersTemp, this.m_BoxCollider.transform.rotation);
for (int i = 0; i < num; i++)
{
Collider collider = ConstructionGhost.s_CollidersTemp[i];
ConstructionGhost constructionGhost = collider.gameObject.GetComponent<ConstructionGhost>();
if (!constructionGhost && collider.gameObject.transform.parent)
{
constructionGhost = collider.gameObject.GetComponentInParent<ConstructionGhost>();
}
if (constructionGhost && constructionGhost != this && constructionGhost.m_ResultItemID == this.m_ResultItemID)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
return;
}
else
{
if (this.GetConstructForbidden() == ConstructionGhost.ConstructForbidden.Forbidden)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (this.m_UseExpandedBoundsTocheckRegrowingTrees)
{
this.UpdateExpandedBounds();
}
if (this.AreExtendedBoundsCollidingWithTrunk() || this.AreExtendedBoundsCollidingWithRegrowingTree())
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (!this.m_CanBePlacedOnTopOfConstruction && this.m_OnTopOfConstruction)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (check_is_snapped && this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.IsSnapped) && !this.m_ConstructionToAttachTo)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (this.m_SelectedSlot)
{
foreach (ConstructionSlot constructionSlot in this.m_SelectedSlot.gameObject.GetComponents<ConstructionSlot>())
{
if (constructionSlot.m_Construction && constructionSlot.m_Construction.gameObject.activeSelf && (!constructionSlot.m_Construction.m_Info.IsWall() || this.m_ResultInfo.IsWall()) && (constructionSlot.m_Construction.m_Info.IsWall() || !this.m_ResultInfo.IsWall()))
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
if (ItemInfo.IsStoneRing(this.m_ResultItemID) && this.m_Firecamp && this.m_Firecamp.m_StoneRing)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (this.m_Corners != null)
{
foreach (BoxCollider boxCollider in this.m_Corners)
{
bool enabled = boxCollider.enabled;
boxCollider.enabled = true;
bool flag = this.IsInAir(boxCollider.bounds.center, boxCollider.bounds.min);
boxCollider.enabled = enabled;
if (flag)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
if (this.IsOnUpperLevel() && this.m_UpperLevelCorners != null)
{
foreach (BoxCollider boxCollider2 in this.m_UpperLevelCorners)
{
bool enabled2 = boxCollider2.enabled;
boxCollider2.enabled = true;
Vector3 center2 = boxCollider2.bounds.center;
center2.y += boxCollider2.bounds.max.y;
bool flag2 = this.IsCornerInAir(center2, boxCollider2.bounds.min);
boxCollider2.enabled = enabled2;
if (flag2)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
if (this.m_AllignToTerrain && !this.m_Smoker && this.m_FirecampRacks.Count == 0 && Vector3.Angle(base.transform.up, Vector3.up) > this.m_MaxAllignAngle)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
Vector3 center3 = this.m_BoxCollider.bounds.center;
Vector3 vector2 = this.m_BoxCollider.size * 0.5f;
center3.y += this.m_ColliderShrinkBottom * 0.5f;
vector2.y -= this.m_ColliderShrinkBottom;
vector2.y = Mathf.Max(vector2.y, 0f);
this.m_Colliders.Clear();
if (this.m_TestColliders != null)
{
foreach (BoxCollider boxCollider3 in this.m_TestColliders)
{
Vector3 size = boxCollider3.size;
size.x *= boxCollider3.transform.localScale.x;
size.y *= boxCollider3.transform.localScale.y;
size.z *= boxCollider3.transform.localScale.z;
int num2 = Physics.OverlapBoxNonAlloc(boxCollider3.bounds.center, size * 0.5f, ConstructionGhost.s_CollidersTemp, boxCollider3.transform.rotation);
for (int k = 0; k < num2; k++)
{
Collider collider2 = ConstructionGhost.s_CollidersTemp[k];
Anthill anthill;
if (collider2.TryGetComponent<Anthill>(out anthill))
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (!this.m_Colliders.Contains(collider2) && !this.m_TestColliders.Contains(collider2))
{
if (this.m_ResultItemID != ItemID.TroughFood && this.m_ResultItemID != ItemID.TroughInsects && this.m_ResultItemID != ItemID.TroughWater && collider2.gameObject.GetComponent<Farm>())
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (collider2.isTrigger && !collider2.gameObject.GetComponent<ConstructionGhost>())
{
Spikes component = collider2.gameObject.GetComponent<Spikes>();
Acre exists = collider2.gameObject.transform.parent ? collider2.gameObject.transform.parent.GetComponent<Acre>() : null;
FramePlacingObstacle component2 = collider2.gameObject.GetComponent<FramePlacingObstacle>();
ConstructBlockSensor component3 = collider2.gameObject.GetComponent<ConstructBlockSensor>();
if (component3)
{
if (this.ShouldIgnoreConstructionBlocker(component3))
{
goto IL_727;
}
this.TryToShowRestrictedAreaHint();
}
if (!component && !exists && !component2 && !component3)
{
goto IL_727;
}
}
if (!(collider2.gameObject == Terrain.activeTerrain.gameObject) && !(collider2.transform.parent == base.transform))
{
this.m_Colliders.Add(collider2);
}
}
IL_727:;
}
}
}
else
{
int num3 = Physics.OverlapBoxNonAlloc(center3, vector2, ConstructionGhost.s_CollidersTemp, this.m_BoxCollider.transform.rotation);
this.m_Colliders.Resize(num3);
for (int l = 0; l < num3; l++)
{
this.m_Colliders[l] = ConstructionGhost.s_CollidersTemp[l];
}
}
this.m_Colliders.Remove(Player.Get().m_Collider);
this.m_Colliders.Remove(this.m_BoxCollider);
if (this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.NeedFirecamp) && this.m_Firecamp)
{
this.m_Colliders.Remove(this.m_Firecamp.m_Collider);
if (this.m_Firecamp.m_StoneRing)
{
this.m_Colliders.Remove(this.m_Firecamp.m_StoneRing.m_Collider);
}
}
if ((ItemInfo.IsFirecamp(this.m_ResultItemID) || ItemInfo.IsStoneRing(this.m_ResultItemID)) && this.m_FirecampRacks.Count > 0)
{
foreach (FirecampRack firecampRack in this.m_FirecampRacks)
{
this.m_Colliders.Remove(firecampRack.m_Collider);
}
}
if ((ItemInfo.IsFirecamp(this.m_ResultItemID) || ItemInfo.IsStoneRing(this.m_ResultItemID)) && this.m_Smoker)
{
this.m_Colliders.Remove(this.m_Smoker.m_Collider);
}
if (ConstructionChainController.Get().IsActive())
{
using (List<ConstructionGhostChain>.Enumerator enumerator3 = ConstructionChainController.Get().m_Chain.GetEnumerator())
{
while (enumerator3.MoveNext())
{
ConstructionGhostChain constructionGhostChain = enumerator3.Current;
Collider[] components2 = constructionGhostChain.GetComponents<Collider>();
this.m_Colliders.Remove(constructionGhostChain.m_Collider);
for (int m = 0; m < components2.Length; m++)
{
this.m_Colliders.Remove(components2[m]);
}
}
goto IL_A41;
}
}
if (ConstructionFenceController.Get().IsActive())
{
foreach (ConstructionGhost constructionGhost2 in ConstructionFenceController.Get().m_Chain)
{
Collider[] components3 = constructionGhost2.GetComponents<Collider>();
this.m_Colliders.Remove(constructionGhost2.m_Collider);
for (int n = 0; n < components3.Length; n++)
{
this.m_Colliders.Remove(components3[n]);
}
BoxCollider lastStoredBoxCollider = ConstructionFenceController.Get().GetLastStoredBoxCollider();
if (lastStoredBoxCollider)
{
this.m_Colliders.Remove(lastStoredBoxCollider);
}
}
if (this.m_FenceSnapCollider != null)
{
this.m_Colliders.Remove(this.m_FenceSnapCollider);
}
if (ConstructionFenceController.Get().m_FenceSnapCollider != null)
{
this.m_Colliders.Remove(ConstructionFenceController.Get().m_FenceSnapCollider);
}
}
IL_A41:
if (General.IsTrough(this.m_ResultItemID))
{
bool flag3 = false;
using (List<Collider>.Enumerator enumerator5 = this.m_Colliders.GetEnumerator())
{
while (enumerator5.MoveNext())
{
if (enumerator5.Current.gameObject.GetComponent<Farm>() != null)
{
flag3 = true;
break;
}
}
}
if (!flag3)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
if (base.GetType() == typeof(DecorationGhost))
{
using (List<Collider>.Enumerator enumerator6 = this.m_Colliders.GetEnumerator())
{
while (enumerator6.MoveNext())
{
Construction construction;
if (enumerator6.Current.gameObject.TryGetComponent<Construction>(out construction) && !(this.m_SelectedSlot != null) && construction != (this as DecorationGhost).m_ConstructionParent && !construction.m_IsFrame && (this as DecorationGhost).m_AlignType == DecorationGhost.AlignType.Wall && construction != (this as DecorationGhost).m_MovableConstruction.GetBaseConstruction())
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
}
if (this.m_ResultItemID != ItemID.Stick_Fish_Trap && this.m_ResultItemID != ItemID.Big_Stick_Fish_Trap)
{
foreach (Collider collider3 in this.m_Colliders)
{
Item component4 = collider3.gameObject.GetComponent<Item>();
if (!(component4 != null) || component4.m_Info == null || component4.m_Info.IsConstruction() || component4.m_IsPlant || component4.m_IsTree)
{
Farm component5 = collider3.gameObject.GetComponent<Farm>();
if (component5)
{
if (!General.IsTrough(this.m_ResultItemID))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (General.IsTrough(this.m_ResultItemID) && this.m_Colliders.Contains(component5.m_DoorArea))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
if (collider3.isTrigger)
{
if ((this.m_ResultItemID == ItemID.building_frame || this.m_ResultItemID == ItemID.building_bamboo_frame || this.m_ResultItemID == ItemID.wooden_frame_triangle || this.m_ResultItemID == ItemID.bamboo_frame_triangle) && collider3.gameObject.GetComponent<FramePlacingObstacle>())
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
UnityEngine.Object component6 = collider3.gameObject.GetComponent<Spikes>();
Acre exists2 = collider3.gameObject.transform.parent ? collider3.gameObject.transform.parent.GetComponent<Acre>() : null;
ConstructBlockSensor component7 = collider3.gameObject.GetComponent<ConstructBlockSensor>();
if (component6 || exists2 || component7)
{
if (component7)
{
if (this.ShouldIgnoreConstructionBlocker(component7))
{
continue;
}
this.TryToShowRestrictedAreaHint();
}
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
ConstructionGhost component8 = collider3.gameObject.GetComponent<ConstructionGhost>();
if (!(component8 != null))
{
continue;
}
if (component8.m_ResultItemID == ItemID.mud_mixer)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
using (List<GhostStep>.Enumerator enumerator8 = component8.m_Steps.GetEnumerator())
{
while (enumerator8.MoveNext())
{
GhostStep ghostStep = enumerator8.Current;
foreach (GhostSlot ghostSlot in ghostStep.m_Slots)
{
if (base.m_Collider.bounds.Intersects(ghostSlot.m_Collider.bounds))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
continue;
}
}
if (!this.m_ConstructionToAttachTo || (!(collider3.gameObject == this.m_ConstructionToAttachTo.gameObject) && !(collider3.gameObject == Terrain.activeTerrain.gameObject)))
{
ConstructionGhost component9 = collider3.gameObject.GetComponent<ConstructionGhost>();
if (component9 != null)
{
foreach (GhostStep ghostStep2 in component9.m_Steps)
{
foreach (GhostSlot ghostSlot2 in ghostStep2.m_Slots)
{
if (base.m_Collider.bounds.Intersects(ghostSlot2.m_Collider.bounds))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
}
Construction construction2 = collider3.gameObject.GetComponent<Construction>();
if (!construction2 && collider3.gameObject.transform.parent)
{
construction2 = collider3.gameObject.GetComponentInParent<Construction>();
}
if (construction2)
{
if (!(construction2 == this.m_ConstructionToAttachTo) && (!decoration_align_construction || !(decoration_align_construction == construction2)) && (this.IsBalcony(this.m_ResultItemID) || this.IsFrameTriangle(this.m_ResultItemID) || this.IsFrameTriangle(construction2.GetInfoID()) || (this.m_ConstructionToAttachTo && this.IsFrameTriangle(this.m_ConstructionToAttachTo.GetInfoID())) || !this.m_ConstructionToAttachTo || !this.m_ConstructionToAttachTo.IsConstructionConnected(construction2)))
{
if (ConstructionChainController.Get().IsActive())
{
if (ConstructionChainController.Get().IsStartOrEnd(construction2))
{
continue;
}
if (construction2.m_Info.IsWall())
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
bool flag4 = false;
for (int num4 = 0; num4 < 2; num4++)
{
Construction construction3 = (num4 == 0) ? ConstructionChainController.Get().GetStartConstructionToAttachTo() : ConstructionChainController.Get().GetEndConstructionToAttachTo();
if (construction3 && !this.IsBalcony(this.m_ResultItemID) && !this.IsFrameTriangle(this.m_ResultItemID) && !this.IsFrameTriangle(construction2.GetInfoID()) && (!this.m_ConstructionToAttachTo || !this.IsFrameTriangle(construction3.GetInfoID())) && construction3 && construction3.IsConstructionConnected(construction2))
{
flag4 = true;
break;
}
}
if (flag4)
{
continue;
}
}
if (this.m_SelectedSlot && this.m_SelectedSlot.m_ParentConstruction)
{
int num5 = this.m_SelectedSlot.m_UpperLevelSlot ? (this.m_SelectedSlot.m_ParentConstruction.m_Level + 1) : this.m_SelectedSlot.m_ParentConstruction.m_Level;
if (construction2.m_Level != num5 || (this.IsFrameTriangle(this.m_SelectedSlot.m_ParentConstruction.m_Info.m_ID) && (this.m_ResultItemID == ItemID.FreeHandsLadder || this.m_ResultItemID == ItemID.FreeHandsLadder_bamboo)))
{
continue;
}
}
if ((!this.IsOnUpperLevel() || construction2.m_Level != 0) && (this.IsOnUpperLevel() || construction2.m_Level <= 0))
{
DecorationGhost decorationGhost = this as DecorationGhost;
if (!decorationGhost || !(decorationGhost.GetResultConstruction() == construction2))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
}
else
{
ConstructionGhost exists3 = null;
if (collider3.transform.parent)
{
exists3 = collider3.transform.parent.GetComponent<ConstructionGhost>();
}
if ((!this.m_IgnoreCollisionWithTerrain || !(collider3.GetType() == typeof(TerrainCollider))) && !collider3.gameObject.IsWater() && !this.m_LayerMasksToIgnore.Contains(collider3.gameObject.layer) && !collider3.isTrigger && !exists3 && !this.HackForTreePlatformFloor(collider3) && !this.HackForTreeHouse(collider3))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
}
}
}
if (this.m_ResultItemID == ItemID.farm)
{
center3 = this.m_BoxCollider.bounds.center;
vector2 = this.m_BoxCollider.size * 0.5f;
vector2.y = Mathf.Max(vector2.y, 0f);
int num6 = Physics.OverlapBoxNonAlloc(center3, vector2, ConstructionGhost.s_CollidersTemp, this.m_BoxCollider.transform.rotation);
this.m_Colliders.Resize(num6);
for (int num7 = 0; num7 < num6; num7++)
{
this.m_Colliders[num7] = ConstructionGhost.s_CollidersTemp[num7];
}
this.m_Colliders.Remove(Player.Get().m_Collider);
this.m_Colliders.Remove(this.m_BoxCollider);
}
Collider collider4 = null;
foreach (Collider collider5 in this.m_Colliders)
{
if (collider5.gameObject.IsWater())
{
collider4 = collider5;
break;
}
}
if (this.m_PlacingCondition == ConstructionGhost.GhostPlacingCondition.CantBeInRaincutter || this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.CantBeInRaincutter))
{
foreach (Collider collider6 in this.m_Colliders)
{
if (collider6.gameObject.IsRaincutter())
{
this.m_RaincutterCollider = collider6;
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
}
}
if (this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.MustBeInWater) && !collider4)
{
if (this.m_Hook)
{
center3 = this.m_Hook.bounds.center;
vector2 = this.m_Hook.size * 0.5f;
int num8 = Physics.OverlapBoxNonAlloc(center3, vector2, ConstructionGhost.s_CollidersTemp, this.m_Hook.transform.rotation);
for (int num9 = 0; num9 < num8; num9++)
{
if (ConstructionGhost.s_CollidersTemp[num9].gameObject.IsWater())
{
return;
}
}
}
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.MustBeInWater) && collider4 && this.m_Hook)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if ((this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.CantBeInWater) || this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.NeedFirecamp)) && collider4)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (collider4 && this.m_MaxDepthOfWater > 0f && collider4.bounds.max.y - this.m_BoxCollider.bounds.min.y > this.m_MaxDepthOfWater)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.Depth;
return;
}
if (this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.Whatever) || this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.CantBeInWater) || this.m_ResultItemID == ItemID.bamboo_platform || this.m_ResultItemID == ItemID.bamboo_platform_triangle)
{
List<GameObject> list = new List<GameObject>();
foreach (Collider collider7 in this.m_Colliders)
{
if (this.m_LayerMasksToIgnore.Contains(collider7.gameObject.layer) && collider7.gameObject.layer != this.m_ItemLayer && !collider7.gameObject.transform.root.GetComponent<DeadBody>() && !(collider7.GetComponent<Weapon>() != null) && !collider7.GetComponent<PaintingBrush>())
{
if (collider7.transform.root.GetComponent<ElevatorStand>())
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (!this.m_CollidingPlants.ContainsKey(collider7.gameObject))
{
this.AddCollidingPlant(collider7.gameObject);
}
list.Add(collider7.gameObject);
}
}
int num10 = 0;
while (num10 < this.m_CollidingPlants.Keys.Count)
{
if (!list.Contains(this.m_CollidingPlants.ElementAt(num10).Key))
{
this.RemoveCollidingPlant(this.m_CollidingPlants.ElementAt(num10).Key);
}
else
{
num10++;
}
}
}
if (this.m_ConstructionBelow && this.m_ConstructionBelow.m_Level >= 3)
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
if (this.m_CollidingPlants.Count > 0)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
EternalFireArea overlappingArea = EternalFireArea.GetOverlappingArea(base.transform.position);
if (this.m_AdditionalPlacingConditions.Contains(ConstructionGhost.GhostPlacingCondition.MustBeInEternalArea) && (!overlappingArea || overlappingArea.IsBusy()))
{
this.ClearCollidingPlants();
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
this.m_EternalFireArea = overlappingArea;
bool flag5 = false;
foreach (Collider collider8 in this.m_Colliders)
{
if (collider8 == null)
{
return;
}
Anthill anthill2;
if (collider8.TryGetComponent<Anthill>(out anthill2))
{
flag5 = true;
break;
}
ElevatorStand elevatorStand;
if (collider8.transform.root.TryGetComponent<ElevatorStand>(out elevatorStand))
{
flag5 = true;
break;
}
if (!(base.GetType() != typeof(DecorationGhost)))
{
Decoration decoration;
if (collider8.transform.root.TryGetComponent<Decoration>(out decoration) && (this as DecorationGhost).m_MovableConstruction.GetBaseConstruction().m_BoxCollider != decoration.m_BoxCollider)
{
flag5 = true;
break;
}
DecorationShelf decorationShelf;
if (collider8.transform.root.TryGetComponent<DecorationShelf>(out decorationShelf) && (this as DecorationGhost).m_MovableConstruction.GetBaseConstruction().m_BoxCollider != decorationShelf.m_BoxCollider)
{
flag5 = true;
break;
}
}
}
if (flag5)
{
this.m_ProhibitionType = ConstructionGhost.ProhibitionType.None;
return;
}
return;
}
}
}
|
|