| 42 | |
| 43 | @staticmethod |
| 44 | def from_json(data: dict[str, str]) -> inputs.Input: |
| 45 | # The actual data is stored in a separate prim block |
| 46 | _id = data.get("shadow") |
| 47 | _obscurer_id = data.get("block") |
| 48 | |
| 49 | if _obscurer_id == _id: |
| 50 | # If both the shadow and obscurer are the same, then there is no actual obscurer |
| 51 | _obscurer_id = None |
| 52 | # We cannot work out the shadow status yet since that is located in the primitive |
| 53 | return inputs.Input(None, _id=_id, _obscurer_id=_obscurer_id) |
| 54 | |
| 55 | |
| 56 | class BpBlock(block.Block): |