diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/StorageRequiredContract.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/StorageRequiredContract.cpp deleted file mode 100644 index f730379ec2..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/StorageRequiredContract.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include "StorageRequiredContract.h" - -#include -#include -#include - -namespace ScriptCanvas -{ - AZ::Outcome StorageRequiredContract::OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const - { - if (sourceSlot.GetType() == SlotType::DataOut && targetSlot.GetType() == SlotType::DataIn) - { - bool isSlotValidStorage{}; - NodeRequestBus::EventResult(isSlotValidStorage, targetSlot.GetNodeId(), &NodeRequests::IsSlotValidStorage, targetSlot.GetId()); - if (isSlotValidStorage) - { - return AZ::Success(); - } - } - - AZStd::string errorMessage = AZStd::string::format("Connection cannot be created between source slot \"%s\" and target slot \"%s\", Storage requirement is not met. (%s)" - , sourceSlot.GetName().data() - , targetSlot.GetName().data() - , RTTI_GetTypeName() - ); - - return AZ::Failure(errorMessage); - } - - void StorageRequiredContract::Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(0) - ; - } - } -} diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/StorageRequiredContract.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/StorageRequiredContract.h deleted file mode 100644 index c8718ec47f..0000000000 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Contracts/StorageRequiredContract.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace ScriptCanvas -{ - class StorageRequiredContract - : public Contract - { - public: - AZ_CLASS_ALLOCATOR(StorageRequiredContract, AZ::SystemAllocator, 0); - AZ_RTTI(StorageRequiredContract, "{AECE109D-121F-477C-995F-D044CA05F88D}", Contract); - - StorageRequiredContract() = default; - - ~StorageRequiredContract() override = default; - - static void Reflect(AZ::ReflectContext* reflection); - - protected: - AZ::Outcome OnEvaluate(const Slot& sourceSlot, const Slot& targetSlot) const override; - }; -}