/* called by: entrance ctrl of the object 'track'" I2 T; @. \. d/ ^2 X/ E0 H% g
*// A6 W) B4 h! V' J
is
( Y. r H# ~$ u0 t {8 _6 u. x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 o3 H8 m s b* M- Hdo( k! E, w% y+ b2 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 s8 I" T0 y+ m- E, ^0 c% ` if current = @.Destination -- else return+ f. k/ A! G# K' q
then
% f% ] q7 m# I; K @.Destination := void;7 b( d. q7 f. N! x* T+ V6 ? _6 U! R
if @.occupied then
( W$ C. a5 n( U/ T* B) |% }' e part := @.cont;8 L9 u( ?. S3 ~4 h
@.transpOrder := void;
8 Q0 y- P6 K( |: Y+ Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' M$ l j$ ~$ F5 E
@,root.eventcontroller.simTime);
: P4 s" A) o6 _1 x3 ? @.HasOrder := false;
5 S6 a+ Y" @9 }6 r, i* m @.DrivingHome := true;$ B/ s0 c9 r A# A6 \# E4 H0 }' d
rgManager.tryToStartTransOrder;% A: n5 R" B7 w9 p2 U# ] C
if @.Destination = void8 E* k6 ?! j |( `- c
then -- no transport order for vehicle @7 Q! ~* t, o: l M
@.Destination := l) U+ {; y. @0 ]
rgManager.nearestFreeStation(@,track.~);% H7 u9 q. l# ^5 k5 A& a2 p4 F
newDirection(@); , e0 V1 M0 T7 K+ ~
if @.Destination /= void then6 O& ^# e1 E9 ?: q5 v6 |8 u
@.Destination.NumReservation :=
l& \8 [4 A" f; G5 _ @.Destination.NumReservation + 1; U; H) J, ^9 {( K3 s( }
end;3 u2 s' M, P" |. r {5 V' H5 V
@.CurrIcon := "drivingHome";) b: F# s3 Z4 P9 {$ B ^9 V/ b! |
@.DrivingHome := true;, r0 o$ e; [1 S8 D4 `8 z* x
end;
) _, d4 T. X9 o f4 q5 l' \% m else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 r, a$ b/ V! i; O- ?; m
part := @.transpOrder;
7 e& a( @$ ~. s6 i7 b part.move(@);-- load part% C9 o- p" @/ @
@.CurrIcon := "load";
- A' Y% j) p1 Y6 U GlobalDistObj := part.globDestination;3 b! v/ _! B: _' {2 M
assignLObj := rgmanager.rgAssignL;
5 @, b* r9 v$ C4 ^0 {3 b! W row := assignLObj.getRowNo(GlobalDistObj);
7 [. b% r1 Z# j% v3 U5 q; W if Row = -1 then -- since 70, P6 A6 v! ^4 h, {
if lan=1 then
! L! B) S s' x: t9 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 ]4 l5 h% X! }
to_str("in der Andockstation: \"",?.~.name,"\""));
8 A5 i6 ?0 C9 X: m else b: J( M" a+ a' @+ Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 ^ ~; @( W+ M+ Y) I! j: J to_str("in docking station: \"",?.~.name,"\""));
+ u0 q6 ^ Z* ]8 x end;" G G( b/ D1 s) o- z- K, j: _( J
else
1 x& W( q4 `* y9 {* @9 `: k' I$ W @.Destination := assignLObj[1,row];4 s9 U1 u1 N1 P3 m2 p' m4 m
end; ! |* _. x1 O! w
newDirection(@);; Q0 a2 J+ g" d* _$ G
@.HasOrder := true;4 \/ g7 l/ a0 \) U
end;, W/ K. y9 r1 Q! z! }4 `: s+ k j
end;* I. L$ }$ @# z2 `
end; -- of the method5 v8 g/ K* W: F5 N7 C$ _, k
|