/* called by: entrance ctrl of the object 'track'8 N9 s- _: k/ K
*/
( T2 \7 u# R6 [is
' z( O$ J- R. u7 ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;) D' G$ r7 S0 H
do
; P1 u D/ B6 T" h1 ]' q# _ Lan := rootfolder.Internal.Tools.AOLlanguage;" G7 q# |; b6 ]
if current = @.Destination -- else return. r1 j; c; d/ H7 l8 S; ^( h1 Z
then" i' o0 `0 n) \8 @( c+ Q
@.Destination := void;2 }* o% s! x+ F% ~; Y
if @.occupied then* M) Q5 ^( R, V; {2 \- k
part := @.cont;
; W) w* f4 z8 u( X2 D @.transpOrder := void;1 h T2 U# e/ k+ E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, e( L; X2 W( d3 X+ M
@,root.eventcontroller.simTime);4 y( m& W6 A) n9 v4 {+ D% Z" J
@.HasOrder := false;
$ T0 W( \1 A0 }( T: W/ G @.DrivingHome := true;
R: e/ h+ U' P- F& e rgManager.tryToStartTransOrder;9 O( i4 [$ n6 C8 f6 p; ^
if @.Destination = void
) d G- r0 P( m7 N6 c1 V% q) M' l& v8 j then -- no transport order for vehicle @
0 A* c/ ~2 P# J6 b) X* y @.Destination :=
* J- K J& F7 C, \0 r+ ]0 h- ]+ C: D rgManager.nearestFreeStation(@,track.~);
* P- x" d* Z( ? L5 i7 ?: @ newDirection(@); $ G- c1 M& H0 P4 M x
if @.Destination /= void then
9 C5 O, ?0 S5 `; B/ x; { @.Destination.NumReservation :=' x% R0 w- \* f: ]6 u% D
@.Destination.NumReservation + 1;1 K9 H& V+ @$ N' \. `
end;. c3 {+ a( @) J9 n3 c
@.CurrIcon := "drivingHome";& ^. B( h" p5 c# K! J
@.DrivingHome := true;
E1 o8 t+ |* t. p, o& E$ G, f end;
+ F1 C1 f; a2 ~# c8 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 {4 Z4 B+ a7 r/ c6 e4 I6 C
part := @.transpOrder;# `6 @1 p" l9 _ O. s
part.move(@);-- load part, ]$ h$ H' U# r7 c U" I4 f5 Y6 d
@.CurrIcon := "load";% P3 h7 t! C# [) d$ v
GlobalDistObj := part.globDestination;% n/ @% } [' k2 [$ [7 V3 _
assignLObj := rgmanager.rgAssignL;
* m2 G* j8 m+ J" Y( x row := assignLObj.getRowNo(GlobalDistObj);
# z; p! G# q2 i if Row = -1 then -- since 70
- L# y- m% {) c( g if lan=1 then
; k; _+ L5 S! f1 b# F promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* l1 z! K$ Q$ e5 [( e& W9 H# n2 }& r to_str("in der Andockstation: \"",?.~.name,"\""));# d) q* b6 n% x1 ?1 X# f
else
+ v" P Z) E# B4 s! z1 Q* L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ ^8 f% q8 I+ F; @8 t% y$ B* V
to_str("in docking station: \"",?.~.name,"\""));
, A/ b- `2 v% o5 o2 S end;
3 M3 R4 u M) J" \ else4 M, M/ H6 } W* q- \' V& d
@.Destination := assignLObj[1,row];
' Z9 c1 j' B6 x" ]" `" i- R. |- C end;
5 v" O/ m. a7 d* \* |3 n2 L2 i newDirection(@);
+ J3 w8 B/ q; A+ m @.HasOrder := true;
$ z4 p* o% W1 V/ G' D end;) X8 b( ]6 H' t
end;
( ~# ~* _# b2 y% v& e+ bend; -- of the method( \$ l$ c0 K0 _4 j' I# t
|