/* called by: entrance ctrl of the object 'track'
+ L. V" P- l9 w+ _. r9 X, e*/
. X; D5 h! l* e7 @/ T2 `1 R0 p; sis1 c. k) }; Z* C( S, f# w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; F1 b- D s. }" ]do! E' ?4 s/ A" D1 B
Lan := rootfolder.Internal.Tools.AOLlanguage;
- l/ W3 V/ G2 N% G4 h if current = @.Destination -- else return
# H0 e6 [' W3 [& e! n7 ?6 ~( y& x then5 \ M% c0 K( _% [7 w- r3 l
@.Destination := void;- j9 c6 q i1 u% a# ^
if @.occupied then
) x! M* K9 a# y, `( ]+ Z part := @.cont;! @; j1 e7 a' T6 s
@.transpOrder := void;
4 c% C9 Q5 b) k7 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 \1 U3 p- F% `0 z; V- ^
@,root.eventcontroller.simTime);6 t7 X5 W& a! F
@.HasOrder := false;
9 E- Y9 l g0 ]- Z1 Y @.DrivingHome := true;8 [, |* U% r2 f6 ^% P' w# A' _ g9 y
rgManager.tryToStartTransOrder;
- k8 K3 l; @+ ~$ R2 S- ` X+ I if @.Destination = void
7 _: l2 [' j# t+ C then -- no transport order for vehicle @$ d6 V; _1 V, L6 ^! N
@.Destination :=7 y1 {8 h8 O7 A) M2 @4 S" r
rgManager.nearestFreeStation(@,track.~);
4 w+ L8 \% c% F) K newDirection(@); 7 R2 K& `. y* u7 i
if @.Destination /= void then
) G. G; J8 x* B3 z* v. o @.Destination.NumReservation :=% y `9 l" F0 q _* N6 X0 l
@.Destination.NumReservation + 1;; Z# g" J$ T2 k( _ F
end;
& }6 m0 L/ B5 ?' o2 A @.CurrIcon := "drivingHome";
" H3 ^! Y# ?1 D& u8 C0 m+ R. m @.DrivingHome := true;/ U8 z5 {+ r+ I! L$ @5 W
end;+ z7 j ]3 U" S; Z' C- m3 o- P: d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! h( W' a- D/ r& T part := @.transpOrder;8 j, f6 o8 w; z* m
part.move(@);-- load part
5 N( l6 E( T" @; F) V6 b/ m @.CurrIcon := "load";
$ K& [7 m1 O1 b4 j* [ GlobalDistObj := part.globDestination;
, J n3 P8 W. R0 b# t h- [ assignLObj := rgmanager.rgAssignL;
3 b0 `/ M' g1 E& ~ row := assignLObj.getRowNo(GlobalDistObj);
# f, B! l2 Y' q( q" V# c. q if Row = -1 then -- since 700 X6 Y6 f( q! ?
if lan=1 then
: N! E6 i" D$ i' V9 g. } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 o) s3 _9 {9 e* d. w6 l to_str("in der Andockstation: \"",?.~.name,"\""));, j5 a( i" J& B8 R
else
0 O8 b3 d% U% z+ U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! |" k0 U" C+ B. f8 `- c7 r to_str("in docking station: \"",?.~.name,"\"")); * n4 w* A( `5 }1 V9 R
end;
9 s5 x# P9 O! k4 V2 g7 s0 @. Y$ S else
' G4 N8 ?6 h" q2 q6 X @.Destination := assignLObj[1,row];) Z7 U, r) s' w& K+ U: A( q
end; ! ?/ D7 V: A" k" b9 A' l
newDirection(@);! Z4 I) Z. U7 K3 k7 e: q
@.HasOrder := true;. x2 Z6 E7 W" u# X
end;/ h! M. F8 e1 T4 z2 z
end;+ z) m+ w6 u3 V0 i$ |
end; -- of the method
$ k3 T: X5 y H) @ |