Skip to content

Commit 5246111

Browse files
committed
dont allow wands to be unusable when dropping from someone with higher frame number then you
1 parent a7cefed commit 5246111

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

quant.ew/files/core/inventory_helper.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ end
8181
function inventory_helper.deserialize_single_item(item_data)
8282
local x, y = item_data[2], item_data[3]
8383
local item = util.deserialize_entity(item_data[1], x, y)
84+
local ability = ComponentGetValue2(item, "AbilityComponent")
85+
if ability ~= nil then
86+
ComponentSetValue2(ability, "mNextFrameUsable", 0)
87+
ComponentSetValue2(ability, "mCastDelayStartFrame", 0)
88+
ComponentSetValue2(ability, "mReloadNextFrameUsable", 0)
89+
end
8490

8591
if item_data.shop_info ~= nil then
8692
local item_cost_component = util.get_or_create_component(item, "ItemCostComponent")

quant.ew/files/system/notplayer_ai/notplayer_ai.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ local water_mats = {"water", "swamp", "water_swamp", "water_salt", "blood", "mud
6060
local ignore_spell = {"ANTIHEAL", "BLACK_HOLE", "BLACK_HOLE_DEATH_TRIGGER", "POWERDIGGER", "DIGGER", "PIPE_BOMB", "PIPE_BOMB_DEATH_TRIGGER", "GRENADE_LARGE", "CRUMBLING_EARTH", "HEAL_BULLET", "FISH",
6161
"TELEPORT_PROJECTILE_CLOSER", "TELEPORT_PROJECTILE_STATIC", "SWAPPER_PROJECTILE", "TELEPORT_PROJECTILE", "TELEPORT_PROJECTILE_SHORT", "WHITE_HOLE", "CESSATION", "ADD_TRIGGER",
6262
"ADD_TIMER", "ADD_DEATH_TRIGGER", "DIVIDE_2", "DIVIDE_3", "DIVIDE_4", "DIVIDE_10", "GAMMA", "MU", "ALPHA", "OMEGA", "PHI", "SIGMA", "TAU", "SUMMON_PORTAL", "DUPLICATE",
63-
"IF_PROJECTILE", "IF_HP", "IF_ENEMY", "IF_HALF", "IF_ELSE", "IF_END", "ALL_SPELLS", "SUMMON_ROCK", "SUMMON_EGG", "SUMMON_HOLLOW_EGG", "PEBBLE", "COMMON_GRUB"}
63+
"IF_PROJECTILE", "IF_HP", "IF_ENEMY", "IF_HALF", "IF_ELSE", "IF_END", "ALL_SPELLS", "SUMMON_ROCK", "SUMMON_EGG", "SUMMON_HOLLOW_EGG", "PEBBLE", "COMMON_GRUB", "TORCH", "TORCH_ELECTRIC"}
6464

6565
local function get_potions_of_type(type)
6666
local potions = {}

0 commit comments

Comments
 (0)