// 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. //============================================================================= // Object that contains informations of signal seen // See sub classes for more information // ------------------------------------------------------------ // Created by Rui Guimaraes // © 2006, Geodelft // // Date Id Modification // 2006-08-11 The Implemented IsEqual // 2006-08-16 The Added published var FirstState (needed for scoring) // 2006-09-29 bas Removed deprecated variable I added earlier (bChanged) // 2007-07-11 Wsl Created function Duplicate() //============================================================================= class Signal extends Object; var() export editinline array SignalReports; var() GeoEnums.GeoStates FirstState; // This is the first state where the signal will be visible; // it is necessary for determining the max possible score // for the signals. var localized string NL_DamageName; var localized string EN_DamageName; var bool bCalled; // if the player has called about the LAST report for this signal // with the action center (regardless whether it was approved or not) var bool bApproved; // if the LAST report for this signal // has been approved by the action center var bool bReported; // If the signal was reported correctly var bool bSignalUsedInScoreCalculations; //This variable is only used in the calculations of the score. When a Signal scores a point in score accuracy this variable is set to true. var enum GeoSignalTypes { SIG_RipRapPitching, SIG_GrassRevetment, SIG_Crack, SIG_Settlement, SIG_HorizontalMovement, SIG_Uprise, SIG_Liquefaction, SIG_WaterOutflow, SIG_OverToppingWash, SIG_FloatingWasteOther, SIG_HumanActivity, SIG_BioActivity, SIG_NONE } SignalType; enum GeoYesNo { GEO_Yes, GEO_No, GEO_NONE }; var() enum GeoCutLocation { CUT_Top, CUT_OuterSlope, CUT_InnerSlope, CUT_ForeLand, CUT_HinterLand, CUT_NONE } CrossCutLocation; Enum GeoSizes { SIZE_VerySmall, SIZE_Small, SIZE_Medium, SIZE_MediumLarge, SIZE_Large, SIZE_VeryLarge, SIZE_NONE }; Enum GeoRevetments { REV_Grass, REV_Asphalt, REV_RipRap, REV_PitchingStone, REV_None }; Enum SettlementPositions { SET_Inwards, SET_Outwards, SET_Entire, SET_None }; Enum CrackTypes { CRK_Perpendicular, CRK_Parallel, CRK_NONE }; Enum OverType { OVER_Topping, OVER_Wash, OVER_NONE }; Enum RiskFactor { RISK_FloatingWaste, RISK_StrongCurrent, RISK_ShipWaves, RISK_CabelsPipes, RISK_ConstructionWork, RISK_Traffic, RISK_ChangesDike, RISK_NonWaterObjects, RISK_Tree, RISK_WaterQuality, RISK_Mole, RISK_Muskrat, RISK_Rabbit, RISK_SmallCattle, RISK_BigCattle, RISK_OtherBioActivity, RISK_None }; //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function Signal Duplicate() { return none; /// #### IMPLEMENTED IN SUBCLASSES, USING GetSignalDuplicate() #### /// } //============================================================================= // Date Id Modification // 2007-07-11 Wsl Created //============================================================================= function Signal GetSignalDuplicate() { local Signal returner; local class signalReportType; local int i; switch (self.SignalType) { case SIG_RipRapPitching: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportRipPitching", class'Class')); returner = new class'SignalRipPitching'; break; case SIG_GrassRevetment: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportGrass", class'Class')); returner = new class'SignalGrass'; break; case SIG_Crack: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportCrack", class'Class')); returner = new class'SignalCrack'; break; case SIG_Settlement: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportSettlement", class'Class')); returner = new class'SignalSettlement'; break; case SIG_HorizontalMovement: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportHorizontalMovement", class'Class')); returner = new class'SignalHorizontalMovement'; break; case SIG_Uprise: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportUprise", class'Class')); returner = new class'SignalUprise'; break; case SIG_Liquefaction: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportLiquefaction", class'Class')); returner = new class'SignalLiquefaction'; break; case SIG_WaterOutflow: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportWaterOutflow", class'Class')); returner = new class'SignalWaterOutflow'; break; case SIG_OverToppingWash: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportOverToppingWash", class'Class')); returner = new class'SignalOverToppingWash'; break; case SIG_FloatingWasteOther: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportFloatingWaste", class'Class')); returner = new class'SignalFloatingWaste'; break; case SIG_HumanActivity: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportHumanActivity", class'Class')); returner = new class'SignalHumanActivity'; break; case SIG_BioActivity: signalReportType = class(DynamicLoadObject("GeoSimulator.SignalReportBioActivity", class'Class')); returner = new class'SignalBioActivity'; break; } returner.SignalType = self.SignalType; returner.FirstState = self.FirstState; returner.NL_DamageName = self.NL_DamageName; returner.EN_DamageName = self.EN_DamageName; returner.bCalled = self.bCalled; returner.bApproved = self.bApproved; returner.bReported = self.bReported; returner.bSignalUsedInScoreCalculations = self.bSignalUsedInScoreCalculations; returner.CrossCutLocation = self.CrossCutLocation; // then recursively make sure all the SignalReport-objects // in the SignalReports-array are duplicated as well returner.SignalReports.length = self.SignalReports.length; for(i = 0; i < returner.SignalReports.length; i++) { //log("doing SignalReport["$i$"]"); returner.SignalReports[i] = self.SignalReports[i].Duplicate(signalReportType); } return returner; } //============================================================================= // Date Id Modification // 2006-08-11 The Created //============================================================================= function bool IsEqual(Signal ASignal) { local bool LIsEqual; LIsEqual = (SignalType == ASignal.SignalType); LIsEqual = LIsEqual && (CrossCutLocation == ASignal.CrossCutLocation); return LIsEqual; } //============================================================================= // Date Id Modification // 2007-06-29 Zmr Created //============================================================================= function bool IsSignalEqual(int ThisSignalReportNr,Signal ASignal,int ThatSignalReportNr, float AScoreFractionThreshold, out int ACorrectCount, out int APossibleCount) { local bool LIsEqual; if(ThisSignalReportNr AScoreFractionThreshold); //Log("Signal.IsEqual(): Correct = "$ACorrectCount$"; Possible = "$APossibleCount$"; Threshold = "$AScoreFractionThreshold); //Log("Signal.IsEqual(): LIsEqual = "$LIsEqual); return (LIsEqual); } /* * Function only for debugging purposes */ function toLog() { local signalreport sigrep; log("Signal.bCalled:"@bCalled); log("Signal.bApproved:"@bApproved); log("Signal.bReported:"@bReported); if(SignalReports[0]!=none) { sigrep = SignalReports[0]; log("Signal.sigrep.bChanged:"@sigrep.bChanged); log("Signal.sigrep.bReported:"@sigrep.bReported); log("Signal.sigrep.bApproved:"@sigrep.bApproved); log("Signal.sigrep.bCalled:"@sigrep.bCalled); } } //============================================================================= // Date Id Modification // 2006-10-25 The Created this header //============================================================================= defaultproperties { NL_DamageName="Signaal Algemeen" EN_DamageName="General Signal" SignalType=SIG_NONE CrossCutLocation=CUT_NONE bApproved=false bCalled=false bReported=false bSignalUsedInScoreCalculations = false }