Added, Updated and Removed Mods; Removed Backups
This commit is contained in:
+8
-4
@@ -59,6 +59,10 @@ function ui_mutant_loot.loot_mutant(section, clsid, loot_table, npc, dont_create
|
||||
|
||||
local possible_items = utils_data.collect_section(ini_mutant, mutant)
|
||||
|
||||
if #possible_items < 1 then
|
||||
printf("[CXV Mutant Loot] Mutant has no loot table. No modifications will be done...")
|
||||
end
|
||||
|
||||
local sim = alife()
|
||||
local npc_id = npc and npc:id()
|
||||
local npc_pos = npc and npc:position()
|
||||
@@ -80,13 +84,13 @@ function ui_mutant_loot.loot_mutant(section, clsid, loot_table, npc, dont_create
|
||||
part_kind = get_part_kind(sec)
|
||||
|
||||
if part_kind and mutant_part_guaranteed[part_kind] == true then
|
||||
printf("[CXV Mutant Loot] %s will be guaranteed (%s)", sec, part_kind)
|
||||
-- printf("[CXV Mutant Loot] %s will be guaranteed (%s)", sec, part_kind)
|
||||
chance = 1
|
||||
elseif part_kind and mutant_part_chance_mult[part_kind] then
|
||||
printf("[CXV Mutant Loot] %s will have its chances increased by %sx (%s)", sec, mutant_part_chance_mult[part_kind], part_kind)
|
||||
-- printf("[CXV Mutant Loot] %s will have its chances increased by %sx (%s)", sec, mutant_part_chance_mult[part_kind], part_kind)
|
||||
chance = (loot[3] and (loot[3] * mutant_part_chance_mult[part_kind])) or 1
|
||||
else
|
||||
printf("[CXV Mutant Loot] %s will have its chances increased by %sx (%s)", sec, mutant_other_chance_mult, part_kind)
|
||||
-- printf("[CXV Mutant Loot] %s will have its chances increased by %sx (%s)", sec, mutant_other_chance_mult, part_kind)
|
||||
chance = (loot[3] and (loot[3] * mutant_other_chance_mult)) or 1
|
||||
end
|
||||
else
|
||||
@@ -123,7 +127,7 @@ function ui_mutant_loot.loot_mutant(section, clsid, loot_table, npc, dont_create
|
||||
end
|
||||
end
|
||||
|
||||
if not was_loot_given and is_cxv_enabled and failsafe_loot then
|
||||
if not was_loot_given and is_cxv_enabled and failsafe_loot and (#possible_items > 0) then
|
||||
printf("[CXV Mutant Loot] No loot was given. Attempting loot failsafe...")
|
||||
loot = str_explode(possible_items[math.random(1,#possible_items)],",")
|
||||
if (loot and loot[1] and loot[2]) then
|
||||
|
||||
Reference in New Issue
Block a user