Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Template entities are used by spawners to create copies of entities
  4. // that were configured by the level designer. This allows us to spawn
  5. // entities with arbitrary sets of key/value data and entity I/O
  6. // connections.
  7. //
  8. //=============================================================================//
  9. #ifndef TEMPLATEENTITIES_H
  10. #define TEMPLATEENTITIES_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "isaverestore.h"
  15. class CBaseEntity;
  16. class CPointTemplate;
  17. int Templates_Add(CBaseEntity *pEntity, const char *pszMapData, int nLen);
  18. string_t Templates_FindByIndex( int iIndex );
  19. int Templates_GetStringSize( int iIndex );
  20. string_t Templates_FindByTargetName(const char *pszName);
  21. void Templates_ReconnectIOForGroup( CPointTemplate *pGroup );
  22. // Some templates have Entity I/O connecting the entities within the template.
  23. // Unique versions of these templates need to be created whenever they're instanced.
  24. void Templates_StartUniqueInstance( void );
  25. bool Templates_IndexRequiresEntityIOFixup( int iIndex );
  26. char *Templates_GetEntityIOFixedMapData( int iIndex );
  27. // Save / Restore
  28. ISaveRestoreBlockHandler *GetTemplateSaveRestoreBlockHandler( void );
  29. #endif // TEMPLATEENTITIES_H