/* called by: entrance ctrl of the object 'track'
2 g3 M z7 c4 G s- \*/
9 j* U6 a9 F! M1 t! U8 ]is
! k, {- V2 [6 R+ ]" v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. {* w" F, L1 e) h! s6 f( ^do
, H: G9 b$ i. R# f Lan := rootfolder.Internal.Tools.AOLlanguage;
7 G1 D6 ]! y* m9 E if current = @.Destination -- else return
: M- y7 S* w: j7 g: T3 \7 t then! a' p7 w& Q8 G) Q- m6 F; C1 g f
@.Destination := void;
) Y: q! l! g6 h R( ~ if @.occupied then! y$ m5 v8 |$ T9 N' `6 q; P
part := @.cont;; k8 j, @* a% F& }9 p, g
@.transpOrder := void;( L+ x& Y; c) B( C- Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" r+ Y E! s8 f [$ Q: x @,root.eventcontroller.simTime);* z7 D5 b& H( h4 u. w
@.HasOrder := false;
2 R$ _+ X- j' N/ `6 [3 u0 _ @.DrivingHome := true;
- }% v& M: v7 y7 q& k# @ rgManager.tryToStartTransOrder;0 \/ x! }; Q( M+ j
if @.Destination = void
; @. k+ ~1 B9 E3 _# C5 A3 Y then -- no transport order for vehicle @5 R* {6 ?; w) g
@.Destination :=5 O" q& s6 X9 g# h0 Z& h0 _
rgManager.nearestFreeStation(@,track.~);. }1 D. [3 I7 m5 u: ?
newDirection(@); 3 Z, W0 ]! i+ @ P+ n5 }- c$ b
if @.Destination /= void then
* t6 P! ?* q. o+ y; g @.Destination.NumReservation :=* l" \8 x6 I; L
@.Destination.NumReservation + 1;; c+ v/ }, a1 G' }; g
end;& ~9 R& K: Q; u% ?, B0 ^/ H: E
@.CurrIcon := "drivingHome";' \/ H) e. y( d$ y% H/ x+ U+ D$ G
@.DrivingHome := true;! b" [ d! f0 x8 A
end;
2 D7 ], A1 o2 u" V* i2 o else -- the vehicle @ is empty, both vehicle and part are in the same dock station% a, \1 Q' n5 y1 u9 }( v0 h
part := @.transpOrder;; C/ Q' z/ u4 |1 n
part.move(@);-- load part
8 }' X- s6 R0 @( D, d @.CurrIcon := "load";* h% A& k- k( l
GlobalDistObj := part.globDestination;
+ B1 O4 C( X+ V' v- i assignLObj := rgmanager.rgAssignL;7 T w7 P( \) h; z$ s. G w
row := assignLObj.getRowNo(GlobalDistObj);
s9 p9 ~, r" s if Row = -1 then -- since 70
: c" l# Z. [/ E% B6 ?+ o! U( ~2 H if lan=1 then+ h0 b) X/ N7 Q" q* v# ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ d$ X0 G m8 N) W to_str("in der Andockstation: \"",?.~.name,"\""));
% W, C( X, e/ k3 s else8 @; H& s8 Z" f) o' F9 d& @+ C& d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," _# i# X6 {' K/ k, [! C8 n S! j
to_str("in docking station: \"",?.~.name,"\""));
. k1 f: G N$ d7 f7 y; ^ end;
, e! }5 P, k( ^0 j. G( C( R2 Q else
2 M1 H/ s9 M4 C @.Destination := assignLObj[1,row];& w% p* l! L* |- v# m6 O/ k
end;
+ q8 m1 H0 \3 \% H( A newDirection(@);7 I0 [6 K) T( }7 q0 k1 M" Q
@.HasOrder := true;
& a: {$ g9 R m8 \ end;
* T8 o8 U1 S/ X( ^ end;
/ \ E! O. P+ y2 Z+ }, c+ n& v" Q1 \end; -- of the method' x1 m2 H( M9 n$ o; Q
|