/* called by: entrance ctrl of the object 'track'
/ ~4 m* u+ R5 _3 F3 K; C6 k: G*/5 `/ j) k Q$ T h' ^
is( X3 z& x2 x+ {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* e; t, \4 ^' G; s
do" k8 \1 G; g- T. F% @
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 v- K; G: d5 z9 ? if current = @.Destination -- else return
# e p8 O) z, b4 P/ ^& w then
$ f4 d) Y' X' p T- N5 [ @.Destination := void;3 s0 A& o2 u* y( n9 V
if @.occupied then
; |3 X* n& s+ m2 x s part := @.cont;1 ? l* @1 @) J1 Q* [* e4 ?
@.transpOrder := void;
% O% o, ]; Z6 \ G2 n' T6 x- O( ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 p: ~ o( S' J- W' ~
@,root.eventcontroller.simTime);- ?# r5 h9 J- o
@.HasOrder := false;' g- P1 \/ w) r' F
@.DrivingHome := true;
% x3 W% S. F9 T3 D7 A rgManager.tryToStartTransOrder;; h7 z4 K3 a/ M" b
if @.Destination = void
* H9 }2 e& E" ]$ ` then -- no transport order for vehicle @
. c6 C: L% y0 f* m& I, l! [, } @.Destination :=( W/ h% S4 N, y. t$ P! U; S9 |
rgManager.nearestFreeStation(@,track.~);
- n) K' ?& i, {' U6 b N newDirection(@); 8 t8 K2 |6 ?5 u; q l1 L8 m
if @.Destination /= void then
( _( @# I$ M; j1 A4 o% A @.Destination.NumReservation :=6 [, {4 S" A" s9 p
@.Destination.NumReservation + 1;
# U8 b5 Z$ ^* H) M! Y8 |7 V end;
$ q* \" ^- I7 }. U; U @.CurrIcon := "drivingHome";' r( c; W; u" U
@.DrivingHome := true;1 t( |8 y6 _- v' i! P2 l0 _
end;
+ n/ Y' k! F/ H# |: k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 \+ ^3 a% ~; i6 B/ o. ^ part := @.transpOrder; a# h o- b. F2 @# k1 b
part.move(@);-- load part
W4 k* r: y% m; J @.CurrIcon := "load";0 T# V$ R* h; |; i" Q; \' z
GlobalDistObj := part.globDestination;# x; E" O; L2 N" S/ `% M% V
assignLObj := rgmanager.rgAssignL;1 v# Q1 Z" z( ^2 T7 Z0 m, y
row := assignLObj.getRowNo(GlobalDistObj);% }8 ~! v Y6 y7 p2 B
if Row = -1 then -- since 70
( E6 s# ~; x3 S# M* i) u if lan=1 then* t Y, @5 J2 Q( o; z8 t; X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 q3 n4 _: ~) H# b to_str("in der Andockstation: \"",?.~.name,"\""));2 v: A7 `' }: y4 |
else
0 _! X$ _' U/ m" v# @4 V7 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ h* F) t! b0 p8 Z* T. R/ D
to_str("in docking station: \"",?.~.name,"\""));
% {6 j8 |/ o+ `5 K& r. n end;
( C/ e- f/ `: v8 r* o( G( T: J* A else
% ^6 }2 B0 a3 I% ~7 ?% ~! [0 H3 O @.Destination := assignLObj[1,row];
# }( X3 A3 c; a6 ~* A: g end;
9 O- F1 ^7 Z! t h) a newDirection(@);
) b4 Q; ^0 u4 v$ A& x1 b1 P @.HasOrder := true;! ]; D. }- q- y" I$ A6 g8 q0 T
end;
9 n' L) j# q. Q: J/ t+ l end;
( S7 ^# Z3 }( h8 vend; -- of the method
]4 [5 V2 q) d5 } |