Scannable icon indicating copy to clipboard operation
Scannable copied to clipboard

Requests 1.12.2 scanStayDuration support

Open onenok opened this issue 10 months ago • 2 comments

Request to add scanStayDuration setting in 1.12.2 version.

onenok avatar Mar 20 '25 06:03 onenok

I read the src code, and I see that in li/cil/scannable/client/ScanManager.java, it is:

    @SubscribeEvent
    public void onClientTick(final TickEvent.ClientTickEvent event) 
    {

        /....../

        if (Constants.SCAN_STAY_DURATION < (int) (System.currentTimeMillis() - currentStart)) 
            {
            pendingResults.clear();

            /......./

            return;
        }

        /........../

    }

There is a Constants.SCAN_STAY_DURATION, and I see that in li/cil/scannable/common/config/Constants.java, it is:

/......../
public final class Constants {
    /......../
    // How long the results from a scan should remain visible.
    public static final int SCAN_STAY_DURATION = 10000;
    /......../
}

So, why don't just add this setting to li/cil/scannable/common/config/Settings.java? Or am I missing something?

onenok avatar Mar 20 '25 09:03 onenok

I pulled a request: #158

onenok avatar Mar 30 '25 06:03 onenok