Skip to content

Conversation

KheirFerrum
Copy link
Collaborator

@KheirFerrum KheirFerrum commented Apr 26, 2023

Summary

SUMMARY: Bugfixes "Repair Nanobots properly accounts for splints and mutations"

Purpose of change

In #2482 I used get_all_effects_of_type() for the mending list when refactoring it. This failed to account for lizard regen or splints as in the original implementation I used.

Also feels like Repair Nanobots drains really fast, so I'm tuning it down unless anyone has objections.

Describe the solution

Do it again while retaining std::vector<effect *> mending list.

Also, it feels like the Repair Nanobots drain really fast and work really fast, turned it up to 2 minutes.

Describe alternatives you've considered

Apply erase_if() to the vector.

  • Seems like a lot of extra steps for no reason.

Testing

Install Repair Nanobots, increase bionic power to 100kJ, do not turn on. Break limb, wear splint, wait 30 minutes.

  • Check that mending effect is on limb via debug menu and @ menu. Note percentage.
  • Activate Repair Nanobots, wait an hour, check that it increments and takes power at proper timescale. Note percentage
  • Remove splint, wait an hour, check that power isn't consumed and when splint is worn again percentage has not changed.
  • Repeat with Lizard Regen but no splint.

Additional context

Need to check for splint and REGEN_LIZ, and this is easier than erasing them.
@github-actions github-actions bot added the src changes related to source code. label Apr 26, 2023
@scarf005 scarf005 self-requested a review May 3, 2023 10:05
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that repair nanobots work with splints on

Cataclysm: Bright Nights - cbn-experimental-2023-04-26-1608-2-ge5be0bdb857_01

Confirmed that repair nanobots do not work with splints on

Cataclysm: Bright Nights - cbn-experimental-2023-04-26-1608-2-ge5be0bdb857_02

Confirmed that repair nanobots work without splints with lizard regeneration

Cataclysm: Bright Nights - cbn-experimental-2023-04-26-1608-2-ge5be0bdb857_03
Cataclysm: Bright Nights - cbn-experimental-2023-04-26-1608-2-ge5be0bdb857_04
Cataclysm: Bright Nights - cbn-experimental-2023-04-26-1608-2-ge5be0bdb857_05

Found bug:

mending percentage is not shown with repair nanobots (on) and lizard regeneration. it abrubtly shows that the limb is mended.

2023-05-03.21-46-19.mp4

@KheirFerrum
Copy link
Collaborator Author

I had thought that it not displaying with Lizard Regen was intentional so I didn't touch it. Will put up a fix.

@github-actions github-actions bot added the JSON related to game datas in JSON format. label May 3, 2023
@KheirFerrum KheirFerrum force-pushed the repair-nanobot-fix branch from dad95d2 to 4bd0654 Compare May 3, 2023 17:05
@KheirFerrum KheirFerrum requested a review from scarf005 May 3, 2023 17:07
Reptillian Healing now updates display for broken limb.

Replace "SPLINT" with flag_SPLINT.

Updates bionic description
@KheirFerrum KheirFerrum force-pushed the repair-nanobot-fix branch from 4bd0654 to 95a7c5c Compare May 3, 2023 23:16
Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

now the mending status displays correctly with lizard regeneration trait.

@scarf005 scarf005 enabled auto-merge (squash) May 3, 2023 23:30
@scarf005 scarf005 merged commit 269bae6 into cataclysmbnteam:upload May 4, 2023
@KheirFerrum KheirFerrum deleted the repair-nanobot-fix branch May 4, 2023 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants