/* called by: entrance ctrl of the object 'track'
) Y7 n! x! E- F3 s*/
& J8 D! T1 x* H H! Cis
2 z$ L, V6 p4 @# F) { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 |' J9 `$ D" D! ` ydo( A, d# A6 S* m" c
Lan := rootfolder.Internal.Tools.AOLlanguage;. q; ?3 L3 u9 c+ z' u( H& S7 K
if current = @.Destination -- else return2 n+ ]/ l, t" H/ F
then' t$ |+ L" b; H$ ^
@.Destination := void;
+ a7 v1 M! z! R1 U' U9 s+ g5 ^ if @.occupied then& w; _# O$ \# G$ p: c7 W7 d1 x) H$ a
part := @.cont;- D4 I7 k* ~ |, i* c1 t" q; P
@.transpOrder := void;
& L+ B+ n7 l* W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 m9 G( `0 D( j: c7 W
@,root.eventcontroller.simTime);" m: X! d" ?. `/ J3 [7 }
@.HasOrder := false;
% v! F& J2 d6 g0 h ~1 r @.DrivingHome := true;8 [3 M: u+ ]. ?8 H/ [
rgManager.tryToStartTransOrder;& S. @8 i0 X0 K8 {
if @.Destination = void
) p' r0 ?/ n. H+ P k then -- no transport order for vehicle @
. {, D; R8 w; K @.Destination :=! g+ b+ D* e) _/ b3 X5 M6 Y$ W
rgManager.nearestFreeStation(@,track.~);
/ L# d+ t8 y. U' O newDirection(@);
3 [, Y& I" S+ U7 ~( U: t0 @2 F/ ^% i if @.Destination /= void then
) ~. G# z7 R: H( T! ~) Z2 g @.Destination.NumReservation :=/ q# E" a- S% [9 G* E6 C: s; [
@.Destination.NumReservation + 1;
3 p& A& T9 C1 T end;
- H) I" M" G8 e1 x) }8 I M @.CurrIcon := "drivingHome"; V2 o$ H4 H* U! A2 H
@.DrivingHome := true;' f# U6 E- ?5 Y. D9 T) @$ y" w
end;
& I9 \2 A: a6 m' N: } else -- the vehicle @ is empty, both vehicle and part are in the same dock station* \7 Y; z% \2 ^0 V
part := @.transpOrder;; {7 O* ~; m: h0 r# ^& }% f
part.move(@);-- load part
) W: d: l% _- Z% y: a% L @.CurrIcon := "load";% R, r* F7 B2 L
GlobalDistObj := part.globDestination;9 C2 l: M0 W3 Z+ v4 ~5 U
assignLObj := rgmanager.rgAssignL;' i8 H g. [4 ^1 w s
row := assignLObj.getRowNo(GlobalDistObj);
) s! q& O" o, r' |9 a if Row = -1 then -- since 70
2 `1 f, k2 T, W( `( h' { if lan=1 then
% w& T& d4 ~3 n8 @" } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, `$ }+ [$ [* J1 e+ E3 M* f$ h$ w
to_str("in der Andockstation: \"",?.~.name,"\""));
2 _, H1 C& L* f# o else7 f" Z6 H" d+ s6 C0 U( d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* z% p- K8 G3 F to_str("in docking station: \"",?.~.name,"\"")); ! M1 _" h+ M% v' W) l1 Q+ Z
end;
1 o( b' c* I% F. h else( i' `8 R0 y7 C9 c
@.Destination := assignLObj[1,row];1 T/ w6 U, H- E$ P; ^
end;
/ @0 q& r N6 w. ] newDirection(@);
! |% ? G" W5 Y C9 Y @.HasOrder := true;! i- d6 k. u# o# m. a8 o
end;7 s& R# Q. _ z) T
end;( Q2 @+ O2 z: u
end; -- of the method+ Q7 V5 W! U' j7 ?% V
|