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

Commit 82facb2

Browse files
committed
Minor organization of the Ronin Soldier script
1 parent 2e074ee commit 82facb2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Ronin.rte/Actors/Shared/RoninSoldier.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ function Create(self)
66
self.Head.Frame = self.face;
77
end
88
self:SetNumberValue("Identity", self.face);
9-
--Equip loadout actors with random weapons
9+
else
10+
self.face = self:GetNumberValue("Identity");
11+
if self.Head then
12+
self.Head.Frame = self.face;
13+
end
14+
end
15+
--Equip loadout actors with random weapons
16+
if not self:NumberValueExists("Equipped") then
1017
if string.find(self.PresetName, "Infantry") then
1118
local loadoutName = string.gsub(self.PresetName, "Ronin Infantry ", "");
1219
if RoninLoadouts[loadoutName] then
@@ -44,8 +51,7 @@ function Create(self)
4451
self.Head:AddAttachable(CreateAttachable("Ronin Blonde Hair"));
4552
end
4653
end
47-
else
48-
self.face = self:GetNumberValue("Identity");
54+
self:SetNumberValue("Equipped", 1);
4955
end
5056
end
5157
function Update(self)

0 commit comments

Comments
 (0)