Browse Source

Merge pull request #6 from Deledrius/marker

Add Maintainer's Marker mod.
pull/7/head
Adam Johnson 10 years ago
parent
commit
d55d643efe
  1. 30
      korman/properties/modifiers/logic.py
  2. 3
      korman/ui/modifiers/logic.py

30
korman/properties/modifiers/logic.py

@ -55,3 +55,33 @@ class PlasmaSpawnPoint(PlasmaModifierProperties):
@property @property
def requires_actor(self): def requires_actor(self):
return True 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

3
korman/ui/modifiers/logic.py

@ -21,3 +21,6 @@ def advanced_logic(modifier, layout, context):
def spawnpoint(modifier, layout, context): def spawnpoint(modifier, layout, context):
layout.label(text="The Y axis indicates the direction the avatar is facing.") 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")

Loading…
Cancel
Save