Changeset 0c822bd16a9f2678503d67e727ad3c27d77a458b

Show
Ignore:
Timestamp:
08/30/08 15:15:24 (3 months ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1220102124 +0200
git-parent:

[ff57a2bd873d618720d5f81c85e51e3f1d0a5a3d]

git-author:
Simon Dietsch <rhonabwy@sternenbund.org> 1220102124 +0200
Message:

[gameplay] Werften produzieren nur noch anteilig ihrer Crew

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/net/driftingsouls/ds2/server/tick/regular/WerftTick.java

    r0047196 r0c822bd  
    100100                                        this.log("\tItem benoetigt: "+Items.get().item(entry.getRequiredItem()).getName()+" ("+entry.getRequiredItem()+")"); 
    101101                                } 
    102                                 if( entry.isBuildContPossible() ) { 
    103                                         entry.continueBuild(); 
    104                                         this.log("\tVoraussetzungen erfuellt - bau geht weiter"); 
     102                                 
     103                                // Wenn keine volle Crew vorhanden ist, besteht hier die Moeglichkeit, dass nicht weitergebaut wird. 
     104                                double crew_percent = Math.floor(werft.getCrew() / werft.getMaxCrew()); 
     105                                if (Math.random() <= crew_percent) { 
     106                                        if( entry.isBuildContPossible() ) { 
     107                                                entry.continueBuild(); 
     108                                                this.log("\tVoraussetzungen erfuellt - bau geht weiter"); 
     109                                        } 
    105110                                } 
    106111