(self, key, val)
| 475 | |
| 476 | @validates("ID", "ownerID", "shipID") |
| 477 | def validator(self, key, val): |
| 478 | map = { |
| 479 | "ID": lambda _val: isinstance(_val, int), |
| 480 | "ownerID": lambda _val: isinstance(_val, int) or _val is None, |
| 481 | "shipID": lambda _val: isinstance(_val, int) or _val is None |
| 482 | } |
| 483 | |
| 484 | if not map[key](val): |
| 485 | |
| 486 | raise ValueError(str(val) + " is not a valid value for " + key) |
| 487 | else: |
| 488 | return val |
| 489 | |
| 490 | def canFit(self, item): |
| 491 | # Whereas Module.fits() deals with current state of the fit in order to determine if somethign fits (for example maxGroupFitted which can be modified by effects), |
nothing calls this directly
no outgoing calls
no test coverage detected