Skip to content

Commit

Permalink
Merge pull request #48 from zambony/preview
Browse files Browse the repository at this point in the history
Fix methods broken by latest patch/spelling issues
  • Loading branch information
zambony authored Jun 17, 2023
2 parents 64f6f63 + d2915c1 commit 3e857cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/CommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,14 @@ public void ToggleMana(bool? enabled = null)
{
Player.m_localPlayer.m_eitrRegenDelay = 0.0f;
Player.m_localPlayer.m_eiterRegen = 1000f;
Player.m_localPlayer.SetMaxEitr(1000f, true);
Player.m_localPlayer.InvokePrivate<object>("SetMaxEitr", 1000f, true);
Plugin.NoMana = true;
}
else
{
Player.m_localPlayer.m_eitrRegenDelay = 1f;
Player.m_localPlayer.m_eiterRegen = 5f;
Player.m_localPlayer.SetMaxEitr(100f, true);
Player.m_localPlayer.InvokePrivate<object>("SetMaxEitr", 100f, true);
Plugin.NoMana = false;
}

Expand Down Expand Up @@ -930,7 +930,7 @@ public void RepairBuildings(float radius = 50f, float health = 0f)

int count = 0;

foreach (WearNTear obj in WearNTear.GetAllInstaces())
foreach (WearNTear obj in WearNTear.GetAllInstances())
{
if (Vector3.Distance(obj.gameObject.transform.position, Player.m_localPlayer.transform.position) <= radius)
{
Expand Down Expand Up @@ -1122,7 +1122,6 @@ public void SpawnPrefab(string prefab, int levelOrQuantity = 1)
// I don't know if this is necessary, the base game's spawn command doesn't do it.
// SkToolbox does it, seems like it's for networking reasons. I'll leave it here until I understand
// whether it's necessary or not.
netView.GetZDO().SetPGWVersion(zdoManager.GetPGWVersion());
zdoManager.Set("spawn_id", netView.GetZDO().m_uid);
zdoManager.Set("alive_time", ZNet.instance.GetTime().Ticks);

Expand Down
2 changes: 1 addition & 1 deletion src/Gungnir.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class Gungnir : BaseUnityPlugin
public const string ModName = "Gungnir";
public const string ModOrg = "zamboni";
public const string ModGUID = ModOrg + "." + ModName;
public const string ModVersion = "1.7.1";
public const string ModVersion = "1.7.2";

private readonly Harmony m_harmony = new Harmony(ModGUID);
private CommandHandler m_handler = new CommandHandler();
Expand Down

0 comments on commit 3e857cd

Please sign in to comment.