Giter Club home page Giter Club logo

lacuna-automation's People

Contributors

brycebaril avatar codon avatar cxreg avatar paulbort avatar popiel avatar randomstatistic avatar ysth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lacuna-automation's Issues

Client.pm caching should be separated by server

If you create an empire on the tourney server with the same name as you empire on the regular server, the cache conflicts. The caching layer should probably be pushed down another level to be server-based.

haste crashes when trying to dispose of waste

When haste is trying to maintain waste on a planet with positive waste production, it is crashing after sending scows.

I've identified three different issues here:

  • It's trying to dispose of $maximum_waste amount of waste, not $s->{stored_waste} - $maximum_waste waste.
  • It tries to send all scows that were available at the start of scow_dump() resulting in potentially trying to send scows that are no longer available to send (not enough waste)
  • When it moves on to recycling waste, it potentially tries to recycle a negative amount of waste.

haste does not properly dump waste when stored resource amounts are equal

When all stored resource amounts are equal, haste dumps resources in amounts of 1,2,3,4. This is is because the difference between the current resource and the "next" resource is 0, but it sets a minimum of 1. There needs to be an additional check for the sum of dumped waste being less than the target amount.

Tue Feb 8 16:09:23 2011: Checking waste stores on Ir Aefatch II
Tue Feb 8 16:09:23 2011: -- keeping waste between 2147 and 10736 units
Tue Feb 8 16:09:23 2011: Waste rate is negative (-)
Tue Feb 8 16:09:23 2011: We have 0.01 hours (6 units) of waste stored
Tue Feb 8 16:09:23 2011: -- We have less than our threshold of 2147 units of waste
Tue Feb 8 16:09:23 2011: -- Need to create 2141 units of waste
Tue Feb 8 16:09:23 2011: -- Gathering storage facility information
Tue Feb 8 16:09:23 2011: Gathering resource information
Tue Feb 8 16:09:23 2011: -- current resources: $VAR1 = {
'energy' => 21367,
'food' => 21367,
'ore' => 21367,
'water' => 21367
};

Tue Feb 8 16:09:23 2011: -- Proportionalizing 2141 units between 4 resource types
Tue Feb 8 16:09:23 2011: -- diff between energy and food is 0
Tue Feb 8 16:09:23 2011: -- split 0 between 1 resources
Tue Feb 8 16:09:23 2011: -- current split: $VAR1 = {
'energy' => 1
};

Tue Feb 8 16:09:23 2011: -- accumulated dump amount: 1; 2140 units remaining to be dumped
Tue Feb 8 16:09:23 2011: -- diff between food and ore is 0
Tue Feb 8 16:09:23 2011: -- split 0 between 2 resources
Tue Feb 8 16:09:23 2011: -- current split: $VAR1 = {
'energy' => 2,
'food' => 1
};

Tue Feb 8 16:09:23 2011: -- accumulated dump amount: 3; 2138 units remaining to be dumped
Tue Feb 8 16:09:23 2011: -- diff between ore and water is 0
Tue Feb 8 16:09:23 2011: -- split 0 between 3 resources
Tue Feb 8 16:09:23 2011: -- current split: $VAR1 = {
'energy' => 3,
'ore' => 1,
'food' => 2
};

Tue Feb 8 16:09:23 2011: -- accumulated dump amount: 6; 2135 units remaining to be dumped
Tue Feb 8 16:09:23 2011: -- proportionalized dump: $VAR1 = {
'energy' => 3,
'food' => 2,
'ore' => 1
};

Tue Feb 8 16:09:23 2011: -- storage facilities: $VAR1 = {
'energy' => {
'efficiency' => '100',
'name' => 'Energy Reserve',
'x' => '-5',
'image' => 'energy-reserve5',
'y' => '-1',
'level' => '5',
'url' => '/energyreserve',
'id' => '19267',
'type' => 'energy'
},
'ore' => {
'efficiency' => '100',
'name' => 'Ore Storage Tanks',
'x' => '5',
'image' => 'orestorage5',
'y' => '-1',
'level' => '5',
'url' => '/orestorage',
'id' => '19270',
'type' => 'ore'
},
'food' => {
'efficiency' => '100',
'name' => 'Food Reserve',
'x' => '4',
'image' => 'food-reserve5',
'y' => '5',
'level' => '5',
'url' => '/foodreserve',
'id' => '19271',
'type' => 'food'
},
'water' => {
'efficiency' => '100',
'name' => 'Water Storage Tank',
'x' => '-5',
'image' => 'waterstorage5',
'y' => '5',
'level' => '5',
'url' => '/waterstorage',
'id' => '19131',
'type' => 'water'
}
};

Tue Feb 8 16:09:23 2011: -- building: $VAR1 = {
'efficiency' => '100',
'name' => 'Energy Reserve',
'x' => '-5',
'image' => 'energy-reserve5',
'y' => '-1',
'level' => '5',
'url' => '/energyreserve',
'id' => '19267',
'type' => 'energy'
};

Tue Feb 8 16:09:23 2011: Dump 3 units of energy
Tue Feb 8 16:09:23 2011: -- building: $VAR1 = {
'efficiency' => '100',
'name' => 'Food Reserve',
'x' => '4',
'image' => 'food-reserve5',
'y' => '5',
'level' => '5',
'url' => '/foodreserve',
'id' => '19271',
'type' => 'food'
};

Tue Feb 8 16:09:23 2011: Dump 2 units of food
Tue Feb 8 16:09:24 2011: -- Proportionalizing 2 units between 22 resource types
Tue Feb 8 16:09:24 2011: -- diff between fungus and algae is 203
Tue Feb 8 16:09:24 2011: -- split 2 between 1 resources
Tue Feb 8 16:09:24 2011: -- current split: $VAR1 = {
'fungus' => 2
};

Tue Feb 8 16:09:24 2011: -- accumulated dump amount: 2; done
Tue Feb 8 16:09:24 2011: Dumping 2 units of fungus
Tue Feb 8 16:09:24 2011: -- building: $VAR1 = {
'efficiency' => '100',
'name' => 'Ore Storage Tanks',
'x' => '5',
'image' => 'orestorage5',
'y' => '-1',
'level' => '5',
'url' => '/orestorage',
'id' => '19270',
'type' => 'ore'
};

Tue Feb 8 16:09:24 2011: Dump 1 units of ore
Tue Feb 8 16:09:25 2011: -- Proportionalizing 1 units between 20 resource types
Tue Feb 8 16:09:25 2011: -- diff between goethite and magnetite is 5577
Tue Feb 8 16:09:25 2011: -- split 1 between 1 resources
Tue Feb 8 16:09:25 2011: -- current split: $VAR1 = {
'goethite' => 1
};

Tue Feb 8 16:09:25 2011: -- accumulated dump amount: 1; done
Tue Feb 8 16:09:25 2011: Dumping 1 units of goethite
Tue Feb 8 16:09:26 2011: Ir Aefatch II ... done
Tue Feb 8 16:09:26 2011: Tue Feb 8 16:09:26 2011 All planets are done. Sleeping 120 minutes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.