Skip to content

Instantly share code, notes, and snippets.

@NimbusFox
Created February 24, 2018 17:17
Show Gist options
  • Save NimbusFox/2bf9e7e9535b8d088f3422961f60a262 to your computer and use it in GitHub Desktop.
Save NimbusFox/2bf9e7e9535b8d088f3422961f60a262 to your computer and use it in GitHub Desktop.
public class CoreHook : IModHookV2 {
public void Dispose() {
}
public void GameContextInitializeInit() { }
public void GameContextInitializeBefore() { }
public void GameContextInitializeAfter() { }
public void GameContextDeinitialize() { }
public void GameContextReloadBefore() { }
public void GameContextReloadAfter() { }
public void UniverseUpdateBefore(Universe universe, Timestep step) { } }
public void UniverseUpdateAfter() { }
public bool CanPlaceTile(Entity entity, Vector3I location, Tile tile, TileAccessFlags accessFlags) {
if (condition) {
return true;
} else {
return false;
}
}
public bool CanReplaceTile(Entity entity, Vector3I location, Tile tile, TileAccessFlags accessFlags) {
if (condition) {
return true;
} else {
return false;
}
}
public bool CanRemoveTile(Entity entity, Vector3I location, TileAccessFlags accessFlags) {
// Admin check method: entity.PlayerEntityLogic.IsAdmin()
if (condition) {
return true;
} else {
return false;
}
}
public void ClientContextInitializeInit() { }
public void ClientContextInitializeBefore() { }
public void ClientContextInitializeAfter() { }
public void ClientContextDeinitialize() { }
public void ClientContextReloadBefore() { }
public void ClientContextReloadAfter() { }
public void CleanupOldSession() { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment