refactor: rename widgetSettings to clientVarps
This commit is contained in:
@@ -154,7 +154,7 @@ public interface Client extends GameEngine
|
|||||||
|
|
||||||
int[] getSettings();
|
int[] getSettings();
|
||||||
|
|
||||||
int[] getWidgetSettings();
|
int[] getVarps();
|
||||||
|
|
||||||
int getSetting(Setting setting);
|
int getSetting(Setting setting);
|
||||||
|
|
||||||
|
|||||||
@@ -47,14 +47,14 @@ public class SettingsTracker
|
|||||||
if (clientSettings == null || widgetSettings == null)
|
if (clientSettings == null || widgetSettings == null)
|
||||||
{
|
{
|
||||||
clientSettings = copy(client.getSettings());
|
clientSettings = copy(client.getSettings());
|
||||||
widgetSettings = copy(client.getWidgetSettings());
|
widgetSettings = copy(client.getVarps());
|
||||||
|
|
||||||
log.info("Snapshotted client and widget settings");
|
log.info("Snapshotted client and widget settings");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] newClientSettings = client.getSettings();
|
int[] newClientSettings = client.getSettings();
|
||||||
int[] newWidgetSettings = client.getWidgetSettings();
|
int[] newWidgetSettings = client.getVarps();
|
||||||
|
|
||||||
for (int i = 0; i < Math.min(clientSettings.length, newClientSettings.length); ++i)
|
for (int i = 0; i < Math.min(clientSettings.length, newClientSettings.length); ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -233,8 +233,8 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
@Override
|
@Override
|
||||||
public int getSetting(Setting setting)
|
public int getSetting(Setting setting)
|
||||||
{
|
{
|
||||||
int[] settings = getSettings();
|
int[] varps = getVarps();
|
||||||
return settings[setting.getId()];
|
return varps[setting.getId()];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ public abstract class VarbitMixin implements RSClient
|
|||||||
varbitCache.put(varbitId, v);
|
varbitCache.put(varbitId, v);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] settings = getSettings();
|
int[] varps = getVarps();
|
||||||
int value = settings[v.getIndex()];
|
int value = varps[v.getIndex()];
|
||||||
int lsb = v.getLeastSignificantBit();
|
int lsb = v.getLeastSignificantBit();
|
||||||
int msb = v.getMostSignificantBit();
|
int msb = v.getMostSignificantBit();
|
||||||
int mask = (1 << ((msb - lsb) + 1)) - 1;
|
int mask = (1 << ((msb - lsb) + 1)) - 1;
|
||||||
|
|||||||
@@ -81,9 +81,9 @@ public interface RSClient extends RSGameEngine, Client
|
|||||||
@Override
|
@Override
|
||||||
int[] getSettings();
|
int[] getSettings();
|
||||||
|
|
||||||
@Import("widgetSettings")
|
@Import("clientVarps")
|
||||||
@Override
|
@Override
|
||||||
int[] getWidgetSettings();
|
int[] getVarps();
|
||||||
|
|
||||||
@Import("energy")
|
@Import("energy")
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user