mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Clean up
This commit is contained in:
parent
556b9ad7d8
commit
2544cdef4a
@ -50,7 +50,6 @@ namespace ace {
|
||||
|
||||
return stream.str();
|
||||
}
|
||||
stream << "";
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
@ -152,8 +151,6 @@ namespace ace {
|
||||
{
|
||||
if (input.size() == 9)
|
||||
{
|
||||
// TODO parse arrays from string input
|
||||
|
||||
int ID = std::stod(input[0]);
|
||||
std::string className = input[1];
|
||||
std::vector<std::string> allowedSelections = inputToVector(input[2]);
|
||||
@ -186,10 +183,8 @@ namespace ace {
|
||||
return "failed";
|
||||
}
|
||||
|
||||
std::string handleDamage::FinalizeDefinitions()
|
||||
void handleDamage::FinalizeDefinitions()
|
||||
{
|
||||
std::stringstream outputstream;
|
||||
|
||||
// We are finding all possible injuries for a specific damage type here, so we don't have to figure that out at a later stage.
|
||||
for each (std::shared_ptr<ace::medical::injuries::DamageType> damageType in damageTypes)
|
||||
{
|
||||
@ -202,9 +197,7 @@ namespace ace {
|
||||
damageType->possibleInjuries.push_back(injuryType);
|
||||
}
|
||||
}
|
||||
outputstream << " ---- For: " << damageType->typeName << " Added: " << damageType->possibleInjuries.size() << " --- ";
|
||||
}
|
||||
return outputstream.str();
|
||||
}
|
||||
|
||||
int handleDamage::SelectionToNumber(const std::string& selectionName)
|
||||
|
@ -24,42 +24,55 @@ namespace ace {
|
||||
~handleDamage();
|
||||
|
||||
/**
|
||||
* Find new open wounds from advanced medical based upon the received damage.
|
||||
*
|
||||
* @param selectionName A string representation of the bodypart (for example: leg_r)
|
||||
* @param amountOfDamage The damage received
|
||||
* @param typeOfDamage The type of the damage received
|
||||
* @param woundID latest wound ID
|
||||
* @return SQF string containing _woundsCreated and _painAdded.
|
||||
*/
|
||||
std::string HandleDamageWounds(const std::string& selectionName, double amountOfDamage, const std::string& typeOfDamage, int woundID);
|
||||
|
||||
/**
|
||||
* Find new open wounds from advanced medical based upon the received damage.
|
||||
*
|
||||
* @param typeOfDamage The type of the damage received
|
||||
* @param amountOfDamage The damage received
|
||||
* @param selection A number representation of the bodypart. Number from 0 to 6.
|
||||
* @param woundID latest wound ID
|
||||
* @return New open wounds.
|
||||
*/
|
||||
std::vector<ace::medical::injuries::OpenWound> GetInjuryInfoFor(const std::string& typeOfDamage, double amountOfDamage, int selection, int woundID);
|
||||
|
||||
/**
|
||||
*
|
||||
* Add a new damage type from extension input parameters
|
||||
*
|
||||
* @param sqfDamageTypeDefinition
|
||||
* @return String with result of addition: ADDED [parameters] or FAILED
|
||||
*/
|
||||
std::string AddDamageType(const std::vector<std::string>& sqfDamageTypeDefinition);
|
||||
|
||||
/**
|
||||
* Add a new injury type from extension input parameters
|
||||
*
|
||||
* @param sqfDamageTypeDefinition
|
||||
* @return String with result of addition: ADDED [parameters] or FAILED
|
||||
*/
|
||||
std::string AddInjuryType(const std::vector<std::string>& sqfInjuryDefinition);
|
||||
|
||||
/**
|
||||
* Convert a selectionName to a number
|
||||
*
|
||||
*/
|
||||
//static std::string SetInjuryTypeData(const std::string& data);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param selectionName
|
||||
* @return number of selection
|
||||
*/
|
||||
int SelectionToNumber(const std::string& selectionName);
|
||||
|
||||
/**
|
||||
*
|
||||
* Lets the system know that all data has been added
|
||||
*/
|
||||
//static std::vector<std::shared_ptr<ace::medical::injuries::InjuryType>> GetInjuryInfoFor(const std::string& damageType);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
std::string FinalizeDefinitions();
|
||||
void FinalizeDefinitions();
|
||||
|
||||
private:
|
||||
handleDamage();
|
||||
|
@ -35,7 +35,6 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
std::string returnValue = "";
|
||||
std::vector<std::string> arguments = parseExtensionInput(function);
|
||||
if (arguments.size() > 0)
|
||||
@ -59,7 +58,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function) {
|
||||
}
|
||||
}
|
||||
else if (command == "ConfigComplete") {
|
||||
returnValue = ace::medical::handleDamage::GetInstance().FinalizeDefinitions();
|
||||
ace::medical::handleDamage::GetInstance().FinalizeDefinitions();
|
||||
}
|
||||
}
|
||||
strncpy(output, returnValue.c_str(), outputSize);
|
||||
|
Loading…
Reference in New Issue
Block a user