Skip to content

Commit

Permalink
Externals: Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ataulien committed Jul 1, 2018
1 parent ddfb952 commit b48ccfd
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/logic/scriptExternals/Externals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ void ::Logic::ScriptExternals::registerEngineExternals(World::WorldInstance& wor
}
});

/**
* GetDistTo...
*/
vm->registerExternalFunction("printdebuginstch", [=](Daedalus::DaedalusVM& vm) {
uint32_t arr_npc;
std::string s = vm.popString();
Expand Down Expand Up @@ -176,14 +173,6 @@ void ::Logic::ScriptExternals::registerEngineExternals(World::WorldInstance& wor
NpcHandle hnpc = ZMemory::handleCast<NpcHandle>(vm.getDATFile().getSymbolByIndex(npc).instanceDataHandle);

vm.getGameState().createInventoryItem(itemInstance, hnpc);

/*
Daedalus::GEngineClasses::C_Npc& npcData = vm.getGameState().getNpc(hnpc);
auto& parsym = vm.getDATFile().getSymbolByIndex(itemInstance);
LogInfo() << "1: " << parsym.name;
LogInfo() << "2. " << npcData.name[0];
LogInfo() << " ##### Created Inventory-Item '" << parsym.name << "' for NPC: " << npcData.name[0];
*/
});

vm->registerExternalFunction("createinvitems", [=](Daedalus::DaedalusVM& vm) {
Expand All @@ -200,16 +189,6 @@ void ::Logic::ScriptExternals::registerEngineExternals(World::WorldInstance& wor
vm->registerExternalFunction("hlp_getnpc", [=](Daedalus::DaedalusVM& vm) {
int32_t instancename = vm.popDataValue();

/*if(!vm.getDATFile().getSymbolByIndex(instancename).instanceDataHandle.isValid())
{
}else
{
GEngineClasses::C_Npc& npcData = getNpc(ZMemory::handleCast<NpcHandle>(vm.getDATFile().getSymbolByIndex(instancename).instanceDataHandle));
if(l) LogInfo() << " [HLP_GETNPC] Name: "
<< npcData.name[0];
}*/

vm.setReturnVar(instancename);
});

Expand Down

0 comments on commit b48ccfd

Please sign in to comment.