// September 2015 // Levee Patroller / Dijk Patrouille // This source file is (c) by Deltares. This source file is open source but only available to select users. Do not redistribute without written permission of Stichting Deltares, Delft, The Netherlands. // This header has been automatically generated. //============================================================================= // Definition of zones where there is a non reportable // ------------------------------------------------------------ // Created by Maarten van Zomeren // Copied from Failure // © 2007, Geodelft // // Date Id Modification // // 2007-11-09 Jln Added some additional error checking. //============================================================================= class NonReportable extends Volume DependsOn(SignalReport); var LocationNameSign MapLocationSign; var(NonReportableSpecialActors) edfindable Actor TempActor; //This variable is not used for the failure, only to help placing actors in the editor var(NonReportableSpecialActors) export editinline GraphicalActors OnlyVisibleIfActive; //List of actors that will only be visible if NonReportable is active var(NonReportableSpecialActors) export editinline GraphicalActors OnlyVisibleIfNotActive; //List of actors that will only be visible if NonReportable is inactive var bool bActive; // If dike failure is active var bool bDetected; // If the failure was detected rightly var bool bReported; // If it was already reported function PostNetBeginPlay() { Super.PostNetBeginPlay(); CheckLocationSign(); } //***************************************************************************** // Will automaticly update the NonReportable name location to the closest one //***************************************************************************** function CheckLocationSign() { local bool FirstSign; local actor A; local float TempDist; // CHECK THE CLOSEST LOCATION SIGN FirstSign = true; foreach DynamicActors( class 'Actor', A, 'LocationNameSign') if((TempDist > Abs(VSize(Location - A.Location))) || FirstSign) { MapLocationSign=LocationNameSign(A); TempDist = Abs(VSize(Location - A.Location)); FirstSign = false; } } function StartTrigger() { if(bActive) { //Just for testing } } function ActivateNonReportables(bool bActiveTemp) { bActive=bActiveTemp; //Log("Reportable is set on " @name @bActive); if(bActive) { if (OnlyVisibleIfActive != None) { OnlyVisibleIfActive.SetVisible(); } else { Log("[NonReportable] Warning: OnlyVisibleIfActive is empty. This is very likely to be a problem!"); } if (OnlyVisibleIfNotActive != None) OnlyVisibleIfNotActive.SetInVisible(); } else { if (OnlyVisibleIfActive != None) { OnlyVisibleIfActive.SetInVisible(); } else { Log("[NonReportable] Warning: OnlyVisibleIfActive is empty. This is very likely to be a problem!"); } if (OnlyVisibleIfNotActive != None) OnlyVisibleIfNotActive.SetVisible(); } } defaultproperties { LocationName="Damage Zone" bReported=false bDetected=false }