/* called by: entrance ctrl of the object 'track') M7 b0 K6 d. v5 y$ x
*/5 c9 L0 J. F, t1 D1 C. E
is
3 K7 \; p1 j- | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. e1 ]& a0 K+ N- R; Z& r0 B& vdo3 G5 j+ S2 L" b; A$ Y9 i R( C
Lan := rootfolder.Internal.Tools.AOLlanguage;8 M+ e5 S0 W9 n( F4 ~0 T% f3 O
if current = @.Destination -- else return- [& I1 P* v# I/ B0 L4 s3 Q
then2 B5 [ B! f5 C8 {
@.Destination := void;" f6 ]2 w' P9 {- |, \' z. o
if @.occupied then" g/ N8 c2 I; J$ O8 J$ f
part := @.cont;+ }+ H- m4 x l1 x0 L/ \6 o. @
@.transpOrder := void;4 n9 q2 N6 I: Q' o3 m4 k. ~' I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; c2 K/ D3 f1 a' A! K/ O& o( g( \ @,root.eventcontroller.simTime);3 {0 i) ~2 f! Z. a( w2 [& M
@.HasOrder := false;1 j5 h' ?" U7 O# G# {+ g, v
@.DrivingHome := true;
2 u1 p3 p9 X7 ?1 V/ x9 { rgManager.tryToStartTransOrder;1 I1 q; i4 h0 t, o8 n7 z
if @.Destination = void
( i; @: `. d' U9 c0 o then -- no transport order for vehicle @2 F8 Q( j5 t7 f6 f ?
@.Destination :=
0 I1 q- `5 m! w. O1 r rgManager.nearestFreeStation(@,track.~);; f; Z6 @+ C# t% H4 z
newDirection(@);
D' m$ }& Z3 a+ [3 d4 Z if @.Destination /= void then. g, l% C& C3 Z* C& m3 t
@.Destination.NumReservation :=, G2 i" \$ V$ m
@.Destination.NumReservation + 1;7 ? n$ z6 y. r) R
end;! C) ^) r4 T3 L0 i& \' F
@.CurrIcon := "drivingHome";
/ v. h- F9 X0 X4 N @.DrivingHome := true;
1 ?' }# [/ u5 z end;
! `. f6 [, N# P+ j/ G( M5 ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 [% c5 e% P; b$ T1 w
part := @.transpOrder;4 j# Y4 C) ^# x- E; ^3 T/ d$ L7 n
part.move(@);-- load part
5 h4 q6 e! D. M, k4 C) r @.CurrIcon := "load";
( A3 x% j; b; T# L* |: q GlobalDistObj := part.globDestination;
$ x+ M% [+ M- b. V7 u" Y; R assignLObj := rgmanager.rgAssignL;! _2 `; I0 _0 z- X
row := assignLObj.getRowNo(GlobalDistObj);
8 B" Y+ A% e# \' l if Row = -1 then -- since 70# U( `5 B. r% T! Z" W4 z1 N
if lan=1 then
# M8 q6 C0 Q+ l1 \! d: u4 {8 o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 h# }$ B2 _) s9 N2 u- @+ @ to_str("in der Andockstation: \"",?.~.name,"\""));
A0 s5 E( a5 g1 H9 R$ y. U2 k else: _# |% P8 U! a$ Y0 m7 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 c' ~! S0 I! B1 m$ d8 D
to_str("in docking station: \"",?.~.name,"\""));
7 D/ u* q# c3 `' z2 @! A end;
' [( z1 ~! q' d) C: e6 e6 d/ v, S* t else
0 a/ G V: E1 {- i1 L @.Destination := assignLObj[1,row];; S' s6 ]+ S$ B5 a7 N& q9 W
end; " }+ Z0 _! v0 d2 k/ e
newDirection(@);
S1 F; ?' ?( x5 e2 @ @.HasOrder := true;
9 q2 `. X; _1 A5 h" o0 d- P end;) K! ^3 d* K* u6 g! G7 o
end;
0 j, q" _7 M# \end; -- of the method0 P2 k, R; ]9 w5 i$ h1 v
|