Fixed issue with Bestine Capitol building Terminals and not being able to search them.

This commit is contained in:
Cekis
2018-03-23 15:58:29 -07:00
committed by CekisSWG
parent e71b899a20
commit d0011c48d6
@@ -63,13 +63,12 @@ public class terminal_items extends script.base_script
public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info mi) throws InterruptedException
{
String template = getStringObjVar(self, "disk");
int stringCheck = template.indexOf("history");
if (stringCheck < 0)
if(template != null && template.indexOf("history") >= 0){
return SCRIPT_CONTINUE;
}
if (canSearch(self, player))
{
if (canSearch(self, player))
{
mi.addRootMenu(menu_info_types.ITEM_USE, new string_id(CONVO, "download"));
}
mi.addRootMenu(menu_info_types.ITEM_USE, new string_id(CONVO, "download"));
}
return SCRIPT_CONTINUE;
}