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

Graphic bug in design menu #4649

Closed
wzdev-ci opened this issue Oct 7, 2017 · 27 comments
Closed

Graphic bug in design menu #4649

wzdev-ci opened this issue Oct 7, 2017 · 27 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Oct 7, 2017

resolution_fixed type_bug | by alfred007


When you want to change the body for a template a red line shows you in which direction the stats will move. As you can see on the picture added the red line shows decreasing hitpoints when I want to change the body from mantis to python. But they incrase. This happens every time you want to change to a stronger body.


Issue migrated from trac:4649 at 2022-04-16 12:55:39 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 7, 2017

alfred007 uploaded file Design menu graphic bug.jpg (220.7 KiB)

Design menu graphic bug.jpg

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 7, 2017

alfred007 commented


And also when you change the propulsion or the turret to a stronger one.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


I attempted to fix this. There seems to be more smaller problems with minor component shadow markers, namely body armors seem to be a few points higher (?) and the markers for speed with hover are off.

@wzdev-ci
Copy link
Contributor Author

Forgon uploaded file 0001-Fix-design-shadow-stat-markers-for-max-power-and-hea.patch (9.7 KiB)

patch file created with git format-patch (fixes whitespace error in './src/design.cpp:2693')

@wzdev-ci
Copy link
Contributor Author

Forgon commented


I tested your patch and found no problem with it.

A whitespace error Git complained about has been fixed.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


In Warzone2100/warzone2100@ae7b5ce:

#CommitTicketReference repository="" revision="ae7b5cebe876293756386c87b82deb22beeb38f8"
Fix design shadow stat markers for max power and health.

Refs #4649.

@wzdev-ci
Copy link
Contributor Author

alfred007 commented


I update to master ae7b5ce and checked it. The lines for the change of body and turret are in the right place but for speed at propulsion change still not. Especially when you look at the change from/to tracks the lines are not at the right place. Also with some turrets (i. e. heavy cannon, commander) with the change from wheels to hover and back.
The attached picture shows the case for the change from wheels to hover. As you can see the lines show the same speed for wheels and hover propulsion what is wrong.

@wzdev-ci
Copy link
Contributor Author

alfred007 uploaded file wz2100-20180212_210338-SUB_1_D.png (1002.0 KiB)

wz2100-20180212_210338-SUB_1_D.png

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


Missed a few cases so the below patch should show the shadow markers more accurately for total HP and power when changing between weapon and system components.

@alfred007 Yep, the speed marks are all wrong when changing the propulsion.

Some notes for later:

  1. Component shadow stats don't show for secondary weapons.
  2. If a weapon is already designed, don't show shadow marks when hovering over VTOL propulsion.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


Don't think we need the if statement in the shadow power/hp markers

if (desCompMode == IDES_SYSTEM)
{
    type = getSystemType(&sCurrDesign);
}

Since we don't care what the current design of the template is, only the component type that is highlighted. It also leaves most of the system variables incorrectly set when highlighting a component (due to how everything is calculated, the end result would still be the same).

As for road speeds, it is calculating the weight and base speed using only the current template, and not using the newly highlighted propulsion in intCalcSpeed().

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0001-More-for-the-total-power-and-HP-design-shadow-stats.patch (5.8 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0002-Show-shadow-propulsion-speeds-more-accurately-in-des.patch (1.7 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0003-Reset-propulsion-shadow-stats-when-switching-between.patch (1.8 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0004-Show-the-weapon-stats-for-the-second-and-third-weapo.patch (0.7 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0005-Check-for-another-power-and-HP-shadow-stat-case.patch (2.2 KiB)

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed _comment1 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


Ok, I think I got it all now. These shadow markers were really broken.

edit.
Unfortunately, there is still more to do.

  1. Weapon to commander turret HP/power is wrong.
  2. Command turret does not show range or weight.
  3. System turret templates changing to VTOL propulsion show wrong HP/Power.

edit 2.
Only thing I see remaining is shadows for system weights not being drawn and commander
not having anything in the stat box.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg uploaded file 0006-A-few-more-design-total-HP-and-power-checks.patch (2.4 KiB)

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 1, 2018

Berserk Cyborg committed [4]


In Warzone2100/warzone2100@4c57502:

#CommitTicketReference repository="" revision="4c57502708229ac58b90b8bda764a7fb25164b16"
More for the total power and HP design shadow stats.

- Reset totals for system HP and power when changing non-body components.
- If the current template has weapons and wants to change between
air and ground propulsions then ignore the weapons.
- Weapon to command turret was wrong.
- A template with system turrets changing to air propulsion was wrong.

Refs ticket 4649.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 1, 2018

Berserk Cyborg committed [7]


In Warzone2100/warzone2100@7bed711:

#CommitTicketReference repository="" revision="7bed71112d2261e2d6683c54309459e2186e91aa"
Show shadow propulsion speeds more accurately in design menu.

- Was possible for an incorrect set of shadow stats to remain when
hovering over between ground and air propulsion.
- Now calculates weight when choosing between ground and air propulsions.

Refs ticket 4649.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 1, 2018

Berserk Cyborg commented


In Warzone2100/warzone2100@d22da3d:

#CommitTicketReference repository="" revision="d22da3db985d41069483dd78e748eeb0f7c4090f"
Show the weapon stats for the second and third weapon.

Refs ticket 4649.

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Berserk Cyborg commented


Shadow markers appear to be accurate. Closing for now.

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