Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 5a25822

Browse files
committed
Fix roninsoldier script not working with riot shields in the most naive way possible
1 parent 72593af commit 5a25822

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Data/Ronin.rte/Actors/Shared/RoninSoldier.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ function Create(self)
2626
local firearms = {unit["Primary"], unit["Secondary"], unit["Tertiary"]};
2727
for class = 1, #firearms do
2828
if firearms[class] then
29-
local firearm = CreateHDFirearm(firearms[class][math.random(#firearms[class])], self.ModuleName);
29+
local firearmToCreate = firearms[class][math.random(#firearms[class])];
30+
local firearm;
31+
if firearmToCreate == "Riot Shield" then
32+
firearm = CreateHeldDevice(firearmToCreate, self.ModuleName);
33+
else
34+
firearm = CreateHDFirearm(firearmToCreate, self.ModuleName);
35+
end
3036
firearm:SetGoldValue(firearm:GetGoldValue(0, 1, 1) * 0.6);
3137
self:AddInventoryItem(firearm);
3238
end

0 commit comments

Comments
 (0)