/* called by: entrance ctrl of the object 'track', | Z3 G! ?; G# x/ e* Q2 h, H- @
*/& x5 J0 p) c9 C/ o
is0 \% f$ w" N0 D/ K- S H3 g% I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 [6 l; {& H: a- W4 o2 @6 Xdo
# |: \4 g( n# ^4 n8 w x Lan := rootfolder.Internal.Tools.AOLlanguage;
+ D* y1 x* t" g" R! a: e if current = @.Destination -- else return2 q- p+ E! _' Y$ U+ m
then
1 h( j, ?+ y# ^ @.Destination := void; h# d' S' {( e! t" F0 @4 y
if @.occupied then" A4 V2 c/ J, ?: x% |
part := @.cont;
* X9 } M( g# R$ c# |5 p1 n" K @.transpOrder := void;
; B8 L& [' I5 G2 ~' V' a9 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# p1 y5 c- U# y
@,root.eventcontroller.simTime);
3 e, h. Z5 q! o; B# j( n @.HasOrder := false;
7 I% s# j% i+ q% U, a @.DrivingHome := true;8 t* [: c; I$ N, R
rgManager.tryToStartTransOrder;
- c2 D/ B( N9 Z/ H- Y% Q7 w) b if @.Destination = void
N+ c/ D1 ^3 A7 @" E# i5 [ then -- no transport order for vehicle @! \- q; R6 b: A; A. D% C
@.Destination :=
( w' G0 N# c- p4 E* b# y, w3 u3 t rgManager.nearestFreeStation(@,track.~);$ H/ q+ L# C, m8 L9 l; k* k0 z
newDirection(@); 0 z5 c' a6 K, l% w% I0 B
if @.Destination /= void then4 O1 Y2 T: \9 n3 ?( P8 s
@.Destination.NumReservation :=
/ y! p3 ~5 Z' N3 W9 E' C @.Destination.NumReservation + 1;' r+ `+ l a- T) @! Q* q# J
end;
$ [8 T4 c, j0 j @.CurrIcon := "drivingHome";0 K& b/ n$ ?5 k( O) k1 [- e8 j
@.DrivingHome := true;
; Z. C( Q4 T, b5 s% D* f5 ~9 ^% f+ ? end;
1 y1 m! w4 ]$ U$ m8 n6 v# J% m else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 u6 y! |0 Z5 X# }
part := @.transpOrder;) d* K" d! S4 E- M- E. S
part.move(@);-- load part
9 o. D, q# [7 g/ c- e! P2 R0 o6 X2 b" F& z @.CurrIcon := "load";
3 g+ C( R" N: L& f* \; o' h GlobalDistObj := part.globDestination;
$ A! H2 {4 Z, m; T/ x3 p v assignLObj := rgmanager.rgAssignL;
2 E4 L2 ?3 S' m5 n) d, v row := assignLObj.getRowNo(GlobalDistObj);
8 c! ^7 q. C$ K- j" x3 i3 N if Row = -1 then -- since 70! T2 E: V8 W, y
if lan=1 then6 I; o. L& r0 h. ` S) j+ S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# K9 |) ], x9 L, s8 E7 ]9 u3 O9 j to_str("in der Andockstation: \"",?.~.name,"\""));) \# r# q. k7 @
else7 H7 J& Y+ |0 E$ V; P# b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 H8 s. L: x8 h1 W to_str("in docking station: \"",?.~.name,"\""));
0 k- s5 W# X' u- @ end;' Z7 ~! V. a5 G! L3 d1 a
else
* T: u2 v% `/ P @.Destination := assignLObj[1,row];: E/ P& e- E3 D/ S8 H9 `' W+ z
end; % j7 U- D" n* _7 ~' q% k1 d4 K
newDirection(@);
3 r4 a, G3 G' ^. v" @* q @.HasOrder := true;. q0 Y2 B8 {- c2 G- G! g! X& `
end;, D' z \& o( s( m- c/ Q$ p& M! P
end;
( Q4 K3 U4 B. d5 pend; -- of the method! p5 H8 T( ^- H8 ]/ ~7 j- W: k
|