From 73886e92dab71bb7e227f9e93fc7b0b1a7746ab9 Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Sat, 20 Jun 2015 14:32:08 -0700 Subject: [PATCH] Add Maintainer's Marker mod. --- korman/properties/modifiers/logic.py | 30 ++++++++++++++++++++++++++++ korman/ui/modifiers/logic.py | 3 +++ 2 files changed, 33 insertions(+) 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")