RustTip

OnSignUpdated

OxideStructure
void OnSignUpdated(Signage signage, BasePlayer player, int int32)
void OnSignUpdated(PhotoFrame photoFrame, BasePlayer player)
void OnSignUpdated(CarvablePumpkin carvablePumpkin, BasePlayer player)
Method changed — check — the game method differs from the one the hook is recorded for in Oxide. The hook is still called, but its place may have shifted — worth checking after an update.

Parameters

signage
Signage
player
BasePlayer
int32
int

Return value

voidThe return value is ignored — the hook only notifies.

Example

private void OnSignUpdated(Signage signage, BasePlayer player, int int32)
{
    Puts("OnSignUpdated");
}

Works in both Oxide and Carbon: Carbon loads Oxide plugins as is.

Injection point 1

Rust.opj (Oxide)
void Signage.UpdateSign(BaseEntity.RPCMessage)

Passes: Signage signage, BasePlayer player, int int32

Method changed — checkReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, a0.player, l0)Assembly-CSharp.dll

Injection point 2

Rust.opj (Oxide)
void PhotoFrame.UpdateSign(BaseEntity.RPCMessage)

Passes: PhotoFrame photoFrame, BasePlayer player

Method changed — checkReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, a0.player)Assembly-CSharp.dll

Where it is called (this branch's game code)

// …
	if (!(msg.player == null) && CanUpdateSign(msg.player))
	{
		byte[] array = msg.read.BytesWithSize();
		if (array != null && ImageProcessing.IsValidPNG(array, 1024, 1024))
		{
			_overlayTextureCrc = FileStorage.server.Store(net.ID, 0uL, FileStorage.Type.png, array);
			Analytics.Azure.OnUGCCreated(msg.player, this, "photo_frame", array.Length);
			UGCModeration.Send(msg.player, this, "photo_frame", _overlayTextureCrc, FileStorage.Type.png);
			Interface.CallHook("OnSignUpdated", this, msg.player);
			LogEdit(msg.player);
			SendNetworkUpdate();
		}
	}
}

Injection point 3

Rust.opj (Oxide)
void CarvablePumpkin.UpdateSign(BaseEntity.RPCMessage)

Passes: CarvablePumpkin carvablePumpkin, BasePlayer player

Method changed — checkReturnBehavior: ContinueArgumentBehavior: UseArgumentString (this, a0.player)Assembly-CSharp.dll

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.