Skip to content

Commit

Permalink
Add comment and search for stationary weapons during q sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Jan 7, 2025
1 parent e9531a8 commit fa44175
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,15 @@ protected Item FindWeapon()
}
}

if (item == null)
{
StationaryWeapon stationaryWeapon = GameWorld.FindStationaryWeaponByItemId(lastWeaponId);
if (stationaryWeapon != null)
{
item = stationaryWeapon.Item;
}
}

return item;
}

Expand Down
4 changes: 4 additions & 0 deletions Fika.Core/Coop/Utils/FikaGlobals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ private static IEnumerator SpawnItemRoutine(Item item, CoopPlayer player)
ConsoleScreen.Log($"{player.Profile.Info.Nickname} has spawned item: {item.ShortName.Localized()}");
}

/// <summary>
/// Checks whether the game client is in a raid
/// </summary>
/// <returns></returns>
public static bool IsInRaid()
{
return Singleton<AbstractGame>.Instance is CoopGame coopGame && coopGame.InRaid;
Expand Down

0 comments on commit fa44175

Please sign in to comment.