3232#include " utilities/baseentity.h"
3333#include " game/shared/entitylist_base.h"
3434#include " game/server/entitylist.h"
35+ #include " game/server/entityoutput.h"
3536
3637#include " modules/memory/memory_tools.h"
3738#include " export_main.h"
@@ -58,6 +59,7 @@ void export_check_transmit_info(scope);
5859void export_baseentity_generator (scope);
5960void export_server_class_generator (scope);
6061void export_collideable (scope);
62+ void export_event_action (scope);
6163
6264
6365// -----------------------------------------------------------------------------
@@ -79,6 +81,7 @@ DECLARE_SP_MODULE(_entities)
7981 export_baseentity_generator (_entities);
8082 export_server_class_generator (_entities);
8183 export_collideable (_entities);
84+ export_event_action (_entities);
8285}
8386
8487
@@ -611,3 +614,53 @@ void export_collideable(scope _entities)
611614
612615 Collideable ADD_MEM_TOOLS (ICollideable);
613616}
617+
618+
619+ // -----------------------------------------------------------------------------
620+ // Exports CEventAction.
621+ // -----------------------------------------------------------------------------
622+ void export_event_action (scope _entities)
623+ {
624+ class_<CEventAction, boost::noncopyable> EventAction (" EventAction" , no_init);
625+
626+ EventAction.add_property (
627+ " target" ,
628+ &EventActionExt::get_target, &EventActionExt::set_target,
629+ " Name of the entity(s) to cause the action in."
630+ );
631+
632+ EventAction.add_property (
633+ " target_input" ,
634+ &EventActionExt::get_target_input, &EventActionExt::set_target_input,
635+ " The name of the action to fire."
636+ );
637+
638+ EventAction.add_property (
639+ " parameter" ,
640+ &EventActionExt::get_parameter, &EventActionExt::set_parameter,
641+ " Parameter to send, 0 if none."
642+ );
643+
644+ EventAction.def_readwrite (" delay" ,
645+ &CEventAction::m_flDelay,
646+ " The number of seconds to wait before firing the action."
647+ );
648+
649+ EventAction.def_readwrite (" times_to_fire" ,
650+ &CEventAction::m_nTimesToFire,
651+ " The number of times to fire this event, or EVENT_FIRE_ALWAYS."
652+ );
653+
654+ EventAction.def_readwrite (" id_stamp" ,
655+ &CEventAction::m_iIDStamp,
656+ " Unique identifier stamp."
657+ );
658+
659+ EventAction.add_property (
660+ " next" ,
661+ make_getter (&CEventAction::m_pNext, reference_existing_object_policy ()),
662+ " The next action in the linked list."
663+ );
664+
665+ EventAction ADD_MEM_TOOLS (CEventAction);
666+ }
0 commit comments