/* called by: entrance ctrl of the object 'track'
2 v8 s+ e. Z( X t% \*/& M. y# t6 T( N) {8 b- ~. g
is# Y: C6 f* L. a! c+ w1 w6 X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ N# p; I) w+ ]: Z" d+ r8 ydo
) E" g- Z" v9 D5 ^7 |( Q* ?, y6 G6 u6 ~ Lan := rootfolder.Internal.Tools.AOLlanguage; U# Q' [) ~# K, r
if current = @.Destination -- else return9 M; J+ w1 O. ?3 H* T# ~; A6 c( F
then
* D# M. N! X0 N5 U @.Destination := void;
( i/ s* O' t z( \: l if @.occupied then
. ~4 T2 v+ D, @) l part := @.cont;
9 M ]' c+ V" |, Q# P5 l" `1 e/ X& H @.transpOrder := void;
! k% _1 W) C5 n0 d part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, ]- ~2 c) Y& D J( m @,root.eventcontroller.simTime);- g& {) W0 X# s( x
@.HasOrder := false;& z7 c, l: H; O8 d/ |1 g7 n
@.DrivingHome := true;2 j# \; O5 n' o( U! z# H A4 E, k
rgManager.tryToStartTransOrder;
% w, g9 x2 _3 M+ ?' M# S* R0 W' h2 u if @.Destination = void
: U( z- y& T/ c; S8 u! z then -- no transport order for vehicle @
" f$ o. O/ m/ `3 p- @ @.Destination :=4 D+ x3 A4 P" N$ X" d; Y" D
rgManager.nearestFreeStation(@,track.~);5 ?' h9 ~% B) K4 t
newDirection(@);
" J% ?, ~, v5 X: {# H) I: G if @.Destination /= void then/ F. `8 c9 F0 ]! {( j
@.Destination.NumReservation :=4 ^" H$ V3 ]! q# K, l+ Q
@.Destination.NumReservation + 1;0 L9 V4 p& y% s" J
end;4 @2 D8 i) W0 y: Q, B
@.CurrIcon := "drivingHome";$ I* H, D0 D( M/ P* P' S |5 U
@.DrivingHome := true;
% k0 y/ F, C5 G p5 t0 I# C& r end;. j* R# V! `5 `+ r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" R; a0 ~# g+ R) s) N
part := @.transpOrder;" @3 T/ C1 c% i8 o! J1 j% K k
part.move(@);-- load part6 O7 e! l6 k% ^6 @9 D4 @
@.CurrIcon := "load";
# `+ V6 w5 |2 `# N: G! J( y6 u* ] GlobalDistObj := part.globDestination;7 n' r3 y4 t) s
assignLObj := rgmanager.rgAssignL;
: M0 _+ Y2 {( O& h) W2 S, ^ row := assignLObj.getRowNo(GlobalDistObj);' X- d9 ^/ @8 V* ?! e. T! t
if Row = -1 then -- since 70
% f, p! [2 I- e9 i; C) L if lan=1 then
: Y: _) v8 |1 D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# S$ ~- i8 k2 Z ~
to_str("in der Andockstation: \"",?.~.name,"\""));: W ^$ g3 H/ N# B
else
" a8 v0 v+ ^0 A& J# r5 H6 @. S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- M' b& k. `4 a# j2 l9 z
to_str("in docking station: \"",?.~.name,"\"")); * d0 K# \$ |0 J' n1 U
end;
) v3 U. i6 o8 ~2 i$ P/ } else
7 l1 U+ }* e! u5 x @.Destination := assignLObj[1,row];0 x4 K& R# J$ F7 y0 v5 x2 Y
end;
$ n/ |$ ^+ k+ O/ K& M" H' Y! Y1 l newDirection(@);( q2 Z6 W! g+ K5 i9 }
@.HasOrder := true;7 ?3 A# N) S' m( b
end;
. Y" Z0 J' @8 x5 Z Q end;; P {, E+ C5 a; u# e
end; -- of the method
/ V8 J6 J7 v" ^9 y( V, A |