View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005984||The Dark Mod||Feature proposal||public||18.06.2022 12:13||25.06.2022 11:40|
|Priority||normal||Severity||normal||Reproducibility||have not tried|
|Product Version||TDM 2.10|
|Target Version||TDM 2.11|
|Summary||0005984: Add the possibility to "multiloot".|
|Description||The proposal is to have the ability to pickup several items consecutively without having to frob each item individually, but instead by pressing and holding the frob button.|
This "multilooting" is applied if the player frobs an item that goes to the inventory (loot, weapons, readables et. al.) and keeps the frob button pressed. Any interaction with other objects are deactivated in that state. The multilooting stops once the player releases the frob button or a certain amount of time has passed.
Two CVars were added to the game:
tdm_multiloot_min_interval --> the amount of time between two consecutive item pickups (default: 300 ms)
tdm_multiloot_max_interval --> the amount of time since the last pickup after which the multilooting stops, even if the frob key is still pressed
Commited for testing and feedback reasons.
|Tags||No tags attached.|
Committed with revision #9938
SysCVar and player
Some issues with code:
1) You should save/restore multiloot members (both of them).
2) You should initialize multiloot members in constructor (both of them).
3) You changed order: previously item was first frobbed, then added to inventory, now it is vice versa.
This can break a frob script which checks inventory and e.g. looks if the item is already present.
4) Do not assign 0 or 1 to boolean variable (multiloot), assign false/true instead.
Regarding p.3, I think you need to check for "inv_name" spawnarg in order to learn if item is going to inventory, then call frob script, then actually add it.
1.) That was actually intentional, but now that I think about it not thought through (the boolean should be zero when loading a savegame).
2.) Oops. Newb mistake, sorry.
3.) I haven't thought of that possibility, the changed order was intentional, but you are right.
4.) I thought I have used true and false everywhere, but may have missed some. I am still used to this and afaik it is legitime, even though no good style. Will change it nevertheless.
Thanks for helping me cleaning up my mess, although your not my mom. I appreciate it. :)
|Committed with revision #9941|
|I committed two small fixes in rev 9944.|
|18.06.2022 12:13||Obsttorte||New Issue|
|18.06.2022 12:13||Obsttorte||Status||new => assigned|
|18.06.2022 12:13||Obsttorte||Assigned To||=> Obsttorte|
|18.06.2022 12:18||Obsttorte||Note Added: 0014902|
|18.06.2022 16:04||stgatilov||Note Added: 0014903|
|18.06.2022 16:22||Obsttorte||Note Added: 0014904|
|18.06.2022 16:44||Obsttorte||Note Added: 0014905|
|18.06.2022 20:22||stgatilov||Note Added: 0014908|
|25.06.2022 06:19||Obsttorte||Status||assigned => feedback|
|25.06.2022 11:40||Obsttorte||Status||feedback => resolved|
|25.06.2022 11:40||Obsttorte||Resolution||open => fixed|