diff --git a/korman/properties/modifiers/logic.py b/korman/properties/modifiers/logic.py index 92ac41b..7eaaca1 100644 --- a/korman/properties/modifiers/logic.py +++ b/korman/properties/modifiers/logic.py @@ -55,3 +55,33 @@ class PlasmaSpawnPoint(PlasmaModifierProperties): @property def requires_actor(self): return True + +class PlasmaMaintainersMarker(PlasmaModifierProperties): + pl_id = "maintainersmarker" + + bl_category = "Logic" + bl_label = "Maintainer's Marker" + bl_description = "Designates an object as the D'ni coordinate origin point of the Age." + bl_icon = "OUTLINER_DATA_EMPTY" + + calibration = EnumProperty(name="Calibration", + description="State of repair for the Marker", + items=[ + ("kBroken", "Broken", + "A marker which reports scrambled coordinates to the KI."), + ("kRepaired", "Repaired", + "A marker which reports blank coordinates to the KI."), + ("kCalibrated", "Calibrated", + "A marker which reports accurate coordinates to the KI.") + ]) + + def created(self, obj): + self.display_name = obj.name + + def export(self, exporter, bo, so): + maintmark = exporter.mgr.add_object(pl=plMaintainersMarkerModifier, so=so, name=self.display_name) + maintmark.calibration = getattr(plMaintainersMarkerModifier, self.calibration) + + @property + def requires_actor(self): + return True diff --git a/korman/ui/modifiers/logic.py b/korman/ui/modifiers/logic.py index c250d02..f8fbb2d 100644 --- a/korman/ui/modifiers/logic.py +++ b/korman/ui/modifiers/logic.py @@ -21,3 +21,6 @@ def advanced_logic(modifier, layout, context): def spawnpoint(modifier, layout, context): layout.label(text="The Y axis indicates the direction the avatar is facing.") +def maintainersmarker(modifier, layout, context): + layout.label(text="Positive Y is North, positive Z is up.") + layout.prop(modifier, "calibration")