/* called by: entrance ctrl of the object 'track'; ~& }3 h6 V B& y* V9 k
*/
! V0 W6 s4 {2 y C- L8 d9 |is
2 L" x- T7 a8 t* \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 p0 \6 K; `, k
do8 H$ _ e$ J: j% H
Lan := rootfolder.Internal.Tools.AOLlanguage;, U/ P: D& }; p3 V8 G
if current = @.Destination -- else return! y' ^9 u0 p% i
then
- H2 I( e/ W* f @.Destination := void;
$ P5 R! P, h+ f if @.occupied then0 A6 A8 n' u9 o/ D
part := @.cont;3 g- T3 Z- N9 e& {
@.transpOrder := void;
/ k6 m7 v% K' M9 H5 }4 C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," t3 X+ ^6 B Q* H4 X6 B- a
@,root.eventcontroller.simTime);
0 q- w( C$ n$ Y7 |; D @.HasOrder := false;
9 x4 M3 S+ M! d @.DrivingHome := true;6 a2 |$ A3 v% }* ]$ `8 B1 a) o
rgManager.tryToStartTransOrder;- @* p8 m! l3 R5 o, A; ~
if @.Destination = void d1 s2 g2 r9 }$ b! K
then -- no transport order for vehicle @! c9 T" U, G5 N. A* b$ c4 ^
@.Destination :=
7 w7 P5 i; E4 @) b rgManager.nearestFreeStation(@,track.~);
/ H2 Y8 P z" C' a U" k# z newDirection(@);
7 [$ x! C6 `/ Z9 q ^ if @.Destination /= void then
7 a4 K+ n! y8 o/ l3 f' u @.Destination.NumReservation :=
# N# v) W9 N- {/ }8 ~2 f1 L- n @.Destination.NumReservation + 1;
/ I$ {( k1 I7 i/ k/ z end;
" d. c# W& L- W0 S7 W$ y5 u* a @.CurrIcon := "drivingHome";
3 U' b$ ]+ F2 U# r2 E: v @.DrivingHome := true;0 U1 J1 Y. M1 ~$ D% C; t
end;/ k" } ]! H v4 \; F: j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 I8 ]4 ^+ g' m& X. @ part := @.transpOrder;, }5 ~. D: ~ S9 o2 C
part.move(@);-- load part) W7 Z( J# m$ }8 ^% g
@.CurrIcon := "load";
' P: T3 f$ L9 S7 z GlobalDistObj := part.globDestination;8 ^' u8 E3 Z) j+ x" _- B2 w: p1 T
assignLObj := rgmanager.rgAssignL;( x8 Y" L0 g: B' E
row := assignLObj.getRowNo(GlobalDistObj);
5 [% ?3 [+ u8 E9 d" j! r% ? if Row = -1 then -- since 70
' _/ V% P( w ^' y if lan=1 then
) O- {: Y2 E7 M# ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 E T6 K0 A/ u1 U# Q) E to_str("in der Andockstation: \"",?.~.name,"\""));
3 H" }+ a7 Z! l9 R8 d) V1 {# P' q% X else' M6 F1 ~' E% y, V9 H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% B& W$ D. R& k5 M to_str("in docking station: \"",?.~.name,"\"")); + J% w" b7 ]- W
end;
4 c" s6 g0 Z$ C$ K5 a else9 N% R% i- p$ ]
@.Destination := assignLObj[1,row];7 b* o; m" a Q6 z$ r
end;
, n8 ?8 y8 x. F' f2 v newDirection(@);8 g1 R9 l6 g2 @7 V. i8 I
@.HasOrder := true;$ _( o1 e& F) _2 L' [
end;2 P) w1 i, c8 ^
end;
- N' H* j* C" y' Uend; -- of the method+ ^+ K0 T0 z5 y3 X, w8 r
|