/* called by: entrance ctrl of the object 'track'9 N/ `4 B- n4 f2 f$ Q! m
*/( J; e2 R I* m. f2 Y
is
0 y Q, O& ~# a" e8 N5 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 m3 ]3 @. {! ?9 s5 L! I
do$ O2 H5 \6 e7 p+ O4 J9 l& r
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ e; l* T/ L" u2 t7 A! n if current = @.Destination -- else return
3 D* H( z: {: g: O" p, l then" V' B4 P R1 _+ ~* j& x F
@.Destination := void;# j: L! l h$ K
if @.occupied then
4 f3 f3 G( T( l1 _, I part := @.cont;
8 I( }0 r' A! M$ o0 w* m @.transpOrder := void;4 s" [6 G$ h" W! E: d" ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 }3 U' `( b3 R1 p
@,root.eventcontroller.simTime);. r% Q/ Y+ n4 q1 b6 V$ _
@.HasOrder := false;
# `3 t5 K7 w( [ n9 B8 o1 |1 F @.DrivingHome := true;. }* C9 j7 v) }) I3 J, v
rgManager.tryToStartTransOrder;
: U4 u3 b- F! C. F: y) P1 e if @.Destination = void
/ x$ d9 ~* e. _" w2 i! G8 c then -- no transport order for vehicle @
- v( h. `: c' N { @.Destination :=& @; F/ B3 N8 }, j, s+ K
rgManager.nearestFreeStation(@,track.~);
6 j: `0 K8 d9 o* r- }! s2 M6 C newDirection(@); $ R3 ?6 A4 c1 C. f% F
if @.Destination /= void then
% m; F+ i# N$ |% J @.Destination.NumReservation :=
2 Q3 B! t8 }6 K8 o @.Destination.NumReservation + 1;1 r5 T1 v m9 C! U* R- S
end;
% y6 S- j; t7 u @.CurrIcon := "drivingHome";
7 l: W3 J' e& R3 I' h! [- Y; m+ r$ C @.DrivingHome := true;! q* a5 z( s) e+ x" y, ?# o* |% [
end;# W2 z5 g# x+ R; I' [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. S" y: y: z* S! i9 e: R part := @.transpOrder;7 i0 P5 v! W8 V
part.move(@);-- load part4 U! l0 H$ O! q% V0 i$ k: ?
@.CurrIcon := "load";
5 w4 n* f/ E1 p+ B! q GlobalDistObj := part.globDestination;# k6 f7 O) ?, e7 [3 F1 g
assignLObj := rgmanager.rgAssignL;
% L: s/ `" z5 X% D row := assignLObj.getRowNo(GlobalDistObj);, f/ o! ~: h+ f6 P6 a) v/ V
if Row = -1 then -- since 70
3 q& Y: @" D4 K& N if lan=1 then, m4 O' C0 Z: F0 j& ]. Q/ ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) J) t) X9 I4 z {- V, m
to_str("in der Andockstation: \"",?.~.name,"\""));
0 o% W4 ]4 r7 c3 I/ ~6 V3 K else
; i7 M$ ?6 Q5 @& n! w) L( L3 q1 L6 X; a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 w& ?/ [$ T1 b5 P( i
to_str("in docking station: \"",?.~.name,"\""));
6 r6 Z6 V6 d* N% w; D8 t5 Z, o end;$ W" U5 N- ^' M9 y/ \$ U, c: z
else
B. K+ I+ c" R8 j* X @.Destination := assignLObj[1,row];
5 o4 O% w) T! D' F9 T end;
/ R8 T: A* ]8 o ~5 z newDirection(@);6 H6 g s: A% y; x3 c8 m$ C' v
@.HasOrder := true;. H8 V$ F5 k1 d- B- @
end;9 v7 y( @" B# w K
end;' c& l* a" [: D5 T1 `
end; -- of the method9 P7 `7 F& G) ^$ D; B
|