Fixed bug
When player leave server after his death, his ragdoll is in not removed as it is done with player:set_ragdoll_state(RAGDOLL_NONE) called in PlayerSpawn hook.
So it was moved into the create_ragdoll_entity function.
Typo
Decay is a bit ambiguous parameter name, so it was renamed into delay
Feature
Corpse removement delay was moved into config.yml
To be negotiated
Is it better to store delay parameter in the separated table that is passed to set_ragdoll_state as parameter or initialize it directly in this method
Also, whether there are any others way to call PlayerDeathThink hook without calling player:is_ragdolled() method, that would allow to delete corpses before player respawned
should have probably renamed into decay_time. I see a few other issues with the code but I'll need to be properly on my PC to really comment on them. I'll get back to you in a few.
PS sorry for the messy first pull request.