Removes the ability of attachments to add actions. This should be done by modules via scene templates instead.

This commit is contained in:
Vassyli
2021-01-29 19:31:49 +01:00
committed by Basilius Sauter
parent 454248ed0f
commit 147692d722
3 changed files with 0 additions and 12 deletions
-5
View File
@@ -21,9 +21,4 @@ interface AttachmentInterface
* @return array
*/
public function getData(): array;
/**
* @return Action[]
*/
public function getActions(): array;
}
-5
View File
@@ -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}");
}
-2
View File
@@ -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());
}
}