keallu / csl-emptyit Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi @keallu,
I noticed that warehouses only ever set to empty, they are never told to fill back up again.
I dug around in the code (note that I know nothing about C#) and I noticed this block:
if (buildingManager.m_buildings.m_buffer[buildingId].Info.m_buildingAI is WarehouseAI)
{
if (emptying)
{
buildingManager.m_buildings.m_buffer[buildingId].Info.m_buildingAI.SetEmptying(buildingId, ref buildingManager.m_buildings.m_buffer[buildingId], true);
}
else
{
buildingManager.m_buildings.m_buffer[buildingId].Info.m_buildingAI.SetFilling(buildingId, ref buildingManager.m_buildings.m_buffer[buildingId], true);
}
}
It appears that the if condition on emptying is telling the Warehouse to always empty?
The current code appears to flow like this:
if(emptying)
- if emptying
is true
.SetEmptying
- even though it is already emptying.What I believe may have been the goal:
if(!emptying)
- if emptying
is false.SetEmptying
.In short, I assume this is a bug. I do however recognise that I may have misunderstood the process that initiates this function. I assume it was called when either an upper or lower threshold is reached. Happy to close the issue if I am completely off track.
It doesn't stop emptying waste transfer facility after the facility is completely empty, or lower than the given threshold.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.