mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-02 17:12:58 -04:00
The majority of lightsaber customization now works. All that I can think of that needs to be done is: * Rare/Unique color crystals names/palette index to resources.datatables.LightsaberColors * Weapon element types and damage bonus based on color crystal * Random stats when tuning power crystals/krayt dragon pearls * Checks to see if lightsaber is full - container size is in IFFs, we should implement it for all containers
27 lines
1.2 KiB
Python
27 lines
1.2 KiB
Python
from resources.common import RadialOptions
|
|
import sys
|
|
|
|
def createRadial(core, owner, target, radials):
|
|
radials.clear()
|
|
radials.add(RadialOptions(0, 7, 0, 'Examine'))
|
|
radials.add(RadialOptions(0, 15, 0, 'Destroy'))
|
|
if target.getAttachment("tunerId") == None or target.getAttachment("tunerId") == 0: radials.add(RadialOptions(0, 19, 0, 'Tune'))
|
|
return
|
|
|
|
def handleSelection(core, owner, target, option):
|
|
if option == 19 and target:
|
|
if owner is not None:
|
|
#owner.sendSystemMessage('You are not attuned enough with the force yet.',1)
|
|
|
|
if target.getAttachment("tunerId") == None or target.getAttachment("tunerId") == 0:
|
|
target.getAttributes().put("@obj_attr_n:crystal_owner", owner.getCustomName())
|
|
target.setAttachment("tunerId", int(owner.getObjectId()))
|
|
|
|
# Need to change this to generate valid numbers based on the quality and type ... stats found here: http://swg.wikia.com/wiki/Lightsaber_Crystal
|
|
if target.getAttributes().get("@obj_attr_n:color") is None:
|
|
target.getAttributes().put("@obj_attr_n:componentbonuslow", "23")
|
|
target.getAttributes().put("@obj_attr_n:componentbonushigh", "25")
|
|
else:
|
|
owner.sendSystemMessage("You cannot tune this crystal.",1)
|
|
return
|