Allow loadout items to be used in the camp without consuming the item. Release Build 11922.
This commit is contained in:
		
							parent
							
								
									d89b82bc41
								
							
						
					
					
						commit
						7d0b15f652
					
				| @ -3996,8 +3996,10 @@ bool AiL::UseLoadoutItem(int slot,const std::optional<vf2d>targetingPos){ | |||||||
| 	if(!ISBLANK(GetLoadoutItem(slot).lock())&&GetLoadoutItem(slot).lock()->Amt()>0){ | 	if(!ISBLANK(GetLoadoutItem(slot).lock())&&GetLoadoutItem(slot).lock()->Amt()>0){ | ||||||
| 		Tutorial::GetTask(TutorialTaskName::USE_RECOVERY_ITEMS).I(A::ITEM_USE_COUNT)++; | 		Tutorial::GetTask(TutorialTaskName::USE_RECOVERY_ITEMS).I(A::ITEM_USE_COUNT)++; | ||||||
| 		Inventory::UseItem(GetLoadoutItem(slot).lock()->ActualName(),1U,targetingPos); | 		Inventory::UseItem(GetLoadoutItem(slot).lock()->ActualName(),1U,targetingPos); | ||||||
|  | 		if(game->GetCurrentMapName()!="HUB"){ | ||||||
| 			Inventory::AddLoadoutItemUsed(GetLoadoutItem(slot).lock()->ActualName(),slot); | 			Inventory::AddLoadoutItemUsed(GetLoadoutItem(slot).lock()->ActualName(),slot); | ||||||
| 			GetLoadoutItem(slot).lock()->amt--; | 			GetLoadoutItem(slot).lock()->amt--; | ||||||
|  | 		} | ||||||
| 		if(GetLoadoutItem(slot).lock()->UseSound().length()>0){ | 		if(GetLoadoutItem(slot).lock()->UseSound().length()>0){ | ||||||
| 			SoundEffect::PlaySFX(GetLoadoutItem(slot).lock()->UseSound(),SoundEffect::CENTERED); | 			SoundEffect::PlaySFX(GetLoadoutItem(slot).lock()->UseSound(),SoundEffect::CENTERED); | ||||||
| 		} | 		} | ||||||
|  | |||||||
| @ -886,8 +886,7 @@ bool Player::CanAct(){ | |||||||
| 
 | 
 | ||||||
| const bool Player::CanAct(const Ability&ability){ | const bool Player::CanAct(const Ability&ability){ | ||||||
| 	return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&state!=State::DEADLYDASH&&state!=State::RETREAT&& | 	return knockUpTimer==0&&!ability.waitForRelease&&(ability.canCancelCast||state!=State::CASTING)&&state!=State::ANIMATION_LOCK&&state!=State::DEADLYDASH&&state!=State::RETREAT&& | ||||||
| 		(GameState::STATE==GameState::states[States::GAME_RUN] | 		(GameState::STATE==GameState::states[States::GAME_RUN]||GameState::STATE==GameState::states[States::GAME_HUB]); | ||||||
| 		||GameState::STATE==GameState::states[States::GAME_HUB]&&!ability.itemAbility); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| bool Player::HasIframes(){ | bool Player::HasIframes(){ | ||||||
|  | |||||||
| @ -39,7 +39,7 @@ All rights reserved. | |||||||
| #define VERSION_MAJOR 1 | #define VERSION_MAJOR 1 | ||||||
| #define VERSION_MINOR 3 | #define VERSION_MINOR 3 | ||||||
| #define VERSION_PATCH 0 | #define VERSION_PATCH 0 | ||||||
| #define VERSION_BUILD 11917 | #define VERSION_BUILD 11922 | ||||||
| 
 | 
 | ||||||
| #define stringify(a) stringify_(a) | #define stringify(a) stringify_(a) | ||||||
| #define stringify_(a) #a | #define stringify_(a) #a | ||||||
|  | |||||||
| @ -126,40 +126,40 @@ void VisualNovel::Initialize(){ | |||||||
| 						arguments=ReadCSVArgs(args); | 						arguments=ReadCSVArgs(args); | ||||||
| 					} | 					} | ||||||
| 
 | 
 | ||||||
| 					if(line.find("{LOCATION")!=std::string::npos){//Location command
 | 					if(line.find("{LOCATION")!=std::string::npos){ | ||||||
| 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | ||||||
| 						data.emplace_back(std::make_unique<LocationCommand>(arguments[0])); | 						data.emplace_back(std::make_unique<LocationCommand>(arguments[0])); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{BACKGROUND")!=std::string::npos){//Background command
 | 					if(line.find("{BACKGROUND")!=std::string::npos){ | ||||||
| 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | ||||||
| 						graphicsToLoad.insert("story_background_image_location"_S+arguments[0]); | 						graphicsToLoad.insert("story_background_image_location"_S+arguments[0]); | ||||||
| 						data.push_back(std::make_unique<BackgroundCommand>(arguments[0])); | 						data.push_back(std::make_unique<BackgroundCommand>(arguments[0])); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{LEFT")!=std::string::npos){//Left command
 | 					if(line.find("{LEFT")!=std::string::npos){ | ||||||
| 						AddImagesForLoading(arguments); | 						AddImagesForLoading(arguments); | ||||||
| 						data.emplace_back(std::make_unique<LeftCommand>(arguments)); | 						data.emplace_back(std::make_unique<LeftCommand>(arguments)); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{RIGHT")!=std::string::npos){//Right command
 | 					if(line.find("{RIGHT")!=std::string::npos){ | ||||||
| 						AddImagesForLoading(arguments); | 						AddImagesForLoading(arguments); | ||||||
| 						data.emplace_back(std::make_unique<RightCommand>(arguments)); | 						data.emplace_back(std::make_unique<RightCommand>(arguments)); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{PAUSE")!=std::string::npos){//Pause command
 | 					if(line.find("{PAUSE")!=std::string::npos){ | ||||||
| 						if(arguments.size()!=0)ERR("Arguments size is "<<arguments.size()<<". Expecting no arguments.") | 						if(arguments.size()!=0)ERR("Arguments size is "<<arguments.size()<<". Expecting no arguments.") | ||||||
| 						data.emplace_back(std::make_unique<PauseCommand>()); | 						data.emplace_back(std::make_unique<PauseCommand>()); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{AUDIOPITCH")!=std::string::npos){//Pause command
 | 					if(line.find("{AUDIOPITCH")!=std::string::npos){ | ||||||
| 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | ||||||
| 						data.emplace_back(std::make_unique<AudioPitchCommand>(arguments[0])); | 						data.emplace_back(std::make_unique<AudioPitchCommand>(arguments[0])); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{BGM")!=std::string::npos){//Pause command
 | 					if(line.find("{BGM")!=std::string::npos){ | ||||||
| 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | ||||||
| 						data.emplace_back(std::make_unique<BGMCommand>(arguments[0])); | 						data.emplace_back(std::make_unique<BGMCommand>(arguments[0])); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{CHAPTER")!=std::string::npos){//Pause command
 | 					if(line.find("{CHAPTER")!=std::string::npos){ | ||||||
| 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | 						if(arguments.size()!=1)ERR("Arguments size is "<<arguments.size()<<". Expecting only 1 argument.") | ||||||
| 						data.emplace_back(std::make_unique<ChapterCommand>(std::stoi(arguments[0]))); | 						data.emplace_back(std::make_unique<ChapterCommand>(std::stoi(arguments[0]))); | ||||||
| 					}else | 					}else | ||||||
| 					if(line.find("{SETPLAYERWORLDLOC")!=std::string::npos){//Pause command
 | 					if(line.find("{SETPLAYERWORLDLOC")!=std::string::npos){ | ||||||
| 						if(arguments.size()<1)ERR("Arguments size is "<<arguments.size()<<". Expecting at least 1 argument.") | 						if(arguments.size()<1)ERR("Arguments size is "<<arguments.size()<<". Expecting at least 1 argument.") | ||||||
| 						std::string connectionPointName{}; | 						std::string connectionPointName{}; | ||||||
| 						for(int i=0;std::string&arg:arguments){ | 						for(int i=0;std::string&arg:arguments){ | ||||||
|  | |||||||
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user