Bug - Fixed Wrong workshed item

Linknoid

Member
I start a new HCCS ascension with my Asdon Martin in the workshed. I run a script which contains the following code:

Code:
	if (!(get_campground() contains $item[Asdon Martin keyfob]))
	{
		print("No Asdon Martin");
	}

It prints "No Asdon Martin". So investigating it, I run the following:

Code:
	foreach it, n in get_campground()
	{
		print("item = " + it + ", count = " + n);
	}

Among the output, it prints "item = portable Mayo Clinic, count = 1".

As soon as I click on the workshed, it realizes that it actually has an Asdon Martin installed, and the script works correctly. I suppose I can work around this by calling visit_url("campground.php?action=workshed"), but that would basically mean an extra server hit each time I restart the script.

I don't know if this is something Community Service related, or a general problem. Maybe someone else who's just starting a different ascension type could run the code above before visiting the workshed to see if it behaves the same?

Let me know if I can provide more information.
 

Darzil

Developer
I would guess something is using visiturl to visit shop.php?whichshop=mayoclinic and this was setting workshed item to Mayo Clinic even if it wasn't installed.

With r18923 that should not happen.
 

Linknoid

Member
18923 does fix the problem. I think I figured out my own problem that was triggering it. I was trying (and failing) to reproduce it using buy(1, $item[Mayodiol]), but missed that in a completely different place my script was calling visit_url("shop.php?action=bacta&whichshop=mayoclinic") to get elemental resist, without checking if there was a mayo clinic first.
 

Darzil

Developer
Good. You can use cli_execute( "mayosoak") to get the same effect, with the checks. if you prefer.
 
Top