mirror of https://github.com/bmgjet/Oxide.Rust.git
Compare commits
32 Commits
debc0c41b3
...
d332287a4c
Author | SHA1 | Date |
---|---|---|
|
d332287a4c | |
|
6ca4691566 | |
|
27340a6b56 | |
|
227526100e | |
|
695cf573ef | |
|
1ffd8e847a | |
|
cae1d0b8e2 | |
|
0d02c729da | |
|
b967f3f2a4 | |
|
136403c949 | |
|
ba8655f7ec | |
|
21019b2700 | |
|
f23b2a2ebf | |
|
544f4df233 | |
|
191af1e82f | |
|
e9df3c275f | |
|
9e8d57b281 | |
|
42c54f30b3 | |
|
8d7247a94e | |
|
cc678b6c14 | |
|
c0eb9fa022 | |
|
15a393876f | |
|
b8f1bd54db | |
|
9a41d40b93 | |
|
4f36b5c0a3 | |
|
4fd1f04099 | |
|
9105692f93 | |
|
5a47d0f3f6 | |
|
e6199f8697 | |
|
dd70e48aae | |
|
240698b73e | |
|
d39d1a39f7 |
|
@ -41,7 +41,7 @@ $references_file = Join-Path $tools_dir ".references"
|
|||
New-Item "$tools_dir", "$managed_dir", "$docs_dir" -ItemType Directory -Force | Out-Null
|
||||
|
||||
# Set URLs of dependencies and tools to download
|
||||
$steam_depotdl_url = "https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_2.5.0/depotdownloader-2.5.0.zip"
|
||||
$steam_depotdl_url = "https://img.mrblue.io/bf641959245341c381cffc95f38a2bc6.zip"
|
||||
$de4dot_url = "https://github.com/0xd4d/de4dot/suites/507020524/artifacts/2658127"
|
||||
$patcher_url = "https://github.com/OxideMod/Oxide.Patcher/releases/download/latest/OxidePatcher.exe"
|
||||
|
||||
|
@ -102,7 +102,7 @@ function Find-Dependencies {
|
|||
|
||||
function Get-Downloader {
|
||||
# Check if DepotDownloader is already downloaded
|
||||
$steam_depotdl_dll = Join-Path $tools_dir "DepotDownloader.dll"
|
||||
$steam_depotdl_dll = Join-Path $tools_dir "DepotDownloader.exe"
|
||||
$steam_depotdl_zip = Join-Path $tools_dir "DepotDownloader.zip"
|
||||
if (!(Test-Path $steam_depotdl_dll) -or (Get-Item $steam_depotdl_dll).LastWriteTime -lt (Get-Date).AddDays(-7)) {
|
||||
# Download and extract DepotDownloader
|
||||
|
@ -167,7 +167,7 @@ function Get-Dependencies {
|
|||
# Attempt to run DepotDownloader to get game DLLs
|
||||
try {
|
||||
Write-Host "$steam_access -app $steam_appid -branch $steam_branch $steam_depot -os $platform -dir $deps_dir"
|
||||
Start-Process dotnet -WorkingDirectory $tools_dir -ArgumentList "$steam_depotdl_dll $steam_access -app $steam_appid -branch $steam_branch $steam_depot -os $platform -dir $platform_dir -filelist $references_file" -NoNewWindow -Wait
|
||||
Start-Process $steam_depotdl_dll -WorkingDirectory $tools_dir -ArgumentList "$steam_access -app $steam_appid -branch $steam_branch $steam_depot -os $platform -dir $platform_dir -filelist $references_file" -NoNewWindow -Wait
|
||||
} catch {
|
||||
Write-Host "Error: Could not start or complete getting dependencies"
|
||||
Write-Host $_.Exception | Format-List -Force
|
||||
|
|
2381
resources/Rust.opj
2381
resources/Rust.opj
File diff suppressed because it is too large
Load Diff
|
@ -299,6 +299,9 @@ namespace Oxide.Game.Rust.Cui
|
|||
|
||||
[JsonProperty("png")]
|
||||
public string Png { get; set; }
|
||||
|
||||
[JsonProperty("steamid")]
|
||||
public string SteamId { get; set; }
|
||||
|
||||
[JsonProperty("fadeIn")]
|
||||
public float FadeIn { get; set; }
|
||||
|
@ -438,7 +441,12 @@ namespace Oxide.Game.Rust.Cui
|
|||
MinutesSeconds,
|
||||
MinutesSecondsHundreth,
|
||||
HoursMinutes,
|
||||
HoursMinutesSeconds
|
||||
HoursMinutesSeconds,
|
||||
HoursMinutesSecondsMilliseconds,
|
||||
HoursMinutesSecondsTenths,
|
||||
DaysHoursMinutes,
|
||||
DaysHoursMinutesSeconds,
|
||||
Custom
|
||||
}
|
||||
|
||||
public class CuiNeedsCursorComponent : ICuiComponent
|
||||
|
|
|
@ -48,12 +48,12 @@ namespace Oxide.Game.Rust
|
|||
/// </summary>
|
||||
public override string[] DefaultReferences => new[]
|
||||
{
|
||||
"0Harmony", "ApexAI", "ApexShared", "Facepunch.Network", "Facepunch.Steamworks.Posix64", "Facepunch.System", "Facepunch.UnityEngine", "Facepunch.Steamworks.Win64", "Rust.Data",
|
||||
"Rust.FileSystem", "Rust.Clans", "Rust.Clans.Local", "Rust.Global", "Rust.Localization", "Rust.Platform", "Rust.Platform.Common", "Rust.Platform.Steam", "Rust.Workshop",
|
||||
"Rust.World", "System.Drawing", "UnityEngine.AIModule", "UnityEngine.AssetBundleModule", "UnityEngine.CoreModule", "UnityEngine.GridModule", "UnityEngine.ImageConversionModule",
|
||||
"UnityEngine.Networking", "UnityEngine.PhysicsModule", "UnityEngine.TerrainModule", "UnityEngine.TerrainPhysicsModule", "UnityEngine.UI", "UnityEngine.UIModule",
|
||||
"UnityEngine.UIElementsModule", "UnityEngine.UnityWebRequestAudioModule","UnityEngine.UnityWebRequestModule", "UnityEngine.UnityWebRequestTextureModule",
|
||||
"UnityEngine.UnityWebRequestWWWModule", "UnityEngine.VehiclesModule", "UnityEngine.WebModule", "netstandard"
|
||||
"0Harmony", "Facepunch.Network", "Facepunch.Steamworks.Posix64", "Facepunch.System", "Facepunch.UnityEngine", "Facepunch.Steamworks.Win64", "Rust.Data", "Rust.FileSystem",
|
||||
"Rust.Clans", "Rust.Clans.Local", "Rust.Global", "Rust.Localization", "Rust.Platform", "Rust.Platform.Common", "Rust.Platform.Steam", "Rust.Workshop", "Rust.World",
|
||||
"System.Drawing", "UnityEngine.AIModule", "UnityEngine.AssetBundleModule", "UnityEngine.CoreModule", "UnityEngine.GridModule", "UnityEngine.ImageConversionModule",
|
||||
"UnityEngine.PhysicsModule", "UnityEngine.TerrainModule", "UnityEngine.TerrainPhysicsModule", "UnityEngine.UI", "UnityEngine.UIModule", "UnityEngine.UIElementsModule",
|
||||
"UnityEngine.UnityWebRequestAudioModule","UnityEngine.UnityWebRequestModule", "UnityEngine.UnityWebRequestTextureModule", "UnityEngine.UnityWebRequestWWWModule",
|
||||
"UnityEngine.VehiclesModule", "netstandard"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -6,6 +6,7 @@ using Oxide.Core.Libraries.Covalence;
|
|||
using Oxide.Core.Plugins;
|
||||
using Oxide.Core.RemoteConsole;
|
||||
using Oxide.Game.Rust.Libraries.Covalence;
|
||||
using Rust.Ai.Gen2;
|
||||
using Steamworks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -68,6 +69,34 @@ namespace Oxide.Game.Rust
|
|||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when an NPC tries to target an entity
|
||||
/// </summary>
|
||||
/// <param name="sense"></param>
|
||||
/// <param name="target"></param>
|
||||
/// <returns></returns>
|
||||
[HookMethod("IOnNpcTarget")]
|
||||
private object IOnNpcTarget(SenseComponent sense, BaseEntity target)
|
||||
{
|
||||
if (!sense || !target)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
BaseEntity baseEntity = sense.baseEntity;
|
||||
if (!baseEntity)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Interface.CallHook("OnNpcTarget", baseEntity, target) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called after a BaseNetworkable has been saved into a ProtoBuf object that is about to
|
||||
/// be serialized for a network connection or cache
|
||||
|
|
Loading…
Reference in New Issue