I was really wondering, when is the LabApi.Events.Handlers.ServerEvents.PickupCreated called. Because from my testing, which lead to inconsistent results at best, I couldn't figure it out.
Testing (Code):
LabApi.Events.Handlers.ServerEvents.PickupCreated += (ev) => Logger.Info($"Type: {ev.Pickup.Type} | Position: {ev.Pickup.Position}");
Testing Results:
Dropping items -> No event invocation
Upgrading items in 914 -> Sometimes the event is invoked, incosnistent results at best
- Upgrading keycards (tested on the setting Fine) -> No invoke
- Upgrading weapons (tested on the setting Fine) -> Invoked when upgrading a weapon with when the weapon on the input side contained Ammo
- Com18 with ammo -> WAS called
- Fsp9 without ammo -> wasn't called
- Crossvec with ammo -> WAS called
- Dropping items on death -> event was invoked
- Swapping items (picking up armor which replaces the one in the player's inventory) -> event was invoked
- Map item spawning (lockers, armories, etc.) -> event was invoked
After the above I tried dropping ammo which didn't cause an invocation of the event either.
[NOTE]: No errors in console or the text log file either
