/* called by: entrance ctrl of the object 'track'
: K2 e( b5 _! K*/4 O4 `3 j7 u/ W) Q) q. x# R5 }* g# |
is
* d$ h8 Z: D9 o, f/ f) _5 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 @6 l. n. D l7 e! W& O
do
. _% i% Z* q: f- z; Q( H% `; Z! H/ N Lan := rootfolder.Internal.Tools.AOLlanguage;5 v& z5 {0 M, Q0 ?# O5 a9 u
if current = @.Destination -- else return
' c0 ?7 a/ k" J Z then
) [0 W: V; P8 L5 P6 @* Y @.Destination := void;% }* e+ f+ _( r4 ~
if @.occupied then v H0 o) G) p
part := @.cont;
# }& J; O# h. w) |& X% ] @.transpOrder := void; H' }% @4 M! l. z( L7 s N' p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 X$ ~( k- ]- O2 q: w @,root.eventcontroller.simTime);
. D( \' b$ q! Y2 H# m% I: X1 e; y @.HasOrder := false;
8 H! g$ u; O v: U4 T7 V @.DrivingHome := true;9 X* K, D8 J+ k. E2 D" m
rgManager.tryToStartTransOrder;' ^. {( c0 J; ^/ x
if @.Destination = void, ~5 {, J, J" B. o% n% ^# X
then -- no transport order for vehicle @' T/ ~% F1 j3 |- q0 k
@.Destination :=0 h2 O4 R$ e7 J) ~% L
rgManager.nearestFreeStation(@,track.~);
( W8 Q% Z4 F3 i! X% G newDirection(@);
4 _ F# k) v0 H( ~% M' u if @.Destination /= void then
# x5 N( g; g; p @.Destination.NumReservation :=: M2 R; y- G, n8 i# X
@.Destination.NumReservation + 1; e/ H# a" k0 M9 ~, b4 r
end;6 A5 O& R c Y `- d! w
@.CurrIcon := "drivingHome";
6 P* V: ~+ x- ~/ X' Q, p/ N6 A @.DrivingHome := true;
1 |2 k! d- n3 D3 L3 u end;
& C# T1 S# K2 {" t1 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station, _& \' T, L" Q9 x
part := @.transpOrder;; l _$ l& w" ^ s8 B: O
part.move(@);-- load part
9 g, }5 k: Q! o2 G9 ` @.CurrIcon := "load";
( ?+ a" k% L! A GlobalDistObj := part.globDestination;% m- ~: t4 f1 B
assignLObj := rgmanager.rgAssignL;
* m: \1 P1 }& X3 Y* {0 F row := assignLObj.getRowNo(GlobalDistObj);" F W$ ]- n, o. D5 \% }; y: }
if Row = -1 then -- since 70! S/ P" e L6 v
if lan=1 then
7 k' C+ R- c, w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
@; c0 N1 p! ]& F to_str("in der Andockstation: \"",?.~.name,"\""));
: u0 z+ ]# f8 l8 w# [' M: r% o$ |* t else
1 W& v( Z" _& O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: {7 L$ U8 q/ u! Q to_str("in docking station: \"",?.~.name,"\""));
! H h% k1 n4 M end;2 J: i! `% Q5 E+ H
else; J! M' B: s" w6 z* `- Y- j2 u
@.Destination := assignLObj[1,row];' H4 n2 g& U2 n c$ R3 B8 w* c; } t3 t
end;
. M1 ?# T6 @- S, h; `( g- `9 i newDirection(@);
9 ^# B9 M1 p6 g0 `/ M4 l @.HasOrder := true;
( }8 E- z( }7 P/ ^: D end;) {5 _- Y- Q: j2 z; k0 r/ P# W
end;& L1 d8 P/ D3 X7 U
end; -- of the method
/ A; F, \. f- d3 P$ Y |