15 Param1<string> param =
new Param1<string>(
"");
18 if (rpc_type ==
ERPCs.RPC_WRITE_NOTE)
37 if (rpc_type ==
ERPCs.RPC_WRITE_NOTE_CLIENT)
46 if (rpc_type ==
ERPCs.RPC_READ_NOTE)
80 m_SimpleText = MiscGameplayFunctions.SanitizeString(text);
85 float qty_per_char = 1.0;
86 float decrease =
Math.Clamp((new_text.Length() - old_text.Length()),0,pen.GetQuantityMax());
87 pen.AddQuantity(-(qty_per_char * decrease));
The class that will be instanced (moddable)
Serialization general interface. Serializer API works with:
void DepleteWritingImplement(notnull ItemBase pen, string old_text, string new_text)
void InitNoteInfo(ItemBase pen=null, ItemBase paper=null)
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
void WrittenNoteData(ItemBase parent)
bool GetNoteInfo(out ItemBase pen, out ItemBase paper)
void SetNoteText(string text)
ItemBase m_WritingImplement
proto native CGame GetGame()