/* called by: entrance ctrl of the object 'track'1 [8 O5 H' P$ S9 s' p' I
*/
# @* R0 r# v# q) b" c! }; i fis
# v& ^8 {5 e3 m' o. u- Q0 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ s6 W$ F* k4 u. v7 W) S9 W- y7 pdo
8 r3 N! `" u4 o/ {" ^4 c Lan := rootfolder.Internal.Tools.AOLlanguage;
0 ]' I* Q; b! ~ if current = @.Destination -- else return+ q `( }# b, b/ O
then* Z, g/ ~& v" U: {5 T! Y
@.Destination := void;7 Z0 E0 a3 q4 w! d6 T4 l7 e
if @.occupied then/ ?+ n" P E# B( w7 n9 X
part := @.cont;
, Q# e6 {: v6 a' c. d7 [2 X2 q2 w' V @.transpOrder := void;7 L. X$ ?! \5 [7 I8 e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- a' p, d6 p, A; \4 a1 \9 U
@,root.eventcontroller.simTime);
9 Y' s- L; |0 F3 W @.HasOrder := false;7 A0 v' h; ]/ k8 U! R1 ]
@.DrivingHome := true;
- T1 G4 e& u. P4 o" j% W8 e rgManager.tryToStartTransOrder;/ I; g8 z" f* c& D6 e
if @.Destination = void8 N+ k' S# ^6 X
then -- no transport order for vehicle @8 S D7 Z1 [- p) }$ G
@.Destination :=0 U% h! X: e! r X" U- L
rgManager.nearestFreeStation(@,track.~);
! I$ D! |2 }+ I, f: Y+ z2 @ newDirection(@);
$ ?; j! X+ l) L3 ~ if @.Destination /= void then
6 l) |. a. O: g2 a% l: { @.Destination.NumReservation :=( ]8 z$ L4 x1 I+ O5 B' d; V+ b
@.Destination.NumReservation + 1;
7 B! X \: Z: q7 [2 O2 U/ | end;+ k: ?" z; K8 A5 v& e
@.CurrIcon := "drivingHome";
3 a5 L9 C" b! F b+ ^0 h" i @.DrivingHome := true;6 ^- F# P/ A X+ _
end;) n5 g# D; _/ Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& d% g: \# r0 h3 y2 O% J
part := @.transpOrder;! L/ g! D- P. P+ J* R4 R* ~2 |
part.move(@);-- load part
, S$ C" Q/ T3 [1 r2 @4 g @.CurrIcon := "load";
1 e7 Y& u: s! E& Z. e# L, ]9 X GlobalDistObj := part.globDestination;/ I; k$ I5 z- ~
assignLObj := rgmanager.rgAssignL;
2 n8 _! Z" e4 d row := assignLObj.getRowNo(GlobalDistObj);/ s8 ^( |8 G+ E. @) X
if Row = -1 then -- since 70
1 X$ J. u2 o+ }9 z if lan=1 then
/ y% w! J1 A [6 E9 Z$ g; f* r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 A/ T; [) M/ Q i- z7 e
to_str("in der Andockstation: \"",?.~.name,"\""));
4 s5 N+ n2 l3 s6 g" D else
$ W- E/ t5 P+ |0 _ ` x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& J! w V* S: P% m f1 K0 W+ g to_str("in docking station: \"",?.~.name,"\"")); . f# U' _* F$ T* L" G! \2 T
end;
. Y2 W8 F% t; T3 k9 F else
5 X7 N+ F" l* a( g0 N @.Destination := assignLObj[1,row];
. j/ M, n, g2 V# u$ X end;
1 T9 _+ a& T Q& m. k newDirection(@); a7 y" @" n; H! J( `
@.HasOrder := true;
7 x+ J: R6 {8 Y8 g! G end;
$ V( u$ A# ` X end;( @! v9 E) Z% K& b4 \2 I/ F
end; -- of the method! P7 X1 Y; @) z
|