/* called by: entrance ctrl of the object 'track'
- D9 k' I, Z( F% i*/$ Z: w; q, p* T( _+ @
is% a/ G. D R5 L8 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 e: u3 B) n* l5 a9 Edo
' ~! C, [5 O& J9 I$ E9 s3 \6 L Lan := rootfolder.Internal.Tools.AOLlanguage;
# g3 n# F% Y) X3 A. } if current = @.Destination -- else return j! c: m% ~/ A- r4 W
then0 ]; p+ s, i. T' ?/ m
@.Destination := void;2 t2 ~7 a& j4 B
if @.occupied then
4 m8 G' l* X6 z4 w, X! D+ T# O part := @.cont;
6 c5 y# r) q5 ]3 P5 r @.transpOrder := void;. ~+ T, M8 p1 v% }) K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- @' j6 _# j2 m# m' O) K! o8 }! P* c @,root.eventcontroller.simTime);% M3 A: v5 y+ w4 a% L; D
@.HasOrder := false;! x( T. d. ^5 t4 I0 k- C
@.DrivingHome := true;9 f) N- r. N6 E) N! u6 X
rgManager.tryToStartTransOrder;
. Z' |* d7 C0 X$ X! }6 p if @.Destination = void, V% U2 |+ l1 h( u+ E( `
then -- no transport order for vehicle @
1 [! y* x4 Z3 A8 W @.Destination :=# C5 z$ j: @8 l: y: k; M
rgManager.nearestFreeStation(@,track.~);
: c2 n4 @% L8 k' w newDirection(@);
7 a, \# K) Q5 s0 T5 ^/ D( m& N if @.Destination /= void then" r4 X" \2 @( h% j1 I
@.Destination.NumReservation :=! g; R( S" m" v5 K5 z) C
@.Destination.NumReservation + 1;( ~4 P) x+ ]6 F
end;4 H, L+ r) q6 P
@.CurrIcon := "drivingHome";; X" _) r: k5 c# c/ L% @; u
@.DrivingHome := true;- @, D4 I! P1 V8 ^6 G
end;
* C s; f; d7 t! H! N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# Y* F! n9 |- U) L" f part := @.transpOrder;
' s) w: G, g6 L3 p( H$ X+ V+ p, X part.move(@);-- load part& O, X/ S( ~7 ^- y; ?, W( S
@.CurrIcon := "load";
* f5 {& ?# j0 S+ o# P GlobalDistObj := part.globDestination;
1 C( x6 G6 X0 s5 B. c6 J assignLObj := rgmanager.rgAssignL;
4 I# p4 v$ Q; D; g% b row := assignLObj.getRowNo(GlobalDistObj);
# k8 |8 l/ K5 q, o) e$ e if Row = -1 then -- since 70
9 U4 M5 a% M! U3 ^ if lan=1 then
7 A2 d$ |8 f. ~0 t+ |0 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# g' H5 I3 B; j5 x to_str("in der Andockstation: \"",?.~.name,"\""));
3 K! y6 \: `9 i( R else, ?- u7 w" l. }1 e# ^# ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," a! B! p* l8 R" L6 c8 \
to_str("in docking station: \"",?.~.name,"\""));
, B/ V8 V+ ?/ T: k4 \: D9 t' C( G. E# S end;
4 ?5 N* | y7 ^ else! ]0 o# F6 j9 W) i4 t" L% y, d
@.Destination := assignLObj[1,row];
8 m( f: F' o2 x( B4 _: i o# _ end; ! L, t. k& O m2 z* F) a
newDirection(@);
& p# d) S6 C6 d0 F9 U* b: p) i @.HasOrder := true;* g( n1 T0 U& ?
end;# t) e; H/ C+ H
end;8 ]( \$ `9 y! Z E0 g+ ^
end; -- of the method+ o' P: T' }; O/ D7 n2 s* Q
|