/* called by: entrance ctrl of the object 'track'
, I4 q$ k7 }( d6 Q*/
& S: Q7 A* d. gis
, H( N6 F2 S$ D, W+ w part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 n5 _0 e5 ?' U" {- y
do6 \* J8 _) V# ]! [3 t; a# {- s
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 ]* O5 }& w; W K: X if current = @.Destination -- else return
, ?* S5 s( K( X' l6 C# L then
) \7 W- ~' ]% ` @.Destination := void;
: {3 ^$ C, @8 V. l b3 l$ t if @.occupied then
( B4 x8 n$ \& K& C1 X. j" {8 { part := @.cont;, E; V0 P7 [6 E; P, `
@.transpOrder := void;$ Y; O6 |1 C( v' w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' y4 k! K! e4 U @,root.eventcontroller.simTime);
" L" w- S% P- b- r2 d @.HasOrder := false;
9 G2 P' v0 T: l ?: q7 h @.DrivingHome := true;
+ u# ^6 i9 B6 f" A# _8 W- ~0 K rgManager.tryToStartTransOrder;8 ~8 z4 v' ^( h F& l3 C1 P
if @.Destination = void
& c! V/ [% ?4 r7 U& F" S6 T0 U" F8 f then -- no transport order for vehicle @7 Q% |3 u, q+ d* {; _7 }
@.Destination :=
) |& V* F/ [& S rgManager.nearestFreeStation(@,track.~);
* V3 t# \3 r6 D( v newDirection(@);
% O; d& g* x' D if @.Destination /= void then
' y- N; w. F7 ?; C! [: p+ ` @.Destination.NumReservation := L' s- m8 y! g% b3 A
@.Destination.NumReservation + 1;/ Q$ S2 w- Y# f: `: N0 l# Y' O' v
end;
$ B& q& n# G- x5 D2 q- h, p @.CurrIcon := "drivingHome";9 z: Z" R# P8 z! G- @* c
@.DrivingHome := true;
' m- Z0 K" c6 J4 {% w1 A; O end;
6 C, _6 V) D9 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 Y% h/ q' o6 D' u' y
part := @.transpOrder;
) u- H" Z1 R5 O+ m2 } part.move(@);-- load part+ d- t+ [' l. l( g
@.CurrIcon := "load";, o% K9 n z9 |
GlobalDistObj := part.globDestination;
* [0 e- E/ {1 }4 _- e& b assignLObj := rgmanager.rgAssignL;- i6 ~+ z% p5 u& W, C4 g/ J( J
row := assignLObj.getRowNo(GlobalDistObj);
/ y% l6 r8 ^6 c' @, K+ C if Row = -1 then -- since 70 [8 N$ A6 D" v3 n* t
if lan=1 then R4 T1 O( t# U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: P, T4 @7 s o
to_str("in der Andockstation: \"",?.~.name,"\""));
2 ]0 X8 Y2 N( Z* [/ ^ else4 m1 D) G. G3 E2 i3 F( W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," i% p5 g$ b9 w& }) U' }; y7 R
to_str("in docking station: \"",?.~.name,"\"")); ( {- f- N; k2 J# r# M: Q5 _# c$ ]6 s$ U9 K
end;
; J9 v) N$ R9 k3 B7 Y* K else
& d- {5 q) C/ r( @ @.Destination := assignLObj[1,row];, V7 M" a% v) g* h) p! B( H# m
end; 9 X z0 B) v/ r$ S/ m5 O
newDirection(@);7 |5 X y$ E1 i3 |, a" ~: Z
@.HasOrder := true;) @ g& R9 G5 S
end;
9 w( \; q2 s* L1 U& X end;
$ V( u. z" q( zend; -- of the method- N/ ^' _ g: V. C" C; ~. k; G
|