Cataclysm-DDA
Cataclysm-DDA copied to clipboard
`run_inv_eocs` runs more times than it should
Describe the bug
As title says, for some reason next EoC runs not once, when you run it, but fixed amount of times, equal of items you have on you or in your inventory replicated from #70566 use case
[
{
"type": "effect_on_condition",
"id": "DEBUG_INV_BUG",
"condition": { "math": [ "0", "==", "1" ] },
"false_effect": [
{
"u_run_inv_eocs": "manual",
"search_data": [ { "flags": [ "TRADER_AVOID" ] } ],
"true_eocs": [ { "id": "U_CAN_PICK_TRADER_AVOID", "effect": [ { "u_message": "U_CAN_PICK_TRADER_AVOID" } ] } ],
"false_eocs": [ { "id": "U_CANT_PICK_TRADER_AVOID", "effect": [ { "u_message": "U_CANT_PICK_TRADER_AVOID" } ] } ]
}
]
}
]
Attach save file
N/A
Steps to reproduce
Put beforementioned EoC in the game Run it Find it runs more than once
Expected behavior
Inventory EoC runs once
Screenshots
Versions and configuration
- OS: Windows
- OS Version: 10.0.19045.3803 (22H2)
- Game Version: 0.G-6071-g60499ad017-dirty [64-bit] (originally 60499ad)
- Graphics Version: Tiles
- Game Language: English [en]
- Mods loaded: [ Dark Days Ahead [dda], Disable NPC Needs [no_npc_food], Portal Storms Ignore NPCs [personal_portal_storms], Slowdown Fungal Growth [no_fungal_growth] ]
Additional context
No response
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
It's happening to me too. The following EOC (launched via spell) should detect a single item as it's "wielded_only": true
. However, it checks all items in the inventory at the moment of being launched:
{
"id": "iku_batteryrestore_eoc",
"type": "effect_on_condition",
"effect": [
{
"u_run_inv_eocs": "all",
"search_data": [
{ "id": "light_minus_battery_cell", "wielded_only": true },
{ "id": "light_battery_cell", "wielded_only": true },
{ "id": "light_plus_battery_cell", "wielded_only": true },
{ "id": "medium_battery_cell", "wielded_only": true },
{ "id": "medium_plus_battery_cell", "wielded_only": true },
{ "id": "heavy_battery_cell", "wielded_only": true },
{ "id": "heavy_plus_battery_cell", "wielded_only": true }
],
"true_eocs": [ "iku_batteryrestore_check" ],
"false_eocs": [
{
"id": "batteryrestore_no",
"effect": [ { "u_message": "You don't have a battery at hand.", "type": "mixed" } ]
}
]
}
]
},
Dropping all items except for the light_minus_battery_cell
while it is being wielded doesn't run the false_eocs
. However, wearing clothes increases the u_message
count by 1, each time the avatar puts on clothing.