/* called by: entrance ctrl of the object 'track'/ A |* V3 x. D5 L
*/3 ^# g- ?% H4 H9 `. Y6 \% |* h
is" E% _) b2 M; \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 G4 C4 l8 g( E, `
do
9 R& g1 o: R/ X6 D$ \+ T Lan := rootfolder.Internal.Tools.AOLlanguage;
! D6 P2 a1 P) ?/ Y4 _ if current = @.Destination -- else return# p b3 J- }7 Y3 N
then
( w3 [9 N) B/ E, F @.Destination := void;
F" {1 r5 l: q1 U7 T if @.occupied then) n8 Y* @" v% K5 D& P4 r
part := @.cont;
5 W5 k; {. R3 @/ I' z8 A9 P- M' t @.transpOrder := void;$ ^7 T, S# ~) \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: W$ v2 x/ D* V5 |
@,root.eventcontroller.simTime);& Y7 |6 h3 K- L) s% t& d
@.HasOrder := false;
8 a9 {2 o L% T- w @.DrivingHome := true;& p: n0 j U+ L9 ]
rgManager.tryToStartTransOrder;. O9 t( }( T8 _/ s3 ^. T1 t0 E
if @.Destination = void6 m0 L0 d" f" F. e$ h
then -- no transport order for vehicle @5 K' ~. @9 R) |( [1 s6 f$ V
@.Destination :=
8 r; @) k( }- E P* ~ rgManager.nearestFreeStation(@,track.~);
# {: S8 A6 R0 W) m( x newDirection(@);
9 ~1 A; ^ W/ K8 v0 E* { M if @.Destination /= void then7 L) X+ |, E" W; [9 F. q8 u
@.Destination.NumReservation :=
2 R+ ~' C0 [ H4 v% p6 O j- W$ [ @.Destination.NumReservation + 1;5 f* l& K7 S1 m! h
end;
! N v$ v0 J5 U+ w# | ? @.CurrIcon := "drivingHome";
X' n1 u7 i& f& R4 M3 }' _8 \- s8 Z @.DrivingHome := true;
3 T% E) k) T$ [ o end;' l0 A- J5 ]4 @% L h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& z& W: O8 g( U4 S4 I7 b
part := @.transpOrder;
3 K+ K) D4 H4 T, a* h part.move(@);-- load part$ M) A Q9 e; d) b# ?: v
@.CurrIcon := "load";! g$ P4 \% s- X& }9 t& k
GlobalDistObj := part.globDestination;! D+ y8 [ g3 \1 l% k9 h2 {6 q' N
assignLObj := rgmanager.rgAssignL;
* e$ [7 h3 P# M+ i% G+ z, G6 d) X row := assignLObj.getRowNo(GlobalDistObj);
! a% ]8 |! U# _ if Row = -1 then -- since 70
2 \) z( B' A7 e6 ]; B if lan=1 then
" l! t* q* o8 a' b/ Q# R+ f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" g7 L. `' h: L! F to_str("in der Andockstation: \"",?.~.name,"\""));
: ^, C0 u# }+ j# d; B8 p! F else3 z) q M* o% R, a$ S, C7 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ t: P; p' M/ f' {# D+ H
to_str("in docking station: \"",?.~.name,"\""));
) \1 Q* l& `6 k& L) w2 b end;
: D1 Q- ?$ @6 r) q* C else5 b- {6 j" i5 a' z( R
@.Destination := assignLObj[1,row];
6 Z% K2 t# |, q3 L: q. k end;
/ M& g/ E; i* ~# N( `2 N* ` newDirection(@);' a) Y7 z, S+ I6 Y
@.HasOrder := true;* [7 R0 V% l5 O
end;
( Y% T0 h1 g% C9 F0 e end;/ R" a" I; @3 O* M+ k
end; -- of the method
* K7 \4 g9 G# p8 D* L/ H |