Skip to content

Commit

Permalink
PE: Added - Quest Type "Activate" (4 Necrym59).
Browse files Browse the repository at this point in the history
PE: Added - DLUA - -- DESCRIPTION: [@SELECTED_INTERACTION$=-1(0=InterActionWeaponList)] (4 Necrym59).
PE: Added - DLUA - -- DESCRIPTION: [@ListQuests=1(0=QuestList)] (4 Necrym59).
  • Loading branch information
plemsoft committed Jan 17, 2025
1 parent 04479c5 commit ef9ccf6
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 9 deletions.
31 changes: 29 additions & 2 deletions GameGuru Core/GameGuru/Imgui/imgui_gg_dx11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7113,13 +7113,35 @@ void ParseLuaScriptWithElementID(entityeleproftype *tmpeleprof, char * script, i
}
if (labels.size() == 2)
{
//InterActionWeaponList
if (stricmp(labels[1].c_str(), "interactionweaponlist") == NULL)
{
labels.clear();
labels.push_back(cVariable);
int iWeaponListIndex = 1;
//PE: Add filter.
int FillWeaponList(std::vector<std::string>& labels, char* filter);
iWeaponListIndex += FillWeaponList(labels, "Interaction");

if (iWeaponListIndex > 0)
{
tmpeleprof->PropertiesVariable.VariableValueFrom[tmpeleprof->PropertiesVariable.iVariables] = 1;
tmpeleprof->PropertiesVariable.VariableValueTo[tmpeleprof->PropertiesVariable.iVariables] = iWeaponListIndex;
}
else
{
tmpeleprof->PropertiesVariable.VariableValueFrom[tmpeleprof->PropertiesVariable.iVariables] = 0;
tmpeleprof->PropertiesVariable.VariableValueTo[tmpeleprof->PropertiesVariable.iVariables] = 0;
}

}
if (stricmp(labels[1].c_str(), "anyweaponlist") == NULL)
{
labels.clear();
labels.push_back(cVariable);
int iWeaponListIndex = 1;
int FillWeaponList(std::vector<std::string> &labels);
iWeaponListIndex += FillWeaponList( labels);
int FillWeaponList(std::vector<std::string> &labels, char* filter);
iWeaponListIndex += FillWeaponList( labels , nullptr);

if (iWeaponListIndex > 0)
{
Expand Down Expand Up @@ -7842,6 +7864,11 @@ int DisplayLuaDescription(entityeleproftype *tmpeleprof)
collectionQuestType item;
fill_rpg_quest_defaults(&item, tmpeleprof->name_s.Get());

//PE: Just to stop crash if not using storyboard.
if (g_collectionQuestLabels.size() == 0)
{
bFoundMatch = false;
}
// only add unique quest titles
if (bFoundMatch == false)
{
Expand Down
11 changes: 10 additions & 1 deletion GameGuru Core/GameGuru/Source/M-GridEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9511,11 +9511,12 @@ void mapeditorexecutable_loop(void)
// drop down to make life easier
char cTmpInput[MAX_PATH];
strcpy(cTmpInput, g_collectionQuestList[iCollectionItemIndex].collectionFields[l].Get());
const char* items[] = { "Collect", "Destroy", "Deliver" };
const char* items[] = { "Collect", "Destroy", "Deliver", "Activate" };
int item_current = 0;
if (stricmp(cTmpInput, "collect") == NULL) item_current = 0;
if (stricmp(cTmpInput, "destroy") == NULL) item_current = 1;
if (stricmp(cTmpInput, "deliver") == NULL) item_current = 2;
if (stricmp(cTmpInput, "activate") == NULL) item_current = 3;
ImGui::SetCursorPos(ImVec2(ImGui::GetCursorPosX(), ImGui::GetCursorPosY() + 3));
ImGui::Text("Quest Type");
ImGui::SameLine();
Expand All @@ -9527,6 +9528,7 @@ void mapeditorexecutable_loop(void)
if (item_current == 0) g_collectionQuestList[iCollectionItemIndex].collectionFields[l] = "collect";
if (item_current == 1) g_collectionQuestList[iCollectionItemIndex].collectionFields[l] = "destroy";
if (item_current == 2) g_collectionQuestList[iCollectionItemIndex].collectionFields[l] = "deliver";
if (item_current == 3) g_collectionQuestList[iCollectionItemIndex].collectionFields[l] = "activate";
}
ImGui::PopItemWidth();

Expand Down Expand Up @@ -17544,6 +17546,13 @@ void editor_previewmapormultiplayer_afterloopcode ( int iUseVRTest )
void CleanUpSpawedObject(void);
CleanUpSpawedObject();


#ifdef WICKEDPARTICLESYSTEM
//PE: Clear all wicked particle effects created by lua.
void CleanUpEmitterEffects(void);
CleanUpEmitterEffects();
#endif

#ifdef WICKEDENGINE
WickedCall_SetEditorCameraLight(true);
#endif
Expand Down
25 changes: 19 additions & 6 deletions GameGuru Core/GameGuru/Source/M-GridEditB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2619,19 +2619,32 @@ void setpropertyfile ( int group, char* data_s, char* field_s, char* desc_s, cha
}
#endif

int FillWeaponList(std::vector<std::string>& labels)
int FillWeaponList(std::vector<std::string>& labels, char *filter)
{
int listmax = fillgloballistwithweaponsQuick(true, true, true, false);
int iWeaponListIndex = 0;

labels.push_back("No Weapon");
if (filter)
{
std::string label = "No " + std::string(filter);
labels.push_back(label.c_str());
}
else
{
labels.push_back("No Weapon");
}
iWeaponListIndex++;
for (int gunid = 1; gunid <= g.gunmax; gunid++)
{
cstr thisLabel = t.gun[gunid].name_s;
if (strlen(thisLabel.Get()) == 0) thisLabel = "No Weapon";
labels.push_back(thisLabel.Get());
iWeaponListIndex++;
bool bAdd = true;
if (filter && !pestrcasestr(thisLabel.Get(), filter))
bAdd = false;
if (bAdd)
{
if (strlen(thisLabel.Get()) == 0) thisLabel = "No Weapon";
labels.push_back(thisLabel.Get());
iWeaponListIndex++;
}
}

return(iWeaponListIndex);
Expand Down

0 comments on commit ef9ccf6

Please sign in to comment.