3 override void CreateActionComponent()
9 override void EndActionComponent()
13 override void OnStateChange(
int pOldState,
int pCurrentState)
15 if (pCurrentState == STATE_NONE && (!
GetGame().IsDedicatedServer()))
20 else if (pCurrentState == STATE_LOOP_LOOP && pOldState != STATE_LOOP_LOOP && (!
GetGame().IsMultiplayer() ||
GetGame().IsServer()))
23 if (m_ActionData.m_MainItem.ConfigIsExisting(
"writingColor"))
25 paper_item =
ItemBase.Cast(m_ActionData.m_Target.GetObject());
29 paper_item =
ItemBase.Cast(m_ActionData.m_MainItem);
31 Param1<string> text =
new Param1<string>(paper_item.GetWrittenNoteData().GetNoteText());
32 paper_item.RPCSingleParam(
ERPCs.RPC_WRITE_NOTE, text,
true,m_ActionData.m_Player.GetIdentity());
39 const float TARGET_DISTANCE = 2;
50 override void CreateConditionComponents()
58 if ((item && item.ConfigIsExisting(
"writingColor") && target.GetObject() && Paper.Cast(target.GetObject())) || (target.GetObject() && target.GetObject().ConfigIsExisting(
"writingColor") && item && Paper.Cast(item)))
65 override void OnStartClient(
ActionData action_data )
67 if (action_data.m_Target.GetObject().ConfigIsExisting(
"writingColor"))
69 action_data.m_MainItem.GetWrittenNoteData().InitNoteInfo(
ItemBase.Cast(action_data.m_Target.GetObject()),action_data.m_MainItem);
73 ItemBase.Cast(action_data.m_Target.GetObject()).GetWrittenNoteData().InitNoteInfo(action_data.m_MainItem,
ItemBase.Cast(action_data.m_Target.GetObject()));
77 override void OnStartServer(
ActionData action_data )
79 if (action_data.m_Target.GetObject().ConfigIsExisting(
"writingColor"))
81 action_data.m_MainItem.GetWrittenNoteData().InitNoteInfo(
ItemBase.Cast(action_data.m_Target.GetObject()),action_data.m_MainItem);
85 ItemBase.Cast(action_data.m_Target.GetObject()).GetWrittenNoteData().InitNoteInfo(action_data.m_MainItem,
ItemBase.Cast(action_data.m_Target.GetObject()));
91 super.OnUpdate(action_data);
93 if(!
GetGame().IsDedicatedServer())
102 override void OnEndRequest(
ActionData action_data)
104 if (action_data.m_Callback)