/* called by: entrance ctrl of the object 'track'
- E7 w6 ?. a/ ?) [0 v*/2 \: |2 Q/ B& o' `7 T6 p2 ^
is" H' R; G" r3 Z% {$ C7 x7 i3 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& Y! V7 N0 K7 s5 `- odo p8 c5 n! t/ k( _7 d
Lan := rootfolder.Internal.Tools.AOLlanguage;$ x5 r1 G5 { |- D: g5 t
if current = @.Destination -- else return1 S. T$ x! [/ g! V# C# b1 C/ ?7 y
then0 w; _" ^ Y5 }" i5 |. J& h
@.Destination := void;3 j) `: @1 Z+ H2 {; d
if @.occupied then
9 u2 U) f* k4 F8 [ d" t/ B part := @.cont;
3 I k" s* c% s2 _; ^ @.transpOrder := void;
; l$ r" d/ v! N6 ~$ B' e$ y7 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 B2 O5 p% H3 {# \/ `1 H
@,root.eventcontroller.simTime);
$ | V6 n5 x3 x$ I4 l3 w# V/ B @.HasOrder := false;2 [( X* s" u: x8 K8 f
@.DrivingHome := true;
5 J2 N. r! Z/ D6 i8 K1 k% {4 D6 p rgManager.tryToStartTransOrder;
5 _) S7 e+ W, V( L) _) Y if @.Destination = void4 o+ \$ F6 f& ^& `
then -- no transport order for vehicle @
* H$ x" U2 r$ V1 X8 Y+ T @.Destination :=
9 F; Z1 ]2 F. i& C4 U. u rgManager.nearestFreeStation(@,track.~);
) |0 z, @, R- I8 c newDirection(@); # Z3 f, ?: m E! Q7 v) A/ u
if @.Destination /= void then
6 j( a/ M1 O# Y) Z2 D' K) C @.Destination.NumReservation :=
8 W4 A$ Y" k8 [" S& B1 l; U- _ @.Destination.NumReservation + 1;
4 V. p& \; U/ [ end;4 q0 l+ N. y" q3 a
@.CurrIcon := "drivingHome";9 M( c. ^& n% ~* z& p) j, F) s
@.DrivingHome := true;
! y4 x7 g5 P9 r+ N# `7 v end;! ?" }/ D4 o' `5 g3 j0 k8 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: |) r! D( B: }, `. X5 a" q" h, b
part := @.transpOrder;1 r2 Q8 E1 H9 C" Z" W, {
part.move(@);-- load part
! V2 d# |. t( J4 ]5 R/ r7 W @.CurrIcon := "load";
* n+ c* I' Z3 {2 w" i8 h: b/ c GlobalDistObj := part.globDestination;4 x: O3 Y9 E( B$ u8 q
assignLObj := rgmanager.rgAssignL;
, o+ V, k0 G8 C) S row := assignLObj.getRowNo(GlobalDistObj);
* F& t& J3 W# w if Row = -1 then -- since 701 Q/ k+ r, {3 J0 G1 V# \
if lan=1 then2 X7 _: |4 u' Z, M9 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: A7 T9 l" [. y2 m; @! T' c to_str("in der Andockstation: \"",?.~.name,"\""));2 C* e' y; |' B/ d- X
else& b/ ^, \) G. ] i/ d; Q. I8 E3 V$ A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," j: O9 w" N+ U, G
to_str("in docking station: \"",?.~.name,"\""));
9 \' {& {" V5 p0 ^3 a end;
$ @8 M9 W( E! _ else
/ C; w, u3 v0 R/ A! `. p! K @.Destination := assignLObj[1,row];* F$ X2 i/ j; i9 w
end; & P0 N7 Q; ^( c
newDirection(@);) U% J: [8 N- u! S& _9 |
@.HasOrder := true;
. R3 m7 R4 z! `2 ?2 N( S end;/ X' x* {3 z9 O# | L
end;! A* v: E( g& J; N% J7 a7 a
end; -- of the method" E5 t$ f4 I$ b: g- S2 H, F
|