diff --git a/entities/entities/sc_turret.lua b/entities/entities/sc_turret.lua index c920127acf2cd4c96420a317883122bc57f8ed8e..6f8d929414efbb8f87e08ab449dcbc4d6b851a56 100644 --- a/entities/entities/sc_turret.lua +++ b/entities/entities/sc_turret.lua @@ -679,23 +679,38 @@ function ENT:DoOutputs() if not gun or not IsValid(gun) then return end if not gun.Invalid then + + local text = "-"..#self.Weapons.."x "..gun.PrintName.."-\n" + if gun:CanFire() then Wire_TriggerOutput(self, "Can Fire", 1) else Wire_TriggerOutput(self, "Can Fire", 0) end - Wire_TriggerOutput(self, "Shots Remaining", gun.ShotsRemaining) + local remaining = 0 + for k,v in pairs(self.Weapons) do remaining = remaining + (gun.Invalid and 0 or gun.ShotsRemaining) end + Wire_TriggerOutput(self, "Shots Remaining", remaining) if gun.Data.GUN.CLIP then local reloadDisplay = math.Round(gun.ReloadPercent * 100) / 100 Wire_TriggerOutput(self, "Reloading", reloadDisplay) + + text = text .. "\nReloading: " .. tostring(gun.IsReloading) .. "\nReloaded: " .. (reloadDisplay * 100) + text = text .. "%\nShots Remaining: " .. remaining .. " / " .. gun.Data.GUN.CLIP*#self.Weapons end if gun.Data.GUN.CHARGEABLE then + text = text.."\nCharging: "..tostring(gun.IsCharging) + text = text.."\nCharge: " .. math.Round(gun:GetChargeLevel() * 10000) / 100 .. "%" local chargeDisplay = math.Round(gun:GetChargeLevel() * 100) / 100 Wire_TriggerOutput(self, "Charge Level", chargeDisplay) end + text = text.."\n\nLink Status: "..gun.SC_Fitting.SC_Status + + self:SetOverlayText(text.."\nOwner: "..(IsValid(self.Owner) and self.Owner:Nick() or "Unknown")) + else + self:SetOverlayText("WEAPON INVALID PLEASE UPDATE ME D;") end end