/* called by: entrance ctrl of the object 'track'
$ K" {2 R0 a4 }! u! l; q: g*/2 Z( X' T9 c R3 K
is* P% o7 v. _9 ]8 u" q. i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! P! T h0 X7 ~6 U9 k* s
do8 V% d) K! \, C. [
Lan := rootfolder.Internal.Tools.AOLlanguage;
( ~, P" O) K+ \, F' U if current = @.Destination -- else return! _! Y- Q v/ S+ G
then
- a% ~; T8 o$ ]" B l' g @.Destination := void;0 i" u4 ^* S. j: y* M4 p& ?
if @.occupied then7 Y' ?+ y2 H Q! Q- M8 s
part := @.cont;
9 I5 f, j! Y7 \' c# {- U+ u1 Z @.transpOrder := void;4 I4 R3 u0 _* [5 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," `6 i& C1 a7 c9 B* M1 C
@,root.eventcontroller.simTime);
1 p+ l- P" b' s; l" O8 u @.HasOrder := false;3 v6 t; z% W8 } ~% I# X7 y
@.DrivingHome := true;
/ i! F+ N8 O- l y. b: t rgManager.tryToStartTransOrder;+ z( Z& c5 S( [0 e$ Z
if @.Destination = void
* \# a; a4 N9 Z! |8 f& p then -- no transport order for vehicle @6 E/ y# U' C: c3 g
@.Destination :=* d$ Y3 y. E2 Z _# w# \, D; m2 I
rgManager.nearestFreeStation(@,track.~);
& ~2 k g" A7 H( z& c1 ` newDirection(@); * h+ y. v% f* q1 o
if @.Destination /= void then
3 O$ V" X& J1 l/ N5 F @.Destination.NumReservation :=6 A# W9 u T# _- z' Z
@.Destination.NumReservation + 1;4 I4 ?8 F( [! {
end;
2 M. V3 ?1 i, P5 h @.CurrIcon := "drivingHome";
4 b) p \: t! X0 o4 f @.DrivingHome := true;5 u6 ?( d4 F p9 Q$ M( b5 Q% H
end;4 I0 D" U2 n: E- Z6 |1 w/ e- M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 e6 z$ t- J8 ?/ f
part := @.transpOrder;
! Y& [2 R6 u7 H part.move(@);-- load part
2 }% Y' {; a3 r1 `9 @4 {4 ?+ c @.CurrIcon := "load";! v- m5 ?" `, F6 N/ Q6 t6 y
GlobalDistObj := part.globDestination;3 S4 R% E( _7 J0 X
assignLObj := rgmanager.rgAssignL;
/ I$ `' d4 o) d row := assignLObj.getRowNo(GlobalDistObj);
1 ~3 I, ^; G9 J/ ?. u& d( W if Row = -1 then -- since 70
, ]1 r3 @" v9 J if lan=1 then+ \+ y5 X+ n9 j$ X$ x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* Y/ `! K+ z k- W to_str("in der Andockstation: \"",?.~.name,"\""));2 M L$ n0 d. |) L7 {! K
else
: T& F& l+ j$ a. l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 I |2 f" ]2 _+ R- s
to_str("in docking station: \"",?.~.name,"\"")); # R# q3 N0 y/ s" i
end;8 n4 e" Y' E% C9 h4 ~: S
else
( T/ i+ O1 |, v7 b @.Destination := assignLObj[1,row];) U, t9 {* L( H3 d Z) z8 a! a
end;
7 F7 e) @9 ?; a3 v1 S3 E A newDirection(@);
7 ]' P1 ?* i) }. K: p# e @.HasOrder := true;# x* {1 y) L2 h
end; x1 U) f( }* n* N; O. r
end;
* s6 l: H) t" y; d3 n Oend; -- of the method5 ~5 w2 q/ H- ^1 @2 F* q3 F! i
|