mirror of
				https://github.com/KartKrewDev/RingRacers.git
				synced 2025-10-30 08:01:28 +00:00 
			
		
		
		
	Merge branch 'desc-final-2' into 'master'
Fix Conditionset 15's description (resolves #1274) Closes #1274 See merge request KartKrew/Kart!2288
This commit is contained in:
		
						commit
						76becc7579
					
				
					 1 changed files with 20 additions and 8 deletions
				
			
		
							
								
								
									
										26
									
								
								src/m_cond.c
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								src/m_cond.c
									
										
									
									
									
								
							|  | @ -2631,7 +2631,7 @@ static const char *M_GetConditionString(condition_t *cn) | |||
| 
 | ||||
| 		case UC_PRISONEGGCD: | ||||
| 			// :butterfly: "alternatively you could say 'grab a hot toooon' or 'smooth beeat'"
 | ||||
| 			return "GRAND PRIX: grab a certain prize from a Prison Egg"; | ||||
| 			return "GRAND PRIX: grab a certain prize from a random Prison Egg"; | ||||
| 
 | ||||
| 		case UC_AND: | ||||
| 			return "&"; | ||||
|  | @ -2979,7 +2979,7 @@ char *M_BuildConditionSetString(UINT16 unlockid) | |||
| 	static char message[1024] = ""; | ||||
| 	const char *work = NULL; | ||||
| 	size_t i; | ||||
| 	boolean stopasap = false; | ||||
| 	UINT8 stopasap = 0; | ||||
| 
 | ||||
| 	message[0] = '\0'; | ||||
| 
 | ||||
|  | @ -3006,14 +3006,16 @@ char *M_BuildConditionSetString(UINT16 unlockid) | |||
| 	{ | ||||
| 		cn = &c->condition[i]; | ||||
| 
 | ||||
| 		if (i > 0 && (cn->type != UC_COMMA)) | ||||
| 		if (i > 0) | ||||
| 		{ | ||||
| 			worklen = 0; | ||||
| 			if (lastID != cn->id) | ||||
| 			{ | ||||
| 				stopasap = 0; | ||||
| 				worklen = 6; | ||||
| 				strncat(message, " - OR ", len); | ||||
| 			} | ||||
| 			else | ||||
| 			else if (stopasap == 0 && cn->type != UC_COMMA) | ||||
| 			{ | ||||
| 				worklen = 1; | ||||
| 				strncat(message, " ", len); | ||||
|  | @ -3023,23 +3025,33 @@ char *M_BuildConditionSetString(UINT16 unlockid) | |||
| 
 | ||||
| 		lastID = cn->id; | ||||
| 
 | ||||
| 		if (stopasap == 1) | ||||
| 		{ | ||||
| 			// Secret challenge -- show unrelated condition IDs
 | ||||
| 			continue; | ||||
| 		} | ||||
| 
 | ||||
| 		work = M_GetConditionString(cn); | ||||
| 		if (work == NULL) | ||||
| 		{ | ||||
| 			stopasap = true; | ||||
| 			stopasap = 1; | ||||
| 			if (message[0] && message[1]) | ||||
| 				work = "???"; | ||||
| 			else | ||||
| 				work = "(Find other secrets to learn about this...)"; | ||||
| 		} | ||||
| 		else if (cn->type == UC_DESCRIPTIONOVERRIDE) | ||||
| 		{ | ||||
| 			stopasap = true; | ||||
| 			stopasap = 2; | ||||
| 		} | ||||
| 		worklen = strlen(work); | ||||
| 
 | ||||
| 		strncat(message, work, len); | ||||
| 		len -= worklen; | ||||
| 
 | ||||
| 		if (stopasap) | ||||
| 		if (stopasap == 2) | ||||
| 		{ | ||||
| 			// Description override - hide all further ones
 | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 toaster
						toaster