Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.
/ SM-LevelKeyValues Public archive

Parses the level entity string into an easily-manipulatable structure.

License

Notifications You must be signed in to change notification settings

nosoop/SM-LevelKeyValues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Note

This project has been deprecated and archived; it no longer functions in SourceMod 1.11 and newer.

However, it lives on in the form of the entity lump natives I've introduced in those newer versions. While there are differences that prevent existing plugins from being directly ported to the new built-in system, I believe the new system is much more friendly to work with.

Level KeyValues

A helper plugin that transforms the level's entity string into a StringMultiMap handle.

Dependencies

  • The More ADTs extension provides the StringMultiMap handle type, providing proper support for one-to-many mappings without an additional handle for each unique key.

Usage

Think of it as a more flexible, barebones version of Stripper:Source.

You don't get the nice configuration files for fixed filterings, but you do get the following:

forward Action LevelEntity_OnEntityKeysParsed(LevelEntityKeyValues entity);

Plugins listening to the forward can add / remove keys, or return Plugin_Stop to filter the entity out entirely.

forward void LevelEntity_OnAllEntitiesParsed();
native void LevelEntity_InsertEntityKeys(LevelEntityKeyValues entity);

Plugins can instantiate their own instances of LevelEntityKeyValues and call LevelEntity_InsertEntityKeys during this forward to add them to the level.