/* called by: entrance ctrl of the object 'track'
* r2 C6 W6 i2 X( e; R*/4 |- X3 L) J! i! g. [
is5 A/ T2 C7 p3 L' N& O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, I' \6 G; Z4 Q' X3 Bdo
( \2 l/ ^5 {) a Lan := rootfolder.Internal.Tools.AOLlanguage;, _" `" f( k+ |: `+ S( _
if current = @.Destination -- else return& b2 {' W2 W" e; ^! j
then9 C! y; n4 P6 t$ S
@.Destination := void;- }3 v/ o' W5 r2 d' {
if @.occupied then/ w( E2 Q, O: O/ s+ V+ O
part := @.cont;# Z- o" d" H4 z
@.transpOrder := void;
: H6 Q$ a7 i. ^; U/ }8 z5 i5 t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, u, w0 _; s9 r1 C" n
@,root.eventcontroller.simTime);
l# O, h! f' y! \ @.HasOrder := false;
- h/ Y1 }6 I; ?* ~+ [ @.DrivingHome := true;! |, r1 X" d4 e' a6 m
rgManager.tryToStartTransOrder;, n. I( o7 P, b- T- K- m0 K0 s2 h
if @.Destination = void, d+ Y6 P+ U" V- G' n. n# M
then -- no transport order for vehicle @
% b2 Z- A4 |4 n7 F @.Destination :=
! u. y3 x& O6 x! K- l& w rgManager.nearestFreeStation(@,track.~);
& m# `7 N7 t2 R7 X! s t. e newDirection(@);
; s# t5 M: [4 _. V: C. z7 y if @.Destination /= void then. i& @6 I- h5 Q0 O0 h
@.Destination.NumReservation :=
# l- c* @( W7 w5 z/ K, r @.Destination.NumReservation + 1;; c8 g5 J# Z* c% S7 s# R% h
end;
; k' O7 u2 W# B! U( l @.CurrIcon := "drivingHome";0 V$ m7 j6 V" S, Q
@.DrivingHome := true;
2 e# X) y H G- h- p9 K3 Y end;
3 v# N. B. B3 L7 `* R) F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( q( k4 H3 }, Q8 s" b3 A# c part := @.transpOrder;& g# ~ t/ |2 W: R7 a9 `
part.move(@);-- load part, n" N( m6 i3 Z- s1 _9 i1 ?
@.CurrIcon := "load";7 m4 \ G1 ^; R6 H# k% ^) J( ^) q
GlobalDistObj := part.globDestination;
/ ^; d; t+ q, _6 F' U2 s assignLObj := rgmanager.rgAssignL;
* d8 [, \+ u2 l2 F+ [- X row := assignLObj.getRowNo(GlobalDistObj);3 G; D8 Z; T: ~
if Row = -1 then -- since 70
8 o# f5 i) U6 t* S$ j' b" Q if lan=1 then( O8 Q% z# _4 g4 u4 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), a, H% x3 _0 r+ M, d& L8 T% T
to_str("in der Andockstation: \"",?.~.name,"\""));
' H: I% N& Y2 Q else, x( h1 l' Z, U3 O' R) B( k8 u `9 n. x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 k$ j1 h0 o/ o
to_str("in docking station: \"",?.~.name,"\""));
! P9 H: q( H1 V( s end;# N0 }2 ?( @ U( |5 g& V# ?
else1 s' J5 i) J/ `; ]* ~$ B! S- o: P
@.Destination := assignLObj[1,row];) h) n- M) @. ~9 `) l. L7 n
end;
( ^- V3 S/ `6 I; V- {3 p; P4 u newDirection(@);
4 u& O ?7 T4 s5 o' f" ^% P% l6 |6 H @.HasOrder := true;
$ i% W8 {' i# h end;' P+ q% h+ J; M2 B& C U3 }8 V
end;& b1 X9 i9 f" t$ j$ t: }# o
end; -- of the method
, W% q+ `) ]- r |