View Issue Details

IDProjectCategoryView StatusLast Update
0003784The Dark ModDef / Setuppublic17.08.2015 16:48
ReporterSteveL Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.02 
Target VersionTDM 2.04Fixed in VersionTDM 2.04 
Summary0003784: Do something about func_itemremove
Descriptionfunc_itemremove has an entity def but is not implemented in the game code. How it should work is not clear.

Would be good to either decide what it should do and implement it, or remove it from tdm_defs01.pk4->func.def
Additional InformationFrom forum post http://forums.thedarkmod.com/topic/9082-newbie-darkradiant-questions/page__view__findpost__p__350361

It's not at all clear what the intended behaviour was.

• Remove the item from the game?
• Drop it at the player's feet?
• In the case of stackables, remove 1 item or all of them?

And the editor tip mentions objectives, which have their own management system. They're not inventory items.
TagsNo tags attached.

Activities

SteveL

SteveL

02.09.2014 19:24

reporter   ~0006931

Thread started: http://forums.thedarkmod.com/topic/16513-func-itemremove-fix-or-get-rid/page__fromsearch__1
SteveL

SteveL

03.09.2014 10:28

reporter   ~0006934

Decision is to fix it. It turns out this entity def is a doom 3 inheritance. It was implemented there using an idItemRemover, which called inventory methods on the player that don't exist in TDM. So when TDM restructured the player inventory, this class must have been dumped.
SteveL

SteveL

03.09.2014 18:54

reporter   ~0006935

Last edited: 03.09.2014 18:56

The item remover will have to distinguish between at least 5 different types of inventory slot, using up to 4 different script events to handle them, depending how many types we want to support. NB calling the wrong script event for an inventory group will usually bork the inventory slot completely, so the player won't be able to use that class of item again.

unique entities: replaceInvItem()
stackables: changeInvItemCount()
arrows: useAmmo()
melee weapons: can't be removed once picked up
loot: changeLootAmount()
maps: just thought of it, not tested yet

It'll also need to handle the inventory GUI, which isn't automatically updated when an inventory slot gets emptied.

SteveL

SteveL

17.08.2015 16:46

reporter   ~0007721

Remove func_itemremove, which was fully broken and not used in any published map.
Added atdm:target_itemremove which maps to new spawnclass CTarget_ItemRemove

Committed at rev 6532 (code)
/trunk/game/Target.cpp
/trunk/game/Target.h

And at rev 14366 (defs, binaries)
/trunk/def/func.def
/trunk/def/tdm_target.def
SteveL

SteveL

17.08.2015 16:47

reporter   ~0007722

The new itemremove target supports removal of ammo, stackables, and unique items.
It gives the option of removing the item(s) from the world (the default), or dropping them at the player's feet.
SteveL

SteveL

17.08.2015 16:48

reporter   ~0007723

test map attached

Issue History

Date Modified Username Field Change
19.07.2014 17:22 SteveL New Issue
02.09.2014 19:18 SteveL Assigned To => SteveL
02.09.2014 19:18 SteveL Status new => assigned
02.09.2014 19:24 SteveL Note Added: 0006931
03.09.2014 10:28 SteveL Note Added: 0006934
03.09.2014 18:54 SteveL Note Added: 0006935
03.09.2014 18:54 SteveL Note Edited: 0006935
03.09.2014 18:56 SteveL Note Edited: 0006935
17.08.2015 16:46 SteveL Note Added: 0007721
17.08.2015 16:47 SteveL Note Added: 0007722
17.08.2015 16:48 SteveL Note Added: 0007723
17.08.2015 16:48 SteveL Status assigned => resolved
17.08.2015 16:48 SteveL Fixed in Version => TDM 2.04
17.08.2015 16:48 SteveL Resolution open => fixed
17.08.2015 16:48 SteveL Target Version => TDM 2.04