/* called by: entrance ctrl of the object 'track', ]- h- R8 Q B
*/
$ ^. E: F$ A5 A1 Q( r8 Wis
+ b _0 e+ T' {0 K9 Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ e9 r% V# W( q0 b* [! |
do% K/ z9 d7 W1 N7 q \ z$ _4 O
Lan := rootfolder.Internal.Tools.AOLlanguage;
- i: ~/ m/ O4 `. O5 _4 I! Y if current = @.Destination -- else return
7 U5 p7 A7 g4 j h then
- u$ E! X/ c9 e, W6 V8 ] B @.Destination := void;
( r. G7 X) v1 x( J. H; B1 N' P N if @.occupied then
5 ]& x- j8 W6 _' n part := @.cont;
) j( J6 {& O, I* |+ T+ P. ~ @.transpOrder := void;) Q/ S5 \# V9 p5 i ?1 x3 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* O+ B. g. t1 N% c8 Q% v
@,root.eventcontroller.simTime);
: q3 N5 D$ F8 h4 u; w8 _8 Y @.HasOrder := false;
/ { f Z# L3 p" ^7 ` @.DrivingHome := true;
4 l6 D; Z9 W/ ]0 X rgManager.tryToStartTransOrder;
2 I. t; ?0 P( E8 P if @.Destination = void
$ j9 V% p, F8 l) e" C, D then -- no transport order for vehicle @
% Z$ ?; _$ J$ ]1 V& W @.Destination :=% m( m) h. ]# ]# ^. }/ d' w
rgManager.nearestFreeStation(@,track.~);5 k6 d7 r: J* w" {: ? ~
newDirection(@);
2 N0 T3 i& H2 `# ^0 s# k s if @.Destination /= void then1 X$ l. }. Q# S: M: M) a
@.Destination.NumReservation :=
+ B3 a7 P) L7 P/ W @.Destination.NumReservation + 1;
2 h' P+ B" E1 _- v) M end;
5 H( y* j0 v' L A @.CurrIcon := "drivingHome";
g; p- B: v1 O* `" }: r @.DrivingHome := true;
! f8 ^% R6 G6 r# t! F end;
$ m; z) z# g& E/ H8 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& K x1 K* V8 V' i% K part := @.transpOrder;
) T5 y3 w* N/ B6 a; d/ _* o0 g8 x part.move(@);-- load part
# J) |8 q3 q1 }. } @.CurrIcon := "load";
/ k4 e' W% P2 r3 y GlobalDistObj := part.globDestination;
+ Z. l+ O- `8 r2 z& m: s assignLObj := rgmanager.rgAssignL;5 C* j- ?; U. ?9 P
row := assignLObj.getRowNo(GlobalDistObj);# x. P0 E# K. F* h
if Row = -1 then -- since 700 P" j4 A) m* s! b+ ]: o
if lan=1 then# D. m# z! {: s) w& t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 ~8 A8 y8 Z p* |; G( _/ r
to_str("in der Andockstation: \"",?.~.name,"\""));7 `! X2 [( ?% Y7 r
else
8 ?3 U1 \; a- m* P4 n2 B/ z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# i4 J5 c# e9 }* ?
to_str("in docking station: \"",?.~.name,"\"")); % [5 a( y; w. h
end;
+ m- M+ }. d" g" [5 L0 x/ r else
& v, c* C6 ^$ K% Y5 A3 K @.Destination := assignLObj[1,row];2 K: K6 y9 v& ^; y5 V0 K$ _/ E% p
end; 1 A2 x9 e+ e8 W5 o
newDirection(@);6 z. }( x) I" H" A
@.HasOrder := true;/ m2 I7 L6 Z4 @& u
end;& m7 T% g; m6 ]
end;
% G% p) J) F" g z+ j" k% E4 uend; -- of the method# P. h% k- `- ]" Z; W) t# S
|