/* called by: entrance ctrl of the object 'track'
- @" Q5 U7 i) ~/ I) h% a*/
/ a- C4 j, S/ J3 F, B$ a8 `7 Ois
( ]* w7 ]( F ^9 _2 b3 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 g. v m; ] Y6 i- {" B1 g+ Y1 F( {
do
) X7 k% @) {! ~) { Lan := rootfolder.Internal.Tools.AOLlanguage;# z( M5 d( L. R7 g3 Y% m _
if current = @.Destination -- else return
8 v1 s0 r+ L% \5 Z" {- K7 u then5 l# G% d8 q# S( r0 O( j
@.Destination := void;
$ I; T8 Q/ R' I# p if @.occupied then$ E. L. l- s2 O
part := @.cont;, I3 S; B* u$ U- S% r( @
@.transpOrder := void;
7 j& \5 K4 n: D6 V4 o- `/ l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ y6 s6 @- `* c* J
@,root.eventcontroller.simTime);
2 l+ V2 b/ @' f z; K+ K7 I @.HasOrder := false;/ m! d1 K+ _" g! ?4 C
@.DrivingHome := true;. }, w3 z* h% x
rgManager.tryToStartTransOrder;
' _- I" i" p' K9 c G/ P if @.Destination = void$ z5 ?8 Y g9 a2 u
then -- no transport order for vehicle @
' n! h6 ^3 W6 } @.Destination :=
& H/ p! ^. F8 A1 } rgManager.nearestFreeStation(@,track.~);5 N, b" l* @% l7 l6 i
newDirection(@);
) I. e/ }, p/ U* h# ^, F/ o$ w if @.Destination /= void then0 V6 |* T* @; N. w2 f' \
@.Destination.NumReservation :=
$ y8 k. p" P" y3 X @.Destination.NumReservation + 1;
* d" [5 D- u( n2 v9 M3 b+ i end;
\0 q" p$ f d: a, u @.CurrIcon := "drivingHome";
7 H1 ]: Z7 j- d3 A* G @.DrivingHome := true;) S0 }2 E0 k+ N' N8 f @
end;0 y! Q. `$ \: z/ _" X# _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# N4 T; X1 S! `# X
part := @.transpOrder;% W8 p b1 j5 r& V0 \9 m4 U% L, z1 ?
part.move(@);-- load part
1 _+ a! W6 L0 z" B) q; Q1 D @.CurrIcon := "load";
4 r/ d" i% G3 G- Z6 ^( ?# b GlobalDistObj := part.globDestination;
) b; e X% `9 b9 t$ [' u/ F assignLObj := rgmanager.rgAssignL;
! I8 P' {9 P9 n! {( E$ O. _- J row := assignLObj.getRowNo(GlobalDistObj);
+ a9 J, y( a O" B/ M( O% |" @6 P if Row = -1 then -- since 70* V2 G& L1 B% m/ o% Q/ G
if lan=1 then
) s1 r6 L& u3 v$ O; @; P2 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 m# c2 u5 j$ X( U2 C' ^+ e+ s to_str("in der Andockstation: \"",?.~.name,"\""));
, k& Q. U, h: J else
8 R5 O" p+ H0 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) s% g- b$ ^5 W6 C9 O to_str("in docking station: \"",?.~.name,"\"")); * T& F) e" y* R5 F1 A Z
end;/ ^- k5 U) g0 @ [! i& I" d6 d
else7 a% [9 }( d6 Y1 \ s
@.Destination := assignLObj[1,row];3 h+ I# A: J7 J# N" ^
end; / ~: F* D: N% j/ f1 L
newDirection(@);
' P: @5 n0 I/ w) R2 ~% S: T @.HasOrder := true;
* M* L5 }' o7 M1 Q end;
9 ]$ \0 v% k1 {) A; k8 O end;8 i: ]7 T' N$ o* X L2 e! f( H
end; -- of the method" i$ U$ N* ~. o5 b( ^7 z/ C) ]
|