Removes the ability of attachments to add actions. This should be done by modules via scene templates instead.
This commit is contained in:
@@ -21,9 +21,4 @@ interface AttachmentInterface
|
||||
* @return array
|
||||
*/
|
||||
public function getData(): array;
|
||||
|
||||
/**
|
||||
* @return Action[]
|
||||
*/
|
||||
public function getActions(): array;
|
||||
}
|
||||
@@ -353,11 +353,6 @@ class Game
|
||||
$attachment = new ($sceneAttachment->getClass())($this, $scene);
|
||||
$viewpoint->addAttachment($attachment);
|
||||
|
||||
// Add attachment actions to the hidden group.
|
||||
foreach ($attachment->getActions() as $action) {
|
||||
$actionGroups[ActionGroup::HiddenGroup]->addAction($action);
|
||||
}
|
||||
|
||||
$this->getLogger()->debug("Adding attachment {$attachment}");
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,5 @@ class SceneAttachmentTest extends CoreModelTestCase
|
||||
|
||||
$this->assertCount(1, $newViewpoint->getAttachments());
|
||||
$this->assertSame(TestAttachmentWithActions::$attachmentId, $newViewpoint->getAttachments()[0]->getId());
|
||||
$this->assertCount(1, $newViewpoint->getActionGroups()[1]->getActions());
|
||||
$this->assertSame(TestAttachmentWithActions::$actionId, $newViewpoint->getActionGroups()[1]->getActions()[0]->getId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user