/* called by: entrance ctrl of the object 'track', r/ M. @3 Z; G
*/0 q$ D; O$ A8 ^+ ]& E6 x% [
is
# G9 ?# @2 V8 B6 \. J2 y" r part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 _' ^3 W% k! [1 j2 P
do2 y7 _/ q! f3 y2 H1 T# |0 B
Lan := rootfolder.Internal.Tools.AOLlanguage;# n, ?# _* v9 J D E; b
if current = @.Destination -- else return
4 t! l" q4 O t0 ]1 ? then' K' `4 _9 r. n
@.Destination := void;
9 M8 R1 {8 _1 {( O" z+ z if @.occupied then
$ j3 {3 v8 g: K4 F- m part := @.cont;
* s4 F8 j$ q9 Q5 e @.transpOrder := void;* p7 N! {% h3 z4 `3 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ m9 X6 K6 ?( v- t @,root.eventcontroller.simTime);! d; H% j* c) G) M6 u
@.HasOrder := false;% o* I- S( K4 N/ T# I0 u
@.DrivingHome := true;' p O: k2 a8 K& s+ T
rgManager.tryToStartTransOrder;+ R2 s% _4 A. _ n' y* n ?& l
if @.Destination = void# \! Y0 X$ C5 D3 z$ @" N
then -- no transport order for vehicle @1 c! W5 u- P9 u u
@.Destination :=3 n! u2 ]+ o* M
rgManager.nearestFreeStation(@,track.~);
. C) x' T* Y9 o* W! c6 v newDirection(@); * E) _" e2 z, w, i4 c
if @.Destination /= void then
5 i; H' W: j) R# [% ^0 @5 J0 I @.Destination.NumReservation :=
% V/ O. `6 X5 e' t0 W X# j1 \ @.Destination.NumReservation + 1;! i- [0 y& q. F( E; Y
end;
* S% |9 R* l0 M0 P& j$ X* O @.CurrIcon := "drivingHome";- k! Y$ z! z0 e* [. z
@.DrivingHome := true;* n F ~/ n2 z) _2 p0 y
end;# S/ ^" i7 D: N7 k2 a) f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 E- g8 x7 ]% {8 Q8 L
part := @.transpOrder;0 r9 |# z9 e7 ^) E. J- e
part.move(@);-- load part3 {( g) Y" {+ H1 W' p- d, V
@.CurrIcon := "load";
0 o9 K) M: M% E, ^ GlobalDistObj := part.globDestination;* b& m; L/ O" q0 Z7 m
assignLObj := rgmanager.rgAssignL;; J+ F" j- p. L6 S* w
row := assignLObj.getRowNo(GlobalDistObj);
$ x# O4 I8 R- g, m% o2 O. b% [ if Row = -1 then -- since 70
9 t. B; u8 D0 h& a/ G if lan=1 then& J R3 Y# [% e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," I+ x( V/ t; _3 x
to_str("in der Andockstation: \"",?.~.name,"\""));
O Q1 h* E; o else
: J' `" R' L# k8 n5 R* ?, J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! H% s& ~1 X" O
to_str("in docking station: \"",?.~.name,"\"")); " }! Z" g" i" Z. A
end;
; z* N6 L4 B. p else
' {/ r1 N6 F6 N. x6 {0 D @.Destination := assignLObj[1,row];- R4 i$ b! u6 j9 I
end;
3 L: A2 K4 p# ^ d: m newDirection(@);
2 W! _1 P: r- W) d) o/ d4 x: i @.HasOrder := true;
& \( A: R- T+ L+ H& V& L end;
; E7 k3 `4 c4 O: _0 c end;
5 y& g: ~) }2 @8 |/ q3 a: Pend; -- of the method3 x. y1 B& @+ R8 K( T
|