mirror of
https://github.com/SDraw/ml_mods_cvr.git
synced 2026-06-23 23:08:26 +00:00
Game build 2025r181 update
This commit is contained in:
parent
bab5346876
commit
569a521be4
35 changed files with 233 additions and 55 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using ABI_RC.Core.Networking.IO.Instancing;
|
||||
using ABI_RC.Core.UI;
|
||||
using System.Reflection;
|
||||
|
||||
|
|
@ -8,5 +9,47 @@ namespace ml_pin
|
|||
static readonly FieldInfo ms_view = typeof(CohtmlControlledViewWrapper).GetField("_view", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
|
||||
public static void ExecuteScript(this CohtmlControlledViewWrapper p_instance, string p_script) => (ms_view?.GetValue(p_instance) as cohtml.Net.View)?.ExecuteScript(p_script);
|
||||
|
||||
// Instance info
|
||||
public static bool IsInPublicInstance()
|
||||
{
|
||||
bool l_result = false;
|
||||
switch(Instances.CurrentInstancePrivacyType)
|
||||
{
|
||||
case Instances.InstancePrivacyType.Public:
|
||||
case Instances.InstancePrivacyType.GroupPublic:
|
||||
l_result = true;
|
||||
break;
|
||||
}
|
||||
return l_result;
|
||||
}
|
||||
|
||||
public static bool IsInFriendsInstance()
|
||||
{
|
||||
bool l_result = false;
|
||||
switch(Instances.CurrentInstancePrivacyType)
|
||||
{
|
||||
case Instances.InstancePrivacyType.Friends:
|
||||
case Instances.InstancePrivacyType.FriendsOfFriends:
|
||||
case Instances.InstancePrivacyType.GroupPlus:
|
||||
l_result = true;
|
||||
break;
|
||||
}
|
||||
return l_result;
|
||||
}
|
||||
|
||||
public static bool IsInPrivateInstance()
|
||||
{
|
||||
bool l_result = false;
|
||||
switch(Instances.CurrentInstancePrivacyType)
|
||||
{
|
||||
case Instances.InstancePrivacyType.EveryoneCanInvite:
|
||||
case Instances.InstancePrivacyType.OwnerMustInvite:
|
||||
case Instances.InstancePrivacyType.Group:
|
||||
l_result = true;
|
||||
break;
|
||||
}
|
||||
return l_result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue