OnDeepSeaOpen
OxideCarbonNavalvoid OnDeepSeaOpen(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 OnDeepSeaOpen(DeepSeaManager local1)
{
Puts("OnDeepSeaOpen");
}Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.
Injection point
Rust.opj (Oxide)
bool DeepSeaManager.<OpenDeepSeaAsync>d__76.MoveNext()
Passes: DeepSeaManager local1
WorksReturnBehavior: ContinueArgumentBehavior: UseArgumentString (l1)Assembly-CSharp.dll
Where it is called (this branch's game code)
// …
int num = <>1__state;
DeepSeaManager deepSeaManager = <>4__this;
switch (num)
{
default:
return false;
case 0:
<>1__state = -1;
Interface.CallHook("OnDeepSeaOpen", deepSeaManager);
Log("Opening...");
deepSeaManager.SetFlagLocal(Flags.Busy, b: true);
deepSeaManager.SetTimeToWipe(DeepSea.wipeDuration);
deepSeaManager.SetTimeToNextOpening(0f);
<>2__current = deepSeaManager.GenerateContentAsync();
<>1__state = 1;
return true;
case 1:
// …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.