/* called by: entrance ctrl of the object 'track'9 _8 A- [4 E1 e* Y; \! d
*/$ ^% F9 p+ z1 J- U' T0 ~6 H
is# t' d' j! Y' Y* w; V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# C' s$ b& Z. p9 n- n8 g
do5 F0 N# G1 b7 S* I
Lan := rootfolder.Internal.Tools.AOLlanguage;
# [( l2 ]% e6 L8 m" r if current = @.Destination -- else return
0 n9 E0 \! b$ R2 }4 X* Z0 ^+ i then! z5 _3 C6 H# N0 v+ M: M
@.Destination := void;. g/ @$ Y# G5 L% A. L8 [$ m
if @.occupied then
* ]2 T" E) T$ L- X& m part := @.cont;
8 v' N' m: R s" N' D% v @.transpOrder := void;
7 l& W3 s3 Y" K5 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* |/ J& A* T7 N' {" l6 X9 T& @
@,root.eventcontroller.simTime);
5 A! k0 Z# m" n. I+ g! r7 [ @.HasOrder := false;
( F, c( v1 w3 h8 |6 \" g, [ @.DrivingHome := true;
3 x; B. A9 @. s- M( _ rgManager.tryToStartTransOrder;
" n9 V3 ^# ^' e d w) _- |9 s$ a if @.Destination = void
$ b& p9 D. {8 ^+ l- D! Q then -- no transport order for vehicle @
+ g( F+ f) L+ [3 ]3 y @.Destination :=$ C ~1 u8 o8 M8 q9 S+ k: I8 ?
rgManager.nearestFreeStation(@,track.~);
. i3 n8 f7 c5 @ m- c' F4 j newDirection(@);
5 m, t- p' G9 [( ~' S if @.Destination /= void then1 J. W6 g( W; ?' q
@.Destination.NumReservation :=5 B" Y5 f" b2 E5 C# I6 Q
@.Destination.NumReservation + 1;
/ V3 v/ Y- V/ l end; y- ]2 |9 n/ F& W9 S' w
@.CurrIcon := "drivingHome";
, S( R! m+ m ^3 ?4 E# B8 d @.DrivingHome := true;
! i# L# z/ x) N8 h+ K' ]- H end;. O- N3 y1 p5 r3 ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) O) U) _' @% W part := @.transpOrder;& c7 ^- |& F5 F6 D
part.move(@);-- load part
' e/ Y0 `" t" L: A @.CurrIcon := "load";
. g% h, y& \3 X5 c \- @2 Z- d GlobalDistObj := part.globDestination;) m; D$ n, y/ J
assignLObj := rgmanager.rgAssignL;( ?# O, ^, c, G+ n ^
row := assignLObj.getRowNo(GlobalDistObj);; ?( a) p+ c: c! ^8 p( \
if Row = -1 then -- since 70
3 P B9 h5 C, V8 n& p0 C if lan=1 then
" a! Q+ m0 z6 F) t* u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 }) } @9 X: ~$ D0 y4 b U
to_str("in der Andockstation: \"",?.~.name,"\""));$ s/ N, t' `/ {) O6 m
else
1 O0 F" ^8 x, b* j$ O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' Y7 I0 j# N- n( m3 Y
to_str("in docking station: \"",?.~.name,"\""));
- @6 d6 v$ ]8 D" |$ r8 n$ b end;0 n) w" {+ Y0 _+ s7 y% j9 ?
else
6 `8 N* `6 T5 a3 t @.Destination := assignLObj[1,row];
) h1 x) g2 G( ? ^0 U# N end; * Q! X3 _9 ~: ?; q
newDirection(@);' r! `& }7 U# o+ ~2 ~/ i
@.HasOrder := true;) Y- F6 k) P9 T% l, L T
end;4 x$ w& R% j& J5 Z* k5 |
end;) b* G0 I8 l+ o( e( F
end; -- of the method. w' B5 {* p/ F" p
|