Asdon Martin refueler, and redundancy

guyy

Member
"No one buys crappy food for your car like Gasdon!"

This will find the most cost-efficient semi-edible commodities to refuel your car with. It is also a blatant rebranding of that thing for boozing up the driver in Dread. (With food in addition to booze, because every car deserves the cheapest garbage you can possibly find, regardless of which organ it fills.)

It can also crank out turns of the various driving modes, although newer versions of Mafia can do that too, apparently. This script should still work on older versions of Mafia that don't know what an Asdon Martin is.


#JustCLIThings:

gasdon (number) -> Fills tank up to at least that many litres.

gasdon list -> Show the top eleven cheapest fuel sources.

gasdon (type of driving) (number) -> Drive in the specified way for the specified number of turns. Will refuel if necessary.

gasdon [name of item, in brackets, like this] (number) -> Fuel up using only the specified item. Mainly so you can use this in-run without accidentally fueling your car with something you wanted for fueling your body.


Install link:

Code:
svn checkout https://svn.code.sf.net/p/guyymafia/code/gasdon


Honestly, at the moment this doesn't seem all that necessary, since there's a lot of cheap food laying around. But if enough people use it, it could speed up the food/booze sinking process and end up making itself useful. The wheels on the circular justification go round and round...
 
This is useful indeed.

Question- why doesn't it recognize loaf of soda bread when using the "Fuel up using only the specified item" command? I tried
"gasdon [loaf of soda bread ] 40"
and got:
Gas gauge says: 31 litres. Need 40 litres.
Only considering items currently in inventory.
Can't find any suitable fuel!

(loaf of soda bread works, and I had plenty in inventory.)
 

xKiv

Active member
Loaf of soda bread is made from all npc-buyable ingredients. It should not work ... but apparently this is yet another different implementation of the same general idea, and crafted things are permissible here (unlike dreadsylvanian carriageman)? Or some crafted items work and others don't, because ... it's a hardcoded list somewhere?
 
Last edited:

guyy

Member
Yeah, it looks like crafted things are allowed this time. I think the carriageman was originally like that, and they added the craftable-from-NPC restriction later. I changed it to just block directly-bought NPC items (it still doesn't allow grapefruits, presumably because hippy store), so we'll see how that goes.

As of now, it doesn't matter a whole lot because there are only ~40 items that were blocked by the carriageman carryover code; of those, the soda bread is basically the only thing worth using, and only in-run where you don't have easy access to more efficient fuelers.
 

AlbinoRhino

Active member
Maybe I am doing something wrong ? This keeps happening to me. I ask for buffs and it tells me about the fuel.

> gasdon observantly 30;

You're already Driving Observantly for 30 kilometers. I mean adventures.

> gasdon observantly 60;

Gas gauge says: 77 litres. Need 37 litres. Don't need to refuel.

It stops there and doesn't actually extend the buff.
 
Last edited:

guyy

Member
Looks like it was set up to only drive if the tank needs more fuel, which doesn't make a whole lot of sense. Should work now.

Also, you can use "item" instead of "observantly," or something analogous for the other types.
 

AlbinoRhino

Active member
Cool. Thanks. I read about the available shorthand but I was copying and pasting from a script button ! I only ever had to type that once ! lol
 
So... this is great, but it just ate my splendid martinis in a LTA run, which may or may not increase my daycount.
This is totally my fault for being lazy, and not creating a loaf of soda bread alias.

Is there a way to blacklist a few items?
 

guyy

Member
Yeah, I guess I should actually do that, instead of just considering doing it...

"gasdon blacklist [item, other item, etc.]" should now let you blacklist stuff. "gasdon blacklist clear" will erase it.
Also, you can list multiple items to only use any of those multiple items, i.e. "gasdon 23796593846 [item, other item, wow that's a lot of gas, yikes, etc.]"
 

AlbinoRhino

Active member
I actually added an "in-run" blacklist to this on my last run after it fueled my car with my glasses of goat's milk (Too lazy to use the "this item only" functionality to get my fuel - nice to see you improved that some). Out of run, I don't care if it uses goat's milk.

Would you consider adding an "in-run" only blacklist in addition to the overall blacklist ? Else, it appears to use your blacklist would require clearing and rebuilding it as game states change. Not a big deal if you're not interested, since my local copy already has this ability. Just thought I would throw it out there.
 

guyy

Member
Would you consider adding an "in-run" only blacklist in addition to the overall blacklist ?

I changed the blacklist command to keep two separate lists--it should avoid using anything in the "main" list at all times, and also won't use anything in the ronin list while in ronin/HC. (It modifies the latter list only when in-run.) Though I'm not sure how much that will matter, since the cheap aftercore fuel items generally aren't the sorts of things you would want to save while in-run. (Goat's milk isn't even in the top 100 cheapest items right now.)

As for the syntax, the order doesn't matter.
 
Last edited:

AlbinoRhino

Active member
Hey thanks a lot ! I can go back to an unmodified script.

Though I'm not sure how much that will matter, since the cheap aftercore fuel items generally aren't the sorts of things you would want to save while in-run.

It's always possible somebody decides to get rid of a stockpile by throwing it in the mall for cheap...but I see what you mean.
 
Last edited:

AlbinoRhino

Active member
It appears that gasdon_ronin_blacklist.txt never gets filled with anything other than a blank map.

~line 213 has an if (can_interact()) that prevents blacklisted items from being added to the blacklizt map. I commented that condition out and the ronin file was correctly filled.

Sorry it took me so long to test the feature you added at my request ! And thanks again.
 
Top