My server has very few visitors and, long story short, it is filled to the brim with barrels and crates of juicy loot, sometimes with multiple containers at the same place, is there a hook to completely short out the "barrel" spawning mechanic or would you have to cludge something up to delete barrels as soon as they spawn?
I rather not have my server be essentially a "loot airfield and go DM" kind of server.
Is there a way to disable barrel/loot spawns?
Discussion in 'Rust Development' started by Kyrah Abattoir, Aug 22, 2015.
-
There is a plugin to control there spawns http://oxidemod.org/plugins/cornucopia.1264
-
I just had a quick read through cornucopia and it doesn't really "touches" the original spawning mechanic, sure you can make it delete items but it seems very slow.
I'm using one of these plugins that allows you to put a decay rate on supply drops and it's using OnEntitySpawned which would probably be the best time to kill barrels.
However, I have no idea how to detect when it's specifically a barrel that gets created. (i only know of the "SupplyDrop" entity type)
[DOUBLEPOST=1440309981,1440274235][/DOUBLEPOST]So... I wrote this little plugin that loops through all the LootContainer objects once the server is initialized and deletes all the containers that are or the prefab loot-barrel-1.prefab or loot-barrel-2.prefab
I also have hooked OnEntitySpawned and delete all entities that are of those prefabs, yet i STILL have regular barrels on the airfield... What am I missing there?