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

Computer program cleanup #647

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Computer program cleanup #647

wants to merge 45 commits into from

Conversation

kirderf1
Copy link
Member

@kirderf1 kirderf1 commented Dec 8, 2024

No description provided.

@kirderf1 kirderf1 added the cleanup Patching up existing code label Dec 8, 2024
public ComputerScreen gui;
@Nullable
public PlayerIdentifier owner;
//client side only
public int ownerId;
public Hashtable<Integer, String> latestmessage = new Hashtable<>();
public CompoundTag programData = new CompoundTag();
private SburbClientData sburbClientProgramData = new SburbClientData(this::markDirtyAndResend);
Copy link

Choose a reason for hiding this comment

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

⚠️ [checkstyle] <com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck> reported by reviewdog 🐶
Variable 'latestmessage' must be private and have accessor methods.

private Runnable guiCallback = null;

@Nullable
private PlayerIdentifier owner;
Copy link

Choose a reason for hiding this comment

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

⚠️ [checkstyle] <com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck> reported by reviewdog 🐶
Variable 'gui' must be private and have accessor methods.

@kirderf1 kirderf1 added the bug Something isn't working as it should label Jan 5, 2025
@kirderf1 kirderf1 requested a review from Dweblenod January 5, 2025 22:16
@kirderf1 kirderf1 marked this pull request as ready for review January 5, 2025 22:17
Copy link
Member

@Dweblenod Dweblenod left a comment

Choose a reason for hiding this comment

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

In general this looks a lot cleaner, very satisfying!

{
//TODO The implementation of this class need a serious rewrite
private static final Logger LOGGER = LogManager.getLogger();
private static final int PROGRAM_DISK_CAPACITY = 2, BLANK_DISK_CAPACITY = 2;
Copy link
Member

Choose a reason for hiding this comment

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

Trying to understand why there is a hard coded limit on the number of program disks. If a computer already contains a server disk and a client disk, then would it not be possible to insert a disk with a 3rd program like GristTorrent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as it should cleanup Patching up existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants