Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in research #560

Closed
minideveloper1778 opened this issue Jun 1, 2023 · 9 comments
Closed

Bug in research #560

minideveloper1778 opened this issue Jun 1, 2023 · 9 comments
Assignees
Labels
Bug Issues that is an error, bug or it is not working as expected Fixed Issues that after being labeled as Bug have been resolved
Milestone

Comments

@minideveloper1778
Copy link

Hello!

ran into a research problem.
If there is a research laboratory in the construction queue, the research cannot be completed.

screenshots:
queue
research

@jonamix-ar
Copy link

I understand the bug, if when you put the research laboratory in the construction queue, it lets you investigate, but in turn it is not a bug because when you press investigate while the laboratory is still in the queue, its construction is cancelled. I just tried it in pioneer I put a building and the laboratory in the queue and pressed an investigation, while if I was investigating the laboratory it got out of the construction queue when the building finished being built

Basically it is not a bug, but in ogame they changed the alert function now if you investigate and you have the laboratory in the construction queue its construction is canceled

@LucasKovacs
Copy link
Member

So the alert needs to be removed? Functionality is ok?

@jonamix-ar
Copy link

jonamix-ar commented Jun 17, 2023

RTA: 1 - The blocking function works well as it should, so you can't build the lab when researching.
RTA: 2 - The message is deleted only appears in the inputs, what we can do is block the input build and leave a message is being investigated in the style of domes.

THIS ITS BUILDING LAB
image

Research tooltip
image

Research input
image

Building lab in colony
image

THIS IT'S REVERSE
IMG
image

Labs blocked its reserching
image

Lab info
image

Research labs in other planet whit intergalactic network
image

@jonamix-ar
Copy link

jonamix-ar commented Jun 18, 2023

Lo que si encontre en la 3.5
image

Deberia estar bloqueado.
image

Encontre el bug

private function isLaboratoryInQueue()
    {
        $return = true;
        $current_building = '';
        $element_id = 0;

        if ($this->planet['planet_b_building_id'] != 0) {
            $current_queue = $this->planet['planet_b_building_id'];

            if (strpos($current_queue, ';')) {
                $queue = explode(';', $current_queue);

                for ($i = 0; $i < MAX_BUILDING_QUEUE_SIZE; $i++) {
                    if (isset($queue[$i])) {
                        $element_data = explode(',', $queue[$i]);
                        $element_id = $element_data[0];

                        if ($element_id == 31) {
                            break;
                        }
                    }
                }
            } else {
                $current_building = $current_queue;
            }

            if ($current_building == 31 or $element_id == 31) {
                $return = false;
            }
        }

       
        return $return;
    }

$queue = explode(';', $current_queue); ---> el explode tiene un ; y en la db esta con, "31,4,314.18181818182,1687124721.1818,build"

Lo que no entiendo por que cuando insertas la Construccion a la db la coloca con coma y los explode tan todos con ;

@LucasKovacs

@LucasKovacs
Copy link
Member

Puede ser un bug. En un momento hice una revisión, y puede ser que me haya faltado cambiar algo. La verdad es que eso necesita volverse a hacer usando la clase Queue

@LucasKovacs
Copy link
Member

Mirando de nuevo. El ; separa cada ítem, y la , separa los detalles de cada ítem.

@LucasKovacs LucasKovacs self-assigned this Jun 19, 2023
@LucasKovacs LucasKovacs added the Bug Issues that is an error, bug or it is not working as expected label Jun 19, 2023
@LucasKovacs LucasKovacs moved this to In Progress in XG Proyect Jun 19, 2023
@LucasKovacs LucasKovacs added this to the v3.5.0 milestone Jun 19, 2023
LucasKovacs added a commit that referenced this issue Jun 19, 2023
@LucasKovacs
Copy link
Member

I sent a fix that correctly checks the queue. Can you check if that's enough? Or do we need other fix for it?

@jonamix-ar
Copy link

jonamix-ar commented Jun 21, 2023

I sent a fix that correctly checks the queue. Can you check if that's enough? Or do we need other fix for it?

Working perfect again reseach blocked whit lab upgrading.

@LucasKovacs
Copy link
Member

Closed as fixed. XGP 3.5

@github-project-automation github-project-automation bot moved this from In Progress to Done in XG Proyect Jun 24, 2023
@LucasKovacs LucasKovacs added the Fixed Issues that after being labeled as Bug have been resolved label Jun 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that is an error, bug or it is not working as expected Fixed Issues that after being labeled as Bug have been resolved
Projects
Status: Done
Development

No branches or pull requests

3 participants