Changeset 108


Ignore:
Timestamp:
May 17, 2017, 7:27:26 AM (19 months ago)
Author:
drazed
Message:

merge

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • api.lua

    r62 r108  
    2020-- {{{
    2121--
    22 --  if(targetless) then targetless.api.radarlock = true end
     22--  if targetless then targetless.api.radarlock = true end
    2323--  -- do stuff like scan through radar targets or whatnot, none of this should break
    2424--  -- re-targetting or hud labels during your scans
    25 --  if(targetless) then targetless.api.radarlock = false end
     25--  if targetless then targetless.api.radarlock = false end
    2626--
    2727-- }}}
  • lists/Ship.lua

    r90 r108  
    4444    elseif(ship.ship == "Heavy Assault Cruiser") then ship.cap = true
    4545    elseif(ship.ship == "TPG Teradon Frigate") then ship.cap = true
     46    elseif(ship.ship == "TPG Constellation Heavy Transport") then ship.cap = true
    4647    elseif(ship.ship == "Trident Light Frigate") then ship.cap = true
    47     elseif(ship.ship == "TPG Constellation Heavy Transport") then ship.cap = true
     48    elseif(ship.ship == "Trident Type M") then ship.cap = true
     49    elseif(ship.ship == "Goliath") then ship.cap = true
     50    elseif(ship.ship == "Capella") then ship.cap = true
    4851    end
    4952
  • main.lua

    r106 r108  
    22targetless.start = {}
    33targetless.stop = {}
    4 targetless.retarget = {}
    54targetless.logout = {}
    65targetless.init = {}
     
    3938end
    4039
    41 function targetless.retarget:OnEvent(eventname, ...)
    42     -- TODO we should probably be checking if the actual player change
    43     -- turret event rather then a turret-guest
    44     -- END TODO
    45 
    46     -- re-aquire target after short delay, so missles can lock
    47     -- we de-target first, so target actually gets required
    48     local timer = Timer()
    49         timer:SetTimeout(1000, function()
    50         local objecttype,objectid = radar.GetRadarSelectionID()
    51         gkinterface.GKProcessCommand("RadarNone")
    52         radar.SetRadarSelection(objecttype, objectid)
    53     end)
    54 end
    55 
    56 function targetless.re_attach:OnEvent(eventname, ...)
     40-- HUD.Reload causes iups to rebuild and targetless won't have
     41-- its elements to attach to, re_attach everything on HUD.Reload
     42HUD.ReloadOld = HUD.Reload
     43function HUD.Reload()
     44    -- this only works the first time?  WHY???
     45    -- reset at end of re_attached to make this work each time
     46    HUD.ReloadOld()
     47    targetless.re_attach()
     48end
     49
     50function targetless.re_attach()
    5751    -- when VO reloads the HUD it deletes all our lists thinking they're
    5852    -- the selfinfo holder box =(
    59     --targetless.Controller.bufferA:reset()
    60     --targetless.Controller.bufferB:reset()
     53    targetless.Controller.currentbuffer:reset()
     54    targetless.Controller.rebuildbuffer:reset()
     55
    6156    while(targetless.RoidList[1]) do table.remove(targetless.RoidList, 1) end
    6257    targetless.Controller.iup = nil
     
    6863    if GetStationLocation() == nil then targetless.Controller:update() end
    6964    targetless.RoidList:load(GetCurrentSectorid())
     65
     66    -- HUD.Reload seems to reset itself or something, this fixes any re-calls
     67    HUD.Reload = function()
     68        HUD.ReloadOld()
     69        targetless.re_attach()
     70    end
    7071end
    7172
     
    277278
    278279    RegisterEvent(targetless.re_attach, "rHUDxscale")
    279 
    280     RegisterEvent(targetless.retarget, "TURRET_OCCUPIED")
    281     RegisterEvent(targetless.retarget, "TURRET_EMPTY")
    282 
    283280    RegisterEvent(targetless.start, "LEAVING_STATION")
    284281    RegisterEvent(targetless.stop, "ENTERING_STATION")
  • var.lua

    r107 r108  
    2020targetless.var.sortBy = gkini.ReadString("targetless", "sort", "distance")
    2121targetless.var.oresort = gkini.ReadString("targetless", "oresort", "Heliocene")
    22 targetless.var.font = 15*(gkinterface.GetYResolution()/600)*targetless.var.fontscale
     22targetless.var.font = 11*(gkinterface.GetYResolution()/600)*targetless.var.fontscale
    2323targetless.var.showRoid = gkini.ReadString("targetless", "roidtab", "ON")
    2424targetless.var.showtls = gkini.ReadString("targetless", "showtls", "ON")
Note: See TracChangeset for help on using the changeset viewer.