|
| 1 | +from resources.common import RadialOptions |
| 2 | +import sys |
| 3 | + |
| 4 | +def createRadial(core, owner, target, radials): |
| 5 | + radials.clear() |
| 6 | + player = owner.getSlottedObject('ghost') |
| 7 | + radials.add(RadialOptions(0, 7, 1, '')) |
| 8 | + if player and core.collectionService.isComplete(owner, 'col_lifeday_tree_tracking_2010'): |
| 9 | + radials.add(RadialOptions(0, 21, 3, '@spam:tree_use')) |
| 10 | + if player and core.collectionService.isComplete(owner, 'lifeday_badge_08'): |
| 11 | + radials.add(RadialOptions(0, 115, 3, '@spam:tree_badge')) |
| 12 | + return |
| 13 | + |
| 14 | +def handleSelection(core, owner, target, option): |
| 15 | + actor = owner |
| 16 | + object = target |
| 17 | + |
| 18 | + if option == 115: |
| 19 | + core.collectionService.addCollection(owner, 'lifeday_badge_08') |
| 20 | + return |
| 21 | + |
| 22 | + if option != 21 or not object: |
| 23 | + return |
| 24 | + |
| 25 | + player = actor.getSlottedObject('ghost') |
| 26 | + |
| 27 | + if not player: |
| 28 | + return |
| 29 | + |
| 30 | + if core.collectionService.isComplete(actor, 'lifeday_badge_08'): |
| 31 | + return |
| 32 | + |
| 33 | + inventory = actor.getSlottedObject('inventory') |
| 34 | + |
| 35 | + if not inventory: |
| 36 | + return |
| 37 | + |
| 38 | + lifedaybox = core.objectService.createObject('object/tangible/loot/creature_loot/collections/shared_dejarik_table_base.iff', actor.getPlanet(), 'item_lifeday_gift_self_01_01') |
| 39 | + lifedaybox.setAttachment('radial_filename', 'lifeday_gift') |
| 40 | + inventory.add(lifedaybox) |
| 41 | + |
| 42 | + lifedayboxfriend = core.objectService.createObject('object/tangible/loot/creature_loot/collections/shared_dejarik_table_base.iff', actor.getPlanet(), 'item_lifeday_gift_other_01_01') |
| 43 | + lifedayboxfriend.setAttachment('ownerId', actor.getObjectID()) |
| 44 | + inventory.add(lifedayboxfriend) |
| 45 | + |
| 46 | + core.collectionService.addCollection(owner, 'col_lifeday_tree_tracking_2010') |
0 commit comments