Page 1 of 1

Confusing code in groundspawn

Posted: Tue Nov 28, 2017 11:18 am
by Ememjr
so looking through the groundspawn.cpp code i found this, need confirmation, on whether collecting is gather/gathered or should it be collect/collected, if its the first, then

Code: Select all

else if (collection_skill == "Collecting")
		ret = "collect";
should be removed since it will never get there

i will confirm collecting when i get home tongiht

Code: Select all

string GroundSpawn::GetHarvestMessageName(bool present_tense, bool failure){
	string ret = "";
	if((collection_skill == "Gathering" ||collection_skill == "Collecting") && !present_tense)
		ret = "gathered";
	else if(collection_skill == "Gathering" || collection_skill == "Collecting")
		ret = "gather";
	else if(collection_skill == "Mining" && !present_tense)
		ret = "mined";
	else if(collection_skill == "Mining")
		ret = "mine";
	else if (collection_skill == "Fishing" && !present_tense)
		ret = "fished";
	else if(collection_skill == "Fishing")
		ret = "fish";
	else if(collection_skill == "Trapping" && !present_tense && !failure)
		ret = "acquired";
	else if(collection_skill == "Trapping" && failure)
		ret = "trap";
	else if(collection_skill == "Trapping")
		ret = "acquire";
	else if(collection_skill == "Foresting" && !present_tense)
		ret = "forested";
	else if(collection_skill == "Foresting")
		ret = "forest";
	else if (collection_skill == "Collecting")
		ret = "collect";
	return ret;
}