Hooks called by Map Cleaner

Summary

Hooks

Called on the server for every entity created by the map while the map is being cleaned, which happens once the map has loaded and after every map cleanup, to decide whether the entity is removed.
Called on the server after the map has been cleaned, that is once the map has loaded and after every map cleanup.

Hooks

MapCleanerShouldRemove(entity, ent_class, matched)

server plugins/mapcleaner/plugin/sv_plugin.lua:133

Called on the server for every entity created by the map while the map is being cleaned, which happens once the map has loaded and after every map cleanup, to decide whether the entity is removed. It is not called for entities that were not created by the map nor for weapons carried by a player: those are never removed.

Parameters

  • entity Entity The entity of the map that is being looked at
  • ent_class String The class of the entity
  • matched Boolean Whether the class matches one of the patterns in effect, that is whether the entity is removed if nothing is returned

Returns

  • Boolean Return true to remove the entity, false to keep it

Called from

Call sites

PostMapClean(count)

server plugins/mapcleaner/plugin/sv_plugin.lua:179

Called on the server after the map has been cleaned, that is once the map has loaded and after every map cleanup. The removed entities are still being deleted by the engine at this point and are gone on the next tick. A schema can use it to put its own entities in place of what was removed.

Parameters

  • count Number How many entities have been removed

Called from

Call sites

Defined in