Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Patch: Stop Auto-repair from repairing unfinished structures #4205

Closed
wzdev-ci opened this issue May 24, 2014 · 11 comments
Closed

Patch: Stop Auto-repair from repairing unfinished structures #4205

wzdev-ci opened this issue May 24, 2014 · 11 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_patch (an actual patch, not a request for one) | by Kreuvf


Only tested with 3.1.0, but probably also existing in many other branches.

Problem: Auto-repair repairs structures while they are built. When finished, the structure has more bodypoints than its maximum value allows. This results in the first hit to reduce the current bodypoints to the maximum value allowed.

This patch add a check for the structure status != SS_BEING_BUILT. Patch tested with 3.1.0.


Issue migrated from trac:4205 at 2022-04-16 11:43:45 -0700

@wzdev-ci
Copy link
Contributor Author

Kreuvf uploaded file stop-auto-repairing-unfinished-structures.patch (0.7 KiB)

Fix for auto-repair applying to unfinished structures

@wzdev-ci
Copy link
Contributor Author

vexed changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

vexed changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

vexed commented


Maybe it is late, and I am missing something, but, if you remove

 && (psBuilding->status != SS_BEING_BUILT)

Then it will always do it, would it not ?

For the maximum value, we should CLIP that or something.

@wzdev-ci
Copy link
Contributor Author

Kreuvf commented


The change will check that the status of the structure in question is not "under construction", which is the only status without auto-repair. Besides fixing the auto-repair bug this also fixes consistency inside the WZ world: if an unattended half-built structure vanishes over time, but has auto-repair as well,
a) why don't repair the bots the structure to full health and
b) why does the building vanish over time at all?

This is a quick fix, I know. On the other hand clipping the max. value does not seem like a clean solution to me as well.

@wzdev-ci
Copy link
Contributor Author

Per commented


I believe the patch is erroneously reversed. Hence vexed's confusion.

@wzdev-ci
Copy link
Contributor Author

per changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

per changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

per commented


Stop Auto-repair from repairing unfinished structures. Patch by Kreuvf.
Closes #4205.

Changeset: 8f7b9c8f07502c2e0cb86fd2c7d6085dfae1896d

@wzdev-ci
Copy link
Contributor Author

per commented


Stop Auto-repair from repairing unfinished structures. Patch by Kreuvf.
Closes #4205.

Changeset: 8f7b9c8f07502c2e0cb86fd2c7d6085dfae1896d

1 similar comment
@wzdev-ci
Copy link
Contributor Author

per commented


Stop Auto-repair from repairing unfinished structures. Patch by Kreuvf.
Closes #4205.

Changeset: 8f7b9c8f07502c2e0cb86fd2c7d6085dfae1896d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant