/* called by: entrance ctrl of the object 'track'
" ?; V' ]! z Y5 g, k8 W; ?0 N*/ v( ]. {8 g% E, g8 f, p: q
is) |; U; \% ~2 D/ ^6 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. ^. @8 R$ }0 D. ` edo
* N8 D' m2 T. l) ?4 j, ^ Lan := rootfolder.Internal.Tools.AOLlanguage;/ {3 W$ @* I: q) H0 t7 s
if current = @.Destination -- else return1 c y; f8 F# y/ ~- R! H: ?
then# G! g1 ]; a; ?' J
@.Destination := void;% `" d- Z2 i$ |1 K- k! A O
if @.occupied then
) g. w+ A& d- Q# o/ T f; C part := @.cont;! r+ R/ }! y# f4 z1 B* F- a
@.transpOrder := void;" V4 I; _4 |! u8 {! o, d. E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 R8 A! H+ r8 W( t8 S
@,root.eventcontroller.simTime);/ |$ e1 ~, `; P3 t
@.HasOrder := false;
( w5 ?2 P5 b' Z& c4 @9 }4 d @.DrivingHome := true;7 L' _7 l: G7 G9 b7 t
rgManager.tryToStartTransOrder;5 [! F, n5 N& O
if @.Destination = void5 I1 J5 R9 ], e r$ V
then -- no transport order for vehicle @+ U9 l* ]$ S1 M: B/ w
@.Destination :=
$ X4 j7 l: b5 y8 I M& Z+ x9 L rgManager.nearestFreeStation(@,track.~);; o q ^; U* H- J3 E
newDirection(@); % S4 U, c# t) e5 b
if @.Destination /= void then5 b' d$ w5 T# p8 H
@.Destination.NumReservation :=' f8 |9 t7 }8 V: f* b
@.Destination.NumReservation + 1;
7 G, R6 L! P; B! j: L" t7 H end;
+ D5 I8 M+ y; ^+ A @.CurrIcon := "drivingHome";% i6 K& h+ O0 B/ p
@.DrivingHome := true;, r5 z" g9 p: `* C* {) w
end;
( U, _5 B+ g# ~8 i, P- \9 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& e# f' v9 M& R. l" a part := @.transpOrder;
) Z& H% t8 d. g6 _+ Z part.move(@);-- load part3 o+ q! |4 W4 x" a2 ~& |
@.CurrIcon := "load";2 T" H' j5 [1 g
GlobalDistObj := part.globDestination;4 r4 B+ V, s+ y2 g: c3 D0 ?
assignLObj := rgmanager.rgAssignL;0 v% `, Z9 ~) V/ Z# ]
row := assignLObj.getRowNo(GlobalDistObj);
/ e" w4 i' B0 }% g if Row = -1 then -- since 70
* c9 c4 Z% S) |+ X/ D4 h if lan=1 then
) R0 z+ Q- H' I7 I3 o% e1 S' R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 B. i! j8 A" ` to_str("in der Andockstation: \"",?.~.name,"\""));3 \9 G8 |& m: X( U% T. d/ d
else& k6 z# W$ q/ H+ N% x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, z( A/ o% ^; k to_str("in docking station: \"",?.~.name,"\"")); " P' f( m) d- e+ _- n4 Q) U% {
end;2 A; [4 b( J8 r) U }: ~: `+ T7 _
else% D4 h, S: z5 G f$ Q- X/ d0 V
@.Destination := assignLObj[1,row];% w0 I/ Y. j$ Z
end;
, H- Y5 |9 |# v5 m newDirection(@);
8 v+ b+ P5 {/ m @.HasOrder := true;0 O' B2 w0 a: q9 S8 T6 n# G+ x
end;6 l1 \ `1 a9 T: g0 E+ k
end;
0 c" k7 `0 l a% m5 Bend; -- of the method
& U& D/ ~6 [0 O) u! o2 y) J |