sekassel / stp-24-server-tracker

Issue Tracker and Feature Requests for the STP 2024 Server.
0 stars 0 forks source link

District Job Result max capacity reached but at max yet #23

Closed Daniel-Engelmann closed 2 months ago

Daniel-Engelmann commented 2 months ago

Describe the bug A clear and concise description of what the problem is. image Currently I have 3 Cities and I am trying to add another City. The Max Cities is 14 but when trying to add the fourth City after the Job is completed the result says System is at Capacity.

To Reproduce Steps to reproduce the behavior:

  1. Create a job with type district and district=city
  2. Wait until Job is completed
  3. Print out the Result of the Job

Expected behavior A clear and concise description of what you expected to happen. The Job completes succesfully

Additional context Add any other context about the problem here.

Clashsoft commented 2 months ago

Is the total system capacity ~15 and do you have some buildings? All buildings and districts count towards the capacity.

Daniel-Engelmann commented 2 months ago

I didn't know there is a total system capacity but i just printed it out and its 22. image And i only have 15 Buildings build so there should be more than enough room for one more.

Here is the part of the Code: image

Clashsoft commented 2 months ago

Then I need the system ID to have a look.

Daniel-Engelmann commented 2 months ago

Then I need the system ID to have a look.

6686585eba4143631bfb97c6

Daniel-Engelmann commented 2 months ago

Das sind alle Daten die mir swagger ausgibt:

{ "_id": "6686585eba4143631bfb97c6", "game": "66865850ba4143631bfb96c9", "type": "regular", "districtSlots": { "city": 14.625, "industry": 14.625, "agriculture": 4, "energy": 3, "mining": 8 }, "districts": { "city": 3, "industry": 3, "mining": 3, "energy": 3, "agriculture": 3 }, "capacity": 22, "buildings": [ "power_plant", "mine", "farm", "research_lab", "foundry", "factory", "refinery" ], "upgrade": "upgraded", "population": 25, "links": { "6686585eba4143631bfb97c7": 19.43922087814581, "6686585eba4143631bfb97c5": 24.27469028158775, "6686585eba4143631bfb97c3": 16.16724790217069 }, "x": 65.13300939327803, "y": -131.06803825718822, "effects": [], "createdAt": "2024-07-04T08:07:58.358Z", "updatedAt": "2024-07-04T08:36:15.973Z", "owner": "6686585eba4143631bfb970d" }

Clashsoft commented 2 months ago
"districts": {
"city": 3,
"industry": 3,
"mining": 3,
"energy": 3,
"agriculture": 3
},
"capacity": 22,
"buildings": [
"power_plant",
"mine",
"farm",
"research_lab",
"foundry",
"factory",
"refinery"
],

7 buildings + 15 districts = 22 (capacity). Everything adds up.

Daniel-Engelmann commented 2 months ago

Ah the building count towards it too okay thanks than we need to change that in our game.