Prevents picking up storyteller objects placed in houses

Players were able to pick up storyteller objects, which broke the timer and prevented them from being automatically destroyed. This prevents the initial pickup.
This commit is contained in:
Elour
2019-03-30 10:39:11 -07:00
parent 9eaf8af328
commit dcdb80f8ff

View File

@@ -23,6 +23,14 @@ public class prop_controller extends script.base_script
messageTo(self, "handleStorytellerPropInitialize", null, 5, false);
return SCRIPT_CONTINUE;
}
public int OnAboutToBeTransferred(obj_id self, obj_id destContainer, obj_id transferer) throws InterruptedException
{
if (isPlayer(getContainedBy(destContainer)))
{
return SCRIPT_OVERRIDE;
}
return SCRIPT_CONTINUE;
}
public int handleStorytellerPropInitialize(obj_id self, dictionary params) throws InterruptedException
{
if (!hasObjVar(self, "eventTeamCleaupOverride") && !utils.hasScriptVar(self, "storytellerOnAttachFired"))