mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
Merge pull request #932 from zingzing175/master
Loot collection items will now delete if added to collection.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
from java.lang import System
|
||||
import sys
|
||||
|
||||
def modify(core, actor, count):
|
||||
return
|
||||
|
||||
def complete(core, actor, collection):
|
||||
ghost = actor.getSlottedObject('ghost')
|
||||
actor.sendSystemMessage('@collection_n:inv_holocron_collection_01_finished', 0)
|
||||
print ('Collection Finished Test')
|
||||
bb = core.objectService.createObject('object/tangible/wearables/backpack/shared_fannypack_s01.iff', object.getPlanet())
|
||||
core.playerService.giveItem(actor, bb)
|
||||
print ('test2')
|
||||
|
||||
return
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/mustafar/shared_jedi_relic_03.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_lightsaber_1h_01_03','static_item_d','col_lightsaber_1h_01_03']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_lightsaber_1h_01'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'col_lightsaber_1h_01_03'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_bracelet.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_bantha_bracelet_02_01','static_item_d','col_tusken_bantha_bracelet_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_bantha_bracelet_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_gaderffi.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_gaderffi_02_01','static_item_d','col_tusken_gaderffi_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_gaderffi_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_hubba_gourd.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_hubba_gourd_02_01','static_item_d','col_tusken_hubba_gourd_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_hubba_gourd_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_massif_thorn.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_massif_thorn_02_01','static_item_d','col_tusken_massif_thorn_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_massif_thorn_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_metal.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_metal_02_01','static_item_d','col_tusken_metal_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_metal_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_bantha_braid.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_bantha_braid_02_01','static_item_d','col_tusken_bantha_braid_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_bantha_braid_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_spirit_mask.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_spirit_mask_02_01','static_item_d','col_tusken_spirit_mask_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_spirit_mask_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_talisman.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_talisman_02_01','static_item_d','col_tusken_talisman_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_talisman_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/creature_loot/collections/shared_tusken_womp_rat_tusk.iff']
|
||||
|
||||
def STFparams():
|
||||
|
||||
return ['static_item_n','col_tusken_womp_rat_tusk_02_01','static_item_d','col_tusken_womp_rat_tusk_02_01']
|
||||
|
||||
def AddToCollection():
|
||||
|
||||
return 'col_tusken_valuables'
|
||||
|
||||
def CollectionItemName():
|
||||
|
||||
return 'tusken_womp_rat_tusk_01'
|
||||
|
||||
def stackable():
|
||||
|
||||
return 1
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/mustafar/shared_jedi_relic_03.iff']
|
||||
|
||||
def usedInCollection():
|
||||
|
||||
return 'One-Handed Fifth Generation Lightsaber'
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
def itemTemplate():
|
||||
|
||||
return ['object/tangible/loot/mustafar/shared_jedi_relic_03.iff']
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
|
||||
def itemNames():
|
||||
|
||||
return ['jedi_holocron_1_5','jedi_holocron_2_5','jedi_holocron_3_5','jedi_holocron_4_5','jedi_holocron_5_5']
|
||||
items=['jedi_holocron_1_5','jedi_holocron_2_5','jedi_holocron_3_5','jedi_holocron_4_5','jedi_holocron_5_5']
|
||||
items=items+['jedi_holocron_1_5_wp','jedi_holocron_2_5_wp','jedi_holocron_3_5_wp','jedi_holocron_4_5_wp','jedi_holocron_5_5_wp']
|
||||
return names
|
||||
|
||||
def itemChances():
|
||||
|
||||
return [25,15,30,5,25]
|
||||
return [9,9,15,6,12,10,9,15,3,12]
|
||||
@@ -2,7 +2,7 @@
|
||||
def itemNames():
|
||||
|
||||
templates=['damaged_datapad','red_wiring','worklight_generic','antenna','brain','eye','gland','heart','stomach','armor_repair_device'] #10
|
||||
templates=templates+['brain','chassis_blueprint','comlink','explosive_dud','hyperdrive_unit','id_chip','impulse_detector','laser_trap'] #8
|
||||
templates=templates+['brain','chassis_blueprints','comlink','explosive_dud','hyperdrive_unit','id_chip','impulse_detector','laser_trap'] #8
|
||||
templates=templates+['launcher_tube','ledger','magseal_detector','medical_console','medical_device','motor','power_output_analyzer','shield_module'] #8
|
||||
templates=templates+['software_module','survival_gear','underpowered_survey_pad','unidentified_serum_vial','used_notebook','weak_droid_battery'] #6
|
||||
return templates
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
|
||||
def itemNames():
|
||||
|
||||
return ['sith_holocron_1_5','sith_holocron_2_5','sith_holocron_3_5','sith_holocron_4_5','sith_holocron_5_5']
|
||||
items=['sith_holocron_1_5','sith_holocron_2_5','sith_holocron_3_5','sith_holocron_4_5','sith_holocron_5_5']
|
||||
items=items+['sith_holocron_1_5_wp','sith_holocron_2_5_wp','sith_holocron_3_5_wp','sith_holocron_4_5_wp','sith_holocron_5_5_wp']
|
||||
return items
|
||||
|
||||
def itemChances():
|
||||
|
||||
return [25,15,30,5,25]
|
||||
return [9,9,15,6,12,10,9,15,3,12]
|
||||
@@ -54,7 +54,7 @@ def addTemplate(core):
|
||||
|
||||
lootPoolNames_2 = ['jedi_relic_1']
|
||||
lootPoolChances_2 = [100]
|
||||
lootGroupChance_2 = 85
|
||||
lootGroupChance_2 = 30
|
||||
mobileTemplate.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2)
|
||||
|
||||
lootPoolNames_3 = ['powercrystals_hiq']
|
||||
|
||||
@@ -11,8 +11,9 @@ def handleSelection(core, actor, target, option):
|
||||
if option == 21 and target:
|
||||
if target.getAttachment('CollectionItemName'):
|
||||
print (target.getAttachment('CollectionItemName'))
|
||||
core.collectionService.addCollection(actor, target.getAttachment('CollectionItemName'))
|
||||
core.objectService.useObject(actor, target)
|
||||
#core.objectService.destroyObject(target)
|
||||
if core.collectionService.isComplete(actor, target.getAttachment('CollectionItemName')) == False:
|
||||
core.collectionService.addCollection(actor, target.getAttachment('CollectionItemName'))
|
||||
core.objectService.useObject(actor, target)
|
||||
core.objectService.destroyObject(target)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user