/* called by: entrance ctrl of the object 'track'5 V* Y4 B2 M' D( d9 l3 \% f
*/2 i$ a7 t' ^' C: t, c0 Z! ~8 C% y' X
is
- R+ b3 u8 ]! D) w4 J part, GlobalDistObj, assignLObj:object;row,Lan:integer; Q4 L4 H7 M0 G1 V. d
do0 e; Y4 \$ N0 {8 M% K" X
Lan := rootfolder.Internal.Tools.AOLlanguage;
: R8 i N6 u$ d9 r% x9 m2 l# l& a if current = @.Destination -- else return
# g: B3 c$ |* }1 ^' z; c4 a then; D: Y2 [6 S& P5 x8 s# `! l, x
@.Destination := void;$ s% Z$ _2 `/ L, I% J- L. t2 |
if @.occupied then* a4 h$ j# v+ w/ J+ a7 ]- @7 }/ z
part := @.cont;
# B& }+ t) A7 R5 V, a% [" P @.transpOrder := void;7 q. o# ]$ A4 v1 |' V/ Q. I+ k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' F4 N' C4 Q. Q, S @,root.eventcontroller.simTime);
* {, O# |/ ~* I5 T0 x' A0 J @.HasOrder := false;# T9 f0 v$ h f9 g: J
@.DrivingHome := true;* E) d/ S% Q& W: q$ |
rgManager.tryToStartTransOrder;
; p+ X' F( ^0 l- L( k if @.Destination = void% t5 ]; e3 x! s: v
then -- no transport order for vehicle @
+ ], k6 N! m1 E$ \' K( Y4 [ @.Destination :=, ~, \5 K! G' ~* ]8 h# U
rgManager.nearestFreeStation(@,track.~);
& f1 y9 B4 y: Z4 N) K: Y newDirection(@); 1 H I/ ]% m8 J
if @.Destination /= void then
4 i4 K) [' w2 s* |! U0 v* J1 j/ ^ @.Destination.NumReservation :=
9 s' U* T/ h3 t+ ^0 L: a @.Destination.NumReservation + 1;7 w! ^4 ?7 {+ n |8 P
end;8 S ?3 w/ P0 S$ O% ~
@.CurrIcon := "drivingHome";% m% y1 C5 B$ d X, D
@.DrivingHome := true;
* e c( R/ w: C! i9 _% i) ^/ D7 p end;
8 ^& S( e) _8 h7 H else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 F# o2 E$ l8 J9 Y" A
part := @.transpOrder;
5 V8 x3 j5 _0 Y, } part.move(@);-- load part7 A: W i! E W! E( ]( u! s% F
@.CurrIcon := "load";; ?) _+ U" E; z" |
GlobalDistObj := part.globDestination;
* A! b9 \1 f) i3 q9 s! G) f assignLObj := rgmanager.rgAssignL;
1 I$ F1 B- } V. I row := assignLObj.getRowNo(GlobalDistObj);
+ ^0 A8 z( _( C, \& Z8 ^ if Row = -1 then -- since 70
/ x& F# o: |4 V if lan=1 then
2 W& f& J9 r9 z$ X& z" q' N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) z, @' Y, M3 B* ^
to_str("in der Andockstation: \"",?.~.name,"\""));
7 z2 j! b3 A% A, n6 e x$ f$ o else
: t! I7 u6 o! K; p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& p3 C" _5 {. i1 x to_str("in docking station: \"",?.~.name,"\"")); / I$ u. k% }. V+ u7 v5 S
end;
# O' U8 M' T1 } else
0 r7 P" L# t8 u5 `5 i' ?) ^5 M @.Destination := assignLObj[1,row];
" C2 j* T/ \9 O' G; V9 q end;
( W. k6 L- V* k3 |2 V* f" V7 V newDirection(@);, T5 B0 u% e/ R' J! g5 R a
@.HasOrder := true;
( T* |. L6 K2 m end;( V# R# O. f) n9 q- t+ ^1 I: X. v
end;
. |9 h% g+ ]; Z6 Wend; -- of the method
E( y- }: f; _6 c |