{ "Id": "", "GameId": "", "EntryKey": "codeblock://playerhit", "ContentType": "x-mod/codeblock", "Content": "", "Usage": 0, "UsePublish": 1, "UseService": 0, "CoreVersion": "26.5.0.0", "StudioVersion": "0.1.0.0", "DynamicLoading": 0, "ContentProto": { "Use": "Json", "Json": { "CoreVersion": { "Major": 0, "Minor": 2 }, "ScriptVersion": { "Major": 1, "Minor": 3 }, "Description": "", "Id": "PlayerHit", "Language": 1, "Name": "PlayerHit", "Type": 4, "Source": 1, "Target": "MOD.Core.HitComponent", "Properties": [ { "Type": "number", "DefaultValue": "1", "SyncDirection": 0, "Attributes": [ { "$type": "MOD.Core.Script.MinValueScriptAttribute, MOD.Core", "Value": 0.0 } ], "Name": "ImmuneCooldown" }, { "Type": "number", "DefaultValue": "0", "SyncDirection": 0, "Attributes": [ { "$type": "MOD.Core.Script.HideFromInspectorScriptAttribute, MOD.Core" } ], "Name": "LastHitTime" } ], "Methods": [ { "Return": { "Type": "boolean", "DefaultValue": null, "SyncDirection": 0, "Attributes": [], "Name": null }, "Arguments": [ { "Type": "string", "DefaultValue": null, "SyncDirection": 0, "Attributes": [], "Name": "attackInfo" } ], "Code": "local currentTime = _UtilLogic.ElapsedSeconds\nif self.LastHitTime + self.ImmuneCooldown < currentTime then\n\tself.LastHitTime = _UtilLogic.ElapsedSeconds\n\treturn true\nend\n\nreturn false", "Scope": 2, "ExecSpace": 0, "Attributes": [], "Name": "IsHitTarget" } ], "EntityEventHandlers": [] } } }