Skip to content

Conversation

The4codeblocks
Copy link
Contributor

If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:

  • I have read the contribution guidelines.
  • I have ensured that my code compiles, if applicable.
  • I have ensured that any new features in this PR function correctly in-game, if applicable.

reposted as permitted, modified to be compatible with the refactor

@Anuken
Copy link
Owner

Anuken commented Apr 4, 2025

There's one issue I forgot about: IPT is not saved for standard logic processors. If it were saved, it might cause issues if the default IPT changes, and users load an old save.

@The4codeblocks
Copy link
Contributor Author

There's one issue I forgot about: IPT is not saved for standard logic processors. If it were saved, it might cause issues if the default IPT changes, and users load an old save.

fixed saving with check for saving with max ipt:
if you have a non-max ipt when saving, it persists when loading, and is lowered to any new max if the new max ends up smaller than the saved ipt
if you have a max ipt when saving, it matches any updated base ipt value when loading

and don't worry, I did a version check

@1ue999
Copy link
Contributor

1ue999 commented Apr 7, 2025

revision 4 is mine :3

anyways, the saving seems overcomplicated, and looks like it might run into integer overflow issues due to saving as short, but using an int.

@1ue999
Copy link
Contributor

1ue999 commented Apr 7, 2025

i would just do
write.i(ipt) and ipt=read.i() (not clamping because im assuming it gets clamped in the instruction already)

@The4codeblocks
Copy link
Contributor Author

The4codeblocks commented Apr 7, 2025

revision 4 is mine :3

either of us will increment if the other gets merged 1st :)

anyways, the saving seems overcomplicated, and looks like it might run into integer overflow issues due to saving as short, but using an int.

I simply mirrored the world processor ipt saving, I'd think that integer overflow would happen to both

@The4codeblocks
Copy link
Contributor Author

The4codeblocks commented Apr 7, 2025

not clamping because im assuming it gets clamped in the instruction already

ensures that if a processor were to get nerfed, no processor remains higher than normal

@1ue999
Copy link
Contributor

1ue999 commented Apr 7, 2025

huh

@1ue999
Copy link
Contributor

1ue999 commented Apr 7, 2025

welp, i would just make it save as an integer with clamping then ig

@The4codeblocks
Copy link
Contributor Author

hm?

@The4codeblocks
Copy link
Contributor Author

hello?

@The4codeblocks
Copy link
Contributor Author

?

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

Successfully merging this pull request may close these issues.

3 participants