20 [
RplProp(onRplName:
"OnFuzeTypeChanged")]
23 [
RplProp(onRplName:
"OnArrayOfConnectedDetonatorsChanged")]
130 garbageManager.UpdateBlacklist(
GetOwner(), !garbageCollectable);
151 if (!timeAndWeatherManager)
236 SlotManagerComponent slotManagerComp = SlotManagerComponent.Cast(
GetOwner().FindComponent(SlotManagerComponent));
237 if (!slotManagerComp)
240 array<EntitySlotInfo> slots = {};
241 if (!slotManagerComp.GetSlotInfos(slots))
252 fuzeEntity = fuzeSlot.GetAttachedEntity();
282 if (!triggerId.IsValid())
285 SCR_DetonatorGadgetComponent detonatorComp;
288 if (!detonatorId.IsValid())
291 detonatorComp = SCR_DetonatorGadgetComponent.Cast(
Replication.FindItem(detonatorId));
295 detonatorComp.ReplaceChargeFromTheList(triggerId,
RplId.Invalid());
328 iic.RequestUserLock(
GetOwner(), locked);
338 return RplId.Invalid();
368 if (!timeAndWeatherManager)
371 if (timeAndWeatherManager.GetEngineTime() >
m_fTimer)
382 super.EOnInit(owner);
396 super.OnPostInit(owner);
414 writer.WriteRplId(detonatorId);
418 return super.RplSave(writer);
425 int numberOfConnectedDetonators;
426 reader.ReadInt(numberOfConnectedDetonators);
427 for (
int i; i < numberOfConnectedDetonators; i++)
430 reader.ReadRplId(rplIdOutput);
431 if (rplIdOutput.IsValid())
437 return super.RplLoad(reader);
ArmaReforgerScripted GetGame()
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_BaseGameMode GetGameMode()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_EFuzeType
Enum with all types of fuzes.
ScriptInvokerBase< ScriptInvokerFuzeChangedMethod > ScriptInvokerFuzeChanged
func ScriptInvokerFuzeChangedMethod
Adds ability to attach an object to a slot.
Slot that is meant to be used for excplosive charge fuze.
SCR_EFuzeType GetFuzeType()
proto external Managed FindComponent(typename typeName)
proto external EntityFlags SetFlags(EntityFlags flags, bool recursively=false)
proto external IEntity GetParent()
proto external EntityFlags ClearFlags(EntityFlags flags, bool recursively=false)
Replication item identifier.
void OnArrayOfConnectedDetonatorsChanged()
SCR_EFuzeType GetUsedFuzeType()
RplId GetRplId()
Checks validity and returns RplId of this component.
void UpdateFuzeVisibility()
Change visibility of sloted fuze.
override void EOnInit(IEntity owner)
int GetNumberOfConnectedDetonators()
void DisarmChargeSilent()
Callback method to ensure that charge is disarmed when transferred but with no sound.
override void EOnFrame(IEntity owner, float timeSlice)
override void OnPostInit(IEntity owner)
void ConnectDetonator(SCR_EFuzeType fuzeType, RplId detonatorId=RplId.Invalid(), bool shouldReplicate=true, bool silent=false)
SCR_EFuzeType m_eUsedFuzeType
bool IsDetonatorConnected(RplId detonatorId)
ScriptInvokerFuzeChanged GetOnFuzeChanged()
void ChangeLockState(bool locked=false)
When item is locked then players wont be able to pick it up.
bool CheckRplId()
Checks validaty of RplId and if that fails then tries to find correct RplId for that trigger.
void SetGarbageCollectable(bool garbageCollectable)
void DisarmCharge(bool playSound=true)
ref array< RplId > m_aConnectedDetonators
void ArmWithTimedFuze(bool silent=false)
Arms the charge and starts the timer for the detonation.
array< RplId > GetConnectedDetonators()
void OnFuzeChanged(SCR_EFuzeType oldFuzeType, SCR_EFuzeType newFuzeType)
Triggers m_OnFuzeChanged when such exists with information about old and new fuze type.
void RemoveDetonatorFromTheList(RplId detonatorId, bool shouldReplicate=true)
Removes provided detonator RplId unless its not there in the first place.
override void OnDelete(IEntity owner)
SCR_ExplosiveTriggerComponent GetTrigger()
float GetTimeOfDetonation()
void ReplaceDetonatorFromTheList(RplId detonatorIdToReplace, RplId replaceWith=RplId.Invalid())
Replaces connected detonator RplId with provided id which by default will be invalid.
void SetFuzeTime(float fuzeDelay, bool silent=false)
Change the time which will be used for timed fuze.
SCR_ExplosiveTriggerComponent m_Trigger
override bool RplLoad(ScriptBitReader reader)
ref ScriptInvokerFuzeChanged m_OnFuzeChanged
override bool RplSave(ScriptBitWriter writer)
Script entry for garbage system modding.
static SCR_GarbageSystem GetByEntityWorld(IEntity entity)
IEntity GetOwner()
Owner entity of the fuel tank.
EntityEvent
Various entity events.
EntityFlags
Various entity flags.
RplRole
Role of replicated node (and all items in it) within the replication system.