/* called by: entrance ctrl of the object 'track'
6 A) d6 U) Z2 a% ~" Y, G2 ^*/& L7 Y% t' @7 u
is+ @; w7 x5 x1 b& z* @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' [+ U9 F# _+ h4 ]do
' `% V5 e) J4 T7 u3 d5 U Lan := rootfolder.Internal.Tools.AOLlanguage;
) F E4 E+ k: {; H# W/ S; c$ c8 D, B if current = @.Destination -- else return# o; b; g, `2 I
then& J" w6 A5 X, [6 d
@.Destination := void;/ w$ o6 p6 n5 O: z$ G0 M
if @.occupied then
: F6 V- W+ H: X+ K/ t' _; R$ n5 f part := @.cont;* L" w l% N7 x& V: m
@.transpOrder := void;
% i( K4 y2 s) `& O9 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 e _& s6 N. U h( J ~ @,root.eventcontroller.simTime);
4 S: {/ y6 H* f; O7 b# R @.HasOrder := false;8 k; c6 P B1 ~8 ]9 i
@.DrivingHome := true;" H0 k( O0 ~: L% l# l6 U7 J- C4 q
rgManager.tryToStartTransOrder;' s) {/ a' m* P* ^0 {9 f
if @.Destination = void
O) o+ v3 w, V+ Q8 L then -- no transport order for vehicle @! u- l2 u2 a0 d; h4 U5 R$ Y' t
@.Destination :=: g8 ]& H% B5 ~# q9 z' H
rgManager.nearestFreeStation(@,track.~);
Q* `1 p% L, ?5 s$ p, c3 J newDirection(@);
) O* Q- a% q/ I+ D' M: v7 k' i7 ~ if @.Destination /= void then
" L7 o P) A, V @.Destination.NumReservation :=2 n# a5 K6 h5 e9 P' F0 x" z
@.Destination.NumReservation + 1;
o7 L' i, w) | end;
& \9 O1 v. U) ?! {) H/ | @.CurrIcon := "drivingHome";
- i' P# R/ S" R" g @.DrivingHome := true;
) ?2 X+ b% w! d" N0 R! G4 \ end;$ n* o( C% J4 H5 U o c7 n: i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 [$ F8 N8 i& g2 ~7 F4 v5 R part := @.transpOrder;. ^4 w8 r! w v
part.move(@);-- load part
( e" F# h6 {% J/ v8 w @.CurrIcon := "load";6 W0 a# P4 \! L9 Y* z0 |" h
GlobalDistObj := part.globDestination;, P" M4 u' S9 b* x+ |) L! M/ o
assignLObj := rgmanager.rgAssignL;
+ d6 r: v$ y/ S- h$ L/ l row := assignLObj.getRowNo(GlobalDistObj);9 c) U+ y j- G( ?8 T2 ~4 ]
if Row = -1 then -- since 70
# @% a* n B. Z( p" I" P if lan=1 then
. b0 A* m6 B- _9 S% y$ R$ C6 \- C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Z' {! }' E4 b' b to_str("in der Andockstation: \"",?.~.name,"\""));- B' x# D9 P8 U1 V8 ~' C' w) f* e
else$ i4 \5 u7 O0 L% c) @. t1 L6 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: A T3 I! n" I
to_str("in docking station: \"",?.~.name,"\""));
9 r) w/ d" t. g4 Y1 V: j: P! m0 o end;( {/ M6 o; L7 z) A; O+ E3 p
else
- g' s: X- d: H @.Destination := assignLObj[1,row];
" {1 p# W7 m# Q end; " o) I' I, U$ s" l( X; ~+ r: E
newDirection(@);
6 p- R. @2 h( E7 p7 b; ^ @.HasOrder := true;
& I4 F* t( i4 k end;
4 @' d5 |4 A6 B( b2 T9 L* ?: S end;* y0 a( G+ Q, V4 c! p
end; -- of the method3 A0 U l& \9 w
|