OnDeepSeaClose
OxideCarbonNavalvoid OnDeepSeaClose(DeepSeaManager local1)Works — the game method in this build is the one the hook was written for.
Parameters
- local1
- DeepSeaManager
Return value
voidThe return value is ignored — the hook only notifies.
Example
private void OnDeepSeaClose(DeepSeaManager local1)
{
Puts("OnDeepSeaClose");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
bool DeepSeaManager.<CloseDeepSeaAsync>d__78.MoveNext()
Passes: DeepSeaManager local1
WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (l1)Assembly-CSharp.dll
Where it is called (this branch's game code)
// …
DeepSeaManager deepSeaManager = <>4__this;
switch (num)
{
default:
return false;
case 0:
{
<>1__state = -1;
Interface.CallHook("OnDeepSeaClose", deepSeaManager);
Log("Closing...");
using (FlagsUpdateScope flagsUpdateScope = deepSeaManager.StartSetFlags(FlagsUpdateMode.SendNetworkUpdate))
{
flagsUpdateScope.Set(Flags.Open, b: false);
flagsUpdateScope.Set(Flags.Reserved1, b: false);
}
deepSeaManager.SetFlagLocal(Flags.Busy, b: true);
deepSeaManager.TimeToWipe = 0f;
// …Sources: Rust.opj from OxideMod/Oxide.Rust (MIT) and hook metadata of the Carbon documentation (MIT). Method code is decompiled from this branch's server.