/* called by: entrance ctrl of the object 'track'
- P$ P) k* \* |5 W n& V& _*/
4 ^* D: @1 O0 o: ais' m w. [9 ~' h4 n/ o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 r: ?5 I1 Y3 F5 }6 ~do2 U! [2 E3 Y+ V* }
Lan := rootfolder.Internal.Tools.AOLlanguage;5 e+ X4 v0 \7 \6 x% F) s& a: `
if current = @.Destination -- else return
- F! s; s5 m/ ?( r: _8 }8 V then
' N) j1 {. g* p0 A& A9 m" K @.Destination := void;: O* f) k" P$ K& Z" \: ~3 j. o
if @.occupied then( U: x1 u1 E% |, y! U5 n
part := @.cont;
( E6 q( H& J C* N @.transpOrder := void;! U8 b. j7 |! J7 ~, F) z5 \: I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. Y" E0 ]( D3 O* _% R- Y @,root.eventcontroller.simTime);4 S$ L1 ?: @ g. f6 |# B
@.HasOrder := false;: A2 l: w6 X0 d' x4 ?
@.DrivingHome := true;" Y1 G! H* T& N
rgManager.tryToStartTransOrder;
4 `6 r0 j" o/ g U7 G+ A& q" v if @.Destination = void- b4 g3 e1 a1 S) _
then -- no transport order for vehicle @% k, O( {' y5 a: L- o1 {8 B
@.Destination :=
" t8 a5 h9 n u- ~6 \+ r& ] rgManager.nearestFreeStation(@,track.~);
1 K5 Z0 C, K' x: k4 D newDirection(@);
8 D I3 l, V8 {$ i9 P if @.Destination /= void then2 g9 a7 M$ ~3 x: ~3 k
@.Destination.NumReservation :=
4 u. Y& {! f6 M7 x @.Destination.NumReservation + 1; n+ a# N! G: {6 W
end;
' e7 @ t' ~/ i6 d* ~, D$ J @.CurrIcon := "drivingHome"; ]! j4 G$ c2 O
@.DrivingHome := true;
- T, H* ], T4 U% `- M" i6 K2 ]/ Q end;, G0 T# @$ y, W/ J( G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 i3 ~6 | m+ ?6 ^$ S& H
part := @.transpOrder;
3 l6 P" Y. D6 r part.move(@);-- load part& Z7 Q$ M5 ^" ~6 F F$ }2 D
@.CurrIcon := "load";
# `2 C( I& n0 s6 y/ I$ r5 Y GlobalDistObj := part.globDestination;
e2 d: M! T: b: l8 I- ] assignLObj := rgmanager.rgAssignL;0 T; u% U) Q; \% D, n" o! `. c" r+ {
row := assignLObj.getRowNo(GlobalDistObj);' |% p* s/ b9 W9 _+ I1 D! g2 A# R
if Row = -1 then -- since 70+ _& K* K0 x f: K: O
if lan=1 then
! u% r9 U( g% E6 z8 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; j }, ^, Z! h- ^1 I, n to_str("in der Andockstation: \"",?.~.name,"\""));
# s3 h& `* \ y7 s7 ^ else9 t4 s6 A6 A7 e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ u2 `& X6 Z5 \" R; Q to_str("in docking station: \"",?.~.name,"\""));
8 F. P9 r* I I end;
X5 M5 n+ N- x( U else
# x" k Y% o. I3 n; O) ?. u @.Destination := assignLObj[1,row];6 f7 |3 o0 u& d+ I+ ]& w( Z( D0 ^
end;
: i V5 X! [: C$ t0 l newDirection(@);
; b! j- [; v* X" p. _. H4 a8 r @.HasOrder := true;3 u5 m5 e+ n! P8 p
end;" L9 N1 ~& y7 e% U& \; O' S
end;, O G; H8 d+ w# c
end; -- of the method0 q! m, |9 P3 G( m
|