Skip to content

Commit

Permalink
⚙️ Lancelet (unused kamikaze sub) can [D]etonate
Browse files Browse the repository at this point in the history
  • Loading branch information
Arch-Shaman committed May 24, 2021
1 parent 1037293 commit 608783a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LuaRules/Configs/oneclick_weapon_defs.lua
Expand Up @@ -12,6 +12,9 @@ local oneClickWepDefNames = {
--hoverdepthcharge = {
-- { functionToCall = "ShootDepthcharge", reloadTime = 256, name = "Drop Depthcharge", tooltip = "Drop Depthcharge: Drops a on the sea surface or ground.", weaponToReload = 1, texture = "LuaUI/Images/Commands/Bold/dgun.png",},
--},
subscout = {
{ functionToCall = "Detonate", name = "Detonate", tooltip = "Detonate: Kill selected bomb units.", texture = "LuaUI/Images/Commands/Bold/detonate.png",},
},
cloakbomb = {
{ functionToCall = "Detonate", name = "Detonate", tooltip = "Detonate: Kill selected bomb units.", texture = "LuaUI/Images/Commands/Bold/detonate.png",},
},
Expand Down
4 changes: 4 additions & 0 deletions scripts/subscout.lua
Expand Up @@ -5,6 +5,10 @@ local enginer = piece "enginer"
local wingl = piece "wingl"
local wingr = piece "wingr"

function Detonate() -- Giving an order causes recursion.
GG.QueueUnitDescruction(unitID)
end

local explodables = {tail, enginel, enginer, wingl, wingr}
function script.Killed(recentDamage, maxHealth)
local severity = recentDamage / maxHealth
Expand Down

0 comments on commit 608783a

Please sign in to comment.