mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Convert many of the now-deprecated plString::Format calls to plFormat
This commit is contained in:
@ -890,7 +890,7 @@ bool plAnimComponentBase::IMakePersistent(plMaxNode *node, plAGAnim *anim, plErr
|
||||
plAGMasterMod *mod = plAGMasterMod::ConvertNoRef(fMods[node]);
|
||||
hsAssert(mod != nil, "No MasterMod to make animation persistent!");
|
||||
|
||||
plString buffer = plString::Format("%s_%s_anim_%d", node->GetName(), anim->GetName().c_str(), mod->GetNumPrivateAnimations());
|
||||
plString buffer = plFormat("{}_{}_anim_{}", node->GetName(), anim->GetName(), mod->GetNumPrivateAnimations());
|
||||
plLocation nodeLoc = node->GetLocation();
|
||||
plKey animKey = hsgResMgr::ResMgr()->NewKey(buffer, anim, nodeLoc);
|
||||
|
||||
|
@ -2317,7 +2317,7 @@ bool plSound3DEmitterComponent::ConvertGrouped( plMaxNode *baseNode, hsTArray
|
||||
if( fIndices.find( baseNode ) != fIndices.end() )
|
||||
index = fIndices[ baseNode ];
|
||||
|
||||
keyName = plString::Format( "%s_MergedSound", GetINode()->GetName() );
|
||||
keyName = plFormat("{}_MergedSound", GetINode()->GetName());
|
||||
|
||||
plKey buffKey = baseNode->FindPageKey( plSoundBuffer::Index(), keyName );
|
||||
if( buffKey != nil )
|
||||
@ -2485,7 +2485,7 @@ bool plBackgroundMusicComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
|
||||
if( srcBuffer == nil )
|
||||
return false;
|
||||
|
||||
plString keyName = plString::Format( "%s_Win32BgndSnd", GetINode()->GetName() );
|
||||
plString keyName = plFormat("{}_Win32BgndSnd", GetINode()->GetName());
|
||||
plWin32Sound *sound = nil;
|
||||
|
||||
if( srcBuffer->GetDataLengthInSecs() > 4.f )
|
||||
@ -2643,7 +2643,7 @@ bool plGUISoundComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg)
|
||||
return false;
|
||||
}
|
||||
|
||||
plString keyName = plString::Format( "%s_Win32GUISound", GetINode()->GetName() );
|
||||
plString keyName = plFormat("{}_Win32GUISound", GetINode()->GetName());
|
||||
|
||||
plWin32StaticSound *sound = new plWin32StaticSound;
|
||||
hsgResMgr::ResMgr()->NewKey(keyName, sound, node->GetLocation(), node->GetLoadMask());
|
||||
|
@ -509,11 +509,11 @@ void AddClothingToMod(plMaxNode *node, plArmatureMod *mod, int group, hsGMateria
|
||||
}
|
||||
else
|
||||
base->SetLayoutName("BasicHuman");
|
||||
keyName = plString::Format("%s_ClothingBase", node->GetName());
|
||||
keyName = plFormat("{}_ClothingBase", node->GetName());
|
||||
hsgResMgr::ResMgr()->NewKey(keyName, base, node->GetLocation());
|
||||
plClothingOutfit *outfit = new plClothingOutfit();
|
||||
outfit->fGroup = group;
|
||||
keyName = plString::Format("%s_outfit", mod->GetKey()->GetName().c_str());
|
||||
keyName = plFormat("{}_outfit", mod->GetKey()->GetName());
|
||||
hsgResMgr::ResMgr()->NewKey(keyName, outfit, node->GetLocation());
|
||||
|
||||
msg = new plGenRefMsg(outfit->GetKey(), plRefMsg::kOnCreate, -1, -1);
|
||||
|
@ -41,6 +41,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
*==LICENSE==*/
|
||||
|
||||
#include "HeadSpin.h"
|
||||
#include "plFormat.h"
|
||||
|
||||
#include "plComponentBase.h"
|
||||
#include "plComponentReg.h"
|
||||
@ -309,7 +310,7 @@ plString plComponentBase::IGetUniqueName(plMaxNodeBase* target)
|
||||
hsAssert(thisTargIdx != -1, "Bad target for IGetUniqueName");
|
||||
|
||||
if (numUsedTargs > 1)
|
||||
return plString::Format("%s_%d", GetINode()->GetName(), thisTargIdx);
|
||||
return plFormat("{}_{}", GetINode()->GetName(), thisTargIdx);
|
||||
else
|
||||
return plString::FromUtf8(GetINode()->GetName());
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ bool plInventoryObjComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg)
|
||||
|
||||
// Create and register the ClickDrag's logic component
|
||||
plLogicModifier *logic = new plLogicModifier;
|
||||
plString tmpName = plString::Format("%s_%s_LogicModifier", obj->GetKeyName().c_str(), GetINode()->GetName());
|
||||
plString tmpName = plFormat("{}_{}_LogicModifier", obj->GetKeyName(), GetINode()->GetName());
|
||||
plKey logicKey = hsgResMgr::ResMgr()->NewKey(tmpName, logic, node->GetLocation());
|
||||
hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef);
|
||||
|
||||
|
@ -648,7 +648,7 @@ void plPageInfoComponent::IUpdateSeqNumbersFromAgeFile( plErrorMsg *errMsg )
|
||||
fCompPB->SetValue( kInfoSeqSuffix, 0, 0 );
|
||||
return;
|
||||
}
|
||||
plFileName path = plFileName::Join(ageFolder, plString::Format("%s.age", curAge));
|
||||
plFileName path = plFileName::Join(ageFolder, plFormat("{}.age", curAge));
|
||||
|
||||
IVerifyLatestAgeAsset( curAge, path, errMsg );
|
||||
std::unique_ptr<plAgeDescription> aged(plPageInfoUtils::GetAgeDesc(curAge));
|
||||
|
@ -333,7 +333,7 @@ void plMultistageBehComponent::FixStageNames()
|
||||
for (int i = 0; i < fStages.size(); i++)
|
||||
{
|
||||
plBaseStage* stage = fStages[i];
|
||||
stage->SetName(plString::Format("Stage %d", i));
|
||||
stage->SetName(plFormat("Stage {}", i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ bool plVolumeGadgetComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg)
|
||||
if(fCompPB->GetInt(kVolumeGadgetEnter) || fCompPB->GetInt(kVolumeTriggerOnFacing))
|
||||
{
|
||||
plLogicModifier *logic = new plLogicModifier;
|
||||
plString tmpName = plString::Format("%s_Enter", IGetUniqueName(node).c_str());
|
||||
plString tmpName = plFormat("{}_Enter", IGetUniqueName(node));
|
||||
plKey logicKey = hsgResMgr::ResMgr()->NewKey(tmpName, logic, node->GetLocation());
|
||||
hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef);
|
||||
|
||||
@ -349,7 +349,7 @@ bool plVolumeGadgetComponent::PreConvert(plMaxNode *node, plErrorMsg *pErrMsg)
|
||||
if(fCompPB->GetInt(kVolumeGadgetExit))
|
||||
{
|
||||
plLogicModifier *logic = new plLogicModifier;
|
||||
plString tmpName = plString::Format("%s_Exit", IGetUniqueName(node).c_str());
|
||||
plString tmpName = plFormat("{}_Exit", IGetUniqueName(node));
|
||||
plKey logicKey = hsgResMgr::ResMgr()->NewKey(tmpName, logic, node->GetLocation());
|
||||
hsgResMgr::ResMgr()->AddViaNotify(logicKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef);
|
||||
|
||||
@ -407,7 +407,7 @@ void plVolumeGadgetComponent::ICreateConditions(plMaxNode* node, plErrorMsg* err
|
||||
prefix = "Enter";
|
||||
|
||||
// Register the detector
|
||||
plString tmpName = plString::Format("%s_%s", IGetUniqueName(node).c_str(), prefix);
|
||||
plString tmpName = plFormat("{}_{}", IGetUniqueName(node), prefix);
|
||||
plKey detectorKey = hsgResMgr::ResMgr()->NewKey(tmpName, detector, loc);
|
||||
hsgResMgr::ResMgr()->AddViaNotify(detectorKey, new plObjRefMsg(obj->GetKey(), plRefMsg::kOnCreate, -1, plObjRefMsg::kModifier), plRefFlags::kActiveRef);
|
||||
plVolumeSensorConditionalObject* boxCond=nil;
|
||||
@ -419,7 +419,7 @@ void plVolumeGadgetComponent::ICreateConditions(plMaxNode* node, plErrorMsg* err
|
||||
{
|
||||
boxCond = new plVolumeSensorConditionalObjectNoArbitration;
|
||||
}
|
||||
tmpName = plString::Format("%s_%s", IGetUniqueName(node).c_str(), prefix);
|
||||
tmpName = plFormat("{}_{}", IGetUniqueName(node), prefix);
|
||||
plKey boxKey = hsgResMgr::ResMgr()->NewKey(tmpName, boxCond, loc);
|
||||
|
||||
if (enter)
|
||||
|
Reference in New Issue
Block a user