Changeset 6278763354e25a05ac88231b9c826f1c728a0188

Show
Ignore:
Timestamp:
01/20/08 12:30:00 (7 months ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1200828600 +0100
git-parent:

[4c8d4a8ac38ae7518a40cf0419baec26131a59c1]

git-author:
Christopher Jung <bktheg@web.de> 1200828600 +0100
Message:

ScriptParser?: Rolle DeutTransporter? auf ShipUtils? umgestellt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/scripting/roles/roleimpl/DeutTransporter.java

    rd466783 r6278763  
    3030import net.driftingsouls.ds2.server.cargo.Resources; 
    3131import net.driftingsouls.ds2.server.framework.ContextMap; 
     32import net.driftingsouls.ds2.server.scripting.ShipUtils; 
    3233import net.driftingsouls.ds2.server.scripting.roles.Role; 
    3334import net.driftingsouls.ds2.server.scripting.roles.interpreter.Attribute; 
    34 import net.driftingsouls.ds2.server.ships.RouteFactory; 
    3535import net.driftingsouls.ds2.server.ships.Ship; 
    36 import net.driftingsouls.ds2.server.ships.Ship.MovementStatus; 
    3736 
    3837/** 
     
    6665                 
    6766                if( !nebel.equals(ship.getLocation()) && !isEnougthDeutAvailableForTransport(ship) ) { 
    68                         ship.move(new RouteFactory().findRoute(ship.getLocation(), nebel), true, true); 
     67                        ShipUtils.move(ship, nebel, Integer.MAX_VALUE); 
    6968                        return; 
    7069                } 
     
    7978                 
    8079                Base base = (Base)db.get(Base.class, (int)this.base); 
    81                 MovementStatus status = ship.move(new RouteFactory().findRoute(ship.getLocation(), base.getLocation()), true, true); 
    82                 if( status != MovementStatus.SUCCESS ) { 
     80                if( !ShipUtils.move(ship, base.getLocation(), Integer.MAX_VALUE) ) { 
    8381                        return; 
    8482                } 
     
    8684                transferDeutToBase(ship, base); 
    8785                 
    88                 ship.move(new RouteFactory().findRoute(base.getLocation(), nebel), true, true); 
     86                ShipUtils.move(ship, nebel, Integer.MAX_VALUE); 
    8987        } 
    9088 
  • test/java/net/driftingsouls/ds2/server/scripting/roles/roleimpl/DeutTransporterTest.xml

    rd466783 r6278763  
    22<dataset> 
    33        <nebel x="1" y="1" system="1" type="1" /> 
     4         
     5        <!-- EMP-Nebel --> 
     6        <nebel x="50" y="50" system="1" type="4" /> 
     7        <nebel x="51" y="51" system="1" type="4" /> 
     8        <nebel x="52" y="52" system="1" type="4" /> 
    49         
    510        <users id="1" name="Testuser" cargo="10000000000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0," history="" flags="" />