// 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 is accepted to mark as damage dike // Only zone with highest priority will be analysed // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // 2006-10-05 The Implemented Failed state //============================================================================= class Failure extends Volume DependsOn(SignalReport); var() export editinline array Signals; // List of failure signal present in this failure var() export editinline array Measures; // List of measures that this failure accepts var LocationNameSign MapLocationSign; var() GeoEnums.FailingMechanisms Mechanism; //the actual failure mechanism filled in by the level designer var GeoEnums.GeoStates CurrentState; var RedMarker CurrentRedMarker; //The red marker which is in the failure. var bool bIsSetStable; // If player has set the failure as stable var() enum TypeOfLevee { LT_PrimaryLevee, LT_RegionalLevee, LT_PeatLevee }LeveeType; var(FailureSpecialActors) edfindable Actor TempActor; //This variable is not used for the failure, only to help placing actors in the editor var(FailureSpecialActors) export editinline GraphicalActors OnlyVisibleIfActive; //List of actors that will only be visible if failure is active var(FailureSpecialActors) export editinline GraphicalActors OnlyVisibleIfNotActive; //List of actors that will only be visible if failure is inactive var(FailureName) string NL_FailureName, EN_FailureName; 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 is probably not the same as bReported in the signals var bool bNotFailure; // Shouldn't be changed, only when marker is putted out of volume var bool bRelevant; // If failure is Relevant var bool bCritical; // If failure is Critical var bool bReportable; // If failure is Reportable var bool bFailed; // If failure is Failed function PostNetBeginPlay() { Super.PostNetBeginPlay(); CheckLocationSign(); } //***************************************************************************** // Will automaticly update the failure 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 ActivateFailures(bool bActiveTemp) { bActive=bActiveTemp; log("Failure is set on " @bActive); if(bActive) { OnlyVisibleIfActive.SetVisible(); OnlyVisibleIfNotActive.SetInVisible(); } else { OnlyVisibleIfNotActive.SetVisible(); OnlyVisibleIfActive.SetInVisible(); } } defaultproperties { LocationName="Damage Zone" bReported=false bDetected=false bIsSetStable=false LeveeType=LT_PrimaryLevee CurrentState=STA_Reportable NL_FailureName="NL General Failure" EN_FailureName="General Failure" CurrentRedMarker = none; bRelevant=false bCritical=false bReportable=false bFailed=false }