Skip to content

Commit

Permalink
Update SubUnit.lua to make it possible to remove the button
Browse files Browse the repository at this point in the history
  • Loading branch information
Basilisk3 authored Feb 12, 2024
1 parent 7cedaf1 commit 2581b11
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/sim/units/SubUnit.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

local EffectTemplate = import("/lua/effecttemplates.lua")

local Entity = import("/lua/sim/entity.lua").Entity
Expand Down Expand Up @@ -39,8 +38,10 @@ SubUnit = ClassUnit(MobileUnit) {
end

if new == 'Top' or new == 'Bottom' then
self:AddCommandCap("RULEUCC_Dive")
self:RequestRefreshUI()
if bp.General.CommandCaps.RULEUCC_Dive then
self:AddCommandCap("RULEUCC_Dive")
self:RequestRefreshUI()
end
end
end,
}

0 comments on commit 2581b11

Please sign in to comment.