Initial commit of lightsaber customization - see extended

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
This commit is contained in:
Seefo
2014-05-05 20:19:07 -04:00
parent 07fb35b747
commit 8dd5f5d053
11 changed files with 280 additions and 5 deletions
+7 -3
View File
@@ -533,12 +533,16 @@ public class LootService implements INetworkDispatch {
}
private void setCustomization(TangibleObject droppedItem,String itemName) {
public void setCustomization(TangibleObject droppedItem,String itemName) {
// Example color crystal
if (itemName.contains("colorcrystal")) {
System.out.println("colorcrystal");
droppedItem.setCustomizationVariable("/private/index_color_1", (byte) new Random().nextInt(11));
int crystalColor = new Random().nextInt(11);
droppedItem.setCustomizationVariable("/private/index_color_1", (byte) crystalColor);
droppedItem.getAttributes().put("@obj_attr_n:color", resources.datatables.LightsaberColors.get(crystalColor));
}
// Example power crystal
@@ -558,7 +562,7 @@ public class LootService implements INetworkDispatch {
// }
}
private void handleSpecialItems(TangibleObject droppedItem,String itemName) {
public void handleSpecialItems(TangibleObject droppedItem,String itemName) {
if (itemName.contains("kraytpearl")){
handleKraytPearl(droppedItem);
}