68 garbageSystem.Insert(ent);
78 garbageSystem.Withdraw(vehicle);
89 garbageSystem.Insert(vehicle);
99 EventHandlerManagerComponent ev = EventHandlerManagerComponent.Cast(owner.
FindComponent(EventHandlerManagerComponent));
102 ev.RegisterScriptHandler(
"OnDestroyed",
this,
OnDestroyed,
false);
111 EventHandlerManagerComponent ev = EventHandlerManagerComponent.Cast(owner.
FindComponent(EventHandlerManagerComponent));
114 ev.RemoveScriptHandler(
"OnDestroyed",
this,
OnDestroyed,
false);
124 if (GetEngineDrowned())
132 SCR_MotorExhaustEffectGeneralComponent motorExhaust = SCR_MotorExhaustEffectGeneralComponent.Cast(
GetOwner().FindComponent(SCR_MotorExhaustEffectGeneralComponent));
134 motorExhaust.OnEngineStart(
true);
165 SCR_MotorExhaustEffectGeneralComponent motorExhaust = SCR_MotorExhaustEffectGeneralComponent.Cast(
GetOwner().FindComponent(SCR_MotorExhaustEffectGeneralComponent));
167 motorExhaust.OnEngineStop();
204 SCR_MotorExhaustEffectGeneralComponent motorExhaust = SCR_MotorExhaustEffectGeneralComponent.Cast(
GetOwner().FindComponent(SCR_MotorExhaustEffectGeneralComponent));
206 motorExhaust.OnEngineStop();
219 soundComponent.SoundEvent(
SCR_SoundEvent.SOUND_ENGINE_START_FAILED);
242 SCR_FuelConsumptionComponent fuelConsumption = SCR_FuelConsumptionComponent.Cast(
GetOwner().FindComponent(SCR_FuelConsumptionComponent));
244 fuelConsumption.SetEnabled(
true);
246 SCR_MotorExhaustEffectGeneralComponent motorExhaust = SCR_MotorExhaustEffectGeneralComponent.Cast(
GetOwner().FindComponent(SCR_MotorExhaustEffectGeneralComponent));
248 motorExhaust.OnEngineStart(
false);
258 SCR_FuelConsumptionComponent fuelConsumption = SCR_FuelConsumptionComponent.Cast(
GetOwner().FindComponent(SCR_FuelConsumptionComponent));
260 fuelConsumption.SetEnabled(
false);
265 SCR_MotorExhaustEffectGeneralComponent motorExhaust = SCR_MotorExhaustEffectGeneralComponent.Cast(
GetOwner().FindComponent(SCR_MotorExhaustEffectGeneralComponent));
267 motorExhaust.OnEngineStop();
DamageManagerComponent m_DamageManager
void OnCompartmentEntered(AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
void OnCompartmentLeft(AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
void OnDestroyed(IEntity owner)
void OnEngineStop()
Turn off the effect and pause the damaged exhaust effect.
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
void SCR_VehicleDamageManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
override bool OnBeforeEngineStart()
bool IsStarterFunctional()
Return if engine starter is functional.
AudioHandle m_iEngineStarterHandle
override void OnEngineStartSuccess()
Gets called when the engine start routine has successfully completed.
ScriptInvokerVoid GetOnEngineStop()
Invoker for the Engine Stopped event.
VehicleControllerComponentClass m_OnEngineStop
override void OnEngineStartBegin()
Gets called when the engine start routine begins (animation event).
override void OnEngineStart()
Is called every time the engine starts.
AudioHandle m_iEngineStartHandle
override void OnEngineStartFail(EVehicleEngineStartFailedReason reason)
Gets called when the engine start routine has failed.
SCR_VehicleDamageManagerComponent GetDamageManager()
AudioHandle m_iEngineStopHandle
ScriptInvokerVoid GetOnEngineStart()
Invoker for the Engine Started event.
override void OnEngineStartProgress()
Get called while engine starter is active.
VehicleControllerComponentClass m_OnEngineStart
override void OnEngineStartInterrupt()
Gets called when the engine start routine was interrupted.
SCR_PowerComponent m_PowerComponent
proto external Managed FindComponent(typename typeName)
Script entry for garbage system modding.
static SCR_GarbageSystem GetByEntityWorld(IEntity entity)
proto external void Terminate(AudioHandle handle)
IEntity GetOwner()
Owner entity of the fuel tank.
EVehicleEngineStartFailedReason
Describes failure types of engine startup routine.
event bool ValidateCanMove()