Skip to content

Commit

Permalink
Remove various preferences
Browse files Browse the repository at this point in the history
Shorten giant castle default hardcore string
Allow MP burning to only use triggers defined in mood

git-svn-id: http://svn.code.sf.net/p/kolmafia/code@3493 b29ace70-8910-0410-8dcc-aa2fc6433167
  • Loading branch information
holatuwol committed Apr 5, 2007
1 parent d743955 commit fa0746d
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 60 deletions.
2 changes: 1 addition & 1 deletion src/net/sourceforge/kolmafia/AdventureDatabase.java
Expand Up @@ -910,7 +910,7 @@ public static String getCondition( KoLAdventure location )
return "none";

if ( condition.equals( "castle items" ) )
condition = KoLCharacter.isHardcore() ? "2 choiceadv, 1 thin black candle, 1 heavy D, 1 awful poetry journal, 1 furry fur, 1 giant needle" : "1 choiceadv, 1 thin black candle, 1 heavy D";
condition = (KoLCharacter.isHardcore() ? "2 choiceadv" : "1 choiceadv") + ", 1 thin black candle, 1 heavy D";

return condition == null ? "none" : condition;
}
Expand Down
5 changes: 0 additions & 5 deletions src/net/sourceforge/kolmafia/AdventureFrame.java
Expand Up @@ -174,10 +174,8 @@ public static void updateSelectedAdventure( KoLAdventure location )
if ( !conditions.isEmpty() )
return;

updateConditions = false;
zoneSelect.setSelectedItem( AdventureDatabase.ZONE_DESCRIPTIONS.get( location.getParentZone() ) );
locationSelect.setSelectedValue( location, true );
updateConditions = true;
}

public boolean useSidePane()
Expand Down Expand Up @@ -258,9 +256,6 @@ private JSplitPane getAdventureSummary()

private void fillDefaultConditions()
{
if ( !StaticEntity.getBooleanProperty( "autoSetConditions" ) )
return;

KoLAdventure location = (KoLAdventure) locationSelect.getSelectedValue();
if ( location == null )
return;
Expand Down
19 changes: 12 additions & 7 deletions src/net/sourceforge/kolmafia/ConsumeItemRequest.java
Expand Up @@ -54,7 +54,6 @@ public class ConsumeItemRequest extends KoLRequest
private static final Pattern QUANTITY_PATTERN = Pattern.compile( "quantity=(\\d+)" );

private static final TreeMap LIMITED_USES = new TreeMap();
private static final AdventureResult ODE_TO_BOOZE = new AdventureResult( "Ode to Booze", 1, true );

static
{
Expand All @@ -77,6 +76,7 @@ public class ConsumeItemRequest extends KoLRequest
}

public static String lastUpdate = "";
private static String askedAboutOde = "";

private static final int SEAL_TOOTH = 2;
private static final int DOLPHIN_KING_MAP = 26;
Expand Down Expand Up @@ -164,8 +164,6 @@ public class ConsumeItemRequest extends KoLRequest
private static final int MANUAL_OF_TRANSMISSION = 2281;
private static final int MANUAL_OF_DEXTERITY = 2282;

private static final AdventureResult POISON = new AdventureResult( "Poisoned", 1, true );

private static final AdventureResult SAPLING = new AdventureResult( 75, -1 );
private static final AdventureResult FERTILIZER = new AdventureResult( 76, -1 );
private static final AdventureResult PLANKS = new AdventureResult( 140, -1 );
Expand Down Expand Up @@ -345,13 +343,14 @@ public static boolean allowBoozeConsumption( int inebrietyBonus )
if ( KoLCharacter.isFallingDown() || inebrietyBonus < 1 )
return true;

if ( existingFrames.isEmpty() || !StaticEntity.getBooleanProperty( "protectAgainstOverdrink" ) )
if ( existingFrames.isEmpty() )
return true;

if ( !activeEffects.contains( ODE_TO_BOOZE ) )
if ( !activeEffects.contains( TradeableItemDatabase.ODE ) )
{
if ( availableSkills.contains( UseSkillRequest.getInstance( "The Ode to Booze" ) ) )
if ( availableSkills.contains( UseSkillRequest.getInstance( "The Ode to Booze" ) ) && !askedAboutOde.equals( KoLCharacter.getUserName() ) )
{
askedAboutOde = KoLCharacter.getUserName();
if ( JOptionPane.YES_OPTION != JOptionPane.showConfirmDialog( null, "Are you sure you want to drink without ode?",
"Think carefully before you answer...", JOptionPane.YES_NO_OPTION ) )
return false;
Expand Down Expand Up @@ -713,7 +712,13 @@ else if ( showHTML )

case ANTIDOTE:

activeEffects.remove( POISON );
AdventureResult [] effects = new AdventureResult[ activeEffects.size() ];
activeEffects.toArray( effects );

for ( int i = 0; i < effects.length; ++i )
if ( effects[i].getName().toLowerCase().indexOf( "poison" ) != -1 )
activeEffects.remove( effects[i] );

return;

case TINY_HOUSE:
Expand Down
4 changes: 2 additions & 2 deletions src/net/sourceforge/kolmafia/CreateFrameRunnable.java
Expand Up @@ -66,7 +66,7 @@ public CreateFrameRunnable( Class creationType, Object [] parameters )
this.parameters = parameters;
this.ranRequests = false;

Class [] parameterTypes= new Class[ parameters.length ];
Class [] parameterTypes = new Class[ parameters.length ];
for ( int i = 0; i < parameters.length; ++i )
parameterTypes[i] = parameters[i] == null ? null : parameters[i].getClass();

Expand Down Expand Up @@ -248,7 +248,7 @@ else if ( appearsInTab && creationType == RequestFrame.class )
if ( !appearsInTab && this.creation instanceof KoLFrame )
{
((KoLFrame)this.creation).constructToolbar();
if ( ((KoLFrame)this.creation).useSidePane() && StaticEntity.getBooleanProperty( "sidebarOnDetachedFrames" ) )
if ( ((KoLFrame)this.creation).useSidePane() )
((KoLFrame)this.creation).addCompactPane();

this.creation.setJMenuBar( new KoLMenuBar() );
Expand Down
3 changes: 0 additions & 3 deletions src/net/sourceforge/kolmafia/FlowerHunterRequest.java
Expand Up @@ -185,9 +185,6 @@ private void parseSearch()
}

Collections.sort( searchResults );

if ( !StaticEntity.getBooleanProperty( "sortPvpResults" ) )
Collections.reverse( searchResults );
}

private void parseAttack()
Expand Down
6 changes: 1 addition & 5 deletions src/net/sourceforge/kolmafia/KoLFrame.java
Expand Up @@ -493,11 +493,7 @@ public StatusRefresher()

JPanel refreshPanel = new JPanel();
refreshPanel.setOpaque( false );

if ( StaticEntity.getBooleanProperty( "addStopToSidePane" ) )
refreshPanel.add( new InvocationButton( "Stop Everything", "stop.gif", RequestThread.class, "declareWorldPeace" ) );
else
refreshPanel.add( new RequestButton( "Refresh Status", "refresh.gif", CharpaneRequest.getInstance() ) );
refreshPanel.add( new RequestButton( "Refresh Status", "refresh.gif", CharpaneRequest.getInstance() ) );

compactPane = new JPanel( new BorderLayout() );
compactPane.add( compactCard, BorderLayout.NORTH );
Expand Down
9 changes: 2 additions & 7 deletions src/net/sourceforge/kolmafia/KoLSettings.java
Expand Up @@ -452,22 +452,19 @@ private static void initializeMaps()
// Do not initialize the maps more than once, as this
// would not serve any purpose.

CLIENT_SETTINGS.put( "addStopToSidePane", "false" );
CLIENT_SETTINGS.put( "allowBreakfastBurning", "false" );
CLIENT_SETTINGS.put( "allowCloseableDesktopTabs", "false" );
CLIENT_SETTINGS.put( "allowEncounterRateBurning", "true" );
CLIENT_SETTINGS.put( "allowGenericUse", "false" );
CLIENT_SETTINGS.put( "allowNonMoodBurning", "true" );
CLIENT_SETTINGS.put( "allowRequestQueueing", "false" );
CLIENT_SETTINGS.put( "allowThiefShrugOff", "true" );
CLIENT_SETTINGS.put( "allowUnsafePickpocket", "false" );
CLIENT_SETTINGS.put( "alwaysGetBreakfast", "false" );
CLIENT_SETTINGS.put( "autoBuyRestores", "true" );
CLIENT_SETTINGS.put( "autoLogin", "" );
CLIENT_SETTINGS.put( "autoPlantHardcore", "false" );
CLIENT_SETTINGS.put( "autoPlantSoftcore", "false" );
CLIENT_SETTINGS.put( "autoSatisfyWithMall", "true" );
PLAYER_SETTINGS.put( "autoSatisfyWithStash", "false" );
CLIENT_SETTINGS.put( "autoSetConditions", "true" );
CLIENT_SETTINGS.put( "autoSatisfyWithStash", "false" );
CLIENT_SETTINGS.put( "avoidInvertingTabs", "false" );
CLIENT_SETTINGS.put( "breakfastSoftcore", "Summon Snowcone,Summon Hilarious Objects,Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting" );
CLIENT_SETTINGS.put( "breakfastHardcore", "Summon Snowcone,Advanced Saucecrafting,Pastamastery,Advanced Cocktailcrafting" );
Expand Down Expand Up @@ -539,7 +536,6 @@ private static void initializeMaps()
CLIENT_SETTINGS.put( "relayMaintainsHealth", "true" );
CLIENT_SETTINGS.put( "relayMaintainsMana", "false" );
CLIENT_SETTINGS.put( "relayMaintainsMoods", "false" );
CLIENT_SETTINGS.put( "relayRunsBetweenScript", "false" );
CLIENT_SETTINGS.put( "relayBrowserOnly", "false" );
CLIENT_SETTINGS.put( "relayTextualizesEffects", "false" );
CLIENT_SETTINGS.put( "relayUsesCachedImages", "false" );
Expand All @@ -552,7 +548,6 @@ private static void initializeMaps()
CLIENT_SETTINGS.put( "scriptButtonPosition", "0" );
CLIENT_SETTINGS.put( "scriptList", "restore hp | restore mp" );
CLIENT_SETTINGS.put( "showAllRequests", "false" );
CLIENT_SETTINGS.put( "sidebarOnDetachedFrames", "true" );
CLIENT_SETTINGS.put( "sortAdventures", "false" );
CLIENT_SETTINGS.put( "sortPvpResults", "false" );
CLIENT_SETTINGS.put( "swingLookAndFeel", "" );
Expand Down
4 changes: 2 additions & 2 deletions src/net/sourceforge/kolmafia/LocalRelayServer.java
Expand Up @@ -572,8 +572,8 @@ private boolean runBetweenBattleScripts()
CharpaneRequest.createCheckpoint();
int initialMP = KoLCharacter.getCurrentMP();

StaticEntity.getClient().runBetweenBattleChecks( StaticEntity.getBooleanProperty( "relayRunsBetweenScript" ),
StaticEntity.getBooleanProperty( "relayMaintainsMoods" ), StaticEntity.getBooleanProperty( "relayMaintainsHealth" ), StaticEntity.getBooleanProperty( "relayMaintainsMana" ) );
StaticEntity.getClient().runBetweenBattleChecks( true, StaticEntity.getBooleanProperty( "relayMaintainsMoods" ),
StaticEntity.getBooleanProperty( "relayMaintainsHealth" ), StaticEntity.getBooleanProperty( "relayMaintainsMana" ) );

return CharpaneRequest.clearedCheckpoint() || initialMP != KoLCharacter.getCurrentMP();
}
Expand Down
12 changes: 0 additions & 12 deletions src/net/sourceforge/kolmafia/MonsterDatabase.java
Expand Up @@ -400,18 +400,6 @@ public boolean shouldSteal()
// Otherwise, only steal from monsters that drop
// something on your conditions list.

if ( !StaticEntity.getBooleanProperty( "allowUnsafePickpocket" ) )
return shouldSteal( conditions );

// If they're likely to survive, then go ahead
// and steal anything.

if ( expectedDamage() * 2 < KoLCharacter.getCurrentHP() )
return shouldSteal( items );

// Otherwise, only steal from monsters that drop
// something on your conditions list.

return shouldSteal( conditions );
}

Expand Down
16 changes: 15 additions & 1 deletion src/net/sourceforge/kolmafia/MoodSettings.java
Expand Up @@ -466,8 +466,22 @@ public static String getNextBurnCast( boolean isManualInvocation )
if ( !ClassSkillsDatabase.contains( skillName ) || !KoLCharacter.hasSkill( skillName ) )
continue;

// If the player only wishes to cast buffs related to their
// mood, then skip the buff if it's not in the player's moods.

if ( !StaticEntity.getBooleanProperty( "allowNonMoodBurning" ) )
{
boolean shouldIgnore = true;

for ( int j = 0; j < displayList.size(); ++j )
shouldIgnore &= !currentEffect.equals( ((MoodTrigger)displayList.get(j)).effect );

if ( shouldIgnore )
continue;
}

// Only cast if a matching skill was found. Limit cast count
// to five in order to ensure that KoLmafia doesn't make the
// to two in order to ensure that KoLmafia doesn't make the
// buff counts too far out of balance.

if ( nextEffect != null )
Expand Down
25 changes: 10 additions & 15 deletions src/net/sourceforge/kolmafia/OptionsFrame.java
Expand Up @@ -134,7 +134,9 @@ private class SessionLogOptionsPanel extends OptionsPanel
{ "logReverseOrder", "Log adventures left instead of adventures used" },
{ "logBattleAction", "Session log records attacks for each round" },
{ "logFamiliarActions", "Session log records actions made by familiars" },

{},

{ "logGainMessages", "Session log records HP/MP/meat changes" },
{ "logStatGains", "Session log records stat gains" },
{ "logAcquiredItems", "Session log records items acquired" },
Expand Down Expand Up @@ -193,13 +195,15 @@ private class RelayOptionsPanel extends OptionsPanel
{
{ "relayAddsRestoreLinks", "Add HP/MP restore links to left side pane" },
{ "relayAddsUpArrowLinks", "Add buff maintenance links to left side pane" },
{ "relayAddsMissingEffects", "Display mood trigger buffs with zero duration" },
{ "relayAddsMoodRefreshLink", "Add mood link as needed (overrides MP burn link)" },
{ "relayTextualizesEffects", "Textualize effect links in left side pane" },

{ "", "" },

{ "relayRunsBetweenScript", "Run override script during manual adventuring" },
{ "relayAddsMissingEffects", "Display mood triggers with zero duration" },
{ "relayAddsMoodRefreshLink", "Add mood links (overrides MP burn links)" },

{ "", "" },

{ "relayMaintainsMoods", "Maintain moods during manual adventuring" },
{ "relayMaintainsHealth", "Maintain health during manual adventuring" },
{ "relayMaintainsMana", "Maintain mana during manual adventuring" },
Expand Down Expand Up @@ -288,36 +292,27 @@ private class GeneralOptionsPanel extends OptionsPanel
{
{ "showAllRequests", "Show all requests in a mini-browser window" },
{ "allowRequestQueueing", "Enable request queueing (may cause hanging)" },
{ "allowUnsafePickpocket", "Allow unconditional pickpocket with suboptimal dodge" },
{ "useLowBandwidthRadio", "Use lower bandwidth server for KoL Radio" },

{ "", "" },

{ "avoidInvertingTabs", "Do not invert nested tabs in main window" },
{ "sidebarOnDetachedFrames", "Place a sidebar on selected detached frames" },
{ "addStopToSidePane", "Add a stop button instead of a refresh button to the side pane" },
{ "mapLoadsMiniBrowser", "Map button loads mini browser instead of relay browser" },

{ "", "" },

{ "sortAdventures", "Sort adventure lists by moxie evade rating" },
{ "sortPvpResults", "Sort flower hunter results in natural hitting order" },
{ "cacheMallSearches", "Cache mall searches (does not work on all OSes)" },
{ "autoSetConditions", "Automatically fill conditions field with defaults" },

{ "", "" },

{ "cloverProtectActive", "Protect against automated clover adventures" },
{ "protectAgainstOverdrink", "Protect against accidental overdrinking" },
{ "mementoListActive", "Prevent accidental destruction of 'memento' items" },
{ "allowGenericUse", "Enable generic item usage in scripted \"use\"" },

{ "", "" },

{ "switchEquipmentForBuffs", "Allow equipment changing when casting buffs" },
{ "allowThiefShrugOff", "Allow shrug-off of buffs during mood changes" },
{ "allowEncounterRateBurning", "Allow combat-rate modifying buffs in conditional recast" },
{ "allowBreakfastBurning", "Allow casting of breakfast skills in conditional recast" },
{ "allowEncounterRateBurning", "Cast combat rate modifiers during conditional recast" },
{ "allowBreakfastBurning", "Cast breakfast skills during conditional recast" },
{ "allowNonMoodBurning", "Cast buffs not defined in moods during conditional recast" },

{ "", "" },

Expand Down

0 comments on commit fa0746d

Please sign in to comment.